Debian Codegraph @

configure

raw
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.71 for GRUB 2.14.
4 #
5 # Report bugs to <[email protected]>.
6 #
7 #
8 # Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
9 # Inc.
10 #
11 #
12 # This configure script is free software; the Free Software Foundation
13 # gives unlimited permission to copy, distribute and modify it.
14 ## -------------------- ##
15 ## M4sh Initialization. ##
16 ## -------------------- ##
17
18 # Be more Bourne compatible
19 DUALCASE=1; export DUALCASE # for MKS sh
20 as_nop=:
21 if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
22 then :
23 emulate sh
24 NULLCMD=:
25 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
26 # is contrary to our usage. Disable this feature.
27 alias -g '${1+"$@"}'='"$@"'
28 setopt NO_GLOB_SUBST
29 else $as_nop
30 case `(set -o) 2>/dev/null` in #(
31 *posix*) :
32 set -o posix ;; #(
33 *) :
34 ;;
35 esac
36 fi
37
38
39
40 # Reset variables that may have inherited troublesome values from
41 # the environment.
42
43 # IFS needs to be set, to space, tab, and newline, in precisely that order.
44 # (If _AS_PATH_WALK were called with IFS unset, it would have the
45 # side effect of setting IFS to empty, thus disabling word splitting.)
46 # Quoting is to prevent editors from complaining about space-tab.
47 as_nl='
48 '
49 export as_nl
50 IFS=" "" $as_nl"
51
52 PS1='$ '
53 PS2='> '
54 PS4='+ '
55
56 # Ensure predictable behavior from utilities with locale-dependent output.
57 LC_ALL=C
58 export LC_ALL
59 LANGUAGE=C
60 export LANGUAGE
61
62 # We cannot yet rely on "unset" to work, but we need these variables
63 # to be unset--not just set to an empty or harmless value--now, to
64 # avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
65 # also avoids known problems related to "unset" and subshell syntax
66 # in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
67 for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
68 do eval test \${$as_var+y} \
69 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
70 done
71
72 # Ensure that fds 0, 1, and 2 are open.
73 if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
74 if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
75 if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
76
77 # The user is always right.
78 if ${PATH_SEPARATOR+false} :; then
79 PATH_SEPARATOR=:
80 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
81 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
82 PATH_SEPARATOR=';'
83 }
84 fi
85
86
87 # Find who we are. Look in the path if we contain no directory separator.
88 as_myself=
89 case $0 in #((
90 *[\\/]* ) as_myself=$0 ;;
91 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
92 for as_dir in $PATH
93 do
94 IFS=$as_save_IFS
95 case $as_dir in #(((
96 '') as_dir=./ ;;
97 */) ;;
98 *) as_dir=$as_dir/ ;;
99 esac
100 test -r "$as_dir$0" && as_myself=$as_dir$0 && break
101 done
102 IFS=$as_save_IFS
103
104 ;;
105 esac
106 # We did not find ourselves, most probably we were run as `sh COMMAND'
107 # in which case we are not to be found in the path.
108 if test "x$as_myself" = x; then
109 as_myself=$0
110 fi
111 if test ! -f "$as_myself"; then
112 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113 exit 1
114 fi
115
116
117 # Use a proper internal environment variable to ensure we don't fall
118 # into an infinite loop, continuously re-executing ourselves.
119 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
120 _as_can_reexec=no; export _as_can_reexec;
121 # We cannot yet assume a decent shell, so we have to provide a
122 # neutralization value for shells without unset; and this also
123 # works around shells that cannot unset nonexistent variables.
124 # Preserve -v and -x to the replacement shell.
125 BASH_ENV=/dev/null
126 ENV=/dev/null
127 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
128 case $- in # ((((
129 *v*x* | *x*v* ) as_opts=-vx ;;
130 *v* ) as_opts=-v ;;
131 *x* ) as_opts=-x ;;
132 * ) as_opts= ;;
133 esac
134 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
135 # Admittedly, this is quite paranoid, since all the known shells bail
136 # out after a failed `exec'.
137 printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
138 exit 255
139 fi
140 # We don't want this to propagate to other subprocesses.
141 { _as_can_reexec=; unset _as_can_reexec;}
142 if test "x$CONFIG_SHELL" = x; then
143 as_bourne_compatible="as_nop=:
144 if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
145 then :
146 emulate sh
147 NULLCMD=:
148 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
149 # is contrary to our usage. Disable this feature.
150 alias -g '\${1+\"\$@\"}'='\"\$@\"'
151 setopt NO_GLOB_SUBST
152 else \$as_nop
153 case \`(set -o) 2>/dev/null\` in #(
154 *posix*) :
155 set -o posix ;; #(
156 *) :
157 ;;
158 esac
159 fi
160 "
161 as_required="as_fn_return () { (exit \$1); }
162 as_fn_success () { as_fn_return 0; }
163 as_fn_failure () { as_fn_return 1; }
164 as_fn_ret_success () { return 0; }
165 as_fn_ret_failure () { return 1; }
166
167 exitcode=0
168 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
169 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
170 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
171 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
172 if ( set x; as_fn_ret_success y && test x = \"\$1\" )
173 then :
174
175 else \$as_nop
176 exitcode=1; echo positional parameters were not saved.
177 fi
178 test x\$exitcode = x0 || exit 1
179 blah=\$(echo \$(echo blah))
180 test x\"\$blah\" = xblah || exit 1
181 test -x / || exit 1"
182 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
183 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
184 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
185 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
186 test \$(( 1 + 1 )) = 2 || exit 1"
187 if (eval "$as_required") 2>/dev/null
188 then :
189 as_have_required=yes
190 else $as_nop
191 as_have_required=no
192 fi
193 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
194 then :
195
196 else $as_nop
197 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
198 as_found=false
199 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
200 do
201 IFS=$as_save_IFS
202 case $as_dir in #(((
203 '') as_dir=./ ;;
204 */) ;;
205 *) as_dir=$as_dir/ ;;
206 esac
207 as_found=:
208 case $as_dir in #(
209 /*)
210 for as_base in sh bash ksh sh5; do
211 # Try only shells that exist, to save several forks.
212 as_shell=$as_dir$as_base
213 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
214 as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null
215 then :
216 CONFIG_SHELL=$as_shell as_have_required=yes
217 if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null
218 then :
219 break 2
220 fi
221 fi
222 done;;
223 esac
224 as_found=false
225 done
226 IFS=$as_save_IFS
227 if $as_found
228 then :
229
230 else $as_nop
231 if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
232 as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
233 then :
234 CONFIG_SHELL=$SHELL as_have_required=yes
235 fi
236 fi
237
238
239 if test "x$CONFIG_SHELL" != x
240 then :
241 export CONFIG_SHELL
242 # We cannot yet assume a decent shell, so we have to provide a
243 # neutralization value for shells without unset; and this also
244 # works around shells that cannot unset nonexistent variables.
245 # Preserve -v and -x to the replacement shell.
246 BASH_ENV=/dev/null
247 ENV=/dev/null
248 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249 case $- in # ((((
250 *v*x* | *x*v* ) as_opts=-vx ;;
251 *v* ) as_opts=-v ;;
252 *x* ) as_opts=-x ;;
253 * ) as_opts= ;;
254 esac
255 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256 # Admittedly, this is quite paranoid, since all the known shells bail
257 # out after a failed `exec'.
258 printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
259 exit 255
260 fi
261
262 if test x$as_have_required = xno
263 then :
264 printf "%s\n" "$0: This script requires a shell more modern than all"
265 printf "%s\n" "$0: the shells that I found on your system."
266 if test ${ZSH_VERSION+y} ; then
267 printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
268 printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
269 else
270 printf "%s\n" "$0: Please tell [email protected] and [email protected]
271 $0: about your system, including any error possibly output
272 $0: before this message. Then install a modern shell, or
273 $0: manually run the script under such a shell if you do
274 $0: have one."
275 fi
276 exit 1
277 fi
278 fi
279 fi
280 SHELL=${CONFIG_SHELL-/bin/sh}
281 export SHELL
282 # Unset more variables known to interfere with behavior of common tools.
283 CLICOLOR_FORCE= GREP_OPTIONS=
284 unset CLICOLOR_FORCE GREP_OPTIONS
285
286 ## --------------------- ##
287 ## M4sh Shell Functions. ##
288 ## --------------------- ##
289 # as_fn_unset VAR
290 # ---------------
291 # Portably unset VAR.
292 as_fn_unset ()
293 {
294 { eval $1=; unset $1;}
295 }
296 as_unset=as_fn_unset
297
298
299 # as_fn_set_status STATUS
300 # -----------------------
301 # Set $? to STATUS, without forking.
302 as_fn_set_status ()
303 {
304 return $1
305 } # as_fn_set_status
306
307 # as_fn_exit STATUS
308 # -----------------
309 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
310 as_fn_exit ()
311 {
312 set +e
313 as_fn_set_status $1
314 exit $1
315 } # as_fn_exit
316 # as_fn_nop
317 # ---------
318 # Do nothing but, unlike ":", preserve the value of $?.
319 as_fn_nop ()
320 {
321 return $?
322 }
323 as_nop=as_fn_nop
324
325 # as_fn_mkdir_p
326 # -------------
327 # Create "$as_dir" as a directory, including parents if necessary.
328 as_fn_mkdir_p ()
329 {
330
331 case $as_dir in #(
332 -*) as_dir=./$as_dir;;
333 esac
334 test -d "$as_dir" || eval $as_mkdir_p || {
335 as_dirs=
336 while :; do
337 case $as_dir in #(
338 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
339 *) as_qdir=$as_dir;;
340 esac
341 as_dirs="'$as_qdir' $as_dirs"
342 as_dir=`$as_dirname -- "$as_dir" ||
343 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
344 X"$as_dir" : 'X\(//\)[^/]' \| \
345 X"$as_dir" : 'X\(//\)$' \| \
346 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
347 printf "%s\n" X"$as_dir" |
348 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
349 s//\1/
350 q
351 }
352 /^X\(\/\/\)[^/].*/{
353 s//\1/
354 q
355 }
356 /^X\(\/\/\)$/{
357 s//\1/
358 q
359 }
360 /^X\(\/\).*/{
361 s//\1/
362 q
363 }
364 s/.*/./; q'`
365 test -d "$as_dir" && break
366 done
367 test -z "$as_dirs" || eval "mkdir $as_dirs"
368 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
369
370
371 } # as_fn_mkdir_p
372
373 # as_fn_executable_p FILE
374 # -----------------------
375 # Test if FILE is an executable regular file.
376 as_fn_executable_p ()
377 {
378 test -f "$1" && test -x "$1"
379 } # as_fn_executable_p
380 # as_fn_append VAR VALUE
381 # ----------------------
382 # Append the text in VALUE to the end of the definition contained in VAR. Take
383 # advantage of any shell optimizations that allow amortized linear growth over
384 # repeated appends, instead of the typical quadratic growth present in naive
385 # implementations.
386 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
387 then :
388 eval 'as_fn_append ()
389 {
390 eval $1+=\$2
391 }'
392 else $as_nop
393 as_fn_append ()
394 {
395 eval $1=\$$1\$2
396 }
397 fi # as_fn_append
398
399 # as_fn_arith ARG...
400 # ------------------
401 # Perform arithmetic evaluation on the ARGs, and store the result in the
402 # global $as_val. Take advantage of shells that can avoid forks. The arguments
403 # must be portable across $(()) and expr.
404 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
405 then :
406 eval 'as_fn_arith ()
407 {
408 as_val=$(( $* ))
409 }'
410 else $as_nop
411 as_fn_arith ()
412 {
413 as_val=`expr "$@" || test $? -eq 1`
414 }
415 fi # as_fn_arith
416
417 # as_fn_nop
418 # ---------
419 # Do nothing but, unlike ":", preserve the value of $?.
420 as_fn_nop ()
421 {
422 return $?
423 }
424 as_nop=as_fn_nop
425
426 # as_fn_error STATUS ERROR [LINENO LOG_FD]
427 # ----------------------------------------
428 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
429 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
430 # script with STATUS, using 1 if that was 0.
431 as_fn_error ()
432 {
433 as_status=$1; test $as_status -eq 0 && as_status=1
434 if test "$4"; then
435 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
436 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
437 fi
438 printf "%s\n" "$as_me: error: $2" >&2
439 as_fn_exit $as_status
440 } # as_fn_error
441
442 if expr a : '\(a\)' >/dev/null 2>&1 &&
443 test "X`expr 00001 : '.*\(...\)'`" = X001; then
444 as_expr=expr
445 else
446 as_expr=false
447 fi
448
449 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
450 as_basename=basename
451 else
452 as_basename=false
453 fi
454
455 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
456 as_dirname=dirname
457 else
458 as_dirname=false
459 fi
460
461 as_me=`$as_basename -- "$0" ||
462 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
463 X"$0" : 'X\(//\)$' \| \
464 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
465 printf "%s\n" X/"$0" |
466 sed '/^.*\/\([^/][^/]*\)\/*$/{
467 s//\1/
468 q
469 }
470 /^X\/\(\/\/\)$/{
471 s//\1/
472 q
473 }
474 /^X\/\(\/\).*/{
475 s//\1/
476 q
477 }
478 s/.*/./; q'`
479
480 # Avoid depending upon Character Ranges.
481 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
482 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
483 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
484 as_cr_digits='0123456789'
485 as_cr_alnum=$as_cr_Letters$as_cr_digits
486
487
488 as_lineno_1=$LINENO as_lineno_1a=$LINENO
489 as_lineno_2=$LINENO as_lineno_2a=$LINENO
490 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
491 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
492 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
493 sed -n '
494 p
495 /[$]LINENO/=
496 ' <$as_myself |
497 sed '
498 s/[$]LINENO.*/&-/
499 t lineno
500 b
501 :lineno
502 N
503 :loop
504 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
505 t loop
506 s/-\n.*//
507 ' >$as_me.lineno &&
508 chmod +x "$as_me.lineno" ||
509 { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
510
511 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
512 # already done that, so ensure we don't try to do so again and fall
513 # in an infinite loop. This has already happened in practice.
514 _as_can_reexec=no; export _as_can_reexec
515 # Don't try to exec as it changes $[0], causing all sort of problems
516 # (the dirname of $[0] is not the place where we might find the
517 # original and so on. Autoconf is especially sensitive to this).
518 . "./$as_me.lineno"
519 # Exit status is that of the last command.
520 exit
521 }
522
523
524 # Determine whether it's possible to make 'echo' print without a newline.
525 # These variables are no longer used directly by Autoconf, but are AC_SUBSTed
526 # for compatibility with existing Makefiles.
527 ECHO_C= ECHO_N= ECHO_T=
528 case `echo -n x` in #(((((
529 -n*)
530 case `echo 'xy\c'` in
531 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
532 xy) ECHO_C='\c';;
533 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
534 ECHO_T=' ';;
535 esac;;
536 *)
537 ECHO_N='-n';;
538 esac
539
540 # For backward compatibility with old third-party macros, we provide
541 # the shell variables $as_echo and $as_echo_n. New code should use
542 # AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
543 as_echo='printf %s\n'
544 as_echo_n='printf %s'
545
546
547 rm -f conf$$ conf$$.exe conf$$.file
548 if test -d conf$$.dir; then
549 rm -f conf$$.dir/conf$$.file
550 else
551 rm -f conf$$.dir
552 mkdir conf$$.dir 2>/dev/null
553 fi
554 if (echo >conf$$.file) 2>/dev/null; then
555 if ln -s conf$$.file conf$$ 2>/dev/null; then
556 as_ln_s='ln -s'
557 # ... but there are two gotchas:
558 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
559 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
560 # In both cases, we have to default to `cp -pR'.
561 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
562 as_ln_s='cp -pR'
563 elif ln conf$$.file conf$$ 2>/dev/null; then
564 as_ln_s=ln
565 else
566 as_ln_s='cp -pR'
567 fi
568 else
569 as_ln_s='cp -pR'
570 fi
571 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
572 rmdir conf$$.dir 2>/dev/null
573
574 if mkdir -p . 2>/dev/null; then
575 as_mkdir_p='mkdir -p "$as_dir"'
576 else
577 test -d ./-p && rmdir ./-p
578 as_mkdir_p=false
579 fi
580
581 as_test_x='test -x'
582 as_executable_p=as_fn_executable_p
583
584 # Sed expression to map a string onto a valid CPP name.
585 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
586
587 # Sed expression to map a string onto a valid variable name.
588 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
589
590
591 test -n "$DJDIR" || exec 7<&0 </dev/null
592 exec 6>&1
593
594 # Name of the host.
595 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
596 # so uname gets run too.
597 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
598
599 #
600 # Initializations.
601 #
602 ac_default_prefix=/usr/local
603 ac_clean_files=
604 ac_config_libobj_dir=.
605 LIBOBJS=
606 cross_compiling=no
607 subdirs=
608 MFLAGS=
609 MAKEFLAGS=
610
611 # Identity of this package.
612 PACKAGE_NAME='GRUB'
613 PACKAGE_TARNAME='grub'
614 PACKAGE_VERSION='2.14'
615 PACKAGE_STRING='GRUB 2.14'
616 PACKAGE_BUGREPORT='[email protected]'
617 PACKAGE_URL=''
618
619 # Factoring default headers for most tests.
620 ac_includes_default="\
621 #include <stddef.h>
622 #ifdef HAVE_STDIO_H
623 # include <stdio.h>
624 #endif
625 #ifdef HAVE_STDLIB_H
626 # include <stdlib.h>
627 #endif
628 #ifdef HAVE_STRING_H
629 # include <string.h>
630 #endif
631 #ifdef HAVE_INTTYPES_H
632 # include <inttypes.h>
633 #endif
634 #ifdef HAVE_STDINT_H
635 # include <stdint.h>
636 #endif
637 #ifdef HAVE_STRINGS_H
638 # include <strings.h>
639 #endif
640 #ifdef HAVE_SYS_TYPES_H
641 # include <sys/types.h>
642 #endif
643 #ifdef HAVE_SYS_STAT_H
644 # include <sys/stat.h>
645 #endif
646 #ifdef HAVE_UNISTD_H
647 # include <unistd.h>
648 #endif"
649
650 ac_header_c_list=
651 ac_unique_file="include/grub/dl.h"
652 gl_use_threads_default=
653 gl_use_winpthreads_default=
654 gt_needs=
655 ac_config_libobj_dir=grub-core/lib/gnulib
656 ac_func_c_list=
657 gl_fnmatch_required=POSIX
658 gl_getopt_required=POSIX
659 ac_subst_vars='gltests_LIBOBJDEPS
660 gltests_LTLIBOBJS
661 gltests_LIBOBJS
662 gl_LIBOBJDEPS
663 gl_LTLIBOBJS
664 gl_LIBOBJS
665 am__EXEEXT_FALSE
666 am__EXEEXT_TRUE
667 LTLIBOBJS
668 LIBOBJS
669 COND_HAVE_PCI_FALSE
670 COND_HAVE_PCI_TRUE
671 COND_HAVE_EXEC_FALSE
672 COND_HAVE_EXEC_TRUE
673 COND_STARFIELD_FALSE
674 COND_STARFIELD_TRUE
675 COND_HAVE_ASM_USCORE_FALSE
676 COND_HAVE_ASM_USCORE_TRUE
677 COND_HAVE_CXX_FALSE
678 COND_HAVE_CXX_TRUE
679 COND_ENABLE_BOOT_TIME_STATS_FALSE
680 COND_ENABLE_BOOT_TIME_STATS_TRUE
681 COND_ENABLE_CACHE_STATS_FALSE
682 COND_ENABLE_CACHE_STATS_TRUE
683 COND_ENABLE_EFIEMU_FALSE
684 COND_ENABLE_EFIEMU_TRUE
685 COND_APPLE_LINKER_FALSE
686 COND_APPLE_LINKER_TRUE
687 HAVE_FONT_SOURCE
688 COND_HAVE_FONT_SOURCE_FALSE
689 COND_HAVE_FONT_SOURCE_TRUE
690 COND_GRUB_PROTECT_FALSE
691 COND_GRUB_PROTECT_TRUE
692 COND_GRUB_MOUNT_FALSE
693 COND_GRUB_MOUNT_TRUE
694 COND_GRUB_MKFONT_FALSE
695 COND_GRUB_MKFONT_TRUE
696 COND_GRUB_EMU_PCI_FALSE
697 COND_GRUB_EMU_PCI_TRUE
698 COND_GRUB_EMU_SDL_FALSE
699 COND_GRUB_EMU_SDL_TRUE
700 COND_GRUB_EMU_SDL2_FALSE
701 COND_GRUB_EMU_SDL2_TRUE
702 COND_MAN_PAGES_FALSE
703 COND_MAN_PAGES_TRUE
704 COND_HOST_ILLUMOS_FALSE
705 COND_HOST_ILLUMOS_TRUE
706 COND_HOST_XNU_FALSE
707 COND_HOST_XNU_TRUE
708 COND_HOST_KFREEBSD_FALSE
709 COND_HOST_KFREEBSD_TRUE
710 COND_HOST_WINDOWS_FALSE
711 COND_HOST_WINDOWS_TRUE
712 COND_HOST_NETBSD_FALSE
713 COND_HOST_NETBSD_TRUE
714 COND_HOST_LINUX_FALSE
715 COND_HOST_LINUX_TRUE
716 COND_HOST_HURD_FALSE
717 COND_HOST_HURD_TRUE
718 COND_x86_64_xen_FALSE
719 COND_x86_64_xen_TRUE
720 COND_x86_64_efi_FALSE
721 COND_x86_64_efi_TRUE
722 COND_sparc64_emu_FALSE
723 COND_sparc64_emu_TRUE
724 COND_sparc64_ieee1275_FALSE
725 COND_sparc64_ieee1275_TRUE
726 COND_riscv64_efi_FALSE
727 COND_riscv64_efi_TRUE
728 COND_riscv32_efi_FALSE
729 COND_riscv32_efi_TRUE
730 COND_riscv64_FALSE
731 COND_riscv64_TRUE
732 COND_riscv32_FALSE
733 COND_riscv32_TRUE
734 COND_powerpc_ieee1275_FALSE
735 COND_powerpc_ieee1275_TRUE
736 COND_mipseb_FALSE
737 COND_mipseb_TRUE
738 COND_mipsel_FALSE
739 COND_mipsel_TRUE
740 COND_mips_qemu_mips_FALSE
741 COND_mips_qemu_mips_TRUE
742 COND_mips_loongson_FALSE
743 COND_mips_loongson_TRUE
744 COND_mips_arc_FALSE
745 COND_mips_arc_TRUE
746 COND_mips_FALSE
747 COND_mips_TRUE
748 COND_loongarch64_efi_FALSE
749 COND_loongarch64_efi_TRUE
750 COND_loongarch64_FALSE
751 COND_loongarch64_TRUE
752 COND_i386_xen_pvh_FALSE
753 COND_i386_xen_pvh_TRUE
754 COND_i386_xen_FALSE
755 COND_i386_xen_TRUE
756 COND_i386_multiboot_FALSE
757 COND_i386_multiboot_TRUE
758 COND_i386_coreboot_FALSE
759 COND_i386_coreboot_TRUE
760 COND_i386_ieee1275_FALSE
761 COND_i386_ieee1275_TRUE
762 COND_i386_qemu_FALSE
763 COND_i386_qemu_TRUE
764 COND_i386_efi_FALSE
765 COND_i386_efi_TRUE
766 COND_i386_pc_FALSE
767 COND_i386_pc_TRUE
768 COND_ia64_efi_FALSE
769 COND_ia64_efi_TRUE
770 COND_arm64_efi_FALSE
771 COND_arm64_efi_TRUE
772 COND_arm64_FALSE
773 COND_arm64_TRUE
774 COND_arm_efi_FALSE
775 COND_arm_efi_TRUE
776 COND_arm_coreboot_FALSE
777 COND_arm_coreboot_TRUE
778 COND_arm_uboot_FALSE
779 COND_arm_uboot_TRUE
780 COND_arm_FALSE
781 COND_arm_TRUE
782 COND_emu_FALSE
783 COND_emu_TRUE
784 COND_real_platform_FALSE
785 COND_real_platform_TRUE
786 BUILD_LIBM
787 HOST_CCASFLAGS
788 HOST_CPPFLAGS
789 HOST_LDFLAGS
790 HOST_CFLAGS
791 TARGET_APPLE_LINKER
792 TARGET_IMG_BASE_LDOPT
793 TARGET_IMG_CFLAGS
794 TARGET_IMG_LDFLAGS
795 TARGET_CCASFLAGS
796 TARGET_CPPFLAGS
797 TARGET_LDFLAGS
798 TARGET_CFLAGS
799 TARGET_CC_VERSION
800 TARGET_MODULE_FORMAT
801 TARGET_OBJ2ELF
802 TARGET_CCAS
803 TARGET_CPP
804 GRUB_PLATFORM
805 GRUB_TARGET_CPU
806 END_SYMBOL
807 BSS_START_SYMBOL
808 HAVE_ASM_USCORE
809 GRUB_BOOT_MACHINE_LINK_ADDR
810 enable_grub_protect
811 LIBTASN1
812 LIBNVPAIR
813 LIBZFS
814 LIBLZMA
815 LIBGEOM
816 LIBDEVMAPPER
817 enable_grub_mount
818 FUSE_LIBS
819 FUSE_CFLAGS
820 FONT_SOURCE
821 DJVU_FONT_SOURCE
822 BUILD_FREETYPE_LIBS
823 BUILD_FREETYPE_CFLAGS
824 BUILD_WORDS_BIGENDIAN
825 BUILD_SIZEOF_VOID_P
826 BUILD_SIZEOF_LONG
827 enable_grub_mkfont
828 FREETYPE_LIBS
829 FREETYPE_CFLAGS
830 enable_grub_emu_pci
831 enable_grub_emu_sdl
832 enable_grub_emu_sdl2
833 LIBPCIACCESS
834 LIBSDL
835 HAVE_SDL2
836 SDL2_LIBS
837 SDL2_CFLAGS
838 BOOT_TIME_STATS
839 DISK_CACHE_STATS
840 COND_MM_DEBUG_FALSE
841 COND_MM_DEBUG_TRUE
842 MM_DEBUG
843 TARGET_NMFLAGS_DEFINED_ONLY
844 TARGET_NMFLAGS_MINUS_P
845 GRUB_STACK_PROTECTOR_INIT
846 TARGET_LDFLAGS_OLDMAGIC
847 EFIEMU64_LINK_FORMAT
848 enable_efiemu
849 TARGET_OBJCONV
850 CPPFLAGS_GCRY_ASM
851 BUILD_LDFLAGS
852 BUILD_CPPFLAGS
853 BUILD_CFLAGS
854 HOST_CC
855 TARGET_RANLIB
856 TARGET_NM
857 TARGET_STRIP
858 TARGET_OBJCOPY
859 ac_ct_TARGET_CC
860 TARGET_CC
861 LIBGNU_LTLIBDEPS
862 LIBGNU_LIBDEPS
863 GL_CFLAG_GNULIB_WARNINGS
864 GL_CFLAG_ALLOW_WARNINGS
865 gltests_WITNESS
866 GL_COND_OBJ_WMEMPCPY_FALSE
867 GL_COND_OBJ_WMEMPCPY_TRUE
868 GL_COND_OBJ_WMEMCHR_FALSE
869 GL_COND_OBJ_WMEMCHR_TRUE
870 GL_COND_OBJ_WINDOWS_RWLOCK_FALSE
871 GL_COND_OBJ_WINDOWS_RWLOCK_TRUE
872 GL_COND_OBJ_WINDOWS_RECMUTEX_FALSE
873 GL_COND_OBJ_WINDOWS_RECMUTEX_TRUE
874 GL_COND_OBJ_WINDOWS_ONCE_FALSE
875 GL_COND_OBJ_WINDOWS_ONCE_TRUE
876 GL_COND_OBJ_WINDOWS_MUTEX_FALSE
877 GL_COND_OBJ_WINDOWS_MUTEX_TRUE
878 GL_COND_OBJ_WCWIDTH_FALSE
879 GL_COND_OBJ_WCWIDTH_TRUE
880 GL_GNULIB_TOWCTRANS
881 GL_GNULIB_WCTRANS
882 GL_GNULIB_ISWCTYPE
883 GL_GNULIB_WCTYPE
884 GL_GNULIB_ISWXDIGIT
885 GL_GNULIB_ISWDIGIT
886 GL_GNULIB_ISWBLANK
887 REPLACE_TOWLOWER
888 REPLACE_ISWCNTRL
889 HAVE_WCTYPE_H
890 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
891 NEXT_WCTYPE_H
892 HAVE_ISWCNTRL
893 REPLACE_ISWXDIGIT
894 REPLACE_ISWDIGIT
895 REPLACE_ISWBLANK
896 HAVE_WCTRANS_T
897 HAVE_WCTYPE_T
898 HAVE_ISWBLANK
899 GL_COND_OBJ_WCRTOMB_FALSE
900 GL_COND_OBJ_WCRTOMB_TRUE
901 HAVE_CRTDEFS_H
902 HAVE_WINT_T
903 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
904 NEXT_WCHAR_H
905 HAVE_FEATURES_H
906 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE
907 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE
908 LIBUNISTRING_UNIWIDTH_H
909 LIBUNISTRING_UNITYPES_H
910 HAVE_UNISTD_H
911 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
912 NEXT_UNISTD_H
913 GL_GNULIB_MDA_TZSET
914 GL_GNULIB_TZSET
915 GL_GNULIB_TIME_RZ
916 GL_GNULIB_TIME_R
917 GL_GNULIB_TIMESPEC_GETRES
918 GL_GNULIB_TIMESPEC_GET
919 GL_GNULIB_TIMEGM
920 GL_GNULIB_STRPTIME
921 GL_GNULIB_STRFTIME
922 GL_GNULIB_NANOSLEEP
923 GL_GNULIB_LOCALTIME
924 GL_GNULIB_MKTIME
925 GL_GNULIB_CTIME
926 TIME_H_DEFINES_TIME_UTC
927 UNISTD_H_DEFINES_STRUCT_TIMESPEC
928 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
929 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
930 TIME_H_DEFINES_STRUCT_TIMESPEC
931 NEXT_AS_FIRST_DIRECTIVE_TIME_H
932 NEXT_TIME_H
933 REPLACE_LOCALTIME
934 REPLACE_GMTIME
935 GNULIB_GETTIMEOFDAY
936 REPLACE_TZSET
937 REPLACE_TIMEGM
938 REPLACE_STRFTIME
939 REPLACE_NANOSLEEP
940 REPLACE_MKTIME
941 REPLACE_LOCALTIME_R
942 REPLACE_CTIME
943 HAVE_TIMEZONE_T
944 HAVE_TIMESPEC_GETRES
945 HAVE_TIMESPEC_GET
946 HAVE_TIMEGM
947 HAVE_STRPTIME
948 HAVE_NANOSLEEP
949 HAVE_DECL_LOCALTIME_R
950 GL_GENERATE_SYSEXITS_H_FALSE
951 GL_GENERATE_SYSEXITS_H_TRUE
952 SYSEXITS_H
953 HAVE_SYSEXITS_H
954 NEXT_AS_FIRST_DIRECTIVE_SYSEXITS_H
955 NEXT_SYSEXITS_H
956 WINDOWS_STAT_INODES
957 WINDOWS_64_BIT_OFF_T
958 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
959 NEXT_SYS_TYPES_H
960 GL_COND_OBJ_STRNLEN_FALSE
961 GL_COND_OBJ_STRNLEN_TRUE
962 GL_COND_OBJ_STRNDUP_FALSE
963 GL_COND_OBJ_STRNDUP_TRUE
964 GL_GNULIB_FFS
965 HAVE_STRINGS_H
966 NEXT_AS_FIRST_DIRECTIVE_STRINGS_H
967 NEXT_STRINGS_H
968 NEXT_AS_FIRST_DIRECTIVE_STRING_H
969 NEXT_STRING_H
970 GL_COND_OBJ_STRERROR_OVERRIDE_FALSE
971 GL_COND_OBJ_STRERROR_OVERRIDE_TRUE
972 GL_COND_OBJ_STRERROR_FALSE
973 GL_COND_OBJ_STRERROR_TRUE
974 GL_COND_OBJ_STRDUP_FALSE
975 GL_COND_OBJ_STRDUP_TRUE
976 GL_COND_OBJ_STRCHRNUL_FALSE
977 GL_COND_OBJ_STRCHRNUL_TRUE
978 GL_COND_OBJ_STRNCASECMP_FALSE
979 GL_COND_OBJ_STRNCASECMP_TRUE
980 GL_COND_OBJ_STRCASECMP_FALSE
981 GL_COND_OBJ_STRCASECMP_TRUE
982 HAVE_DECL_STRNCASECMP
983 HAVE_STRCASECMP
984 HAVE_FFS
985 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
986 NEXT_STDLIB_H
987 GL_COND_OBJ_STDIO_WRITE_FALSE
988 GL_COND_OBJ_STDIO_WRITE_TRUE
989 GL_COND_OBJ_STDIO_READ_FALSE
990 GL_COND_OBJ_STDIO_READ_TRUE
991 NEXT_AS_FIRST_DIRECTIVE_STDIO_H
992 NEXT_STDIO_H
993 GL_GENERATE_STDINT_H_FALSE
994 GL_GENERATE_STDINT_H_TRUE
995 STDINT_H
996 GL_GENERATE_STDDEF_H_FALSE
997 GL_GENERATE_STDDEF_H_TRUE
998 STDDEF_H
999 GL_GENERATE_STDBOOL_H_FALSE
1000 GL_GENERATE_STDBOOL_H_TRUE
1001 STDBOOL_H
1002 HAVE__BOOL
1003 GL_GENERATE_STDALIGN_H_FALSE
1004 GL_GENERATE_STDALIGN_H_TRUE
1005 STDALIGN_H
1006 GL_COND_OBJ_STAT_FALSE
1007 GL_COND_OBJ_STAT_TRUE
1008 GL_COND_OBJ_SLEEP_FALSE
1009 GL_COND_OBJ_SLEEP_TRUE
1010 GL_COND_OBJ_SETLOCALE_LOCK_FALSE
1011 GL_COND_OBJ_SETLOCALE_LOCK_TRUE
1012 GL_COND_OBJ_REGEX_FALSE
1013 GL_COND_OBJ_REGEX_TRUE
1014 GL_COND_OBJ_REALLOCARRAY_FALSE
1015 GL_COND_OBJ_REALLOCARRAY_TRUE
1016 GL_COND_OBJ_RAWMEMCHR_FALSE
1017 GL_COND_OBJ_RAWMEMCHR_TRUE
1018 GL_COND_OBJ_PIPE_FALSE
1019 GL_COND_OBJ_PIPE_TRUE
1020 GL_COND_OBJ_OPENAT_FALSE
1021 GL_COND_OBJ_OPENAT_TRUE
1022 GL_COND_OBJ_OPEN_FALSE
1023 GL_COND_OBJ_OPEN_TRUE
1024 GL_COND_OBJ_NL_LANGINFO_LOCK_FALSE
1025 GL_COND_OBJ_NL_LANGINFO_LOCK_TRUE
1026 GL_COND_OBJ_NL_LANGINFO_FALSE
1027 GL_COND_OBJ_NL_LANGINFO_TRUE
1028 LIB_NL_LANGINFO
1029 GL_COND_OBJ_MSVC_NOTHROW_FALSE
1030 GL_COND_OBJ_MSVC_NOTHROW_TRUE
1031 GL_COND_OBJ_MSVC_INVAL_FALSE
1032 GL_COND_OBJ_MSVC_INVAL_TRUE
1033 GL_COND_OBJ_MEMRCHR_FALSE
1034 GL_COND_OBJ_MEMRCHR_TRUE
1035 GL_COND_OBJ_MEMPCPY_FALSE
1036 GL_COND_OBJ_MEMPCPY_TRUE
1037 GL_GNULIB_MDA_STRDUP
1038 GL_GNULIB_MDA_MEMCCPY
1039 GL_GNULIB_STRVERSCMP
1040 GL_GNULIB_STRSIGNAL
1041 GL_GNULIB_SIGDESCR_NP
1042 GL_GNULIB_SIGABBREV_NP
1043 GL_GNULIB_STRERRORNAME_NP
1044 GL_GNULIB_STRERROR_R
1045 GL_GNULIB_STRERROR
1046 GL_GNULIB_MBSTOK_R
1047 GL_GNULIB_MBSSEP
1048 GL_GNULIB_MBSSPN
1049 GL_GNULIB_MBSPBRK
1050 GL_GNULIB_MBSCSPN
1051 GL_GNULIB_MBSCASESTR
1052 GL_GNULIB_MBSPCASECMP
1053 GL_GNULIB_MBSNCASECMP
1054 GL_GNULIB_MBSCASECMP
1055 GL_GNULIB_MBSSTR
1056 GL_GNULIB_MBSRCHR
1057 GL_GNULIB_MBSCHR
1058 GL_GNULIB_MBSNLEN
1059 GL_GNULIB_MBSLEN
1060 GL_GNULIB_STRTOK_R
1061 GL_GNULIB_STRCASESTR
1062 GL_GNULIB_STRSTR
1063 GL_GNULIB_STRSEP
1064 GL_GNULIB_STRPBRK
1065 GL_GNULIB_STRNLEN
1066 GL_GNULIB_STRNDUP
1067 GL_GNULIB_STRNCAT
1068 GL_GNULIB_STRDUP
1069 GL_GNULIB_STRCHRNUL
1070 GL_GNULIB_STPNCPY
1071 GL_GNULIB_STPCPY
1072 GL_GNULIB_RAWMEMCHR
1073 GL_GNULIB_MEMRCHR
1074 GL_GNULIB_MEMPCPY
1075 GL_GNULIB_MEMMEM
1076 GL_GNULIB_MEMCHR
1077 GL_GNULIB_FFSLL
1078 GL_GNULIB_FFSL
1079 GL_GNULIB_EXPLICIT_BZERO
1080 GL_COND_OBJ_MEMCHR_FALSE
1081 GL_COND_OBJ_MEMCHR_TRUE
1082 UNDEFINE_STRTOK_R
1083 REPLACE_STRSIGNAL
1084 REPLACE_STRERRORNAME_NP
1085 REPLACE_STRERROR_R
1086 REPLACE_STRERROR
1087 REPLACE_STRTOK_R
1088 REPLACE_STRCASESTR
1089 REPLACE_STRSTR
1090 REPLACE_STRNLEN
1091 REPLACE_STRNDUP
1092 REPLACE_STRNCAT
1093 REPLACE_STRDUP
1094 REPLACE_STRCHRNUL
1095 REPLACE_STPNCPY
1096 REPLACE_MEMMEM
1097 REPLACE_MEMCHR
1098 REPLACE_FFSLL
1099 HAVE_STRVERSCMP
1100 HAVE_DECL_STRSIGNAL
1101 HAVE_SIGDESCR_NP
1102 HAVE_SIGABBREV_NP
1103 HAVE_STRERRORNAME_NP
1104 HAVE_DECL_STRERROR_R
1105 HAVE_DECL_STRTOK_R
1106 HAVE_STRCASESTR
1107 HAVE_STRSEP
1108 HAVE_STRPBRK
1109 HAVE_DECL_STRNLEN
1110 HAVE_DECL_STRNDUP
1111 HAVE_DECL_STRDUP
1112 HAVE_STRCHRNUL
1113 HAVE_STPNCPY
1114 HAVE_STPCPY
1115 HAVE_RAWMEMCHR
1116 HAVE_DECL_MEMRCHR
1117 HAVE_MEMPCPY
1118 HAVE_DECL_MEMMEM
1119 HAVE_FFSLL
1120 HAVE_FFSL
1121 HAVE_EXPLICIT_BZERO
1122 HAVE_MBSLEN
1123 GL_COND_OBJ_MBTOWC_FALSE
1124 GL_COND_OBJ_MBTOWC_TRUE
1125 GL_COND_OBJ_MBSRTOWCS_FALSE
1126 GL_COND_OBJ_MBSRTOWCS_TRUE
1127 GL_COND_OBJ_MBSINIT_FALSE
1128 GL_COND_OBJ_MBSINIT_TRUE
1129 HAVE_VISIBILITY
1130 CFLAG_VISIBILITY
1131 GL_COND_OBJ_MBRTOWC_FALSE
1132 GL_COND_OBJ_MBRTOWC_TRUE
1133 LIB_MBRTOWC
1134 LOCALE_ZH_CN
1135 LOCALE_FR_UTF8
1136 LOCALE_JA
1137 LTLIBMULTITHREAD
1138 LIBMULTITHREAD
1139 LTLIBTHREAD
1140 LIBTHREAD
1141 LIBSTDTHREAD
1142 GL_COND_OBJ_LOCALECONV_FALSE
1143 GL_COND_OBJ_LOCALECONV_TRUE
1144 GL_GNULIB_LOCALENAME
1145 GL_GNULIB_DUPLOCALE
1146 GL_GNULIB_SETLOCALE_NULL
1147 GL_GNULIB_SETLOCALE
1148 GL_GNULIB_LOCALECONV
1149 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H
1150 NEXT_LOCALE_H
1151 HAVE_XLOCALE_H
1152 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
1153 NEXT_STDDEF_H
1154 HAVE_WCHAR_T
1155 HAVE_MAX_ALIGN_T
1156 REPLACE_NULL
1157 LOCALENAME_ENHANCE_LOCALE_FUNCS
1158 REPLACE_STRUCT_LCONV
1159 REPLACE_FREELOCALE
1160 REPLACE_DUPLOCALE
1161 REPLACE_NEWLOCALE
1162 REPLACE_SETLOCALE
1163 REPLACE_LOCALECONV
1164 HAVE_FREELOCALE
1165 HAVE_DUPLOCALE
1166 HAVE_NEWLOCALE
1167 LOCALCHARSET_TESTS_ENVIRONMENT
1168 GL_GENERATE_LIMITS_H_FALSE
1169 GL_GENERATE_LIMITS_H_TRUE
1170 LIMITS_H
1171 GL_GNULIB_NL_LANGINFO
1172 HAVE_LANGINFO_YESEXPR
1173 HAVE_LANGINFO_ERA
1174 HAVE_LANGINFO_ALTMON
1175 HAVE_LANGINFO_T_FMT_AMPM
1176 HAVE_LANGINFO_CODESET
1177 HAVE_LANGINFO_H
1178 NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H
1179 NEXT_LANGINFO_H
1180 REPLACE_NL_LANGINFO
1181 HAVE_NL_LANGINFO
1182 GL_COND_OBJ_ISBLANK_FALSE
1183 GL_COND_OBJ_ISBLANK_TRUE
1184 GL_GNULIB_STRTOUMAX
1185 GL_GNULIB_STRTOIMAX
1186 GL_GNULIB_IMAXDIV
1187 GL_GNULIB_IMAXABS
1188 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
1189 NEXT_INTTYPES_H
1190 UINT64_MAX_EQ_ULONG_MAX
1191 UINT32_MAX_LT_UINTMAX_MAX
1192 PRIPTR_PREFIX
1193 INT64_MAX_EQ_LONG_MAX
1194 INT32_MAX_LT_INTMAX_MAX
1195 REPLACE_STRTOUMAX
1196 REPLACE_STRTOIMAX
1197 HAVE_IMAXDIV_T
1198 HAVE_DECL_STRTOUMAX
1199 HAVE_DECL_STRTOIMAX
1200 HAVE_DECL_IMAXDIV
1201 HAVE_DECL_IMAXABS
1202 HAVE_SYS_INTTYPES_H
1203 HAVE_SYS_BITYPES_H
1204 HAVE_C99_STDINT_H
1205 WINT_T_SUFFIX
1206 WCHAR_T_SUFFIX
1207 SIG_ATOMIC_T_SUFFIX
1208 SIZE_T_SUFFIX
1209 PTRDIFF_T_SUFFIX
1210 HAVE_SIGNED_WINT_T
1211 HAVE_SIGNED_WCHAR_T
1212 HAVE_SIGNED_SIG_ATOMIC_T
1213 BITSIZEOF_WINT_T
1214 BITSIZEOF_WCHAR_T
1215 BITSIZEOF_SIG_ATOMIC_T
1216 BITSIZEOF_SIZE_T
1217 BITSIZEOF_PTRDIFF_T
1218 APPLE_UNIVERSAL_BUILD
1219 HAVE_STDINT_H
1220 NEXT_AS_FIRST_DIRECTIVE_STDINT_H
1221 NEXT_STDINT_H
1222 HAVE_SYS_TYPES_H
1223 HAVE_INTTYPES_H
1224 HAVE_WCHAR_H
1225 GNULIBHEADERS_OVERRIDE_WINT_T
1226 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H
1227 NEXT_LIMITS_H
1228 LIB_HARD_LOCALE
1229 LIB_SETLOCALE_NULL
1230 LIB_SCHED_YIELD
1231 LIBPMULTITHREAD
1232 LIBPTHREAD
1233 GL_COND_OBJ_GETOPT_FALSE
1234 GL_COND_OBJ_GETOPT_TRUE
1235 GL_GENERATE_GETOPT_CDEFS_H_FALSE
1236 GL_GENERATE_GETOPT_CDEFS_H_TRUE
1237 GETOPT_CDEFS_H
1238 GL_GENERATE_GETOPT_H_FALSE
1239 GL_GENERATE_GETOPT_H_TRUE
1240 GETOPT_H
1241 HAVE_SYS_CDEFS_H
1242 HAVE_GETOPT_H
1243 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
1244 NEXT_GETOPT_H
1245 GL_COND_OBJ_GETLINE_FALSE
1246 GL_COND_OBJ_GETLINE_TRUE
1247 GL_COND_OBJ_GETDTABLESIZE_FALSE
1248 GL_COND_OBJ_GETDTABLESIZE_TRUE
1249 GL_GNULIB_MDA_TEMPNAM
1250 GL_GNULIB_MDA_PUTW
1251 GL_GNULIB_MDA_GETW
1252 GL_GNULIB_MDA_FILENO
1253 GL_GNULIB_MDA_FDOPEN
1254 GL_GNULIB_MDA_FCLOSEALL
1255 GL_GNULIB_VSPRINTF_POSIX
1256 GL_GNULIB_VSNPRINTF
1257 GL_GNULIB_VPRINTF_POSIX
1258 GL_GNULIB_VPRINTF
1259 GL_GNULIB_VFPRINTF_POSIX
1260 GL_GNULIB_VFPRINTF
1261 GL_GNULIB_VDPRINTF
1262 GL_GNULIB_VSCANF
1263 GL_GNULIB_VFSCANF
1264 GL_GNULIB_VASPRINTF
1265 GL_GNULIB_TMPFILE
1266 GL_GNULIB_STDIO_H_SIGPIPE
1267 GL_GNULIB_STDIO_H_NONBLOCKING
1268 GL_GNULIB_SPRINTF_POSIX
1269 GL_GNULIB_SNPRINTF
1270 GL_GNULIB_SCANF
1271 GL_GNULIB_RENAMEAT
1272 GL_GNULIB_RENAME
1273 GL_GNULIB_REMOVE
1274 GL_GNULIB_PUTS
1275 GL_GNULIB_PUTCHAR
1276 GL_GNULIB_PUTC
1277 GL_GNULIB_PRINTF_POSIX
1278 GL_GNULIB_PRINTF
1279 GL_GNULIB_POPEN
1280 GL_GNULIB_PERROR
1281 GL_GNULIB_PCLOSE
1282 GL_GNULIB_OBSTACK_PRINTF_POSIX
1283 GL_GNULIB_OBSTACK_PRINTF
1284 GL_GNULIB_GETLINE
1285 GL_GNULIB_GETDELIM
1286 GL_GNULIB_GETCHAR
1287 GL_GNULIB_GETC
1288 GL_GNULIB_FWRITE
1289 GL_GNULIB_FTELLO
1290 GL_GNULIB_FTELL
1291 GL_GNULIB_FSEEKO
1292 GL_GNULIB_FSEEK
1293 GL_GNULIB_FSCANF
1294 GL_GNULIB_FREOPEN
1295 GL_GNULIB_FREAD
1296 GL_GNULIB_FPUTS
1297 GL_GNULIB_FPUTC
1298 GL_GNULIB_FPURGE
1299 GL_GNULIB_FPRINTF_POSIX
1300 GL_GNULIB_FPRINTF
1301 GL_GNULIB_FOPEN_GNU
1302 GL_GNULIB_FOPEN
1303 GL_GNULIB_FGETS
1304 GL_GNULIB_FGETC
1305 GL_GNULIB_FFLUSH
1306 GL_GNULIB_FDOPEN
1307 GL_GNULIB_FCLOSE
1308 GL_GNULIB_DPRINTF
1309 GL_COND_OBJ_GETDELIM_FALSE
1310 GL_COND_OBJ_GETDELIM_TRUE
1311 REPLACE_VSPRINTF
1312 REPLACE_VSNPRINTF
1313 REPLACE_VPRINTF
1314 REPLACE_VFPRINTF
1315 REPLACE_VDPRINTF
1316 REPLACE_VASPRINTF
1317 REPLACE_TMPFILE
1318 REPLACE_STDIO_WRITE_FUNCS
1319 REPLACE_STDIO_READ_FUNCS
1320 REPLACE_SPRINTF
1321 REPLACE_SNPRINTF
1322 REPLACE_RENAMEAT
1323 REPLACE_RENAME
1324 REPLACE_REMOVE
1325 REPLACE_PRINTF
1326 REPLACE_POPEN
1327 REPLACE_PERROR
1328 REPLACE_OBSTACK_PRINTF
1329 REPLACE_GETLINE
1330 REPLACE_GETDELIM
1331 REPLACE_FTELLO
1332 REPLACE_FTELL
1333 REPLACE_FSEEKO
1334 REPLACE_FSEEK
1335 REPLACE_FREOPEN
1336 REPLACE_FPURGE
1337 REPLACE_FPRINTF
1338 REPLACE_FOPEN_FOR_FOPEN_GNU
1339 REPLACE_FOPEN
1340 REPLACE_FFLUSH
1341 REPLACE_FDOPEN
1342 REPLACE_FCLOSE
1343 REPLACE_DPRINTF
1344 HAVE_VDPRINTF
1345 HAVE_VASPRINTF
1346 HAVE_RENAMEAT
1347 HAVE_POPEN
1348 HAVE_PCLOSE
1349 HAVE_FTELLO
1350 HAVE_FSEEKO
1351 HAVE_DPRINTF
1352 HAVE_DECL_VSNPRINTF
1353 HAVE_DECL_SNPRINTF
1354 HAVE_DECL_OBSTACK_PRINTF
1355 HAVE_DECL_GETLINE
1356 HAVE_DECL_GETDELIM
1357 HAVE_DECL_FTELLO
1358 HAVE_DECL_FSEEKO
1359 HAVE_DECL_FPURGE
1360 HAVE_DECL_FCLOSEALL
1361 GL_COND_OBJ_GETCWD_LGPL_FALSE
1362 GL_COND_OBJ_GETCWD_LGPL_TRUE
1363 GL_GNULIB_MDA_UMASK
1364 GL_GNULIB_MDA_MKDIR
1365 GL_GNULIB_MDA_CHMOD
1366 GL_GNULIB_OVERRIDES_STRUCT_STAT
1367 GL_GNULIB_UTIMENSAT
1368 GL_GNULIB_STAT
1369 GL_GNULIB_MKNODAT
1370 GL_GNULIB_MKNOD
1371 GL_GNULIB_MKFIFOAT
1372 GL_GNULIB_MKFIFO
1373 GL_GNULIB_MKDIRAT
1374 GL_GNULIB_MKDIR
1375 GL_GNULIB_LSTAT
1376 GL_GNULIB_LCHMOD
1377 GL_GNULIB_GETUMASK
1378 GL_GNULIB_FUTIMENS
1379 GL_GNULIB_FSTATAT
1380 GL_GNULIB_FSTAT
1381 GL_GNULIB_FCHMODAT
1382 WINDOWS_64_BIT_ST_SIZE
1383 WINDOWS_STAT_TIMESPEC
1384 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
1385 NEXT_SYS_STAT_H
1386 GL_COND_OBJ_FSTAT_FALSE
1387 GL_COND_OBJ_FSTAT_TRUE
1388 REPLACE_UTIMENSAT
1389 REPLACE_STAT
1390 REPLACE_MKNODAT
1391 REPLACE_MKNOD
1392 REPLACE_MKFIFOAT
1393 REPLACE_MKFIFO
1394 REPLACE_MKDIR
1395 REPLACE_LSTAT
1396 REPLACE_FUTIMENS
1397 REPLACE_FSTATAT
1398 REPLACE_FSTAT
1399 REPLACE_FCHMODAT
1400 HAVE_UTIMENSAT
1401 HAVE_MKNODAT
1402 HAVE_MKNOD
1403 HAVE_MKFIFOAT
1404 HAVE_MKFIFO
1405 HAVE_MKDIRAT
1406 HAVE_LSTAT
1407 HAVE_LCHMOD
1408 HAVE_GETUMASK
1409 HAVE_FUTIMENS
1410 HAVE_FSTATAT
1411 HAVE_FCHMODAT
1412 GL_COND_OBJ_FREE_FALSE
1413 GL_COND_OBJ_FREE_TRUE
1414 GL_GENERATE_FNMATCH_H_FALSE
1415 GL_GENERATE_FNMATCH_H_TRUE
1416 FNMATCH_H
1417 GL_GNULIB_FNMATCH
1418 HAVE_FNMATCH_H
1419 NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H
1420 NEXT_FNMATCH_H
1421 REPLACE_FNMATCH
1422 HAVE_FNMATCH
1423 GL_COND_OBJ_ITOLD_FALSE
1424 GL_COND_OBJ_ITOLD_TRUE
1425 GL_COND_OBJ_FLOAT_FALSE
1426 GL_COND_OBJ_FLOAT_TRUE
1427 GL_GENERATE_FLOAT_H_FALSE
1428 GL_GENERATE_FLOAT_H_TRUE
1429 FLOAT_H
1430 REPLACE_ITOLD
1431 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1432 NEXT_FLOAT_H
1433 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1434 NEXT_FCNTL_H
1435 GL_GNULIB_MDA_OPEN
1436 GL_GNULIB_MDA_CREAT
1437 GL_GNULIB_OPENAT
1438 GL_GNULIB_OPEN
1439 GL_GNULIB_NONBLOCKING
1440 GL_GNULIB_FCNTL
1441 GL_GNULIB_CREAT
1442 GL_COND_OBJ_FCNTL_FALSE
1443 GL_COND_OBJ_FCNTL_TRUE
1444 REPLACE_OPENAT
1445 REPLACE_OPEN
1446 REPLACE_FCNTL
1447 REPLACE_CREAT
1448 HAVE_OPENAT
1449 HAVE_FCNTL
1450 GL_COND_OBJ_FCHDIR_FALSE
1451 GL_COND_OBJ_FCHDIR_TRUE
1452 GL_COND_OBJ_ERROR_FALSE
1453 GL_COND_OBJ_ERROR_TRUE
1454 GL_GENERATE_ERRNO_H_FALSE
1455 GL_GENERATE_ERRNO_H_TRUE
1456 ERRNO_H
1457 EOVERFLOW_VALUE
1458 EOVERFLOW_HIDDEN
1459 ENOLINK_VALUE
1460 ENOLINK_HIDDEN
1461 EMULTIHOP_VALUE
1462 EMULTIHOP_HIDDEN
1463 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1464 NEXT_ERRNO_H
1465 GL_COND_OBJ_DUP2_FALSE
1466 GL_COND_OBJ_DUP2_TRUE
1467 GL_COND_OBJ_DIRFD_FALSE
1468 GL_COND_OBJ_DIRFD_TRUE
1469 GL_GNULIB_ALPHASORT
1470 GL_GNULIB_SCANDIR
1471 GL_GNULIB_FDOPENDIR
1472 GL_GNULIB_DIRFD
1473 GL_GNULIB_CLOSEDIR
1474 GL_GNULIB_REWINDDIR
1475 GL_GNULIB_READDIR
1476 GL_GNULIB_OPENDIR
1477 HAVE_DIRENT_H
1478 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1479 NEXT_DIRENT_H
1480 REPLACE_FDOPENDIR
1481 REPLACE_DIRFD
1482 REPLACE_CLOSEDIR
1483 REPLACE_OPENDIR
1484 HAVE_ALPHASORT
1485 HAVE_SCANDIR
1486 HAVE_FDOPENDIR
1487 HAVE_DECL_FDOPENDIR
1488 HAVE_DECL_DIRFD
1489 HAVE_CLOSEDIR
1490 HAVE_REWINDDIR
1491 HAVE_READDIR
1492 HAVE_OPENDIR
1493 GL_GNULIB_ISBLANK
1494 NEXT_AS_FIRST_DIRECTIVE_CTYPE_H
1495 NEXT_CTYPE_H
1496 PRAGMA_COLUMNS
1497 PRAGMA_SYSTEM_HEADER
1498 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1499 INCLUDE_NEXT
1500 HAVE_ISBLANK
1501 GL_COND_OBJ_CLOSE_FALSE
1502 GL_COND_OBJ_CLOSE_TRUE
1503 HAVE_WINSOCK2_H
1504 HAVE_MSVC_INVALID_PARAMETER_HANDLER
1505 GL_COND_OBJ_CHDIR_LONG_FALSE
1506 GL_COND_OBJ_CHDIR_LONG_TRUE
1507 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1508 UNISTD_H_HAVE_WINSOCK2_H
1509 UNISTD_H_HAVE_SYS_RANDOM_H
1510 REPLACE_WRITE
1511 REPLACE_USLEEP
1512 REPLACE_UNLINKAT
1513 REPLACE_UNLINK
1514 REPLACE_TTYNAME_R
1515 REPLACE_TRUNCATE
1516 REPLACE_SYMLINKAT
1517 REPLACE_SYMLINK
1518 REPLACE_SLEEP
1519 REPLACE_RMDIR
1520 REPLACE_READLINKAT
1521 REPLACE_READLINK
1522 REPLACE_READ
1523 REPLACE_PWRITE
1524 REPLACE_PREAD
1525 REPLACE_LSEEK
1526 REPLACE_LINKAT
1527 REPLACE_LINK
1528 REPLACE_LCHOWN
1529 REPLACE_ISATTY
1530 REPLACE_GETPASS_FOR_GETPASS_GNU
1531 REPLACE_GETPASS
1532 REPLACE_GETPAGESIZE
1533 REPLACE_GETGROUPS
1534 REPLACE_GETLOGIN_R
1535 REPLACE_GETDTABLESIZE
1536 REPLACE_GETDOMAINNAME
1537 REPLACE_GETCWD
1538 REPLACE_FTRUNCATE
1539 REPLACE_FCHOWNAT
1540 REPLACE_FACCESSAT
1541 REPLACE_EXECVPE
1542 REPLACE_EXECVP
1543 REPLACE_EXECVE
1544 REPLACE_EXECV
1545 REPLACE_EXECLP
1546 REPLACE_EXECLE
1547 REPLACE_EXECL
1548 REPLACE_DUP2
1549 REPLACE_DUP
1550 REPLACE_COPY_FILE_RANGE
1551 REPLACE_CLOSE
1552 REPLACE_CHOWN
1553 REPLACE_ACCESS
1554 HAVE_SYS_PARAM_H
1555 HAVE_OS_H
1556 HAVE_DECL_TTYNAME_R
1557 HAVE_DECL_TRUNCATE
1558 HAVE_DECL_SETHOSTNAME
1559 HAVE_DECL_GETUSERSHELL
1560 HAVE_DECL_GETPAGESIZE
1561 HAVE_DECL_GETLOGIN_R
1562 HAVE_DECL_GETLOGIN
1563 HAVE_DECL_GETDOMAINNAME
1564 HAVE_DECL_FDATASYNC
1565 HAVE_DECL_FCHDIR
1566 HAVE_DECL_EXECVPE
1567 HAVE_DECL_ENVIRON
1568 HAVE_USLEEP
1569 HAVE_UNLINKAT
1570 HAVE_SYMLINKAT
1571 HAVE_SYMLINK
1572 HAVE_SLEEP
1573 HAVE_SETHOSTNAME
1574 HAVE_READLINKAT
1575 HAVE_READLINK
1576 HAVE_PWRITE
1577 HAVE_PREAD
1578 HAVE_PIPE2
1579 HAVE_PIPE
1580 HAVE_LINKAT
1581 HAVE_LINK
1582 HAVE_LCHOWN
1583 HAVE_GROUP_MEMBER
1584 HAVE_GETPASS
1585 HAVE_GETPAGESIZE
1586 HAVE_GETLOGIN
1587 HAVE_GETHOSTNAME
1588 HAVE_GETGROUPS
1589 HAVE_GETENTROPY
1590 HAVE_GETDTABLESIZE
1591 HAVE_FTRUNCATE
1592 HAVE_FSYNC
1593 HAVE_FDATASYNC
1594 HAVE_FCHOWNAT
1595 HAVE_FCHDIR
1596 HAVE_FACCESSAT
1597 HAVE_EXECVPE
1598 HAVE_EUIDACCESS
1599 HAVE_DUP3
1600 HAVE_COPY_FILE_RANGE
1601 HAVE_CHOWN
1602 GL_GNULIB_MDA_WRITE
1603 GL_GNULIB_MDA_UNLINK
1604 GL_GNULIB_MDA_SWAB
1605 GL_GNULIB_MDA_RMDIR
1606 GL_GNULIB_MDA_READ
1607 GL_GNULIB_MDA_LSEEK
1608 GL_GNULIB_MDA_ISATTY
1609 GL_GNULIB_MDA_GETPID
1610 GL_GNULIB_MDA_GETCWD
1611 GL_GNULIB_MDA_EXECVPE
1612 GL_GNULIB_MDA_EXECVP
1613 GL_GNULIB_MDA_EXECVE
1614 GL_GNULIB_MDA_EXECV
1615 GL_GNULIB_MDA_EXECLP
1616 GL_GNULIB_MDA_EXECLE
1617 GL_GNULIB_MDA_EXECL
1618 GL_GNULIB_MDA_DUP2
1619 GL_GNULIB_MDA_DUP
1620 GL_GNULIB_MDA_CLOSE
1621 GL_GNULIB_MDA_CHDIR
1622 GL_GNULIB_MDA_ACCESS
1623 GL_GNULIB_WRITE
1624 GL_GNULIB_USLEEP
1625 GL_GNULIB_UNLINKAT
1626 GL_GNULIB_UNLINK
1627 GL_GNULIB_UNISTD_H_SIGPIPE
1628 GL_GNULIB_UNISTD_H_NONBLOCKING
1629 GL_GNULIB_UNISTD_H_GETOPT
1630 GL_GNULIB_TTYNAME_R
1631 GL_GNULIB_TRUNCATE
1632 GL_GNULIB_SYMLINKAT
1633 GL_GNULIB_SYMLINK
1634 GL_GNULIB_SLEEP
1635 GL_GNULIB_SETHOSTNAME
1636 GL_GNULIB_RMDIR
1637 GL_GNULIB_READLINKAT
1638 GL_GNULIB_READLINK
1639 GL_GNULIB_READ
1640 GL_GNULIB_PWRITE
1641 GL_GNULIB_PREAD
1642 GL_GNULIB_PIPE2
1643 GL_GNULIB_PIPE
1644 GL_GNULIB_LSEEK
1645 GL_GNULIB_LINKAT
1646 GL_GNULIB_LINK
1647 GL_GNULIB_LCHOWN
1648 GL_GNULIB_ISATTY
1649 GL_GNULIB_GROUP_MEMBER
1650 GL_GNULIB_GETUSERSHELL
1651 GL_GNULIB_GETPASS_GNU
1652 GL_GNULIB_GETPASS
1653 GL_GNULIB_GETPAGESIZE
1654 GL_GNULIB_GETOPT_POSIX
1655 GL_GNULIB_GETLOGIN_R
1656 GL_GNULIB_GETLOGIN
1657 GL_GNULIB_GETHOSTNAME
1658 GL_GNULIB_GETGROUPS
1659 GL_GNULIB_GETENTROPY
1660 GL_GNULIB_GETDTABLESIZE
1661 GL_GNULIB_GETDOMAINNAME
1662 GL_GNULIB_GETCWD
1663 GL_GNULIB_FTRUNCATE
1664 GL_GNULIB_FSYNC
1665 GL_GNULIB_FDATASYNC
1666 GL_GNULIB_FCHOWNAT
1667 GL_GNULIB_FCHDIR
1668 GL_GNULIB_FACCESSAT
1669 GL_GNULIB_EXECVPE
1670 GL_GNULIB_EXECVP
1671 GL_GNULIB_EXECVE
1672 GL_GNULIB_EXECV
1673 GL_GNULIB_EXECLP
1674 GL_GNULIB_EXECLE
1675 GL_GNULIB_EXECL
1676 GL_GNULIB_EUIDACCESS
1677 GL_GNULIB_ENVIRON
1678 GL_GNULIB_DUP3
1679 GL_GNULIB_DUP2
1680 GL_GNULIB_DUP
1681 GL_GNULIB_COPY_FILE_RANGE
1682 GL_GNULIB_CLOSE
1683 GL_GNULIB_CHOWN
1684 GL_GNULIB_CHDIR
1685 GL_GNULIB_ACCESS
1686 REPLACE_WCTOMB
1687 REPLACE_UNSETENV
1688 REPLACE_STRTOULL
1689 REPLACE_STRTOUL
1690 REPLACE_STRTOLL
1691 REPLACE_STRTOLD
1692 REPLACE_STRTOL
1693 REPLACE_STRTOD
1694 REPLACE_SETSTATE
1695 REPLACE_SETENV
1696 REPLACE_REALPATH
1697 REPLACE_REALLOCARRAY
1698 REPLACE_REALLOC_FOR_REALLOC_POSIX
1699 REPLACE_REALLOC_FOR_REALLOC_GNU
1700 REPLACE_RANDOM_R
1701 REPLACE_RANDOM
1702 REPLACE_QSORT_R
1703 REPLACE_PUTENV
1704 REPLACE_PTSNAME_R
1705 REPLACE_PTSNAME
1706 REPLACE_POSIX_MEMALIGN
1707 REPLACE_MKSTEMP
1708 REPLACE_MBTOWC
1709 REPLACE_MALLOC_FOR_MALLOC_POSIX
1710 REPLACE_MALLOC_FOR_MALLOC_GNU
1711 REPLACE_INITSTATE
1712 REPLACE_FREE
1713 REPLACE_CANONICALIZE_FILE_NAME
1714 REPLACE_CALLOC_FOR_CALLOC_POSIX
1715 REPLACE_CALLOC_FOR_CALLOC_GNU
1716 REPLACE_ALIGNED_ALLOC
1717 HAVE_DECL_UNSETENV
1718 HAVE_UNLOCKPT
1719 HAVE_SYS_LOADAVG_H
1720 HAVE_STRUCT_RANDOM_DATA
1721 HAVE_STRTOULL
1722 HAVE_STRTOUL
1723 HAVE_STRTOLL
1724 HAVE_STRTOLD
1725 HAVE_STRTOL
1726 HAVE_STRTOD
1727 HAVE_DECL_SETSTATE
1728 HAVE_SETSTATE
1729 HAVE_DECL_SETENV
1730 HAVE_SETENV
1731 HAVE_SECURE_GETENV
1732 HAVE_RPMATCH
1733 HAVE_REALPATH
1734 HAVE_REALLOCARRAY
1735 HAVE_RANDOM_R
1736 HAVE_RANDOM_H
1737 HAVE_RANDOM
1738 HAVE_QSORT_R
1739 HAVE_PTSNAME_R
1740 HAVE_PTSNAME
1741 HAVE_POSIX_OPENPT
1742 HAVE_POSIX_MEMALIGN
1743 HAVE_MKSTEMPS
1744 HAVE_MKSTEMP
1745 HAVE_MKOSTEMPS
1746 HAVE_MKOSTEMP
1747 HAVE_MKDTEMP
1748 HAVE_MBTOWC
1749 HAVE_DECL_INITSTATE
1750 HAVE_INITSTATE
1751 HAVE_GRANTPT
1752 HAVE_GETSUBOPT
1753 HAVE_DECL_GETLOADAVG
1754 HAVE_DECL_GCVT
1755 HAVE_DECL_FCVT
1756 HAVE_DECL_ECVT
1757 HAVE_CANONICALIZE_FILE_NAME
1758 HAVE_ATOLL
1759 HAVE_ALIGNED_ALLOC
1760 HAVE__EXIT
1761 GL_GNULIB_MDA_PUTENV
1762 GL_GNULIB_MDA_MKTEMP
1763 GL_GNULIB_MDA_GCVT
1764 GL_GNULIB_MDA_FCVT
1765 GL_GNULIB_MDA_ECVT
1766 GL_GNULIB_WCTOMB
1767 GL_GNULIB_UNSETENV
1768 GL_GNULIB_UNLOCKPT
1769 GL_GNULIB_SYSTEM_POSIX
1770 GL_GNULIB_STRTOULL
1771 GL_GNULIB_STRTOUL
1772 GL_GNULIB_STRTOLL
1773 GL_GNULIB_STRTOLD
1774 GL_GNULIB_STRTOL
1775 GL_GNULIB_STRTOD
1776 GL_GNULIB_SETENV
1777 GL_GNULIB_SECURE_GETENV
1778 GL_GNULIB_RPMATCH
1779 GL_GNULIB_REALPATH
1780 GL_GNULIB_REALLOC_POSIX
1781 GL_GNULIB_REALLOC_GNU
1782 GL_GNULIB_REALLOCARRAY
1783 GL_GNULIB_RANDOM_R
1784 GL_GNULIB_RANDOM
1785 GL_GNULIB_QSORT_R
1786 GL_GNULIB_PUTENV
1787 GL_GNULIB_PTSNAME_R
1788 GL_GNULIB_PTSNAME
1789 GL_GNULIB_POSIX_OPENPT
1790 GL_GNULIB_POSIX_MEMALIGN
1791 GL_GNULIB_MKSTEMPS
1792 GL_GNULIB_MKSTEMP
1793 GL_GNULIB_MKOSTEMPS
1794 GL_GNULIB_MKOSTEMP
1795 GL_GNULIB_MKDTEMP
1796 GL_GNULIB_MBTOWC
1797 GL_GNULIB_MALLOC_POSIX
1798 GL_GNULIB_MALLOC_GNU
1799 GL_GNULIB_GRANTPT
1800 GL_GNULIB_GETSUBOPT
1801 GL_GNULIB_GETLOADAVG
1802 GL_GNULIB_FREE_POSIX
1803 GL_GNULIB_CANONICALIZE_FILE_NAME
1804 GL_GNULIB_CALLOC_POSIX
1805 GL_GNULIB_CALLOC_GNU
1806 GL_GNULIB_ATOLL
1807 GL_GNULIB_ALIGNED_ALLOC
1808 GL_GNULIB__EXIT
1809 GL_GNULIB_MDA_WCSDUP
1810 GL_GNULIB_WCSFTIME
1811 GL_GNULIB_WCSWIDTH
1812 GL_GNULIB_WCSTOK
1813 GL_GNULIB_WCSSTR
1814 GL_GNULIB_WCSPBRK
1815 GL_GNULIB_WCSSPN
1816 GL_GNULIB_WCSCSPN
1817 GL_GNULIB_WCSRCHR
1818 GL_GNULIB_WCSCHR
1819 GL_GNULIB_WCSDUP
1820 GL_GNULIB_WCSXFRM
1821 GL_GNULIB_WCSCOLL
1822 GL_GNULIB_WCSNCASECMP
1823 GL_GNULIB_WCSCASECMP
1824 GL_GNULIB_WCSNCMP
1825 GL_GNULIB_WCSCMP
1826 GL_GNULIB_WCSNCAT
1827 GL_GNULIB_WCSCAT
1828 GL_GNULIB_WCPNCPY
1829 GL_GNULIB_WCSNCPY
1830 GL_GNULIB_WCPCPY
1831 GL_GNULIB_WCSCPY
1832 GL_GNULIB_WCSNLEN
1833 GL_GNULIB_WCSLEN
1834 GL_GNULIB_WMEMSET
1835 GL_GNULIB_WMEMPCPY
1836 GL_GNULIB_WMEMMOVE
1837 GL_GNULIB_WMEMCPY
1838 GL_GNULIB_WMEMCMP
1839 GL_GNULIB_WMEMCHR
1840 GL_GNULIB_WCWIDTH
1841 GL_GNULIB_WCSNRTOMBS
1842 GL_GNULIB_WCSRTOMBS
1843 GL_GNULIB_WCRTOMB
1844 GL_GNULIB_MBSNRTOWCS
1845 GL_GNULIB_MBSRTOWCS
1846 GL_GNULIB_MBRLEN
1847 GL_GNULIB_MBRTOWC
1848 GL_GNULIB_MBSINIT
1849 GL_GNULIB_WCTOB
1850 GL_GNULIB_BTOWC
1851 GL_COND_OBJ_BTOWC_FALSE
1852 GL_COND_OBJ_BTOWC_TRUE
1853 LOCALE_FR
1854 REPLACE_WCSTOK
1855 REPLACE_WCSFTIME
1856 REPLACE_WCSWIDTH
1857 REPLACE_WCWIDTH
1858 REPLACE_WCSNRTOMBS
1859 REPLACE_WCSRTOMBS
1860 REPLACE_WCRTOMB
1861 REPLACE_MBSNRTOWCS
1862 REPLACE_MBSRTOWCS
1863 REPLACE_MBRLEN
1864 REPLACE_MBRTOWC
1865 REPLACE_MBSINIT
1866 REPLACE_WCTOB
1867 REPLACE_BTOWC
1868 REPLACE_MBSTATE_T
1869 HAVE_DECL_WCWIDTH
1870 HAVE_DECL_WCSDUP
1871 HAVE_DECL_WCTOB
1872 HAVE_WCSFTIME
1873 HAVE_WCSWIDTH
1874 HAVE_WCSTOK
1875 HAVE_WCSSTR
1876 HAVE_WCSPBRK
1877 HAVE_WCSSPN
1878 HAVE_WCSCSPN
1879 HAVE_WCSRCHR
1880 HAVE_WCSCHR
1881 HAVE_WCSDUP
1882 HAVE_WCSXFRM
1883 HAVE_WCSCOLL
1884 HAVE_WCSNCASECMP
1885 HAVE_WCSCASECMP
1886 HAVE_WCSNCMP
1887 HAVE_WCSCMP
1888 HAVE_WCSNCAT
1889 HAVE_WCSCAT
1890 HAVE_WCPNCPY
1891 HAVE_WCSNCPY
1892 HAVE_WCPCPY
1893 HAVE_WCSCPY
1894 HAVE_WCSNLEN
1895 HAVE_WCSLEN
1896 HAVE_WMEMSET
1897 HAVE_WMEMPCPY
1898 HAVE_WMEMMOVE
1899 HAVE_WMEMCPY
1900 HAVE_WMEMCMP
1901 HAVE_WMEMCHR
1902 HAVE_WCSNRTOMBS
1903 HAVE_WCSRTOMBS
1904 HAVE_WCRTOMB
1905 HAVE_MBSNRTOWCS
1906 HAVE_MBSRTOWCS
1907 HAVE_MBRLEN
1908 HAVE_MBRTOWC
1909 HAVE_MBSINIT
1910 HAVE_BTOWC
1911 GL_GENERATE_ALLOCA_H_FALSE
1912 GL_GENERATE_ALLOCA_H_TRUE
1913 ALLOCA_H
1914 HAVE_ALLOCA_H
1915 ALLOCA
1916 GL_COND_LIBTOOL_FALSE
1917 GL_COND_LIBTOOL_TRUE
1918 BUILD_SHEBANG
1919 BUILD_EXEEXT
1920 BUILD_CC
1921 LIBUTIL
1922 HELP2MAN
1923 POSUB
1924 LTLIBINTL
1925 LIBINTL
1926 INTLLIBS
1927 LTLIBICONV
1928 LIBICONV
1929 INTL_MACOSX_LIBS
1930 XGETTEXT_EXTRA_OPTIONS
1931 MSGMERGE
1932 XGETTEXT_015
1933 XGETTEXT
1934 GMSGFMT_015
1935 MSGFMT_015
1936 GMSGFMT
1937 MSGFMT
1938 GETTEXT_MACRO_VERSION
1939 USE_NLS
1940 SED
1941 HAVE_CXX
1942 pkgpyexecdir
1943 pyexecdir
1944 pkgpythondir
1945 pythondir
1946 PYTHON_EXEC_PREFIX
1947 PYTHON_PREFIX
1948 PYTHON_PLATFORM
1949 PYTHON_VERSION
1950 PYTHON
1951 am__fastdepCCAS_FALSE
1952 am__fastdepCCAS_TRUE
1953 CCASDEPMODE
1954 CCASFLAGS
1955 CCAS
1956 am__fastdepCXX_FALSE
1957 am__fastdepCXX_TRUE
1958 CXXDEPMODE
1959 ac_ct_CXX
1960 CXXFLAGS
1961 CXX
1962 ARFLAGS
1963 AR
1964 EGREP
1965 GREP
1966 CPP
1967 LN_S
1968 YFLAGS
1969 LEXLIB
1970 LEX_OUTPUT_ROOT
1971 LEX
1972 RANLIB
1973 YACC
1974 CMP
1975 grubdirname
1976 bootdirname
1977 platform
1978 host_kernel
1979 TARGET_DECOMPRESSOR_LINK_ADDR
1980 TARGET_LINK_ADDR
1981 grub_file
1982 grub_render_label
1983 grub_sparc64_setup
1984 grub_set_default
1985 grub_script_check
1986 grub_reboot
1987 grub_protect
1988 grub_probe
1989 grub_mkrescue
1990 grub_mkrelpath
1991 grub_mkpasswd_pbkdf2
1992 grub_mklayout
1993 grub_glue_efi
1994 grub_mkimage
1995 grub_mkfont
1996 grub_mkconfig
1997 grub_install
1998 grub_editenv
1999 grub_bios_setup
2000 PKG_CONFIG_LIBDIR
2001 PKG_CONFIG_PATH
2002 PKG_CONFIG
2003 AM_BACKSLASH
2004 AM_DEFAULT_VERBOSITY
2005 AM_DEFAULT_V
2006 AM_V
2007 CSCOPE
2008 ETAGS
2009 CTAGS
2010 am__fastdepCC_FALSE
2011 am__fastdepCC_TRUE
2012 CCDEPMODE
2013 am__nodep
2014 AMDEPBACKSLASH
2015 AMDEP_FALSE
2016 AMDEP_TRUE
2017 am__include
2018 DEPDIR
2019 am__untar
2020 am__tar
2021 AMTAR
2022 am__leading_dot
2023 SET_MAKE
2024 AWK
2025 mkdir_p
2026 MKDIR_P
2027 INSTALL_STRIP_PROGRAM
2028 STRIP
2029 install_sh
2030 MAKEINFO
2031 AUTOHEADER
2032 AUTOMAKE
2033 AUTOCONF
2034 ACLOCAL
2035 VERSION
2036 PACKAGE
2037 CYGPATH_W
2038 am__isrc
2039 INSTALL_DATA
2040 INSTALL_SCRIPT
2041 INSTALL_PROGRAM
2042 target_os
2043 target_vendor
2044 target_cpu
2045 target
2046 host_os
2047 host_vendor
2048 host_cpu
2049 host
2050 build_os
2051 build_vendor
2052 build_cpu
2053 build
2054 OBJEXT
2055 EXEEXT
2056 ac_ct_CC
2057 CPPFLAGS
2058 LDFLAGS
2059 CFLAGS
2060 CC
2061 target_alias
2062 host_alias
2063 build_alias
2064 LIBS
2065 ECHO_T
2066 ECHO_N
2067 ECHO_C
2068 DEFS
2069 mandir
2070 localedir
2071 libdir
2072 psdir
2073 pdfdir
2074 dvidir
2075 htmldir
2076 infodir
2077 docdir
2078 oldincludedir
2079 includedir
2080 runstatedir
2081 localstatedir
2082 sharedstatedir
2083 sysconfdir
2084 datadir
2085 datarootdir
2086 libexecdir
2087 sbindir
2088 bindir
2089 program_transform_name
2090 prefix
2091 exec_prefix
2092 PACKAGE_URL
2093 PACKAGE_BUGREPORT
2094 PACKAGE_STRING
2095 PACKAGE_VERSION
2096 PACKAGE_TARNAME
2097 PACKAGE_NAME
2098 PATH_SEPARATOR
2099 SHELL
2100 am__quote'
2101 ac_subst_files=''
2102 ac_user_opts='
2103 enable_option_checking
2104 enable_dependency_tracking
2105 enable_silent_rules
2106 with_platform
2107 with_bootdir
2108 with_grubdir
2109 enable_largefile
2110 enable_year2038
2111 enable_threads
2112 with_python_sys_prefix
2113 with_python_prefix
2114 with_python_exec_prefix
2115 enable_nls
2116 with_gnu_ld
2117 enable_rpath
2118 with_libiconv_prefix
2119 with_libintl_prefix
2120 enable_cross_guesses
2121 with_included_regex
2122 enable_amd64_as_feature_detection
2123 enable_efiemu
2124 enable_stack_protector
2125 enable_mm_debug
2126 enable_cache_stats
2127 enable_boot_time
2128 enable_grub_emu_sdl2
2129 enable_grub_emu_sdl
2130 enable_grub_emu_pci
2131 enable_grub_mkfont
2132 enable_grub_themes
2133 with_dejavufont
2134 with_unifont
2135 enable_grub_mount
2136 enable_device_mapper
2137 enable_liblzma
2138 enable_libzfs
2139 enable_grub_protect
2140 enable_werror
2141 '
2142 ac_precious_vars='build_alias
2143 host_alias
2144 target_alias
2145 CC
2146 CFLAGS
2147 LDFLAGS
2148 LIBS
2149 CPPFLAGS
2150 PKG_CONFIG
2151 PKG_CONFIG_PATH
2152 PKG_CONFIG_LIBDIR
2153 YACC
2154 YFLAGS
2155 CPP
2156 CXX
2157 CXXFLAGS
2158 CCC
2159 CCAS
2160 CCASFLAGS
2161 PYTHON
2162 SDL2_CFLAGS
2163 SDL2_LIBS
2164 FREETYPE_CFLAGS
2165 FREETYPE_LIBS
2166 BUILD_FREETYPE_CFLAGS
2167 BUILD_FREETYPE_LIBS
2168 FUSE_CFLAGS
2169 FUSE_LIBS'
2170
2171
2172 # Initialize some variables set by options.
2173 ac_init_help=
2174 ac_init_version=false
2175 ac_unrecognized_opts=
2176 ac_unrecognized_sep=
2177 # The variables have the same names as the options, with
2178 # dashes changed to underlines.
2179 cache_file=/dev/null
2180 exec_prefix=NONE
2181 no_create=
2182 no_recursion=
2183 prefix=NONE
2184 program_prefix=NONE
2185 program_suffix=NONE
2186 program_transform_name=s,x,x,
2187 silent=
2188 site=
2189 srcdir=
2190 verbose=
2191 x_includes=NONE
2192 x_libraries=NONE
2193
2194 # Installation directory options.
2195 # These are left unexpanded so users can "make install exec_prefix=/foo"
2196 # and all the variables that are supposed to be based on exec_prefix
2197 # by default will actually change.
2198 # Use braces instead of parens because sh, perl, etc. also accept them.
2199 # (The list follows the same order as the GNU Coding Standards.)
2200 bindir='${exec_prefix}/bin'
2201 sbindir='${exec_prefix}/sbin'
2202 libexecdir='${exec_prefix}/libexec'
2203 datarootdir='${prefix}/share'
2204 datadir='${datarootdir}'
2205 sysconfdir='${prefix}/etc'
2206 sharedstatedir='${prefix}/com'
2207 localstatedir='${prefix}/var'
2208 runstatedir='${localstatedir}/run'
2209 includedir='${prefix}/include'
2210 oldincludedir='/usr/include'
2211 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
2212 infodir='${datarootdir}/info'
2213 htmldir='${docdir}'
2214 dvidir='${docdir}'
2215 pdfdir='${docdir}'
2216 psdir='${docdir}'
2217 libdir='${exec_prefix}/lib'
2218 localedir='${datarootdir}/locale'
2219 mandir='${datarootdir}/man'
2220
2221 ac_prev=
2222 ac_dashdash=
2223 for ac_option
2224 do
2225 # If the previous option needs an argument, assign it.
2226 if test -n "$ac_prev"; then
2227 eval $ac_prev=\$ac_option
2228 ac_prev=
2229 continue
2230 fi
2231
2232 case $ac_option in
2233 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
2234 *=) ac_optarg= ;;
2235 *) ac_optarg=yes ;;
2236 esac
2237
2238 case $ac_dashdash$ac_option in
2239 --)
2240 ac_dashdash=yes ;;
2241
2242 -bindir | --bindir | --bindi | --bind | --bin | --bi)
2243 ac_prev=bindir ;;
2244 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
2245 bindir=$ac_optarg ;;
2246
2247 -build | --build | --buil | --bui | --bu)
2248 ac_prev=build_alias ;;
2249 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
2250 build_alias=$ac_optarg ;;
2251
2252 -cache-file | --cache-file | --cache-fil | --cache-fi \
2253 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
2254 ac_prev=cache_file ;;
2255 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
2256 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
2257 cache_file=$ac_optarg ;;
2258
2259 --config-cache | -C)
2260 cache_file=config.cache ;;
2261
2262 -datadir | --datadir | --datadi | --datad)
2263 ac_prev=datadir ;;
2264 -datadir=* | --datadir=* | --datadi=* | --datad=*)
2265 datadir=$ac_optarg ;;
2266
2267 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
2268 | --dataroo | --dataro | --datar)
2269 ac_prev=datarootdir ;;
2270 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
2271 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
2272 datarootdir=$ac_optarg ;;
2273
2274 -disable-* | --disable-*)
2275 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
2276 # Reject names that are not valid shell variable names.
2277 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2278 as_fn_error $? "invalid feature name: \`$ac_useropt'"
2279 ac_useropt_orig=$ac_useropt
2280 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
2281 case $ac_user_opts in
2282 *"
2283 "enable_$ac_useropt"
2284 "*) ;;
2285 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
2286 ac_unrecognized_sep=', ';;
2287 esac
2288 eval enable_$ac_useropt=no ;;
2289
2290 -docdir | --docdir | --docdi | --doc | --do)
2291 ac_prev=docdir ;;
2292 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
2293 docdir=$ac_optarg ;;
2294
2295 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
2296 ac_prev=dvidir ;;
2297 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
2298 dvidir=$ac_optarg ;;
2299
2300 -enable-* | --enable-*)
2301 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
2302 # Reject names that are not valid shell variable names.
2303 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2304 as_fn_error $? "invalid feature name: \`$ac_useropt'"
2305 ac_useropt_orig=$ac_useropt
2306 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
2307 case $ac_user_opts in
2308 *"
2309 "enable_$ac_useropt"
2310 "*) ;;
2311 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
2312 ac_unrecognized_sep=', ';;
2313 esac
2314 eval enable_$ac_useropt=\$ac_optarg ;;
2315
2316 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
2317 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
2318 | --exec | --exe | --ex)
2319 ac_prev=exec_prefix ;;
2320 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
2321 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
2322 | --exec=* | --exe=* | --ex=*)
2323 exec_prefix=$ac_optarg ;;
2324
2325 -gas | --gas | --ga | --g)
2326 # Obsolete; use --with-gas.
2327 with_gas=yes ;;
2328
2329 -help | --help | --hel | --he | -h)
2330 ac_init_help=long ;;
2331 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
2332 ac_init_help=recursive ;;
2333 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
2334 ac_init_help=short ;;
2335
2336 -host | --host | --hos | --ho)
2337 ac_prev=host_alias ;;
2338 -host=* | --host=* | --hos=* | --ho=*)
2339 host_alias=$ac_optarg ;;
2340
2341 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
2342 ac_prev=htmldir ;;
2343 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
2344 | --ht=*)
2345 htmldir=$ac_optarg ;;
2346
2347 -includedir | --includedir | --includedi | --included | --include \
2348 | --includ | --inclu | --incl | --inc)
2349 ac_prev=includedir ;;
2350 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
2351 | --includ=* | --inclu=* | --incl=* | --inc=*)
2352 includedir=$ac_optarg ;;
2353
2354 -infodir | --infodir | --infodi | --infod | --info | --inf)
2355 ac_prev=infodir ;;
2356 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
2357 infodir=$ac_optarg ;;
2358
2359 -libdir | --libdir | --libdi | --libd)
2360 ac_prev=libdir ;;
2361 -libdir=* | --libdir=* | --libdi=* | --libd=*)
2362 libdir=$ac_optarg ;;
2363
2364 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
2365 | --libexe | --libex | --libe)
2366 ac_prev=libexecdir ;;
2367 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
2368 | --libexe=* | --libex=* | --libe=*)
2369 libexecdir=$ac_optarg ;;
2370
2371 -localedir | --localedir | --localedi | --localed | --locale)
2372 ac_prev=localedir ;;
2373 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
2374 localedir=$ac_optarg ;;
2375
2376 -localstatedir | --localstatedir | --localstatedi | --localstated \
2377 | --localstate | --localstat | --localsta | --localst | --locals)
2378 ac_prev=localstatedir ;;
2379 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
2380 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
2381 localstatedir=$ac_optarg ;;
2382
2383 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
2384 ac_prev=mandir ;;
2385 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
2386 mandir=$ac_optarg ;;
2387
2388 -nfp | --nfp | --nf)
2389 # Obsolete; use --without-fp.
2390 with_fp=no ;;
2391
2392 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
2393 | --no-cr | --no-c | -n)
2394 no_create=yes ;;
2395
2396 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
2397 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
2398 no_recursion=yes ;;
2399
2400 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
2401 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
2402 | --oldin | --oldi | --old | --ol | --o)
2403 ac_prev=oldincludedir ;;
2404 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
2405 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
2406 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
2407 oldincludedir=$ac_optarg ;;
2408
2409 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
2410 ac_prev=prefix ;;
2411 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
2412 prefix=$ac_optarg ;;
2413
2414 -program-prefix | --program-prefix | --program-prefi | --program-pref \
2415 | --program-pre | --program-pr | --program-p)
2416 ac_prev=program_prefix ;;
2417 -program-prefix=* | --program-prefix=* | --program-prefi=* \
2418 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
2419 program_prefix=$ac_optarg ;;
2420
2421 -program-suffix | --program-suffix | --program-suffi | --program-suff \
2422 | --program-suf | --program-su | --program-s)
2423 ac_prev=program_suffix ;;
2424 -program-suffix=* | --program-suffix=* | --program-suffi=* \
2425 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
2426 program_suffix=$ac_optarg ;;
2427
2428 -program-transform-name | --program-transform-name \
2429 | --program-transform-nam | --program-transform-na \
2430 | --program-transform-n | --program-transform- \
2431 | --program-transform | --program-transfor \
2432 | --program-transfo | --program-transf \
2433 | --program-trans | --program-tran \
2434 | --progr-tra | --program-tr | --program-t)
2435 ac_prev=program_transform_name ;;
2436 -program-transform-name=* | --program-transform-name=* \
2437 | --program-transform-nam=* | --program-transform-na=* \
2438 | --program-transform-n=* | --program-transform-=* \
2439 | --program-transform=* | --program-transfor=* \
2440 | --program-transfo=* | --program-transf=* \
2441 | --program-trans=* | --program-tran=* \
2442 | --progr-tra=* | --program-tr=* | --program-t=*)
2443 program_transform_name=$ac_optarg ;;
2444
2445 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
2446 ac_prev=pdfdir ;;
2447 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
2448 pdfdir=$ac_optarg ;;
2449
2450 -psdir | --psdir | --psdi | --psd | --ps)
2451 ac_prev=psdir ;;
2452 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
2453 psdir=$ac_optarg ;;
2454
2455 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2456 | -silent | --silent | --silen | --sile | --sil)
2457 silent=yes ;;
2458
2459 -runstatedir | --runstatedir | --runstatedi | --runstated \
2460 | --runstate | --runstat | --runsta | --runst | --runs \
2461 | --run | --ru | --r)
2462 ac_prev=runstatedir ;;
2463 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
2464 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
2465 | --run=* | --ru=* | --r=*)
2466 runstatedir=$ac_optarg ;;
2467
2468 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
2469 ac_prev=sbindir ;;
2470 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
2471 | --sbi=* | --sb=*)
2472 sbindir=$ac_optarg ;;
2473
2474 -sharedstatedir | --sharedstatedir | --sharedstatedi \
2475 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
2476 | --sharedst | --shareds | --shared | --share | --shar \
2477 | --sha | --sh)
2478 ac_prev=sharedstatedir ;;
2479 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
2480 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
2481 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
2482 | --sha=* | --sh=*)
2483 sharedstatedir=$ac_optarg ;;
2484
2485 -site | --site | --sit)
2486 ac_prev=site ;;
2487 -site=* | --site=* | --sit=*)
2488 site=$ac_optarg ;;
2489
2490 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2491 ac_prev=srcdir ;;
2492 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2493 srcdir=$ac_optarg ;;
2494
2495 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
2496 | --syscon | --sysco | --sysc | --sys | --sy)
2497 ac_prev=sysconfdir ;;
2498 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
2499 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
2500 sysconfdir=$ac_optarg ;;
2501
2502 -target | --target | --targe | --targ | --tar | --ta | --t)
2503 ac_prev=target_alias ;;
2504 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
2505 target_alias=$ac_optarg ;;
2506
2507 -v | -verbose | --verbose | --verbos | --verbo | --verb)
2508 verbose=yes ;;
2509
2510 -version | --version | --versio | --versi | --vers | -V)
2511 ac_init_version=: ;;
2512
2513 -with-* | --with-*)
2514 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
2515 # Reject names that are not valid shell variable names.
2516 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2517 as_fn_error $? "invalid package name: \`$ac_useropt'"
2518 ac_useropt_orig=$ac_useropt
2519 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
2520 case $ac_user_opts in
2521 *"
2522 "with_$ac_useropt"
2523 "*) ;;
2524 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
2525 ac_unrecognized_sep=', ';;
2526 esac
2527 eval with_$ac_useropt=\$ac_optarg ;;
2528
2529 -without-* | --without-*)
2530 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
2531 # Reject names that are not valid shell variable names.
2532 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2533 as_fn_error $? "invalid package name: \`$ac_useropt'"
2534 ac_useropt_orig=$ac_useropt
2535 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
2536 case $ac_user_opts in
2537 *"
2538 "with_$ac_useropt"
2539 "*) ;;
2540 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
2541 ac_unrecognized_sep=', ';;
2542 esac
2543 eval with_$ac_useropt=no ;;
2544
2545 --x)
2546 # Obsolete; use --with-x.
2547 with_x=yes ;;
2548
2549 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
2550 | --x-incl | --x-inc | --x-in | --x-i)
2551 ac_prev=x_includes ;;
2552 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
2553 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
2554 x_includes=$ac_optarg ;;
2555
2556 -x-libraries | --x-libraries | --x-librarie | --x-librari \
2557 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
2558 ac_prev=x_libraries ;;
2559 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
2560 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
2561 x_libraries=$ac_optarg ;;
2562
2563 -*) as_fn_error $? "unrecognized option: \`$ac_option'
2564 Try \`$0 --help' for more information"
2565 ;;
2566
2567 *=*)
2568 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
2569 # Reject names that are not valid shell variable names.
2570 case $ac_envvar in #(
2571 '' | [0-9]* | *[!_$as_cr_alnum]* )
2572 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
2573 esac
2574 eval $ac_envvar=\$ac_optarg
2575 export $ac_envvar ;;
2576
2577 *)
2578 # FIXME: should be removed in autoconf 3.0.
2579 printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
2580 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
2581 printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
2582 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
2583 ;;
2584
2585 esac
2586 done
2587
2588 if test -n "$ac_prev"; then
2589 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
2590 as_fn_error $? "missing argument to $ac_option"
2591 fi
2592
2593 if test -n "$ac_unrecognized_opts"; then
2594 case $enable_option_checking in
2595 no) ;;
2596 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
2597 *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2598 esac
2599 fi
2600
2601 # Check all directory arguments for consistency.
2602 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
2603 datadir sysconfdir sharedstatedir localstatedir includedir \
2604 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2605 libdir localedir mandir runstatedir
2606 do
2607 eval ac_val=\$$ac_var
2608 # Remove trailing slashes.
2609 case $ac_val in
2610 */ )
2611 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2612 eval $ac_var=\$ac_val;;
2613 esac
2614 # Be sure to have absolute directory names.
2615 case $ac_val in
2616 [\\/$]* | ?:[\\/]* ) continue;;
2617 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2618 esac
2619 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
2620 done
2621
2622 # There might be people who depend on the old broken behavior: `$host'
2623 # used to hold the argument of --host etc.
2624 # FIXME: To remove some day.
2625 build=$build_alias
2626 host=$host_alias
2627 target=$target_alias
2628
2629 # FIXME: To remove some day.
2630 if test "x$host_alias" != x; then
2631 if test "x$build_alias" = x; then
2632 cross_compiling=maybe
2633 elif test "x$build_alias" != "x$host_alias"; then
2634 cross_compiling=yes
2635 fi
2636 fi
2637
2638 ac_tool_prefix=
2639 test -n "$host_alias" && ac_tool_prefix=$host_alias-
2640
2641 test "$silent" = yes && exec 6>/dev/null
2642
2643
2644 ac_pwd=`pwd` && test -n "$ac_pwd" &&
2645 ac_ls_di=`ls -di .` &&
2646 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2647 as_fn_error $? "working directory cannot be determined"
2648 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2649 as_fn_error $? "pwd does not report name of working directory"
2650
2651
2652 # Find the source files, if location was not specified.
2653 if test -z "$srcdir"; then
2654 ac_srcdir_defaulted=yes
2655 # Try the directory containing this script, then the parent directory.
2656 ac_confdir=`$as_dirname -- "$as_myself" ||
2657 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2658 X"$as_myself" : 'X\(//\)[^/]' \| \
2659 X"$as_myself" : 'X\(//\)$' \| \
2660 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2661 printf "%s\n" X"$as_myself" |
2662 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2663 s//\1/
2664 q
2665 }
2666 /^X\(\/\/\)[^/].*/{
2667 s//\1/
2668 q
2669 }
2670 /^X\(\/\/\)$/{
2671 s//\1/
2672 q
2673 }
2674 /^X\(\/\).*/{
2675 s//\1/
2676 q
2677 }
2678 s/.*/./; q'`
2679 srcdir=$ac_confdir
2680 if test ! -r "$srcdir/$ac_unique_file"; then
2681 srcdir=..
2682 fi
2683 else
2684 ac_srcdir_defaulted=no
2685 fi
2686 if test ! -r "$srcdir/$ac_unique_file"; then
2687 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2688 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
2689 fi
2690 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2691 ac_abs_confdir=`(
2692 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
2693 pwd)`
2694 # When building in place, set srcdir=.
2695 if test "$ac_abs_confdir" = "$ac_pwd"; then
2696 srcdir=.
2697 fi
2698 # Remove unnecessary trailing slashes from srcdir.
2699 # Double slashes in file names in object file debugging info
2700 # mess up M-x gdb in Emacs.
2701 case $srcdir in
2702 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2703 esac
2704 for ac_var in $ac_precious_vars; do
2705 eval ac_env_${ac_var}_set=\${${ac_var}+set}
2706 eval ac_env_${ac_var}_value=\$${ac_var}
2707 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2708 eval ac_cv_env_${ac_var}_value=\$${ac_var}
2709 done
2710
2711 #
2712 # Report the --help message.
2713 #
2714 if test "$ac_init_help" = "long"; then
2715 # Omit some internal or obsolete options to make the list less imposing.
2716 # This message is too long to be a string in the A/UX 3.1 sh.
2717 cat <<_ACEOF
2718 \`configure' configures GRUB 2.14 to adapt to many kinds of systems.
2719
2720 Usage: $0 [OPTION]... [VAR=VALUE]...
2721
2722 To assign environment variables (e.g., CC, CFLAGS...), specify them as
2723 VAR=VALUE. See below for descriptions of some of the useful variables.
2724
2725 Defaults for the options are specified in brackets.
2726
2727 Configuration:
2728 -h, --help display this help and exit
2729 --help=short display options specific to this package
2730 --help=recursive display the short help of all the included packages
2731 -V, --version display version information and exit
2732 -q, --quiet, --silent do not print \`checking ...' messages
2733 --cache-file=FILE cache test results in FILE [disabled]
2734 -C, --config-cache alias for \`--cache-file=config.cache'
2735 -n, --no-create do not create output files
2736 --srcdir=DIR find the sources in DIR [configure dir or \`..']
2737
2738 Installation directories:
2739 --prefix=PREFIX install architecture-independent files in PREFIX
2740 [$ac_default_prefix]
2741 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
2742 [PREFIX]
2743
2744 By default, \`make install' will install all the files in
2745 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
2746 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2747 for instance \`--prefix=\$HOME'.
2748
2749 For better control, use the options below.
2750
2751 Fine tuning of the installation directories:
2752 --bindir=DIR user executables [EPREFIX/bin]
2753 --sbindir=DIR system admin executables [EPREFIX/sbin]
2754 --libexecdir=DIR program executables [EPREFIX/libexec]
2755 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
2756 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
2757 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
2758 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
2759 --libdir=DIR object code libraries [EPREFIX/lib]
2760 --includedir=DIR C header files [PREFIX/include]
2761 --oldincludedir=DIR C header files for non-gcc [/usr/include]
2762 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
2763 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
2764 --infodir=DIR info documentation [DATAROOTDIR/info]
2765 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
2766 --mandir=DIR man documentation [DATAROOTDIR/man]
2767 --docdir=DIR documentation root [DATAROOTDIR/doc/grub]
2768 --htmldir=DIR html documentation [DOCDIR]
2769 --dvidir=DIR dvi documentation [DOCDIR]
2770 --pdfdir=DIR pdf documentation [DOCDIR]
2771 --psdir=DIR ps documentation [DOCDIR]
2772 _ACEOF
2773
2774 cat <<\_ACEOF
2775
2776 Program names:
2777 --program-prefix=PREFIX prepend PREFIX to installed program names
2778 --program-suffix=SUFFIX append SUFFIX to installed program names
2779 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
2780
2781 System types:
2782 --build=BUILD configure for building on BUILD [guessed]
2783 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2784 --target=TARGET configure for building compilers for TARGET [HOST]
2785 _ACEOF
2786 fi
2787
2788 if test -n "$ac_init_help"; then
2789 case $ac_init_help in
2790 short | recursive ) echo "Configuration of GRUB 2.14:";;
2791 esac
2792 cat <<\_ACEOF
2793
2794 Optional Features:
2795 --disable-option-checking ignore unrecognized --enable/--with options
2796 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2797 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
2798 --enable-dependency-tracking
2799 do not reject slow dependency extractors
2800 --disable-dependency-tracking
2801 speeds up one-time build
2802 --enable-silent-rules less verbose build output (undo: "make V=1")
2803 --disable-silent-rules verbose build output (undo: "make V=0")
2804 --disable-largefile omit support for large files
2805 --disable-year2038 omit support for timestamps past the year 2038
2806 --enable-threads={isoc|posix|isoc+posix|windows}
2807 specify multithreading API
2808 --disable-threads build without multithread safety
2809 --disable-nls do not use Native Language Support
2810 --disable-rpath do not hardcode runtime library paths
2811 --enable-cross-guesses={conservative|risky}
2812 specify policy for cross-compilation guesses
2813 --disable-amd64-as-feature-detection
2814 Disable the auto-detection of AMD64 as(1) features
2815 --enable-efiemu build and install the efiemu runtimes
2816 (default=guessed)
2817 --enable-stack-protector
2818 enable the stack protector
2819 --enable-mm-debug include memory manager debugging
2820 --enable-cache-stats enable disk cache statistics collection
2821 --enable-boot-time enable boot time statistics collection
2822 --enable-grub-emu-sdl2 build and install the `grub-emu' debugging utility
2823 with SDL2 support (default=guessed)
2824 --enable-grub-emu-sdl build and install the `grub-emu' debugging utility
2825 with SDL support (default=guessed)
2826 --enable-grub-emu-pci build and install the `grub-emu' debugging utility
2827 with PCI support (potentially dangerous)
2828 (default=no)
2829 --enable-grub-mkfont build and install the `grub-mkfont' utility
2830 (default=guessed)
2831 --enable-grub-themes build and install GRUB themes (default=guessed)
2832 --enable-grub-mount build and install the `grub-mount' utility
2833 (default=guessed)
2834 --enable-device-mapper enable Linux device-mapper support (default=guessed)
2835 --enable-liblzma enable liblzma integration (default=guessed)
2836 --enable-libzfs enable libzfs integration (default=guessed)
2837 --enable-grub-protect build and install the `grub-protect' utility
2838 (default=guessed)
2839 --disable-werror do not use -Werror when building GRUB
2840
2841 Optional Packages:
2842 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
2843 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
2844 --with-platform=PLATFORM
2845 select the host platform [[guessed]]
2846 --with-bootdir=DIR set the name of /boot directory [[guessed]]
2847 --with-grubdir=DIR set the name of grub directory [[guessed]]
2848 --with-python-sys-prefix
2849 use Python's sys.prefix and sys.exec_prefix values
2850 --with-python_prefix override the default PYTHON_PREFIX
2851 --with-python_exec_prefix
2852 override the default PYTHON_EXEC_PREFIX
2853 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
2854 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
2855 --without-libiconv-prefix don't search for libiconv in includedir and libdir
2856 --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib
2857 --without-libintl-prefix don't search for libintl in includedir and libdir
2858 --without-included-regex
2859 don't compile regex; this is the default on systems
2860 with recent-enough versions of the GNU C Library
2861 (use with caution on other systems).
2862 --with-dejavufont=FILE set the DejeVu source [[guessed]]
2863 --with-unifont=FILE set the unifont source [[guessed]]
2864
2865 Some influential environment variables:
2866 CC C compiler command
2867 CFLAGS C compiler flags
2868 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2869 nonstandard directory <lib dir>
2870 LIBS libraries to pass to the linker, e.g. -l<library>
2871 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2872 you have headers in a nonstandard directory <include dir>
2873 PKG_CONFIG path to pkg-config utility
2874 PKG_CONFIG_PATH
2875 directories to add to pkg-config's search path
2876 PKG_CONFIG_LIBDIR
2877 path overriding pkg-config's built-in search path
2878 YACC The `Yet Another Compiler Compiler' implementation to use.
2879 Defaults to the first program found out of: `bison -y', `byacc',
2880 `yacc'.
2881 YFLAGS The list of arguments that will be passed by default to $YACC.
2882 This script will default YFLAGS to the empty string to avoid a
2883 default value of `-d' given by some make applications.
2884 CPP C preprocessor
2885 CXX C++ compiler command
2886 CXXFLAGS C++ compiler flags
2887 CCAS assembler compiler command (defaults to CC)
2888 CCASFLAGS assembler compiler flags (defaults to CFLAGS)
2889 PYTHON the Python interpreter
2890 SDL2_CFLAGS C compiler flags for SDL2, overriding pkg-config
2891 SDL2_LIBS linker flags for SDL2, overriding pkg-config
2892 FREETYPE_CFLAGS
2893 C compiler flags for FREETYPE, overriding pkg-config
2894 FREETYPE_LIBS
2895 linker flags for FREETYPE, overriding pkg-config
2896 BUILD_FREETYPE_CFLAGS
2897 C compiler flags for BUILD_FREETYPE, overriding pkg-config
2898 BUILD_FREETYPE_LIBS
2899 linker flags for BUILD_FREETYPE, overriding pkg-config
2900 FUSE_CFLAGS C compiler flags for FUSE, overriding pkg-config
2901 FUSE_LIBS linker flags for FUSE, overriding pkg-config
2902
2903 Use these variables to override the choices made by `configure' or to help
2904 it to find libraries and programs with nonstandard names/locations.
2905
2906 Report bugs to <[email protected]>.
2907 _ACEOF
2908 ac_status=$?
2909 fi
2910
2911 if test "$ac_init_help" = "recursive"; then
2912 # If there are subdirs, report their specific --help.
2913 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2914 test -d "$ac_dir" ||
2915 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2916 continue
2917 ac_builddir=.
2918
2919 case "$ac_dir" in
2920 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2921 *)
2922 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
2923 # A ".." for each directory in $ac_dir_suffix.
2924 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2925 case $ac_top_builddir_sub in
2926 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2927 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2928 esac ;;
2929 esac
2930 ac_abs_top_builddir=$ac_pwd
2931 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2932 # for backward compatibility:
2933 ac_top_builddir=$ac_top_build_prefix
2934
2935 case $srcdir in
2936 .) # We are building in place.
2937 ac_srcdir=.
2938 ac_top_srcdir=$ac_top_builddir_sub
2939 ac_abs_top_srcdir=$ac_pwd ;;
2940 [\\/]* | ?:[\\/]* ) # Absolute name.
2941 ac_srcdir=$srcdir$ac_dir_suffix;
2942 ac_top_srcdir=$srcdir
2943 ac_abs_top_srcdir=$srcdir ;;
2944 *) # Relative name.
2945 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2946 ac_top_srcdir=$ac_top_build_prefix$srcdir
2947 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2948 esac
2949 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2950
2951 cd "$ac_dir" || { ac_status=$?; continue; }
2952 # Check for configure.gnu first; this name is used for a wrapper for
2953 # Metaconfig's "Configure" on case-insensitive file systems.
2954 if test -f "$ac_srcdir/configure.gnu"; then
2955 echo &&
2956 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2957 elif test -f "$ac_srcdir/configure"; then
2958 echo &&
2959 $SHELL "$ac_srcdir/configure" --help=recursive
2960 else
2961 printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2962 fi || ac_status=$?
2963 cd "$ac_pwd" || { ac_status=$?; break; }
2964 done
2965 fi
2966
2967 test -n "$ac_init_help" && exit $ac_status
2968 if $ac_init_version; then
2969 cat <<\_ACEOF
2970 GRUB configure 2.14
2971 generated by GNU Autoconf 2.71
2972
2973 Copyright (C) 2021 Free Software Foundation, Inc.
2974 This configure script is free software; the Free Software Foundation
2975 gives unlimited permission to copy, distribute and modify it.
2976 _ACEOF
2977 exit
2978 fi
2979
2980 ## ------------------------ ##
2981 ## Autoconf initialization. ##
2982 ## ------------------------ ##
2983
2984 # ac_fn_c_try_compile LINENO
2985 # --------------------------
2986 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2987 ac_fn_c_try_compile ()
2988 {
2989 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2990 rm -f conftest.$ac_objext conftest.beam
2991 if { { ac_try="$ac_compile"
2992 case "(($ac_try" in
2993 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2994 *) ac_try_echo=$ac_try;;
2995 esac
2996 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2997 printf "%s\n" "$ac_try_echo"; } >&5
2998 (eval "$ac_compile") 2>conftest.err
2999 ac_status=$?
3000 if test -s conftest.err; then
3001 grep -v '^ *+' conftest.err >conftest.er1
3002 cat conftest.er1 >&5
3003 mv -f conftest.er1 conftest.err
3004 fi
3005 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3006 test $ac_status = 0; } && {
3007 test -z "$ac_c_werror_flag" ||
3008 test ! -s conftest.err
3009 } && test -s conftest.$ac_objext
3010 then :
3011 ac_retval=0
3012 else $as_nop
3013 printf "%s\n" "$as_me: failed program was:" >&5
3014 sed 's/^/| /' conftest.$ac_ext >&5
3015
3016 ac_retval=1
3017 fi
3018 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3019 as_fn_set_status $ac_retval
3020
3021 } # ac_fn_c_try_compile
3022
3023 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3024 # -------------------------------------------------------
3025 # Tests whether HEADER exists and can be compiled using the include files in
3026 # INCLUDES, setting the cache variable VAR accordingly.
3027 ac_fn_c_check_header_compile ()
3028 {
3029 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3030 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3031 printf %s "checking for $2... " >&6; }
3032 if eval test \${$3+y}
3033 then :
3034 printf %s "(cached) " >&6
3035 else $as_nop
3036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3037 /* end confdefs.h. */
3038 $4
3039 #include <$2>
3040 _ACEOF
3041 if ac_fn_c_try_compile "$LINENO"
3042 then :
3043 eval "$3=yes"
3044 else $as_nop
3045 eval "$3=no"
3046 fi
3047 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3048 fi
3049 eval ac_res=\$$3
3050 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3051 printf "%s\n" "$ac_res" >&6; }
3052 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3053
3054 } # ac_fn_c_check_header_compile
3055
3056 # ac_fn_c_try_link LINENO
3057 # -----------------------
3058 # Try to link conftest.$ac_ext, and return whether this succeeded.
3059 ac_fn_c_try_link ()
3060 {
3061 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3062 rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
3063 if { { ac_try="$ac_link"
3064 case "(($ac_try" in
3065 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3066 *) ac_try_echo=$ac_try;;
3067 esac
3068 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3069 printf "%s\n" "$ac_try_echo"; } >&5
3070 (eval "$ac_link") 2>conftest.err
3071 ac_status=$?
3072 if test -s conftest.err; then
3073 grep -v '^ *+' conftest.err >conftest.er1
3074 cat conftest.er1 >&5
3075 mv -f conftest.er1 conftest.err
3076 fi
3077 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3078 test $ac_status = 0; } && {
3079 test -z "$ac_c_werror_flag" ||
3080 test ! -s conftest.err
3081 } && test -s conftest$ac_exeext && {
3082 test "$cross_compiling" = yes ||
3083 test -x conftest$ac_exeext
3084 }
3085 then :
3086 ac_retval=0
3087 else $as_nop
3088 printf "%s\n" "$as_me: failed program was:" >&5
3089 sed 's/^/| /' conftest.$ac_ext >&5
3090
3091 ac_retval=1
3092 fi
3093 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
3094 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
3095 # interfere with the next link command; also delete a directory that is
3096 # left behind by Apple's compiler. We do this before executing the actions.
3097 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
3098 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3099 as_fn_set_status $ac_retval
3100
3101 } # ac_fn_c_try_link
3102
3103 # ac_fn_c_try_cpp LINENO
3104 # ----------------------
3105 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
3106 ac_fn_c_try_cpp ()
3107 {
3108 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3109 if { { ac_try="$ac_cpp conftest.$ac_ext"
3110 case "(($ac_try" in
3111 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3112 *) ac_try_echo=$ac_try;;
3113 esac
3114 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3115 printf "%s\n" "$ac_try_echo"; } >&5
3116 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
3117 ac_status=$?
3118 if test -s conftest.err; then
3119 grep -v '^ *+' conftest.err >conftest.er1
3120 cat conftest.er1 >&5
3121 mv -f conftest.er1 conftest.err
3122 fi
3123 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3124 test $ac_status = 0; } > conftest.i && {
3125 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3126 test ! -s conftest.err
3127 }
3128 then :
3129 ac_retval=0
3130 else $as_nop
3131 printf "%s\n" "$as_me: failed program was:" >&5
3132 sed 's/^/| /' conftest.$ac_ext >&5
3133
3134 ac_retval=1
3135 fi
3136 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3137 as_fn_set_status $ac_retval
3138
3139 } # ac_fn_c_try_cpp
3140
3141 # ac_fn_cxx_try_compile LINENO
3142 # ----------------------------
3143 # Try to compile conftest.$ac_ext, and return whether this succeeded.
3144 ac_fn_cxx_try_compile ()
3145 {
3146 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3147 rm -f conftest.$ac_objext conftest.beam
3148 if { { ac_try="$ac_compile"
3149 case "(($ac_try" in
3150 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3151 *) ac_try_echo=$ac_try;;
3152 esac
3153 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3154 printf "%s\n" "$ac_try_echo"; } >&5
3155 (eval "$ac_compile") 2>conftest.err
3156 ac_status=$?
3157 if test -s conftest.err; then
3158 grep -v '^ *+' conftest.err >conftest.er1
3159 cat conftest.er1 >&5
3160 mv -f conftest.er1 conftest.err
3161 fi
3162 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3163 test $ac_status = 0; } && {
3164 test -z "$ac_cxx_werror_flag" ||
3165 test ! -s conftest.err
3166 } && test -s conftest.$ac_objext
3167 then :
3168 ac_retval=0
3169 else $as_nop
3170 printf "%s\n" "$as_me: failed program was:" >&5
3171 sed 's/^/| /' conftest.$ac_ext >&5
3172
3173 ac_retval=1
3174 fi
3175 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3176 as_fn_set_status $ac_retval
3177
3178 } # ac_fn_cxx_try_compile
3179
3180 # ac_fn_c_try_run LINENO
3181 # ----------------------
3182 # Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
3183 # executables *can* be run.
3184 ac_fn_c_try_run ()
3185 {
3186 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3187 if { { ac_try="$ac_link"
3188 case "(($ac_try" in
3189 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3190 *) ac_try_echo=$ac_try;;
3191 esac
3192 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3193 printf "%s\n" "$ac_try_echo"; } >&5
3194 (eval "$ac_link") 2>&5
3195 ac_status=$?
3196 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3197 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
3198 { { case "(($ac_try" in
3199 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3200 *) ac_try_echo=$ac_try;;
3201 esac
3202 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3203 printf "%s\n" "$ac_try_echo"; } >&5
3204 (eval "$ac_try") 2>&5
3205 ac_status=$?
3206 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3207 test $ac_status = 0; }; }
3208 then :
3209 ac_retval=0
3210 else $as_nop
3211 printf "%s\n" "$as_me: program exited with status $ac_status" >&5
3212 printf "%s\n" "$as_me: failed program was:" >&5
3213 sed 's/^/| /' conftest.$ac_ext >&5
3214
3215 ac_retval=$ac_status
3216 fi
3217 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
3218 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3219 as_fn_set_status $ac_retval
3220
3221 } # ac_fn_c_try_run
3222
3223 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
3224 # --------------------------------------------
3225 # Tries to find the compile-time value of EXPR in a program that includes
3226 # INCLUDES, setting VAR accordingly. Returns whether the value could be
3227 # computed
3228 ac_fn_c_compute_int ()
3229 {
3230 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3231 if test "$cross_compiling" = yes; then
3232 # Depending upon the size, compute the lo and hi bounds.
3233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3234 /* end confdefs.h. */
3235 $4
3236 int
3237 main (void)
3238 {
3239 static int test_array [1 - 2 * !(($2) >= 0)];
3240 test_array [0] = 0;
3241 return test_array [0];
3242
3243 ;
3244 return 0;
3245 }
3246 _ACEOF
3247 if ac_fn_c_try_compile "$LINENO"
3248 then :
3249 ac_lo=0 ac_mid=0
3250 while :; do
3251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3252 /* end confdefs.h. */
3253 $4
3254 int
3255 main (void)
3256 {
3257 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3258 test_array [0] = 0;
3259 return test_array [0];
3260
3261 ;
3262 return 0;
3263 }
3264 _ACEOF
3265 if ac_fn_c_try_compile "$LINENO"
3266 then :
3267 ac_hi=$ac_mid; break
3268 else $as_nop
3269 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
3270 if test $ac_lo -le $ac_mid; then
3271 ac_lo= ac_hi=
3272 break
3273 fi
3274 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
3275 fi
3276 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3277 done
3278 else $as_nop
3279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3280 /* end confdefs.h. */
3281 $4
3282 int
3283 main (void)
3284 {
3285 static int test_array [1 - 2 * !(($2) < 0)];
3286 test_array [0] = 0;
3287 return test_array [0];
3288
3289 ;
3290 return 0;
3291 }
3292 _ACEOF
3293 if ac_fn_c_try_compile "$LINENO"
3294 then :
3295 ac_hi=-1 ac_mid=-1
3296 while :; do
3297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3298 /* end confdefs.h. */
3299 $4
3300 int
3301 main (void)
3302 {
3303 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
3304 test_array [0] = 0;
3305 return test_array [0];
3306
3307 ;
3308 return 0;
3309 }
3310 _ACEOF
3311 if ac_fn_c_try_compile "$LINENO"
3312 then :
3313 ac_lo=$ac_mid; break
3314 else $as_nop
3315 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
3316 if test $ac_mid -le $ac_hi; then
3317 ac_lo= ac_hi=
3318 break
3319 fi
3320 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
3321 fi
3322 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3323 done
3324 else $as_nop
3325 ac_lo= ac_hi=
3326 fi
3327 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3328 fi
3329 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3330 # Binary search between lo and hi bounds.
3331 while test "x$ac_lo" != "x$ac_hi"; do
3332 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
3333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3334 /* end confdefs.h. */
3335 $4
3336 int
3337 main (void)
3338 {
3339 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3340 test_array [0] = 0;
3341 return test_array [0];
3342
3343 ;
3344 return 0;
3345 }
3346 _ACEOF
3347 if ac_fn_c_try_compile "$LINENO"
3348 then :
3349 ac_hi=$ac_mid
3350 else $as_nop
3351 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
3352 fi
3353 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3354 done
3355 case $ac_lo in #((
3356 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
3357 '') ac_retval=1 ;;
3358 esac
3359 else
3360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3361 /* end confdefs.h. */
3362 $4
3363 static long int longval (void) { return $2; }
3364 static unsigned long int ulongval (void) { return $2; }
3365 #include <stdio.h>
3366 #include <stdlib.h>
3367 int
3368 main (void)
3369 {
3370
3371 FILE *f = fopen ("conftest.val", "w");
3372 if (! f)
3373 return 1;
3374 if (($2) < 0)
3375 {
3376 long int i = longval ();
3377 if (i != ($2))
3378 return 1;
3379 fprintf (f, "%ld", i);
3380 }
3381 else
3382 {
3383 unsigned long int i = ulongval ();
3384 if (i != ($2))
3385 return 1;
3386 fprintf (f, "%lu", i);
3387 }
3388 /* Do not output a trailing newline, as this causes \r\n confusion
3389 on some platforms. */
3390 return ferror (f) || fclose (f) != 0;
3391
3392 ;
3393 return 0;
3394 }
3395 _ACEOF
3396 if ac_fn_c_try_run "$LINENO"
3397 then :
3398 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
3399 else $as_nop
3400 ac_retval=1
3401 fi
3402 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3403 conftest.$ac_objext conftest.beam conftest.$ac_ext
3404 rm -f conftest.val
3405
3406 fi
3407 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3408 as_fn_set_status $ac_retval
3409
3410 } # ac_fn_c_compute_int
3411
3412 # ac_fn_c_check_func LINENO FUNC VAR
3413 # ----------------------------------
3414 # Tests whether FUNC exists, setting the cache variable VAR accordingly
3415 ac_fn_c_check_func ()
3416 {
3417 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3418 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3419 printf %s "checking for $2... " >&6; }
3420 if eval test \${$3+y}
3421 then :
3422 printf %s "(cached) " >&6
3423 else $as_nop
3424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3425 /* end confdefs.h. */
3426 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
3427 For example, HP-UX 11i <limits.h> declares gettimeofday. */
3428 #define $2 innocuous_$2
3429
3430 /* System header to define __stub macros and hopefully few prototypes,
3431 which can conflict with char $2 (); below. */
3432
3433 #include <limits.h>
3434 #undef $2
3435
3436 /* Override any GCC internal prototype to avoid an error.
3437 Use char because int might match the return type of a GCC
3438 builtin and then its argument prototype would still apply. */
3439 #ifdef __cplusplus
3440 extern "C"
3441 #endif
3442 char $2 ();
3443 /* The GNU C library defines this for functions which it implements
3444 to always fail with ENOSYS. Some functions are actually named
3445 something starting with __ and the normal name is an alias. */
3446 #if defined __stub_$2 || defined __stub___$2
3447 choke me
3448 #endif
3449
3450 int
3451 main (void)
3452 {
3453 return $2 ();
3454 ;
3455 return 0;
3456 }
3457 _ACEOF
3458 if ac_fn_c_try_link "$LINENO"
3459 then :
3460 eval "$3=yes"
3461 else $as_nop
3462 eval "$3=no"
3463 fi
3464 rm -f core conftest.err conftest.$ac_objext conftest.beam \
3465 conftest$ac_exeext conftest.$ac_ext
3466 fi
3467 eval ac_res=\$$3
3468 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3469 printf "%s\n" "$ac_res" >&6; }
3470 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3471
3472 } # ac_fn_c_check_func
3473
3474 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
3475 # ----------------------------------------------------
3476 # Tries to find if the field MEMBER exists in type AGGR, after including
3477 # INCLUDES, setting cache variable VAR accordingly.
3478 ac_fn_c_check_member ()
3479 {
3480 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3481 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
3482 printf %s "checking for $2.$3... " >&6; }
3483 if eval test \${$4+y}
3484 then :
3485 printf %s "(cached) " >&6
3486 else $as_nop
3487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3488 /* end confdefs.h. */
3489 $5
3490 int
3491 main (void)
3492 {
3493 static $2 ac_aggr;
3494 if (ac_aggr.$3)
3495 return 0;
3496 ;
3497 return 0;
3498 }
3499 _ACEOF
3500 if ac_fn_c_try_compile "$LINENO"
3501 then :
3502 eval "$4=yes"
3503 else $as_nop
3504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3505 /* end confdefs.h. */
3506 $5
3507 int
3508 main (void)
3509 {
3510 static $2 ac_aggr;
3511 if (sizeof ac_aggr.$3)
3512 return 0;
3513 ;
3514 return 0;
3515 }
3516 _ACEOF
3517 if ac_fn_c_try_compile "$LINENO"
3518 then :
3519 eval "$4=yes"
3520 else $as_nop
3521 eval "$4=no"
3522 fi
3523 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3524 fi
3525 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3526 fi
3527 eval ac_res=\$$4
3528 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3529 printf "%s\n" "$ac_res" >&6; }
3530 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3531
3532 } # ac_fn_c_check_member
3533
3534 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
3535 # -------------------------------------------
3536 # Tests whether TYPE exists after having included INCLUDES, setting cache
3537 # variable VAR accordingly.
3538 ac_fn_c_check_type ()
3539 {
3540 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3541 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3542 printf %s "checking for $2... " >&6; }
3543 if eval test \${$3+y}
3544 then :
3545 printf %s "(cached) " >&6
3546 else $as_nop
3547 eval "$3=no"
3548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3549 /* end confdefs.h. */
3550 $4
3551 int
3552 main (void)
3553 {
3554 if (sizeof ($2))
3555 return 0;
3556 ;
3557 return 0;
3558 }
3559 _ACEOF
3560 if ac_fn_c_try_compile "$LINENO"
3561 then :
3562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3563 /* end confdefs.h. */
3564 $4
3565 int
3566 main (void)
3567 {
3568 if (sizeof (($2)))
3569 return 0;
3570 ;
3571 return 0;
3572 }
3573 _ACEOF
3574 if ac_fn_c_try_compile "$LINENO"
3575 then :
3576
3577 else $as_nop
3578 eval "$3=yes"
3579 fi
3580 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3581 fi
3582 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3583 fi
3584 eval ac_res=\$$3
3585 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3586 printf "%s\n" "$ac_res" >&6; }
3587 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3588
3589 } # ac_fn_c_check_type
3590
3591 # ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR
3592 # ------------------------------------------------------------------
3593 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
3594 # accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR.
3595 ac_fn_check_decl ()
3596 {
3597 ac_save_ac_compile="$ac_compile"
3598 if test -n "$ac_compile_for_check_decl"; then
3599 ac_compile="$ac_compile_for_check_decl"
3600 fi
3601 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3602 as_decl_name=`echo $2|sed 's/ *(.*//'`
3603 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
3604 printf %s "checking whether $as_decl_name is declared... " >&6; }
3605 if eval test \${$3+y}
3606 then :
3607 printf %s "(cached) " >&6
3608 else $as_nop
3609 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
3610 eval ac_save_FLAGS=\$$6
3611 as_fn_append $6 " $5"
3612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3613 /* end confdefs.h. */
3614 $4
3615 int
3616 main (void)
3617 {
3618 #ifndef $as_decl_name
3619 #ifdef __cplusplus
3620 (void) $as_decl_use;
3621 #else
3622 (void) $as_decl_name;
3623 #endif
3624 #endif
3625
3626 ;
3627 return 0;
3628 }
3629 _ACEOF
3630 if ac_fn_c_try_compile "$LINENO"
3631 then :
3632 eval "$3=yes"
3633 else $as_nop
3634 eval "$3=no"
3635 fi
3636 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3637 eval $6=\$ac_save_FLAGS
3638
3639 fi
3640 eval ac_res=\$$3
3641 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3642 printf "%s\n" "$ac_res" >&6; }
3643 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3644 ac_compile="$ac_save_ac_compile"
3645
3646 } # ac_fn_check_decl
3647 ac_configure_args_raw=
3648 for ac_arg
3649 do
3650 case $ac_arg in
3651 *\'*)
3652 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3653 esac
3654 as_fn_append ac_configure_args_raw " '$ac_arg'"
3655 done
3656
3657 case $ac_configure_args_raw in
3658 *$as_nl*)
3659 ac_safe_unquote= ;;
3660 *)
3661 ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab.
3662 ac_unsafe_a="$ac_unsafe_z#~"
3663 ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
3664 ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
3665 esac
3666
3667 cat >config.log <<_ACEOF
3668 This file contains any messages produced by compilers while
3669 running configure, to aid debugging if configure makes a mistake.
3670
3671 It was created by GRUB $as_me 2.14, which was
3672 generated by GNU Autoconf 2.71. Invocation command line was
3673
3674 $ $0$ac_configure_args_raw
3675
3676 _ACEOF
3677 exec 5>>config.log
3678 {
3679 cat <<_ASUNAME
3680 ## --------- ##
3681 ## Platform. ##
3682 ## --------- ##
3683
3684 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3685 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3686 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3687 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3688 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3689
3690 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3691 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
3692
3693 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
3694 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
3695 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3696 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
3697 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
3698 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
3699 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
3700
3701 _ASUNAME
3702
3703 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3704 for as_dir in $PATH
3705 do
3706 IFS=$as_save_IFS
3707 case $as_dir in #(((
3708 '') as_dir=./ ;;
3709 */) ;;
3710 *) as_dir=$as_dir/ ;;
3711 esac
3712 printf "%s\n" "PATH: $as_dir"
3713 done
3714 IFS=$as_save_IFS
3715
3716 } >&5
3717
3718 cat >&5 <<_ACEOF
3719
3720
3721 ## ----------- ##
3722 ## Core tests. ##
3723 ## ----------- ##
3724
3725 _ACEOF
3726
3727
3728 # Keep a trace of the command line.
3729 # Strip out --no-create and --no-recursion so they do not pile up.
3730 # Strip out --silent because we don't want to record it for future runs.
3731 # Also quote any args containing shell meta-characters.
3732 # Make two passes to allow for proper duplicate-argument suppression.
3733 ac_configure_args=
3734 ac_configure_args0=
3735 ac_configure_args1=
3736 ac_must_keep_next=false
3737 for ac_pass in 1 2
3738 do
3739 for ac_arg
3740 do
3741 case $ac_arg in
3742 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3743 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3744 | -silent | --silent | --silen | --sile | --sil)
3745 continue ;;
3746 *\'*)
3747 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3748 esac
3749 case $ac_pass in
3750 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3751 2)
3752 as_fn_append ac_configure_args1 " '$ac_arg'"
3753 if test $ac_must_keep_next = true; then
3754 ac_must_keep_next=false # Got value, back to normal.
3755 else
3756 case $ac_arg in
3757 *=* | --config-cache | -C | -disable-* | --disable-* \
3758 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3759 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3760 | -with-* | --with-* | -without-* | --without-* | --x)
3761 case "$ac_configure_args0 " in
3762 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3763 esac
3764 ;;
3765 -* ) ac_must_keep_next=true ;;
3766 esac
3767 fi
3768 as_fn_append ac_configure_args " '$ac_arg'"
3769 ;;
3770 esac
3771 done
3772 done
3773 { ac_configure_args0=; unset ac_configure_args0;}
3774 { ac_configure_args1=; unset ac_configure_args1;}
3775
3776 # When interrupted or exit'd, cleanup temporary files, and complete
3777 # config.log. We remove comments because anyway the quotes in there
3778 # would cause problems or look ugly.
3779 # WARNING: Use '\'' to represent an apostrophe within the trap.
3780 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3781 trap 'exit_status=$?
3782 # Sanitize IFS.
3783 IFS=" "" $as_nl"
3784 # Save into config.log some information that might help in debugging.
3785 {
3786 echo
3787
3788 printf "%s\n" "## ---------------- ##
3789 ## Cache variables. ##
3790 ## ---------------- ##"
3791 echo
3792 # The following way of writing the cache mishandles newlines in values,
3793 (
3794 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3795 eval ac_val=\$$ac_var
3796 case $ac_val in #(
3797 *${as_nl}*)
3798 case $ac_var in #(
3799 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3800 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3801 esac
3802 case $ac_var in #(
3803 _ | IFS | as_nl) ;; #(
3804 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3805 *) { eval $ac_var=; unset $ac_var;} ;;
3806 esac ;;
3807 esac
3808 done
3809 (set) 2>&1 |
3810 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3811 *${as_nl}ac_space=\ *)
3812 sed -n \
3813 "s/'\''/'\''\\\\'\'''\''/g;
3814 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3815 ;; #(
3816 *)
3817 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3818 ;;
3819 esac |
3820 sort
3821 )
3822 echo
3823
3824 printf "%s\n" "## ----------------- ##
3825 ## Output variables. ##
3826 ## ----------------- ##"
3827 echo
3828 for ac_var in $ac_subst_vars
3829 do
3830 eval ac_val=\$$ac_var
3831 case $ac_val in
3832 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3833 esac
3834 printf "%s\n" "$ac_var='\''$ac_val'\''"
3835 done | sort
3836 echo
3837
3838 if test -n "$ac_subst_files"; then
3839 printf "%s\n" "## ------------------- ##
3840 ## File substitutions. ##
3841 ## ------------------- ##"
3842 echo
3843 for ac_var in $ac_subst_files
3844 do
3845 eval ac_val=\$$ac_var
3846 case $ac_val in
3847 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3848 esac
3849 printf "%s\n" "$ac_var='\''$ac_val'\''"
3850 done | sort
3851 echo
3852 fi
3853
3854 if test -s confdefs.h; then
3855 printf "%s\n" "## ----------- ##
3856 ## confdefs.h. ##
3857 ## ----------- ##"
3858 echo
3859 cat confdefs.h
3860 echo
3861 fi
3862 test "$ac_signal" != 0 &&
3863 printf "%s\n" "$as_me: caught signal $ac_signal"
3864 printf "%s\n" "$as_me: exit $exit_status"
3865 } >&5
3866 rm -f core *.core core.conftest.* &&
3867 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3868 exit $exit_status
3869 ' 0
3870 for ac_signal in 1 2 13 15; do
3871 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3872 done
3873 ac_signal=0
3874
3875 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3876 rm -f -r conftest* confdefs.h
3877
3878 printf "%s\n" "/* confdefs.h */" > confdefs.h
3879
3880 # Predefined preprocessor variables.
3881
3882 printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
3883
3884 printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
3885
3886 printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
3887
3888 printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
3889
3890 printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
3891
3892 printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
3893
3894
3895 # Let the site file select an alternate cache file if it wants to.
3896 # Prefer an explicitly selected file to automatically selected ones.
3897 if test -n "$CONFIG_SITE"; then
3898 ac_site_files="$CONFIG_SITE"
3899 elif test "x$prefix" != xNONE; then
3900 ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
3901 else
3902 ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
3903 fi
3904
3905 for ac_site_file in $ac_site_files
3906 do
3907 case $ac_site_file in #(
3908 */*) :
3909 ;; #(
3910 *) :
3911 ac_site_file=./$ac_site_file ;;
3912 esac
3913 if test -f "$ac_site_file" && test -r "$ac_site_file"; then
3914 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3915 printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
3916 sed 's/^/| /' "$ac_site_file" >&5
3917 . "$ac_site_file" \
3918 || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3919 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3920 as_fn_error $? "failed to load site script $ac_site_file
3921 See \`config.log' for more details" "$LINENO" 5; }
3922 fi
3923 done
3924
3925 if test -r "$cache_file"; then
3926 # Some versions of bash will fail to source /dev/null (special files
3927 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3928 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3929 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3930 printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
3931 case $cache_file in
3932 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3933 *) . "./$cache_file";;
3934 esac
3935 fi
3936 else
3937 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3938 printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
3939 >$cache_file
3940 fi
3941
3942 as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
3943 # Test code for whether the C compiler supports C89 (global declarations)
3944 ac_c_conftest_c89_globals='
3945 /* Does the compiler advertise C89 conformance?
3946 Do not test the value of __STDC__, because some compilers set it to 0
3947 while being otherwise adequately conformant. */
3948 #if !defined __STDC__
3949 # error "Compiler does not advertise C89 conformance"
3950 #endif
3951
3952 #include <stddef.h>
3953 #include <stdarg.h>
3954 struct stat;
3955 /* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */
3956 struct buf { int x; };
3957 struct buf * (*rcsopen) (struct buf *, struct stat *, int);
3958 static char *e (p, i)
3959 char **p;
3960 int i;
3961 {
3962 return p[i];
3963 }
3964 static char *f (char * (*g) (char **, int), char **p, ...)
3965 {
3966 char *s;
3967 va_list v;
3968 va_start (v,p);
3969 s = g (p, va_arg (v,int));
3970 va_end (v);
3971 return s;
3972 }
3973
3974 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3975 function prototypes and stuff, but not \xHH hex character constants.
3976 These do not provoke an error unfortunately, instead are silently treated
3977 as an "x". The following induces an error, until -std is added to get
3978 proper ANSI mode. Curiously \x00 != x always comes out true, for an
3979 array size at least. It is necessary to write \x00 == 0 to get something
3980 that is true only with -std. */
3981 int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
3982
3983 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3984 inside strings and character constants. */
3985 #define FOO(x) '\''x'\''
3986 int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
3987
3988 int test (int i, double x);
3989 struct s1 {int (*f) (int a);};
3990 struct s2 {int (*f) (double a);};
3991 int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
3992 int, int);'
3993
3994 # Test code for whether the C compiler supports C89 (body of main).
3995 ac_c_conftest_c89_main='
3996 ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
3997 '
3998
3999 # Test code for whether the C compiler supports C99 (global declarations)
4000 ac_c_conftest_c99_globals='
4001 // Does the compiler advertise C99 conformance?
4002 #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
4003 # error "Compiler does not advertise C99 conformance"
4004 #endif
4005
4006 #include <stdbool.h>
4007 extern int puts (const char *);
4008 extern int printf (const char *, ...);
4009 extern int dprintf (int, const char *, ...);
4010 extern void *malloc (size_t);
4011
4012 // Check varargs macros. These examples are taken from C99 6.10.3.5.
4013 // dprintf is used instead of fprintf to avoid needing to declare
4014 // FILE and stderr.
4015 #define debug(...) dprintf (2, __VA_ARGS__)
4016 #define showlist(...) puts (#__VA_ARGS__)
4017 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4018 static void
4019 test_varargs_macros (void)
4020 {
4021 int x = 1234;
4022 int y = 5678;
4023 debug ("Flag");
4024 debug ("X = %d\n", x);
4025 showlist (The first, second, and third items.);
4026 report (x>y, "x is %d but y is %d", x, y);
4027 }
4028
4029 // Check long long types.
4030 #define BIG64 18446744073709551615ull
4031 #define BIG32 4294967295ul
4032 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4033 #if !BIG_OK
4034 #error "your preprocessor is broken"
4035 #endif
4036 #if BIG_OK
4037 #else
4038 #error "your preprocessor is broken"
4039 #endif
4040 static long long int bignum = -9223372036854775807LL;
4041 static unsigned long long int ubignum = BIG64;
4042
4043 struct incomplete_array
4044 {
4045 int datasize;
4046 double data[];
4047 };
4048
4049 struct named_init {
4050 int number;
4051 const wchar_t *name;
4052 double average;
4053 };
4054
4055 typedef const char *ccp;
4056
4057 static inline int
4058 test_restrict (ccp restrict text)
4059 {
4060 // See if C++-style comments work.
4061 // Iterate through items via the restricted pointer.
4062 // Also check for declarations in for loops.
4063 for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
4064 continue;
4065 return 0;
4066 }
4067
4068 // Check varargs and va_copy.
4069 static bool
4070 test_varargs (const char *format, ...)
4071 {
4072 va_list args;
4073 va_start (args, format);
4074 va_list args_copy;
4075 va_copy (args_copy, args);
4076
4077 const char *str = "";
4078 int number = 0;
4079 float fnumber = 0;
4080
4081 while (*format)
4082 {
4083 switch (*format++)
4084 {
4085 case '\''s'\'': // string
4086 str = va_arg (args_copy, const char *);
4087 break;
4088 case '\''d'\'': // int
4089 number = va_arg (args_copy, int);
4090 break;
4091 case '\''f'\'': // float
4092 fnumber = va_arg (args_copy, double);
4093 break;
4094 default:
4095 break;
4096 }
4097 }
4098 va_end (args_copy);
4099 va_end (args);
4100
4101 return *str && number && fnumber;
4102 }
4103 '
4104
4105 # Test code for whether the C compiler supports C99 (body of main).
4106 ac_c_conftest_c99_main='
4107 // Check bool.
4108 _Bool success = false;
4109 success |= (argc != 0);
4110
4111 // Check restrict.
4112 if (test_restrict ("String literal") == 0)
4113 success = true;
4114 char *restrict newvar = "Another string";
4115
4116 // Check varargs.
4117 success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
4118 test_varargs_macros ();
4119
4120 // Check flexible array members.
4121 struct incomplete_array *ia =
4122 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4123 ia->datasize = 10;
4124 for (int i = 0; i < ia->datasize; ++i)
4125 ia->data[i] = i * 1.234;
4126
4127 // Check named initializers.
4128 struct named_init ni = {
4129 .number = 34,
4130 .name = L"Test wide string",
4131 .average = 543.34343,
4132 };
4133
4134 ni.number = 58;
4135
4136 int dynamic_array[ni.number];
4137 dynamic_array[0] = argv[0][0];
4138 dynamic_array[ni.number - 1] = 543;
4139
4140 // work around unused variable warnings
4141 ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
4142 || dynamic_array[ni.number - 1] != 543);
4143 '
4144
4145 # Test code for whether the C compiler supports C11 (global declarations)
4146 ac_c_conftest_c11_globals='
4147 // Does the compiler advertise C11 conformance?
4148 #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
4149 # error "Compiler does not advertise C11 conformance"
4150 #endif
4151
4152 // Check _Alignas.
4153 char _Alignas (double) aligned_as_double;
4154 char _Alignas (0) no_special_alignment;
4155 extern char aligned_as_int;
4156 char _Alignas (0) _Alignas (int) aligned_as_int;
4157
4158 // Check _Alignof.
4159 enum
4160 {
4161 int_alignment = _Alignof (int),
4162 int_array_alignment = _Alignof (int[100]),
4163 char_alignment = _Alignof (char)
4164 };
4165 _Static_assert (0 < -_Alignof (int), "_Alignof is signed");
4166
4167 // Check _Noreturn.
4168 int _Noreturn does_not_return (void) { for (;;) continue; }
4169
4170 // Check _Static_assert.
4171 struct test_static_assert
4172 {
4173 int x;
4174 _Static_assert (sizeof (int) <= sizeof (long int),
4175 "_Static_assert does not work in struct");
4176 long int y;
4177 };
4178
4179 // Check UTF-8 literals.
4180 #define u8 syntax error!
4181 char const utf8_literal[] = u8"happens to be ASCII" "another string";
4182
4183 // Check duplicate typedefs.
4184 typedef long *long_ptr;
4185 typedef long int *long_ptr;
4186 typedef long_ptr long_ptr;
4187
4188 // Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
4189 struct anonymous
4190 {
4191 union {
4192 struct { int i; int j; };
4193 struct { int k; long int l; } w;
4194 };
4195 int m;
4196 } v1;
4197 '
4198
4199 # Test code for whether the C compiler supports C11 (body of main).
4200 ac_c_conftest_c11_main='
4201 _Static_assert ((offsetof (struct anonymous, i)
4202 == offsetof (struct anonymous, w.k)),
4203 "Anonymous union alignment botch");
4204 v1.i = 2;
4205 v1.w.k = 5;
4206 ok |= v1.i != 5;
4207 '
4208
4209 # Test code for whether the C compiler supports C11 (complete).
4210 ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
4211 ${ac_c_conftest_c99_globals}
4212 ${ac_c_conftest_c11_globals}
4213
4214 int
4215 main (int argc, char **argv)
4216 {
4217 int ok = 0;
4218 ${ac_c_conftest_c89_main}
4219 ${ac_c_conftest_c99_main}
4220 ${ac_c_conftest_c11_main}
4221 return ok;
4222 }
4223 "
4224
4225 # Test code for whether the C compiler supports C99 (complete).
4226 ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
4227 ${ac_c_conftest_c99_globals}
4228
4229 int
4230 main (int argc, char **argv)
4231 {
4232 int ok = 0;
4233 ${ac_c_conftest_c89_main}
4234 ${ac_c_conftest_c99_main}
4235 return ok;
4236 }
4237 "
4238
4239 # Test code for whether the C compiler supports C89 (complete).
4240 ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
4241
4242 int
4243 main (int argc, char **argv)
4244 {
4245 int ok = 0;
4246 ${ac_c_conftest_c89_main}
4247 return ok;
4248 }
4249 "
4250
4251 as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
4252 as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
4253 as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
4254 as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
4255 as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
4256 as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
4257 as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
4258 as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
4259 as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H"
4260 as_fn_append ac_header_c_list " minix/config.h minix_config_h HAVE_MINIX_CONFIG_H"
4261 # Test code for whether the C++ compiler supports C++98 (global declarations)
4262 ac_cxx_conftest_cxx98_globals='
4263 // Does the compiler advertise C++98 conformance?
4264 #if !defined __cplusplus || __cplusplus < 199711L
4265 # error "Compiler does not advertise C++98 conformance"
4266 #endif
4267
4268 // These inclusions are to reject old compilers that
4269 // lack the unsuffixed header files.
4270 #include <cstdlib>
4271 #include <exception>
4272
4273 // <cassert> and <cstring> are *not* freestanding headers in C++98.
4274 extern void assert (int);
4275 namespace std {
4276 extern int strcmp (const char *, const char *);
4277 }
4278
4279 // Namespaces, exceptions, and templates were all added after "C++ 2.0".
4280 using std::exception;
4281 using std::strcmp;
4282
4283 namespace {
4284
4285 void test_exception_syntax()
4286 {
4287 try {
4288 throw "test";
4289 } catch (const char *s) {
4290 // Extra parentheses suppress a warning when building autoconf itself,
4291 // due to lint rules shared with more typical C programs.
4292 assert (!(strcmp) (s, "test"));
4293 }
4294 }
4295
4296 template <typename T> struct test_template
4297 {
4298 T const val;
4299 explicit test_template(T t) : val(t) {}
4300 template <typename U> T add(U u) { return static_cast<T>(u) + val; }
4301 };
4302
4303 } // anonymous namespace
4304 '
4305
4306 # Test code for whether the C++ compiler supports C++98 (body of main)
4307 ac_cxx_conftest_cxx98_main='
4308 assert (argc);
4309 assert (! argv[0]);
4310 {
4311 test_exception_syntax ();
4312 test_template<double> tt (2.0);
4313 assert (tt.add (4) == 6.0);
4314 assert (true && !false);
4315 }
4316 '
4317
4318 # Test code for whether the C++ compiler supports C++11 (global declarations)
4319 ac_cxx_conftest_cxx11_globals='
4320 // Does the compiler advertise C++ 2011 conformance?
4321 #if !defined __cplusplus || __cplusplus < 201103L
4322 # error "Compiler does not advertise C++11 conformance"
4323 #endif
4324
4325 namespace cxx11test
4326 {
4327 constexpr int get_val() { return 20; }
4328
4329 struct testinit
4330 {
4331 int i;
4332 double d;
4333 };
4334
4335 class delegate
4336 {
4337 public:
4338 delegate(int n) : n(n) {}
4339 delegate(): delegate(2354) {}
4340
4341 virtual int getval() { return this->n; };
4342 protected:
4343 int n;
4344 };
4345
4346 class overridden : public delegate
4347 {
4348 public:
4349 overridden(int n): delegate(n) {}
4350 virtual int getval() override final { return this->n * 2; }
4351 };
4352
4353 class nocopy
4354 {
4355 public:
4356 nocopy(int i): i(i) {}
4357 nocopy() = default;
4358 nocopy(const nocopy&) = delete;
4359 nocopy & operator=(const nocopy&) = delete;
4360 private:
4361 int i;
4362 };
4363
4364 // for testing lambda expressions
4365 template <typename Ret, typename Fn> Ret eval(Fn f, Ret v)
4366 {
4367 return f(v);
4368 }
4369
4370 // for testing variadic templates and trailing return types
4371 template <typename V> auto sum(V first) -> V
4372 {
4373 return first;
4374 }
4375 template <typename V, typename... Args> auto sum(V first, Args... rest) -> V
4376 {
4377 return first + sum(rest...);
4378 }
4379 }
4380 '
4381
4382 # Test code for whether the C++ compiler supports C++11 (body of main)
4383 ac_cxx_conftest_cxx11_main='
4384 {
4385 // Test auto and decltype
4386 auto a1 = 6538;
4387 auto a2 = 48573953.4;
4388 auto a3 = "String literal";
4389
4390 int total = 0;
4391 for (auto i = a3; *i; ++i) { total += *i; }
4392
4393 decltype(a2) a4 = 34895.034;
4394 }
4395 {
4396 // Test constexpr
4397 short sa[cxx11test::get_val()] = { 0 };
4398 }
4399 {
4400 // Test initializer lists
4401 cxx11test::testinit il = { 4323, 435234.23544 };
4402 }
4403 {
4404 // Test range-based for
4405 int array[] = {9, 7, 13, 15, 4, 18, 12, 10, 5, 3,
4406 14, 19, 17, 8, 6, 20, 16, 2, 11, 1};
4407 for (auto &x : array) { x += 23; }
4408 }
4409 {
4410 // Test lambda expressions
4411 using cxx11test::eval;
4412 assert (eval ([](int x) { return x*2; }, 21) == 42);
4413 double d = 2.0;
4414 assert (eval ([&](double x) { return d += x; }, 3.0) == 5.0);
4415 assert (d == 5.0);
4416 assert (eval ([=](double x) mutable { return d += x; }, 4.0) == 9.0);
4417 assert (d == 5.0);
4418 }
4419 {
4420 // Test use of variadic templates
4421 using cxx11test::sum;
4422 auto a = sum(1);
4423 auto b = sum(1, 2);
4424 auto c = sum(1.0, 2.0, 3.0);
4425 }
4426 {
4427 // Test constructor delegation
4428 cxx11test::delegate d1;
4429 cxx11test::delegate d2();
4430 cxx11test::delegate d3(45);
4431 }
4432 {
4433 // Test override and final
4434 cxx11test::overridden o1(55464);
4435 }
4436 {
4437 // Test nullptr
4438 char *c = nullptr;
4439 }
4440 {
4441 // Test template brackets
4442 test_template<::test_template<int>> v(test_template<int>(12));
4443 }
4444 {
4445 // Unicode literals
4446 char const *utf8 = u8"UTF-8 string \u2500";
4447 char16_t const *utf16 = u"UTF-8 string \u2500";
4448 char32_t const *utf32 = U"UTF-32 string \u2500";
4449 }
4450 '
4451
4452 # Test code for whether the C compiler supports C++11 (complete).
4453 ac_cxx_conftest_cxx11_program="${ac_cxx_conftest_cxx98_globals}
4454 ${ac_cxx_conftest_cxx11_globals}
4455
4456 int
4457 main (int argc, char **argv)
4458 {
4459 int ok = 0;
4460 ${ac_cxx_conftest_cxx98_main}
4461 ${ac_cxx_conftest_cxx11_main}
4462 return ok;
4463 }
4464 "
4465
4466 # Test code for whether the C compiler supports C++98 (complete).
4467 ac_cxx_conftest_cxx98_program="${ac_cxx_conftest_cxx98_globals}
4468 int
4469 main (int argc, char **argv)
4470 {
4471 int ok = 0;
4472 ${ac_cxx_conftest_cxx98_main}
4473 return ok;
4474 }
4475 "
4476
4477 gt_needs="$gt_needs "
4478 as_fn_append ac_func_c_list " flockfile HAVE_FLOCKFILE"
4479 as_fn_append ac_func_c_list " funlockfile HAVE_FUNLOCKFILE"
4480 as_fn_append ac_header_c_list " features.h features_h HAVE_FEATURES_H"
4481 as_fn_append ac_header_c_list " linewrap.h linewrap_h HAVE_LINEWRAP_H"
4482 as_fn_append ac_func_c_list " btowc HAVE_BTOWC"
4483 as_fn_append ac_header_c_list " sys/param.h sys_param_h HAVE_SYS_PARAM_H"
4484 as_fn_append ac_func_c_list " _set_invalid_parameter_handler HAVE__SET_INVALID_PARAMETER_HANDLER"
4485 as_fn_append ac_header_c_list " sys/socket.h sys_socket_h HAVE_SYS_SOCKET_H"
4486 as_fn_append ac_func_c_list " fchdir HAVE_FCHDIR"
4487 as_fn_append ac_header_c_list " dirent.h dirent_h HAVE_DIRENT_H"
4488 as_fn_append ac_func_c_list " fcntl HAVE_FCNTL"
4489 as_fn_append ac_func_c_list " symlink HAVE_SYMLINK"
4490 as_fn_append ac_func_c_list " mempcpy HAVE_MEMPCPY"
4491 as_fn_append ac_header_c_list " fnmatch.h fnmatch_h HAVE_FNMATCH_H"
4492 as_fn_append ac_func_c_list " fnmatch HAVE_FNMATCH"
4493 as_fn_append ac_func_c_list " mbsrtowcs HAVE_MBSRTOWCS"
4494 as_fn_append ac_func_c_list " getdelim HAVE_GETDELIM"
4495 as_fn_append ac_func_c_list " getdtablesize HAVE_GETDTABLESIZE"
4496 gl_getopt_required=GNU
4497 as_fn_append ac_header_c_list " getopt.h getopt_h HAVE_GETOPT_H"
4498 as_fn_append ac_header_c_list " sys/cdefs.h sys_cdefs_h HAVE_SYS_CDEFS_H"
4499 as_fn_append ac_func_c_list " getprogname HAVE_GETPROGNAME"
4500 as_fn_append ac_func_c_list " getexecname HAVE_GETEXECNAME"
4501 as_fn_append ac_header_c_list " threads.h threads_h HAVE_THREADS_H"
4502 as_fn_append ac_header_c_list " limits.h limits_h HAVE_LIMITS_H"
4503 as_fn_append ac_func_c_list " isblank HAVE_ISBLANK"
4504 as_fn_append ac_header_c_list " langinfo.h langinfo_h HAVE_LANGINFO_H"
4505 as_fn_append ac_header_c_list " xlocale.h xlocale_h HAVE_XLOCALE_H"
4506 as_fn_append ac_func_c_list " mbsinit HAVE_MBSINIT"
4507 as_fn_append ac_func_c_list " mbrtowc HAVE_MBRTOWC"
4508 as_fn_append ac_func_c_list " isascii HAVE_ISASCII"
4509 as_fn_append ac_header_c_list " sys/mman.h sys_mman_h HAVE_SYS_MMAN_H"
4510 as_fn_append ac_func_c_list " mprotect HAVE_MPROTECT"
4511 as_fn_append ac_func_c_list " nl_langinfo HAVE_NL_LANGINFO"
4512 as_fn_append ac_func_c_list " lstat HAVE_LSTAT"
4513 as_fn_append ac_func_c_list " openat HAVE_OPENAT"
4514 as_fn_append ac_func_c_list " pipe HAVE_PIPE"
4515 as_fn_append ac_header_c_list " malloc.h malloc_h HAVE_MALLOC_H"
4516 as_fn_append ac_func_c_list " iswctype HAVE_ISWCTYPE"
4517 as_fn_append ac_func_c_list " sleep HAVE_SLEEP"
4518 as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H"
4519 as_fn_append ac_func_c_list " strndup HAVE_STRNDUP"
4520 as_fn_append ac_header_c_list " sysexits.h sysexits_h HAVE_SYSEXITS_H"
4521 as_fn_append ac_func_c_list " vasnprintf HAVE_VASNPRINTF"
4522 as_fn_append ac_func_c_list " snprintf HAVE_SNPRINTF"
4523 as_fn_append ac_header_c_list " crtdefs.h crtdefs_h HAVE_CRTDEFS_H"
4524 as_fn_append ac_func_c_list " wcrtomb HAVE_WCRTOMB"
4525 as_fn_append ac_func_c_list " iswcntrl HAVE_ISWCNTRL"
4526 as_fn_append ac_header_c_list " wctype.h wctype_h HAVE_WCTYPE_H"
4527 as_fn_append ac_func_c_list " wcwidth HAVE_WCWIDTH"
4528 as_fn_append ac_func_c_list " wmempcpy HAVE_WMEMPCPY"
4529
4530 # Auxiliary files required by this configure script.
4531 ac_aux_files="config.rpath missing install-sh config.guess config.sub compile"
4532
4533 # Locations in which to look for auxiliary files.
4534 ac_aux_dir_candidates="${srcdir}/build-aux"
4535
4536 # Search for a directory containing all of the required auxiliary files,
4537 # $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates.
4538 # If we don't find one directory that contains all the files we need,
4539 # we report the set of missing files from the *first* directory in
4540 # $ac_aux_dir_candidates and give up.
4541 ac_missing_aux_files=""
4542 ac_first_candidate=:
4543 printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5
4544 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4545 as_found=false
4546 for as_dir in $ac_aux_dir_candidates
4547 do
4548 IFS=$as_save_IFS
4549 case $as_dir in #(((
4550 '') as_dir=./ ;;
4551 */) ;;
4552 *) as_dir=$as_dir/ ;;
4553 esac
4554 as_found=:
4555
4556 printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5
4557 ac_aux_dir_found=yes
4558 ac_install_sh=
4559 for ac_aux in $ac_aux_files
4560 do
4561 # As a special case, if "install-sh" is required, that requirement
4562 # can be satisfied by any of "install-sh", "install.sh", or "shtool",
4563 # and $ac_install_sh is set appropriately for whichever one is found.
4564 if test x"$ac_aux" = x"install-sh"
4565 then
4566 if test -f "${as_dir}install-sh"; then
4567 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5
4568 ac_install_sh="${as_dir}install-sh -c"
4569 elif test -f "${as_dir}install.sh"; then
4570 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5
4571 ac_install_sh="${as_dir}install.sh -c"
4572 elif test -f "${as_dir}shtool"; then
4573 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5
4574 ac_install_sh="${as_dir}shtool install -c"
4575 else
4576 ac_aux_dir_found=no
4577 if $ac_first_candidate; then
4578 ac_missing_aux_files="${ac_missing_aux_files} install-sh"
4579 else
4580 break
4581 fi
4582 fi
4583 else
4584 if test -f "${as_dir}${ac_aux}"; then
4585 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5
4586 else
4587 ac_aux_dir_found=no
4588 if $ac_first_candidate; then
4589 ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}"
4590 else
4591 break
4592 fi
4593 fi
4594 fi
4595 done
4596 if test "$ac_aux_dir_found" = yes; then
4597 ac_aux_dir="$as_dir"
4598 break
4599 fi
4600 ac_first_candidate=false
4601
4602 as_found=false
4603 done
4604 IFS=$as_save_IFS
4605 if $as_found
4606 then :
4607
4608 else $as_nop
4609 as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5
4610 fi
4611
4612
4613 # These three variables are undocumented and unsupported,
4614 # and are intended to be withdrawn in a future Autoconf release.
4615 # They can cause serious problems if a builder's source tree is in a directory
4616 # whose full name contains unusual characters.
4617 if test -f "${ac_aux_dir}config.guess"; then
4618 ac_config_guess="$SHELL ${ac_aux_dir}config.guess"
4619 fi
4620 if test -f "${ac_aux_dir}config.sub"; then
4621 ac_config_sub="$SHELL ${ac_aux_dir}config.sub"
4622 fi
4623 if test -f "$ac_aux_dir/configure"; then
4624 ac_configure="$SHELL ${ac_aux_dir}configure"
4625 fi
4626
4627 # Check that the precious variables saved in the cache have kept the same
4628 # value.
4629 ac_cache_corrupted=false
4630 for ac_var in $ac_precious_vars; do
4631 eval ac_old_set=\$ac_cv_env_${ac_var}_set
4632 eval ac_new_set=\$ac_env_${ac_var}_set
4633 eval ac_old_val=\$ac_cv_env_${ac_var}_value
4634 eval ac_new_val=\$ac_env_${ac_var}_value
4635 case $ac_old_set,$ac_new_set in
4636 set,)
4637 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
4638 printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
4639 ac_cache_corrupted=: ;;
4640 ,set)
4641 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
4642 printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
4643 ac_cache_corrupted=: ;;
4644 ,);;
4645 *)
4646 if test "x$ac_old_val" != "x$ac_new_val"; then
4647 # differences in whitespace do not lead to failure.
4648 ac_old_val_w=`echo x $ac_old_val`
4649 ac_new_val_w=`echo x $ac_new_val`
4650 if test "$ac_old_val_w" != "$ac_new_val_w"; then
4651 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
4652 printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
4653 ac_cache_corrupted=:
4654 else
4655 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
4656 printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
4657 eval $ac_var=\$ac_old_val
4658 fi
4659 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
4660 printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;}
4661 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
4662 printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;}
4663 fi;;
4664 esac
4665 # Pass precious variables to config.status.
4666 if test "$ac_new_set" = set; then
4667 case $ac_new_val in
4668 *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
4669 *) ac_arg=$ac_var=$ac_new_val ;;
4670 esac
4671 case " $ac_configure_args " in
4672 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
4673 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
4674 esac
4675 fi
4676 done
4677 if $ac_cache_corrupted; then
4678 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4679 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4680 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
4681 printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
4682 as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
4683 and start over" "$LINENO" 5
4684 fi
4685 ## -------------------- ##
4686 ## Main body of script. ##
4687 ## -------------------- ##
4688
4689 ac_ext=c
4690 ac_cpp='$CPP $CPPFLAGS'
4691 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4692 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4693 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4694
4695
4696
4697 case "$ERROR_PLATFORM_NOT_SUPPORT_SSP" in #(
4698 n | no | nO | N | No | NO) :
4699 ERROR_PLATFORM_NOT_SUPPORT_SSP=no ;; #(
4700 *) :
4701 ERROR_PLATFORM_NOT_SUPPORT_SSP=yes ;;
4702 esac
4703
4704 # We don't want -g -O2 by default in CFLAGS
4705 : ${CFLAGS=""}
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718 # Expand $ac_aux_dir to an absolute path.
4719 am_aux_dir=`cd "$ac_aux_dir" && pwd`
4720
4721 ac_ext=c
4722 ac_cpp='$CPP $CPPFLAGS'
4723 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4724 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4725 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4726 if test -n "$ac_tool_prefix"; then
4727 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4728 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4729 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4730 printf %s "checking for $ac_word... " >&6; }
4731 if test ${ac_cv_prog_CC+y}
4732 then :
4733 printf %s "(cached) " >&6
4734 else $as_nop
4735 if test -n "$CC"; then
4736 ac_cv_prog_CC="$CC" # Let the user override the test.
4737 else
4738 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4739 for as_dir in $PATH
4740 do
4741 IFS=$as_save_IFS
4742 case $as_dir in #(((
4743 '') as_dir=./ ;;
4744 */) ;;
4745 *) as_dir=$as_dir/ ;;
4746 esac
4747 for ac_exec_ext in '' $ac_executable_extensions; do
4748 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4749 ac_cv_prog_CC="${ac_tool_prefix}gcc"
4750 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4751 break 2
4752 fi
4753 done
4754 done
4755 IFS=$as_save_IFS
4756
4757 fi
4758 fi
4759 CC=$ac_cv_prog_CC
4760 if test -n "$CC"; then
4761 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4762 printf "%s\n" "$CC" >&6; }
4763 else
4764 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4765 printf "%s\n" "no" >&6; }
4766 fi
4767
4768
4769 fi
4770 if test -z "$ac_cv_prog_CC"; then
4771 ac_ct_CC=$CC
4772 # Extract the first word of "gcc", so it can be a program name with args.
4773 set dummy gcc; ac_word=$2
4774 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4775 printf %s "checking for $ac_word... " >&6; }
4776 if test ${ac_cv_prog_ac_ct_CC+y}
4777 then :
4778 printf %s "(cached) " >&6
4779 else $as_nop
4780 if test -n "$ac_ct_CC"; then
4781 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4782 else
4783 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4784 for as_dir in $PATH
4785 do
4786 IFS=$as_save_IFS
4787 case $as_dir in #(((
4788 '') as_dir=./ ;;
4789 */) ;;
4790 *) as_dir=$as_dir/ ;;
4791 esac
4792 for ac_exec_ext in '' $ac_executable_extensions; do
4793 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4794 ac_cv_prog_ac_ct_CC="gcc"
4795 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4796 break 2
4797 fi
4798 done
4799 done
4800 IFS=$as_save_IFS
4801
4802 fi
4803 fi
4804 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4805 if test -n "$ac_ct_CC"; then
4806 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4807 printf "%s\n" "$ac_ct_CC" >&6; }
4808 else
4809 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4810 printf "%s\n" "no" >&6; }
4811 fi
4812
4813 if test "x$ac_ct_CC" = x; then
4814 CC=""
4815 else
4816 case $cross_compiling:$ac_tool_warned in
4817 yes:)
4818 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4819 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4820 ac_tool_warned=yes ;;
4821 esac
4822 CC=$ac_ct_CC
4823 fi
4824 else
4825 CC="$ac_cv_prog_CC"
4826 fi
4827
4828 if test -z "$CC"; then
4829 if test -n "$ac_tool_prefix"; then
4830 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4831 set dummy ${ac_tool_prefix}cc; ac_word=$2
4832 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4833 printf %s "checking for $ac_word... " >&6; }
4834 if test ${ac_cv_prog_CC+y}
4835 then :
4836 printf %s "(cached) " >&6
4837 else $as_nop
4838 if test -n "$CC"; then
4839 ac_cv_prog_CC="$CC" # Let the user override the test.
4840 else
4841 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4842 for as_dir in $PATH
4843 do
4844 IFS=$as_save_IFS
4845 case $as_dir in #(((
4846 '') as_dir=./ ;;
4847 */) ;;
4848 *) as_dir=$as_dir/ ;;
4849 esac
4850 for ac_exec_ext in '' $ac_executable_extensions; do
4851 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4852 ac_cv_prog_CC="${ac_tool_prefix}cc"
4853 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4854 break 2
4855 fi
4856 done
4857 done
4858 IFS=$as_save_IFS
4859
4860 fi
4861 fi
4862 CC=$ac_cv_prog_CC
4863 if test -n "$CC"; then
4864 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4865 printf "%s\n" "$CC" >&6; }
4866 else
4867 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4868 printf "%s\n" "no" >&6; }
4869 fi
4870
4871
4872 fi
4873 fi
4874 if test -z "$CC"; then
4875 # Extract the first word of "cc", so it can be a program name with args.
4876 set dummy cc; ac_word=$2
4877 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4878 printf %s "checking for $ac_word... " >&6; }
4879 if test ${ac_cv_prog_CC+y}
4880 then :
4881 printf %s "(cached) " >&6
4882 else $as_nop
4883 if test -n "$CC"; then
4884 ac_cv_prog_CC="$CC" # Let the user override the test.
4885 else
4886 ac_prog_rejected=no
4887 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4888 for as_dir in $PATH
4889 do
4890 IFS=$as_save_IFS
4891 case $as_dir in #(((
4892 '') as_dir=./ ;;
4893 */) ;;
4894 *) as_dir=$as_dir/ ;;
4895 esac
4896 for ac_exec_ext in '' $ac_executable_extensions; do
4897 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4898 if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4899 ac_prog_rejected=yes
4900 continue
4901 fi
4902 ac_cv_prog_CC="cc"
4903 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4904 break 2
4905 fi
4906 done
4907 done
4908 IFS=$as_save_IFS
4909
4910 if test $ac_prog_rejected = yes; then
4911 # We found a bogon in the path, so make sure we never use it.
4912 set dummy $ac_cv_prog_CC
4913 shift
4914 if test $# != 0; then
4915 # We chose a different compiler from the bogus one.
4916 # However, it has the same basename, so the bogon will be chosen
4917 # first if we set CC to just the basename; use the full file name.
4918 shift
4919 ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
4920 fi
4921 fi
4922 fi
4923 fi
4924 CC=$ac_cv_prog_CC
4925 if test -n "$CC"; then
4926 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4927 printf "%s\n" "$CC" >&6; }
4928 else
4929 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4930 printf "%s\n" "no" >&6; }
4931 fi
4932
4933
4934 fi
4935 if test -z "$CC"; then
4936 if test -n "$ac_tool_prefix"; then
4937 for ac_prog in cl.exe
4938 do
4939 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4940 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4941 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4942 printf %s "checking for $ac_word... " >&6; }
4943 if test ${ac_cv_prog_CC+y}
4944 then :
4945 printf %s "(cached) " >&6
4946 else $as_nop
4947 if test -n "$CC"; then
4948 ac_cv_prog_CC="$CC" # Let the user override the test.
4949 else
4950 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4951 for as_dir in $PATH
4952 do
4953 IFS=$as_save_IFS
4954 case $as_dir in #(((
4955 '') as_dir=./ ;;
4956 */) ;;
4957 *) as_dir=$as_dir/ ;;
4958 esac
4959 for ac_exec_ext in '' $ac_executable_extensions; do
4960 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4961 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4962 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4963 break 2
4964 fi
4965 done
4966 done
4967 IFS=$as_save_IFS
4968
4969 fi
4970 fi
4971 CC=$ac_cv_prog_CC
4972 if test -n "$CC"; then
4973 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4974 printf "%s\n" "$CC" >&6; }
4975 else
4976 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4977 printf "%s\n" "no" >&6; }
4978 fi
4979
4980
4981 test -n "$CC" && break
4982 done
4983 fi
4984 if test -z "$CC"; then
4985 ac_ct_CC=$CC
4986 for ac_prog in cl.exe
4987 do
4988 # Extract the first word of "$ac_prog", so it can be a program name with args.
4989 set dummy $ac_prog; ac_word=$2
4990 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4991 printf %s "checking for $ac_word... " >&6; }
4992 if test ${ac_cv_prog_ac_ct_CC+y}
4993 then :
4994 printf %s "(cached) " >&6
4995 else $as_nop
4996 if test -n "$ac_ct_CC"; then
4997 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4998 else
4999 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5000 for as_dir in $PATH
5001 do
5002 IFS=$as_save_IFS
5003 case $as_dir in #(((
5004 '') as_dir=./ ;;
5005 */) ;;
5006 *) as_dir=$as_dir/ ;;
5007 esac
5008 for ac_exec_ext in '' $ac_executable_extensions; do
5009 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5010 ac_cv_prog_ac_ct_CC="$ac_prog"
5011 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5012 break 2
5013 fi
5014 done
5015 done
5016 IFS=$as_save_IFS
5017
5018 fi
5019 fi
5020 ac_ct_CC=$ac_cv_prog_ac_ct_CC
5021 if test -n "$ac_ct_CC"; then
5022 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5023 printf "%s\n" "$ac_ct_CC" >&6; }
5024 else
5025 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5026 printf "%s\n" "no" >&6; }
5027 fi
5028
5029
5030 test -n "$ac_ct_CC" && break
5031 done
5032
5033 if test "x$ac_ct_CC" = x; then
5034 CC=""
5035 else
5036 case $cross_compiling:$ac_tool_warned in
5037 yes:)
5038 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5039 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5040 ac_tool_warned=yes ;;
5041 esac
5042 CC=$ac_ct_CC
5043 fi
5044 fi
5045
5046 fi
5047 if test -z "$CC"; then
5048 if test -n "$ac_tool_prefix"; then
5049 # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
5050 set dummy ${ac_tool_prefix}clang; ac_word=$2
5051 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5052 printf %s "checking for $ac_word... " >&6; }
5053 if test ${ac_cv_prog_CC+y}
5054 then :
5055 printf %s "(cached) " >&6
5056 else $as_nop
5057 if test -n "$CC"; then
5058 ac_cv_prog_CC="$CC" # Let the user override the test.
5059 else
5060 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5061 for as_dir in $PATH
5062 do
5063 IFS=$as_save_IFS
5064 case $as_dir in #(((
5065 '') as_dir=./ ;;
5066 */) ;;
5067 *) as_dir=$as_dir/ ;;
5068 esac
5069 for ac_exec_ext in '' $ac_executable_extensions; do
5070 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5071 ac_cv_prog_CC="${ac_tool_prefix}clang"
5072 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5073 break 2
5074 fi
5075 done
5076 done
5077 IFS=$as_save_IFS
5078
5079 fi
5080 fi
5081 CC=$ac_cv_prog_CC
5082 if test -n "$CC"; then
5083 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5084 printf "%s\n" "$CC" >&6; }
5085 else
5086 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5087 printf "%s\n" "no" >&6; }
5088 fi
5089
5090
5091 fi
5092 if test -z "$ac_cv_prog_CC"; then
5093 ac_ct_CC=$CC
5094 # Extract the first word of "clang", so it can be a program name with args.
5095 set dummy clang; ac_word=$2
5096 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5097 printf %s "checking for $ac_word... " >&6; }
5098 if test ${ac_cv_prog_ac_ct_CC+y}
5099 then :
5100 printf %s "(cached) " >&6
5101 else $as_nop
5102 if test -n "$ac_ct_CC"; then
5103 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5104 else
5105 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5106 for as_dir in $PATH
5107 do
5108 IFS=$as_save_IFS
5109 case $as_dir in #(((
5110 '') as_dir=./ ;;
5111 */) ;;
5112 *) as_dir=$as_dir/ ;;
5113 esac
5114 for ac_exec_ext in '' $ac_executable_extensions; do
5115 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5116 ac_cv_prog_ac_ct_CC="clang"
5117 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5118 break 2
5119 fi
5120 done
5121 done
5122 IFS=$as_save_IFS
5123
5124 fi
5125 fi
5126 ac_ct_CC=$ac_cv_prog_ac_ct_CC
5127 if test -n "$ac_ct_CC"; then
5128 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5129 printf "%s\n" "$ac_ct_CC" >&6; }
5130 else
5131 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5132 printf "%s\n" "no" >&6; }
5133 fi
5134
5135 if test "x$ac_ct_CC" = x; then
5136 CC=""
5137 else
5138 case $cross_compiling:$ac_tool_warned in
5139 yes:)
5140 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5141 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5142 ac_tool_warned=yes ;;
5143 esac
5144 CC=$ac_ct_CC
5145 fi
5146 else
5147 CC="$ac_cv_prog_CC"
5148 fi
5149
5150 fi
5151
5152
5153 test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5154 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
5155 as_fn_error $? "no acceptable C compiler found in \$PATH
5156 See \`config.log' for more details" "$LINENO" 5; }
5157
5158 # Provide some information about the compiler.
5159 printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
5160 set X $ac_compile
5161 ac_compiler=$2
5162 for ac_option in --version -v -V -qversion -version; do
5163 { { ac_try="$ac_compiler $ac_option >&5"
5164 case "(($ac_try" in
5165 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5166 *) ac_try_echo=$ac_try;;
5167 esac
5168 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5169 printf "%s\n" "$ac_try_echo"; } >&5
5170 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5171 ac_status=$?
5172 if test -s conftest.err; then
5173 sed '10a\
5174 ... rest of stderr output deleted ...
5175 10q' conftest.err >conftest.er1
5176 cat conftest.er1 >&5
5177 fi
5178 rm -f conftest.er1 conftest.err
5179 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5180 test $ac_status = 0; }
5181 done
5182
5183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5184 /* end confdefs.h. */
5185
5186 int
5187 main (void)
5188 {
5189
5190 ;
5191 return 0;
5192 }
5193 _ACEOF
5194 ac_clean_files_save=$ac_clean_files
5195 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
5196 # Try to create an executable without -o first, disregard a.out.
5197 # It will help us diagnose broken compilers, and finding out an intuition
5198 # of exeext.
5199 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
5200 printf %s "checking whether the C compiler works... " >&6; }
5201 ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
5202
5203 # The possible output files:
5204 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
5205
5206 ac_rmfiles=
5207 for ac_file in $ac_files
5208 do
5209 case $ac_file in
5210 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5211 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
5212 esac
5213 done
5214 rm -f $ac_rmfiles
5215
5216 if { { ac_try="$ac_link_default"
5217 case "(($ac_try" in
5218 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5219 *) ac_try_echo=$ac_try;;
5220 esac
5221 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5222 printf "%s\n" "$ac_try_echo"; } >&5
5223 (eval "$ac_link_default") 2>&5
5224 ac_status=$?
5225 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5226 test $ac_status = 0; }
5227 then :
5228 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
5229 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
5230 # in a Makefile. We should not override ac_cv_exeext if it was cached,
5231 # so that the user can short-circuit this test for compilers unknown to
5232 # Autoconf.
5233 for ac_file in $ac_files ''
5234 do
5235 test -f "$ac_file" || continue
5236 case $ac_file in
5237 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
5238 ;;
5239 [ab].out )
5240 # We found the default executable, but exeext='' is most
5241 # certainly right.
5242 break;;
5243 *.* )
5244 if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
5245 then :; else
5246 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5247 fi
5248 # We set ac_cv_exeext here because the later test for it is not
5249 # safe: cross compilers may not add the suffix if given an `-o'
5250 # argument, so we may need to know it at that point already.
5251 # Even if this section looks crufty: it has the advantage of
5252 # actually working.
5253 break;;
5254 * )
5255 break;;
5256 esac
5257 done
5258 test "$ac_cv_exeext" = no && ac_cv_exeext=
5259
5260 else $as_nop
5261 ac_file=''
5262 fi
5263 if test -z "$ac_file"
5264 then :
5265 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5266 printf "%s\n" "no" >&6; }
5267 printf "%s\n" "$as_me: failed program was:" >&5
5268 sed 's/^/| /' conftest.$ac_ext >&5
5269
5270 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5271 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
5272 as_fn_error 77 "C compiler cannot create executables
5273 See \`config.log' for more details" "$LINENO" 5; }
5274 else $as_nop
5275 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5276 printf "%s\n" "yes" >&6; }
5277 fi
5278 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
5279 printf %s "checking for C compiler default output file name... " >&6; }
5280 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
5281 printf "%s\n" "$ac_file" >&6; }
5282 ac_exeext=$ac_cv_exeext
5283
5284 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
5285 ac_clean_files=$ac_clean_files_save
5286 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
5287 printf %s "checking for suffix of executables... " >&6; }
5288 if { { ac_try="$ac_link"
5289 case "(($ac_try" in
5290 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5291 *) ac_try_echo=$ac_try;;
5292 esac
5293 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5294 printf "%s\n" "$ac_try_echo"; } >&5
5295 (eval "$ac_link") 2>&5
5296 ac_status=$?
5297 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5298 test $ac_status = 0; }
5299 then :
5300 # If both `conftest.exe' and `conftest' are `present' (well, observable)
5301 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
5302 # work properly (i.e., refer to `conftest.exe'), while it won't with
5303 # `rm'.
5304 for ac_file in conftest.exe conftest conftest.*; do
5305 test -f "$ac_file" || continue
5306 case $ac_file in
5307 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5308 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5309 break;;
5310 * ) break;;
5311 esac
5312 done
5313 else $as_nop
5314 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5315 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
5316 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
5317 See \`config.log' for more details" "$LINENO" 5; }
5318 fi
5319 rm -f conftest conftest$ac_cv_exeext
5320 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
5321 printf "%s\n" "$ac_cv_exeext" >&6; }
5322
5323 rm -f conftest.$ac_ext
5324 EXEEXT=$ac_cv_exeext
5325 ac_exeext=$EXEEXT
5326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5327 /* end confdefs.h. */
5328 #include <stdio.h>
5329 int
5330 main (void)
5331 {
5332 FILE *f = fopen ("conftest.out", "w");
5333 return ferror (f) || fclose (f) != 0;
5334
5335 ;
5336 return 0;
5337 }
5338 _ACEOF
5339 ac_clean_files="$ac_clean_files conftest.out"
5340 # Check that the compiler produces executables we can run. If not, either
5341 # the compiler is broken, or we cross compile.
5342 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
5343 printf %s "checking whether we are cross compiling... " >&6; }
5344 if test "$cross_compiling" != yes; then
5345 { { ac_try="$ac_link"
5346 case "(($ac_try" in
5347 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5348 *) ac_try_echo=$ac_try;;
5349 esac
5350 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5351 printf "%s\n" "$ac_try_echo"; } >&5
5352 (eval "$ac_link") 2>&5
5353 ac_status=$?
5354 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5355 test $ac_status = 0; }
5356 if { ac_try='./conftest$ac_cv_exeext'
5357 { { case "(($ac_try" in
5358 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5359 *) ac_try_echo=$ac_try;;
5360 esac
5361 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5362 printf "%s\n" "$ac_try_echo"; } >&5
5363 (eval "$ac_try") 2>&5
5364 ac_status=$?
5365 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5366 test $ac_status = 0; }; }; then
5367 cross_compiling=no
5368 else
5369 if test "$cross_compiling" = maybe; then
5370 cross_compiling=yes
5371 else
5372 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5373 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
5374 as_fn_error 77 "cannot run C compiled programs.
5375 If you meant to cross compile, use \`--host'.
5376 See \`config.log' for more details" "$LINENO" 5; }
5377 fi
5378 fi
5379 fi
5380 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
5381 printf "%s\n" "$cross_compiling" >&6; }
5382
5383 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
5384 ac_clean_files=$ac_clean_files_save
5385 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
5386 printf %s "checking for suffix of object files... " >&6; }
5387 if test ${ac_cv_objext+y}
5388 then :
5389 printf %s "(cached) " >&6
5390 else $as_nop
5391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5392 /* end confdefs.h. */
5393
5394 int
5395 main (void)
5396 {
5397
5398 ;
5399 return 0;
5400 }
5401 _ACEOF
5402 rm -f conftest.o conftest.obj
5403 if { { ac_try="$ac_compile"
5404 case "(($ac_try" in
5405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5406 *) ac_try_echo=$ac_try;;
5407 esac
5408 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5409 printf "%s\n" "$ac_try_echo"; } >&5
5410 (eval "$ac_compile") 2>&5
5411 ac_status=$?
5412 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5413 test $ac_status = 0; }
5414 then :
5415 for ac_file in conftest.o conftest.obj conftest.*; do
5416 test -f "$ac_file" || continue;
5417 case $ac_file in
5418 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
5419 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
5420 break;;
5421 esac
5422 done
5423 else $as_nop
5424 printf "%s\n" "$as_me: failed program was:" >&5
5425 sed 's/^/| /' conftest.$ac_ext >&5
5426
5427 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5428 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
5429 as_fn_error $? "cannot compute suffix of object files: cannot compile
5430 See \`config.log' for more details" "$LINENO" 5; }
5431 fi
5432 rm -f conftest.$ac_cv_objext conftest.$ac_ext
5433 fi
5434 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
5435 printf "%s\n" "$ac_cv_objext" >&6; }
5436 OBJEXT=$ac_cv_objext
5437 ac_objext=$OBJEXT
5438 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
5439 printf %s "checking whether the compiler supports GNU C... " >&6; }
5440 if test ${ac_cv_c_compiler_gnu+y}
5441 then :
5442 printf %s "(cached) " >&6
5443 else $as_nop
5444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5445 /* end confdefs.h. */
5446
5447 int
5448 main (void)
5449 {
5450 #ifndef __GNUC__
5451 choke me
5452 #endif
5453
5454 ;
5455 return 0;
5456 }
5457 _ACEOF
5458 if ac_fn_c_try_compile "$LINENO"
5459 then :
5460 ac_compiler_gnu=yes
5461 else $as_nop
5462 ac_compiler_gnu=no
5463 fi
5464 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5465 ac_cv_c_compiler_gnu=$ac_compiler_gnu
5466
5467 fi
5468 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
5469 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
5470 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5471
5472 if test $ac_compiler_gnu = yes; then
5473 GCC=yes
5474 else
5475 GCC=
5476 fi
5477 ac_test_CFLAGS=${CFLAGS+y}
5478 ac_save_CFLAGS=$CFLAGS
5479 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
5480 printf %s "checking whether $CC accepts -g... " >&6; }
5481 if test ${ac_cv_prog_cc_g+y}
5482 then :
5483 printf %s "(cached) " >&6
5484 else $as_nop
5485 ac_save_c_werror_flag=$ac_c_werror_flag
5486 ac_c_werror_flag=yes
5487 ac_cv_prog_cc_g=no
5488 CFLAGS="-g"
5489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5490 /* end confdefs.h. */
5491
5492 int
5493 main (void)
5494 {
5495
5496 ;
5497 return 0;
5498 }
5499 _ACEOF
5500 if ac_fn_c_try_compile "$LINENO"
5501 then :
5502 ac_cv_prog_cc_g=yes
5503 else $as_nop
5504 CFLAGS=""
5505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5506 /* end confdefs.h. */
5507
5508 int
5509 main (void)
5510 {
5511
5512 ;
5513 return 0;
5514 }
5515 _ACEOF
5516 if ac_fn_c_try_compile "$LINENO"
5517 then :
5518
5519 else $as_nop
5520 ac_c_werror_flag=$ac_save_c_werror_flag
5521 CFLAGS="-g"
5522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5523 /* end confdefs.h. */
5524
5525 int
5526 main (void)
5527 {
5528
5529 ;
5530 return 0;
5531 }
5532 _ACEOF
5533 if ac_fn_c_try_compile "$LINENO"
5534 then :
5535 ac_cv_prog_cc_g=yes
5536 fi
5537 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5538 fi
5539 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5540 fi
5541 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5542 ac_c_werror_flag=$ac_save_c_werror_flag
5543 fi
5544 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5545 printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
5546 if test $ac_test_CFLAGS; then
5547 CFLAGS=$ac_save_CFLAGS
5548 elif test $ac_cv_prog_cc_g = yes; then
5549 if test "$GCC" = yes; then
5550 CFLAGS="-g -O2"
5551 else
5552 CFLAGS="-g"
5553 fi
5554 else
5555 if test "$GCC" = yes; then
5556 CFLAGS="-O2"
5557 else
5558 CFLAGS=
5559 fi
5560 fi
5561 ac_prog_cc_stdc=no
5562 if test x$ac_prog_cc_stdc = xno
5563 then :
5564 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
5565 printf %s "checking for $CC option to enable C11 features... " >&6; }
5566 if test ${ac_cv_prog_cc_c11+y}
5567 then :
5568 printf %s "(cached) " >&6
5569 else $as_nop
5570 ac_cv_prog_cc_c11=no
5571 ac_save_CC=$CC
5572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5573 /* end confdefs.h. */
5574 $ac_c_conftest_c11_program
5575 _ACEOF
5576 for ac_arg in '' -std=gnu11
5577 do
5578 CC="$ac_save_CC $ac_arg"
5579 if ac_fn_c_try_compile "$LINENO"
5580 then :
5581 ac_cv_prog_cc_c11=$ac_arg
5582 fi
5583 rm -f core conftest.err conftest.$ac_objext conftest.beam
5584 test "x$ac_cv_prog_cc_c11" != "xno" && break
5585 done
5586 rm -f conftest.$ac_ext
5587 CC=$ac_save_CC
5588 fi
5589
5590 if test "x$ac_cv_prog_cc_c11" = xno
5591 then :
5592 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5593 printf "%s\n" "unsupported" >&6; }
5594 else $as_nop
5595 if test "x$ac_cv_prog_cc_c11" = x
5596 then :
5597 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5598 printf "%s\n" "none needed" >&6; }
5599 else $as_nop
5600 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
5601 printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
5602 CC="$CC $ac_cv_prog_cc_c11"
5603 fi
5604 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
5605 ac_prog_cc_stdc=c11
5606 fi
5607 fi
5608 if test x$ac_prog_cc_stdc = xno
5609 then :
5610 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
5611 printf %s "checking for $CC option to enable C99 features... " >&6; }
5612 if test ${ac_cv_prog_cc_c99+y}
5613 then :
5614 printf %s "(cached) " >&6
5615 else $as_nop
5616 ac_cv_prog_cc_c99=no
5617 ac_save_CC=$CC
5618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5619 /* end confdefs.h. */
5620 $ac_c_conftest_c99_program
5621 _ACEOF
5622 for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
5623 do
5624 CC="$ac_save_CC $ac_arg"
5625 if ac_fn_c_try_compile "$LINENO"
5626 then :
5627 ac_cv_prog_cc_c99=$ac_arg
5628 fi
5629 rm -f core conftest.err conftest.$ac_objext conftest.beam
5630 test "x$ac_cv_prog_cc_c99" != "xno" && break
5631 done
5632 rm -f conftest.$ac_ext
5633 CC=$ac_save_CC
5634 fi
5635
5636 if test "x$ac_cv_prog_cc_c99" = xno
5637 then :
5638 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5639 printf "%s\n" "unsupported" >&6; }
5640 else $as_nop
5641 if test "x$ac_cv_prog_cc_c99" = x
5642 then :
5643 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5644 printf "%s\n" "none needed" >&6; }
5645 else $as_nop
5646 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
5647 printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
5648 CC="$CC $ac_cv_prog_cc_c99"
5649 fi
5650 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
5651 ac_prog_cc_stdc=c99
5652 fi
5653 fi
5654 if test x$ac_prog_cc_stdc = xno
5655 then :
5656 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
5657 printf %s "checking for $CC option to enable C89 features... " >&6; }
5658 if test ${ac_cv_prog_cc_c89+y}
5659 then :
5660 printf %s "(cached) " >&6
5661 else $as_nop
5662 ac_cv_prog_cc_c89=no
5663 ac_save_CC=$CC
5664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5665 /* end confdefs.h. */
5666 $ac_c_conftest_c89_program
5667 _ACEOF
5668 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5669 do
5670 CC="$ac_save_CC $ac_arg"
5671 if ac_fn_c_try_compile "$LINENO"
5672 then :
5673 ac_cv_prog_cc_c89=$ac_arg
5674 fi
5675 rm -f core conftest.err conftest.$ac_objext conftest.beam
5676 test "x$ac_cv_prog_cc_c89" != "xno" && break
5677 done
5678 rm -f conftest.$ac_ext
5679 CC=$ac_save_CC
5680 fi
5681
5682 if test "x$ac_cv_prog_cc_c89" = xno
5683 then :
5684 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5685 printf "%s\n" "unsupported" >&6; }
5686 else $as_nop
5687 if test "x$ac_cv_prog_cc_c89" = x
5688 then :
5689 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5690 printf "%s\n" "none needed" >&6; }
5691 else $as_nop
5692 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5693 printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
5694 CC="$CC $ac_cv_prog_cc_c89"
5695 fi
5696 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
5697 ac_prog_cc_stdc=c89
5698 fi
5699 fi
5700
5701 ac_ext=c
5702 ac_cpp='$CPP $CPPFLAGS'
5703 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5704 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5705 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5706
5707
5708 ac_ext=c
5709 ac_cpp='$CPP $CPPFLAGS'
5710 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5711 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5712 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5713 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
5714 printf %s "checking whether $CC understands -c and -o together... " >&6; }
5715 if test ${am_cv_prog_cc_c_o+y}
5716 then :
5717 printf %s "(cached) " >&6
5718 else $as_nop
5719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5720 /* end confdefs.h. */
5721
5722 int
5723 main (void)
5724 {
5725
5726 ;
5727 return 0;
5728 }
5729 _ACEOF
5730 # Make sure it works both with $CC and with simple cc.
5731 # Following AC_PROG_CC_C_O, we do the test twice because some
5732 # compilers refuse to overwrite an existing .o file with -o,
5733 # though they will create one.
5734 am_cv_prog_cc_c_o=yes
5735 for am_i in 1 2; do
5736 if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
5737 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
5738 ac_status=$?
5739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5740 (exit $ac_status); } \
5741 && test -f conftest2.$ac_objext; then
5742 : OK
5743 else
5744 am_cv_prog_cc_c_o=no
5745 break
5746 fi
5747 done
5748 rm -f core conftest*
5749 unset am_i
5750 fi
5751 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
5752 printf "%s\n" "$am_cv_prog_cc_c_o" >&6; }
5753 if test "$am_cv_prog_cc_c_o" != yes; then
5754 # Losing compiler, so override with the script.
5755 # FIXME: It is wrong to rewrite CC.
5756 # But if we don't then we get into trouble of one sort or another.
5757 # A longer-term fix would be to have automake use am__CC in this case,
5758 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
5759 CC="$am_aux_dir/compile $CC"
5760 fi
5761 ac_ext=c
5762 ac_cpp='$CPP $CPPFLAGS'
5763 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5764 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5765 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5766
5767
5768
5769 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler is clang" >&5
5770 printf %s "checking whether the compiler is clang... " >&6; }
5771 if test ${gl_cv_compiler_clang+y}
5772 then :
5773 printf %s "(cached) " >&6
5774 else $as_nop
5775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5776 /* end confdefs.h. */
5777
5778 #ifdef __clang__
5779 barfbarf
5780 #endif
5781
5782 int
5783 main (void)
5784 {
5785
5786 ;
5787 return 0;
5788 }
5789
5790 _ACEOF
5791 if ac_fn_c_try_compile "$LINENO"
5792 then :
5793 gl_cv_compiler_clang=no
5794 else $as_nop
5795 gl_cv_compiler_clang=yes
5796 fi
5797 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5798
5799 fi
5800 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_clang" >&5
5801 printf "%s\n" "$gl_cv_compiler_clang" >&6; }
5802
5803
5804 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compiler option needed when checking for declarations" >&5
5805 printf %s "checking for compiler option needed when checking for declarations... " >&6; }
5806 if test ${gl_cv_compiler_check_decl_option+y}
5807 then :
5808 printf %s "(cached) " >&6
5809 else $as_nop
5810 if test $gl_cv_compiler_clang = yes; then
5811 save_ac_compile="$ac_compile"
5812 ac_compile="$ac_compile -Werror=implicit-function-declaration"
5813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5814 /* end confdefs.h. */
5815
5816 int
5817 main (void)
5818 {
5819
5820 ;
5821 return 0;
5822 }
5823 _ACEOF
5824 if ac_fn_c_try_compile "$LINENO"
5825 then :
5826 gl_cv_compiler_check_decl_option='-Werror=implicit-function-declaration'
5827 else $as_nop
5828 gl_cv_compiler_check_decl_option=none
5829 fi
5830 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5831 ac_compile="$save_ac_compile"
5832 else
5833 gl_cv_compiler_check_decl_option=none
5834 fi
5835
5836 fi
5837 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_check_decl_option" >&5
5838 printf "%s\n" "$gl_cv_compiler_check_decl_option" >&6; }
5839 if test "x$gl_cv_compiler_check_decl_option" != xnone; then
5840 ac_compile_for_check_decl="$ac_compile $gl_cv_compiler_check_decl_option"
5841 else
5842 ac_compile_for_check_decl="$ac_compile"
5843 fi
5844
5845
5846
5847 ac_header= ac_cache=
5848 for ac_item in $ac_header_c_list
5849 do
5850 if test $ac_cache; then
5851 ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
5852 if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
5853 printf "%s\n" "#define $ac_item 1" >> confdefs.h
5854 fi
5855 ac_header= ac_cache=
5856 elif test $ac_header; then
5857 ac_cache=$ac_item
5858 else
5859 ac_header=$ac_item
5860 fi
5861 done
5862
5863
5864
5865
5866
5867
5868
5869
5870 if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
5871 then :
5872
5873 printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
5874
5875 fi
5876
5877
5878
5879
5880
5881
5882 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5883 printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; }
5884 if test ${ac_cv_safe_to_define___extensions__+y}
5885 then :
5886 printf %s "(cached) " >&6
5887 else $as_nop
5888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5889 /* end confdefs.h. */
5890
5891 # define __EXTENSIONS__ 1
5892 $ac_includes_default
5893 int
5894 main (void)
5895 {
5896
5897 ;
5898 return 0;
5899 }
5900 _ACEOF
5901 if ac_fn_c_try_compile "$LINENO"
5902 then :
5903 ac_cv_safe_to_define___extensions__=yes
5904 else $as_nop
5905 ac_cv_safe_to_define___extensions__=no
5906 fi
5907 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5908 fi
5909 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5910 printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; }
5911
5912 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
5913 printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; }
5914 if test ${ac_cv_should_define__xopen_source+y}
5915 then :
5916 printf %s "(cached) " >&6
5917 else $as_nop
5918 ac_cv_should_define__xopen_source=no
5919 if test $ac_cv_header_wchar_h = yes
5920 then :
5921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5922 /* end confdefs.h. */
5923
5924 #include <wchar.h>
5925 mbstate_t x;
5926 int
5927 main (void)
5928 {
5929
5930 ;
5931 return 0;
5932 }
5933 _ACEOF
5934 if ac_fn_c_try_compile "$LINENO"
5935 then :
5936
5937 else $as_nop
5938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5939 /* end confdefs.h. */
5940
5941 #define _XOPEN_SOURCE 500
5942 #include <wchar.h>
5943 mbstate_t x;
5944 int
5945 main (void)
5946 {
5947
5948 ;
5949 return 0;
5950 }
5951 _ACEOF
5952 if ac_fn_c_try_compile "$LINENO"
5953 then :
5954 ac_cv_should_define__xopen_source=yes
5955 fi
5956 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5957 fi
5958 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5959 fi
5960 fi
5961 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
5962 printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; }
5963
5964 printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h
5965
5966 printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h
5967
5968 printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h
5969
5970 printf "%s\n" "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h
5971
5972 printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
5973
5974 printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h
5975
5976 printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5977
5978 printf "%s\n" "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
5979
5980 printf "%s\n" "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
5981
5982 printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
5983
5984 printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
5985
5986 printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
5987
5988 printf "%s\n" "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
5989
5990 printf "%s\n" "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
5991
5992 printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h
5993
5994 if test $ac_cv_header_minix_config_h = yes
5995 then :
5996 MINIX=yes
5997 printf "%s\n" "#define _MINIX 1" >>confdefs.h
5998
5999 printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h
6000
6001 printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h
6002
6003 else $as_nop
6004 MINIX=
6005 fi
6006 if test $ac_cv_safe_to_define___extensions__ = yes
6007 then :
6008 printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h
6009
6010 fi
6011 if test $ac_cv_should_define__xopen_source = yes
6012 then :
6013 printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h
6014
6015 fi
6016
6017
6018
6019 # Checks for build, host and target systems.
6020
6021
6022 # Make sure we can run config.sub.
6023 $SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 ||
6024 as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5
6025
6026 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6027 printf %s "checking build system type... " >&6; }
6028 if test ${ac_cv_build+y}
6029 then :
6030 printf %s "(cached) " >&6
6031 else $as_nop
6032 ac_build_alias=$build_alias
6033 test "x$ac_build_alias" = x &&
6034 ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
6035 test "x$ac_build_alias" = x &&
6036 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6037 ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
6038 as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
6039
6040 fi
6041 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6042 printf "%s\n" "$ac_cv_build" >&6; }
6043 case $ac_cv_build in
6044 *-*-*) ;;
6045 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6046 esac
6047 build=$ac_cv_build
6048 ac_save_IFS=$IFS; IFS='-'
6049 set x $ac_cv_build
6050 shift
6051 build_cpu=$1
6052 build_vendor=$2
6053 shift; shift
6054 # Remember, the first character of IFS is used to create $*,
6055 # except with old shells:
6056 build_os=$*
6057 IFS=$ac_save_IFS
6058 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6059
6060
6061 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6062 printf %s "checking host system type... " >&6; }
6063 if test ${ac_cv_host+y}
6064 then :
6065 printf %s "(cached) " >&6
6066 else $as_nop
6067 if test "x$host_alias" = x; then
6068 ac_cv_host=$ac_cv_build
6069 else
6070 ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
6071 as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5
6072 fi
6073
6074 fi
6075 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6076 printf "%s\n" "$ac_cv_host" >&6; }
6077 case $ac_cv_host in
6078 *-*-*) ;;
6079 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6080 esac
6081 host=$ac_cv_host
6082 ac_save_IFS=$IFS; IFS='-'
6083 set x $ac_cv_host
6084 shift
6085 host_cpu=$1
6086 host_vendor=$2
6087 shift; shift
6088 # Remember, the first character of IFS is used to create $*,
6089 # except with old shells:
6090 host_os=$*
6091 IFS=$ac_save_IFS
6092 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6093
6094
6095 save_program_prefix="${program_prefix}"
6096 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6097 printf %s "checking target system type... " >&6; }
6098 if test ${ac_cv_target+y}
6099 then :
6100 printf %s "(cached) " >&6
6101 else $as_nop
6102 if test "x$target_alias" = x; then
6103 ac_cv_target=$ac_cv_host
6104 else
6105 ac_cv_target=`$SHELL "${ac_aux_dir}config.sub" $target_alias` ||
6106 as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $target_alias failed" "$LINENO" 5
6107 fi
6108
6109 fi
6110 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6111 printf "%s\n" "$ac_cv_target" >&6; }
6112 case $ac_cv_target in
6113 *-*-*) ;;
6114 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6115 esac
6116 target=$ac_cv_target
6117 ac_save_IFS=$IFS; IFS='-'
6118 set x $ac_cv_target
6119 shift
6120 target_cpu=$1
6121 target_vendor=$2
6122 shift; shift
6123 # Remember, the first character of IFS is used to create $*,
6124 # except with old shells:
6125 target_os=$*
6126 IFS=$ac_save_IFS
6127 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6128
6129
6130 # The aliases save the names the user supplied, while $host etc.
6131 # will get canonicalized.
6132 test -n "$target_alias" &&
6133 test "$program_prefix$program_suffix$program_transform_name" = \
6134 NONENONEs,x,x, &&
6135 program_prefix=${target_alias}-
6136 program_prefix="${save_program_prefix}"
6137
6138 am__api_version='1.16'
6139
6140
6141 # Find a good install program. We prefer a C program (faster),
6142 # so one script is as good as another. But avoid the broken or
6143 # incompatible versions:
6144 # SysV /etc/install, /usr/sbin/install
6145 # SunOS /usr/etc/install
6146 # IRIX /sbin/install
6147 # AIX /bin/install
6148 # AmigaOS /C/install, which installs bootblocks on floppy discs
6149 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6150 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
6151 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6152 # OS/2's system install, which has a completely different semantic
6153 # ./install, which can be erroneously created by make from ./install.sh.
6154 # Reject install programs that cannot install multiple files.
6155 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6156 printf %s "checking for a BSD-compatible install... " >&6; }
6157 if test -z "$INSTALL"; then
6158 if test ${ac_cv_path_install+y}
6159 then :
6160 printf %s "(cached) " >&6
6161 else $as_nop
6162 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6163 for as_dir in $PATH
6164 do
6165 IFS=$as_save_IFS
6166 case $as_dir in #(((
6167 '') as_dir=./ ;;
6168 */) ;;
6169 *) as_dir=$as_dir/ ;;
6170 esac
6171 # Account for fact that we put trailing slashes in our PATH walk.
6172 case $as_dir in #((
6173 ./ | /[cC]/* | \
6174 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
6175 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
6176 /usr/ucb/* ) ;;
6177 *)
6178 # OSF1 and SCO ODT 3.0 have their own names for install.
6179 # Don't use installbsd from OSF since it installs stuff as root
6180 # by default.
6181 for ac_prog in ginstall scoinst install; do
6182 for ac_exec_ext in '' $ac_executable_extensions; do
6183 if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then
6184 if test $ac_prog = install &&
6185 grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6186 # AIX install. It has an incompatible calling convention.
6187 :
6188 elif test $ac_prog = install &&
6189 grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6190 # program-specific install script used by HP pwplus--don't use.
6191 :
6192 else
6193 rm -rf conftest.one conftest.two conftest.dir
6194 echo one > conftest.one
6195 echo two > conftest.two
6196 mkdir conftest.dir
6197 if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" &&
6198 test -s conftest.one && test -s conftest.two &&
6199 test -s conftest.dir/conftest.one &&
6200 test -s conftest.dir/conftest.two
6201 then
6202 ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c"
6203 break 3
6204 fi
6205 fi
6206 fi
6207 done
6208 done
6209 ;;
6210 esac
6211
6212 done
6213 IFS=$as_save_IFS
6214
6215 rm -rf conftest.one conftest.two conftest.dir
6216
6217 fi
6218 if test ${ac_cv_path_install+y}; then
6219 INSTALL=$ac_cv_path_install
6220 else
6221 # As a last resort, use the slow shell script. Don't cache a
6222 # value for INSTALL within a source directory, because that will
6223 # break other packages using the cache if that directory is
6224 # removed, or if the value is a relative name.
6225 INSTALL=$ac_install_sh
6226 fi
6227 fi
6228 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6229 printf "%s\n" "$INSTALL" >&6; }
6230
6231 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6232 # It thinks the first close brace ends the variable substitution.
6233 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6234
6235 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6236
6237 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6238
6239 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
6240 printf %s "checking whether build environment is sane... " >&6; }
6241 # Reject unsafe characters in $srcdir or the absolute working directory
6242 # name. Accept space and tab only in the latter.
6243 am_lf='
6244 '
6245 case `pwd` in
6246 *[\\\"\#\$\&\'\`$am_lf]*)
6247 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
6248 esac
6249 case $srcdir in
6250 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
6251 as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
6252 esac
6253
6254 # Do 'set' in a subshell so we don't clobber the current shell's
6255 # arguments. Must try -L first in case configure is actually a
6256 # symlink; some systems play weird games with the mod time of symlinks
6257 # (eg FreeBSD returns the mod time of the symlink's containing
6258 # directory).
6259 if (
6260 am_has_slept=no
6261 for am_try in 1 2; do
6262 echo "timestamp, slept: $am_has_slept" > conftest.file
6263 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
6264 if test "$*" = "X"; then
6265 # -L didn't work.
6266 set X `ls -t "$srcdir/configure" conftest.file`
6267 fi
6268 if test "$*" != "X $srcdir/configure conftest.file" \
6269 && test "$*" != "X conftest.file $srcdir/configure"; then
6270
6271 # If neither matched, then we have a broken ls. This can happen
6272 # if, for instance, CONFIG_SHELL is bash and it inherits a
6273 # broken ls alias from the environment. This has actually
6274 # happened. Such a system could not be considered "sane".
6275 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
6276 alias in your environment" "$LINENO" 5
6277 fi
6278 if test "$2" = conftest.file || test $am_try -eq 2; then
6279 break
6280 fi
6281 # Just in case.
6282 sleep 1
6283 am_has_slept=yes
6284 done
6285 test "$2" = conftest.file
6286 )
6287 then
6288 # Ok.
6289 :
6290 else
6291 as_fn_error $? "newly created file is older than distributed files!
6292 Check your system clock" "$LINENO" 5
6293 fi
6294 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6295 printf "%s\n" "yes" >&6; }
6296 # If we didn't sleep, we still need to ensure time stamps of config.status and
6297 # generated files are strictly newer.
6298 am_sleep_pid=
6299 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
6300 ( sleep 1 ) &
6301 am_sleep_pid=$!
6302 fi
6303
6304 rm -f conftest.file
6305
6306 test "$program_prefix" != NONE &&
6307 program_transform_name="s&^&$program_prefix&;$program_transform_name"
6308 # Use a double $ so make ignores it.
6309 test "$program_suffix" != NONE &&
6310 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
6311 # Double any \ or $.
6312 # By default was `s,x,x', remove it if useless.
6313 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
6314 program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"`
6315
6316
6317 if test x"${MISSING+set}" != xset; then
6318 MISSING="\${SHELL} '$am_aux_dir/missing'"
6319 fi
6320 # Use eval to expand $SHELL
6321 if eval "$MISSING --is-lightweight"; then
6322 am_missing_run="$MISSING "
6323 else
6324 am_missing_run=
6325 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
6326 printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
6327 fi
6328
6329 if test x"${install_sh+set}" != xset; then
6330 case $am_aux_dir in
6331 *\ * | *\ *)
6332 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
6333 *)
6334 install_sh="\${SHELL} $am_aux_dir/install-sh"
6335 esac
6336 fi
6337
6338 # Installed binaries are usually stripped using 'strip' when the user
6339 # run "make install-strip". However 'strip' might not be the right
6340 # tool to use in cross-compilation environments, therefore Automake
6341 # will honor the 'STRIP' environment variable to overrule this program.
6342 if test "$cross_compiling" != no; then
6343 if test -n "$ac_tool_prefix"; then
6344 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6345 set dummy ${ac_tool_prefix}strip; ac_word=$2
6346 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6347 printf %s "checking for $ac_word... " >&6; }
6348 if test ${ac_cv_prog_STRIP+y}
6349 then :
6350 printf %s "(cached) " >&6
6351 else $as_nop
6352 if test -n "$STRIP"; then
6353 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6354 else
6355 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6356 for as_dir in $PATH
6357 do
6358 IFS=$as_save_IFS
6359 case $as_dir in #(((
6360 '') as_dir=./ ;;
6361 */) ;;
6362 *) as_dir=$as_dir/ ;;
6363 esac
6364 for ac_exec_ext in '' $ac_executable_extensions; do
6365 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6366 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6367 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6368 break 2
6369 fi
6370 done
6371 done
6372 IFS=$as_save_IFS
6373
6374 fi
6375 fi
6376 STRIP=$ac_cv_prog_STRIP
6377 if test -n "$STRIP"; then
6378 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
6379 printf "%s\n" "$STRIP" >&6; }
6380 else
6381 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6382 printf "%s\n" "no" >&6; }
6383 fi
6384
6385
6386 fi
6387 if test -z "$ac_cv_prog_STRIP"; then
6388 ac_ct_STRIP=$STRIP
6389 # Extract the first word of "strip", so it can be a program name with args.
6390 set dummy strip; ac_word=$2
6391 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6392 printf %s "checking for $ac_word... " >&6; }
6393 if test ${ac_cv_prog_ac_ct_STRIP+y}
6394 then :
6395 printf %s "(cached) " >&6
6396 else $as_nop
6397 if test -n "$ac_ct_STRIP"; then
6398 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6399 else
6400 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6401 for as_dir in $PATH
6402 do
6403 IFS=$as_save_IFS
6404 case $as_dir in #(((
6405 '') as_dir=./ ;;
6406 */) ;;
6407 *) as_dir=$as_dir/ ;;
6408 esac
6409 for ac_exec_ext in '' $ac_executable_extensions; do
6410 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6411 ac_cv_prog_ac_ct_STRIP="strip"
6412 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6413 break 2
6414 fi
6415 done
6416 done
6417 IFS=$as_save_IFS
6418
6419 fi
6420 fi
6421 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6422 if test -n "$ac_ct_STRIP"; then
6423 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
6424 printf "%s\n" "$ac_ct_STRIP" >&6; }
6425 else
6426 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6427 printf "%s\n" "no" >&6; }
6428 fi
6429
6430 if test "x$ac_ct_STRIP" = x; then
6431 STRIP=":"
6432 else
6433 case $cross_compiling:$ac_tool_warned in
6434 yes:)
6435 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6436 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6437 ac_tool_warned=yes ;;
6438 esac
6439 STRIP=$ac_ct_STRIP
6440 fi
6441 else
6442 STRIP="$ac_cv_prog_STRIP"
6443 fi
6444
6445 fi
6446 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
6447
6448
6449 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5
6450 printf %s "checking for a race-free mkdir -p... " >&6; }
6451 if test -z "$MKDIR_P"; then
6452 if test ${ac_cv_path_mkdir+y}
6453 then :
6454 printf %s "(cached) " >&6
6455 else $as_nop
6456 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6457 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6458 do
6459 IFS=$as_save_IFS
6460 case $as_dir in #(((
6461 '') as_dir=./ ;;
6462 */) ;;
6463 *) as_dir=$as_dir/ ;;
6464 esac
6465 for ac_prog in mkdir gmkdir; do
6466 for ac_exec_ext in '' $ac_executable_extensions; do
6467 as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue
6468 case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #(
6469 'mkdir ('*'coreutils) '* | \
6470 'BusyBox '* | \
6471 'mkdir (fileutils) '4.1*)
6472 ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext
6473 break 3;;
6474 esac
6475 done
6476 done
6477 done
6478 IFS=$as_save_IFS
6479
6480 fi
6481
6482 test -d ./--version && rmdir ./--version
6483 if test ${ac_cv_path_mkdir+y}; then
6484 MKDIR_P="$ac_cv_path_mkdir -p"
6485 else
6486 # As a last resort, use the slow shell script. Don't cache a
6487 # value for MKDIR_P within a source directory, because that will
6488 # break other packages using the cache if that directory is
6489 # removed, or if the value is a relative name.
6490 MKDIR_P="$ac_install_sh -d"
6491 fi
6492 fi
6493 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6494 printf "%s\n" "$MKDIR_P" >&6; }
6495
6496 for ac_prog in gawk mawk nawk awk
6497 do
6498 # Extract the first word of "$ac_prog", so it can be a program name with args.
6499 set dummy $ac_prog; ac_word=$2
6500 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6501 printf %s "checking for $ac_word... " >&6; }
6502 if test ${ac_cv_prog_AWK+y}
6503 then :
6504 printf %s "(cached) " >&6
6505 else $as_nop
6506 if test -n "$AWK"; then
6507 ac_cv_prog_AWK="$AWK" # Let the user override the test.
6508 else
6509 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6510 for as_dir in $PATH
6511 do
6512 IFS=$as_save_IFS
6513 case $as_dir in #(((
6514 '') as_dir=./ ;;
6515 */) ;;
6516 *) as_dir=$as_dir/ ;;
6517 esac
6518 for ac_exec_ext in '' $ac_executable_extensions; do
6519 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6520 ac_cv_prog_AWK="$ac_prog"
6521 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6522 break 2
6523 fi
6524 done
6525 done
6526 IFS=$as_save_IFS
6527
6528 fi
6529 fi
6530 AWK=$ac_cv_prog_AWK
6531 if test -n "$AWK"; then
6532 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6533 printf "%s\n" "$AWK" >&6; }
6534 else
6535 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6536 printf "%s\n" "no" >&6; }
6537 fi
6538
6539
6540 test -n "$AWK" && break
6541 done
6542
6543 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
6544 printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
6545 set x ${MAKE-make}
6546 ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
6547 if eval test \${ac_cv_prog_make_${ac_make}_set+y}
6548 then :
6549 printf %s "(cached) " >&6
6550 else $as_nop
6551 cat >conftest.make <<\_ACEOF
6552 SHELL = /bin/sh
6553 all:
6554 @echo '@@@%%%=$(MAKE)=@@@%%%'
6555 _ACEOF
6556 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
6557 case `${MAKE-make} -f conftest.make 2>/dev/null` in
6558 *@@@%%%=?*=@@@%%%*)
6559 eval ac_cv_prog_make_${ac_make}_set=yes;;
6560 *)
6561 eval ac_cv_prog_make_${ac_make}_set=no;;
6562 esac
6563 rm -f conftest.make
6564 fi
6565 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
6566 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6567 printf "%s\n" "yes" >&6; }
6568 SET_MAKE=
6569 else
6570 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6571 printf "%s\n" "no" >&6; }
6572 SET_MAKE="MAKE=${MAKE-make}"
6573 fi
6574
6575 rm -rf .tst 2>/dev/null
6576 mkdir .tst 2>/dev/null
6577 if test -d .tst; then
6578 am__leading_dot=.
6579 else
6580 am__leading_dot=_
6581 fi
6582 rmdir .tst 2>/dev/null
6583
6584 DEPDIR="${am__leading_dot}deps"
6585
6586 ac_config_commands="$ac_config_commands depfiles"
6587
6588 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
6589 printf %s "checking whether ${MAKE-make} supports the include directive... " >&6; }
6590 cat > confinc.mk << 'END'
6591 am__doit:
6592 @echo this is the am__doit target >confinc.out
6593 .PHONY: am__doit
6594 END
6595 am__include="#"
6596 am__quote=
6597 # BSD make does it like this.
6598 echo '.include "confinc.mk" # ignored' > confmf.BSD
6599 # Other make implementations (GNU, Solaris 10, AIX) do it like this.
6600 echo 'include confinc.mk # ignored' > confmf.GNU
6601 _am_result=no
6602 for s in GNU BSD; do
6603 { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5
6604 (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5
6605 ac_status=$?
6606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6607 (exit $ac_status); }
6608 case $?:`cat confinc.out 2>/dev/null` in #(
6609 '0:this is the am__doit target') :
6610 case $s in #(
6611 BSD) :
6612 am__include='.include' am__quote='"' ;; #(
6613 *) :
6614 am__include='include' am__quote='' ;;
6615 esac ;; #(
6616 *) :
6617 ;;
6618 esac
6619 if test "$am__include" != "#"; then
6620 _am_result="yes ($s style)"
6621 break
6622 fi
6623 done
6624 rm -f confinc.* confmf.*
6625 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
6626 printf "%s\n" "${_am_result}" >&6; }
6627
6628 # Check whether --enable-dependency-tracking was given.
6629 if test ${enable_dependency_tracking+y}
6630 then :
6631 enableval=$enable_dependency_tracking;
6632 fi
6633
6634 if test "x$enable_dependency_tracking" != xno; then
6635 am_depcomp="$ac_aux_dir/depcomp"
6636 AMDEPBACKSLASH='\'
6637 am__nodep='_no'
6638 fi
6639 if test "x$enable_dependency_tracking" != xno; then
6640 AMDEP_TRUE=
6641 AMDEP_FALSE='#'
6642 else
6643 AMDEP_TRUE='#'
6644 AMDEP_FALSE=
6645 fi
6646
6647
6648 # Check whether --enable-silent-rules was given.
6649 if test ${enable_silent_rules+y}
6650 then :
6651 enableval=$enable_silent_rules;
6652 fi
6653
6654 case $enable_silent_rules in # (((
6655 yes) AM_DEFAULT_VERBOSITY=0;;
6656 no) AM_DEFAULT_VERBOSITY=1;;
6657 *) AM_DEFAULT_VERBOSITY=1;;
6658 esac
6659 am_make=${MAKE-make}
6660 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
6661 printf %s "checking whether $am_make supports nested variables... " >&6; }
6662 if test ${am_cv_make_support_nested_variables+y}
6663 then :
6664 printf %s "(cached) " >&6
6665 else $as_nop
6666 if printf "%s\n" 'TRUE=$(BAR$(V))
6667 BAR0=false
6668 BAR1=true
6669 V=1
6670 am__doit:
6671 @$(TRUE)
6672 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
6673 am_cv_make_support_nested_variables=yes
6674 else
6675 am_cv_make_support_nested_variables=no
6676 fi
6677 fi
6678 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
6679 printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
6680 if test $am_cv_make_support_nested_variables = yes; then
6681 AM_V='$(V)'
6682 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
6683 else
6684 AM_V=$AM_DEFAULT_VERBOSITY
6685 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
6686 fi
6687 AM_BACKSLASH='\'
6688
6689 if test "`cd $srcdir && pwd`" != "`pwd`"; then
6690 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
6691 # is not polluted with repeated "-I."
6692 am__isrc=' -I$(srcdir)'
6693 # test to see if srcdir already configured
6694 if test -f $srcdir/config.status; then
6695 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
6696 fi
6697 fi
6698
6699 # test whether we have cygpath
6700 if test -z "$CYGPATH_W"; then
6701 if (cygpath --version) >/dev/null 2>/dev/null; then
6702 CYGPATH_W='cygpath -w'
6703 else
6704 CYGPATH_W=echo
6705 fi
6706 fi
6707
6708
6709 # Define the identity of the package.
6710 PACKAGE='grub'
6711 VERSION='2.14'
6712
6713
6714 printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
6715
6716
6717 printf "%s\n" "#define VERSION \"$VERSION\"" >>confdefs.h
6718
6719 # Some tools Automake needs.
6720
6721 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
6722
6723
6724 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
6725
6726
6727 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
6728
6729
6730 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
6731
6732
6733 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
6734
6735 # For better backward compatibility. To be removed once Automake 1.9.x
6736 # dies out for good. For more background, see:
6737 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
6738 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
6739 mkdir_p='$(MKDIR_P)'
6740
6741 # We need awk for the "check" target (and possibly the TAP driver). The
6742 # system "awk" is bad on some platforms.
6743 # Always define AMTAR for backward compatibility. Yes, it's still used
6744 # in the wild :-( We should find a proper way to deprecate it ...
6745 AMTAR='$${TAR-tar}'
6746
6747
6748 # We'll loop over all known methods to create a tar archive until one works.
6749 _am_tools='gnutar plaintar pax cpio none'
6750
6751 # The POSIX 1988 'ustar' format is defined with fixed-size fields.
6752 # There is notably a 21 bits limit for the UID and the GID. In fact,
6753 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
6754 # and bug#13588).
6755 am_max_uid=2097151 # 2^21 - 1
6756 am_max_gid=$am_max_uid
6757 # The $UID and $GID variables are not portable, so we need to resort
6758 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
6759 # below are definitely unexpected, so allow the users to see them
6760 # (that is, avoid stderr redirection).
6761 am_uid=`id -u || echo unknown`
6762 am_gid=`id -g || echo unknown`
6763 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether UID '$am_uid' is supported by ustar format" >&5
6764 printf %s "checking whether UID '$am_uid' is supported by ustar format... " >&6; }
6765 if test $am_uid -le $am_max_uid; then
6766 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6767 printf "%s\n" "yes" >&6; }
6768 else
6769 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6770 printf "%s\n" "no" >&6; }
6771 _am_tools=none
6772 fi
6773 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether GID '$am_gid' is supported by ustar format" >&5
6774 printf %s "checking whether GID '$am_gid' is supported by ustar format... " >&6; }
6775 if test $am_gid -le $am_max_gid; then
6776 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6777 printf "%s\n" "yes" >&6; }
6778 else
6779 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6780 printf "%s\n" "no" >&6; }
6781 _am_tools=none
6782 fi
6783
6784 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5
6785 printf %s "checking how to create a ustar tar archive... " >&6; }
6786
6787 # Go ahead even if we have the value already cached. We do so because we
6788 # need to set the values for the 'am__tar' and 'am__untar' variables.
6789 _am_tools=${am_cv_prog_tar_ustar-$_am_tools}
6790
6791 for _am_tool in $_am_tools; do
6792 case $_am_tool in
6793 gnutar)
6794 for _am_tar in tar gnutar gtar; do
6795 { echo "$as_me:$LINENO: $_am_tar --version" >&5
6796 ($_am_tar --version) >&5 2>&5
6797 ac_status=$?
6798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6799 (exit $ac_status); } && break
6800 done
6801 am__tar="$_am_tar --format=ustar -chf - "'"$$tardir"'
6802 am__tar_="$_am_tar --format=ustar -chf - "'"$tardir"'
6803 am__untar="$_am_tar -xf -"
6804 ;;
6805 plaintar)
6806 # Must skip GNU tar: if it does not support --format= it doesn't create
6807 # ustar tarball either.
6808 (tar --version) >/dev/null 2>&1 && continue
6809 am__tar='tar chf - "$$tardir"'
6810 am__tar_='tar chf - "$tardir"'
6811 am__untar='tar xf -'
6812 ;;
6813 pax)
6814 am__tar='pax -L -x ustar -w "$$tardir"'
6815 am__tar_='pax -L -x ustar -w "$tardir"'
6816 am__untar='pax -r'
6817 ;;
6818 cpio)
6819 am__tar='find "$$tardir" -print | cpio -o -H ustar -L'
6820 am__tar_='find "$tardir" -print | cpio -o -H ustar -L'
6821 am__untar='cpio -i -H ustar -d'
6822 ;;
6823 none)
6824 am__tar=false
6825 am__tar_=false
6826 am__untar=false
6827 ;;
6828 esac
6829
6830 # If the value was cached, stop now. We just wanted to have am__tar
6831 # and am__untar set.
6832 test -n "${am_cv_prog_tar_ustar}" && break
6833
6834 # tar/untar a dummy directory, and stop if the command works.
6835 rm -rf conftest.dir
6836 mkdir conftest.dir
6837 echo GrepMe > conftest.dir/file
6838 { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5
6839 (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5
6840 ac_status=$?
6841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6842 (exit $ac_status); }
6843 rm -rf conftest.dir
6844 if test -s conftest.tar; then
6845 { echo "$as_me:$LINENO: $am__untar <conftest.tar" >&5
6846 ($am__untar <conftest.tar) >&5 2>&5
6847 ac_status=$?
6848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6849 (exit $ac_status); }
6850 { echo "$as_me:$LINENO: cat conftest.dir/file" >&5
6851 (cat conftest.dir/file) >&5 2>&5
6852 ac_status=$?
6853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6854 (exit $ac_status); }
6855 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
6856 fi
6857 done
6858 rm -rf conftest.dir
6859
6860 if test ${am_cv_prog_tar_ustar+y}
6861 then :
6862 printf %s "(cached) " >&6
6863 else $as_nop
6864 am_cv_prog_tar_ustar=$_am_tool
6865 fi
6866
6867 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5
6868 printf "%s\n" "$am_cv_prog_tar_ustar" >&6; }
6869
6870
6871
6872
6873
6874 depcc="$CC" am_compiler_list=
6875
6876 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6877 printf %s "checking dependency style of $depcc... " >&6; }
6878 if test ${am_cv_CC_dependencies_compiler_type+y}
6879 then :
6880 printf %s "(cached) " >&6
6881 else $as_nop
6882 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
6883 # We make a subdir and do the tests there. Otherwise we can end up
6884 # making bogus files that we don't know about and never remove. For
6885 # instance it was reported that on HP-UX the gcc test will end up
6886 # making a dummy file named 'D' -- because '-MD' means "put the output
6887 # in D".
6888 rm -rf conftest.dir
6889 mkdir conftest.dir
6890 # Copy depcomp to subdir because otherwise we won't find it if we're
6891 # using a relative directory.
6892 cp "$am_depcomp" conftest.dir
6893 cd conftest.dir
6894 # We will build objects and dependencies in a subdirectory because
6895 # it helps to detect inapplicable dependency modes. For instance
6896 # both Tru64's cc and ICC support -MD to output dependencies as a
6897 # side effect of compilation, but ICC will put the dependencies in
6898 # the current directory while Tru64 will put them in the object
6899 # directory.
6900 mkdir sub
6901
6902 am_cv_CC_dependencies_compiler_type=none
6903 if test "$am_compiler_list" = ""; then
6904 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6905 fi
6906 am__universal=false
6907 case " $depcc " in #(
6908 *\ -arch\ *\ -arch\ *) am__universal=true ;;
6909 esac
6910
6911 for depmode in $am_compiler_list; do
6912 # Setup a source with many dependencies, because some compilers
6913 # like to wrap large dependency lists on column 80 (with \), and
6914 # we should not choose a depcomp mode which is confused by this.
6915 #
6916 # We need to recreate these files for each test, as the compiler may
6917 # overwrite some of them when testing with obscure command lines.
6918 # This happens at least with the AIX C compiler.
6919 : > sub/conftest.c
6920 for i in 1 2 3 4 5 6; do
6921 echo '#include "conftst'$i'.h"' >> sub/conftest.c
6922 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
6923 # Solaris 10 /bin/sh.
6924 echo '/* dummy */' > sub/conftst$i.h
6925 done
6926 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
6927
6928 # We check with '-c' and '-o' for the sake of the "dashmstdout"
6929 # mode. It turns out that the SunPro C++ compiler does not properly
6930 # handle '-M -o', and we need to detect this. Also, some Intel
6931 # versions had trouble with output in subdirs.
6932 am__obj=sub/conftest.${OBJEXT-o}
6933 am__minus_obj="-o $am__obj"
6934 case $depmode in
6935 gcc)
6936 # This depmode causes a compiler race in universal mode.
6937 test "$am__universal" = false || continue
6938 ;;
6939 nosideeffect)
6940 # After this tag, mechanisms are not by side-effect, so they'll
6941 # only be used when explicitly requested.
6942 if test "x$enable_dependency_tracking" = xyes; then
6943 continue
6944 else
6945 break
6946 fi
6947 ;;
6948 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
6949 # This compiler won't grok '-c -o', but also, the minuso test has
6950 # not run yet. These depmodes are late enough in the game, and
6951 # so weak that their functioning should not be impacted.
6952 am__obj=conftest.${OBJEXT-o}
6953 am__minus_obj=
6954 ;;
6955 none) break ;;
6956 esac
6957 if depmode=$depmode \
6958 source=sub/conftest.c object=$am__obj \
6959 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6960 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
6961 >/dev/null 2>conftest.err &&
6962 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
6963 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
6964 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
6965 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
6966 # icc doesn't choke on unknown options, it will just issue warnings
6967 # or remarks (even with -Werror). So we grep stderr for any message
6968 # that says an option was ignored or not supported.
6969 # When given -MP, icc 7.0 and 7.1 complain thusly:
6970 # icc: Command line warning: ignoring option '-M'; no argument required
6971 # The diagnosis changed in icc 8.0:
6972 # icc: Command line remark: option '-MP' not supported
6973 if (grep 'ignoring option' conftest.err ||
6974 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6975 am_cv_CC_dependencies_compiler_type=$depmode
6976 break
6977 fi
6978 fi
6979 done
6980
6981 cd ..
6982 rm -rf conftest.dir
6983 else
6984 am_cv_CC_dependencies_compiler_type=none
6985 fi
6986
6987 fi
6988 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6989 printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; }
6990 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6991
6992 if
6993 test "x$enable_dependency_tracking" != xno \
6994 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
6995 am__fastdepCC_TRUE=
6996 am__fastdepCC_FALSE='#'
6997 else
6998 am__fastdepCC_TRUE='#'
6999 am__fastdepCC_FALSE=
7000 fi
7001
7002
7003 # Variables for tags utilities; see am/tags.am
7004 if test -z "$CTAGS"; then
7005 CTAGS=ctags
7006 fi
7007
7008 if test -z "$ETAGS"; then
7009 ETAGS=etags
7010 fi
7011
7012 if test -z "$CSCOPE"; then
7013 CSCOPE=cscope
7014 fi
7015
7016
7017
7018 # POSIX will say in a future version that running "rm -f" with no argument
7019 # is OK; and we want to be able to make that assumption in our Makefile
7020 # recipes. So use an aggressive probe to check that the usage we want is
7021 # actually supported "in the wild" to an acceptable degree.
7022 # See automake bug#10828.
7023 # To make any issue more visible, cause the running configure to be aborted
7024 # by default if the 'rm' program in use doesn't match our expectations; the
7025 # user can still override this though.
7026 if rm -f && rm -fr && rm -rf; then : OK; else
7027 cat >&2 <<'END'
7028 Oops!
7029
7030 Your 'rm' program seems unable to run without file operands specified
7031 on the command line, even when the '-f' option is present. This is contrary
7032 to the behaviour of most rm programs out there, and not conforming with
7033 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
7034
7035 Please tell [email protected] about your system, including the value
7036 of your $PATH and any error possibly output before this message. This
7037 can help us improve future automake versions.
7038
7039 END
7040 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
7041 echo 'Configuration will proceed anyway, since you have set the' >&2
7042 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
7043 echo >&2
7044 else
7045 cat >&2 <<'END'
7046 Aborting the configuration process, to ensure you take notice of the issue.
7047
7048 You can download and install GNU coreutils to get an 'rm' implementation
7049 that behaves properly: <https://www.gnu.org/software/coreutils/>.
7050
7051 If you want to complete the configuration process using your problematic
7052 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
7053 to "yes", and re-run configure.
7054
7055 END
7056 as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
7057 fi
7058 fi
7059
7060
7061
7062 ac_config_headers="$ac_config_headers config-util.h"
7063
7064
7065 # Explicitly check for pkg-config early on, since otherwise conditional
7066 # calls are problematic.
7067
7068
7069
7070
7071
7072
7073
7074 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
7075 if test -n "$ac_tool_prefix"; then
7076 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
7077 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
7078 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7079 printf %s "checking for $ac_word... " >&6; }
7080 if test ${ac_cv_path_PKG_CONFIG+y}
7081 then :
7082 printf %s "(cached) " >&6
7083 else $as_nop
7084 case $PKG_CONFIG in
7085 [\\/]* | ?:[\\/]*)
7086 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
7087 ;;
7088 *)
7089 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7090 for as_dir in $PATH
7091 do
7092 IFS=$as_save_IFS
7093 case $as_dir in #(((
7094 '') as_dir=./ ;;
7095 */) ;;
7096 *) as_dir=$as_dir/ ;;
7097 esac
7098 for ac_exec_ext in '' $ac_executable_extensions; do
7099 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7100 ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
7101 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7102 break 2
7103 fi
7104 done
7105 done
7106 IFS=$as_save_IFS
7107
7108 ;;
7109 esac
7110 fi
7111 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
7112 if test -n "$PKG_CONFIG"; then
7113 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
7114 printf "%s\n" "$PKG_CONFIG" >&6; }
7115 else
7116 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7117 printf "%s\n" "no" >&6; }
7118 fi
7119
7120
7121 fi
7122 if test -z "$ac_cv_path_PKG_CONFIG"; then
7123 ac_pt_PKG_CONFIG=$PKG_CONFIG
7124 # Extract the first word of "pkg-config", so it can be a program name with args.
7125 set dummy pkg-config; ac_word=$2
7126 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7127 printf %s "checking for $ac_word... " >&6; }
7128 if test ${ac_cv_path_ac_pt_PKG_CONFIG+y}
7129 then :
7130 printf %s "(cached) " >&6
7131 else $as_nop
7132 case $ac_pt_PKG_CONFIG in
7133 [\\/]* | ?:[\\/]*)
7134 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
7135 ;;
7136 *)
7137 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7138 for as_dir in $PATH
7139 do
7140 IFS=$as_save_IFS
7141 case $as_dir in #(((
7142 '') as_dir=./ ;;
7143 */) ;;
7144 *) as_dir=$as_dir/ ;;
7145 esac
7146 for ac_exec_ext in '' $ac_executable_extensions; do
7147 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7148 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
7149 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7150 break 2
7151 fi
7152 done
7153 done
7154 IFS=$as_save_IFS
7155
7156 ;;
7157 esac
7158 fi
7159 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
7160 if test -n "$ac_pt_PKG_CONFIG"; then
7161 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
7162 printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; }
7163 else
7164 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7165 printf "%s\n" "no" >&6; }
7166 fi
7167
7168 if test "x$ac_pt_PKG_CONFIG" = x; then
7169 PKG_CONFIG=""
7170 else
7171 case $cross_compiling:$ac_tool_warned in
7172 yes:)
7173 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7174 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7175 ac_tool_warned=yes ;;
7176 esac
7177 PKG_CONFIG=$ac_pt_PKG_CONFIG
7178 fi
7179 else
7180 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
7181 fi
7182
7183 fi
7184 if test -n "$PKG_CONFIG"; then
7185 _pkg_min_version=0.9.0
7186 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
7187 printf %s "checking pkg-config is at least version $_pkg_min_version... " >&6; }
7188 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7189 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7190 printf "%s\n" "yes" >&6; }
7191 else
7192 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7193 printf "%s\n" "no" >&6; }
7194 PKG_CONFIG=""
7195 fi
7196 fi
7197
7198 # Program name transformations
7199
7200 grub_bios_setup=`printf "%s\n" grub-bios-setup | sed "$program_transform_name"`
7201
7202 grub_editenv=`printf "%s\n" grub-editenv | sed "$program_transform_name"`
7203
7204 grub_install=`printf "%s\n" grub-install | sed "$program_transform_name"`
7205
7206 grub_mkconfig=`printf "%s\n" grub-mkconfig | sed "$program_transform_name"`
7207
7208 grub_mkfont=`printf "%s\n" grub-mkfont | sed "$program_transform_name"`
7209
7210 grub_mkimage=`printf "%s\n" grub-mkimage | sed "$program_transform_name"`
7211
7212 grub_glue_efi=`printf "%s\n" grub-glue-efi | sed "$program_transform_name"`
7213
7214 grub_mklayout=`printf "%s\n" grub-mklayout | sed "$program_transform_name"`
7215
7216 grub_mkpasswd_pbkdf2=`printf "%s\n" grub-mkpasswd-pbkdf2 | sed "$program_transform_name"`
7217
7218 grub_mkrelpath=`printf "%s\n" grub-mkrelpath | sed "$program_transform_name"`
7219
7220 grub_mkrescue=`printf "%s\n" grub-mkrescue | sed "$program_transform_name"`
7221
7222 grub_probe=`printf "%s\n" grub-probe | sed "$program_transform_name"`
7223
7224 grub_protect=`printf "%s\n" grub-protect | sed "$program_transform_name"`
7225
7226 grub_reboot=`printf "%s\n" grub-reboot | sed "$program_transform_name"`
7227
7228 grub_script_check=`printf "%s\n" grub-script-check | sed "$program_transform_name"`
7229
7230 grub_set_default=`printf "%s\n" grub-set-default | sed "$program_transform_name"`
7231
7232 grub_sparc64_setup=`printf "%s\n" grub-sparc64-setup | sed "$program_transform_name"`
7233
7234 grub_render_label=`printf "%s\n" grub-render-label | sed "$program_transform_name"`
7235
7236 grub_file=`printf "%s\n" grub-file | sed "$program_transform_name"`
7237
7238
7239 # Allow HOST_CC to override CC.
7240 if test "x$HOST_CC" != x; then
7241 CC=$HOST_CC
7242 fi
7243
7244 # Optimization flag. Allow user to override.
7245 if test "x$TARGET_CFLAGS" = x; then
7246 TARGET_CFLAGS=-Os
7247 fi
7248
7249 # Enable support for "restrict" keyword and other
7250 # features from gnu99 C language standard.
7251 BUILD_CFLAGS="-std=gnu99 -fno-common $BUILD_CFLAGS"
7252 HOST_CFLAGS="-std=gnu99 -fno-common $HOST_CFLAGS"
7253 TARGET_CFLAGS="-std=gnu99 -fno-common $TARGET_CFLAGS"
7254
7255 # Default HOST_CPPFLAGS
7256 HOST_CPPFLAGS="$HOST_CPPFLAGS -Wall -W"
7257 HOST_CPPFLAGS="$HOST_CPPFLAGS -DGRUB_UTIL=1"
7258
7259 TARGET_CPPFLAGS="$TARGET_CPPFLAGS -Wall -W"
7260
7261 case "$target_cpu" in
7262 i[3456]86) target_cpu=i386 ;;
7263 amd64) target_cpu=x86_64 ;;
7264 sparc) target_cpu=sparc64 ;;
7265 mipsel|mips64el)
7266 target_cpu=mipsel
7267 machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_CPU_MIPSEL=1"
7268 ;;
7269 mips|mips64)
7270 target_cpu=mips
7271 machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_CPU_MIPS=1"
7272 ;;
7273 arm*) target_cpu=arm ;;
7274 aarch64*) target_cpu=arm64 ;;
7275 loongarch64) target_cpu=loongarch64 ;;
7276 riscv32*) target_cpu=riscv32 ;;
7277 riscv64*) target_cpu=riscv64 ;;
7278 esac
7279
7280 # Specify the platform (such as firmware).
7281
7282 # Check whether --with-platform was given.
7283 if test ${with_platform+y}
7284 then :
7285 withval=$with_platform;
7286 fi
7287
7288
7289 # Guess the platform if not specified.
7290 if test "x$with_platform" = x; then
7291 case "$target_cpu"-"$target_vendor" in
7292 i386-apple) platform=efi ;;
7293 i386-*) platform=pc ;;
7294 x86_64-apple) platform=efi ;;
7295 x86_64-*) platform=pc ;;
7296 powerpc-*) platform=ieee1275 ;;
7297 powerpc64-*) platform=ieee1275 ;;
7298 powerpc64le-*) platform=ieee1275 ;;
7299 sparc64-*) platform=ieee1275 ;;
7300 mipsel-*) platform=loongson ;;
7301 mips-*) platform=arc ;;
7302 ia64-*) platform=efi ;;
7303 arm-*) platform=uboot ;;
7304 arm64-*) platform=efi ;;
7305 loongarch64-*) platform=efi;;
7306 riscv32-*) platform=efi ;;
7307 riscv64-*) platform=efi ;;
7308 *)
7309 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unsupported CPU: \"$target_cpu\" - only building utilities" >&5
7310 printf "%s\n" "$as_me: WARNING: unsupported CPU: \"$target_cpu\" - only building utilities" >&2;}
7311 platform=none
7312 ;;
7313 esac
7314 else
7315 platform="$with_platform"
7316 fi
7317
7318 case "$target_cpu"-"$platform" in
7319 x86_64-efi) ;;
7320 x86_64-emu) ;;
7321 x86_64-xen) ;;
7322 x86_64-none) ;;
7323 x86_64-*) target_cpu=i386 ;;
7324 powerpc64-ieee1275) target_cpu=powerpc ;;
7325 powerpc64le-ieee1275) target_cpu=powerpc ;;
7326 esac
7327
7328 # Check if the platform is supported, make final adjustments.
7329 case "$target_cpu"-"$platform" in
7330 i386-efi) ;;
7331 x86_64-efi) ;;
7332 i386-xen) ;;
7333 i386-xen_pvh) ;;
7334 x86_64-xen) ;;
7335 i386-pc) ;;
7336 i386-multiboot) ;;
7337 i386-coreboot) ;;
7338 i386-linuxbios) platform=coreboot ;;
7339 i386-ieee1275) ;;
7340 i386-qemu) ;;
7341 powerpc-ieee1275) ;;
7342 sparc64-ieee1275) ;;
7343 ia64-efi) ;;
7344 mips-qemu_mips) ;;
7345 mips-qemu-mips) platform=qemu_mips;;
7346 mips-arc) ;;
7347 mipsel-arc) ;;
7348 mipsel-qemu_mips) ;;
7349 mipsel-qemu-mips) platform=qemu_mips;;
7350 mipsel-yeeloong) platform=loongson ;;
7351 mipsel-fuloong) platform=loongson ;;
7352 mipsel-loongson) ;;
7353 arm-uboot) ;;
7354 arm-coreboot) ;;
7355 arm-efi) ;;
7356 arm64-efi) ;;
7357 loongarch64-efi) ;;
7358 riscv32-efi) ;;
7359 riscv64-efi) ;;
7360 *-emu) ;;
7361 *-none) ;;
7362 *) as_fn_error $? "platform \"$platform\" is not supported for target CPU \"$target_cpu\"" "$LINENO" 5 ;;
7363 esac
7364
7365 if test x$platform != xemu ; then
7366 case "$target_cpu" in
7367 i386 | powerpc) target_m32=1 ;;
7368 x86_64 | sparc64) target_m64=1 ;;
7369 esac
7370 fi
7371
7372 if test x"$target_cpu-$platform" = xsparc64-emu ; then
7373 target_m64=1
7374 fi
7375
7376 case "$target_os" in
7377 windows* | mingw32*) target_os=cygwin ;;
7378 esac
7379
7380 # This normalizes the names, and creates a new variable ("host_kernel")
7381 # while at it, since the mapping is not always 1:1 (e.g. different OSes
7382 # using the same kernel type).
7383 case "$host_os" in
7384 gnu*) host_kernel=hurd ;;
7385 linux*) host_kernel=linux ;;
7386 freebsd* | kfreebsd*-gnu) host_kernel=kfreebsd ;;
7387 netbsd*) host_kernel=netbsd ;;
7388 solaris*) host_kernel=illumos ;;
7389 darwin*) host_kernel=xnu ;;
7390 cygwin | windows* | mingw32*) host_kernel=windows ;;
7391 esac
7392
7393 case "$host_os" in
7394 cygwin) have_exec=y ;;
7395 windows* | mingw32*) have_exec=n ;;
7396 aros*) have_exec=n ;;
7397 *) have_exec=y;;
7398 esac
7399
7400 case "$platform" in
7401 coreboot) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_COREBOOT=1" ;;
7402 multiboot) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_MULTIBOOT=1" ;;
7403 efi) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_EFI=1" ;;
7404 xen) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_XEN=1" ;;
7405 xen_pvh) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_XEN_PVH=1" ;;
7406 ieee1275) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_IEEE1275=1" ;;
7407 uboot) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_UBOOT=1" ;;
7408 qemu) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_QEMU=1" ;;
7409 pc) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_PCBIOS=1" ;;
7410 emu) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_EMU=1" ;;
7411 loongson) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_MIPS_LOONGSON=1" ;;
7412 qemu_mips) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_MIPS_QEMU_MIPS=1" ;;
7413 arc) machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE_ARC=1" ;;
7414 esac
7415 if test x${target_cpu} = xmipsel ; then
7416 machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE=`echo mips_$platform | sed y,abcdefghijklmnopqrstuvwxyz,ABCDEFGHIJKLMNOPQRSTUVWXYZ,`"
7417 else
7418 machine_CPPFLAGS="$machine_CPPFLAGS -DGRUB_MACHINE=`echo ${target_cpu}_$platform | sed y,abcdefghijklmnopqrstuvwxyz,ABCDEFGHIJKLMNOPQRSTUVWXYZ,`"
7419 fi
7420
7421 case "${target_cpu}-$platform" in
7422 mips-arc)
7423 TARGET_LINK_ADDR=0x88200000
7424 TARGET_DECOMPRESSOR_LINK_ADDR=0x88100000
7425 ;;
7426 mipsel-arc)
7427 TARGET_LINK_ADDR=0x80700000
7428 TARGET_DECOMPRESSOR_LINK_ADDR=0x80600000
7429 ;;
7430 mips*-qemu_mips | mips*-loongson)
7431 TARGET_DECOMPRESSOR_LINK_ADDR=0x80100000
7432 ;;
7433 esac
7434
7435
7436
7437
7438 TARGET_CPPFLAGS="$TARGET_CPPFLAGS $machine_CPPFLAGS"
7439
7440
7441
7442
7443
7444
7445
7446
7447 # Define default variables
7448
7449 have_with_bootdir=n
7450
7451 # Check whether --with-bootdir was given.
7452 if test ${with_bootdir+y}
7453 then :
7454 withval=$with_bootdir; have_with_bootdir=y
7455 else $as_nop
7456 have_with_bootdir=n
7457 fi
7458
7459 if test x$have_with_bootdir = xy; then
7460 bootdirname="$with_bootdir"
7461 else
7462 case "$host_os" in
7463 netbsd* | openbsd*)
7464 # Because /boot is used for the boot block in NetBSD and OpenBSD,
7465 bootdirname='' ;;
7466 *) bootdirname='boot' ;;
7467 esac
7468 fi
7469
7470
7471
7472 printf "%s\n" "#define GRUB_BOOT_DIR_NAME \"$bootdirname\"" >>confdefs.h
7473
7474
7475
7476 # Check whether --with-grubdir was given.
7477 if test ${with_grubdir+y}
7478 then :
7479 withval=$with_grubdir; grubdirname="$with_grubdir"
7480 else $as_nop
7481 grubdirname="$PACKAGE"
7482 fi
7483
7484
7485
7486
7487 printf "%s\n" "#define GRUB_DIR_NAME \"$grubdirname\"" >>confdefs.h
7488
7489
7490 #
7491 # Checks for build programs.
7492 #
7493
7494 # Although cmp is listed in the GNU Coding Standards as a command which
7495 # can used directly, OpenBSD lacks cmp in the default installation.
7496 for ac_prog in cmp
7497 do
7498 # Extract the first word of "$ac_prog", so it can be a program name with args.
7499 set dummy $ac_prog; ac_word=$2
7500 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7501 printf %s "checking for $ac_word... " >&6; }
7502 if test ${ac_cv_prog_CMP+y}
7503 then :
7504 printf %s "(cached) " >&6
7505 else $as_nop
7506 if test -n "$CMP"; then
7507 ac_cv_prog_CMP="$CMP" # Let the user override the test.
7508 else
7509 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7510 for as_dir in $PATH
7511 do
7512 IFS=$as_save_IFS
7513 case $as_dir in #(((
7514 '') as_dir=./ ;;
7515 */) ;;
7516 *) as_dir=$as_dir/ ;;
7517 esac
7518 for ac_exec_ext in '' $ac_executable_extensions; do
7519 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7520 ac_cv_prog_CMP="$ac_prog"
7521 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7522 break 2
7523 fi
7524 done
7525 done
7526 IFS=$as_save_IFS
7527
7528 fi
7529 fi
7530 CMP=$ac_cv_prog_CMP
7531 if test -n "$CMP"; then
7532 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
7533 printf "%s\n" "$CMP" >&6; }
7534 else
7535 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7536 printf "%s\n" "no" >&6; }
7537 fi
7538
7539
7540 test -n "$CMP" && break
7541 done
7542
7543 if test "x$CMP" = x; then
7544 as_fn_error $? "cmp is not found" "$LINENO" 5
7545 fi
7546
7547 for ac_prog in bison
7548 do
7549 # Extract the first word of "$ac_prog", so it can be a program name with args.
7550 set dummy $ac_prog; ac_word=$2
7551 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7552 printf %s "checking for $ac_word... " >&6; }
7553 if test ${ac_cv_prog_YACC+y}
7554 then :
7555 printf %s "(cached) " >&6
7556 else $as_nop
7557 if test -n "$YACC"; then
7558 ac_cv_prog_YACC="$YACC" # Let the user override the test.
7559 else
7560 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7561 for as_dir in $PATH
7562 do
7563 IFS=$as_save_IFS
7564 case $as_dir in #(((
7565 '') as_dir=./ ;;
7566 */) ;;
7567 *) as_dir=$as_dir/ ;;
7568 esac
7569 for ac_exec_ext in '' $ac_executable_extensions; do
7570 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7571 ac_cv_prog_YACC="$ac_prog"
7572 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7573 break 2
7574 fi
7575 done
7576 done
7577 IFS=$as_save_IFS
7578
7579 fi
7580 fi
7581 YACC=$ac_cv_prog_YACC
7582 if test -n "$YACC"; then
7583 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7584 printf "%s\n" "$YACC" >&6; }
7585 else
7586 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7587 printf "%s\n" "no" >&6; }
7588 fi
7589
7590
7591 test -n "$YACC" && break
7592 done
7593
7594 if test "x$YACC" = x; then
7595 as_fn_error $? "bison is not found" "$LINENO" 5
7596 fi
7597
7598 if test -n "$ac_tool_prefix"; then
7599 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7600 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7601 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7602 printf %s "checking for $ac_word... " >&6; }
7603 if test ${ac_cv_prog_RANLIB+y}
7604 then :
7605 printf %s "(cached) " >&6
7606 else $as_nop
7607 if test -n "$RANLIB"; then
7608 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7609 else
7610 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7611 for as_dir in $PATH
7612 do
7613 IFS=$as_save_IFS
7614 case $as_dir in #(((
7615 '') as_dir=./ ;;
7616 */) ;;
7617 *) as_dir=$as_dir/ ;;
7618 esac
7619 for ac_exec_ext in '' $ac_executable_extensions; do
7620 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7621 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7622 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7623 break 2
7624 fi
7625 done
7626 done
7627 IFS=$as_save_IFS
7628
7629 fi
7630 fi
7631 RANLIB=$ac_cv_prog_RANLIB
7632 if test -n "$RANLIB"; then
7633 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7634 printf "%s\n" "$RANLIB" >&6; }
7635 else
7636 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7637 printf "%s\n" "no" >&6; }
7638 fi
7639
7640
7641 fi
7642 if test -z "$ac_cv_prog_RANLIB"; then
7643 ac_ct_RANLIB=$RANLIB
7644 # Extract the first word of "ranlib", so it can be a program name with args.
7645 set dummy ranlib; ac_word=$2
7646 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7647 printf %s "checking for $ac_word... " >&6; }
7648 if test ${ac_cv_prog_ac_ct_RANLIB+y}
7649 then :
7650 printf %s "(cached) " >&6
7651 else $as_nop
7652 if test -n "$ac_ct_RANLIB"; then
7653 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7654 else
7655 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7656 for as_dir in $PATH
7657 do
7658 IFS=$as_save_IFS
7659 case $as_dir in #(((
7660 '') as_dir=./ ;;
7661 */) ;;
7662 *) as_dir=$as_dir/ ;;
7663 esac
7664 for ac_exec_ext in '' $ac_executable_extensions; do
7665 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7666 ac_cv_prog_ac_ct_RANLIB="ranlib"
7667 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7668 break 2
7669 fi
7670 done
7671 done
7672 IFS=$as_save_IFS
7673
7674 fi
7675 fi
7676 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7677 if test -n "$ac_ct_RANLIB"; then
7678 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7679 printf "%s\n" "$ac_ct_RANLIB" >&6; }
7680 else
7681 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7682 printf "%s\n" "no" >&6; }
7683 fi
7684
7685 if test "x$ac_ct_RANLIB" = x; then
7686 RANLIB=":"
7687 else
7688 case $cross_compiling:$ac_tool_warned in
7689 yes:)
7690 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7691 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7692 ac_tool_warned=yes ;;
7693 esac
7694 RANLIB=$ac_ct_RANLIB
7695 fi
7696 else
7697 RANLIB="$ac_cv_prog_RANLIB"
7698 fi
7699
7700
7701 for ac_prog in gawk mawk nawk awk
7702 do
7703 # Extract the first word of "$ac_prog", so it can be a program name with args.
7704 set dummy $ac_prog; ac_word=$2
7705 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7706 printf %s "checking for $ac_word... " >&6; }
7707 if test ${ac_cv_prog_AWK+y}
7708 then :
7709 printf %s "(cached) " >&6
7710 else $as_nop
7711 if test -n "$AWK"; then
7712 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7713 else
7714 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7715 for as_dir in $PATH
7716 do
7717 IFS=$as_save_IFS
7718 case $as_dir in #(((
7719 '') as_dir=./ ;;
7720 */) ;;
7721 *) as_dir=$as_dir/ ;;
7722 esac
7723 for ac_exec_ext in '' $ac_executable_extensions; do
7724 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7725 ac_cv_prog_AWK="$ac_prog"
7726 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7727 break 2
7728 fi
7729 done
7730 done
7731 IFS=$as_save_IFS
7732
7733 fi
7734 fi
7735 AWK=$ac_cv_prog_AWK
7736 if test -n "$AWK"; then
7737 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7738 printf "%s\n" "$AWK" >&6; }
7739 else
7740 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7741 printf "%s\n" "no" >&6; }
7742 fi
7743
7744
7745 test -n "$AWK" && break
7746 done
7747
7748 for ac_prog in flex lex
7749 do
7750 # Extract the first word of "$ac_prog", so it can be a program name with args.
7751 set dummy $ac_prog; ac_word=$2
7752 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7753 printf %s "checking for $ac_word... " >&6; }
7754 if test ${ac_cv_prog_LEX+y}
7755 then :
7756 printf %s "(cached) " >&6
7757 else $as_nop
7758 if test -n "$LEX"; then
7759 ac_cv_prog_LEX="$LEX" # Let the user override the test.
7760 else
7761 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7762 for as_dir in $PATH
7763 do
7764 IFS=$as_save_IFS
7765 case $as_dir in #(((
7766 '') as_dir=./ ;;
7767 */) ;;
7768 *) as_dir=$as_dir/ ;;
7769 esac
7770 for ac_exec_ext in '' $ac_executable_extensions; do
7771 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7772 ac_cv_prog_LEX="$ac_prog"
7773 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7774 break 2
7775 fi
7776 done
7777 done
7778 IFS=$as_save_IFS
7779
7780 fi
7781 fi
7782 LEX=$ac_cv_prog_LEX
7783 if test -n "$LEX"; then
7784 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
7785 printf "%s\n" "$LEX" >&6; }
7786 else
7787 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7788 printf "%s\n" "no" >&6; }
7789 fi
7790
7791
7792 test -n "$LEX" && break
7793 done
7794 test -n "$LEX" || LEX=":"
7795
7796 if test "x$LEX" != "x:"; then
7797 cat >conftest.l <<_ACEOF
7798 %{
7799 #ifdef __cplusplus
7800 extern "C"
7801 #endif
7802 int yywrap(void);
7803 %}
7804 %%
7805 a { ECHO; }
7806 b { REJECT; }
7807 c { yymore (); }
7808 d { yyless (1); }
7809 e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument. */
7810 #ifdef __cplusplus
7811 yyless ((yyinput () != 0));
7812 #else
7813 yyless ((input () != 0));
7814 #endif
7815 }
7816 f { unput (yytext[0]); }
7817 . { BEGIN INITIAL; }
7818 %%
7819 #ifdef YYTEXT_POINTER
7820 extern char *yytext;
7821 #endif
7822 int
7823 yywrap (void)
7824 {
7825 return 1;
7826 }
7827 int
7828 main (void)
7829 {
7830 return ! yylex ();
7831 }
7832 _ACEOF
7833 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lex output file root" >&5
7834 printf %s "checking for lex output file root... " >&6; }
7835 if test ${ac_cv_prog_lex_root+y}
7836 then :
7837 printf %s "(cached) " >&6
7838 else $as_nop
7839
7840 ac_cv_prog_lex_root=unknown
7841 { { ac_try="$LEX conftest.l"
7842 case "(($ac_try" in
7843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7844 *) ac_try_echo=$ac_try;;
7845 esac
7846 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
7847 printf "%s\n" "$ac_try_echo"; } >&5
7848 (eval "$LEX conftest.l") 2>&5
7849 ac_status=$?
7850 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7851 test $ac_status = 0; } &&
7852 if test -f lex.yy.c; then
7853 ac_cv_prog_lex_root=lex.yy
7854 elif test -f lexyy.c; then
7855 ac_cv_prog_lex_root=lexyy
7856 fi
7857 fi
7858 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
7859 printf "%s\n" "$ac_cv_prog_lex_root" >&6; }
7860 if test "$ac_cv_prog_lex_root" = unknown
7861 then :
7862 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot find output from $LEX; giving up on $LEX" >&5
7863 printf "%s\n" "$as_me: WARNING: cannot find output from $LEX; giving up on $LEX" >&2;}
7864 LEX=: LEXLIB=
7865 fi
7866 LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
7867
7868 if test ${LEXLIB+y}
7869 then :
7870
7871 else $as_nop
7872
7873 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lex library" >&5
7874 printf %s "checking for lex library... " >&6; }
7875 if test ${ac_cv_lib_lex+y}
7876 then :
7877 printf %s "(cached) " >&6
7878 else $as_nop
7879
7880 ac_save_LIBS="$LIBS"
7881 ac_found=false
7882 for ac_cv_lib_lex in 'none needed' -lfl -ll 'not found'; do
7883 case $ac_cv_lib_lex in #(
7884 'none needed') :
7885 ;; #(
7886 'not found') :
7887 break ;; #(
7888 *) :
7889 LIBS="$ac_cv_lib_lex $ac_save_LIBS" ;; #(
7890 *) :
7891 ;;
7892 esac
7893
7894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7895 /* end confdefs.h. */
7896 `cat $LEX_OUTPUT_ROOT.c`
7897 _ACEOF
7898 if ac_fn_c_try_link "$LINENO"
7899 then :
7900 ac_found=:
7901 fi
7902 rm -f core conftest.err conftest.$ac_objext conftest.beam \
7903 conftest$ac_exeext conftest.$ac_ext
7904 if $ac_found; then
7905 break
7906 fi
7907 done
7908 LIBS="$ac_save_LIBS"
7909
7910 fi
7911 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
7912 printf "%s\n" "$ac_cv_lib_lex" >&6; }
7913 if test "$ac_cv_lib_lex" = 'not found'
7914 then :
7915 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: required lex library not found; giving up on $LEX" >&5
7916 printf "%s\n" "$as_me: WARNING: required lex library not found; giving up on $LEX" >&2;}
7917 LEX=: LEXLIB=
7918 elif test "$ac_cv_lib_lex" = 'none needed'
7919 then :
7920 LEXLIB=''
7921 else $as_nop
7922 LEXLIB=$ac_cv_lib_lex
7923 fi
7924
7925 fi
7926
7927
7928 if test "$LEX" != :
7929 then :
7930
7931 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
7932 printf %s "checking whether yytext is a pointer... " >&6; }
7933 if test ${ac_cv_prog_lex_yytext_pointer+y}
7934 then :
7935 printf %s "(cached) " >&6
7936 else $as_nop
7937 # POSIX says lex can declare yytext either as a pointer or an array; the
7938 # default is implementation-dependent. Figure out which it is, since
7939 # not all implementations provide the %pointer and %array declarations.
7940 ac_cv_prog_lex_yytext_pointer=no
7941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7942 /* end confdefs.h. */
7943
7944 #define YYTEXT_POINTER 1
7945 `cat $LEX_OUTPUT_ROOT.c`
7946 _ACEOF
7947 if ac_fn_c_try_compile "$LINENO"
7948 then :
7949 ac_cv_prog_lex_yytext_pointer=yes
7950 fi
7951 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7952
7953 fi
7954 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
7955 printf "%s\n" "$ac_cv_prog_lex_yytext_pointer" >&6; }
7956 if test $ac_cv_prog_lex_yytext_pointer = yes; then
7957
7958 printf "%s\n" "#define YYTEXT_POINTER 1" >>confdefs.h
7959
7960 fi
7961
7962 fi
7963 rm -f conftest.l $LEX_OUTPUT_ROOT.c
7964
7965 fi
7966 for ac_prog in 'bison -y' byacc
7967 do
7968 # Extract the first word of "$ac_prog", so it can be a program name with args.
7969 set dummy $ac_prog; ac_word=$2
7970 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7971 printf %s "checking for $ac_word... " >&6; }
7972 if test ${ac_cv_prog_YACC+y}
7973 then :
7974 printf %s "(cached) " >&6
7975 else $as_nop
7976 if test -n "$YACC"; then
7977 ac_cv_prog_YACC="$YACC" # Let the user override the test.
7978 else
7979 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7980 for as_dir in $PATH
7981 do
7982 IFS=$as_save_IFS
7983 case $as_dir in #(((
7984 '') as_dir=./ ;;
7985 */) ;;
7986 *) as_dir=$as_dir/ ;;
7987 esac
7988 for ac_exec_ext in '' $ac_executable_extensions; do
7989 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7990 ac_cv_prog_YACC="$ac_prog"
7991 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7992 break 2
7993 fi
7994 done
7995 done
7996 IFS=$as_save_IFS
7997
7998 fi
7999 fi
8000 YACC=$ac_cv_prog_YACC
8001 if test -n "$YACC"; then
8002 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
8003 printf "%s\n" "$YACC" >&6; }
8004 else
8005 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8006 printf "%s\n" "no" >&6; }
8007 fi
8008
8009
8010 test -n "$YACC" && break
8011 done
8012 test -n "$YACC" || YACC="yacc"
8013
8014 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
8015 printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
8016 set x ${MAKE-make}
8017 ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
8018 if eval test \${ac_cv_prog_make_${ac_make}_set+y}
8019 then :
8020 printf %s "(cached) " >&6
8021 else $as_nop
8022 cat >conftest.make <<\_ACEOF
8023 SHELL = /bin/sh
8024 all:
8025 @echo '@@@%%%=$(MAKE)=@@@%%%'
8026 _ACEOF
8027 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
8028 case `${MAKE-make} -f conftest.make 2>/dev/null` in
8029 *@@@%%%=?*=@@@%%%*)
8030 eval ac_cv_prog_make_${ac_make}_set=yes;;
8031 *)
8032 eval ac_cv_prog_make_${ac_make}_set=no;;
8033 esac
8034 rm -f conftest.make
8035 fi
8036 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
8037 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8038 printf "%s\n" "yes" >&6; }
8039 SET_MAKE=
8040 else
8041 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8042 printf "%s\n" "no" >&6; }
8043 SET_MAKE="MAKE=${MAKE-make}"
8044 fi
8045
8046
8047 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
8048 printf %s "checking whether ln -s works... " >&6; }
8049 LN_S=$as_ln_s
8050 if test "$LN_S" = "ln -s"; then
8051 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8052 printf "%s\n" "yes" >&6; }
8053 else
8054 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
8055 printf "%s\n" "no, using $LN_S" >&6; }
8056 fi
8057
8058
8059 if test "x$LEX" = "x:"; then
8060 as_fn_error $? "flex is not found" "$LINENO" 5
8061 else
8062 version=`$LEX --version | $AWK '{ split($2,x,"."); print x[1]*10000+x[2]*100+x[3]; }'`
8063 if test -n "$version" -a "$version" -ge 20535; then
8064 :
8065 else
8066 as_fn_error $? "flex is too old. GRUB requires 2.5.35 or above" "$LINENO" 5
8067 fi
8068 fi
8069
8070 # These are not a "must".
8071 for ac_prog in makeinfo true
8072 do
8073 # Extract the first word of "$ac_prog", so it can be a program name with args.
8074 set dummy $ac_prog; ac_word=$2
8075 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8076 printf %s "checking for $ac_word... " >&6; }
8077 if test ${ac_cv_path_MAKEINFO+y}
8078 then :
8079 printf %s "(cached) " >&6
8080 else $as_nop
8081 case $MAKEINFO in
8082 [\\/]* | ?:[\\/]*)
8083 ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path.
8084 ;;
8085 *)
8086 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8087 for as_dir in $PATH
8088 do
8089 IFS=$as_save_IFS
8090 case $as_dir in #(((
8091 '') as_dir=./ ;;
8092 */) ;;
8093 *) as_dir=$as_dir/ ;;
8094 esac
8095 for ac_exec_ext in '' $ac_executable_extensions; do
8096 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8097 ac_cv_path_MAKEINFO="$as_dir$ac_word$ac_exec_ext"
8098 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8099 break 2
8100 fi
8101 done
8102 done
8103 IFS=$as_save_IFS
8104
8105 ;;
8106 esac
8107 fi
8108 MAKEINFO=$ac_cv_path_MAKEINFO
8109 if test -n "$MAKEINFO"; then
8110 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5
8111 printf "%s\n" "$MAKEINFO" >&6; }
8112 else
8113 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8114 printf "%s\n" "no" >&6; }
8115 fi
8116
8117
8118 test -n "$MAKEINFO" && break
8119 done
8120
8121
8122 #
8123 # Checks for host programs.
8124 #
8125
8126 ac_ext=c
8127 ac_cpp='$CPP $CPPFLAGS'
8128 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8129 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8130 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8131 if test -n "$ac_tool_prefix"; then
8132 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
8133 set dummy ${ac_tool_prefix}gcc; ac_word=$2
8134 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8135 printf %s "checking for $ac_word... " >&6; }
8136 if test ${ac_cv_prog_CC+y}
8137 then :
8138 printf %s "(cached) " >&6
8139 else $as_nop
8140 if test -n "$CC"; then
8141 ac_cv_prog_CC="$CC" # Let the user override the test.
8142 else
8143 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8144 for as_dir in $PATH
8145 do
8146 IFS=$as_save_IFS
8147 case $as_dir in #(((
8148 '') as_dir=./ ;;
8149 */) ;;
8150 *) as_dir=$as_dir/ ;;
8151 esac
8152 for ac_exec_ext in '' $ac_executable_extensions; do
8153 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8154 ac_cv_prog_CC="${ac_tool_prefix}gcc"
8155 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8156 break 2
8157 fi
8158 done
8159 done
8160 IFS=$as_save_IFS
8161
8162 fi
8163 fi
8164 CC=$ac_cv_prog_CC
8165 if test -n "$CC"; then
8166 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
8167 printf "%s\n" "$CC" >&6; }
8168 else
8169 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8170 printf "%s\n" "no" >&6; }
8171 fi
8172
8173
8174 fi
8175 if test -z "$ac_cv_prog_CC"; then
8176 ac_ct_CC=$CC
8177 # Extract the first word of "gcc", so it can be a program name with args.
8178 set dummy gcc; ac_word=$2
8179 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8180 printf %s "checking for $ac_word... " >&6; }
8181 if test ${ac_cv_prog_ac_ct_CC+y}
8182 then :
8183 printf %s "(cached) " >&6
8184 else $as_nop
8185 if test -n "$ac_ct_CC"; then
8186 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
8187 else
8188 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8189 for as_dir in $PATH
8190 do
8191 IFS=$as_save_IFS
8192 case $as_dir in #(((
8193 '') as_dir=./ ;;
8194 */) ;;
8195 *) as_dir=$as_dir/ ;;
8196 esac
8197 for ac_exec_ext in '' $ac_executable_extensions; do
8198 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8199 ac_cv_prog_ac_ct_CC="gcc"
8200 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8201 break 2
8202 fi
8203 done
8204 done
8205 IFS=$as_save_IFS
8206
8207 fi
8208 fi
8209 ac_ct_CC=$ac_cv_prog_ac_ct_CC
8210 if test -n "$ac_ct_CC"; then
8211 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
8212 printf "%s\n" "$ac_ct_CC" >&6; }
8213 else
8214 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8215 printf "%s\n" "no" >&6; }
8216 fi
8217
8218 if test "x$ac_ct_CC" = x; then
8219 CC=""
8220 else
8221 case $cross_compiling:$ac_tool_warned in
8222 yes:)
8223 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8224 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8225 ac_tool_warned=yes ;;
8226 esac
8227 CC=$ac_ct_CC
8228 fi
8229 else
8230 CC="$ac_cv_prog_CC"
8231 fi
8232
8233 if test -z "$CC"; then
8234 if test -n "$ac_tool_prefix"; then
8235 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
8236 set dummy ${ac_tool_prefix}cc; ac_word=$2
8237 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8238 printf %s "checking for $ac_word... " >&6; }
8239 if test ${ac_cv_prog_CC+y}
8240 then :
8241 printf %s "(cached) " >&6
8242 else $as_nop
8243 if test -n "$CC"; then
8244 ac_cv_prog_CC="$CC" # Let the user override the test.
8245 else
8246 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8247 for as_dir in $PATH
8248 do
8249 IFS=$as_save_IFS
8250 case $as_dir in #(((
8251 '') as_dir=./ ;;
8252 */) ;;
8253 *) as_dir=$as_dir/ ;;
8254 esac
8255 for ac_exec_ext in '' $ac_executable_extensions; do
8256 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8257 ac_cv_prog_CC="${ac_tool_prefix}cc"
8258 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8259 break 2
8260 fi
8261 done
8262 done
8263 IFS=$as_save_IFS
8264
8265 fi
8266 fi
8267 CC=$ac_cv_prog_CC
8268 if test -n "$CC"; then
8269 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
8270 printf "%s\n" "$CC" >&6; }
8271 else
8272 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8273 printf "%s\n" "no" >&6; }
8274 fi
8275
8276
8277 fi
8278 fi
8279 if test -z "$CC"; then
8280 # Extract the first word of "cc", so it can be a program name with args.
8281 set dummy cc; ac_word=$2
8282 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8283 printf %s "checking for $ac_word... " >&6; }
8284 if test ${ac_cv_prog_CC+y}
8285 then :
8286 printf %s "(cached) " >&6
8287 else $as_nop
8288 if test -n "$CC"; then
8289 ac_cv_prog_CC="$CC" # Let the user override the test.
8290 else
8291 ac_prog_rejected=no
8292 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8293 for as_dir in $PATH
8294 do
8295 IFS=$as_save_IFS
8296 case $as_dir in #(((
8297 '') as_dir=./ ;;
8298 */) ;;
8299 *) as_dir=$as_dir/ ;;
8300 esac
8301 for ac_exec_ext in '' $ac_executable_extensions; do
8302 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8303 if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
8304 ac_prog_rejected=yes
8305 continue
8306 fi
8307 ac_cv_prog_CC="cc"
8308 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8309 break 2
8310 fi
8311 done
8312 done
8313 IFS=$as_save_IFS
8314
8315 if test $ac_prog_rejected = yes; then
8316 # We found a bogon in the path, so make sure we never use it.
8317 set dummy $ac_cv_prog_CC
8318 shift
8319 if test $# != 0; then
8320 # We chose a different compiler from the bogus one.
8321 # However, it has the same basename, so the bogon will be chosen
8322 # first if we set CC to just the basename; use the full file name.
8323 shift
8324 ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
8325 fi
8326 fi
8327 fi
8328 fi
8329 CC=$ac_cv_prog_CC
8330 if test -n "$CC"; then
8331 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
8332 printf "%s\n" "$CC" >&6; }
8333 else
8334 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8335 printf "%s\n" "no" >&6; }
8336 fi
8337
8338
8339 fi
8340 if test -z "$CC"; then
8341 if test -n "$ac_tool_prefix"; then
8342 for ac_prog in cl.exe
8343 do
8344 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8345 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8346 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8347 printf %s "checking for $ac_word... " >&6; }
8348 if test ${ac_cv_prog_CC+y}
8349 then :
8350 printf %s "(cached) " >&6
8351 else $as_nop
8352 if test -n "$CC"; then
8353 ac_cv_prog_CC="$CC" # Let the user override the test.
8354 else
8355 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8356 for as_dir in $PATH
8357 do
8358 IFS=$as_save_IFS
8359 case $as_dir in #(((
8360 '') as_dir=./ ;;
8361 */) ;;
8362 *) as_dir=$as_dir/ ;;
8363 esac
8364 for ac_exec_ext in '' $ac_executable_extensions; do
8365 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8366 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
8367 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8368 break 2
8369 fi
8370 done
8371 done
8372 IFS=$as_save_IFS
8373
8374 fi
8375 fi
8376 CC=$ac_cv_prog_CC
8377 if test -n "$CC"; then
8378 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
8379 printf "%s\n" "$CC" >&6; }
8380 else
8381 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8382 printf "%s\n" "no" >&6; }
8383 fi
8384
8385
8386 test -n "$CC" && break
8387 done
8388 fi
8389 if test -z "$CC"; then
8390 ac_ct_CC=$CC
8391 for ac_prog in cl.exe
8392 do
8393 # Extract the first word of "$ac_prog", so it can be a program name with args.
8394 set dummy $ac_prog; ac_word=$2
8395 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8396 printf %s "checking for $ac_word... " >&6; }
8397 if test ${ac_cv_prog_ac_ct_CC+y}
8398 then :
8399 printf %s "(cached) " >&6
8400 else $as_nop
8401 if test -n "$ac_ct_CC"; then
8402 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
8403 else
8404 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8405 for as_dir in $PATH
8406 do
8407 IFS=$as_save_IFS
8408 case $as_dir in #(((
8409 '') as_dir=./ ;;
8410 */) ;;
8411 *) as_dir=$as_dir/ ;;
8412 esac
8413 for ac_exec_ext in '' $ac_executable_extensions; do
8414 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8415 ac_cv_prog_ac_ct_CC="$ac_prog"
8416 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8417 break 2
8418 fi
8419 done
8420 done
8421 IFS=$as_save_IFS
8422
8423 fi
8424 fi
8425 ac_ct_CC=$ac_cv_prog_ac_ct_CC
8426 if test -n "$ac_ct_CC"; then
8427 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
8428 printf "%s\n" "$ac_ct_CC" >&6; }
8429 else
8430 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8431 printf "%s\n" "no" >&6; }
8432 fi
8433
8434
8435 test -n "$ac_ct_CC" && break
8436 done
8437
8438 if test "x$ac_ct_CC" = x; then
8439 CC=""
8440 else
8441 case $cross_compiling:$ac_tool_warned in
8442 yes:)
8443 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8444 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8445 ac_tool_warned=yes ;;
8446 esac
8447 CC=$ac_ct_CC
8448 fi
8449 fi
8450
8451 fi
8452 if test -z "$CC"; then
8453 if test -n "$ac_tool_prefix"; then
8454 # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
8455 set dummy ${ac_tool_prefix}clang; ac_word=$2
8456 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8457 printf %s "checking for $ac_word... " >&6; }
8458 if test ${ac_cv_prog_CC+y}
8459 then :
8460 printf %s "(cached) " >&6
8461 else $as_nop
8462 if test -n "$CC"; then
8463 ac_cv_prog_CC="$CC" # Let the user override the test.
8464 else
8465 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8466 for as_dir in $PATH
8467 do
8468 IFS=$as_save_IFS
8469 case $as_dir in #(((
8470 '') as_dir=./ ;;
8471 */) ;;
8472 *) as_dir=$as_dir/ ;;
8473 esac
8474 for ac_exec_ext in '' $ac_executable_extensions; do
8475 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8476 ac_cv_prog_CC="${ac_tool_prefix}clang"
8477 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8478 break 2
8479 fi
8480 done
8481 done
8482 IFS=$as_save_IFS
8483
8484 fi
8485 fi
8486 CC=$ac_cv_prog_CC
8487 if test -n "$CC"; then
8488 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
8489 printf "%s\n" "$CC" >&6; }
8490 else
8491 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8492 printf "%s\n" "no" >&6; }
8493 fi
8494
8495
8496 fi
8497 if test -z "$ac_cv_prog_CC"; then
8498 ac_ct_CC=$CC
8499 # Extract the first word of "clang", so it can be a program name with args.
8500 set dummy clang; ac_word=$2
8501 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8502 printf %s "checking for $ac_word... " >&6; }
8503 if test ${ac_cv_prog_ac_ct_CC+y}
8504 then :
8505 printf %s "(cached) " >&6
8506 else $as_nop
8507 if test -n "$ac_ct_CC"; then
8508 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
8509 else
8510 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8511 for as_dir in $PATH
8512 do
8513 IFS=$as_save_IFS
8514 case $as_dir in #(((
8515 '') as_dir=./ ;;
8516 */) ;;
8517 *) as_dir=$as_dir/ ;;
8518 esac
8519 for ac_exec_ext in '' $ac_executable_extensions; do
8520 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8521 ac_cv_prog_ac_ct_CC="clang"
8522 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8523 break 2
8524 fi
8525 done
8526 done
8527 IFS=$as_save_IFS
8528
8529 fi
8530 fi
8531 ac_ct_CC=$ac_cv_prog_ac_ct_CC
8532 if test -n "$ac_ct_CC"; then
8533 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
8534 printf "%s\n" "$ac_ct_CC" >&6; }
8535 else
8536 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8537 printf "%s\n" "no" >&6; }
8538 fi
8539
8540 if test "x$ac_ct_CC" = x; then
8541 CC=""
8542 else
8543 case $cross_compiling:$ac_tool_warned in
8544 yes:)
8545 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8546 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8547 ac_tool_warned=yes ;;
8548 esac
8549 CC=$ac_ct_CC
8550 fi
8551 else
8552 CC="$ac_cv_prog_CC"
8553 fi
8554
8555 fi
8556
8557
8558 test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8559 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
8560 as_fn_error $? "no acceptable C compiler found in \$PATH
8561 See \`config.log' for more details" "$LINENO" 5; }
8562
8563 # Provide some information about the compiler.
8564 printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
8565 set X $ac_compile
8566 ac_compiler=$2
8567 for ac_option in --version -v -V -qversion -version; do
8568 { { ac_try="$ac_compiler $ac_option >&5"
8569 case "(($ac_try" in
8570 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8571 *) ac_try_echo=$ac_try;;
8572 esac
8573 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
8574 printf "%s\n" "$ac_try_echo"; } >&5
8575 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
8576 ac_status=$?
8577 if test -s conftest.err; then
8578 sed '10a\
8579 ... rest of stderr output deleted ...
8580 10q' conftest.err >conftest.er1
8581 cat conftest.er1 >&5
8582 fi
8583 rm -f conftest.er1 conftest.err
8584 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8585 test $ac_status = 0; }
8586 done
8587
8588 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
8589 printf %s "checking whether the compiler supports GNU C... " >&6; }
8590 if test ${ac_cv_c_compiler_gnu+y}
8591 then :
8592 printf %s "(cached) " >&6
8593 else $as_nop
8594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8595 /* end confdefs.h. */
8596
8597 int
8598 main (void)
8599 {
8600 #ifndef __GNUC__
8601 choke me
8602 #endif
8603
8604 ;
8605 return 0;
8606 }
8607 _ACEOF
8608 if ac_fn_c_try_compile "$LINENO"
8609 then :
8610 ac_compiler_gnu=yes
8611 else $as_nop
8612 ac_compiler_gnu=no
8613 fi
8614 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8615 ac_cv_c_compiler_gnu=$ac_compiler_gnu
8616
8617 fi
8618 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
8619 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
8620 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8621
8622 if test $ac_compiler_gnu = yes; then
8623 GCC=yes
8624 else
8625 GCC=
8626 fi
8627 ac_test_CFLAGS=${CFLAGS+y}
8628 ac_save_CFLAGS=$CFLAGS
8629 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
8630 printf %s "checking whether $CC accepts -g... " >&6; }
8631 if test ${ac_cv_prog_cc_g+y}
8632 then :
8633 printf %s "(cached) " >&6
8634 else $as_nop
8635 ac_save_c_werror_flag=$ac_c_werror_flag
8636 ac_c_werror_flag=yes
8637 ac_cv_prog_cc_g=no
8638 CFLAGS="-g"
8639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8640 /* end confdefs.h. */
8641
8642 int
8643 main (void)
8644 {
8645
8646 ;
8647 return 0;
8648 }
8649 _ACEOF
8650 if ac_fn_c_try_compile "$LINENO"
8651 then :
8652 ac_cv_prog_cc_g=yes
8653 else $as_nop
8654 CFLAGS=""
8655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8656 /* end confdefs.h. */
8657
8658 int
8659 main (void)
8660 {
8661
8662 ;
8663 return 0;
8664 }
8665 _ACEOF
8666 if ac_fn_c_try_compile "$LINENO"
8667 then :
8668
8669 else $as_nop
8670 ac_c_werror_flag=$ac_save_c_werror_flag
8671 CFLAGS="-g"
8672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8673 /* end confdefs.h. */
8674
8675 int
8676 main (void)
8677 {
8678
8679 ;
8680 return 0;
8681 }
8682 _ACEOF
8683 if ac_fn_c_try_compile "$LINENO"
8684 then :
8685 ac_cv_prog_cc_g=yes
8686 fi
8687 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8688 fi
8689 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8690 fi
8691 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8692 ac_c_werror_flag=$ac_save_c_werror_flag
8693 fi
8694 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
8695 printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
8696 if test $ac_test_CFLAGS; then
8697 CFLAGS=$ac_save_CFLAGS
8698 elif test $ac_cv_prog_cc_g = yes; then
8699 if test "$GCC" = yes; then
8700 CFLAGS="-g -O2"
8701 else
8702 CFLAGS="-g"
8703 fi
8704 else
8705 if test "$GCC" = yes; then
8706 CFLAGS="-O2"
8707 else
8708 CFLAGS=
8709 fi
8710 fi
8711 ac_prog_cc_stdc=no
8712 if test x$ac_prog_cc_stdc = xno
8713 then :
8714 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
8715 printf %s "checking for $CC option to enable C11 features... " >&6; }
8716 if test ${ac_cv_prog_cc_c11+y}
8717 then :
8718 printf %s "(cached) " >&6
8719 else $as_nop
8720 ac_cv_prog_cc_c11=no
8721 ac_save_CC=$CC
8722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8723 /* end confdefs.h. */
8724 $ac_c_conftest_c11_program
8725 _ACEOF
8726 for ac_arg in '' -std=gnu11
8727 do
8728 CC="$ac_save_CC $ac_arg"
8729 if ac_fn_c_try_compile "$LINENO"
8730 then :
8731 ac_cv_prog_cc_c11=$ac_arg
8732 fi
8733 rm -f core conftest.err conftest.$ac_objext conftest.beam
8734 test "x$ac_cv_prog_cc_c11" != "xno" && break
8735 done
8736 rm -f conftest.$ac_ext
8737 CC=$ac_save_CC
8738 fi
8739
8740 if test "x$ac_cv_prog_cc_c11" = xno
8741 then :
8742 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
8743 printf "%s\n" "unsupported" >&6; }
8744 else $as_nop
8745 if test "x$ac_cv_prog_cc_c11" = x
8746 then :
8747 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
8748 printf "%s\n" "none needed" >&6; }
8749 else $as_nop
8750 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
8751 printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
8752 CC="$CC $ac_cv_prog_cc_c11"
8753 fi
8754 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
8755 ac_prog_cc_stdc=c11
8756 fi
8757 fi
8758 if test x$ac_prog_cc_stdc = xno
8759 then :
8760 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
8761 printf %s "checking for $CC option to enable C99 features... " >&6; }
8762 if test ${ac_cv_prog_cc_c99+y}
8763 then :
8764 printf %s "(cached) " >&6
8765 else $as_nop
8766 ac_cv_prog_cc_c99=no
8767 ac_save_CC=$CC
8768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8769 /* end confdefs.h. */
8770 $ac_c_conftest_c99_program
8771 _ACEOF
8772 for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
8773 do
8774 CC="$ac_save_CC $ac_arg"
8775 if ac_fn_c_try_compile "$LINENO"
8776 then :
8777 ac_cv_prog_cc_c99=$ac_arg
8778 fi
8779 rm -f core conftest.err conftest.$ac_objext conftest.beam
8780 test "x$ac_cv_prog_cc_c99" != "xno" && break
8781 done
8782 rm -f conftest.$ac_ext
8783 CC=$ac_save_CC
8784 fi
8785
8786 if test "x$ac_cv_prog_cc_c99" = xno
8787 then :
8788 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
8789 printf "%s\n" "unsupported" >&6; }
8790 else $as_nop
8791 if test "x$ac_cv_prog_cc_c99" = x
8792 then :
8793 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
8794 printf "%s\n" "none needed" >&6; }
8795 else $as_nop
8796 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
8797 printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
8798 CC="$CC $ac_cv_prog_cc_c99"
8799 fi
8800 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
8801 ac_prog_cc_stdc=c99
8802 fi
8803 fi
8804 if test x$ac_prog_cc_stdc = xno
8805 then :
8806 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
8807 printf %s "checking for $CC option to enable C89 features... " >&6; }
8808 if test ${ac_cv_prog_cc_c89+y}
8809 then :
8810 printf %s "(cached) " >&6
8811 else $as_nop
8812 ac_cv_prog_cc_c89=no
8813 ac_save_CC=$CC
8814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8815 /* end confdefs.h. */
8816 $ac_c_conftest_c89_program
8817 _ACEOF
8818 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8819 do
8820 CC="$ac_save_CC $ac_arg"
8821 if ac_fn_c_try_compile "$LINENO"
8822 then :
8823 ac_cv_prog_cc_c89=$ac_arg
8824 fi
8825 rm -f core conftest.err conftest.$ac_objext conftest.beam
8826 test "x$ac_cv_prog_cc_c89" != "xno" && break
8827 done
8828 rm -f conftest.$ac_ext
8829 CC=$ac_save_CC
8830 fi
8831
8832 if test "x$ac_cv_prog_cc_c89" = xno
8833 then :
8834 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
8835 printf "%s\n" "unsupported" >&6; }
8836 else $as_nop
8837 if test "x$ac_cv_prog_cc_c89" = x
8838 then :
8839 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
8840 printf "%s\n" "none needed" >&6; }
8841 else $as_nop
8842 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
8843 printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
8844 CC="$CC $ac_cv_prog_cc_c89"
8845 fi
8846 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
8847 ac_prog_cc_stdc=c89
8848 fi
8849 fi
8850
8851 ac_ext=c
8852 ac_cpp='$CPP $CPPFLAGS'
8853 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8854 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8855 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8856
8857
8858 ac_ext=c
8859 ac_cpp='$CPP $CPPFLAGS'
8860 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8861 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8862 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8863 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
8864 printf %s "checking whether $CC understands -c and -o together... " >&6; }
8865 if test ${am_cv_prog_cc_c_o+y}
8866 then :
8867 printf %s "(cached) " >&6
8868 else $as_nop
8869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8870 /* end confdefs.h. */
8871
8872 int
8873 main (void)
8874 {
8875
8876 ;
8877 return 0;
8878 }
8879 _ACEOF
8880 # Make sure it works both with $CC and with simple cc.
8881 # Following AC_PROG_CC_C_O, we do the test twice because some
8882 # compilers refuse to overwrite an existing .o file with -o,
8883 # though they will create one.
8884 am_cv_prog_cc_c_o=yes
8885 for am_i in 1 2; do
8886 if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
8887 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
8888 ac_status=$?
8889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8890 (exit $ac_status); } \
8891 && test -f conftest2.$ac_objext; then
8892 : OK
8893 else
8894 am_cv_prog_cc_c_o=no
8895 break
8896 fi
8897 done
8898 rm -f core conftest*
8899 unset am_i
8900 fi
8901 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
8902 printf "%s\n" "$am_cv_prog_cc_c_o" >&6; }
8903 if test "$am_cv_prog_cc_c_o" != yes; then
8904 # Losing compiler, so override with the script.
8905 # FIXME: It is wrong to rewrite CC.
8906 # But if we don't then we get into trouble of one sort or another.
8907 # A longer-term fix would be to have automake use am__CC in this case,
8908 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
8909 CC="$am_aux_dir/compile $CC"
8910 fi
8911 ac_ext=c
8912 ac_cpp='$CPP $CPPFLAGS'
8913 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8914 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8915 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8916
8917
8918
8919 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler is clang" >&5
8920 printf %s "checking whether the compiler is clang... " >&6; }
8921 if test ${gl_cv_compiler_clang+y}
8922 then :
8923 printf %s "(cached) " >&6
8924 else $as_nop
8925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8926 /* end confdefs.h. */
8927
8928 #ifdef __clang__
8929 barfbarf
8930 #endif
8931
8932 int
8933 main (void)
8934 {
8935
8936 ;
8937 return 0;
8938 }
8939
8940 _ACEOF
8941 if ac_fn_c_try_compile "$LINENO"
8942 then :
8943 gl_cv_compiler_clang=no
8944 else $as_nop
8945 gl_cv_compiler_clang=yes
8946 fi
8947 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8948
8949 fi
8950 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_clang" >&5
8951 printf "%s\n" "$gl_cv_compiler_clang" >&6; }
8952
8953
8954 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compiler option needed when checking for declarations" >&5
8955 printf %s "checking for compiler option needed when checking for declarations... " >&6; }
8956 if test ${gl_cv_compiler_check_decl_option+y}
8957 then :
8958 printf %s "(cached) " >&6
8959 else $as_nop
8960 if test $gl_cv_compiler_clang = yes; then
8961 save_ac_compile="$ac_compile"
8962 ac_compile="$ac_compile -Werror=implicit-function-declaration"
8963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8964 /* end confdefs.h. */
8965
8966 int
8967 main (void)
8968 {
8969
8970 ;
8971 return 0;
8972 }
8973 _ACEOF
8974 if ac_fn_c_try_compile "$LINENO"
8975 then :
8976 gl_cv_compiler_check_decl_option='-Werror=implicit-function-declaration'
8977 else $as_nop
8978 gl_cv_compiler_check_decl_option=none
8979 fi
8980 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8981 ac_compile="$save_ac_compile"
8982 else
8983 gl_cv_compiler_check_decl_option=none
8984 fi
8985
8986 fi
8987 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_check_decl_option" >&5
8988 printf "%s\n" "$gl_cv_compiler_check_decl_option" >&6; }
8989 if test "x$gl_cv_compiler_check_decl_option" != xnone; then
8990 ac_compile_for_check_decl="$ac_compile $gl_cv_compiler_check_decl_option"
8991 else
8992 ac_compile_for_check_decl="$ac_compile"
8993 fi
8994
8995
8996
8997
8998
8999
9000 case "$host_os" in
9001 openbsd*)
9002
9003 printf "%s\n" "#define _ISOC11_SOURCE 1" >>confdefs.h
9004
9005 ;;
9006 esac
9007
9008 ac_ext=c
9009 ac_cpp='$CPP $CPPFLAGS'
9010 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9011 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9012 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9013 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
9014 printf %s "checking how to run the C preprocessor... " >&6; }
9015 # On Suns, sometimes $CPP names a directory.
9016 if test -n "$CPP" && test -d "$CPP"; then
9017 CPP=
9018 fi
9019 if test -z "$CPP"; then
9020 if test ${ac_cv_prog_CPP+y}
9021 then :
9022 printf %s "(cached) " >&6
9023 else $as_nop
9024 # Double quotes because $CC needs to be expanded
9025 for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
9026 do
9027 ac_preproc_ok=false
9028 for ac_c_preproc_warn_flag in '' yes
9029 do
9030 # Use a header file that comes with gcc, so configuring glibc
9031 # with a fresh cross-compiler works.
9032 # On the NeXT, cc -E runs the code through the compiler's parser,
9033 # not just through cpp. "Syntax error" is here to catch this case.
9034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9035 /* end confdefs.h. */
9036 #include <limits.h>
9037 Syntax error
9038 _ACEOF
9039 if ac_fn_c_try_cpp "$LINENO"
9040 then :
9041
9042 else $as_nop
9043 # Broken: fails on valid input.
9044 continue
9045 fi
9046 rm -f conftest.err conftest.i conftest.$ac_ext
9047
9048 # OK, works on sane cases. Now check whether nonexistent headers
9049 # can be detected and how.
9050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9051 /* end confdefs.h. */
9052 #include <ac_nonexistent.h>
9053 _ACEOF
9054 if ac_fn_c_try_cpp "$LINENO"
9055 then :
9056 # Broken: success on invalid input.
9057 continue
9058 else $as_nop
9059 # Passes both tests.
9060 ac_preproc_ok=:
9061 break
9062 fi
9063 rm -f conftest.err conftest.i conftest.$ac_ext
9064
9065 done
9066 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
9067 rm -f conftest.i conftest.err conftest.$ac_ext
9068 if $ac_preproc_ok
9069 then :
9070 break
9071 fi
9072
9073 done
9074 ac_cv_prog_CPP=$CPP
9075
9076 fi
9077 CPP=$ac_cv_prog_CPP
9078 else
9079 ac_cv_prog_CPP=$CPP
9080 fi
9081 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
9082 printf "%s\n" "$CPP" >&6; }
9083 ac_preproc_ok=false
9084 for ac_c_preproc_warn_flag in '' yes
9085 do
9086 # Use a header file that comes with gcc, so configuring glibc
9087 # with a fresh cross-compiler works.
9088 # On the NeXT, cc -E runs the code through the compiler's parser,
9089 # not just through cpp. "Syntax error" is here to catch this case.
9090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9091 /* end confdefs.h. */
9092 #include <limits.h>
9093 Syntax error
9094 _ACEOF
9095 if ac_fn_c_try_cpp "$LINENO"
9096 then :
9097
9098 else $as_nop
9099 # Broken: fails on valid input.
9100 continue
9101 fi
9102 rm -f conftest.err conftest.i conftest.$ac_ext
9103
9104 # OK, works on sane cases. Now check whether nonexistent headers
9105 # can be detected and how.
9106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9107 /* end confdefs.h. */
9108 #include <ac_nonexistent.h>
9109 _ACEOF
9110 if ac_fn_c_try_cpp "$LINENO"
9111 then :
9112 # Broken: success on invalid input.
9113 continue
9114 else $as_nop
9115 # Passes both tests.
9116 ac_preproc_ok=:
9117 break
9118 fi
9119 rm -f conftest.err conftest.i conftest.$ac_ext
9120
9121 done
9122 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
9123 rm -f conftest.i conftest.err conftest.$ac_ext
9124 if $ac_preproc_ok
9125 then :
9126
9127 else $as_nop
9128 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9129 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
9130 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
9131 See \`config.log' for more details" "$LINENO" 5; }
9132 fi
9133
9134 ac_ext=c
9135 ac_cpp='$CPP $CPPFLAGS'
9136 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9137 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9138 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9139
9140
9141 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
9142 printf %s "checking for grep that handles long lines and -e... " >&6; }
9143 if test ${ac_cv_path_GREP+y}
9144 then :
9145 printf %s "(cached) " >&6
9146 else $as_nop
9147 if test -z "$GREP"; then
9148 ac_path_GREP_found=false
9149 # Loop through the user's path and test for each of PROGNAME-LIST
9150 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9151 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
9152 do
9153 IFS=$as_save_IFS
9154 case $as_dir in #(((
9155 '') as_dir=./ ;;
9156 */) ;;
9157 *) as_dir=$as_dir/ ;;
9158 esac
9159 for ac_prog in grep ggrep
9160 do
9161 for ac_exec_ext in '' $ac_executable_extensions; do
9162 ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
9163 as_fn_executable_p "$ac_path_GREP" || continue
9164 # Check for GNU ac_path_GREP and select it if it is found.
9165 # Check for GNU $ac_path_GREP
9166 case `"$ac_path_GREP" --version 2>&1` in
9167 *GNU*)
9168 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
9169 *)
9170 ac_count=0
9171 printf %s 0123456789 >"conftest.in"
9172 while :
9173 do
9174 cat "conftest.in" "conftest.in" >"conftest.tmp"
9175 mv "conftest.tmp" "conftest.in"
9176 cp "conftest.in" "conftest.nl"
9177 printf "%s\n" 'GREP' >> "conftest.nl"
9178 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
9179 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
9180 as_fn_arith $ac_count + 1 && ac_count=$as_val
9181 if test $ac_count -gt ${ac_path_GREP_max-0}; then
9182 # Best one so far, save it but keep looking for a better one
9183 ac_cv_path_GREP="$ac_path_GREP"
9184 ac_path_GREP_max=$ac_count
9185 fi
9186 # 10*(2^10) chars as input seems more than enough
9187 test $ac_count -gt 10 && break
9188 done
9189 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
9190 esac
9191
9192 $ac_path_GREP_found && break 3
9193 done
9194 done
9195 done
9196 IFS=$as_save_IFS
9197 if test -z "$ac_cv_path_GREP"; then
9198 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
9199 fi
9200 else
9201 ac_cv_path_GREP=$GREP
9202 fi
9203
9204 fi
9205 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
9206 printf "%s\n" "$ac_cv_path_GREP" >&6; }
9207 GREP="$ac_cv_path_GREP"
9208
9209
9210 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
9211 printf %s "checking for egrep... " >&6; }
9212 if test ${ac_cv_path_EGREP+y}
9213 then :
9214 printf %s "(cached) " >&6
9215 else $as_nop
9216 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
9217 then ac_cv_path_EGREP="$GREP -E"
9218 else
9219 if test -z "$EGREP"; then
9220 ac_path_EGREP_found=false
9221 # Loop through the user's path and test for each of PROGNAME-LIST
9222 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9223 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
9224 do
9225 IFS=$as_save_IFS
9226 case $as_dir in #(((
9227 '') as_dir=./ ;;
9228 */) ;;
9229 *) as_dir=$as_dir/ ;;
9230 esac
9231 for ac_prog in egrep
9232 do
9233 for ac_exec_ext in '' $ac_executable_extensions; do
9234 ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
9235 as_fn_executable_p "$ac_path_EGREP" || continue
9236 # Check for GNU ac_path_EGREP and select it if it is found.
9237 # Check for GNU $ac_path_EGREP
9238 case `"$ac_path_EGREP" --version 2>&1` in
9239 *GNU*)
9240 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
9241 *)
9242 ac_count=0
9243 printf %s 0123456789 >"conftest.in"
9244 while :
9245 do
9246 cat "conftest.in" "conftest.in" >"conftest.tmp"
9247 mv "conftest.tmp" "conftest.in"
9248 cp "conftest.in" "conftest.nl"
9249 printf "%s\n" 'EGREP' >> "conftest.nl"
9250 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
9251 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
9252 as_fn_arith $ac_count + 1 && ac_count=$as_val
9253 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
9254 # Best one so far, save it but keep looking for a better one
9255 ac_cv_path_EGREP="$ac_path_EGREP"
9256 ac_path_EGREP_max=$ac_count
9257 fi
9258 # 10*(2^10) chars as input seems more than enough
9259 test $ac_count -gt 10 && break
9260 done
9261 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
9262 esac
9263
9264 $ac_path_EGREP_found && break 3
9265 done
9266 done
9267 done
9268 IFS=$as_save_IFS
9269 if test -z "$ac_cv_path_EGREP"; then
9270 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
9271 fi
9272 else
9273 ac_cv_path_EGREP=$EGREP
9274 fi
9275
9276 fi
9277 fi
9278 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
9279 printf "%s\n" "$ac_cv_path_EGREP" >&6; }
9280 EGREP="$ac_cv_path_EGREP"
9281
9282
9283
9284
9285
9286 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
9287 printf %s "checking for Minix Amsterdam compiler... " >&6; }
9288 if test ${gl_cv_c_amsterdam_compiler+y}
9289 then :
9290 printf %s "(cached) " >&6
9291 else $as_nop
9292
9293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9294 /* end confdefs.h. */
9295
9296 #ifdef __ACK__
9297 Amsterdam
9298 #endif
9299
9300 _ACEOF
9301 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9302 $EGREP "Amsterdam" >/dev/null 2>&1
9303 then :
9304 gl_cv_c_amsterdam_compiler=yes
9305 else $as_nop
9306 gl_cv_c_amsterdam_compiler=no
9307 fi
9308 rm -rf conftest*
9309
9310
9311 fi
9312 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
9313 printf "%s\n" "$gl_cv_c_amsterdam_compiler" >&6; }
9314
9315 if test $gl_cv_c_amsterdam_compiler = yes; then
9316 if test -z "$AR"; then
9317 AR='cc -c.a'
9318 fi
9319 if test -z "$ARFLAGS"; then
9320 ARFLAGS='-o'
9321 fi
9322 else
9323 :
9324 fi
9325
9326 if test -n "$ac_tool_prefix"; then
9327 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
9328 set dummy ${ac_tool_prefix}ar; ac_word=$2
9329 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9330 printf %s "checking for $ac_word... " >&6; }
9331 if test ${ac_cv_prog_AR+y}
9332 then :
9333 printf %s "(cached) " >&6
9334 else $as_nop
9335 if test -n "$AR"; then
9336 ac_cv_prog_AR="$AR" # Let the user override the test.
9337 else
9338 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9339 for as_dir in $PATH
9340 do
9341 IFS=$as_save_IFS
9342 case $as_dir in #(((
9343 '') as_dir=./ ;;
9344 */) ;;
9345 *) as_dir=$as_dir/ ;;
9346 esac
9347 for ac_exec_ext in '' $ac_executable_extensions; do
9348 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9349 ac_cv_prog_AR="${ac_tool_prefix}ar"
9350 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9351 break 2
9352 fi
9353 done
9354 done
9355 IFS=$as_save_IFS
9356
9357 fi
9358 fi
9359 AR=$ac_cv_prog_AR
9360 if test -n "$AR"; then
9361 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
9362 printf "%s\n" "$AR" >&6; }
9363 else
9364 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9365 printf "%s\n" "no" >&6; }
9366 fi
9367
9368
9369 fi
9370 if test -z "$ac_cv_prog_AR"; then
9371 ac_ct_AR=$AR
9372 # Extract the first word of "ar", so it can be a program name with args.
9373 set dummy ar; ac_word=$2
9374 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9375 printf %s "checking for $ac_word... " >&6; }
9376 if test ${ac_cv_prog_ac_ct_AR+y}
9377 then :
9378 printf %s "(cached) " >&6
9379 else $as_nop
9380 if test -n "$ac_ct_AR"; then
9381 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
9382 else
9383 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9384 for as_dir in $PATH
9385 do
9386 IFS=$as_save_IFS
9387 case $as_dir in #(((
9388 '') as_dir=./ ;;
9389 */) ;;
9390 *) as_dir=$as_dir/ ;;
9391 esac
9392 for ac_exec_ext in '' $ac_executable_extensions; do
9393 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9394 ac_cv_prog_ac_ct_AR="ar"
9395 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9396 break 2
9397 fi
9398 done
9399 done
9400 IFS=$as_save_IFS
9401
9402 fi
9403 fi
9404 ac_ct_AR=$ac_cv_prog_ac_ct_AR
9405 if test -n "$ac_ct_AR"; then
9406 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
9407 printf "%s\n" "$ac_ct_AR" >&6; }
9408 else
9409 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9410 printf "%s\n" "no" >&6; }
9411 fi
9412
9413 if test "x$ac_ct_AR" = x; then
9414 AR="ar"
9415 else
9416 case $cross_compiling:$ac_tool_warned in
9417 yes:)
9418 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9419 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9420 ac_tool_warned=yes ;;
9421 esac
9422 AR=$ac_ct_AR
9423 fi
9424 else
9425 AR="$ac_cv_prog_AR"
9426 fi
9427
9428 if test -z "$ARFLAGS"; then
9429 ARFLAGS='cr'
9430 fi
9431
9432
9433
9434 if test -z "$RANLIB"; then
9435 if test $gl_cv_c_amsterdam_compiler = yes; then
9436 RANLIB=':'
9437 else
9438 if test -n "$ac_tool_prefix"; then
9439 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
9440 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
9441 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9442 printf %s "checking for $ac_word... " >&6; }
9443 if test ${ac_cv_prog_RANLIB+y}
9444 then :
9445 printf %s "(cached) " >&6
9446 else $as_nop
9447 if test -n "$RANLIB"; then
9448 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
9449 else
9450 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9451 for as_dir in $PATH
9452 do
9453 IFS=$as_save_IFS
9454 case $as_dir in #(((
9455 '') as_dir=./ ;;
9456 */) ;;
9457 *) as_dir=$as_dir/ ;;
9458 esac
9459 for ac_exec_ext in '' $ac_executable_extensions; do
9460 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9461 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
9462 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9463 break 2
9464 fi
9465 done
9466 done
9467 IFS=$as_save_IFS
9468
9469 fi
9470 fi
9471 RANLIB=$ac_cv_prog_RANLIB
9472 if test -n "$RANLIB"; then
9473 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
9474 printf "%s\n" "$RANLIB" >&6; }
9475 else
9476 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9477 printf "%s\n" "no" >&6; }
9478 fi
9479
9480
9481 fi
9482 if test -z "$ac_cv_prog_RANLIB"; then
9483 ac_ct_RANLIB=$RANLIB
9484 # Extract the first word of "ranlib", so it can be a program name with args.
9485 set dummy ranlib; ac_word=$2
9486 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9487 printf %s "checking for $ac_word... " >&6; }
9488 if test ${ac_cv_prog_ac_ct_RANLIB+y}
9489 then :
9490 printf %s "(cached) " >&6
9491 else $as_nop
9492 if test -n "$ac_ct_RANLIB"; then
9493 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
9494 else
9495 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9496 for as_dir in $PATH
9497 do
9498 IFS=$as_save_IFS
9499 case $as_dir in #(((
9500 '') as_dir=./ ;;
9501 */) ;;
9502 *) as_dir=$as_dir/ ;;
9503 esac
9504 for ac_exec_ext in '' $ac_executable_extensions; do
9505 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9506 ac_cv_prog_ac_ct_RANLIB="ranlib"
9507 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9508 break 2
9509 fi
9510 done
9511 done
9512 IFS=$as_save_IFS
9513
9514 fi
9515 fi
9516 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
9517 if test -n "$ac_ct_RANLIB"; then
9518 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
9519 printf "%s\n" "$ac_ct_RANLIB" >&6; }
9520 else
9521 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9522 printf "%s\n" "no" >&6; }
9523 fi
9524
9525 if test "x$ac_ct_RANLIB" = x; then
9526 RANLIB=":"
9527 else
9528 case $cross_compiling:$ac_tool_warned in
9529 yes:)
9530 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9531 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9532 ac_tool_warned=yes ;;
9533 esac
9534 RANLIB=$ac_ct_RANLIB
9535 fi
9536 else
9537 RANLIB="$ac_cv_prog_RANLIB"
9538 fi
9539
9540 fi
9541 fi
9542
9543
9544
9545 # Check whether --enable-largefile was given.
9546 if test ${enable_largefile+y}
9547 then :
9548 enableval=$enable_largefile;
9549 fi
9550
9551 if test "$enable_largefile" != no
9552 then :
9553 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
9554 printf %s "checking for special C compiler options needed for large files... " >&6; }
9555 if test ${ac_cv_sys_largefile_CC+y}
9556 then :
9557 printf %s "(cached) " >&6
9558 else $as_nop
9559 ac_cv_sys_largefile_CC=no
9560 if test "$GCC" != yes; then
9561 ac_save_CC=$CC
9562 while :; do
9563 # IRIX 6.2 and later do not support large files by default,
9564 # so use the C compiler's -n32 option if that helps.
9565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9566 /* end confdefs.h. */
9567 #include <sys/types.h>
9568 /* Check that off_t can represent 2**63 - 1 correctly.
9569 We can't simply define LARGE_OFF_T to be 9223372036854775807,
9570 since some C++ compilers masquerading as C compilers
9571 incorrectly reject 9223372036854775807. */
9572 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
9573 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9574 && LARGE_OFF_T % 2147483647 == 1)
9575 ? 1 : -1];
9576 int
9577 main (void)
9578 {
9579
9580 ;
9581 return 0;
9582 }
9583 _ACEOF
9584 if ac_fn_c_try_compile "$LINENO"
9585 then :
9586 break
9587 fi
9588 rm -f core conftest.err conftest.$ac_objext conftest.beam
9589 CC="$CC -n32"
9590 if ac_fn_c_try_compile "$LINENO"
9591 then :
9592 ac_cv_sys_largefile_CC=' -n32'; break
9593 fi
9594 rm -f core conftest.err conftest.$ac_objext conftest.beam
9595 break
9596 done
9597 CC=$ac_save_CC
9598 rm -f conftest.$ac_ext
9599 fi
9600 fi
9601 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
9602 printf "%s\n" "$ac_cv_sys_largefile_CC" >&6; }
9603 if test "$ac_cv_sys_largefile_CC" != no; then
9604 CC=$CC$ac_cv_sys_largefile_CC
9605 fi
9606
9607 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
9608 printf %s "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
9609 if test ${ac_cv_sys_file_offset_bits+y}
9610 then :
9611 printf %s "(cached) " >&6
9612 else $as_nop
9613 while :; do
9614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9615 /* end confdefs.h. */
9616 #include <sys/types.h>
9617 /* Check that off_t can represent 2**63 - 1 correctly.
9618 We can't simply define LARGE_OFF_T to be 9223372036854775807,
9619 since some C++ compilers masquerading as C compilers
9620 incorrectly reject 9223372036854775807. */
9621 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
9622 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9623 && LARGE_OFF_T % 2147483647 == 1)
9624 ? 1 : -1];
9625 int
9626 main (void)
9627 {
9628
9629 ;
9630 return 0;
9631 }
9632 _ACEOF
9633 if ac_fn_c_try_compile "$LINENO"
9634 then :
9635 ac_cv_sys_file_offset_bits=no; break
9636 fi
9637 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9639 /* end confdefs.h. */
9640 #undef _FILE_OFFSET_BITS
9641 #define _FILE_OFFSET_BITS 64
9642 #include <sys/types.h>
9643 /* Check that off_t can represent 2**63 - 1 correctly.
9644 We can't simply define LARGE_OFF_T to be 9223372036854775807,
9645 since some C++ compilers masquerading as C compilers
9646 incorrectly reject 9223372036854775807. */
9647 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
9648 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9649 && LARGE_OFF_T % 2147483647 == 1)
9650 ? 1 : -1];
9651 int
9652 main (void)
9653 {
9654
9655 ;
9656 return 0;
9657 }
9658 _ACEOF
9659 if ac_fn_c_try_compile "$LINENO"
9660 then :
9661 ac_cv_sys_file_offset_bits=64; break
9662 fi
9663 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9664 ac_cv_sys_file_offset_bits=unknown
9665 break
9666 done
9667 fi
9668 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
9669 printf "%s\n" "$ac_cv_sys_file_offset_bits" >&6; }
9670 case $ac_cv_sys_file_offset_bits in #(
9671 no | unknown) ;;
9672 *)
9673 printf "%s\n" "#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits" >>confdefs.h
9674 ;;
9675 esac
9676 rm -rf conftest*
9677 case $ac_cv_sys_file_offset_bits in #(
9678 unknown) :
9679 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
9680 printf %s "checking for _LARGE_FILES value needed for large files... " >&6; }
9681 if test ${ac_cv_sys_large_files+y}
9682 then :
9683 printf %s "(cached) " >&6
9684 else $as_nop
9685 while :; do
9686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9687 /* end confdefs.h. */
9688 #include <sys/types.h>
9689 /* Check that off_t can represent 2**63 - 1 correctly.
9690 We can't simply define LARGE_OFF_T to be 9223372036854775807,
9691 since some C++ compilers masquerading as C compilers
9692 incorrectly reject 9223372036854775807. */
9693 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
9694 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9695 && LARGE_OFF_T % 2147483647 == 1)
9696 ? 1 : -1];
9697 int
9698 main (void)
9699 {
9700
9701 ;
9702 return 0;
9703 }
9704 _ACEOF
9705 if ac_fn_c_try_compile "$LINENO"
9706 then :
9707 ac_cv_sys_large_files=no; break
9708 fi
9709 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9711 /* end confdefs.h. */
9712 #undef _LARGE_FILES
9713 #define _LARGE_FILES 1
9714 #include <sys/types.h>
9715 /* Check that off_t can represent 2**63 - 1 correctly.
9716 We can't simply define LARGE_OFF_T to be 9223372036854775807,
9717 since some C++ compilers masquerading as C compilers
9718 incorrectly reject 9223372036854775807. */
9719 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
9720 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9721 && LARGE_OFF_T % 2147483647 == 1)
9722 ? 1 : -1];
9723 int
9724 main (void)
9725 {
9726
9727 ;
9728 return 0;
9729 }
9730 _ACEOF
9731 if ac_fn_c_try_compile "$LINENO"
9732 then :
9733 ac_cv_sys_large_files=1; break
9734 fi
9735 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9736 ac_cv_sys_large_files=unknown
9737 break
9738 done
9739 fi
9740 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
9741 printf "%s\n" "$ac_cv_sys_large_files" >&6; }
9742 case $ac_cv_sys_large_files in #(
9743 no | unknown) ;;
9744 *)
9745 printf "%s\n" "#define _LARGE_FILES $ac_cv_sys_large_files" >>confdefs.h
9746 ;;
9747 esac
9748 rm -rf conftest* ;; #(
9749 64) :
9750
9751 # Check whether --enable-year2038 was given.
9752 if test ${enable_year2038+y}
9753 then :
9754 enableval=$enable_year2038;
9755 fi
9756
9757 if test "$enable_year2038" != no
9758 then :
9759
9760 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for time_t past the year 2038" >&5
9761 printf %s "checking for time_t past the year 2038... " >&6; }
9762 if test ${gl_cv_type_time_t_y2038+y}
9763 then :
9764 printf %s "(cached) " >&6
9765 else $as_nop
9766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9767 /* end confdefs.h. */
9768
9769 #include <time.h>
9770 /* Check that time_t can represent 2**32 - 1 correctly. */
9771 #define LARGE_TIME_T \\
9772 ((time_t) (((time_t) 1 << 30) - 1 + 3 * ((time_t) 1 << 30)))
9773 int verify_time_t_range[(LARGE_TIME_T / 65537 == 65535
9774 && LARGE_TIME_T % 65537 == 0)
9775 ? 1 : -1];
9776
9777 _ACEOF
9778 if ac_fn_c_try_compile "$LINENO"
9779 then :
9780 gl_cv_type_time_t_y2038=yes
9781 else $as_nop
9782 gl_cv_type_time_t_y2038=no
9783 fi
9784 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9785
9786 fi
9787 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_time_t_y2038" >&5
9788 printf "%s\n" "$gl_cv_type_time_t_y2038" >&6; }
9789 if test "$gl_cv_type_time_t_y2038" = no; then
9790 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit time_t with _TIME_BITS=64" >&5
9791 printf %s "checking for 64-bit time_t with _TIME_BITS=64... " >&6; }
9792 if test ${gl_cv_type_time_t_bits_macro+y}
9793 then :
9794 printf %s "(cached) " >&6
9795 else $as_nop
9796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9797 /* end confdefs.h. */
9798 #define _TIME_BITS 64
9799 #define _FILE_OFFSET_BITS 64
9800
9801 #include <time.h>
9802 /* Check that time_t can represent 2**32 - 1 correctly. */
9803 #define LARGE_TIME_T \\
9804 ((time_t) (((time_t) 1 << 30) - 1 + 3 * ((time_t) 1 << 30)))
9805 int verify_time_t_range[(LARGE_TIME_T / 65537 == 65535
9806 && LARGE_TIME_T % 65537 == 0)
9807 ? 1 : -1];
9808
9809 _ACEOF
9810 if ac_fn_c_try_compile "$LINENO"
9811 then :
9812 gl_cv_type_time_t_bits_macro=yes
9813 else $as_nop
9814 gl_cv_type_time_t_bits_macro=no
9815 fi
9816 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9817
9818 fi
9819 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_time_t_bits_macro" >&5
9820 printf "%s\n" "$gl_cv_type_time_t_bits_macro" >&6; }
9821 if test "$gl_cv_type_time_t_bits_macro" = yes; then
9822
9823 printf "%s\n" "#define _TIME_BITS 64" >>confdefs.h
9824
9825
9826 printf "%s\n" "#define _FILE_OFFSET_BITS 64" >>confdefs.h
9827
9828 gl_cv_type_time_t_y2038=yes
9829 fi
9830 fi
9831 if test $gl_cv_type_time_t_y2038 = no; then
9832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9833 /* end confdefs.h. */
9834 #ifdef _USE_32BIT_TIME_T
9835 int ok;
9836 #else
9837 error fail
9838 #endif
9839
9840 _ACEOF
9841 if ac_fn_c_try_compile "$LINENO"
9842 then :
9843 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9844 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
9845 as_fn_error $? "The 'time_t' type stops working after January 2038.
9846 Remove _USE_32BIT_TIME_T from the compiler flags.
9847 See \`config.log' for more details" "$LINENO" 5; }
9848 else $as_nop
9849 # If not cross-compiling and says we should check,
9850 # and 'touch' works with a large timestamp, then evidently wider time_t
9851 # is desired and supported, so fail and ask the builder to fix the
9852 # problem. Otherwise, just warn the builder.
9853
9854 if test "$gl_warned_about_y2038" != yes; then
9855 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: The 'time_t' type stops working after January 2038,
9856 and this package needs a wider 'time_t' type
9857 if there is any way to access timestamps after that.
9858 Configure with 'CC=\"${CC} -m64\"' perhaps?" >&5
9859 printf "%s\n" "$as_me: WARNING: The 'time_t' type stops working after January 2038,
9860 and this package needs a wider 'time_t' type
9861 if there is any way to access timestamps after that.
9862 Configure with 'CC=\"${CC} -m64\"' perhaps?" >&2;}
9863 gl_warned_about_y2038=yes
9864 fi
9865
9866 fi
9867 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9868 fi
9869 fi
9870 ;; #(
9871 *) :
9872 ;;
9873 esac
9874 fi
9875
9876
9877
9878 case "$host_os" in
9879 mingw*)
9880
9881 printf "%s\n" "#define __MINGW_USE_VC2005_COMPAT 1" >>confdefs.h
9882
9883 ;;
9884 esac
9885
9886
9887
9888
9889
9890
9891
9892 # Check whether --enable-threads was given.
9893 if test ${enable_threads+y}
9894 then :
9895 enableval=$enable_threads; gl_use_threads=$enableval
9896 else $as_nop
9897 if test -n "$gl_use_threads_default"; then
9898 gl_use_threads="$gl_use_threads_default"
9899 else
9900 case "$host_os" in
9901 osf*) gl_use_threads=no ;;
9902 cygwin*)
9903 case `uname -r` in
9904 1.[0-5].*) gl_use_threads=no ;;
9905 *) gl_use_threads=yes ;;
9906 esac
9907 ;;
9908 mingw*)
9909 case "$gl_use_winpthreads_default" in
9910 yes) gl_use_threads=posix ;;
9911 no) gl_use_threads=windows ;;
9912 *) gl_use_threads=yes ;;
9913 esac
9914 ;;
9915 *) gl_use_threads=yes ;;
9916 esac
9917 fi
9918
9919 fi
9920
9921 if test "$gl_use_threads" = yes \
9922 || test "$gl_use_threads" = isoc \
9923 || test "$gl_use_threads" = posix \
9924 || test "$gl_use_threads" = isoc+posix; then
9925 # For using <threads.h> or <pthread.h>:
9926
9927
9928 if test -z "$gl_anythreadlib_early_done"; then
9929 case "$host_os" in
9930 osf*)
9931 # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
9932 # groks <pthread.h>. cc also understands the flag -pthread, but
9933 # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
9934 # 2. putting a flag into CPPFLAGS that has an effect on the linker
9935 # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
9936 # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
9937 CPPFLAGS="$CPPFLAGS -D_REENTRANT"
9938 ;;
9939 esac
9940 # Some systems optimize for single-threaded programs by default, and
9941 # need special flags to disable these optimizations. For example, the
9942 # definition of 'errno' in <errno.h>.
9943 case "$host_os" in
9944 aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
9945 solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
9946 esac
9947 gl_anythreadlib_early_done=done
9948 fi
9949
9950 fi
9951
9952
9953
9954 # Pre-early section.
9955
9956
9957
9958
9959 # Code from module absolute-header:
9960 # Code from module alloca:
9961 # Code from module alloca-opt:
9962 # Code from module argp:
9963 # Code from module assure:
9964 # Code from module at-internal:
9965 # Code from module attribute:
9966 # Code from module base64:
9967 # Code from module basename-lgpl:
9968 # Code from module btowc:
9969 # Code from module builtin-expect:
9970 # Code from module c-ctype:
9971 # Code from module c99:
9972 # Code from module calloc-gnu:
9973 # Code from module calloc-posix:
9974 # Code from module chdir:
9975 # Code from module chdir-long:
9976 # Code from module cloexec:
9977 # Code from module close:
9978 # Code from module ctype:
9979 # Code from module dirent:
9980 # Code from module dirfd:
9981 # Code from module double-slash-root:
9982 # Code from module dup2:
9983 # Code from module dynarray:
9984 # Code from module errno:
9985 # Code from module error:
9986 # Code from module exitfail:
9987 # Code from module extensions:
9988 # Code from module extern-inline:
9989 # Code from module fchdir:
9990 # Code from module fcntl:
9991 # Code from module fcntl-h:
9992 # Code from module fd-hook:
9993 # Code from module fd-safer-flag:
9994 # Code from module filename:
9995 # Code from module filenamecat-lgpl:
9996 # Code from module filevercmp:
9997 # Code from module flexmember:
9998 # Code from module float:
9999 # Code from module fnmatch:
10000 # Code from module fnmatch-h:
10001 # Code from module free-posix:
10002 # Code from module fstat:
10003 # Code from module gen-header:
10004 # Code from module getcwd-lgpl:
10005 # Code from module getdelim:
10006 # Code from module getdtablesize:
10007 # Code from module getline:
10008 # Code from module getopt-gnu:
10009 # Code from module getopt-posix:
10010 # Code from module getprogname:
10011 # Code from module gettext-h:
10012 # Code from module gitlog-to-changelog:
10013 # Code from module hard-locale:
10014 # Code from module ialloc:
10015 # Code from module idx:
10016 # Code from module include_next:
10017 # Code from module intprops:
10018 # Code from module inttypes-incomplete:
10019 # Code from module isblank:
10020 # Code from module langinfo:
10021 # Code from module largefile:
10022
10023
10024 # Code from module libc-config:
10025 # Code from module limits-h:
10026 # Code from module localcharset:
10027 # Code from module locale:
10028 # Code from module localeconv:
10029 # Code from module lock:
10030 # Code from module malloc-gnu:
10031 # Code from module malloc-posix:
10032 # Code from module malloca:
10033 # Code from module mbrtowc:
10034 # Code from module mbsinit:
10035 # Code from module mbsrtowcs:
10036 # Code from module mbswidth:
10037 # Code from module mbtowc:
10038 # Code from module memchr:
10039 # Code from module mempcpy:
10040 # Code from module memrchr:
10041 # Code from module msvc-inval:
10042 # Code from module msvc-nothrow:
10043 # Code from module multiarch:
10044 # Code from module nl_langinfo:
10045 # Code from module nocrash:
10046 # Code from module open:
10047 # Code from module openat:
10048 # Code from module openat-die:
10049 # Code from module openat-h:
10050 # Code from module pathmax:
10051 # Code from module pipe-posix:
10052 # Code from module progname:
10053 # Code from module rawmemchr:
10054 # Code from module realloc-gnu:
10055 # Code from module realloc-posix:
10056 # Code from module reallocarray:
10057 # Code from module regex:
10058 # Code from module save-cwd:
10059 # Code from module setlocale-null:
10060 # Code from module size_max:
10061 # Code from module sleep:
10062 # Code from module snippet/_Noreturn:
10063 # Code from module snippet/arg-nonnull:
10064 # Code from module snippet/c++defs:
10065 # Code from module snippet/warn-on-use:
10066 # Code from module ssize_t:
10067 # Code from module stat:
10068 # Code from module stat-time:
10069 # Code from module std-gnu11:
10070 # Code from module stdalign:
10071 # Code from module stdbool:
10072 # Code from module stddef:
10073 # Code from module stdint:
10074 # Code from module stdio:
10075 # Code from module stdlib:
10076 # Code from module strcase:
10077 # Code from module strchrnul:
10078 # Code from module strdup-posix:
10079 # Code from module streq:
10080 # Code from module strerror:
10081 # Code from module strerror-override:
10082 # Code from module string:
10083 # Code from module strings:
10084 # Code from module strndup:
10085 # Code from module strnlen:
10086 # Code from module strnlen1:
10087 # Code from module sys_stat:
10088 # Code from module sys_types:
10089 # Code from module sysexits:
10090 # Code from module threadlib:
10091
10092
10093
10094 # Code from module time:
10095 # Code from module unistd:
10096 # Code from module unistd-safer:
10097 # Code from module unitypes:
10098 # Code from module uniwidth/base:
10099 # Code from module uniwidth/width:
10100 # Code from module vararrays:
10101 # Code from module vasnprintf:
10102 # Code from module verify:
10103 # Code from module vsnprintf:
10104 # Code from module wchar:
10105 # Code from module wcrtomb:
10106 # Code from module wctype-h:
10107 # Code from module wcwidth:
10108 # Code from module windows-mutex:
10109 # Code from module windows-once:
10110 # Code from module windows-recmutex:
10111 # Code from module windows-rwlock:
10112 # Code from module wmemchr:
10113 # Code from module wmempcpy:
10114 # Code from module xalloc-oversized:
10115 # Code from module xsize:
10116
10117
10118
10119
10120
10121
10122
10123 ac_ext=cpp
10124 ac_cpp='$CXXCPP $CPPFLAGS'
10125 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10126 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10127 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
10128 if test -z "$CXX"; then
10129 if test -n "$CCC"; then
10130 CXX=$CCC
10131 else
10132 if test -n "$ac_tool_prefix"; then
10133 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++
10134 do
10135 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
10136 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
10137 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10138 printf %s "checking for $ac_word... " >&6; }
10139 if test ${ac_cv_prog_CXX+y}
10140 then :
10141 printf %s "(cached) " >&6
10142 else $as_nop
10143 if test -n "$CXX"; then
10144 ac_cv_prog_CXX="$CXX" # Let the user override the test.
10145 else
10146 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10147 for as_dir in $PATH
10148 do
10149 IFS=$as_save_IFS
10150 case $as_dir in #(((
10151 '') as_dir=./ ;;
10152 */) ;;
10153 *) as_dir=$as_dir/ ;;
10154 esac
10155 for ac_exec_ext in '' $ac_executable_extensions; do
10156 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10157 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
10158 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10159 break 2
10160 fi
10161 done
10162 done
10163 IFS=$as_save_IFS
10164
10165 fi
10166 fi
10167 CXX=$ac_cv_prog_CXX
10168 if test -n "$CXX"; then
10169 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
10170 printf "%s\n" "$CXX" >&6; }
10171 else
10172 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10173 printf "%s\n" "no" >&6; }
10174 fi
10175
10176
10177 test -n "$CXX" && break
10178 done
10179 fi
10180 if test -z "$CXX"; then
10181 ac_ct_CXX=$CXX
10182 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++
10183 do
10184 # Extract the first word of "$ac_prog", so it can be a program name with args.
10185 set dummy $ac_prog; ac_word=$2
10186 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10187 printf %s "checking for $ac_word... " >&6; }
10188 if test ${ac_cv_prog_ac_ct_CXX+y}
10189 then :
10190 printf %s "(cached) " >&6
10191 else $as_nop
10192 if test -n "$ac_ct_CXX"; then
10193 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
10194 else
10195 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10196 for as_dir in $PATH
10197 do
10198 IFS=$as_save_IFS
10199 case $as_dir in #(((
10200 '') as_dir=./ ;;
10201 */) ;;
10202 *) as_dir=$as_dir/ ;;
10203 esac
10204 for ac_exec_ext in '' $ac_executable_extensions; do
10205 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10206 ac_cv_prog_ac_ct_CXX="$ac_prog"
10207 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10208 break 2
10209 fi
10210 done
10211 done
10212 IFS=$as_save_IFS
10213
10214 fi
10215 fi
10216 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
10217 if test -n "$ac_ct_CXX"; then
10218 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
10219 printf "%s\n" "$ac_ct_CXX" >&6; }
10220 else
10221 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10222 printf "%s\n" "no" >&6; }
10223 fi
10224
10225
10226 test -n "$ac_ct_CXX" && break
10227 done
10228
10229 if test "x$ac_ct_CXX" = x; then
10230 CXX="g++"
10231 else
10232 case $cross_compiling:$ac_tool_warned in
10233 yes:)
10234 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10235 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10236 ac_tool_warned=yes ;;
10237 esac
10238 CXX=$ac_ct_CXX
10239 fi
10240 fi
10241
10242 fi
10243 fi
10244 # Provide some information about the compiler.
10245 printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
10246 set X $ac_compile
10247 ac_compiler=$2
10248 for ac_option in --version -v -V -qversion; do
10249 { { ac_try="$ac_compiler $ac_option >&5"
10250 case "(($ac_try" in
10251 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10252 *) ac_try_echo=$ac_try;;
10253 esac
10254 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
10255 printf "%s\n" "$ac_try_echo"; } >&5
10256 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
10257 ac_status=$?
10258 if test -s conftest.err; then
10259 sed '10a\
10260 ... rest of stderr output deleted ...
10261 10q' conftest.err >conftest.er1
10262 cat conftest.er1 >&5
10263 fi
10264 rm -f conftest.er1 conftest.err
10265 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10266 test $ac_status = 0; }
10267 done
10268
10269 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C++" >&5
10270 printf %s "checking whether the compiler supports GNU C++... " >&6; }
10271 if test ${ac_cv_cxx_compiler_gnu+y}
10272 then :
10273 printf %s "(cached) " >&6
10274 else $as_nop
10275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10276 /* end confdefs.h. */
10277
10278 int
10279 main (void)
10280 {
10281 #ifndef __GNUC__
10282 choke me
10283 #endif
10284
10285 ;
10286 return 0;
10287 }
10288 _ACEOF
10289 if ac_fn_cxx_try_compile "$LINENO"
10290 then :
10291 ac_compiler_gnu=yes
10292 else $as_nop
10293 ac_compiler_gnu=no
10294 fi
10295 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
10296 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
10297
10298 fi
10299 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
10300 printf "%s\n" "$ac_cv_cxx_compiler_gnu" >&6; }
10301 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
10302
10303 if test $ac_compiler_gnu = yes; then
10304 GXX=yes
10305 else
10306 GXX=
10307 fi
10308 ac_test_CXXFLAGS=${CXXFLAGS+y}
10309 ac_save_CXXFLAGS=$CXXFLAGS
10310 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
10311 printf %s "checking whether $CXX accepts -g... " >&6; }
10312 if test ${ac_cv_prog_cxx_g+y}
10313 then :
10314 printf %s "(cached) " >&6
10315 else $as_nop
10316 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
10317 ac_cxx_werror_flag=yes
10318 ac_cv_prog_cxx_g=no
10319 CXXFLAGS="-g"
10320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10321 /* end confdefs.h. */
10322
10323 int
10324 main (void)
10325 {
10326
10327 ;
10328 return 0;
10329 }
10330 _ACEOF
10331 if ac_fn_cxx_try_compile "$LINENO"
10332 then :
10333 ac_cv_prog_cxx_g=yes
10334 else $as_nop
10335 CXXFLAGS=""
10336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10337 /* end confdefs.h. */
10338
10339 int
10340 main (void)
10341 {
10342
10343 ;
10344 return 0;
10345 }
10346 _ACEOF
10347 if ac_fn_cxx_try_compile "$LINENO"
10348 then :
10349
10350 else $as_nop
10351 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
10352 CXXFLAGS="-g"
10353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10354 /* end confdefs.h. */
10355
10356 int
10357 main (void)
10358 {
10359
10360 ;
10361 return 0;
10362 }
10363 _ACEOF
10364 if ac_fn_cxx_try_compile "$LINENO"
10365 then :
10366 ac_cv_prog_cxx_g=yes
10367 fi
10368 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
10369 fi
10370 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
10371 fi
10372 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
10373 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
10374 fi
10375 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
10376 printf "%s\n" "$ac_cv_prog_cxx_g" >&6; }
10377 if test $ac_test_CXXFLAGS; then
10378 CXXFLAGS=$ac_save_CXXFLAGS
10379 elif test $ac_cv_prog_cxx_g = yes; then
10380 if test "$GXX" = yes; then
10381 CXXFLAGS="-g -O2"
10382 else
10383 CXXFLAGS="-g"
10384 fi
10385 else
10386 if test "$GXX" = yes; then
10387 CXXFLAGS="-O2"
10388 else
10389 CXXFLAGS=
10390 fi
10391 fi
10392 ac_prog_cxx_stdcxx=no
10393 if test x$ac_prog_cxx_stdcxx = xno
10394 then :
10395 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++11 features" >&5
10396 printf %s "checking for $CXX option to enable C++11 features... " >&6; }
10397 if test ${ac_cv_prog_cxx_cxx11+y}
10398 then :
10399 printf %s "(cached) " >&6
10400 else $as_nop
10401 ac_cv_prog_cxx_cxx11=no
10402 ac_save_CXX=$CXX
10403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10404 /* end confdefs.h. */
10405 $ac_cxx_conftest_cxx11_program
10406 _ACEOF
10407 for ac_arg in '' -std=gnu++11 -std=gnu++0x -std=c++11 -std=c++0x -qlanglvl=extended0x -AA
10408 do
10409 CXX="$ac_save_CXX $ac_arg"
10410 if ac_fn_cxx_try_compile "$LINENO"
10411 then :
10412 ac_cv_prog_cxx_cxx11=$ac_arg
10413 fi
10414 rm -f core conftest.err conftest.$ac_objext conftest.beam
10415 test "x$ac_cv_prog_cxx_cxx11" != "xno" && break
10416 done
10417 rm -f conftest.$ac_ext
10418 CXX=$ac_save_CXX
10419 fi
10420
10421 if test "x$ac_cv_prog_cxx_cxx11" = xno
10422 then :
10423 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
10424 printf "%s\n" "unsupported" >&6; }
10425 else $as_nop
10426 if test "x$ac_cv_prog_cxx_cxx11" = x
10427 then :
10428 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
10429 printf "%s\n" "none needed" >&6; }
10430 else $as_nop
10431 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx11" >&5
10432 printf "%s\n" "$ac_cv_prog_cxx_cxx11" >&6; }
10433 CXX="$CXX $ac_cv_prog_cxx_cxx11"
10434 fi
10435 ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx11
10436 ac_prog_cxx_stdcxx=cxx11
10437 fi
10438 fi
10439 if test x$ac_prog_cxx_stdcxx = xno
10440 then :
10441 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++98 features" >&5
10442 printf %s "checking for $CXX option to enable C++98 features... " >&6; }
10443 if test ${ac_cv_prog_cxx_cxx98+y}
10444 then :
10445 printf %s "(cached) " >&6
10446 else $as_nop
10447 ac_cv_prog_cxx_cxx98=no
10448 ac_save_CXX=$CXX
10449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10450 /* end confdefs.h. */
10451 $ac_cxx_conftest_cxx98_program
10452 _ACEOF
10453 for ac_arg in '' -std=gnu++98 -std=c++98 -qlanglvl=extended -AA
10454 do
10455 CXX="$ac_save_CXX $ac_arg"
10456 if ac_fn_cxx_try_compile "$LINENO"
10457 then :
10458 ac_cv_prog_cxx_cxx98=$ac_arg
10459 fi
10460 rm -f core conftest.err conftest.$ac_objext conftest.beam
10461 test "x$ac_cv_prog_cxx_cxx98" != "xno" && break
10462 done
10463 rm -f conftest.$ac_ext
10464 CXX=$ac_save_CXX
10465 fi
10466
10467 if test "x$ac_cv_prog_cxx_cxx98" = xno
10468 then :
10469 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
10470 printf "%s\n" "unsupported" >&6; }
10471 else $as_nop
10472 if test "x$ac_cv_prog_cxx_cxx98" = x
10473 then :
10474 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
10475 printf "%s\n" "none needed" >&6; }
10476 else $as_nop
10477 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx98" >&5
10478 printf "%s\n" "$ac_cv_prog_cxx_cxx98" >&6; }
10479 CXX="$CXX $ac_cv_prog_cxx_cxx98"
10480 fi
10481 ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx98
10482 ac_prog_cxx_stdcxx=cxx98
10483 fi
10484 fi
10485
10486 ac_ext=c
10487 ac_cpp='$CPP $CPPFLAGS'
10488 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10489 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10490 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10491
10492 depcc="$CXX" am_compiler_list=
10493
10494 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
10495 printf %s "checking dependency style of $depcc... " >&6; }
10496 if test ${am_cv_CXX_dependencies_compiler_type+y}
10497 then :
10498 printf %s "(cached) " >&6
10499 else $as_nop
10500 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
10501 # We make a subdir and do the tests there. Otherwise we can end up
10502 # making bogus files that we don't know about and never remove. For
10503 # instance it was reported that on HP-UX the gcc test will end up
10504 # making a dummy file named 'D' -- because '-MD' means "put the output
10505 # in D".
10506 rm -rf conftest.dir
10507 mkdir conftest.dir
10508 # Copy depcomp to subdir because otherwise we won't find it if we're
10509 # using a relative directory.
10510 cp "$am_depcomp" conftest.dir
10511 cd conftest.dir
10512 # We will build objects and dependencies in a subdirectory because
10513 # it helps to detect inapplicable dependency modes. For instance
10514 # both Tru64's cc and ICC support -MD to output dependencies as a
10515 # side effect of compilation, but ICC will put the dependencies in
10516 # the current directory while Tru64 will put them in the object
10517 # directory.
10518 mkdir sub
10519
10520 am_cv_CXX_dependencies_compiler_type=none
10521 if test "$am_compiler_list" = ""; then
10522 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
10523 fi
10524 am__universal=false
10525 case " $depcc " in #(
10526 *\ -arch\ *\ -arch\ *) am__universal=true ;;
10527 esac
10528
10529 for depmode in $am_compiler_list; do
10530 # Setup a source with many dependencies, because some compilers
10531 # like to wrap large dependency lists on column 80 (with \), and
10532 # we should not choose a depcomp mode which is confused by this.
10533 #
10534 # We need to recreate these files for each test, as the compiler may
10535 # overwrite some of them when testing with obscure command lines.
10536 # This happens at least with the AIX C compiler.
10537 : > sub/conftest.c
10538 for i in 1 2 3 4 5 6; do
10539 echo '#include "conftst'$i'.h"' >> sub/conftest.c
10540 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
10541 # Solaris 10 /bin/sh.
10542 echo '/* dummy */' > sub/conftst$i.h
10543 done
10544 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
10545
10546 # We check with '-c' and '-o' for the sake of the "dashmstdout"
10547 # mode. It turns out that the SunPro C++ compiler does not properly
10548 # handle '-M -o', and we need to detect this. Also, some Intel
10549 # versions had trouble with output in subdirs.
10550 am__obj=sub/conftest.${OBJEXT-o}
10551 am__minus_obj="-o $am__obj"
10552 case $depmode in
10553 gcc)
10554 # This depmode causes a compiler race in universal mode.
10555 test "$am__universal" = false || continue
10556 ;;
10557 nosideeffect)
10558 # After this tag, mechanisms are not by side-effect, so they'll
10559 # only be used when explicitly requested.
10560 if test "x$enable_dependency_tracking" = xyes; then
10561 continue
10562 else
10563 break
10564 fi
10565 ;;
10566 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
10567 # This compiler won't grok '-c -o', but also, the minuso test has
10568 # not run yet. These depmodes are late enough in the game, and
10569 # so weak that their functioning should not be impacted.
10570 am__obj=conftest.${OBJEXT-o}
10571 am__minus_obj=
10572 ;;
10573 none) break ;;
10574 esac
10575 if depmode=$depmode \
10576 source=sub/conftest.c object=$am__obj \
10577 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
10578 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
10579 >/dev/null 2>conftest.err &&
10580 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
10581 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
10582 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
10583 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
10584 # icc doesn't choke on unknown options, it will just issue warnings
10585 # or remarks (even with -Werror). So we grep stderr for any message
10586 # that says an option was ignored or not supported.
10587 # When given -MP, icc 7.0 and 7.1 complain thusly:
10588 # icc: Command line warning: ignoring option '-M'; no argument required
10589 # The diagnosis changed in icc 8.0:
10590 # icc: Command line remark: option '-MP' not supported
10591 if (grep 'ignoring option' conftest.err ||
10592 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
10593 am_cv_CXX_dependencies_compiler_type=$depmode
10594 break
10595 fi
10596 fi
10597 done
10598
10599 cd ..
10600 rm -rf conftest.dir
10601 else
10602 am_cv_CXX_dependencies_compiler_type=none
10603 fi
10604
10605 fi
10606 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
10607 printf "%s\n" "$am_cv_CXX_dependencies_compiler_type" >&6; }
10608 CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
10609
10610 if
10611 test "x$enable_dependency_tracking" != xno \
10612 && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
10613 am__fastdepCXX_TRUE=
10614 am__fastdepCXX_FALSE='#'
10615 else
10616 am__fastdepCXX_TRUE='#'
10617 am__fastdepCXX_FALSE=
10618 fi
10619
10620
10621
10622 # By default we simply use the C compiler to build assembly code.
10623
10624 test "${CCAS+set}" = set || CCAS=$CC
10625 test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
10626
10627
10628
10629 depcc="$CCAS" am_compiler_list=
10630
10631 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
10632 printf %s "checking dependency style of $depcc... " >&6; }
10633 if test ${am_cv_CCAS_dependencies_compiler_type+y}
10634 then :
10635 printf %s "(cached) " >&6
10636 else $as_nop
10637 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
10638 # We make a subdir and do the tests there. Otherwise we can end up
10639 # making bogus files that we don't know about and never remove. For
10640 # instance it was reported that on HP-UX the gcc test will end up
10641 # making a dummy file named 'D' -- because '-MD' means "put the output
10642 # in D".
10643 rm -rf conftest.dir
10644 mkdir conftest.dir
10645 # Copy depcomp to subdir because otherwise we won't find it if we're
10646 # using a relative directory.
10647 cp "$am_depcomp" conftest.dir
10648 cd conftest.dir
10649 # We will build objects and dependencies in a subdirectory because
10650 # it helps to detect inapplicable dependency modes. For instance
10651 # both Tru64's cc and ICC support -MD to output dependencies as a
10652 # side effect of compilation, but ICC will put the dependencies in
10653 # the current directory while Tru64 will put them in the object
10654 # directory.
10655 mkdir sub
10656
10657 am_cv_CCAS_dependencies_compiler_type=none
10658 if test "$am_compiler_list" = ""; then
10659 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
10660 fi
10661 am__universal=false
10662
10663
10664 for depmode in $am_compiler_list; do
10665 # Setup a source with many dependencies, because some compilers
10666 # like to wrap large dependency lists on column 80 (with \), and
10667 # we should not choose a depcomp mode which is confused by this.
10668 #
10669 # We need to recreate these files for each test, as the compiler may
10670 # overwrite some of them when testing with obscure command lines.
10671 # This happens at least with the AIX C compiler.
10672 : > sub/conftest.c
10673 for i in 1 2 3 4 5 6; do
10674 echo '#include "conftst'$i'.h"' >> sub/conftest.c
10675 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
10676 # Solaris 10 /bin/sh.
10677 echo '/* dummy */' > sub/conftst$i.h
10678 done
10679 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
10680
10681 # We check with '-c' and '-o' for the sake of the "dashmstdout"
10682 # mode. It turns out that the SunPro C++ compiler does not properly
10683 # handle '-M -o', and we need to detect this. Also, some Intel
10684 # versions had trouble with output in subdirs.
10685 am__obj=sub/conftest.${OBJEXT-o}
10686 am__minus_obj="-o $am__obj"
10687 case $depmode in
10688 gcc)
10689 # This depmode causes a compiler race in universal mode.
10690 test "$am__universal" = false || continue
10691 ;;
10692 nosideeffect)
10693 # After this tag, mechanisms are not by side-effect, so they'll
10694 # only be used when explicitly requested.
10695 if test "x$enable_dependency_tracking" = xyes; then
10696 continue
10697 else
10698 break
10699 fi
10700 ;;
10701 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
10702 # This compiler won't grok '-c -o', but also, the minuso test has
10703 # not run yet. These depmodes are late enough in the game, and
10704 # so weak that their functioning should not be impacted.
10705 am__obj=conftest.${OBJEXT-o}
10706 am__minus_obj=
10707 ;;
10708 none) break ;;
10709 esac
10710 if depmode=$depmode \
10711 source=sub/conftest.c object=$am__obj \
10712 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
10713 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
10714 >/dev/null 2>conftest.err &&
10715 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
10716 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
10717 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
10718 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
10719 # icc doesn't choke on unknown options, it will just issue warnings
10720 # or remarks (even with -Werror). So we grep stderr for any message
10721 # that says an option was ignored or not supported.
10722 # When given -MP, icc 7.0 and 7.1 complain thusly:
10723 # icc: Command line warning: ignoring option '-M'; no argument required
10724 # The diagnosis changed in icc 8.0:
10725 # icc: Command line remark: option '-MP' not supported
10726 if (grep 'ignoring option' conftest.err ||
10727 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
10728 am_cv_CCAS_dependencies_compiler_type=$depmode
10729 break
10730 fi
10731 fi
10732 done
10733
10734 cd ..
10735 rm -rf conftest.dir
10736 else
10737 am_cv_CCAS_dependencies_compiler_type=none
10738 fi
10739
10740 fi
10741 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CCAS_dependencies_compiler_type" >&5
10742 printf "%s\n" "$am_cv_CCAS_dependencies_compiler_type" >&6; }
10743 CCASDEPMODE=depmode=$am_cv_CCAS_dependencies_compiler_type
10744
10745 if
10746 test "x$enable_dependency_tracking" != xno \
10747 && test "$am_cv_CCAS_dependencies_compiler_type" = gcc3; then
10748 am__fastdepCCAS_TRUE=
10749 am__fastdepCCAS_FALSE='#'
10750 else
10751 am__fastdepCCAS_TRUE='#'
10752 am__fastdepCCAS_FALSE=
10753 fi
10754
10755
10756
10757
10758
10759
10760
10761
10762 if test -n "$PYTHON"; then
10763 # If the user set $PYTHON, use it and don't search something else.
10764 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON version is >= 2.6" >&5
10765 printf %s "checking whether $PYTHON version is >= 2.6... " >&6; }
10766 prog="import sys
10767 # split strings by '.' and convert to numeric. Append some zeros
10768 # because we need at least 4 digits for the hex conversion.
10769 # map returns an iterator in Python 3.0 and a list in 2.x
10770 minver = list(map(int, '2.6'.split('.'))) + [0, 0, 0]
10771 minverhex = 0
10772 # xrange is not present in Python 3.0 and range returns an iterator
10773 for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i]
10774 sys.exit(sys.hexversion < minverhex)"
10775 if { echo "$as_me:$LINENO: $PYTHON -c "$prog"" >&5
10776 ($PYTHON -c "$prog") >&5 2>&5
10777 ac_status=$?
10778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10779 (exit $ac_status); }
10780 then :
10781 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10782 printf "%s\n" "yes" >&6; }
10783 else $as_nop
10784 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10785 printf "%s\n" "no" >&6; }
10786 as_fn_error $? "Python interpreter is too old" "$LINENO" 5
10787 fi
10788 am_display_PYTHON=$PYTHON
10789 else
10790 # Otherwise, try each interpreter until we find one that satisfies
10791 # VERSION.
10792 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a Python interpreter with version >= 2.6" >&5
10793 printf %s "checking for a Python interpreter with version >= 2.6... " >&6; }
10794 if test ${am_cv_pathless_PYTHON+y}
10795 then :
10796 printf %s "(cached) " >&6
10797 else $as_nop
10798
10799 for am_cv_pathless_PYTHON in python python2 python3 python3.11 python3.10 python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 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
10800 test "$am_cv_pathless_PYTHON" = none && break
10801 prog="import sys
10802 # split strings by '.' and convert to numeric. Append some zeros
10803 # because we need at least 4 digits for the hex conversion.
10804 # map returns an iterator in Python 3.0 and a list in 2.x
10805 minver = list(map(int, '2.6'.split('.'))) + [0, 0, 0]
10806 minverhex = 0
10807 # xrange is not present in Python 3.0 and range returns an iterator
10808 for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i]
10809 sys.exit(sys.hexversion < minverhex)"
10810 if { echo "$as_me:$LINENO: $am_cv_pathless_PYTHON -c "$prog"" >&5
10811 ($am_cv_pathless_PYTHON -c "$prog") >&5 2>&5
10812 ac_status=$?
10813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10814 (exit $ac_status); }
10815 then :
10816 break
10817 fi
10818 done
10819 fi
10820 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_pathless_PYTHON" >&5
10821 printf "%s\n" "$am_cv_pathless_PYTHON" >&6; }
10822 # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
10823 if test "$am_cv_pathless_PYTHON" = none; then
10824 PYTHON=:
10825 else
10826 # Extract the first word of "$am_cv_pathless_PYTHON", so it can be a program name with args.
10827 set dummy $am_cv_pathless_PYTHON; ac_word=$2
10828 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10829 printf %s "checking for $ac_word... " >&6; }
10830 if test ${ac_cv_path_PYTHON+y}
10831 then :
10832 printf %s "(cached) " >&6
10833 else $as_nop
10834 case $PYTHON in
10835 [\\/]* | ?:[\\/]*)
10836 ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
10837 ;;
10838 *)
10839 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10840 for as_dir in $PATH
10841 do
10842 IFS=$as_save_IFS
10843 case $as_dir in #(((
10844 '') as_dir=./ ;;
10845 */) ;;
10846 *) as_dir=$as_dir/ ;;
10847 esac
10848 for ac_exec_ext in '' $ac_executable_extensions; do
10849 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10850 ac_cv_path_PYTHON="$as_dir$ac_word$ac_exec_ext"
10851 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10852 break 2
10853 fi
10854 done
10855 done
10856 IFS=$as_save_IFS
10857
10858 ;;
10859 esac
10860 fi
10861 PYTHON=$ac_cv_path_PYTHON
10862 if test -n "$PYTHON"; then
10863 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
10864 printf "%s\n" "$PYTHON" >&6; }
10865 else
10866 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10867 printf "%s\n" "no" >&6; }
10868 fi
10869
10870
10871 fi
10872 am_display_PYTHON=$am_cv_pathless_PYTHON
10873 fi
10874
10875
10876 if test "$PYTHON" = :; then
10877 as_fn_error $? "no suitable Python interpreter found" "$LINENO" 5
10878 else
10879
10880 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON version" >&5
10881 printf %s "checking for $am_display_PYTHON version... " >&6; }
10882 if test ${am_cv_python_version+y}
10883 then :
10884 printf %s "(cached) " >&6
10885 else $as_nop
10886 am_cv_python_version=`$PYTHON -c "import sys; print ('%u.%u' % sys.version_info[:2])"`
10887 fi
10888 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_version" >&5
10889 printf "%s\n" "$am_cv_python_version" >&6; }
10890 PYTHON_VERSION=$am_cv_python_version
10891
10892
10893 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON platform" >&5
10894 printf %s "checking for $am_display_PYTHON platform... " >&6; }
10895 if test ${am_cv_python_platform+y}
10896 then :
10897 printf %s "(cached) " >&6
10898 else $as_nop
10899 am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`
10900 fi
10901 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_platform" >&5
10902 printf "%s\n" "$am_cv_python_platform" >&6; }
10903 PYTHON_PLATFORM=$am_cv_python_platform
10904
10905
10906 if test "x$prefix" = xNONE; then
10907 am__usable_prefix=$ac_default_prefix
10908 else
10909 am__usable_prefix=$prefix
10910 fi
10911
10912 # Allow user to request using sys.* values from Python,
10913 # instead of the GNU $prefix values.
10914
10915 # Check whether --with-python-sys-prefix was given.
10916 if test ${with_python_sys_prefix+y}
10917 then :
10918 withval=$with_python_sys_prefix; am_use_python_sys=:
10919 else $as_nop
10920 am_use_python_sys=false
10921 fi
10922
10923
10924 # Allow user to override whatever the default Python prefix is.
10925
10926 # Check whether --with-python_prefix was given.
10927 if test ${with_python_prefix+y}
10928 then :
10929 withval=$with_python_prefix; am_python_prefix_subst=$withval
10930 am_cv_python_prefix=$withval
10931 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for explicit $am_display_PYTHON prefix" >&5
10932 printf %s "checking for explicit $am_display_PYTHON prefix... " >&6; }
10933 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_prefix" >&5
10934 printf "%s\n" "$am_cv_python_prefix" >&6; }
10935 else $as_nop
10936
10937 if $am_use_python_sys; then
10938 # using python sys.prefix value, not GNU
10939 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for python default $am_display_PYTHON prefix" >&5
10940 printf %s "checking for python default $am_display_PYTHON prefix... " >&6; }
10941 if test ${am_cv_python_prefix+y}
10942 then :
10943 printf %s "(cached) " >&6
10944 else $as_nop
10945 am_cv_python_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.prefix)"`
10946 fi
10947 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_prefix" >&5
10948 printf "%s\n" "$am_cv_python_prefix" >&6; }
10949
10950 case $am_cv_python_prefix in
10951 $am__usable_prefix*)
10952 am__strip_prefix=`echo "$am__usable_prefix" | sed 's|.|.|g'`
10953 am_python_prefix_subst=`echo "$am_cv_python_prefix" | sed "s,^$am__strip_prefix,\\${prefix},"`
10954 ;;
10955 *)
10956 am_python_prefix_subst=$am_cv_python_prefix
10957 ;;
10958 esac
10959 else # using GNU prefix value, not python sys.prefix
10960 am_python_prefix_subst='${prefix}'
10961 am_python_prefix=$am_python_prefix_subst
10962 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU default $am_display_PYTHON prefix" >&5
10963 printf %s "checking for GNU default $am_display_PYTHON prefix... " >&6; }
10964 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_python_prefix" >&5
10965 printf "%s\n" "$am_python_prefix" >&6; }
10966 fi
10967 fi
10968
10969 # Substituting python_prefix_subst value.
10970 PYTHON_PREFIX=$am_python_prefix_subst
10971
10972
10973 # emacs-page Now do it all over again for Python exec_prefix, but with yet
10974 # another conditional: fall back to regular prefix if that was specified.
10975
10976 # Check whether --with-python_exec_prefix was given.
10977 if test ${with_python_exec_prefix+y}
10978 then :
10979 withval=$with_python_exec_prefix; am_python_exec_prefix_subst=$withval
10980 am_cv_python_exec_prefix=$withval
10981 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for explicit $am_display_PYTHON exec_prefix" >&5
10982 printf %s "checking for explicit $am_display_PYTHON exec_prefix... " >&6; }
10983 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_exec_prefix" >&5
10984 printf "%s\n" "$am_cv_python_exec_prefix" >&6; }
10985 else $as_nop
10986
10987 # no explicit --with-python_exec_prefix, but if
10988 # --with-python_prefix was given, use its value for python_exec_prefix too.
10989 if test -n "$with_python_prefix"
10990 then :
10991 am_python_exec_prefix_subst=$with_python_prefix
10992 am_cv_python_exec_prefix=$with_python_prefix
10993 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for python_prefix-given $am_display_PYTHON exec_prefix" >&5
10994 printf %s "checking for python_prefix-given $am_display_PYTHON exec_prefix... " >&6; }
10995 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_exec_prefix" >&5
10996 printf "%s\n" "$am_cv_python_exec_prefix" >&6; }
10997 else $as_nop
10998
10999 # Set am__usable_exec_prefix whether using GNU or Python values,
11000 # since we use that variable for pyexecdir.
11001 if test "x$exec_prefix" = xNONE; then
11002 am__usable_exec_prefix=$am__usable_prefix
11003 else
11004 am__usable_exec_prefix=$exec_prefix
11005 fi
11006 #
11007 if $am_use_python_sys; then # using python sys.exec_prefix, not GNU
11008 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for python default $am_display_PYTHON exec_prefix" >&5
11009 printf %s "checking for python default $am_display_PYTHON exec_prefix... " >&6; }
11010 if test ${am_cv_python_exec_prefix+y}
11011 then :
11012 printf %s "(cached) " >&6
11013 else $as_nop
11014 am_cv_python_exec_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.exec_prefix)"`
11015 fi
11016 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_exec_prefix" >&5
11017 printf "%s\n" "$am_cv_python_exec_prefix" >&6; }
11018 case $am_cv_python_exec_prefix in
11019 $am__usable_exec_prefix*)
11020 am__strip_prefix=`echo "$am__usable_exec_prefix" | sed 's|.|.|g'`
11021 am_python_exec_prefix_subst=`echo "$am_cv_python_exec_prefix" | sed "s,^$am__strip_prefix,\\${exec_prefix},"`
11022 ;;
11023 *)
11024 am_python_exec_prefix_subst=$am_cv_python_exec_prefix
11025 ;;
11026 esac
11027 else # using GNU $exec_prefix, not python sys.exec_prefix
11028 am_python_exec_prefix_subst='${exec_prefix}'
11029 am_python_exec_prefix=$am_python_exec_prefix_subst
11030 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU default $am_display_PYTHON exec_prefix" >&5
11031 printf %s "checking for GNU default $am_display_PYTHON exec_prefix... " >&6; }
11032 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_python_exec_prefix" >&5
11033 printf "%s\n" "$am_python_exec_prefix" >&6; }
11034 fi
11035 fi
11036 fi
11037
11038 # Substituting python_exec_prefix_subst.
11039 PYTHON_EXEC_PREFIX=$am_python_exec_prefix_subst
11040
11041
11042 # Factor out some code duplication into this shell variable.
11043 am_python_setup_sysconfig="\
11044 import sys
11045 # Prefer sysconfig over distutils.sysconfig, for better compatibility
11046 # with python 3.x. See automake bug#10227.
11047 try:
11048 import sysconfig
11049 except ImportError:
11050 can_use_sysconfig = 0
11051 else:
11052 can_use_sysconfig = 1
11053 # Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs:
11054 # <https://github.com/pypa/virtualenv/issues/118>
11055 try:
11056 from platform import python_implementation
11057 if python_implementation() == 'CPython' and sys.version[:3] == '2.7':
11058 can_use_sysconfig = 0
11059 except ImportError:
11060 pass"
11061
11062
11063 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON script directory (pythondir)" >&5
11064 printf %s "checking for $am_display_PYTHON script directory (pythondir)... " >&6; }
11065 if test ${am_cv_python_pythondir+y}
11066 then :
11067 printf %s "(cached) " >&6
11068 else $as_nop
11069 if test "x$am_cv_python_prefix" = x; then
11070 am_py_prefix=$am__usable_prefix
11071 else
11072 am_py_prefix=$am_cv_python_prefix
11073 fi
11074 am_cv_python_pythondir=`$PYTHON -c "
11075 $am_python_setup_sysconfig
11076 if can_use_sysconfig:
11077 if hasattr(sysconfig, 'get_default_scheme'):
11078 scheme = sysconfig.get_default_scheme()
11079 else:
11080 scheme = sysconfig._get_default_scheme()
11081 if scheme == 'posix_local':
11082 # Debian's default scheme installs to /usr/local/ but we want to find headers in /usr/
11083 scheme = 'posix_prefix'
11084 sitedir = sysconfig.get_path('purelib', scheme, vars={'base':'$am_py_prefix'})
11085 else:
11086 from distutils import sysconfig
11087 sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix')
11088 sys.stdout.write(sitedir)"`
11089 #
11090 case $am_cv_python_pythondir in
11091 $am_py_prefix*)
11092 am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
11093 am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,\\${PYTHON_PREFIX},"`
11094 ;;
11095 *)
11096 case $am_py_prefix in
11097 /usr|/System*) ;;
11098 *) am_cv_python_pythondir="\${PYTHON_PREFIX}/lib/python$PYTHON_VERSION/site-packages"
11099 ;;
11100 esac
11101 ;;
11102 esac
11103
11104 fi
11105 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pythondir" >&5
11106 printf "%s\n" "$am_cv_python_pythondir" >&6; }
11107 pythondir=$am_cv_python_pythondir
11108
11109
11110 pkgpythondir=\${pythondir}/$PACKAGE
11111
11112
11113 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON extension module directory (pyexecdir)" >&5
11114 printf %s "checking for $am_display_PYTHON extension module directory (pyexecdir)... " >&6; }
11115 if test ${am_cv_python_pyexecdir+y}
11116 then :
11117 printf %s "(cached) " >&6
11118 else $as_nop
11119 if test "x$am_cv_python_exec_prefix" = x; then
11120 am_py_exec_prefix=$am__usable_exec_prefix
11121 else
11122 am_py_exec_prefix=$am_cv_python_exec_prefix
11123 fi
11124 am_cv_python_pyexecdir=`$PYTHON -c "
11125 $am_python_setup_sysconfig
11126 if can_use_sysconfig:
11127 if hasattr(sysconfig, 'get_default_scheme'):
11128 scheme = sysconfig.get_default_scheme()
11129 else:
11130 scheme = sysconfig._get_default_scheme()
11131 if scheme == 'posix_local':
11132 # Debian's default scheme installs to /usr/local/ but we want to find headers in /usr/
11133 scheme = 'posix_prefix'
11134 sitedir = sysconfig.get_path('platlib', scheme, vars={'platbase':'$am_py_exec_prefix'})
11135 else:
11136 from distutils import sysconfig
11137 sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_exec_prefix')
11138 sys.stdout.write(sitedir)"`
11139 #
11140 case $am_cv_python_pyexecdir in
11141 $am_py_exec_prefix*)
11142 am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
11143 am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,\\${PYTHON_EXEC_PREFIX},"`
11144 ;;
11145 *)
11146 case $am_py_exec_prefix in
11147 /usr|/System*) ;;
11148 *) am_cv_python_pyexecdir="\${PYTHON_EXEC_PREFIX}/lib/python$PYTHON_VERSION/site-packages"
11149 ;;
11150 esac
11151 ;;
11152 esac
11153
11154 fi
11155 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pyexecdir" >&5
11156 printf "%s\n" "$am_cv_python_pyexecdir" >&6; }
11157 pyexecdir=$am_cv_python_pyexecdir
11158
11159
11160 pkgpyexecdir=\${pyexecdir}/$PACKAGE
11161
11162
11163
11164 fi
11165
11166
11167 # Must be GCC.
11168 test "x$GCC" = xyes || as_fn_error $? "GCC is required" "$LINENO" 5
11169
11170 # Extract the first word of "$CXX", so it can be a program name with args.
11171 set dummy $CXX; ac_word=$2
11172 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11173 printf %s "checking for $ac_word... " >&6; }
11174 if test ${ac_cv_prog_HAVE_CXX+y}
11175 then :
11176 printf %s "(cached) " >&6
11177 else $as_nop
11178 if test -n "$HAVE_CXX"; then
11179 ac_cv_prog_HAVE_CXX="$HAVE_CXX" # Let the user override the test.
11180 else
11181 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11182 for as_dir in $PATH
11183 do
11184 IFS=$as_save_IFS
11185 case $as_dir in #(((
11186 '') as_dir=./ ;;
11187 */) ;;
11188 *) as_dir=$as_dir/ ;;
11189 esac
11190 for ac_exec_ext in '' $ac_executable_extensions; do
11191 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
11192 ac_cv_prog_HAVE_CXX="yes"
11193 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
11194 break 2
11195 fi
11196 done
11197 done
11198 IFS=$as_save_IFS
11199
11200 test -z "$ac_cv_prog_HAVE_CXX" && ac_cv_prog_HAVE_CXX="no"
11201 fi
11202 fi
11203 HAVE_CXX=$ac_cv_prog_HAVE_CXX
11204 if test -n "$HAVE_CXX"; then
11205 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $HAVE_CXX" >&5
11206 printf "%s\n" "$HAVE_CXX" >&6; }
11207 else
11208 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11209 printf "%s\n" "no" >&6; }
11210 fi
11211
11212
11213
11214 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
11215 printf %s "checking for a sed that does not truncate output... " >&6; }
11216 if test ${ac_cv_path_SED+y}
11217 then :
11218 printf %s "(cached) " >&6
11219 else $as_nop
11220 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
11221 for ac_i in 1 2 3 4 5 6 7; do
11222 ac_script="$ac_script$as_nl$ac_script"
11223 done
11224 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
11225 { ac_script=; unset ac_script;}
11226 if test -z "$SED"; then
11227 ac_path_SED_found=false
11228 # Loop through the user's path and test for each of PROGNAME-LIST
11229 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11230 for as_dir in $PATH
11231 do
11232 IFS=$as_save_IFS
11233 case $as_dir in #(((
11234 '') as_dir=./ ;;
11235 */) ;;
11236 *) as_dir=$as_dir/ ;;
11237 esac
11238 for ac_prog in sed gsed
11239 do
11240 for ac_exec_ext in '' $ac_executable_extensions; do
11241 ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
11242 as_fn_executable_p "$ac_path_SED" || continue
11243 # Check for GNU ac_path_SED and select it if it is found.
11244 # Check for GNU $ac_path_SED
11245 case `"$ac_path_SED" --version 2>&1` in
11246 *GNU*)
11247 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
11248 *)
11249 ac_count=0
11250 printf %s 0123456789 >"conftest.in"
11251 while :
11252 do
11253 cat "conftest.in" "conftest.in" >"conftest.tmp"
11254 mv "conftest.tmp" "conftest.in"
11255 cp "conftest.in" "conftest.nl"
11256 printf "%s\n" '' >> "conftest.nl"
11257 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
11258 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11259 as_fn_arith $ac_count + 1 && ac_count=$as_val
11260 if test $ac_count -gt ${ac_path_SED_max-0}; then
11261 # Best one so far, save it but keep looking for a better one
11262 ac_cv_path_SED="$ac_path_SED"
11263 ac_path_SED_max=$ac_count
11264 fi
11265 # 10*(2^10) chars as input seems more than enough
11266 test $ac_count -gt 10 && break
11267 done
11268 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11269 esac
11270
11271 $ac_path_SED_found && break 3
11272 done
11273 done
11274 done
11275 IFS=$as_save_IFS
11276 if test -z "$ac_cv_path_SED"; then
11277 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
11278 fi
11279 else
11280 ac_cv_path_SED=$SED
11281 fi
11282
11283 fi
11284 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
11285 printf "%s\n" "$ac_cv_path_SED" >&6; }
11286 SED="$ac_cv_path_SED"
11287 rm -f conftest.sed
11288
11289
11290 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
11291 printf %s "checking whether NLS is requested... " >&6; }
11292 # Check whether --enable-nls was given.
11293 if test ${enable_nls+y}
11294 then :
11295 enableval=$enable_nls; USE_NLS=$enableval
11296 else $as_nop
11297 USE_NLS=yes
11298 fi
11299
11300 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
11301 printf "%s\n" "$USE_NLS" >&6; }
11302
11303
11304
11305
11306 GETTEXT_MACRO_VERSION=0.18
11307
11308
11309
11310
11311 # Prepare PATH_SEPARATOR.
11312 # The user is always right.
11313 if test "${PATH_SEPARATOR+set}" != set; then
11314 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
11315 # contains only /bin. Note that ksh looks also at the FPATH variable,
11316 # so we have to set that as well for the test.
11317 PATH_SEPARATOR=:
11318 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
11319 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
11320 || PATH_SEPARATOR=';'
11321 }
11322 fi
11323
11324 # Find out how to test for executable files. Don't use a zero-byte file,
11325 # as systems may use methods other than mode bits to determine executability.
11326 cat >conf$$.file <<_ASEOF
11327 #! /bin/sh
11328 exit 0
11329 _ASEOF
11330 chmod +x conf$$.file
11331 if test -x conf$$.file >/dev/null 2>&1; then
11332 ac_executable_p="test -x"
11333 else
11334 ac_executable_p="test -f"
11335 fi
11336 rm -f conf$$.file
11337
11338 # Extract the first word of "msgfmt", so it can be a program name with args.
11339 set dummy msgfmt; ac_word=$2
11340 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11341 printf %s "checking for $ac_word... " >&6; }
11342 if test ${ac_cv_path_MSGFMT+y}
11343 then :
11344 printf %s "(cached) " >&6
11345 else $as_nop
11346 case "$MSGFMT" in
11347 [\\/]* | ?:[\\/]*)
11348 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
11349 ;;
11350 *)
11351 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
11352 for ac_dir in $PATH; do
11353 IFS="$ac_save_IFS"
11354 test -z "$ac_dir" && ac_dir=.
11355 for ac_exec_ext in '' $ac_executable_extensions; do
11356 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
11357 echo "$as_me: trying $ac_dir/$ac_word..." >&5
11358 if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 &&
11359 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
11360 ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
11361 break 2
11362 fi
11363 fi
11364 done
11365 done
11366 IFS="$ac_save_IFS"
11367 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
11368 ;;
11369 esac
11370 fi
11371 MSGFMT="$ac_cv_path_MSGFMT"
11372 if test "$MSGFMT" != ":"; then
11373 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
11374 printf "%s\n" "$MSGFMT" >&6; }
11375 else
11376 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11377 printf "%s\n" "no" >&6; }
11378 fi
11379
11380 # Extract the first word of "gmsgfmt", so it can be a program name with args.
11381 set dummy gmsgfmt; ac_word=$2
11382 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11383 printf %s "checking for $ac_word... " >&6; }
11384 if test ${ac_cv_path_GMSGFMT+y}
11385 then :
11386 printf %s "(cached) " >&6
11387 else $as_nop
11388 case $GMSGFMT in
11389 [\\/]* | ?:[\\/]*)
11390 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
11391 ;;
11392 *)
11393 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11394 for as_dir in $PATH
11395 do
11396 IFS=$as_save_IFS
11397 case $as_dir in #(((
11398 '') as_dir=./ ;;
11399 */) ;;
11400 *) as_dir=$as_dir/ ;;
11401 esac
11402 for ac_exec_ext in '' $ac_executable_extensions; do
11403 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
11404 ac_cv_path_GMSGFMT="$as_dir$ac_word$ac_exec_ext"
11405 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
11406 break 2
11407 fi
11408 done
11409 done
11410 IFS=$as_save_IFS
11411
11412 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
11413 ;;
11414 esac
11415 fi
11416 GMSGFMT=$ac_cv_path_GMSGFMT
11417 if test -n "$GMSGFMT"; then
11418 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
11419 printf "%s\n" "$GMSGFMT" >&6; }
11420 else
11421 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11422 printf "%s\n" "no" >&6; }
11423 fi
11424
11425
11426
11427 case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
11428 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
11429 *) MSGFMT_015=$MSGFMT ;;
11430 esac
11431
11432 case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
11433 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
11434 *) GMSGFMT_015=$GMSGFMT ;;
11435 esac
11436
11437
11438
11439 # Prepare PATH_SEPARATOR.
11440 # The user is always right.
11441 if test "${PATH_SEPARATOR+set}" != set; then
11442 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
11443 # contains only /bin. Note that ksh looks also at the FPATH variable,
11444 # so we have to set that as well for the test.
11445 PATH_SEPARATOR=:
11446 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
11447 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
11448 || PATH_SEPARATOR=';'
11449 }
11450 fi
11451
11452 # Find out how to test for executable files. Don't use a zero-byte file,
11453 # as systems may use methods other than mode bits to determine executability.
11454 cat >conf$$.file <<_ASEOF
11455 #! /bin/sh
11456 exit 0
11457 _ASEOF
11458 chmod +x conf$$.file
11459 if test -x conf$$.file >/dev/null 2>&1; then
11460 ac_executable_p="test -x"
11461 else
11462 ac_executable_p="test -f"
11463 fi
11464 rm -f conf$$.file
11465
11466 # Extract the first word of "xgettext", so it can be a program name with args.
11467 set dummy xgettext; ac_word=$2
11468 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11469 printf %s "checking for $ac_word... " >&6; }
11470 if test ${ac_cv_path_XGETTEXT+y}
11471 then :
11472 printf %s "(cached) " >&6
11473 else $as_nop
11474 case "$XGETTEXT" in
11475 [\\/]* | ?:[\\/]*)
11476 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
11477 ;;
11478 *)
11479 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
11480 for ac_dir in $PATH; do
11481 IFS="$ac_save_IFS"
11482 test -z "$ac_dir" && ac_dir=.
11483 for ac_exec_ext in '' $ac_executable_extensions; do
11484 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
11485 echo "$as_me: trying $ac_dir/$ac_word..." >&5
11486 if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 &&
11487 (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
11488 ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
11489 break 2
11490 fi
11491 fi
11492 done
11493 done
11494 IFS="$ac_save_IFS"
11495 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
11496 ;;
11497 esac
11498 fi
11499 XGETTEXT="$ac_cv_path_XGETTEXT"
11500 if test "$XGETTEXT" != ":"; then
11501 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
11502 printf "%s\n" "$XGETTEXT" >&6; }
11503 else
11504 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11505 printf "%s\n" "no" >&6; }
11506 fi
11507
11508 rm -f messages.po
11509
11510 case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
11511 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
11512 *) XGETTEXT_015=$XGETTEXT ;;
11513 esac
11514
11515
11516
11517 # Prepare PATH_SEPARATOR.
11518 # The user is always right.
11519 if test "${PATH_SEPARATOR+set}" != set; then
11520 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
11521 # contains only /bin. Note that ksh looks also at the FPATH variable,
11522 # so we have to set that as well for the test.
11523 PATH_SEPARATOR=:
11524 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
11525 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
11526 || PATH_SEPARATOR=';'
11527 }
11528 fi
11529
11530 # Find out how to test for executable files. Don't use a zero-byte file,
11531 # as systems may use methods other than mode bits to determine executability.
11532 cat >conf$$.file <<_ASEOF
11533 #! /bin/sh
11534 exit 0
11535 _ASEOF
11536 chmod +x conf$$.file
11537 if test -x conf$$.file >/dev/null 2>&1; then
11538 ac_executable_p="test -x"
11539 else
11540 ac_executable_p="test -f"
11541 fi
11542 rm -f conf$$.file
11543
11544 # Extract the first word of "msgmerge", so it can be a program name with args.
11545 set dummy msgmerge; ac_word=$2
11546 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11547 printf %s "checking for $ac_word... " >&6; }
11548 if test ${ac_cv_path_MSGMERGE+y}
11549 then :
11550 printf %s "(cached) " >&6
11551 else $as_nop
11552 case "$MSGMERGE" in
11553 [\\/]* | ?:[\\/]*)
11554 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
11555 ;;
11556 *)
11557 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
11558 for ac_dir in $PATH; do
11559 IFS="$ac_save_IFS"
11560 test -z "$ac_dir" && ac_dir=.
11561 for ac_exec_ext in '' $ac_executable_extensions; do
11562 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
11563 echo "$as_me: trying $ac_dir/$ac_word..." >&5
11564 if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then
11565 ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
11566 break 2
11567 fi
11568 fi
11569 done
11570 done
11571 IFS="$ac_save_IFS"
11572 test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
11573 ;;
11574 esac
11575 fi
11576 MSGMERGE="$ac_cv_path_MSGMERGE"
11577 if test "$MSGMERGE" != ":"; then
11578 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
11579 printf "%s\n" "$MSGMERGE" >&6; }
11580 else
11581 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11582 printf "%s\n" "no" >&6; }
11583 fi
11584
11585
11586 test -n "$localedir" || localedir='${datadir}/locale'
11587
11588
11589 test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
11590
11591
11592 ac_config_commands="$ac_config_commands po-directories"
11593
11594
11595
11596 if test "X$prefix" = "XNONE"; then
11597 acl_final_prefix="$ac_default_prefix"
11598 else
11599 acl_final_prefix="$prefix"
11600 fi
11601 if test "X$exec_prefix" = "XNONE"; then
11602 acl_final_exec_prefix='${prefix}'
11603 else
11604 acl_final_exec_prefix="$exec_prefix"
11605 fi
11606 acl_save_prefix="$prefix"
11607 prefix="$acl_final_prefix"
11608 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
11609 prefix="$acl_save_prefix"
11610
11611
11612
11613 # Check whether --with-gnu-ld was given.
11614 if test ${with_gnu_ld+y}
11615 then :
11616 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
11617 else $as_nop
11618 with_gnu_ld=no
11619 fi
11620
11621 # Prepare PATH_SEPARATOR.
11622 # The user is always right.
11623 if test "${PATH_SEPARATOR+set}" != set; then
11624 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
11625 # contains only /bin. Note that ksh looks also at the FPATH variable,
11626 # so we have to set that as well for the test.
11627 PATH_SEPARATOR=:
11628 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
11629 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
11630 || PATH_SEPARATOR=';'
11631 }
11632 fi
11633
11634 ac_prog=ld
11635 if test "$GCC" = yes; then
11636 # Check if gcc -print-prog-name=ld gives a path.
11637 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
11638 printf %s "checking for ld used by $CC... " >&6; }
11639 case $host in
11640 *-*-mingw*)
11641 # gcc leaves a trailing carriage return which upsets mingw
11642 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
11643 *)
11644 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
11645 esac
11646 case $ac_prog in
11647 # Accept absolute paths.
11648 [\\/]* | ?:[\\/]*)
11649 re_direlt='/[^/][^/]*/\.\./'
11650 # Canonicalize the pathname of ld
11651 ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
11652 while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
11653 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
11654 done
11655 test -z "$LD" && LD="$ac_prog"
11656 ;;
11657 "")
11658 # If it fails, then pretend we aren't using GCC.
11659 ac_prog=ld
11660 ;;
11661 *)
11662 # If it is relative, then search for the first ld in PATH.
11663 with_gnu_ld=unknown
11664 ;;
11665 esac
11666 elif test "$with_gnu_ld" = yes; then
11667 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
11668 printf %s "checking for GNU ld... " >&6; }
11669 else
11670 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
11671 printf %s "checking for non-GNU ld... " >&6; }
11672 fi
11673 if test ${acl_cv_path_LD+y}
11674 then :
11675 printf %s "(cached) " >&6
11676 else $as_nop
11677 if test -z "$LD"; then
11678 acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
11679 for ac_dir in $PATH; do
11680 IFS="$acl_save_ifs"
11681 test -z "$ac_dir" && ac_dir=.
11682 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
11683 acl_cv_path_LD="$ac_dir/$ac_prog"
11684 # Check to see if the program is GNU ld. I'd rather use --version,
11685 # but apparently some variants of GNU ld only accept -v.
11686 # Break only if it was the GNU/non-GNU ld that we prefer.
11687 case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
11688 *GNU* | *'with BFD'*)
11689 test "$with_gnu_ld" != no && break
11690 ;;
11691 *)
11692 test "$with_gnu_ld" != yes && break
11693 ;;
11694 esac
11695 fi
11696 done
11697 IFS="$acl_save_ifs"
11698 else
11699 acl_cv_path_LD="$LD" # Let the user override the test with a path.
11700 fi
11701 fi
11702
11703 LD="$acl_cv_path_LD"
11704 if test -n "$LD"; then
11705 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
11706 printf "%s\n" "$LD" >&6; }
11707 else
11708 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11709 printf "%s\n" "no" >&6; }
11710 fi
11711 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
11712 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
11713 printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
11714 if test ${acl_cv_prog_gnu_ld+y}
11715 then :
11716 printf %s "(cached) " >&6
11717 else $as_nop
11718 # I'd rather use --version here, but apparently some GNU lds only accept -v.
11719 case `$LD -v 2>&1 </dev/null` in
11720 *GNU* | *'with BFD'*)
11721 acl_cv_prog_gnu_ld=yes
11722 ;;
11723 *)
11724 acl_cv_prog_gnu_ld=no
11725 ;;
11726 esac
11727 fi
11728 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
11729 printf "%s\n" "$acl_cv_prog_gnu_ld" >&6; }
11730 with_gnu_ld=$acl_cv_prog_gnu_ld
11731
11732
11733
11734
11735
11736 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
11737 printf %s "checking for shared library run path origin... " >&6; }
11738 if test ${acl_cv_rpath+y}
11739 then :
11740 printf %s "(cached) " >&6
11741 else $as_nop
11742
11743 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
11744 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
11745 . ./conftest.sh
11746 rm -f ./conftest.sh
11747 acl_cv_rpath=done
11748
11749 fi
11750 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
11751 printf "%s\n" "$acl_cv_rpath" >&6; }
11752 wl="$acl_cv_wl"
11753 acl_libext="$acl_cv_libext"
11754 acl_shlibext="$acl_cv_shlibext"
11755 acl_libname_spec="$acl_cv_libname_spec"
11756 acl_library_names_spec="$acl_cv_library_names_spec"
11757 acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
11758 acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
11759 acl_hardcode_direct="$acl_cv_hardcode_direct"
11760 acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
11761 # Check whether --enable-rpath was given.
11762 if test ${enable_rpath+y}
11763 then :
11764 enableval=$enable_rpath; :
11765 else $as_nop
11766 enable_rpath=yes
11767 fi
11768
11769
11770
11771
11772 acl_libdirstem=lib
11773 acl_libdirstem2=
11774 case "$host_os" in
11775 solaris*)
11776 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
11777 printf %s "checking for 64-bit host... " >&6; }
11778 if test ${gl_cv_solaris_64bit+y}
11779 then :
11780 printf %s "(cached) " >&6
11781 else $as_nop
11782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11783 /* end confdefs.h. */
11784
11785 #ifdef _LP64
11786 sixtyfour bits
11787 #endif
11788
11789 _ACEOF
11790 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11791 $EGREP "sixtyfour bits" >/dev/null 2>&1
11792 then :
11793 gl_cv_solaris_64bit=yes
11794 else $as_nop
11795 gl_cv_solaris_64bit=no
11796 fi
11797 rm -rf conftest*
11798
11799
11800 fi
11801 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
11802 printf "%s\n" "$gl_cv_solaris_64bit" >&6; }
11803 if test $gl_cv_solaris_64bit = yes; then
11804 acl_libdirstem=lib/64
11805 case "$host_cpu" in
11806 sparc*) acl_libdirstem2=lib/sparcv9 ;;
11807 i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
11808 esac
11809 fi
11810 ;;
11811 *)
11812 searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
11813 if test -n "$searchpath"; then
11814 acl_save_IFS="${IFS= }"; IFS=":"
11815 for searchdir in $searchpath; do
11816 if test -d "$searchdir"; then
11817 case "$searchdir" in
11818 */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
11819 */../ | */.. )
11820 # Better ignore directories of this form. They are misleading.
11821 ;;
11822 *) searchdir=`cd "$searchdir" && pwd`
11823 case "$searchdir" in
11824 */lib64 ) acl_libdirstem=lib64 ;;
11825 esac ;;
11826 esac
11827 fi
11828 done
11829 IFS="$acl_save_IFS"
11830 fi
11831 ;;
11832 esac
11833 test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
11834
11835
11836
11837
11838
11839
11840
11841
11842
11843
11844
11845
11846 use_additional=yes
11847
11848 acl_save_prefix="$prefix"
11849 prefix="$acl_final_prefix"
11850 acl_save_exec_prefix="$exec_prefix"
11851 exec_prefix="$acl_final_exec_prefix"
11852
11853 eval additional_includedir=\"$includedir\"
11854 eval additional_libdir=\"$libdir\"
11855
11856 exec_prefix="$acl_save_exec_prefix"
11857 prefix="$acl_save_prefix"
11858
11859
11860 # Check whether --with-libiconv-prefix was given.
11861 if test ${with_libiconv_prefix+y}
11862 then :
11863 withval=$with_libiconv_prefix;
11864 if test "X$withval" = "Xno"; then
11865 use_additional=no
11866 else
11867 if test "X$withval" = "X"; then
11868
11869 acl_save_prefix="$prefix"
11870 prefix="$acl_final_prefix"
11871 acl_save_exec_prefix="$exec_prefix"
11872 exec_prefix="$acl_final_exec_prefix"
11873
11874 eval additional_includedir=\"$includedir\"
11875 eval additional_libdir=\"$libdir\"
11876
11877 exec_prefix="$acl_save_exec_prefix"
11878 prefix="$acl_save_prefix"
11879
11880 else
11881 additional_includedir="$withval/include"
11882 additional_libdir="$withval/$acl_libdirstem"
11883 if test "$acl_libdirstem2" != "$acl_libdirstem" \
11884 && ! test -d "$withval/$acl_libdirstem"; then
11885 additional_libdir="$withval/$acl_libdirstem2"
11886 fi
11887 fi
11888 fi
11889
11890 fi
11891
11892 LIBICONV=
11893 LTLIBICONV=
11894 INCICONV=
11895 LIBICONV_PREFIX=
11896 HAVE_LIBICONV=
11897 rpathdirs=
11898 ltrpathdirs=
11899 names_already_handled=
11900 names_next_round='iconv '
11901 while test -n "$names_next_round"; do
11902 names_this_round="$names_next_round"
11903 names_next_round=
11904 for name in $names_this_round; do
11905 already_handled=
11906 for n in $names_already_handled; do
11907 if test "$n" = "$name"; then
11908 already_handled=yes
11909 break
11910 fi
11911 done
11912 if test -z "$already_handled"; then
11913 names_already_handled="$names_already_handled $name"
11914 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
11915 eval value=\"\$HAVE_LIB$uppername\"
11916 if test -n "$value"; then
11917 if test "$value" = yes; then
11918 eval value=\"\$LIB$uppername\"
11919 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
11920 eval value=\"\$LTLIB$uppername\"
11921 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
11922 else
11923 :
11924 fi
11925 else
11926 found_dir=
11927 found_la=
11928 found_so=
11929 found_a=
11930 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
11931 if test -n "$acl_shlibext"; then
11932 shrext=".$acl_shlibext" # typically: shrext=.so
11933 else
11934 shrext=
11935 fi
11936 if test $use_additional = yes; then
11937 dir="$additional_libdir"
11938 if test -n "$acl_shlibext"; then
11939 if test -f "$dir/$libname$shrext"; then
11940 found_dir="$dir"
11941 found_so="$dir/$libname$shrext"
11942 else
11943 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
11944 ver=`(cd "$dir" && \
11945 for f in "$libname$shrext".*; do echo "$f"; done \
11946 | sed -e "s,^$libname$shrext\\\\.,," \
11947 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
11948 | sed 1q ) 2>/dev/null`
11949 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
11950 found_dir="$dir"
11951 found_so="$dir/$libname$shrext.$ver"
11952 fi
11953 else
11954 eval library_names=\"$acl_library_names_spec\"
11955 for f in $library_names; do
11956 if test -f "$dir/$f"; then
11957 found_dir="$dir"
11958 found_so="$dir/$f"
11959 break
11960 fi
11961 done
11962 fi
11963 fi
11964 fi
11965 if test "X$found_dir" = "X"; then
11966 if test -f "$dir/$libname.$acl_libext"; then
11967 found_dir="$dir"
11968 found_a="$dir/$libname.$acl_libext"
11969 fi
11970 fi
11971 if test "X$found_dir" != "X"; then
11972 if test -f "$dir/$libname.la"; then
11973 found_la="$dir/$libname.la"
11974 fi
11975 fi
11976 fi
11977 if test "X$found_dir" = "X"; then
11978 for x in $LDFLAGS $LTLIBICONV; do
11979
11980 acl_save_prefix="$prefix"
11981 prefix="$acl_final_prefix"
11982 acl_save_exec_prefix="$exec_prefix"
11983 exec_prefix="$acl_final_exec_prefix"
11984 eval x=\"$x\"
11985 exec_prefix="$acl_save_exec_prefix"
11986 prefix="$acl_save_prefix"
11987
11988 case "$x" in
11989 -L*)
11990 dir=`echo "X$x" | sed -e 's/^X-L//'`
11991 if test -n "$acl_shlibext"; then
11992 if test -f "$dir/$libname$shrext"; then
11993 found_dir="$dir"
11994 found_so="$dir/$libname$shrext"
11995 else
11996 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
11997 ver=`(cd "$dir" && \
11998 for f in "$libname$shrext".*; do echo "$f"; done \
11999 | sed -e "s,^$libname$shrext\\\\.,," \
12000 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
12001 | sed 1q ) 2>/dev/null`
12002 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
12003 found_dir="$dir"
12004 found_so="$dir/$libname$shrext.$ver"
12005 fi
12006 else
12007 eval library_names=\"$acl_library_names_spec\"
12008 for f in $library_names; do
12009 if test -f "$dir/$f"; then
12010 found_dir="$dir"
12011 found_so="$dir/$f"
12012 break
12013 fi
12014 done
12015 fi
12016 fi
12017 fi
12018 if test "X$found_dir" = "X"; then
12019 if test -f "$dir/$libname.$acl_libext"; then
12020 found_dir="$dir"
12021 found_a="$dir/$libname.$acl_libext"
12022 fi
12023 fi
12024 if test "X$found_dir" != "X"; then
12025 if test -f "$dir/$libname.la"; then
12026 found_la="$dir/$libname.la"
12027 fi
12028 fi
12029 ;;
12030 esac
12031 if test "X$found_dir" != "X"; then
12032 break
12033 fi
12034 done
12035 fi
12036 if test "X$found_dir" != "X"; then
12037 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
12038 if test "X$found_so" != "X"; then
12039 if test "$enable_rpath" = no \
12040 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
12041 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
12042 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
12043 else
12044 haveit=
12045 for x in $ltrpathdirs; do
12046 if test "X$x" = "X$found_dir"; then
12047 haveit=yes
12048 break
12049 fi
12050 done
12051 if test -z "$haveit"; then
12052 ltrpathdirs="$ltrpathdirs $found_dir"
12053 fi
12054 if test "$acl_hardcode_direct" = yes; then
12055 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
12056 else
12057 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
12058 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
12059 haveit=
12060 for x in $rpathdirs; do
12061 if test "X$x" = "X$found_dir"; then
12062 haveit=yes
12063 break
12064 fi
12065 done
12066 if test -z "$haveit"; then
12067 rpathdirs="$rpathdirs $found_dir"
12068 fi
12069 else
12070 haveit=
12071 for x in $LDFLAGS $LIBICONV; do
12072
12073 acl_save_prefix="$prefix"
12074 prefix="$acl_final_prefix"
12075 acl_save_exec_prefix="$exec_prefix"
12076 exec_prefix="$acl_final_exec_prefix"
12077 eval x=\"$x\"
12078 exec_prefix="$acl_save_exec_prefix"
12079 prefix="$acl_save_prefix"
12080
12081 if test "X$x" = "X-L$found_dir"; then
12082 haveit=yes
12083 break
12084 fi
12085 done
12086 if test -z "$haveit"; then
12087 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
12088 fi
12089 if test "$acl_hardcode_minus_L" != no; then
12090 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
12091 else
12092 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
12093 fi
12094 fi
12095 fi
12096 fi
12097 else
12098 if test "X$found_a" != "X"; then
12099 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
12100 else
12101 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
12102 fi
12103 fi
12104 additional_includedir=
12105 case "$found_dir" in
12106 */$acl_libdirstem | */$acl_libdirstem/)
12107 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
12108 if test "$name" = 'iconv'; then
12109 LIBICONV_PREFIX="$basedir"
12110 fi
12111 additional_includedir="$basedir/include"
12112 ;;
12113 */$acl_libdirstem2 | */$acl_libdirstem2/)
12114 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
12115 if test "$name" = 'iconv'; then
12116 LIBICONV_PREFIX="$basedir"
12117 fi
12118 additional_includedir="$basedir/include"
12119 ;;
12120 esac
12121 if test "X$additional_includedir" != "X"; then
12122 if test "X$additional_includedir" != "X/usr/include"; then
12123 haveit=
12124 if test "X$additional_includedir" = "X/usr/local/include"; then
12125 if test -n "$GCC"; then
12126 case $host_os in
12127 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
12128 esac
12129 fi
12130 fi
12131 if test -z "$haveit"; then
12132 for x in $CPPFLAGS $INCICONV; do
12133
12134 acl_save_prefix="$prefix"
12135 prefix="$acl_final_prefix"
12136 acl_save_exec_prefix="$exec_prefix"
12137 exec_prefix="$acl_final_exec_prefix"
12138 eval x=\"$x\"
12139 exec_prefix="$acl_save_exec_prefix"
12140 prefix="$acl_save_prefix"
12141
12142 if test "X$x" = "X-I$additional_includedir"; then
12143 haveit=yes
12144 break
12145 fi
12146 done
12147 if test -z "$haveit"; then
12148 if test -d "$additional_includedir"; then
12149 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
12150 fi
12151 fi
12152 fi
12153 fi
12154 fi
12155 if test -n "$found_la"; then
12156 save_libdir="$libdir"
12157 case "$found_la" in
12158 */* | *\\*) . "$found_la" ;;
12159 *) . "./$found_la" ;;
12160 esac
12161 libdir="$save_libdir"
12162 for dep in $dependency_libs; do
12163 case "$dep" in
12164 -L*)
12165 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
12166 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
12167 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
12168 haveit=
12169 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
12170 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
12171 if test -n "$GCC"; then
12172 case $host_os in
12173 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
12174 esac
12175 fi
12176 fi
12177 if test -z "$haveit"; then
12178 haveit=
12179 for x in $LDFLAGS $LIBICONV; do
12180
12181 acl_save_prefix="$prefix"
12182 prefix="$acl_final_prefix"
12183 acl_save_exec_prefix="$exec_prefix"
12184 exec_prefix="$acl_final_exec_prefix"
12185 eval x=\"$x\"
12186 exec_prefix="$acl_save_exec_prefix"
12187 prefix="$acl_save_prefix"
12188
12189 if test "X$x" = "X-L$additional_libdir"; then
12190 haveit=yes
12191 break
12192 fi
12193 done
12194 if test -z "$haveit"; then
12195 if test -d "$additional_libdir"; then
12196 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
12197 fi
12198 fi
12199 haveit=
12200 for x in $LDFLAGS $LTLIBICONV; do
12201
12202 acl_save_prefix="$prefix"
12203 prefix="$acl_final_prefix"
12204 acl_save_exec_prefix="$exec_prefix"
12205 exec_prefix="$acl_final_exec_prefix"
12206 eval x=\"$x\"
12207 exec_prefix="$acl_save_exec_prefix"
12208 prefix="$acl_save_prefix"
12209
12210 if test "X$x" = "X-L$additional_libdir"; then
12211 haveit=yes
12212 break
12213 fi
12214 done
12215 if test -z "$haveit"; then
12216 if test -d "$additional_libdir"; then
12217 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
12218 fi
12219 fi
12220 fi
12221 fi
12222 ;;
12223 -R*)
12224 dir=`echo "X$dep" | sed -e 's/^X-R//'`
12225 if test "$enable_rpath" != no; then
12226 haveit=
12227 for x in $rpathdirs; do
12228 if test "X$x" = "X$dir"; then
12229 haveit=yes
12230 break
12231 fi
12232 done
12233 if test -z "$haveit"; then
12234 rpathdirs="$rpathdirs $dir"
12235 fi
12236 haveit=
12237 for x in $ltrpathdirs; do
12238 if test "X$x" = "X$dir"; then
12239 haveit=yes
12240 break
12241 fi
12242 done
12243 if test -z "$haveit"; then
12244 ltrpathdirs="$ltrpathdirs $dir"
12245 fi
12246 fi
12247 ;;
12248 -l*)
12249 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
12250 ;;
12251 *.la)
12252 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
12253 ;;
12254 *)
12255 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
12256 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
12257 ;;
12258 esac
12259 done
12260 fi
12261 else
12262 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
12263 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
12264 fi
12265 fi
12266 fi
12267 done
12268 done
12269 if test "X$rpathdirs" != "X"; then
12270 if test -n "$acl_hardcode_libdir_separator"; then
12271 alldirs=
12272 for found_dir in $rpathdirs; do
12273 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
12274 done
12275 acl_save_libdir="$libdir"
12276 libdir="$alldirs"
12277 eval flag=\"$acl_hardcode_libdir_flag_spec\"
12278 libdir="$acl_save_libdir"
12279 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
12280 else
12281 for found_dir in $rpathdirs; do
12282 acl_save_libdir="$libdir"
12283 libdir="$found_dir"
12284 eval flag=\"$acl_hardcode_libdir_flag_spec\"
12285 libdir="$acl_save_libdir"
12286 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
12287 done
12288 fi
12289 fi
12290 if test "X$ltrpathdirs" != "X"; then
12291 for found_dir in $ltrpathdirs; do
12292 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
12293 done
12294 fi
12295
12296
12297
12298
12299
12300
12301
12302
12303
12304
12305
12306
12307
12308
12309
12310
12311
12312
12313
12314
12315
12316
12317
12318
12319
12320
12321
12322
12323
12324
12325
12326 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
12327 printf %s "checking for CFPreferencesCopyAppValue... " >&6; }
12328 if test ${gt_cv_func_CFPreferencesCopyAppValue+y}
12329 then :
12330 printf %s "(cached) " >&6
12331 else $as_nop
12332 gt_save_LIBS="$LIBS"
12333 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
12334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12335 /* end confdefs.h. */
12336 #include <CoreFoundation/CFPreferences.h>
12337 int
12338 main (void)
12339 {
12340 CFPreferencesCopyAppValue(NULL, NULL)
12341 ;
12342 return 0;
12343 }
12344 _ACEOF
12345 if ac_fn_c_try_link "$LINENO"
12346 then :
12347 gt_cv_func_CFPreferencesCopyAppValue=yes
12348 else $as_nop
12349 gt_cv_func_CFPreferencesCopyAppValue=no
12350 fi
12351 rm -f core conftest.err conftest.$ac_objext conftest.beam \
12352 conftest$ac_exeext conftest.$ac_ext
12353 LIBS="$gt_save_LIBS"
12354 fi
12355 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
12356 printf "%s\n" "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
12357 if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
12358
12359 printf "%s\n" "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
12360
12361 fi
12362 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5
12363 printf %s "checking for CFLocaleCopyCurrent... " >&6; }
12364 if test ${gt_cv_func_CFLocaleCopyCurrent+y}
12365 then :
12366 printf %s "(cached) " >&6
12367 else $as_nop
12368 gt_save_LIBS="$LIBS"
12369 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
12370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12371 /* end confdefs.h. */
12372 #include <CoreFoundation/CFLocale.h>
12373 int
12374 main (void)
12375 {
12376 CFLocaleCopyCurrent();
12377 ;
12378 return 0;
12379 }
12380 _ACEOF
12381 if ac_fn_c_try_link "$LINENO"
12382 then :
12383 gt_cv_func_CFLocaleCopyCurrent=yes
12384 else $as_nop
12385 gt_cv_func_CFLocaleCopyCurrent=no
12386 fi
12387 rm -f core conftest.err conftest.$ac_objext conftest.beam \
12388 conftest$ac_exeext conftest.$ac_ext
12389 LIBS="$gt_save_LIBS"
12390 fi
12391 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
12392 printf "%s\n" "$gt_cv_func_CFLocaleCopyCurrent" >&6; }
12393 if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
12394
12395 printf "%s\n" "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h
12396
12397 fi
12398 INTL_MACOSX_LIBS=
12399 if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
12400 INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
12401 fi
12402
12403
12404
12405
12406
12407
12408 LIBINTL=
12409 LTLIBINTL=
12410 POSUB=
12411
12412 case " $gt_needs " in
12413 *" need-formatstring-macros "*) gt_api_version=3 ;;
12414 *" need-ngettext "*) gt_api_version=2 ;;
12415 *) gt_api_version=1 ;;
12416 esac
12417 gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
12418 gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
12419
12420 if test "$USE_NLS" = "yes"; then
12421 gt_use_preinstalled_gnugettext=no
12422
12423
12424 if test $gt_api_version -ge 3; then
12425 gt_revision_test_code='
12426 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
12427 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
12428 #endif
12429 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
12430 '
12431 else
12432 gt_revision_test_code=
12433 fi
12434 if test $gt_api_version -ge 2; then
12435 gt_expression_test_code=' + * ngettext ("", "", 0)'
12436 else
12437 gt_expression_test_code=
12438 fi
12439
12440 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5
12441 printf %s "checking for GNU gettext in libc... " >&6; }
12442 if eval test \${$gt_func_gnugettext_libc+y}
12443 then :
12444 printf %s "(cached) " >&6
12445 else $as_nop
12446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12447 /* end confdefs.h. */
12448
12449 #include <libintl.h>
12450 $gt_revision_test_code
12451 extern int _nl_msg_cat_cntr;
12452 extern int *_nl_domain_bindings;
12453
12454 int
12455 main (void)
12456 {
12457
12458 bindtextdomain ("", "");
12459 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings
12460
12461 ;
12462 return 0;
12463 }
12464 _ACEOF
12465 if ac_fn_c_try_link "$LINENO"
12466 then :
12467 eval "$gt_func_gnugettext_libc=yes"
12468 else $as_nop
12469 eval "$gt_func_gnugettext_libc=no"
12470 fi
12471 rm -f core conftest.err conftest.$ac_objext conftest.beam \
12472 conftest$ac_exeext conftest.$ac_ext
12473 fi
12474 eval ac_res=\$$gt_func_gnugettext_libc
12475 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12476 printf "%s\n" "$ac_res" >&6; }
12477
12478 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
12479
12480
12481
12482
12483
12484 am_save_CPPFLAGS="$CPPFLAGS"
12485
12486 for element in $INCICONV; do
12487 haveit=
12488 for x in $CPPFLAGS; do
12489
12490 acl_save_prefix="$prefix"
12491 prefix="$acl_final_prefix"
12492 acl_save_exec_prefix="$exec_prefix"
12493 exec_prefix="$acl_final_exec_prefix"
12494 eval x=\"$x\"
12495 exec_prefix="$acl_save_exec_prefix"
12496 prefix="$acl_save_prefix"
12497
12498 if test "X$x" = "X$element"; then
12499 haveit=yes
12500 break
12501 fi
12502 done
12503 if test -z "$haveit"; then
12504 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
12505 fi
12506 done
12507
12508
12509 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
12510 printf %s "checking for iconv... " >&6; }
12511 if test ${am_cv_func_iconv+y}
12512 then :
12513 printf %s "(cached) " >&6
12514 else $as_nop
12515
12516 am_cv_func_iconv="no, consider installing GNU libiconv"
12517 am_cv_lib_iconv=no
12518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12519 /* end confdefs.h. */
12520
12521 #include <stdlib.h>
12522 #include <iconv.h>
12523
12524 int
12525 main (void)
12526 {
12527 iconv_t cd = iconv_open("","");
12528 iconv(cd,NULL,NULL,NULL,NULL);
12529 iconv_close(cd);
12530 ;
12531 return 0;
12532 }
12533 _ACEOF
12534 if ac_fn_c_try_link "$LINENO"
12535 then :
12536 am_cv_func_iconv=yes
12537 fi
12538 rm -f core conftest.err conftest.$ac_objext conftest.beam \
12539 conftest$ac_exeext conftest.$ac_ext
12540 if test "$am_cv_func_iconv" != yes; then
12541 am_save_LIBS="$LIBS"
12542 LIBS="$LIBS $LIBICONV"
12543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12544 /* end confdefs.h. */
12545
12546 #include <stdlib.h>
12547 #include <iconv.h>
12548
12549 int
12550 main (void)
12551 {
12552 iconv_t cd = iconv_open("","");
12553 iconv(cd,NULL,NULL,NULL,NULL);
12554 iconv_close(cd);
12555 ;
12556 return 0;
12557 }
12558 _ACEOF
12559 if ac_fn_c_try_link "$LINENO"
12560 then :
12561 am_cv_lib_iconv=yes
12562 am_cv_func_iconv=yes
12563 fi
12564 rm -f core conftest.err conftest.$ac_objext conftest.beam \
12565 conftest$ac_exeext conftest.$ac_ext
12566 LIBS="$am_save_LIBS"
12567 fi
12568
12569 fi
12570 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
12571 printf "%s\n" "$am_cv_func_iconv" >&6; }
12572 if test "$am_cv_func_iconv" = yes; then
12573 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
12574 printf %s "checking for working iconv... " >&6; }
12575 if test ${am_cv_func_iconv_works+y}
12576 then :
12577 printf %s "(cached) " >&6
12578 else $as_nop
12579
12580 am_save_LIBS="$LIBS"
12581 if test $am_cv_lib_iconv = yes; then
12582 LIBS="$LIBS $LIBICONV"
12583 fi
12584 if test "$cross_compiling" = yes
12585 then :
12586
12587 case "$host_os" in
12588 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
12589 *) am_cv_func_iconv_works="guessing yes" ;;
12590 esac
12591
12592 else $as_nop
12593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12594 /* end confdefs.h. */
12595
12596 #include <iconv.h>
12597 #include <string.h>
12598 int main ()
12599 {
12600 int result = 0;
12601 /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
12602 returns. */
12603 {
12604 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
12605 if (cd_utf8_to_88591 != (iconv_t)(-1))
12606 {
12607 static const char input[] = "\342\202\254"; /* EURO SIGN */
12608 char buf[10];
12609 const char *inptr = input;
12610 size_t inbytesleft = strlen (input);
12611 char *outptr = buf;
12612 size_t outbytesleft = sizeof (buf);
12613 size_t res = iconv (cd_utf8_to_88591,
12614 (char **) &inptr, &inbytesleft,
12615 &outptr, &outbytesleft);
12616 if (res == 0)
12617 result |= 1;
12618 iconv_close (cd_utf8_to_88591);
12619 }
12620 }
12621 /* Test against Solaris 10 bug: Failures are not distinguishable from
12622 successful returns. */
12623 {
12624 iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
12625 if (cd_ascii_to_88591 != (iconv_t)(-1))
12626 {
12627 static const char input[] = "\263";
12628 char buf[10];
12629 const char *inptr = input;
12630 size_t inbytesleft = strlen (input);
12631 char *outptr = buf;
12632 size_t outbytesleft = sizeof (buf);
12633 size_t res = iconv (cd_ascii_to_88591,
12634 (char **) &inptr, &inbytesleft,
12635 &outptr, &outbytesleft);
12636 if (res == 0)
12637 result |= 2;
12638 iconv_close (cd_ascii_to_88591);
12639 }
12640 }
12641 /* Test against AIX 6.1..7.1 bug: Buffer overrun. */
12642 {
12643 iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
12644 if (cd_88591_to_utf8 != (iconv_t)(-1))
12645 {
12646 static const char input[] = "\304";
12647 static char buf[2] = { (char)0xDE, (char)0xAD };
12648 const char *inptr = input;
12649 size_t inbytesleft = 1;
12650 char *outptr = buf;
12651 size_t outbytesleft = 1;
12652 size_t res = iconv (cd_88591_to_utf8,
12653 (char **) &inptr, &inbytesleft,
12654 &outptr, &outbytesleft);
12655 if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
12656 result |= 4;
12657 iconv_close (cd_88591_to_utf8);
12658 }
12659 }
12660 #if 0 /* This bug could be worked around by the caller. */
12661 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
12662 {
12663 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
12664 if (cd_88591_to_utf8 != (iconv_t)(-1))
12665 {
12666 static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
12667 char buf[50];
12668 const char *inptr = input;
12669 size_t inbytesleft = strlen (input);
12670 char *outptr = buf;
12671 size_t outbytesleft = sizeof (buf);
12672 size_t res = iconv (cd_88591_to_utf8,
12673 (char **) &inptr, &inbytesleft,
12674 &outptr, &outbytesleft);
12675 if ((int)res > 0)
12676 result |= 8;
12677 iconv_close (cd_88591_to_utf8);
12678 }
12679 }
12680 #endif
12681 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
12682 provided. */
12683 if (/* Try standardized names. */
12684 iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
12685 /* Try IRIX, OSF/1 names. */
12686 && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
12687 /* Try AIX names. */
12688 && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
12689 /* Try HP-UX names. */
12690 && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
12691 result |= 16;
12692 return result;
12693 }
12694 _ACEOF
12695 if ac_fn_c_try_run "$LINENO"
12696 then :
12697 am_cv_func_iconv_works=yes
12698 else $as_nop
12699 am_cv_func_iconv_works=no
12700 fi
12701 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12702 conftest.$ac_objext conftest.beam conftest.$ac_ext
12703 fi
12704
12705 LIBS="$am_save_LIBS"
12706
12707 fi
12708 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
12709 printf "%s\n" "$am_cv_func_iconv_works" >&6; }
12710 case "$am_cv_func_iconv_works" in
12711 *no) am_func_iconv=no am_cv_lib_iconv=no ;;
12712 *) am_func_iconv=yes ;;
12713 esac
12714 else
12715 am_func_iconv=no am_cv_lib_iconv=no
12716 fi
12717 if test "$am_func_iconv" = yes; then
12718
12719 printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h
12720
12721 fi
12722 if test "$am_cv_lib_iconv" = yes; then
12723 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
12724 printf %s "checking how to link with libiconv... " >&6; }
12725 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
12726 printf "%s\n" "$LIBICONV" >&6; }
12727 else
12728 CPPFLAGS="$am_save_CPPFLAGS"
12729 LIBICONV=
12730 LTLIBICONV=
12731 fi
12732
12733
12734
12735
12736
12737
12738
12739
12740
12741
12742
12743 use_additional=yes
12744
12745 acl_save_prefix="$prefix"
12746 prefix="$acl_final_prefix"
12747 acl_save_exec_prefix="$exec_prefix"
12748 exec_prefix="$acl_final_exec_prefix"
12749
12750 eval additional_includedir=\"$includedir\"
12751 eval additional_libdir=\"$libdir\"
12752
12753 exec_prefix="$acl_save_exec_prefix"
12754 prefix="$acl_save_prefix"
12755
12756
12757 # Check whether --with-libintl-prefix was given.
12758 if test ${with_libintl_prefix+y}
12759 then :
12760 withval=$with_libintl_prefix;
12761 if test "X$withval" = "Xno"; then
12762 use_additional=no
12763 else
12764 if test "X$withval" = "X"; then
12765
12766 acl_save_prefix="$prefix"
12767 prefix="$acl_final_prefix"
12768 acl_save_exec_prefix="$exec_prefix"
12769 exec_prefix="$acl_final_exec_prefix"
12770
12771 eval additional_includedir=\"$includedir\"
12772 eval additional_libdir=\"$libdir\"
12773
12774 exec_prefix="$acl_save_exec_prefix"
12775 prefix="$acl_save_prefix"
12776
12777 else
12778 additional_includedir="$withval/include"
12779 additional_libdir="$withval/$acl_libdirstem"
12780 if test "$acl_libdirstem2" != "$acl_libdirstem" \
12781 && ! test -d "$withval/$acl_libdirstem"; then
12782 additional_libdir="$withval/$acl_libdirstem2"
12783 fi
12784 fi
12785 fi
12786
12787 fi
12788
12789 LIBINTL=
12790 LTLIBINTL=
12791 INCINTL=
12792 LIBINTL_PREFIX=
12793 HAVE_LIBINTL=
12794 rpathdirs=
12795 ltrpathdirs=
12796 names_already_handled=
12797 names_next_round='intl '
12798 while test -n "$names_next_round"; do
12799 names_this_round="$names_next_round"
12800 names_next_round=
12801 for name in $names_this_round; do
12802 already_handled=
12803 for n in $names_already_handled; do
12804 if test "$n" = "$name"; then
12805 already_handled=yes
12806 break
12807 fi
12808 done
12809 if test -z "$already_handled"; then
12810 names_already_handled="$names_already_handled $name"
12811 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
12812 eval value=\"\$HAVE_LIB$uppername\"
12813 if test -n "$value"; then
12814 if test "$value" = yes; then
12815 eval value=\"\$LIB$uppername\"
12816 test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
12817 eval value=\"\$LTLIB$uppername\"
12818 test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
12819 else
12820 :
12821 fi
12822 else
12823 found_dir=
12824 found_la=
12825 found_so=
12826 found_a=
12827 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
12828 if test -n "$acl_shlibext"; then
12829 shrext=".$acl_shlibext" # typically: shrext=.so
12830 else
12831 shrext=
12832 fi
12833 if test $use_additional = yes; then
12834 dir="$additional_libdir"
12835 if test -n "$acl_shlibext"; then
12836 if test -f "$dir/$libname$shrext"; then
12837 found_dir="$dir"
12838 found_so="$dir/$libname$shrext"
12839 else
12840 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
12841 ver=`(cd "$dir" && \
12842 for f in "$libname$shrext".*; do echo "$f"; done \
12843 | sed -e "s,^$libname$shrext\\\\.,," \
12844 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
12845 | sed 1q ) 2>/dev/null`
12846 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
12847 found_dir="$dir"
12848 found_so="$dir/$libname$shrext.$ver"
12849 fi
12850 else
12851 eval library_names=\"$acl_library_names_spec\"
12852 for f in $library_names; do
12853 if test -f "$dir/$f"; then
12854 found_dir="$dir"
12855 found_so="$dir/$f"
12856 break
12857 fi
12858 done
12859 fi
12860 fi
12861 fi
12862 if test "X$found_dir" = "X"; then
12863 if test -f "$dir/$libname.$acl_libext"; then
12864 found_dir="$dir"
12865 found_a="$dir/$libname.$acl_libext"
12866 fi
12867 fi
12868 if test "X$found_dir" != "X"; then
12869 if test -f "$dir/$libname.la"; then
12870 found_la="$dir/$libname.la"
12871 fi
12872 fi
12873 fi
12874 if test "X$found_dir" = "X"; then
12875 for x in $LDFLAGS $LTLIBINTL; do
12876
12877 acl_save_prefix="$prefix"
12878 prefix="$acl_final_prefix"
12879 acl_save_exec_prefix="$exec_prefix"
12880 exec_prefix="$acl_final_exec_prefix"
12881 eval x=\"$x\"
12882 exec_prefix="$acl_save_exec_prefix"
12883 prefix="$acl_save_prefix"
12884
12885 case "$x" in
12886 -L*)
12887 dir=`echo "X$x" | sed -e 's/^X-L//'`
12888 if test -n "$acl_shlibext"; then
12889 if test -f "$dir/$libname$shrext"; then
12890 found_dir="$dir"
12891 found_so="$dir/$libname$shrext"
12892 else
12893 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
12894 ver=`(cd "$dir" && \
12895 for f in "$libname$shrext".*; do echo "$f"; done \
12896 | sed -e "s,^$libname$shrext\\\\.,," \
12897 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
12898 | sed 1q ) 2>/dev/null`
12899 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
12900 found_dir="$dir"
12901 found_so="$dir/$libname$shrext.$ver"
12902 fi
12903 else
12904 eval library_names=\"$acl_library_names_spec\"
12905 for f in $library_names; do
12906 if test -f "$dir/$f"; then
12907 found_dir="$dir"
12908 found_so="$dir/$f"
12909 break
12910 fi
12911 done
12912 fi
12913 fi
12914 fi
12915 if test "X$found_dir" = "X"; then
12916 if test -f "$dir/$libname.$acl_libext"; then
12917 found_dir="$dir"
12918 found_a="$dir/$libname.$acl_libext"
12919 fi
12920 fi
12921 if test "X$found_dir" != "X"; then
12922 if test -f "$dir/$libname.la"; then
12923 found_la="$dir/$libname.la"
12924 fi
12925 fi
12926 ;;
12927 esac
12928 if test "X$found_dir" != "X"; then
12929 break
12930 fi
12931 done
12932 fi
12933 if test "X$found_dir" != "X"; then
12934 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
12935 if test "X$found_so" != "X"; then
12936 if test "$enable_rpath" = no \
12937 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
12938 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
12939 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
12940 else
12941 haveit=
12942 for x in $ltrpathdirs; do
12943 if test "X$x" = "X$found_dir"; then
12944 haveit=yes
12945 break
12946 fi
12947 done
12948 if test -z "$haveit"; then
12949 ltrpathdirs="$ltrpathdirs $found_dir"
12950 fi
12951 if test "$acl_hardcode_direct" = yes; then
12952 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
12953 else
12954 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
12955 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
12956 haveit=
12957 for x in $rpathdirs; do
12958 if test "X$x" = "X$found_dir"; then
12959 haveit=yes
12960 break
12961 fi
12962 done
12963 if test -z "$haveit"; then
12964 rpathdirs="$rpathdirs $found_dir"
12965 fi
12966 else
12967 haveit=
12968 for x in $LDFLAGS $LIBINTL; do
12969
12970 acl_save_prefix="$prefix"
12971 prefix="$acl_final_prefix"
12972 acl_save_exec_prefix="$exec_prefix"
12973 exec_prefix="$acl_final_exec_prefix"
12974 eval x=\"$x\"
12975 exec_prefix="$acl_save_exec_prefix"
12976 prefix="$acl_save_prefix"
12977
12978 if test "X$x" = "X-L$found_dir"; then
12979 haveit=yes
12980 break
12981 fi
12982 done
12983 if test -z "$haveit"; then
12984 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
12985 fi
12986 if test "$acl_hardcode_minus_L" != no; then
12987 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
12988 else
12989 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
12990 fi
12991 fi
12992 fi
12993 fi
12994 else
12995 if test "X$found_a" != "X"; then
12996 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
12997 else
12998 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
12999 fi
13000 fi
13001 additional_includedir=
13002 case "$found_dir" in
13003 */$acl_libdirstem | */$acl_libdirstem/)
13004 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
13005 if test "$name" = 'intl'; then
13006 LIBINTL_PREFIX="$basedir"
13007 fi
13008 additional_includedir="$basedir/include"
13009 ;;
13010 */$acl_libdirstem2 | */$acl_libdirstem2/)
13011 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
13012 if test "$name" = 'intl'; then
13013 LIBINTL_PREFIX="$basedir"
13014 fi
13015 additional_includedir="$basedir/include"
13016 ;;
13017 esac
13018 if test "X$additional_includedir" != "X"; then
13019 if test "X$additional_includedir" != "X/usr/include"; then
13020 haveit=
13021 if test "X$additional_includedir" = "X/usr/local/include"; then
13022 if test -n "$GCC"; then
13023 case $host_os in
13024 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
13025 esac
13026 fi
13027 fi
13028 if test -z "$haveit"; then
13029 for x in $CPPFLAGS $INCINTL; do
13030
13031 acl_save_prefix="$prefix"
13032 prefix="$acl_final_prefix"
13033 acl_save_exec_prefix="$exec_prefix"
13034 exec_prefix="$acl_final_exec_prefix"
13035 eval x=\"$x\"
13036 exec_prefix="$acl_save_exec_prefix"
13037 prefix="$acl_save_prefix"
13038
13039 if test "X$x" = "X-I$additional_includedir"; then
13040 haveit=yes
13041 break
13042 fi
13043 done
13044 if test -z "$haveit"; then
13045 if test -d "$additional_includedir"; then
13046 INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
13047 fi
13048 fi
13049 fi
13050 fi
13051 fi
13052 if test -n "$found_la"; then
13053 save_libdir="$libdir"
13054 case "$found_la" in
13055 */* | *\\*) . "$found_la" ;;
13056 *) . "./$found_la" ;;
13057 esac
13058 libdir="$save_libdir"
13059 for dep in $dependency_libs; do
13060 case "$dep" in
13061 -L*)
13062 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
13063 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
13064 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
13065 haveit=
13066 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
13067 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
13068 if test -n "$GCC"; then
13069 case $host_os in
13070 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
13071 esac
13072 fi
13073 fi
13074 if test -z "$haveit"; then
13075 haveit=
13076 for x in $LDFLAGS $LIBINTL; do
13077
13078 acl_save_prefix="$prefix"
13079 prefix="$acl_final_prefix"
13080 acl_save_exec_prefix="$exec_prefix"
13081 exec_prefix="$acl_final_exec_prefix"
13082 eval x=\"$x\"
13083 exec_prefix="$acl_save_exec_prefix"
13084 prefix="$acl_save_prefix"
13085
13086 if test "X$x" = "X-L$additional_libdir"; then
13087 haveit=yes
13088 break
13089 fi
13090 done
13091 if test -z "$haveit"; then
13092 if test -d "$additional_libdir"; then
13093 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir"
13094 fi
13095 fi
13096 haveit=
13097 for x in $LDFLAGS $LTLIBINTL; do
13098
13099 acl_save_prefix="$prefix"
13100 prefix="$acl_final_prefix"
13101 acl_save_exec_prefix="$exec_prefix"
13102 exec_prefix="$acl_final_exec_prefix"
13103 eval x=\"$x\"
13104 exec_prefix="$acl_save_exec_prefix"
13105 prefix="$acl_save_prefix"
13106
13107 if test "X$x" = "X-L$additional_libdir"; then
13108 haveit=yes
13109 break
13110 fi
13111 done
13112 if test -z "$haveit"; then
13113 if test -d "$additional_libdir"; then
13114 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir"
13115 fi
13116 fi
13117 fi
13118 fi
13119 ;;
13120 -R*)
13121 dir=`echo "X$dep" | sed -e 's/^X-R//'`
13122 if test "$enable_rpath" != no; then
13123 haveit=
13124 for x in $rpathdirs; do
13125 if test "X$x" = "X$dir"; then
13126 haveit=yes
13127 break
13128 fi
13129 done
13130 if test -z "$haveit"; then
13131 rpathdirs="$rpathdirs $dir"
13132 fi
13133 haveit=
13134 for x in $ltrpathdirs; do
13135 if test "X$x" = "X$dir"; then
13136 haveit=yes
13137 break
13138 fi
13139 done
13140 if test -z "$haveit"; then
13141 ltrpathdirs="$ltrpathdirs $dir"
13142 fi
13143 fi
13144 ;;
13145 -l*)
13146 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
13147 ;;
13148 *.la)
13149 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
13150 ;;
13151 *)
13152 LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
13153 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
13154 ;;
13155 esac
13156 done
13157 fi
13158 else
13159 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
13160 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
13161 fi
13162 fi
13163 fi
13164 done
13165 done
13166 if test "X$rpathdirs" != "X"; then
13167 if test -n "$acl_hardcode_libdir_separator"; then
13168 alldirs=
13169 for found_dir in $rpathdirs; do
13170 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
13171 done
13172 acl_save_libdir="$libdir"
13173 libdir="$alldirs"
13174 eval flag=\"$acl_hardcode_libdir_flag_spec\"
13175 libdir="$acl_save_libdir"
13176 LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
13177 else
13178 for found_dir in $rpathdirs; do
13179 acl_save_libdir="$libdir"
13180 libdir="$found_dir"
13181 eval flag=\"$acl_hardcode_libdir_flag_spec\"
13182 libdir="$acl_save_libdir"
13183 LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
13184 done
13185 fi
13186 fi
13187 if test "X$ltrpathdirs" != "X"; then
13188 for found_dir in $ltrpathdirs; do
13189 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
13190 done
13191 fi
13192
13193
13194
13195
13196
13197
13198 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
13199 printf %s "checking for GNU gettext in libintl... " >&6; }
13200 if eval test \${$gt_func_gnugettext_libintl+y}
13201 then :
13202 printf %s "(cached) " >&6
13203 else $as_nop
13204 gt_save_CPPFLAGS="$CPPFLAGS"
13205 CPPFLAGS="$CPPFLAGS $INCINTL"
13206 gt_save_LIBS="$LIBS"
13207 LIBS="$LIBS $LIBINTL"
13208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13209 /* end confdefs.h. */
13210
13211 #include <libintl.h>
13212 $gt_revision_test_code
13213 extern int _nl_msg_cat_cntr;
13214 extern
13215 #ifdef __cplusplus
13216 "C"
13217 #endif
13218 const char *_nl_expand_alias (const char *);
13219
13220 int
13221 main (void)
13222 {
13223
13224 bindtextdomain ("", "");
13225 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
13226
13227 ;
13228 return 0;
13229 }
13230 _ACEOF
13231 if ac_fn_c_try_link "$LINENO"
13232 then :
13233 eval "$gt_func_gnugettext_libintl=yes"
13234 else $as_nop
13235 eval "$gt_func_gnugettext_libintl=no"
13236 fi
13237 rm -f core conftest.err conftest.$ac_objext conftest.beam \
13238 conftest$ac_exeext conftest.$ac_ext
13239 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
13240 LIBS="$LIBS $LIBICONV"
13241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13242 /* end confdefs.h. */
13243
13244 #include <libintl.h>
13245 $gt_revision_test_code
13246 extern int _nl_msg_cat_cntr;
13247 extern
13248 #ifdef __cplusplus
13249 "C"
13250 #endif
13251 const char *_nl_expand_alias (const char *);
13252
13253 int
13254 main (void)
13255 {
13256
13257 bindtextdomain ("", "");
13258 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
13259
13260 ;
13261 return 0;
13262 }
13263 _ACEOF
13264 if ac_fn_c_try_link "$LINENO"
13265 then :
13266 LIBINTL="$LIBINTL $LIBICONV"
13267 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
13268 eval "$gt_func_gnugettext_libintl=yes"
13269
13270 fi
13271 rm -f core conftest.err conftest.$ac_objext conftest.beam \
13272 conftest$ac_exeext conftest.$ac_ext
13273 fi
13274 CPPFLAGS="$gt_save_CPPFLAGS"
13275 LIBS="$gt_save_LIBS"
13276 fi
13277 eval ac_res=\$$gt_func_gnugettext_libintl
13278 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13279 printf "%s\n" "$ac_res" >&6; }
13280 fi
13281
13282 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
13283 || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
13284 && test "$PACKAGE" != gettext-runtime \
13285 && test "$PACKAGE" != gettext-tools; }; then
13286 gt_use_preinstalled_gnugettext=yes
13287 else
13288 LIBINTL=
13289 LTLIBINTL=
13290 INCINTL=
13291 fi
13292
13293
13294
13295 if test -n "$INTL_MACOSX_LIBS"; then
13296 if test "$gt_use_preinstalled_gnugettext" = "yes" \
13297 || test "$nls_cv_use_gnu_gettext" = "yes"; then
13298 LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
13299 LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
13300 fi
13301 fi
13302
13303 if test "$gt_use_preinstalled_gnugettext" = "yes" \
13304 || test "$nls_cv_use_gnu_gettext" = "yes"; then
13305
13306 printf "%s\n" "#define ENABLE_NLS 1" >>confdefs.h
13307
13308 else
13309 USE_NLS=no
13310 fi
13311 fi
13312
13313 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5
13314 printf %s "checking whether to use NLS... " >&6; }
13315 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
13316 printf "%s\n" "$USE_NLS" >&6; }
13317 if test "$USE_NLS" = "yes"; then
13318 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5
13319 printf %s "checking where the gettext function comes from... " >&6; }
13320 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
13321 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
13322 gt_source="external libintl"
13323 else
13324 gt_source="libc"
13325 fi
13326 else
13327 gt_source="included intl directory"
13328 fi
13329 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5
13330 printf "%s\n" "$gt_source" >&6; }
13331 fi
13332
13333 if test "$USE_NLS" = "yes"; then
13334
13335 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
13336 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
13337 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5
13338 printf %s "checking how to link with libintl... " >&6; }
13339 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5
13340 printf "%s\n" "$LIBINTL" >&6; }
13341
13342 for element in $INCINTL; do
13343 haveit=
13344 for x in $CPPFLAGS; do
13345
13346 acl_save_prefix="$prefix"
13347 prefix="$acl_final_prefix"
13348 acl_save_exec_prefix="$exec_prefix"
13349 exec_prefix="$acl_final_exec_prefix"
13350 eval x=\"$x\"
13351 exec_prefix="$acl_save_exec_prefix"
13352 prefix="$acl_save_prefix"
13353
13354 if test "X$x" = "X$element"; then
13355 haveit=yes
13356 break
13357 fi
13358 done
13359 if test -z "$haveit"; then
13360 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
13361 fi
13362 done
13363
13364 fi
13365
13366
13367 printf "%s\n" "#define HAVE_GETTEXT 1" >>confdefs.h
13368
13369
13370 printf "%s\n" "#define HAVE_DCGETTEXT 1" >>confdefs.h
13371
13372 fi
13373
13374 POSUB=po
13375 fi
13376
13377
13378
13379 INTLLIBS="$LIBINTL"
13380
13381
13382
13383
13384
13385
13386
13387 # Check whether --enable-largefile was given.
13388 if test ${enable_largefile+y}
13389 then :
13390 enableval=$enable_largefile;
13391 fi
13392
13393 if test "$enable_largefile" != no
13394 then :
13395 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
13396 printf %s "checking for special C compiler options needed for large files... " >&6; }
13397 if test ${ac_cv_sys_largefile_CC+y}
13398 then :
13399 printf %s "(cached) " >&6
13400 else $as_nop
13401 ac_cv_sys_largefile_CC=no
13402 if test "$GCC" != yes; then
13403 ac_save_CC=$CC
13404 while :; do
13405 # IRIX 6.2 and later do not support large files by default,
13406 # so use the C compiler's -n32 option if that helps.
13407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13408 /* end confdefs.h. */
13409 #include <sys/types.h>
13410 /* Check that off_t can represent 2**63 - 1 correctly.
13411 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13412 since some C++ compilers masquerading as C compilers
13413 incorrectly reject 9223372036854775807. */
13414 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
13415 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13416 && LARGE_OFF_T % 2147483647 == 1)
13417 ? 1 : -1];
13418 int
13419 main (void)
13420 {
13421
13422 ;
13423 return 0;
13424 }
13425 _ACEOF
13426 if ac_fn_c_try_compile "$LINENO"
13427 then :
13428 break
13429 fi
13430 rm -f core conftest.err conftest.$ac_objext conftest.beam
13431 CC="$CC -n32"
13432 if ac_fn_c_try_compile "$LINENO"
13433 then :
13434 ac_cv_sys_largefile_CC=' -n32'; break
13435 fi
13436 rm -f core conftest.err conftest.$ac_objext conftest.beam
13437 break
13438 done
13439 CC=$ac_save_CC
13440 rm -f conftest.$ac_ext
13441 fi
13442 fi
13443 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
13444 printf "%s\n" "$ac_cv_sys_largefile_CC" >&6; }
13445 if test "$ac_cv_sys_largefile_CC" != no; then
13446 CC=$CC$ac_cv_sys_largefile_CC
13447 fi
13448
13449 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
13450 printf %s "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
13451 if test ${ac_cv_sys_file_offset_bits+y}
13452 then :
13453 printf %s "(cached) " >&6
13454 else $as_nop
13455 while :; do
13456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13457 /* end confdefs.h. */
13458 #include <sys/types.h>
13459 /* Check that off_t can represent 2**63 - 1 correctly.
13460 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13461 since some C++ compilers masquerading as C compilers
13462 incorrectly reject 9223372036854775807. */
13463 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
13464 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13465 && LARGE_OFF_T % 2147483647 == 1)
13466 ? 1 : -1];
13467 int
13468 main (void)
13469 {
13470
13471 ;
13472 return 0;
13473 }
13474 _ACEOF
13475 if ac_fn_c_try_compile "$LINENO"
13476 then :
13477 ac_cv_sys_file_offset_bits=no; break
13478 fi
13479 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13481 /* end confdefs.h. */
13482 #undef _FILE_OFFSET_BITS
13483 #define _FILE_OFFSET_BITS 64
13484 #include <sys/types.h>
13485 /* Check that off_t can represent 2**63 - 1 correctly.
13486 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13487 since some C++ compilers masquerading as C compilers
13488 incorrectly reject 9223372036854775807. */
13489 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
13490 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13491 && LARGE_OFF_T % 2147483647 == 1)
13492 ? 1 : -1];
13493 int
13494 main (void)
13495 {
13496
13497 ;
13498 return 0;
13499 }
13500 _ACEOF
13501 if ac_fn_c_try_compile "$LINENO"
13502 then :
13503 ac_cv_sys_file_offset_bits=64; break
13504 fi
13505 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13506 ac_cv_sys_file_offset_bits=unknown
13507 break
13508 done
13509 fi
13510 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
13511 printf "%s\n" "$ac_cv_sys_file_offset_bits" >&6; }
13512 case $ac_cv_sys_file_offset_bits in #(
13513 no | unknown) ;;
13514 *)
13515 printf "%s\n" "#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits" >>confdefs.h
13516 ;;
13517 esac
13518 rm -rf conftest*
13519 case $ac_cv_sys_file_offset_bits in #(
13520 unknown) :
13521 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
13522 printf %s "checking for _LARGE_FILES value needed for large files... " >&6; }
13523 if test ${ac_cv_sys_large_files+y}
13524 then :
13525 printf %s "(cached) " >&6
13526 else $as_nop
13527 while :; do
13528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13529 /* end confdefs.h. */
13530 #include <sys/types.h>
13531 /* Check that off_t can represent 2**63 - 1 correctly.
13532 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13533 since some C++ compilers masquerading as C compilers
13534 incorrectly reject 9223372036854775807. */
13535 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
13536 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13537 && LARGE_OFF_T % 2147483647 == 1)
13538 ? 1 : -1];
13539 int
13540 main (void)
13541 {
13542
13543 ;
13544 return 0;
13545 }
13546 _ACEOF
13547 if ac_fn_c_try_compile "$LINENO"
13548 then :
13549 ac_cv_sys_large_files=no; break
13550 fi
13551 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13553 /* end confdefs.h. */
13554 #undef _LARGE_FILES
13555 #define _LARGE_FILES 1
13556 #include <sys/types.h>
13557 /* Check that off_t can represent 2**63 - 1 correctly.
13558 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13559 since some C++ compilers masquerading as C compilers
13560 incorrectly reject 9223372036854775807. */
13561 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
13562 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13563 && LARGE_OFF_T % 2147483647 == 1)
13564 ? 1 : -1];
13565 int
13566 main (void)
13567 {
13568
13569 ;
13570 return 0;
13571 }
13572 _ACEOF
13573 if ac_fn_c_try_compile "$LINENO"
13574 then :
13575 ac_cv_sys_large_files=1; break
13576 fi
13577 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13578 ac_cv_sys_large_files=unknown
13579 break
13580 done
13581 fi
13582 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
13583 printf "%s\n" "$ac_cv_sys_large_files" >&6; }
13584 case $ac_cv_sys_large_files in #(
13585 no | unknown) ;;
13586 *)
13587 printf "%s\n" "#define _LARGE_FILES $ac_cv_sys_large_files" >>confdefs.h
13588 ;;
13589 esac
13590 rm -rf conftest* ;; #(
13591 64) :
13592
13593 # Check whether --enable-year2038 was given.
13594 if test ${enable_year2038+y}
13595 then :
13596 enableval=$enable_year2038;
13597 fi
13598
13599 if test "$enable_year2038" != no
13600 then :
13601
13602 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for time_t past the year 2038" >&5
13603 printf %s "checking for time_t past the year 2038... " >&6; }
13604 if test ${gl_cv_type_time_t_y2038+y}
13605 then :
13606 printf %s "(cached) " >&6
13607 else $as_nop
13608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13609 /* end confdefs.h. */
13610
13611 #include <time.h>
13612 /* Check that time_t can represent 2**32 - 1 correctly. */
13613 #define LARGE_TIME_T \\
13614 ((time_t) (((time_t) 1 << 30) - 1 + 3 * ((time_t) 1 << 30)))
13615 int verify_time_t_range[(LARGE_TIME_T / 65537 == 65535
13616 && LARGE_TIME_T % 65537 == 0)
13617 ? 1 : -1];
13618
13619 _ACEOF
13620 if ac_fn_c_try_compile "$LINENO"
13621 then :
13622 gl_cv_type_time_t_y2038=yes
13623 else $as_nop
13624 gl_cv_type_time_t_y2038=no
13625 fi
13626 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13627
13628 fi
13629 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_time_t_y2038" >&5
13630 printf "%s\n" "$gl_cv_type_time_t_y2038" >&6; }
13631 if test "$gl_cv_type_time_t_y2038" = no; then
13632 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit time_t with _TIME_BITS=64" >&5
13633 printf %s "checking for 64-bit time_t with _TIME_BITS=64... " >&6; }
13634 if test ${gl_cv_type_time_t_bits_macro+y}
13635 then :
13636 printf %s "(cached) " >&6
13637 else $as_nop
13638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13639 /* end confdefs.h. */
13640 #define _TIME_BITS 64
13641 #define _FILE_OFFSET_BITS 64
13642
13643 #include <time.h>
13644 /* Check that time_t can represent 2**32 - 1 correctly. */
13645 #define LARGE_TIME_T \\
13646 ((time_t) (((time_t) 1 << 30) - 1 + 3 * ((time_t) 1 << 30)))
13647 int verify_time_t_range[(LARGE_TIME_T / 65537 == 65535
13648 && LARGE_TIME_T % 65537 == 0)
13649 ? 1 : -1];
13650
13651 _ACEOF
13652 if ac_fn_c_try_compile "$LINENO"
13653 then :
13654 gl_cv_type_time_t_bits_macro=yes
13655 else $as_nop
13656 gl_cv_type_time_t_bits_macro=no
13657 fi
13658 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13659
13660 fi
13661 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_time_t_bits_macro" >&5
13662 printf "%s\n" "$gl_cv_type_time_t_bits_macro" >&6; }
13663 if test "$gl_cv_type_time_t_bits_macro" = yes; then
13664
13665 printf "%s\n" "#define _TIME_BITS 64" >>confdefs.h
13666
13667
13668 printf "%s\n" "#define _FILE_OFFSET_BITS 64" >>confdefs.h
13669
13670 gl_cv_type_time_t_y2038=yes
13671 fi
13672 fi
13673 if test $gl_cv_type_time_t_y2038 = no; then
13674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13675 /* end confdefs.h. */
13676 #ifdef _USE_32BIT_TIME_T
13677 int ok;
13678 #else
13679 error fail
13680 #endif
13681
13682 _ACEOF
13683 if ac_fn_c_try_compile "$LINENO"
13684 then :
13685 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13686 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
13687 as_fn_error $? "The 'time_t' type stops working after January 2038.
13688 Remove _USE_32BIT_TIME_T from the compiler flags.
13689 See \`config.log' for more details" "$LINENO" 5; }
13690 else $as_nop
13691 # If not cross-compiling and says we should check,
13692 # and 'touch' works with a large timestamp, then evidently wider time_t
13693 # is desired and supported, so fail and ask the builder to fix the
13694 # problem. Otherwise, just warn the builder.
13695
13696 if test "$gl_warned_about_y2038" != yes; then
13697 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: The 'time_t' type stops working after January 2038,
13698 and this package needs a wider 'time_t' type
13699 if there is any way to access timestamps after that.
13700 Configure with 'CC=\"${CC} -m64\"' perhaps?" >&5
13701 printf "%s\n" "$as_me: WARNING: The 'time_t' type stops working after January 2038,
13702 and this package needs a wider 'time_t' type
13703 if there is any way to access timestamps after that.
13704 Configure with 'CC=\"${CC} -m64\"' perhaps?" >&2;}
13705 gl_warned_about_y2038=yes
13706 fi
13707
13708 fi
13709 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13710 fi
13711 fi
13712 ;; #(
13713 *) :
13714 ;;
13715 esac
13716 fi
13717
13718
13719 PLATFORMS_PCI=" $(PYTHONPATH="${srcdir}" $PYTHON -c 'import gentpl; print(" ".join(gentpl.GROUPS["pci"]))') "
13720 if test x"${PLATFORMS_PCI##* ${target_cpu}_${platform} *}" = x ; then
13721 have_pci=y
13722 fi
13723
13724 # Identify characteristics of the host architecture.
13725 unset ac_cv_c_bigendian
13726
13727 if test x"$target_cpu-$platform" = xsparc64-emu ; then
13728 CFLAGS="$CFLAGS -m64"
13729 HOST_CFLAGS="$HOST_CFLAGS -m64"
13730 fi
13731
13732 CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=64"
13733 HOST_CPPFLAGS="$HOST_CPPFLAGS -D_FILE_OFFSET_BITS=64"
13734
13735 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13736 printf %s "checking whether byte ordering is bigendian... " >&6; }
13737 if test ${ac_cv_c_bigendian+y}
13738 then :
13739 printf %s "(cached) " >&6
13740 else $as_nop
13741 ac_cv_c_bigendian=unknown
13742 # See if we're dealing with a universal compiler.
13743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13744 /* end confdefs.h. */
13745 #ifndef __APPLE_CC__
13746 not a universal capable compiler
13747 #endif
13748 typedef int dummy;
13749
13750 _ACEOF
13751 if ac_fn_c_try_compile "$LINENO"
13752 then :
13753
13754 # Check for potential -arch flags. It is not universal unless
13755 # there are at least two -arch flags with different values.
13756 ac_arch=
13757 ac_prev=
13758 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13759 if test -n "$ac_prev"; then
13760 case $ac_word in
13761 i?86 | x86_64 | ppc | ppc64)
13762 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13763 ac_arch=$ac_word
13764 else
13765 ac_cv_c_bigendian=universal
13766 break
13767 fi
13768 ;;
13769 esac
13770 ac_prev=
13771 elif test "x$ac_word" = "x-arch"; then
13772 ac_prev=arch
13773 fi
13774 done
13775 fi
13776 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13777 if test $ac_cv_c_bigendian = unknown; then
13778 # See if sys/param.h defines the BYTE_ORDER macro.
13779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13780 /* end confdefs.h. */
13781 #include <sys/types.h>
13782 #include <sys/param.h>
13783
13784 int
13785 main (void)
13786 {
13787 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13788 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13789 && LITTLE_ENDIAN)
13790 bogus endian macros
13791 #endif
13792
13793 ;
13794 return 0;
13795 }
13796 _ACEOF
13797 if ac_fn_c_try_compile "$LINENO"
13798 then :
13799 # It does; now see whether it defined to BIG_ENDIAN or not.
13800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13801 /* end confdefs.h. */
13802 #include <sys/types.h>
13803 #include <sys/param.h>
13804
13805 int
13806 main (void)
13807 {
13808 #if BYTE_ORDER != BIG_ENDIAN
13809 not big endian
13810 #endif
13811
13812 ;
13813 return 0;
13814 }
13815 _ACEOF
13816 if ac_fn_c_try_compile "$LINENO"
13817 then :
13818 ac_cv_c_bigendian=yes
13819 else $as_nop
13820 ac_cv_c_bigendian=no
13821 fi
13822 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13823 fi
13824 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13825 fi
13826 if test $ac_cv_c_bigendian = unknown; then
13827 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13829 /* end confdefs.h. */
13830 #include <limits.h>
13831
13832 int
13833 main (void)
13834 {
13835 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13836 bogus endian macros
13837 #endif
13838
13839 ;
13840 return 0;
13841 }
13842 _ACEOF
13843 if ac_fn_c_try_compile "$LINENO"
13844 then :
13845 # It does; now see whether it defined to _BIG_ENDIAN or not.
13846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13847 /* end confdefs.h. */
13848 #include <limits.h>
13849
13850 int
13851 main (void)
13852 {
13853 #ifndef _BIG_ENDIAN
13854 not big endian
13855 #endif
13856
13857 ;
13858 return 0;
13859 }
13860 _ACEOF
13861 if ac_fn_c_try_compile "$LINENO"
13862 then :
13863 ac_cv_c_bigendian=yes
13864 else $as_nop
13865 ac_cv_c_bigendian=no
13866 fi
13867 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13868 fi
13869 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13870 fi
13871 if test $ac_cv_c_bigendian = unknown; then
13872 # Compile a test program.
13873 if test "$cross_compiling" = yes
13874 then :
13875 # Try to guess by grepping values from an object file.
13876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13877 /* end confdefs.h. */
13878 unsigned short int ascii_mm[] =
13879 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13880 unsigned short int ascii_ii[] =
13881 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13882 int use_ascii (int i) {
13883 return ascii_mm[i] + ascii_ii[i];
13884 }
13885 unsigned short int ebcdic_ii[] =
13886 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13887 unsigned short int ebcdic_mm[] =
13888 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13889 int use_ebcdic (int i) {
13890 return ebcdic_mm[i] + ebcdic_ii[i];
13891 }
13892 extern int foo;
13893
13894 int
13895 main (void)
13896 {
13897 return use_ascii (foo) == use_ebcdic (foo);
13898 ;
13899 return 0;
13900 }
13901 _ACEOF
13902 if ac_fn_c_try_compile "$LINENO"
13903 then :
13904 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13905 ac_cv_c_bigendian=yes
13906 fi
13907 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13908 if test "$ac_cv_c_bigendian" = unknown; then
13909 ac_cv_c_bigendian=no
13910 else
13911 # finding both strings is unlikely to happen, but who knows?
13912 ac_cv_c_bigendian=unknown
13913 fi
13914 fi
13915 fi
13916 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13917 else $as_nop
13918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13919 /* end confdefs.h. */
13920 $ac_includes_default
13921 int
13922 main (void)
13923 {
13924
13925 /* Are we little or big endian? From Harbison&Steele. */
13926 union
13927 {
13928 long int l;
13929 char c[sizeof (long int)];
13930 } u;
13931 u.l = 1;
13932 return u.c[sizeof (long int) - 1] == 1;
13933
13934 ;
13935 return 0;
13936 }
13937 _ACEOF
13938 if ac_fn_c_try_run "$LINENO"
13939 then :
13940 ac_cv_c_bigendian=no
13941 else $as_nop
13942 ac_cv_c_bigendian=yes
13943 fi
13944 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13945 conftest.$ac_objext conftest.beam conftest.$ac_ext
13946 fi
13947
13948 fi
13949 fi
13950 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13951 printf "%s\n" "$ac_cv_c_bigendian" >&6; }
13952 case $ac_cv_c_bigendian in #(
13953 yes)
13954 printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h
13955 ;; #(
13956 no)
13957 ;; #(
13958 universal)
13959
13960 printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
13961
13962 ;; #(
13963 *)
13964 as_fn_error $? "unknown endianness
13965 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
13966 esac
13967
13968 # The cast to long int works around a bug in the HP C Compiler
13969 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13970 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13971 # This bug is HP SR number 8606223364.
13972 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
13973 printf %s "checking size of void *... " >&6; }
13974 if test ${ac_cv_sizeof_void_p+y}
13975 then :
13976 printf %s "(cached) " >&6
13977 else $as_nop
13978 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"
13979 then :
13980
13981 else $as_nop
13982 if test "$ac_cv_type_void_p" = yes; then
13983 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13984 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
13985 as_fn_error 77 "cannot compute sizeof (void *)
13986 See \`config.log' for more details" "$LINENO" 5; }
13987 else
13988 ac_cv_sizeof_void_p=0
13989 fi
13990 fi
13991
13992 fi
13993 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
13994 printf "%s\n" "$ac_cv_sizeof_void_p" >&6; }
13995
13996
13997
13998 printf "%s\n" "#define SIZEOF_VOID_P $ac_cv_sizeof_void_p" >>confdefs.h
13999
14000
14001 # The cast to long int works around a bug in the HP C Compiler
14002 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14003 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14004 # This bug is HP SR number 8606223364.
14005 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
14006 printf %s "checking size of long... " >&6; }
14007 if test ${ac_cv_sizeof_long+y}
14008 then :
14009 printf %s "(cached) " >&6
14010 else $as_nop
14011 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"
14012 then :
14013
14014 else $as_nop
14015 if test "$ac_cv_type_long" = yes; then
14016 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14017 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
14018 as_fn_error 77 "cannot compute sizeof (long)
14019 See \`config.log' for more details" "$LINENO" 5; }
14020 else
14021 ac_cv_sizeof_long=0
14022 fi
14023 fi
14024
14025 fi
14026 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
14027 printf "%s\n" "$ac_cv_sizeof_long" >&6; }
14028
14029
14030
14031 printf "%s\n" "#define SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h
14032
14033
14034
14035 case "$host_os" in
14036 cygwin | windows* | mingw32*)
14037 HOST_CPPFLAGS="$HOST_CPPFLAGS -DUNICODE=1 -D_WIN32_WINNT=0x0500"
14038 CPPFLAGS="$CPPFLAGS -DUNICODE=1 -D_WIN32_WINNT=0x0500"
14039 # The cast to long int works around a bug in the HP C Compiler
14040 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14041 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14042 # This bug is HP SR number 8606223364.
14043 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of TCHAR" >&5
14044 printf %s "checking size of TCHAR... " >&6; }
14045 if test ${ac_cv_sizeof_TCHAR+y}
14046 then :
14047 printf %s "(cached) " >&6
14048 else $as_nop
14049 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (TCHAR))" "ac_cv_sizeof_TCHAR" "#include <windows.h>
14050 "
14051 then :
14052
14053 else $as_nop
14054 if test "$ac_cv_type_TCHAR" = yes; then
14055 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14056 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
14057 as_fn_error 77 "cannot compute sizeof (TCHAR)
14058 See \`config.log' for more details" "$LINENO" 5; }
14059 else
14060 ac_cv_sizeof_TCHAR=0
14061 fi
14062 fi
14063
14064 fi
14065 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_TCHAR" >&5
14066 printf "%s\n" "$ac_cv_sizeof_TCHAR" >&6; }
14067
14068
14069
14070 printf "%s\n" "#define SIZEOF_TCHAR $ac_cv_sizeof_TCHAR" >>confdefs.h
14071
14072
14073 ;;
14074 esac
14075
14076 case "$host_os" in
14077 cygwin | windows* | mingw32* | aros*)
14078 ;;
14079 *)
14080 # The cast to long int works around a bug in the HP C Compiler
14081 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14082 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14083 # This bug is HP SR number 8606223364.
14084 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
14085 printf %s "checking size of off_t... " >&6; }
14086 if test ${ac_cv_sizeof_off_t+y}
14087 then :
14088 printf %s "(cached) " >&6
14089 else $as_nop
14090 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"
14091 then :
14092
14093 else $as_nop
14094 if test "$ac_cv_type_off_t" = yes; then
14095 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14096 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
14097 as_fn_error 77 "cannot compute sizeof (off_t)
14098 See \`config.log' for more details" "$LINENO" 5; }
14099 else
14100 ac_cv_sizeof_off_t=0
14101 fi
14102 fi
14103
14104 fi
14105 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
14106 printf "%s\n" "$ac_cv_sizeof_off_t" >&6; }
14107
14108
14109
14110 printf "%s\n" "#define SIZEOF_OFF_T $ac_cv_sizeof_off_t" >>confdefs.h
14111
14112
14113 if test x"$ac_cv_sizeof_off_t" != x8 ; then
14114 # The cast to long int works around a bug in the HP C Compiler
14115 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14116 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14117 # This bug is HP SR number 8606223364.
14118 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of off64_t" >&5
14119 printf %s "checking size of off64_t... " >&6; }
14120 if test ${ac_cv_sizeof_off64_t+y}
14121 then :
14122 printf %s "(cached) " >&6
14123 else $as_nop
14124 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off64_t))" "ac_cv_sizeof_off64_t" "$ac_includes_default"
14125 then :
14126
14127 else $as_nop
14128 if test "$ac_cv_type_off64_t" = yes; then
14129 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14130 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
14131 as_fn_error 77 "cannot compute sizeof (off64_t)
14132 See \`config.log' for more details" "$LINENO" 5; }
14133 else
14134 ac_cv_sizeof_off64_t=0
14135 fi
14136 fi
14137
14138 fi
14139 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off64_t" >&5
14140 printf "%s\n" "$ac_cv_sizeof_off64_t" >&6; }
14141
14142
14143
14144 printf "%s\n" "#define SIZEOF_OFF64_T $ac_cv_sizeof_off64_t" >>confdefs.h
14145
14146
14147 test x"$ac_cv_sizeof_off64_t" = x8 || as_fn_error $? "Large file support is required" "$LINENO" 5
14148 fi;;
14149 esac
14150
14151 if test x$USE_NLS = xno; then
14152 HOST_CFLAGS="$HOST_CFLAGS -fno-builtin-gettext"
14153 fi
14154
14155 if test "x$cross_compiling" = xyes; then
14156 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot generate manual pages while cross compiling" >&5
14157 printf "%s\n" "$as_me: WARNING: cannot generate manual pages while cross compiling" >&2;}
14158 else
14159 # Extract the first word of "help2man", so it can be a program name with args.
14160 set dummy help2man; ac_word=$2
14161 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14162 printf %s "checking for $ac_word... " >&6; }
14163 if test ${ac_cv_path_HELP2MAN+y}
14164 then :
14165 printf %s "(cached) " >&6
14166 else $as_nop
14167 case $HELP2MAN in
14168 [\\/]* | ?:[\\/]*)
14169 ac_cv_path_HELP2MAN="$HELP2MAN" # Let the user override the test with a path.
14170 ;;
14171 *)
14172 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14173 for as_dir in $PATH
14174 do
14175 IFS=$as_save_IFS
14176 case $as_dir in #(((
14177 '') as_dir=./ ;;
14178 */) ;;
14179 *) as_dir=$as_dir/ ;;
14180 esac
14181 for ac_exec_ext in '' $ac_executable_extensions; do
14182 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
14183 ac_cv_path_HELP2MAN="$as_dir$ac_word$ac_exec_ext"
14184 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
14185 break 2
14186 fi
14187 done
14188 done
14189 IFS=$as_save_IFS
14190
14191 ;;
14192 esac
14193 fi
14194 HELP2MAN=$ac_cv_path_HELP2MAN
14195 if test -n "$HELP2MAN"; then
14196 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $HELP2MAN" >&5
14197 printf "%s\n" "$HELP2MAN" >&6; }
14198 else
14199 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14200 printf "%s\n" "no" >&6; }
14201 fi
14202
14203
14204 fi
14205
14206 # Check for functions and headers.
14207 ac_fn_c_check_func "$LINENO" "posix_memalign" "ac_cv_func_posix_memalign"
14208 if test "x$ac_cv_func_posix_memalign" = xyes
14209 then :
14210 printf "%s\n" "#define HAVE_POSIX_MEMALIGN 1" >>confdefs.h
14211
14212 fi
14213 ac_fn_c_check_func "$LINENO" "memalign" "ac_cv_func_memalign"
14214 if test "x$ac_cv_func_memalign" = xyes
14215 then :
14216 printf "%s\n" "#define HAVE_MEMALIGN 1" >>confdefs.h
14217
14218 fi
14219 ac_fn_c_check_func "$LINENO" "getextmntent" "ac_cv_func_getextmntent"
14220 if test "x$ac_cv_func_getextmntent" = xyes
14221 then :
14222 printf "%s\n" "#define HAVE_GETEXTMNTENT 1" >>confdefs.h
14223
14224 fi
14225 ac_fn_c_check_func "$LINENO" "atexit" "ac_cv_func_atexit"
14226 if test "x$ac_cv_func_atexit" = xyes
14227 then :
14228 printf "%s\n" "#define HAVE_ATEXIT 1" >>confdefs.h
14229
14230 fi
14231
14232 ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
14233 if test "x$ac_cv_header_sys_param_h" = xyes
14234 then :
14235 printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h
14236
14237 fi
14238 ac_fn_c_check_header_compile "$LINENO" "sys/mount.h" "ac_cv_header_sys_mount_h" "$ac_includes_default"
14239 if test "x$ac_cv_header_sys_mount_h" = xyes
14240 then :
14241 printf "%s\n" "#define HAVE_SYS_MOUNT_H 1" >>confdefs.h
14242
14243 fi
14244 ac_fn_c_check_header_compile "$LINENO" "sys/mnttab.h" "ac_cv_header_sys_mnttab_h" "$ac_includes_default"
14245 if test "x$ac_cv_header_sys_mnttab_h" = xyes
14246 then :
14247 printf "%s\n" "#define HAVE_SYS_MNTTAB_H 1" >>confdefs.h
14248
14249 fi
14250 ac_fn_c_check_header_compile "$LINENO" "limits.h" "ac_cv_header_limits_h" "$ac_includes_default"
14251 if test "x$ac_cv_header_limits_h" = xyes
14252 then :
14253 printf "%s\n" "#define HAVE_LIMITS_H 1" >>confdefs.h
14254
14255 fi
14256
14257
14258 # glibc 2.25 still includes sys/sysmacros.h in sys/types.h but emits deprecation
14259 # warning which causes compilation failure later with -Werror. So use -Werror here
14260 # as well to force proper sys/sysmacros.h detection. Used in include/grub/osdep/major.h.
14261 SAVED_CFLAGS="$CFLAGS"
14262 CFLAGS="$HOST_CFLAGS -Werror"
14263
14264 ac_fn_c_check_header_compile "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
14265 if test "x$ac_cv_header_sys_mkdev_h" = xyes
14266 then :
14267
14268 printf "%s\n" "#define MAJOR_IN_MKDEV 1" >>confdefs.h
14269
14270 fi
14271
14272 if test $ac_cv_header_sys_mkdev_h = no; then
14273 ac_fn_c_check_header_compile "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
14274 if test "x$ac_cv_header_sys_sysmacros_h" = xyes
14275 then :
14276
14277 printf "%s\n" "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
14278
14279 fi
14280
14281 fi
14282
14283 CFLAGS="$SAVED_CFLAGS"
14284
14285 ac_fn_c_check_member "$LINENO" "struct statfs" "f_fstypename" "ac_cv_member_struct_statfs_f_fstypename" "$ac_includes_default
14286 #include <sys/param.h>
14287 #include <sys/mount.h>
14288 "
14289 if test "x$ac_cv_member_struct_statfs_f_fstypename" = xyes
14290 then :
14291
14292 printf "%s\n" "#define HAVE_STRUCT_STATFS_F_FSTYPENAME 1" >>confdefs.h
14293
14294
14295 fi
14296
14297
14298 ac_fn_c_check_member "$LINENO" "struct statfs" "f_mntfromname" "ac_cv_member_struct_statfs_f_mntfromname" "$ac_includes_default
14299 #include <sys/param.h>
14300 #include <sys/mount.h>
14301 "
14302 if test "x$ac_cv_member_struct_statfs_f_mntfromname" = xyes
14303 then :
14304
14305 printf "%s\n" "#define HAVE_STRUCT_STATFS_F_MNTFROMNAME 1" >>confdefs.h
14306
14307
14308 fi
14309
14310
14311 # For opendisk() and getrawpartition() on NetBSD.
14312 # Used in util/deviceiter.c and in util/hostdisk.c.
14313 ac_fn_c_check_header_compile "$LINENO" "util.h" "ac_cv_header_util_h" "$ac_includes_default"
14314 if test "x$ac_cv_header_util_h" = xyes
14315 then :
14316
14317 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for opendisk in -lutil" >&5
14318 printf %s "checking for opendisk in -lutil... " >&6; }
14319 if test ${ac_cv_lib_util_opendisk+y}
14320 then :
14321 printf %s "(cached) " >&6
14322 else $as_nop
14323 ac_check_lib_save_LIBS=$LIBS
14324 LIBS="-lutil $LIBS"
14325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14326 /* end confdefs.h. */
14327
14328 /* Override any GCC internal prototype to avoid an error.
14329 Use char because int might match the return type of a GCC
14330 builtin and then its argument prototype would still apply. */
14331 char opendisk ();
14332 int
14333 main (void)
14334 {
14335 return opendisk ();
14336 ;
14337 return 0;
14338 }
14339 _ACEOF
14340 if ac_fn_c_try_link "$LINENO"
14341 then :
14342 ac_cv_lib_util_opendisk=yes
14343 else $as_nop
14344 ac_cv_lib_util_opendisk=no
14345 fi
14346 rm -f core conftest.err conftest.$ac_objext conftest.beam \
14347 conftest$ac_exeext conftest.$ac_ext
14348 LIBS=$ac_check_lib_save_LIBS
14349 fi
14350 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_opendisk" >&5
14351 printf "%s\n" "$ac_cv_lib_util_opendisk" >&6; }
14352 if test "x$ac_cv_lib_util_opendisk" = xyes
14353 then :
14354
14355 LIBUTIL="-lutil"
14356
14357 printf "%s\n" "#define HAVE_OPENDISK 1" >>confdefs.h
14358
14359
14360 fi
14361
14362 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getrawpartition in -lutil" >&5
14363 printf %s "checking for getrawpartition in -lutil... " >&6; }
14364 if test ${ac_cv_lib_util_getrawpartition+y}
14365 then :
14366 printf %s "(cached) " >&6
14367 else $as_nop
14368 ac_check_lib_save_LIBS=$LIBS
14369 LIBS="-lutil $LIBS"
14370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14371 /* end confdefs.h. */
14372
14373 /* Override any GCC internal prototype to avoid an error.
14374 Use char because int might match the return type of a GCC
14375 builtin and then its argument prototype would still apply. */
14376 char getrawpartition ();
14377 int
14378 main (void)
14379 {
14380 return getrawpartition ();
14381 ;
14382 return 0;
14383 }
14384 _ACEOF
14385 if ac_fn_c_try_link "$LINENO"
14386 then :
14387 ac_cv_lib_util_getrawpartition=yes
14388 else $as_nop
14389 ac_cv_lib_util_getrawpartition=no
14390 fi
14391 rm -f core conftest.err conftest.$ac_objext conftest.beam \
14392 conftest$ac_exeext conftest.$ac_ext
14393 LIBS=$ac_check_lib_save_LIBS
14394 fi
14395 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_getrawpartition" >&5
14396 printf "%s\n" "$ac_cv_lib_util_getrawpartition" >&6; }
14397 if test "x$ac_cv_lib_util_getrawpartition" = xyes
14398 then :
14399
14400 LIBUTIL="-lutil"
14401
14402 printf "%s\n" "#define HAVE_GETRAWPARTITION 1" >>confdefs.h
14403
14404
14405 fi
14406
14407
14408 fi
14409
14410
14411
14412 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wtrampolines work" >&5
14413 printf %s "checking whether -Wtrampolines work... " >&6; }
14414 if test ${grub_cv_host_cc_wtrampolines+y}
14415 then :
14416 printf %s "(cached) " >&6
14417 else $as_nop
14418
14419 SAVED_CFLAGS="$CFLAGS"
14420 CFLAGS="$HOST_CFLAGS -Wtrampolines -Werror"
14421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14422 /* end confdefs.h. */
14423 #include <stdarg.h>
14424 int va_arg_func (int fixed, va_list args);
14425 int
14426 main (void)
14427 {
14428
14429 ;
14430 return 0;
14431 }
14432 _ACEOF
14433 if ac_fn_c_try_compile "$LINENO"
14434 then :
14435 grub_cv_host_cc_wtrampolines=yes
14436 else $as_nop
14437 grub_cv_host_cc_wtrampolines=no
14438 fi
14439 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14440 CFLAGS="$SAVED_CFLAGS"
14441
14442 fi
14443 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_host_cc_wtrampolines" >&5
14444 printf "%s\n" "$grub_cv_host_cc_wtrampolines" >&6; }
14445
14446 if test x"$grub_host_cv_cc_wtrampolines" = xyes ; then
14447 HOST_CFLAGS="$HOST_CFLAGS -Wtrampolines"
14448 fi
14449
14450 #
14451 # Check for host and build compilers.
14452 #
14453 HOST_CC=$CC
14454 for ac_prog in gcc egcs cc
14455 do
14456 # Extract the first word of "$ac_prog", so it can be a program name with args.
14457 set dummy $ac_prog; ac_word=$2
14458 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14459 printf %s "checking for $ac_word... " >&6; }
14460 if test ${ac_cv_prog_BUILD_CC+y}
14461 then :
14462 printf %s "(cached) " >&6
14463 else $as_nop
14464 if test -n "$BUILD_CC"; then
14465 ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
14466 else
14467 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14468 for as_dir in $PATH
14469 do
14470 IFS=$as_save_IFS
14471 case $as_dir in #(((
14472 '') as_dir=./ ;;
14473 */) ;;
14474 *) as_dir=$as_dir/ ;;
14475 esac
14476 for ac_exec_ext in '' $ac_executable_extensions; do
14477 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
14478 ac_cv_prog_BUILD_CC="$ac_prog"
14479 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
14480 break 2
14481 fi
14482 done
14483 done
14484 IFS=$as_save_IFS
14485
14486 fi
14487 fi
14488 BUILD_CC=$ac_cv_prog_BUILD_CC
14489 if test -n "$BUILD_CC"; then
14490 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
14491 printf "%s\n" "$BUILD_CC" >&6; }
14492 else
14493 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14494 printf "%s\n" "no" >&6; }
14495 fi
14496
14497
14498 test -n "$BUILD_CC" && break
14499 done
14500
14501 test -z "$BUILD_CC" && as_fn_error $? "none of gcc, egcs and cc is found. set BUILD_CC manually." "$LINENO" 5
14502 BUILD_CPP="$BUILD_CC -E"
14503
14504 case "$build_os" in
14505 haiku*) BUILD_LIBM= ;;
14506 *) BUILD_LIBM=-lm ;;
14507 esac
14508
14509
14510 case "$build_os" in
14511 cygwin*|mingw32*|mingw64*) BUILD_EXEEXT=.exe ;;
14512 *) BUILD_EXEEXT= ;;
14513 esac
14514
14515
14516 # In some build environments like termux /bin/sh is not a valid
14517 # shebang. Use $SHELL instead if it's executable and /bin/sh isn't
14518 BUILD_SHEBANG=/bin/sh
14519 for she in /bin/sh "$SHELL"; do
14520 if test -x "$she" ; then
14521 BUILD_SHEBANG="$she"
14522 fi
14523 done
14524
14525
14526 # For gnulib.
14527
14528
14529
14530
14531
14532
14533
14534
14535
14536 # Check whether --enable-cross-guesses was given.
14537 if test ${enable_cross_guesses+y}
14538 then :
14539 enableval=$enable_cross_guesses; if test "x$enableval" != xconservative && test "x$enableval" != xrisky; then
14540 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: invalid argument supplied to --enable-cross-guesses" >&5
14541 printf "%s\n" "$as_me: WARNING: invalid argument supplied to --enable-cross-guesses" >&2;}
14542 enableval=conservative
14543 fi
14544 gl_cross_guesses="$enableval"
14545 else $as_nop
14546 gl_cross_guesses=conservative
14547 fi
14548
14549 if test $gl_cross_guesses = risky; then
14550 gl_cross_guess_normal="guessing yes"
14551 gl_cross_guess_inverted="guessing no"
14552 else
14553 gl_cross_guess_normal="guessing no"
14554 gl_cross_guess_inverted="guessing yes"
14555 fi
14556 LIBC_FATAL_STDERR_=1
14557 export LIBC_FATAL_STDERR_
14558
14559
14560 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
14561 if test "x$ac_cv_type_size_t" = xyes
14562 then :
14563
14564 else $as_nop
14565
14566 printf "%s\n" "#define size_t unsigned int" >>confdefs.h
14567
14568 fi
14569
14570 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
14571 # for constant arguments. Useless!
14572 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
14573 printf %s "checking for working alloca.h... " >&6; }
14574 if test ${ac_cv_working_alloca_h+y}
14575 then :
14576 printf %s "(cached) " >&6
14577 else $as_nop
14578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14579 /* end confdefs.h. */
14580 #include <alloca.h>
14581 int
14582 main (void)
14583 {
14584 char *p = (char *) alloca (2 * sizeof (int));
14585 if (p) return 0;
14586 ;
14587 return 0;
14588 }
14589 _ACEOF
14590 if ac_fn_c_try_link "$LINENO"
14591 then :
14592 ac_cv_working_alloca_h=yes
14593 else $as_nop
14594 ac_cv_working_alloca_h=no
14595 fi
14596 rm -f core conftest.err conftest.$ac_objext conftest.beam \
14597 conftest$ac_exeext conftest.$ac_ext
14598 fi
14599 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
14600 printf "%s\n" "$ac_cv_working_alloca_h" >&6; }
14601 if test $ac_cv_working_alloca_h = yes; then
14602
14603 printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h
14604
14605 fi
14606
14607 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
14608 printf %s "checking for alloca... " >&6; }
14609 if test ${ac_cv_func_alloca_works+y}
14610 then :
14611 printf %s "(cached) " >&6
14612 else $as_nop
14613 if test $ac_cv_working_alloca_h = yes; then
14614 ac_cv_func_alloca_works=yes
14615 else
14616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14617 /* end confdefs.h. */
14618 #include <stdlib.h>
14619 #include <stddef.h>
14620 #ifndef alloca
14621 # ifdef __GNUC__
14622 # define alloca __builtin_alloca
14623 # elif defined _MSC_VER
14624 # include <malloc.h>
14625 # define alloca _alloca
14626 # else
14627 # ifdef __cplusplus
14628 extern "C"
14629 # endif
14630 void *alloca (size_t);
14631 # endif
14632 #endif
14633
14634 int
14635 main (void)
14636 {
14637 char *p = (char *) alloca (1);
14638 if (p) return 0;
14639 ;
14640 return 0;
14641 }
14642 _ACEOF
14643 if ac_fn_c_try_link "$LINENO"
14644 then :
14645 ac_cv_func_alloca_works=yes
14646 else $as_nop
14647 ac_cv_func_alloca_works=no
14648 fi
14649 rm -f core conftest.err conftest.$ac_objext conftest.beam \
14650 conftest$ac_exeext conftest.$ac_ext
14651 fi
14652 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
14653 printf "%s\n" "$ac_cv_func_alloca_works" >&6; }
14654 fi
14655
14656 if test $ac_cv_func_alloca_works = yes; then
14657
14658 printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h
14659
14660 else
14661 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
14662 # that cause trouble. Some versions do not even contain alloca or
14663 # contain a buggy version. If you still want to use their alloca,
14664 # use ar to extract alloca.o from them instead of compiling alloca.c.
14665
14666
14667
14668
14669
14670 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
14671
14672 printf "%s\n" "#define C_ALLOCA 1" >>confdefs.h
14673
14674
14675 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
14676 printf %s "checking stack direction for C alloca... " >&6; }
14677 if test ${ac_cv_c_stack_direction+y}
14678 then :
14679 printf %s "(cached) " >&6
14680 else $as_nop
14681 if test "$cross_compiling" = yes
14682 then :
14683 ac_cv_c_stack_direction=0
14684 else $as_nop
14685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14686 /* end confdefs.h. */
14687 $ac_includes_default
14688 int
14689 find_stack_direction (int *addr, int depth)
14690 {
14691 int dir, dummy = 0;
14692 if (! addr)
14693 addr = &dummy;
14694 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
14695 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
14696 return dir + dummy;
14697 }
14698
14699 int
14700 main (int argc, char **argv)
14701 {
14702 return find_stack_direction (0, argc + !argv + 20) < 0;
14703 }
14704 _ACEOF
14705 if ac_fn_c_try_run "$LINENO"
14706 then :
14707 ac_cv_c_stack_direction=1
14708 else $as_nop
14709 ac_cv_c_stack_direction=-1
14710 fi
14711 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14712 conftest.$ac_objext conftest.beam conftest.$ac_ext
14713 fi
14714
14715 fi
14716 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
14717 printf "%s\n" "$ac_cv_c_stack_direction" >&6; }
14718 printf "%s\n" "#define STACK_DIRECTION $ac_cv_c_stack_direction" >>confdefs.h
14719
14720
14721 fi
14722
14723 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
14724 printf %s "checking for inline... " >&6; }
14725 if test ${ac_cv_c_inline+y}
14726 then :
14727 printf %s "(cached) " >&6
14728 else $as_nop
14729 ac_cv_c_inline=no
14730 for ac_kw in inline __inline__ __inline; do
14731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14732 /* end confdefs.h. */
14733 #ifndef __cplusplus
14734 typedef int foo_t;
14735 static $ac_kw foo_t static_foo (void) {return 0; }
14736 $ac_kw foo_t foo (void) {return 0; }
14737 #endif
14738
14739 _ACEOF
14740 if ac_fn_c_try_compile "$LINENO"
14741 then :
14742 ac_cv_c_inline=$ac_kw
14743 fi
14744 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14745 test "$ac_cv_c_inline" != no && break
14746 done
14747
14748 fi
14749 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
14750 printf "%s\n" "$ac_cv_c_inline" >&6; }
14751
14752 case $ac_cv_c_inline in
14753 inline | yes) ;;
14754 *)
14755 case $ac_cv_c_inline in
14756 no) ac_val=;;
14757 *) ac_val=$ac_cv_c_inline;;
14758 esac
14759 cat >>confdefs.h <<_ACEOF
14760 #ifndef __cplusplus
14761 #define inline $ac_val
14762 #endif
14763 _ACEOF
14764 ;;
14765 esac
14766
14767 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
14768 printf %s "checking for C/C++ restrict keyword... " >&6; }
14769 if test ${ac_cv_c_restrict+y}
14770 then :
14771 printf %s "(cached) " >&6
14772 else $as_nop
14773 ac_cv_c_restrict=no
14774 # Put '__restrict__' first, to avoid problems with glibc and non-GCC; see:
14775 # https://lists.gnu.org/archive/html/bug-autoconf/2016-02/msg00006.html
14776 # Put 'restrict' last, because C++ lacks it.
14777 for ac_kw in __restrict__ __restrict _Restrict restrict; do
14778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14779 /* end confdefs.h. */
14780 typedef int *int_ptr;
14781 int foo (int_ptr $ac_kw ip) { return ip[0]; }
14782 int bar (int [$ac_kw]); /* Catch GCC bug 14050. */
14783 int bar (int ip[$ac_kw]) { return ip[0]; }
14784
14785 int
14786 main (void)
14787 {
14788 int s[1];
14789 int *$ac_kw t = s;
14790 t[0] = 0;
14791 return foo (t) + bar (t);
14792
14793 ;
14794 return 0;
14795 }
14796 _ACEOF
14797 if ac_fn_c_try_compile "$LINENO"
14798 then :
14799 ac_cv_c_restrict=$ac_kw
14800 fi
14801 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14802 test "$ac_cv_c_restrict" != no && break
14803 done
14804
14805 fi
14806 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
14807 printf "%s\n" "$ac_cv_c_restrict" >&6; }
14808
14809 case $ac_cv_c_restrict in
14810 restrict) ;;
14811 no) printf "%s\n" "#define restrict /**/" >>confdefs.h
14812 ;;
14813 *) printf "%s\n" "#define restrict $ac_cv_c_restrict" >>confdefs.h
14814 ;;
14815 esac
14816
14817 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
14818 printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
14819 if test ${ac_cv_c_undeclared_builtin_options+y}
14820 then :
14821 printf %s "(cached) " >&6
14822 else $as_nop
14823 ac_save_CFLAGS=$CFLAGS
14824 ac_cv_c_undeclared_builtin_options='cannot detect'
14825 for ac_arg in '' -fno-builtin; do
14826 CFLAGS="$ac_save_CFLAGS $ac_arg"
14827 # This test program should *not* compile successfully.
14828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14829 /* end confdefs.h. */
14830
14831 int
14832 main (void)
14833 {
14834 (void) strchr;
14835 ;
14836 return 0;
14837 }
14838 _ACEOF
14839 if ac_fn_c_try_compile "$LINENO"
14840 then :
14841
14842 else $as_nop
14843 # This test program should compile successfully.
14844 # No library function is consistently available on
14845 # freestanding implementations, so test against a dummy
14846 # declaration. Include always-available headers on the
14847 # off chance that they somehow elicit warnings.
14848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14849 /* end confdefs.h. */
14850 #include <float.h>
14851 #include <limits.h>
14852 #include <stdarg.h>
14853 #include <stddef.h>
14854 extern void ac_decl (int, char *);
14855
14856 int
14857 main (void)
14858 {
14859 (void) ac_decl (0, (char *) 0);
14860 (void) ac_decl;
14861
14862 ;
14863 return 0;
14864 }
14865 _ACEOF
14866 if ac_fn_c_try_compile "$LINENO"
14867 then :
14868 if test x"$ac_arg" = x
14869 then :
14870 ac_cv_c_undeclared_builtin_options='none needed'
14871 else $as_nop
14872 ac_cv_c_undeclared_builtin_options=$ac_arg
14873 fi
14874 break
14875 fi
14876 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14877 fi
14878 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14879 done
14880 CFLAGS=$ac_save_CFLAGS
14881
14882 fi
14883 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5
14884 printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; }
14885 case $ac_cv_c_undeclared_builtin_options in #(
14886 'cannot detect') :
14887 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14888 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
14889 as_fn_error $? "cannot make $CC report undeclared builtins
14890 See \`config.log' for more details" "$LINENO" 5; } ;; #(
14891 'none needed') :
14892 ac_c_undeclared_builtin_options='' ;; #(
14893 *) :
14894 ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;;
14895 esac
14896
14897 ac_fn_check_decl "$LINENO" "clearerr_unlocked" "ac_cv_have_decl_clearerr_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
14898 if test "x$ac_cv_have_decl_clearerr_unlocked" = xyes
14899 then :
14900 ac_have_decl=1
14901 else $as_nop
14902 ac_have_decl=0
14903 fi
14904 printf "%s\n" "#define HAVE_DECL_CLEARERR_UNLOCKED $ac_have_decl" >>confdefs.h
14905
14906 ac_fn_check_decl "$LINENO" "feof_unlocked" "ac_cv_have_decl_feof_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
14907 if test "x$ac_cv_have_decl_feof_unlocked" = xyes
14908 then :
14909 ac_have_decl=1
14910 else $as_nop
14911 ac_have_decl=0
14912 fi
14913 printf "%s\n" "#define HAVE_DECL_FEOF_UNLOCKED $ac_have_decl" >>confdefs.h
14914
14915 ac_fn_check_decl "$LINENO" "ferror_unlocked" "ac_cv_have_decl_ferror_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
14916 if test "x$ac_cv_have_decl_ferror_unlocked" = xyes
14917 then :
14918 ac_have_decl=1
14919 else $as_nop
14920 ac_have_decl=0
14921 fi
14922 printf "%s\n" "#define HAVE_DECL_FERROR_UNLOCKED $ac_have_decl" >>confdefs.h
14923
14924 ac_fn_check_decl "$LINENO" "fflush_unlocked" "ac_cv_have_decl_fflush_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
14925 if test "x$ac_cv_have_decl_fflush_unlocked" = xyes
14926 then :
14927 ac_have_decl=1
14928 else $as_nop
14929 ac_have_decl=0
14930 fi
14931 printf "%s\n" "#define HAVE_DECL_FFLUSH_UNLOCKED $ac_have_decl" >>confdefs.h
14932
14933 ac_fn_check_decl "$LINENO" "fgets_unlocked" "ac_cv_have_decl_fgets_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
14934 if test "x$ac_cv_have_decl_fgets_unlocked" = xyes
14935 then :
14936 ac_have_decl=1
14937 else $as_nop
14938 ac_have_decl=0
14939 fi
14940 printf "%s\n" "#define HAVE_DECL_FGETS_UNLOCKED $ac_have_decl" >>confdefs.h
14941
14942 ac_fn_check_decl "$LINENO" "fputc_unlocked" "ac_cv_have_decl_fputc_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
14943 if test "x$ac_cv_have_decl_fputc_unlocked" = xyes
14944 then :
14945 ac_have_decl=1
14946 else $as_nop
14947 ac_have_decl=0
14948 fi
14949 printf "%s\n" "#define HAVE_DECL_FPUTC_UNLOCKED $ac_have_decl" >>confdefs.h
14950
14951 ac_fn_check_decl "$LINENO" "fputs_unlocked" "ac_cv_have_decl_fputs_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
14952 if test "x$ac_cv_have_decl_fputs_unlocked" = xyes
14953 then :
14954 ac_have_decl=1
14955 else $as_nop
14956 ac_have_decl=0
14957 fi
14958 printf "%s\n" "#define HAVE_DECL_FPUTS_UNLOCKED $ac_have_decl" >>confdefs.h
14959
14960 ac_fn_check_decl "$LINENO" "fread_unlocked" "ac_cv_have_decl_fread_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
14961 if test "x$ac_cv_have_decl_fread_unlocked" = xyes
14962 then :
14963 ac_have_decl=1
14964 else $as_nop
14965 ac_have_decl=0
14966 fi
14967 printf "%s\n" "#define HAVE_DECL_FREAD_UNLOCKED $ac_have_decl" >>confdefs.h
14968
14969 ac_fn_check_decl "$LINENO" "fwrite_unlocked" "ac_cv_have_decl_fwrite_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
14970 if test "x$ac_cv_have_decl_fwrite_unlocked" = xyes
14971 then :
14972 ac_have_decl=1
14973 else $as_nop
14974 ac_have_decl=0
14975 fi
14976 printf "%s\n" "#define HAVE_DECL_FWRITE_UNLOCKED $ac_have_decl" >>confdefs.h
14977
14978 ac_fn_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
14979 if test "x$ac_cv_have_decl_getc_unlocked" = xyes
14980 then :
14981 ac_have_decl=1
14982 else $as_nop
14983 ac_have_decl=0
14984 fi
14985 printf "%s\n" "#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl" >>confdefs.h
14986
14987 ac_fn_check_decl "$LINENO" "getchar_unlocked" "ac_cv_have_decl_getchar_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
14988 if test "x$ac_cv_have_decl_getchar_unlocked" = xyes
14989 then :
14990 ac_have_decl=1
14991 else $as_nop
14992 ac_have_decl=0
14993 fi
14994 printf "%s\n" "#define HAVE_DECL_GETCHAR_UNLOCKED $ac_have_decl" >>confdefs.h
14995
14996 ac_fn_check_decl "$LINENO" "putc_unlocked" "ac_cv_have_decl_putc_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
14997 if test "x$ac_cv_have_decl_putc_unlocked" = xyes
14998 then :
14999 ac_have_decl=1
15000 else $as_nop
15001 ac_have_decl=0
15002 fi
15003 printf "%s\n" "#define HAVE_DECL_PUTC_UNLOCKED $ac_have_decl" >>confdefs.h
15004
15005 ac_fn_check_decl "$LINENO" "putchar_unlocked" "ac_cv_have_decl_putchar_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
15006 if test "x$ac_cv_have_decl_putchar_unlocked" = xyes
15007 then :
15008 ac_have_decl=1
15009 else $as_nop
15010 ac_have_decl=0
15011 fi
15012 printf "%s\n" "#define HAVE_DECL_PUTCHAR_UNLOCKED $ac_have_decl" >>confdefs.h
15013
15014 ac_func=
15015 for ac_item in $ac_func_c_list
15016 do
15017 if test $ac_func; then
15018 ac_fn_c_check_func "$LINENO" $ac_func ac_cv_func_$ac_func
15019 if eval test \"x\$ac_cv_func_$ac_func\" = xyes; then
15020 echo "#define $ac_item 1" >> confdefs.h
15021 fi
15022 ac_func=
15023 else
15024 ac_func=$ac_item
15025 fi
15026 done
15027
15028
15029
15030 ac_fn_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
15031 if test "x$ac_cv_have_decl_strerror_r" = xyes
15032 then :
15033 ac_have_decl=1
15034 else $as_nop
15035 ac_have_decl=0
15036 fi
15037 printf "%s\n" "#define HAVE_DECL_STRERROR_R $ac_have_decl" >>confdefs.h
15038
15039
15040 if test $ac_cv_have_decl_strerror_r = yes; then
15041 # For backward compatibility's sake, define HAVE_STRERROR_R.
15042 # (We used to run AC_CHECK_FUNCS_ONCE for strerror_r, as well
15043 # as AC_CHECK_DECLS_ONCE.)
15044
15045 printf "%s\n" "#define HAVE_STRERROR_R 1" >>confdefs.h
15046
15047 fi
15048
15049 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
15050 printf %s "checking whether strerror_r returns char *... " >&6; }
15051 if test ${ac_cv_func_strerror_r_char_p+y}
15052 then :
15053 printf %s "(cached) " >&6
15054 else $as_nop
15055
15056 ac_cv_func_strerror_r_char_p=no
15057 if test $ac_cv_have_decl_strerror_r = yes; then
15058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15059 /* end confdefs.h. */
15060 #include <string.h>
15061 int
15062 main (void)
15063 {
15064
15065 char buf[100];
15066 char x = *strerror_r (0, buf, sizeof buf);
15067 char *p = strerror_r (0, buf, sizeof buf);
15068 return !p || x;
15069
15070 ;
15071 return 0;
15072 }
15073 _ACEOF
15074 if ac_fn_c_try_compile "$LINENO"
15075 then :
15076 ac_cv_func_strerror_r_char_p=yes
15077 fi
15078 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15079
15080 fi
15081
15082 fi
15083 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
15084 printf "%s\n" "$ac_cv_func_strerror_r_char_p" >&6; }
15085 if test $ac_cv_func_strerror_r_char_p = yes; then
15086
15087 printf "%s\n" "#define STRERROR_R_CHAR_P 1" >>confdefs.h
15088
15089 fi
15090
15091
15092 XGETTEXT_EXTRA_OPTIONS=
15093
15094
15095 HAVE_BTOWC=1;
15096 HAVE_MBSINIT=1;
15097 HAVE_MBRTOWC=1;
15098 HAVE_MBRLEN=1;
15099 HAVE_MBSRTOWCS=1;
15100 HAVE_MBSNRTOWCS=1;
15101 HAVE_WCRTOMB=1;
15102 HAVE_WCSRTOMBS=1;
15103 HAVE_WCSNRTOMBS=1;
15104 HAVE_WMEMCHR=1;
15105 HAVE_WMEMCMP=1;
15106 HAVE_WMEMCPY=1;
15107 HAVE_WMEMMOVE=1;
15108 HAVE_WMEMPCPY=1;
15109 HAVE_WMEMSET=1;
15110 HAVE_WCSLEN=1;
15111 HAVE_WCSNLEN=1;
15112 HAVE_WCSCPY=1;
15113 HAVE_WCPCPY=1;
15114 HAVE_WCSNCPY=1;
15115 HAVE_WCPNCPY=1;
15116 HAVE_WCSCAT=1;
15117 HAVE_WCSNCAT=1;
15118 HAVE_WCSCMP=1;
15119 HAVE_WCSNCMP=1;
15120 HAVE_WCSCASECMP=1;
15121 HAVE_WCSNCASECMP=1;
15122 HAVE_WCSCOLL=1;
15123 HAVE_WCSXFRM=1;
15124 HAVE_WCSDUP=1;
15125 HAVE_WCSCHR=1;
15126 HAVE_WCSRCHR=1;
15127 HAVE_WCSCSPN=1;
15128 HAVE_WCSSPN=1;
15129 HAVE_WCSPBRK=1;
15130 HAVE_WCSSTR=1;
15131 HAVE_WCSTOK=1;
15132 HAVE_WCSWIDTH=1;
15133 HAVE_WCSFTIME=1;
15134 HAVE_DECL_WCTOB=1;
15135 HAVE_DECL_WCSDUP=1;
15136 HAVE_DECL_WCWIDTH=1;
15137 REPLACE_MBSTATE_T=0;
15138 REPLACE_BTOWC=0;
15139 REPLACE_WCTOB=0;
15140 REPLACE_MBSINIT=0;
15141 REPLACE_MBRTOWC=0;
15142 REPLACE_MBRLEN=0;
15143 REPLACE_MBSRTOWCS=0;
15144 REPLACE_MBSNRTOWCS=0;
15145 REPLACE_WCRTOMB=0;
15146 REPLACE_WCSRTOMBS=0;
15147 REPLACE_WCSNRTOMBS=0;
15148 REPLACE_WCWIDTH=0;
15149 REPLACE_WCSWIDTH=0;
15150 REPLACE_WCSFTIME=0;
15151 REPLACE_WCSTOK=0;
15152
15153
15154
15155 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
15156 printf %s "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
15157 if test ${gl_cv_header_wchar_h_correct_inline+y}
15158 then :
15159 printf %s "(cached) " >&6
15160 else $as_nop
15161 gl_cv_header_wchar_h_correct_inline=yes
15162 case "$host_os" in
15163 *-gnu* | gnu*)
15164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15165 /* end confdefs.h. */
15166
15167
15168 #define wcstod renamed_wcstod
15169 #include <wchar.h>
15170 extern int zero (void);
15171 int main () { return zero(); }
15172
15173 _ACEOF
15174 save_ac_compile="$ac_compile"
15175 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
15176 if echo '#include "conftest.c"' >conftest1.c \
15177 && { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
15178 (eval $ac_compile) 2>&5
15179 ac_status=$?
15180 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15181 test $ac_status = 0; }; then
15182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15183 /* end confdefs.h. */
15184
15185
15186 #define wcstod renamed_wcstod
15187 #include <wchar.h>
15188 int zero (void) { return 0; }
15189
15190 _ACEOF
15191 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
15192 if echo '#include "conftest.c"' >conftest2.c \
15193 && { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
15194 (eval $ac_compile) 2>&5
15195 ac_status=$?
15196 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15197 test $ac_status = 0; }; then
15198 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
15199 :
15200 else
15201 gl_cv_header_wchar_h_correct_inline=no
15202 fi
15203 fi
15204 fi
15205 ac_compile="$save_ac_compile"
15206 rm -f conftest12.c conftest12.$ac_objext conftest$ac_exeext
15207 ;;
15208 esac
15209
15210 fi
15211 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
15212 printf "%s\n" "$gl_cv_header_wchar_h_correct_inline" >&6; }
15213 if test $gl_cv_header_wchar_h_correct_inline = no; then
15214 as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
15215 This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
15216 C99 mode. You have four options:
15217 - Add the flag -fgnu89-inline to CC and reconfigure, or
15218 - Fix your include files, using parts of
15219 <https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
15220 - Use a gcc version older than 4.3, or
15221 - Don't use the flags -std=c99 or -std=gnu99.
15222 Configuration aborted." "$LINENO" 5
15223 fi
15224
15225
15226
15227 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
15228 printf %s "checking for nl_langinfo and CODESET... " >&6; }
15229 if test ${am_cv_langinfo_codeset+y}
15230 then :
15231 printf %s "(cached) " >&6
15232 else $as_nop
15233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15234 /* end confdefs.h. */
15235 #include <langinfo.h>
15236 int
15237 main (void)
15238 {
15239 char* cs = nl_langinfo(CODESET); return !cs;
15240 ;
15241 return 0;
15242 }
15243 _ACEOF
15244 if ac_fn_c_try_link "$LINENO"
15245 then :
15246 am_cv_langinfo_codeset=yes
15247 else $as_nop
15248 am_cv_langinfo_codeset=no
15249 fi
15250 rm -f core conftest.err conftest.$ac_objext conftest.beam \
15251 conftest$ac_exeext conftest.$ac_ext
15252
15253 fi
15254 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
15255 printf "%s\n" "$am_cv_langinfo_codeset" >&6; }
15256 if test $am_cv_langinfo_codeset = yes; then
15257
15258 printf "%s\n" "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
15259
15260 fi
15261
15262
15263
15264
15265 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
15266 printf %s "checking for a traditional french locale... " >&6; }
15267 if test ${gt_cv_locale_fr+y}
15268 then :
15269 printf %s "(cached) " >&6
15270 else $as_nop
15271
15272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15273 /* end confdefs.h. */
15274
15275 #include <locale.h>
15276 #include <time.h>
15277 #if HAVE_LANGINFO_CODESET
15278 # include <langinfo.h>
15279 #endif
15280 #include <stdlib.h>
15281 #include <string.h>
15282 struct tm t;
15283 char buf[16];
15284 int main () {
15285 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
15286 imitates locale dependent behaviour by looking at the environment
15287 variables, and all locales use the UTF-8 encoding. */
15288 #if defined __BEOS__ || defined __HAIKU__
15289 return 1;
15290 #else
15291 /* Check whether the given locale name is recognized by the system. */
15292 # if defined _WIN32 && !defined __CYGWIN__
15293 /* On native Windows, setlocale(category, "") looks at the system settings,
15294 not at the environment variables. Also, when an encoding suffix such
15295 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
15296 category of the locale to "C". */
15297 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
15298 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
15299 return 1;
15300 # else
15301 if (setlocale (LC_ALL, "") == NULL) return 1;
15302 # endif
15303 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
15304 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
15305 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
15306 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
15307 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
15308 some unit tests fail.
15309 On MirBSD 10, when an unsupported locale is specified, setlocale()
15310 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
15311 # if HAVE_LANGINFO_CODESET
15312 {
15313 const char *cs = nl_langinfo (CODESET);
15314 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
15315 || strcmp (cs, "UTF-8") == 0)
15316 return 1;
15317 }
15318 # endif
15319 # ifdef __CYGWIN__
15320 /* On Cygwin, avoid locale names without encoding suffix, because the
15321 locale_charset() function relies on the encoding suffix. Note that
15322 LC_ALL is set on the command line. */
15323 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
15324 # endif
15325 /* Check whether in the abbreviation of the second month, the second
15326 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
15327 one byte long. This excludes the UTF-8 encoding. */
15328 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
15329 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
15330 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
15331 /* Check whether the decimal separator is a comma.
15332 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
15333 are nl_langinfo(RADIXCHAR) are both ".". */
15334 if (localeconv () ->decimal_point[0] != ',') return 1;
15335 # endif
15336 return 0;
15337 #endif
15338 }
15339
15340 _ACEOF
15341 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
15342 (eval $ac_link) 2>&5
15343 ac_status=$?
15344 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15345 test $ac_status = 0; } && test -s conftest$ac_exeext; then
15346 case "$host_os" in
15347 # Handle native Windows specially, because there setlocale() interprets
15348 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
15349 # "fr" or "fra" as "French" or "French_France.1252",
15350 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
15351 # "ja" as "Japanese" or "Japanese_Japan.932",
15352 # and similar.
15353 mingw*)
15354 # Test for the native Windows locale name.
15355 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15356 gt_cv_locale_fr=French_France.1252
15357 else
15358 # None found.
15359 gt_cv_locale_fr=none
15360 fi
15361 ;;
15362 *)
15363 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
15364 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
15365 # configure script would override the LC_ALL setting. Likewise for
15366 # LC_CTYPE, which is also set at the beginning of the configure script.
15367 # Test for the usual locale name.
15368 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15369 gt_cv_locale_fr=fr_FR
15370 else
15371 # Test for the locale name with explicit encoding suffix.
15372 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15373 gt_cv_locale_fr=fr_FR.ISO-8859-1
15374 else
15375 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
15376 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15377 gt_cv_locale_fr=fr_FR.ISO8859-1
15378 else
15379 # Test for the HP-UX locale name.
15380 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15381 gt_cv_locale_fr=fr_FR.iso88591
15382 else
15383 # Test for the Solaris 7 locale name.
15384 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15385 gt_cv_locale_fr=fr
15386 else
15387 # None found.
15388 gt_cv_locale_fr=none
15389 fi
15390 fi
15391 fi
15392 fi
15393 fi
15394 ;;
15395 esac
15396 fi
15397 rm -fr conftest*
15398
15399 fi
15400 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
15401 printf "%s\n" "$gt_cv_locale_fr" >&6; }
15402 LOCALE_FR=$gt_cv_locale_fr
15403
15404
15405
15406
15407 GL_GNULIB_BTOWC=0
15408
15409
15410
15411 GL_GNULIB_WCTOB=0
15412
15413
15414
15415 GL_GNULIB_MBSINIT=0
15416
15417
15418
15419 GL_GNULIB_MBRTOWC=0
15420
15421
15422
15423 GL_GNULIB_MBRLEN=0
15424
15425
15426
15427 GL_GNULIB_MBSRTOWCS=0
15428
15429
15430
15431 GL_GNULIB_MBSNRTOWCS=0
15432
15433
15434
15435 GL_GNULIB_WCRTOMB=0
15436
15437
15438
15439 GL_GNULIB_WCSRTOMBS=0
15440
15441
15442
15443 GL_GNULIB_WCSNRTOMBS=0
15444
15445
15446
15447 GL_GNULIB_WCWIDTH=0
15448
15449
15450
15451 GL_GNULIB_WMEMCHR=0
15452
15453
15454
15455 GL_GNULIB_WMEMCMP=0
15456
15457
15458
15459 GL_GNULIB_WMEMCPY=0
15460
15461
15462
15463 GL_GNULIB_WMEMMOVE=0
15464
15465
15466
15467 GL_GNULIB_WMEMPCPY=0
15468
15469
15470
15471 GL_GNULIB_WMEMSET=0
15472
15473
15474
15475 GL_GNULIB_WCSLEN=0
15476
15477
15478
15479 GL_GNULIB_WCSNLEN=0
15480
15481
15482
15483 GL_GNULIB_WCSCPY=0
15484
15485
15486
15487 GL_GNULIB_WCPCPY=0
15488
15489
15490
15491 GL_GNULIB_WCSNCPY=0
15492
15493
15494
15495 GL_GNULIB_WCPNCPY=0
15496
15497
15498
15499 GL_GNULIB_WCSCAT=0
15500
15501
15502
15503 GL_GNULIB_WCSNCAT=0
15504
15505
15506
15507 GL_GNULIB_WCSCMP=0
15508
15509
15510
15511 GL_GNULIB_WCSNCMP=0
15512
15513
15514
15515 GL_GNULIB_WCSCASECMP=0
15516
15517
15518
15519 GL_GNULIB_WCSNCASECMP=0
15520
15521
15522
15523 GL_GNULIB_WCSCOLL=0
15524
15525
15526
15527 GL_GNULIB_WCSXFRM=0
15528
15529
15530
15531 GL_GNULIB_WCSDUP=0
15532
15533
15534
15535 GL_GNULIB_WCSCHR=0
15536
15537
15538
15539 GL_GNULIB_WCSRCHR=0
15540
15541
15542
15543 GL_GNULIB_WCSCSPN=0
15544
15545
15546
15547 GL_GNULIB_WCSSPN=0
15548
15549
15550
15551 GL_GNULIB_WCSPBRK=0
15552
15553
15554
15555 GL_GNULIB_WCSSTR=0
15556
15557
15558
15559 GL_GNULIB_WCSTOK=0
15560
15561
15562
15563 GL_GNULIB_WCSWIDTH=0
15564
15565
15566
15567 GL_GNULIB_WCSFTIME=0
15568
15569
15570
15571 GL_GNULIB_MDA_WCSDUP=1
15572
15573
15574
15575
15576
15577 GL_GNULIB__EXIT=0
15578
15579
15580
15581 GL_GNULIB_ALIGNED_ALLOC=0
15582
15583
15584
15585 GL_GNULIB_ATOLL=0
15586
15587
15588
15589 GL_GNULIB_CALLOC_GNU=0
15590
15591
15592
15593 GL_GNULIB_CALLOC_POSIX=0
15594
15595
15596
15597 GL_GNULIB_CANONICALIZE_FILE_NAME=0
15598
15599
15600
15601 GL_GNULIB_FREE_POSIX=0
15602
15603
15604
15605 GL_GNULIB_GETLOADAVG=0
15606
15607
15608
15609 GL_GNULIB_GETSUBOPT=0
15610
15611
15612
15613 GL_GNULIB_GRANTPT=0
15614
15615
15616
15617 GL_GNULIB_MALLOC_GNU=0
15618
15619
15620
15621 GL_GNULIB_MALLOC_POSIX=0
15622
15623
15624
15625 GL_GNULIB_MBTOWC=0
15626
15627
15628
15629 GL_GNULIB_MKDTEMP=0
15630
15631
15632
15633 GL_GNULIB_MKOSTEMP=0
15634
15635
15636
15637 GL_GNULIB_MKOSTEMPS=0
15638
15639
15640
15641 GL_GNULIB_MKSTEMP=0
15642
15643
15644
15645 GL_GNULIB_MKSTEMPS=0
15646
15647
15648
15649 GL_GNULIB_POSIX_MEMALIGN=0
15650
15651
15652
15653 GL_GNULIB_POSIX_OPENPT=0
15654
15655
15656
15657 GL_GNULIB_PTSNAME=0
15658
15659
15660
15661 GL_GNULIB_PTSNAME_R=0
15662
15663
15664
15665 GL_GNULIB_PUTENV=0
15666
15667
15668
15669 GL_GNULIB_QSORT_R=0
15670
15671
15672
15673 GL_GNULIB_RANDOM=0
15674
15675
15676
15677 GL_GNULIB_RANDOM_R=0
15678
15679
15680
15681 GL_GNULIB_REALLOCARRAY=0
15682
15683
15684
15685 GL_GNULIB_REALLOC_GNU=0
15686
15687
15688
15689 GL_GNULIB_REALLOC_POSIX=0
15690
15691
15692
15693 GL_GNULIB_REALPATH=0
15694
15695
15696
15697 GL_GNULIB_RPMATCH=0
15698
15699
15700
15701 GL_GNULIB_SECURE_GETENV=0
15702
15703
15704
15705 GL_GNULIB_SETENV=0
15706
15707
15708
15709 GL_GNULIB_STRTOD=0
15710
15711
15712
15713 GL_GNULIB_STRTOL=0
15714
15715
15716
15717 GL_GNULIB_STRTOLD=0
15718
15719
15720
15721 GL_GNULIB_STRTOLL=0
15722
15723
15724
15725 GL_GNULIB_STRTOUL=0
15726
15727
15728
15729 GL_GNULIB_STRTOULL=0
15730
15731
15732
15733 GL_GNULIB_SYSTEM_POSIX=0
15734
15735
15736
15737 GL_GNULIB_UNLOCKPT=0
15738
15739
15740
15741 GL_GNULIB_UNSETENV=0
15742
15743
15744
15745 GL_GNULIB_WCTOMB=0
15746
15747
15748
15749 GL_GNULIB_MDA_ECVT=1
15750
15751
15752
15753 GL_GNULIB_MDA_FCVT=1
15754
15755
15756
15757 GL_GNULIB_MDA_GCVT=1
15758
15759
15760
15761 GL_GNULIB_MDA_MKTEMP=1
15762
15763
15764
15765 GL_GNULIB_MDA_PUTENV=1
15766
15767
15768
15769
15770 HAVE__EXIT=1;
15771 HAVE_ALIGNED_ALLOC=1;
15772 HAVE_ATOLL=1;
15773 HAVE_CANONICALIZE_FILE_NAME=1;
15774 HAVE_DECL_ECVT=1;
15775 HAVE_DECL_FCVT=1;
15776 HAVE_DECL_GCVT=1;
15777 HAVE_DECL_GETLOADAVG=1;
15778 HAVE_GETSUBOPT=1;
15779 HAVE_GRANTPT=1;
15780 HAVE_INITSTATE=1;
15781 HAVE_DECL_INITSTATE=1;
15782 HAVE_MBTOWC=1;
15783 HAVE_MKDTEMP=1;
15784 HAVE_MKOSTEMP=1;
15785 HAVE_MKOSTEMPS=1;
15786 HAVE_MKSTEMP=1;
15787 HAVE_MKSTEMPS=1;
15788 HAVE_POSIX_MEMALIGN=1;
15789 HAVE_POSIX_OPENPT=1;
15790 HAVE_PTSNAME=1;
15791 HAVE_PTSNAME_R=1;
15792 HAVE_QSORT_R=1;
15793 HAVE_RANDOM=1;
15794 HAVE_RANDOM_H=1;
15795 HAVE_RANDOM_R=1;
15796 HAVE_REALLOCARRAY=1;
15797 HAVE_REALPATH=1;
15798 HAVE_RPMATCH=1;
15799 HAVE_SECURE_GETENV=1;
15800 HAVE_SETENV=1;
15801 HAVE_DECL_SETENV=1;
15802 HAVE_SETSTATE=1;
15803 HAVE_DECL_SETSTATE=1;
15804 HAVE_STRTOD=1;
15805 HAVE_STRTOL=1;
15806 HAVE_STRTOLD=1;
15807 HAVE_STRTOLL=1;
15808 HAVE_STRTOUL=1;
15809 HAVE_STRTOULL=1;
15810 HAVE_STRUCT_RANDOM_DATA=1;
15811 HAVE_SYS_LOADAVG_H=0;
15812 HAVE_UNLOCKPT=1;
15813 HAVE_DECL_UNSETENV=1;
15814 REPLACE_ALIGNED_ALLOC=0;
15815 REPLACE_CALLOC_FOR_CALLOC_GNU=0;
15816 REPLACE_CALLOC_FOR_CALLOC_POSIX=0;
15817 REPLACE_CANONICALIZE_FILE_NAME=0;
15818 REPLACE_FREE=0;
15819 REPLACE_INITSTATE=0;
15820 REPLACE_MALLOC_FOR_MALLOC_GNU=0;
15821 REPLACE_MALLOC_FOR_MALLOC_POSIX=0;
15822 REPLACE_MBTOWC=0;
15823 REPLACE_MKSTEMP=0;
15824 REPLACE_POSIX_MEMALIGN=0;
15825 REPLACE_PTSNAME=0;
15826 REPLACE_PTSNAME_R=0;
15827 REPLACE_PUTENV=0;
15828 REPLACE_QSORT_R=0;
15829 REPLACE_RANDOM=0;
15830 REPLACE_RANDOM_R=0;
15831 REPLACE_REALLOC_FOR_REALLOC_GNU=0;
15832 REPLACE_REALLOC_FOR_REALLOC_POSIX=0;
15833 REPLACE_REALLOCARRAY=0;
15834 REPLACE_REALPATH=0;
15835 REPLACE_SETENV=0;
15836 REPLACE_SETSTATE=0;
15837 REPLACE_STRTOD=0;
15838 REPLACE_STRTOL=0;
15839 REPLACE_STRTOLD=0;
15840 REPLACE_STRTOLL=0;
15841 REPLACE_STRTOUL=0;
15842 REPLACE_STRTOULL=0;
15843 REPLACE_UNSETENV=0;
15844 REPLACE_WCTOMB=0;
15845
15846
15847 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc is ptrdiff_t safe" >&5
15848 printf %s "checking whether malloc is ptrdiff_t safe... " >&6; }
15849 if test ${gl_cv_malloc_ptrdiff+y}
15850 then :
15851 printf %s "(cached) " >&6
15852 else $as_nop
15853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15854 /* end confdefs.h. */
15855 #include <stdint.h>
15856
15857 int
15858 main (void)
15859 {
15860 /* 64-bit ptrdiff_t is so wide that no practical platform
15861 can exceed it. */
15862 #define WIDE_PTRDIFF (PTRDIFF_MAX >> 31 >> 31 != 0)
15863
15864 /* On rare machines where size_t fits in ptrdiff_t there
15865 is no problem. */
15866 #define NARROW_SIZE (SIZE_MAX <= PTRDIFF_MAX)
15867
15868 /* glibc 2.30 and later malloc refuses to exceed ptrdiff_t
15869 bounds even on 32-bit platforms. We don't know which
15870 non-glibc systems are safe. */
15871 #define KNOWN_SAFE (2 < __GLIBC__ + (30 <= __GLIBC_MINOR__))
15872
15873 #if WIDE_PTRDIFF || NARROW_SIZE || KNOWN_SAFE
15874 return 0;
15875 #else
15876 #error "malloc might not be ptrdiff_t safe"
15877 syntax error
15878 #endif
15879
15880 ;
15881 return 0;
15882 }
15883 _ACEOF
15884 if ac_fn_c_try_compile "$LINENO"
15885 then :
15886 gl_cv_malloc_ptrdiff=yes
15887 else $as_nop
15888 gl_cv_malloc_ptrdiff=no
15889 fi
15890 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15891
15892 fi
15893 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_malloc_ptrdiff" >&5
15894 printf "%s\n" "$gl_cv_malloc_ptrdiff" >&6; }
15895
15896
15897
15898
15899 test "$gl_cv_malloc_ptrdiff" = yes || REPLACE_MALLOC_FOR_MALLOC_POSIX=1
15900
15901
15902
15903 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc set errno on failure" >&5
15904 printf %s "checking whether malloc, realloc, calloc set errno on failure... " >&6; }
15905 if test ${gl_cv_func_malloc_posix+y}
15906 then :
15907 printf %s "(cached) " >&6
15908 else $as_nop
15909
15910 case "$host_os" in
15911 mingw*)
15912 gl_cv_func_malloc_posix=no ;;
15913 irix* | solaris*)
15914
15915 gl_cv_func_malloc_posix=no ;;
15916 *)
15917 gl_cv_func_malloc_posix=yes ;;
15918 esac
15919
15920 fi
15921 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
15922 printf "%s\n" "$gl_cv_func_malloc_posix" >&6; }
15923
15924
15925
15926
15927
15928 if test "$gl_cv_func_malloc_posix" = yes; then
15929
15930 printf "%s\n" "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
15931
15932 else
15933 REPLACE_MALLOC_FOR_MALLOC_POSIX=1
15934 fi
15935
15936
15937
15938
15939 if test $REPLACE_MALLOC_FOR_MALLOC_POSIX = 1; then
15940 REPLACE_CALLOC_FOR_CALLOC_POSIX=1
15941 fi
15942
15943
15944
15945 GL_GNULIB_ACCESS=0
15946
15947
15948
15949 GL_GNULIB_CHDIR=0
15950
15951
15952
15953 GL_GNULIB_CHOWN=0
15954
15955
15956
15957 GL_GNULIB_CLOSE=0
15958
15959
15960
15961 GL_GNULIB_COPY_FILE_RANGE=0
15962
15963
15964
15965 GL_GNULIB_DUP=0
15966
15967
15968
15969 GL_GNULIB_DUP2=0
15970
15971
15972
15973 GL_GNULIB_DUP3=0
15974
15975
15976
15977 GL_GNULIB_ENVIRON=0
15978
15979
15980
15981 GL_GNULIB_EUIDACCESS=0
15982
15983
15984
15985 GL_GNULIB_EXECL=0
15986
15987
15988
15989 GL_GNULIB_EXECLE=0
15990
15991
15992
15993 GL_GNULIB_EXECLP=0
15994
15995
15996
15997 GL_GNULIB_EXECV=0
15998
15999
16000
16001 GL_GNULIB_EXECVE=0
16002
16003
16004
16005 GL_GNULIB_EXECVP=0
16006
16007
16008
16009 GL_GNULIB_EXECVPE=0
16010
16011
16012
16013 GL_GNULIB_FACCESSAT=0
16014
16015
16016
16017 GL_GNULIB_FCHDIR=0
16018
16019
16020
16021 GL_GNULIB_FCHOWNAT=0
16022
16023
16024
16025 GL_GNULIB_FDATASYNC=0
16026
16027
16028
16029 GL_GNULIB_FSYNC=0
16030
16031
16032
16033 GL_GNULIB_FTRUNCATE=0
16034
16035
16036
16037 GL_GNULIB_GETCWD=0
16038
16039
16040
16041 GL_GNULIB_GETDOMAINNAME=0
16042
16043
16044
16045 GL_GNULIB_GETDTABLESIZE=0
16046
16047
16048
16049 GL_GNULIB_GETENTROPY=0
16050
16051
16052
16053 GL_GNULIB_GETGROUPS=0
16054
16055
16056
16057 GL_GNULIB_GETHOSTNAME=0
16058
16059
16060
16061 GL_GNULIB_GETLOGIN=0
16062
16063
16064
16065 GL_GNULIB_GETLOGIN_R=0
16066
16067
16068
16069 GL_GNULIB_GETOPT_POSIX=0
16070
16071
16072
16073 GL_GNULIB_GETPAGESIZE=0
16074
16075
16076
16077 GL_GNULIB_GETPASS=0
16078
16079
16080
16081 GL_GNULIB_GETPASS_GNU=0
16082
16083
16084
16085 GL_GNULIB_GETUSERSHELL=0
16086
16087
16088
16089 GL_GNULIB_GROUP_MEMBER=0
16090
16091
16092
16093 GL_GNULIB_ISATTY=0
16094
16095
16096
16097 GL_GNULIB_LCHOWN=0
16098
16099
16100
16101 GL_GNULIB_LINK=0
16102
16103
16104
16105 GL_GNULIB_LINKAT=0
16106
16107
16108
16109 GL_GNULIB_LSEEK=0
16110
16111
16112
16113 GL_GNULIB_PIPE=0
16114
16115
16116
16117 GL_GNULIB_PIPE2=0
16118
16119
16120
16121 GL_GNULIB_PREAD=0
16122
16123
16124
16125 GL_GNULIB_PWRITE=0
16126
16127
16128
16129 GL_GNULIB_READ=0
16130
16131
16132
16133 GL_GNULIB_READLINK=0
16134
16135
16136
16137 GL_GNULIB_READLINKAT=0
16138
16139
16140
16141 GL_GNULIB_RMDIR=0
16142
16143
16144
16145 GL_GNULIB_SETHOSTNAME=0
16146
16147
16148
16149 GL_GNULIB_SLEEP=0
16150
16151
16152
16153 GL_GNULIB_SYMLINK=0
16154
16155
16156
16157 GL_GNULIB_SYMLINKAT=0
16158
16159
16160
16161 GL_GNULIB_TRUNCATE=0
16162
16163
16164
16165 GL_GNULIB_TTYNAME_R=0
16166
16167
16168
16169 GL_GNULIB_UNISTD_H_GETOPT=0
16170
16171
16172
16173 GL_GNULIB_UNISTD_H_NONBLOCKING=0
16174
16175
16176
16177 GL_GNULIB_UNISTD_H_SIGPIPE=0
16178
16179
16180
16181 GL_GNULIB_UNLINK=0
16182
16183
16184
16185 GL_GNULIB_UNLINKAT=0
16186
16187
16188
16189 GL_GNULIB_USLEEP=0
16190
16191
16192
16193 GL_GNULIB_WRITE=0
16194
16195
16196
16197 GL_GNULIB_MDA_ACCESS=1
16198
16199
16200
16201 GL_GNULIB_MDA_CHDIR=1
16202
16203
16204
16205 GL_GNULIB_MDA_CLOSE=1
16206
16207
16208
16209 GL_GNULIB_MDA_DUP=1
16210
16211
16212
16213 GL_GNULIB_MDA_DUP2=1
16214
16215
16216
16217 GL_GNULIB_MDA_EXECL=1
16218
16219
16220
16221 GL_GNULIB_MDA_EXECLE=1
16222
16223
16224
16225 GL_GNULIB_MDA_EXECLP=1
16226
16227
16228
16229 GL_GNULIB_MDA_EXECV=1
16230
16231
16232
16233 GL_GNULIB_MDA_EXECVE=1
16234
16235
16236
16237 GL_GNULIB_MDA_EXECVP=1
16238
16239
16240
16241 GL_GNULIB_MDA_EXECVPE=1
16242
16243
16244
16245 GL_GNULIB_MDA_GETCWD=1
16246
16247
16248
16249 GL_GNULIB_MDA_GETPID=1
16250
16251
16252
16253 GL_GNULIB_MDA_ISATTY=1
16254
16255
16256
16257 GL_GNULIB_MDA_LSEEK=1
16258
16259
16260
16261 GL_GNULIB_MDA_READ=1
16262
16263
16264
16265 GL_GNULIB_MDA_RMDIR=1
16266
16267
16268
16269 GL_GNULIB_MDA_SWAB=1
16270
16271
16272
16273 GL_GNULIB_MDA_UNLINK=1
16274
16275
16276
16277 GL_GNULIB_MDA_WRITE=1
16278
16279
16280
16281
16282 HAVE_CHOWN=1;
16283 HAVE_COPY_FILE_RANGE=1;
16284 HAVE_DUP3=1;
16285 HAVE_EUIDACCESS=1;
16286 HAVE_EXECVPE=1;
16287 HAVE_FACCESSAT=1;
16288 HAVE_FCHDIR=1;
16289 HAVE_FCHOWNAT=1;
16290 HAVE_FDATASYNC=1;
16291 HAVE_FSYNC=1;
16292 HAVE_FTRUNCATE=1;
16293 HAVE_GETDTABLESIZE=1;
16294 HAVE_GETENTROPY=1;
16295 HAVE_GETGROUPS=1;
16296 HAVE_GETHOSTNAME=1;
16297 HAVE_GETLOGIN=1;
16298 HAVE_GETPAGESIZE=1;
16299 HAVE_GETPASS=1;
16300 HAVE_GROUP_MEMBER=1;
16301 HAVE_LCHOWN=1;
16302 HAVE_LINK=1;
16303 HAVE_LINKAT=1;
16304 HAVE_PIPE=1;
16305 HAVE_PIPE2=1;
16306 HAVE_PREAD=1;
16307 HAVE_PWRITE=1;
16308 HAVE_READLINK=1;
16309 HAVE_READLINKAT=1;
16310 HAVE_SETHOSTNAME=1;
16311 HAVE_SLEEP=1;
16312 HAVE_SYMLINK=1;
16313 HAVE_SYMLINKAT=1;
16314 HAVE_UNLINKAT=1;
16315 HAVE_USLEEP=1;
16316 HAVE_DECL_ENVIRON=1;
16317 HAVE_DECL_EXECVPE=1;
16318 HAVE_DECL_FCHDIR=1;
16319 HAVE_DECL_FDATASYNC=1;
16320 HAVE_DECL_GETDOMAINNAME=1;
16321 HAVE_DECL_GETLOGIN=1;
16322 HAVE_DECL_GETLOGIN_R=1;
16323 HAVE_DECL_GETPAGESIZE=1;
16324 HAVE_DECL_GETUSERSHELL=1;
16325 HAVE_DECL_SETHOSTNAME=1;
16326 HAVE_DECL_TRUNCATE=1;
16327 HAVE_DECL_TTYNAME_R=1;
16328 HAVE_OS_H=0;
16329 HAVE_SYS_PARAM_H=0;
16330 REPLACE_ACCESS=0;
16331 REPLACE_CHOWN=0;
16332 REPLACE_CLOSE=0;
16333 REPLACE_COPY_FILE_RANGE=0;
16334 REPLACE_DUP=0;
16335 REPLACE_DUP2=0;
16336 REPLACE_EXECL=0;
16337 REPLACE_EXECLE=0;
16338 REPLACE_EXECLP=0;
16339 REPLACE_EXECV=0;
16340 REPLACE_EXECVE=0;
16341 REPLACE_EXECVP=0;
16342 REPLACE_EXECVPE=0;
16343 REPLACE_FACCESSAT=0;
16344 REPLACE_FCHOWNAT=0;
16345 REPLACE_FTRUNCATE=0;
16346 REPLACE_GETCWD=0;
16347 REPLACE_GETDOMAINNAME=0;
16348 REPLACE_GETDTABLESIZE=0;
16349 REPLACE_GETLOGIN_R=0;
16350 REPLACE_GETGROUPS=0;
16351 REPLACE_GETPAGESIZE=0;
16352 REPLACE_GETPASS=0;
16353 REPLACE_GETPASS_FOR_GETPASS_GNU=0;
16354 REPLACE_ISATTY=0;
16355 REPLACE_LCHOWN=0;
16356 REPLACE_LINK=0;
16357 REPLACE_LINKAT=0;
16358 REPLACE_LSEEK=0;
16359 REPLACE_PREAD=0;
16360 REPLACE_PWRITE=0;
16361 REPLACE_READ=0;
16362 REPLACE_READLINK=0;
16363 REPLACE_READLINKAT=0;
16364 REPLACE_RMDIR=0;
16365 REPLACE_SLEEP=0;
16366 REPLACE_SYMLINK=0;
16367 REPLACE_SYMLINKAT=0;
16368 REPLACE_TRUNCATE=0;
16369 REPLACE_TTYNAME_R=0;
16370 REPLACE_UNLINK=0;
16371 REPLACE_UNLINKAT=0;
16372 REPLACE_USLEEP=0;
16373 REPLACE_WRITE=0;
16374 UNISTD_H_HAVE_SYS_RANDOM_H=0;
16375 UNISTD_H_HAVE_WINSOCK2_H=0;
16376 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
16377
16378
16379
16380
16381
16382
16383
16384
16385
16386 if test $ac_cv_func__set_invalid_parameter_handler = yes; then
16387 HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
16388
16389 printf "%s\n" "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
16390
16391 else
16392 HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
16393 fi
16394
16395
16396
16397
16398
16399 HAVE_ISBLANK=1;
16400
16401
16402
16403 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
16404 printf %s "checking whether the preprocessor supports include_next... " >&6; }
16405 if test ${gl_cv_have_include_next+y}
16406 then :
16407 printf %s "(cached) " >&6
16408 else $as_nop
16409 rm -rf conftestd1a conftestd1b conftestd2
16410 mkdir conftestd1a conftestd1b conftestd2
16411 cat <<EOF > conftestd1a/conftest.h
16412 #define DEFINED_IN_CONFTESTD1
16413 #include_next <conftest.h>
16414 #ifdef DEFINED_IN_CONFTESTD2
16415 int foo;
16416 #else
16417 #error "include_next doesn't work"
16418 #endif
16419 EOF
16420 cat <<EOF > conftestd1b/conftest.h
16421 #define DEFINED_IN_CONFTESTD1
16422 #include <stdio.h>
16423 #include_next <conftest.h>
16424 #ifdef DEFINED_IN_CONFTESTD2
16425 int foo;
16426 #else
16427 #error "include_next doesn't work"
16428 #endif
16429 EOF
16430 cat <<EOF > conftestd2/conftest.h
16431 #ifndef DEFINED_IN_CONFTESTD1
16432 #error "include_next test doesn't work"
16433 #endif
16434 #define DEFINED_IN_CONFTESTD2
16435 EOF
16436 gl_save_CPPFLAGS="$CPPFLAGS"
16437 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
16438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16439 /* end confdefs.h. */
16440 #include <conftest.h>
16441 _ACEOF
16442 if ac_fn_c_try_compile "$LINENO"
16443 then :
16444 gl_cv_have_include_next=yes
16445 else $as_nop
16446 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
16447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16448 /* end confdefs.h. */
16449 #include <conftest.h>
16450 _ACEOF
16451 if ac_fn_c_try_compile "$LINENO"
16452 then :
16453 gl_cv_have_include_next=buggy
16454 else $as_nop
16455 gl_cv_have_include_next=no
16456 fi
16457 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16458
16459 fi
16460 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16461 CPPFLAGS="$gl_save_CPPFLAGS"
16462 rm -rf conftestd1a conftestd1b conftestd2
16463
16464 fi
16465 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
16466 printf "%s\n" "$gl_cv_have_include_next" >&6; }
16467 PRAGMA_SYSTEM_HEADER=
16468 if test $gl_cv_have_include_next = yes; then
16469 INCLUDE_NEXT=include_next
16470 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
16471 if test -n "$GCC"; then
16472 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
16473 fi
16474 else
16475 if test $gl_cv_have_include_next = buggy; then
16476 INCLUDE_NEXT=include
16477 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
16478 else
16479 INCLUDE_NEXT=include
16480 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
16481 fi
16482 fi
16483
16484
16485
16486
16487 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether source code line length is unlimited" >&5
16488 printf %s "checking whether source code line length is unlimited... " >&6; }
16489 if test ${gl_cv_source_line_length_unlimited+y}
16490 then :
16491 printf %s "(cached) " >&6
16492 else $as_nop
16493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16494 /* end confdefs.h. */
16495
16496 #ifdef __TANDEM
16497 choke me
16498 #endif
16499
16500 _ACEOF
16501 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16502 $EGREP "choke me" >/dev/null 2>&1
16503 then :
16504 gl_cv_source_line_length_unlimited=no
16505 else $as_nop
16506 gl_cv_source_line_length_unlimited=yes
16507 fi
16508 rm -rf conftest*
16509
16510
16511 fi
16512 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_source_line_length_unlimited" >&5
16513 printf "%s\n" "$gl_cv_source_line_length_unlimited" >&6; }
16514 if test $gl_cv_source_line_length_unlimited = no; then
16515 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
16516 else
16517 PRAGMA_COLUMNS=
16518 fi
16519
16520
16521
16522
16523
16524
16525
16526
16527
16528
16529
16530
16531
16532 if test $gl_cv_have_include_next = yes; then
16533 gl_cv_next_ctype_h='<'ctype.h'>'
16534 else
16535 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <ctype.h>" >&5
16536 printf %s "checking absolute name of <ctype.h>... " >&6; }
16537 if test ${gl_cv_next_ctype_h+y}
16538 then :
16539 printf %s "(cached) " >&6
16540 else $as_nop
16541
16542
16543
16544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16545 /* end confdefs.h. */
16546 #include <ctype.h>
16547 _ACEOF
16548 case "$host_os" in
16549 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16550 *) gl_absname_cpp="$ac_cpp" ;;
16551 esac
16552
16553 case "$host_os" in
16554 mingw*)
16555 gl_dirsep_regex='[/\\]'
16556 ;;
16557 *)
16558 gl_dirsep_regex='\/'
16559 ;;
16560 esac
16561 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16562 gl_header_literal_regex=`echo 'ctype.h' \
16563 | sed -e "$gl_make_literal_regex_sed"`
16564 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16565 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16566 s|^/[^/]|//&|
16567 p
16568 q
16569 }'
16570
16571 gl_cv_absolute_ctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16572 sed -n "$gl_absolute_header_sed"`
16573
16574 gl_header=$gl_cv_absolute_ctype_h
16575 gl_cv_next_ctype_h='"'$gl_header'"'
16576
16577
16578 fi
16579 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_ctype_h" >&5
16580 printf "%s\n" "$gl_cv_next_ctype_h" >&6; }
16581 fi
16582 NEXT_CTYPE_H=$gl_cv_next_ctype_h
16583
16584 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16585 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16586 gl_next_as_first_directive='<'ctype.h'>'
16587 else
16588 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16589 gl_next_as_first_directive=$gl_cv_next_ctype_h
16590 fi
16591 NEXT_AS_FIRST_DIRECTIVE_CTYPE_H=$gl_next_as_first_directive
16592
16593
16594
16595
16596
16597
16598
16599
16600
16601
16602
16603 GL_GNULIB_ISBLANK=0
16604
16605
16606
16607
16608 HAVE_OPENDIR=1;
16609 HAVE_READDIR=1;
16610 HAVE_REWINDDIR=1;
16611 HAVE_CLOSEDIR=1;
16612 HAVE_DECL_DIRFD=1;
16613 HAVE_DECL_FDOPENDIR=1;
16614 HAVE_FDOPENDIR=1;
16615 HAVE_SCANDIR=1;
16616 HAVE_ALPHASORT=1;
16617 REPLACE_OPENDIR=0;
16618 REPLACE_CLOSEDIR=0;
16619 REPLACE_DIRFD=0;
16620 REPLACE_FDOPENDIR=0;
16621
16622
16623
16624
16625
16626
16627
16628
16629
16630
16631
16632
16633
16634
16635 if test $gl_cv_have_include_next = yes; then
16636 gl_cv_next_dirent_h='<'dirent.h'>'
16637 else
16638 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
16639 printf %s "checking absolute name of <dirent.h>... " >&6; }
16640 if test ${gl_cv_next_dirent_h+y}
16641 then :
16642 printf %s "(cached) " >&6
16643 else $as_nop
16644
16645 if test $ac_cv_header_dirent_h = yes; then
16646
16647
16648
16649
16650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16651 /* end confdefs.h. */
16652 #include <dirent.h>
16653 _ACEOF
16654 case "$host_os" in
16655 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16656 *) gl_absname_cpp="$ac_cpp" ;;
16657 esac
16658
16659 case "$host_os" in
16660 mingw*)
16661 gl_dirsep_regex='[/\\]'
16662 ;;
16663 *)
16664 gl_dirsep_regex='\/'
16665 ;;
16666 esac
16667 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16668 gl_header_literal_regex=`echo 'dirent.h' \
16669 | sed -e "$gl_make_literal_regex_sed"`
16670 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16671 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16672 s|^/[^/]|//&|
16673 p
16674 q
16675 }'
16676
16677 gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16678 sed -n "$gl_absolute_header_sed"`
16679
16680 gl_header=$gl_cv_absolute_dirent_h
16681 gl_cv_next_dirent_h='"'$gl_header'"'
16682 else
16683 gl_cv_next_dirent_h='<'dirent.h'>'
16684 fi
16685
16686
16687 fi
16688 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
16689 printf "%s\n" "$gl_cv_next_dirent_h" >&6; }
16690 fi
16691 NEXT_DIRENT_H=$gl_cv_next_dirent_h
16692
16693 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16694 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16695 gl_next_as_first_directive='<'dirent.h'>'
16696 else
16697 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16698 gl_next_as_first_directive=$gl_cv_next_dirent_h
16699 fi
16700 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
16701
16702
16703
16704
16705 if test $ac_cv_header_dirent_h = yes; then
16706 HAVE_DIRENT_H=1
16707 else
16708 HAVE_DIRENT_H=0
16709 fi
16710
16711
16712
16713
16714
16715
16716
16717
16718
16719
16720
16721
16722 GL_GNULIB_OPENDIR=0
16723
16724
16725
16726 GL_GNULIB_READDIR=0
16727
16728
16729
16730 GL_GNULIB_REWINDDIR=0
16731
16732
16733
16734 GL_GNULIB_CLOSEDIR=0
16735
16736
16737
16738 GL_GNULIB_DIRFD=0
16739
16740
16741
16742 GL_GNULIB_FDOPENDIR=0
16743
16744
16745
16746 GL_GNULIB_SCANDIR=0
16747
16748
16749
16750 GL_GNULIB_ALPHASORT=0
16751
16752
16753
16754 gl_mda_defines='
16755 #if defined _WIN32 && !defined __CYGWIN__
16756 #define access _access
16757 #define chdir _chdir
16758 #define chmod _chmod
16759 #define close _close
16760 #define creat _creat
16761 #define dup _dup
16762 #define dup2 _dup2
16763 #define ecvt _ecvt
16764 #define execl _execl
16765 #define execle _execle
16766 #define execlp _execlp
16767 #define execv _execv
16768 #define execve _execve
16769 #define execvp _execvp
16770 #define execvpe _execvpe
16771 #define fcloseall _fcloseall
16772 #define fcvt _fcvt
16773 #define fdopen _fdopen
16774 #define fileno _fileno
16775 #define gcvt _gcvt
16776 #define getcwd _getcwd
16777 #define getpid _getpid
16778 #define getw _getw
16779 #define isatty _isatty
16780 #define j0 _j0
16781 #define j1 _j1
16782 #define jn _jn
16783 #define lfind _lfind
16784 #define lsearch _lsearch
16785 #define lseek _lseek
16786 #define memccpy _memccpy
16787 #define mkdir _mkdir
16788 #define mktemp _mktemp
16789 #define open _open
16790 #define putenv _putenv
16791 #define putw _putw
16792 #define read _read
16793 #define rmdir _rmdir
16794 #define strdup _strdup
16795 #define swab _swab
16796 #define tempnam _tempnam
16797 #define tzset _tzset
16798 #define umask _umask
16799 #define unlink _unlink
16800 #define utime _utime
16801 #define wcsdup _wcsdup
16802 #define write _write
16803 #define y0 _y0
16804 #define y1 _y1
16805 #define yn _yn
16806 #endif
16807 '
16808
16809
16810
16811 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
16812 printf %s "checking for complete errno.h... " >&6; }
16813 if test ${gl_cv_header_errno_h_complete+y}
16814 then :
16815 printf %s "(cached) " >&6
16816 else $as_nop
16817
16818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16819 /* end confdefs.h. */
16820
16821 #include <errno.h>
16822 #if !defined ETXTBSY
16823 booboo
16824 #endif
16825 #if !defined ENOMSG
16826 booboo
16827 #endif
16828 #if !defined EIDRM
16829 booboo
16830 #endif
16831 #if !defined ENOLINK
16832 booboo
16833 #endif
16834 #if !defined EPROTO
16835 booboo
16836 #endif
16837 #if !defined EMULTIHOP
16838 booboo
16839 #endif
16840 #if !defined EBADMSG
16841 booboo
16842 #endif
16843 #if !defined EOVERFLOW
16844 booboo
16845 #endif
16846 #if !defined ENOTSUP
16847 booboo
16848 #endif
16849 #if !defined ENETRESET
16850 booboo
16851 #endif
16852 #if !defined ECONNABORTED
16853 booboo
16854 #endif
16855 #if !defined ESTALE
16856 booboo
16857 #endif
16858 #if !defined EDQUOT
16859 booboo
16860 #endif
16861 #if !defined ECANCELED
16862 booboo
16863 #endif
16864 #if !defined EOWNERDEAD
16865 booboo
16866 #endif
16867 #if !defined ENOTRECOVERABLE
16868 booboo
16869 #endif
16870 #if !defined EILSEQ
16871 booboo
16872 #endif
16873
16874 _ACEOF
16875 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16876 $EGREP "booboo" >/dev/null 2>&1
16877 then :
16878 gl_cv_header_errno_h_complete=no
16879 else $as_nop
16880 gl_cv_header_errno_h_complete=yes
16881 fi
16882 rm -rf conftest*
16883
16884
16885 fi
16886 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
16887 printf "%s\n" "$gl_cv_header_errno_h_complete" >&6; }
16888 if test $gl_cv_header_errno_h_complete = yes; then
16889 GL_GENERATE_ERRNO_H=false
16890 else
16891
16892
16893
16894
16895
16896
16897
16898
16899 if test $gl_cv_have_include_next = yes; then
16900 gl_cv_next_errno_h='<'errno.h'>'
16901 else
16902 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
16903 printf %s "checking absolute name of <errno.h>... " >&6; }
16904 if test ${gl_cv_next_errno_h+y}
16905 then :
16906 printf %s "(cached) " >&6
16907 else $as_nop
16908
16909
16910
16911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16912 /* end confdefs.h. */
16913 #include <errno.h>
16914 _ACEOF
16915 case "$host_os" in
16916 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16917 *) gl_absname_cpp="$ac_cpp" ;;
16918 esac
16919
16920 case "$host_os" in
16921 mingw*)
16922 gl_dirsep_regex='[/\\]'
16923 ;;
16924 *)
16925 gl_dirsep_regex='\/'
16926 ;;
16927 esac
16928 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
16929 gl_header_literal_regex=`echo 'errno.h' \
16930 | sed -e "$gl_make_literal_regex_sed"`
16931 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16932 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16933 s|^/[^/]|//&|
16934 p
16935 q
16936 }'
16937
16938 gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16939 sed -n "$gl_absolute_header_sed"`
16940
16941 gl_header=$gl_cv_absolute_errno_h
16942 gl_cv_next_errno_h='"'$gl_header'"'
16943
16944
16945 fi
16946 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
16947 printf "%s\n" "$gl_cv_next_errno_h" >&6; }
16948 fi
16949 NEXT_ERRNO_H=$gl_cv_next_errno_h
16950
16951 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16952 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16953 gl_next_as_first_directive='<'errno.h'>'
16954 else
16955 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16956 gl_next_as_first_directive=$gl_cv_next_errno_h
16957 fi
16958 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
16959
16960
16961
16962
16963 GL_GENERATE_ERRNO_H=true
16964 fi
16965
16966 if $GL_GENERATE_ERRNO_H; then
16967 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
16968 printf %s "checking for EMULTIHOP value... " >&6; }
16969 if test ${gl_cv_header_errno_h_EMULTIHOP+y}
16970 then :
16971 printf %s "(cached) " >&6
16972 else $as_nop
16973
16974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16975 /* end confdefs.h. */
16976
16977 #include <errno.h>
16978 #ifdef EMULTIHOP
16979 yes
16980 #endif
16981
16982 _ACEOF
16983 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16984 $EGREP "yes" >/dev/null 2>&1
16985 then :
16986 gl_cv_header_errno_h_EMULTIHOP=yes
16987 else $as_nop
16988 gl_cv_header_errno_h_EMULTIHOP=no
16989 fi
16990 rm -rf conftest*
16991
16992 if test $gl_cv_header_errno_h_EMULTIHOP = no; then
16993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16994 /* end confdefs.h. */
16995
16996 #define _XOPEN_SOURCE_EXTENDED 1
16997 #include <errno.h>
16998 #ifdef EMULTIHOP
16999 yes
17000 #endif
17001
17002 _ACEOF
17003 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17004 $EGREP "yes" >/dev/null 2>&1
17005 then :
17006 gl_cv_header_errno_h_EMULTIHOP=hidden
17007 fi
17008 rm -rf conftest*
17009
17010 if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
17011 if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
17012 #define _XOPEN_SOURCE_EXTENDED 1
17013 #include <errno.h>
17014 /* The following two lines are a workaround against an autoconf-2.52 bug. */
17015 #include <stdio.h>
17016 #include <stdlib.h>
17017 "
17018 then :
17019
17020 fi
17021
17022 fi
17023 fi
17024
17025 fi
17026 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
17027 printf "%s\n" "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
17028 case $gl_cv_header_errno_h_EMULTIHOP in
17029 yes | no)
17030 EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
17031 ;;
17032 *)
17033 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
17034 ;;
17035 esac
17036
17037
17038 fi
17039
17040
17041 if $GL_GENERATE_ERRNO_H; then
17042 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
17043 printf %s "checking for ENOLINK value... " >&6; }
17044 if test ${gl_cv_header_errno_h_ENOLINK+y}
17045 then :
17046 printf %s "(cached) " >&6
17047 else $as_nop
17048
17049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17050 /* end confdefs.h. */
17051
17052 #include <errno.h>
17053 #ifdef ENOLINK
17054 yes
17055 #endif
17056
17057 _ACEOF
17058 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17059 $EGREP "yes" >/dev/null 2>&1
17060 then :
17061 gl_cv_header_errno_h_ENOLINK=yes
17062 else $as_nop
17063 gl_cv_header_errno_h_ENOLINK=no
17064 fi
17065 rm -rf conftest*
17066
17067 if test $gl_cv_header_errno_h_ENOLINK = no; then
17068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17069 /* end confdefs.h. */
17070
17071 #define _XOPEN_SOURCE_EXTENDED 1
17072 #include <errno.h>
17073 #ifdef ENOLINK
17074 yes
17075 #endif
17076
17077 _ACEOF
17078 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17079 $EGREP "yes" >/dev/null 2>&1
17080 then :
17081 gl_cv_header_errno_h_ENOLINK=hidden
17082 fi
17083 rm -rf conftest*
17084
17085 if test $gl_cv_header_errno_h_ENOLINK = hidden; then
17086 if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
17087 #define _XOPEN_SOURCE_EXTENDED 1
17088 #include <errno.h>
17089 /* The following two lines are a workaround against an autoconf-2.52 bug. */
17090 #include <stdio.h>
17091 #include <stdlib.h>
17092 "
17093 then :
17094
17095 fi
17096
17097 fi
17098 fi
17099
17100 fi
17101 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
17102 printf "%s\n" "$gl_cv_header_errno_h_ENOLINK" >&6; }
17103 case $gl_cv_header_errno_h_ENOLINK in
17104 yes | no)
17105 ENOLINK_HIDDEN=0; ENOLINK_VALUE=
17106 ;;
17107 *)
17108 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
17109 ;;
17110 esac
17111
17112
17113 fi
17114
17115
17116 if $GL_GENERATE_ERRNO_H; then
17117 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
17118 printf %s "checking for EOVERFLOW value... " >&6; }
17119 if test ${gl_cv_header_errno_h_EOVERFLOW+y}
17120 then :
17121 printf %s "(cached) " >&6
17122 else $as_nop
17123
17124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17125 /* end confdefs.h. */
17126
17127 #include <errno.h>
17128 #ifdef EOVERFLOW
17129 yes
17130 #endif
17131
17132 _ACEOF
17133 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17134 $EGREP "yes" >/dev/null 2>&1
17135 then :
17136 gl_cv_header_errno_h_EOVERFLOW=yes
17137 else $as_nop
17138 gl_cv_header_errno_h_EOVERFLOW=no
17139 fi
17140 rm -rf conftest*
17141
17142 if test $gl_cv_header_errno_h_EOVERFLOW = no; then
17143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17144 /* end confdefs.h. */
17145
17146 #define _XOPEN_SOURCE_EXTENDED 1
17147 #include <errno.h>
17148 #ifdef EOVERFLOW
17149 yes
17150 #endif
17151
17152 _ACEOF
17153 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17154 $EGREP "yes" >/dev/null 2>&1
17155 then :
17156 gl_cv_header_errno_h_EOVERFLOW=hidden
17157 fi
17158 rm -rf conftest*
17159
17160 if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
17161 if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
17162 #define _XOPEN_SOURCE_EXTENDED 1
17163 #include <errno.h>
17164 /* The following two lines are a workaround against an autoconf-2.52 bug. */
17165 #include <stdio.h>
17166 #include <stdlib.h>
17167 "
17168 then :
17169
17170 fi
17171
17172 fi
17173 fi
17174
17175 fi
17176 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
17177 printf "%s\n" "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
17178 case $gl_cv_header_errno_h_EOVERFLOW in
17179 yes | no)
17180 EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
17181 ;;
17182 *)
17183 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
17184 ;;
17185 esac
17186
17187
17188 fi
17189
17190
17191
17192 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ctype.h defines __header_inline" >&5
17193 printf %s "checking whether ctype.h defines __header_inline... " >&6; }
17194 if test ${gl_cv_have___header_inline+y}
17195 then :
17196 printf %s "(cached) " >&6
17197 else $as_nop
17198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17199 /* end confdefs.h. */
17200 #include <ctype.h>
17201 #ifndef __header_inline
17202 #error "<ctype.h> does not define __header_inline"
17203 #endif
17204
17205 _ACEOF
17206 if ac_fn_c_try_cpp "$LINENO"
17207 then :
17208 gl_cv_have___header_inline=yes
17209 else $as_nop
17210 gl_cv_have___header_inline=no
17211 fi
17212 rm -f conftest.err conftest.i conftest.$ac_ext
17213 fi
17214 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have___header_inline" >&5
17215 printf "%s\n" "$gl_cv_have___header_inline" >&6; }
17216 if test "$gl_cv_have___header_inline" = yes; then
17217
17218 printf "%s\n" "#define HAVE___HEADER_INLINE 1" >>confdefs.h
17219
17220 fi
17221
17222
17223
17224 ac_fn_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
17225 if test "x$ac_cv_have_decl_fchdir" = xyes
17226 then :
17227 ac_have_decl=1
17228 else $as_nop
17229 ac_have_decl=0
17230 fi
17231 printf "%s\n" "#define HAVE_DECL_FCHDIR $ac_have_decl" >>confdefs.h
17232
17233
17234 HAVE_FCNTL=1;
17235 HAVE_OPENAT=1;
17236 REPLACE_CREAT=0;
17237 REPLACE_FCNTL=0;
17238 REPLACE_OPEN=0;
17239 REPLACE_OPENAT=0;
17240
17241
17242
17243
17244 GL_GNULIB_CREAT=0
17245
17246
17247
17248 GL_GNULIB_FCNTL=0
17249
17250
17251
17252 GL_GNULIB_NONBLOCKING=0
17253
17254
17255
17256 GL_GNULIB_OPEN=0
17257
17258
17259
17260 GL_GNULIB_OPENAT=0
17261
17262
17263
17264 GL_GNULIB_MDA_CREAT=1
17265
17266
17267
17268 GL_GNULIB_MDA_OPEN=1
17269
17270
17271
17272
17273
17274
17275
17276
17277
17278 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
17279 printf %s "checking for working fcntl.h... " >&6; }
17280 if test ${gl_cv_header_working_fcntl_h+y}
17281 then :
17282 printf %s "(cached) " >&6
17283 else $as_nop
17284 if test "$cross_compiling" = yes
17285 then :
17286 case "$host_os" in
17287 # Guess 'no' on native Windows.
17288 mingw*) gl_cv_header_working_fcntl_h='no' ;;
17289 *) gl_cv_header_working_fcntl_h=cross-compiling ;;
17290 esac
17291
17292 else $as_nop
17293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17294 /* end confdefs.h. */
17295 #include <sys/types.h>
17296 #include <sys/stat.h>
17297 #if HAVE_UNISTD_H
17298 # include <unistd.h>
17299 #else /* on Windows with MSVC */
17300 # include <io.h>
17301 # include <stdlib.h>
17302 # defined sleep(n) _sleep ((n) * 1000)
17303 #endif
17304 #include <fcntl.h>
17305
17306
17307 $gl_mda_defines
17308
17309 #ifndef O_NOATIME
17310 #define O_NOATIME 0
17311 #endif
17312 #ifndef O_NOFOLLOW
17313 #define O_NOFOLLOW 0
17314 #endif
17315 static int const constants[] =
17316 {
17317 O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
17318 O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
17319 };
17320
17321 int
17322 main (void)
17323 {
17324
17325 int result = !constants;
17326 #if HAVE_SYMLINK
17327 {
17328 static char const sym[] = "conftest.sym";
17329 if (symlink ("/dev/null", sym) != 0)
17330 result |= 2;
17331 else
17332 {
17333 int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
17334 if (fd >= 0)
17335 {
17336 close (fd);
17337 result |= 4;
17338 }
17339 }
17340 if (unlink (sym) != 0 || symlink (".", sym) != 0)
17341 result |= 2;
17342 else
17343 {
17344 int fd = open (sym, O_RDONLY | O_NOFOLLOW);
17345 if (fd >= 0)
17346 {
17347 close (fd);
17348 result |= 4;
17349 }
17350 }
17351 unlink (sym);
17352 }
17353 #endif
17354 {
17355 static char const file[] = "confdefs.h";
17356 int fd = open (file, O_RDONLY | O_NOATIME);
17357 if (fd < 0)
17358 result |= 8;
17359 else
17360 {
17361 struct stat st0;
17362 if (fstat (fd, &st0) != 0)
17363 result |= 16;
17364 else
17365 {
17366 char c;
17367 sleep (1);
17368 if (read (fd, &c, 1) != 1)
17369 result |= 24;
17370 else
17371 {
17372 if (close (fd) != 0)
17373 result |= 32;
17374 else
17375 {
17376 struct stat st1;
17377 if (stat (file, &st1) != 0)
17378 result |= 40;
17379 else
17380 if (st0.st_atime != st1.st_atime)
17381 result |= 64;
17382 }
17383 }
17384 }
17385 }
17386 }
17387 return result;
17388 ;
17389 return 0;
17390 }
17391 _ACEOF
17392 if ac_fn_c_try_run "$LINENO"
17393 then :
17394 gl_cv_header_working_fcntl_h=yes
17395 else $as_nop
17396 case $? in #(
17397 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
17398 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
17399 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
17400 *) gl_cv_header_working_fcntl_h='no';;
17401 esac
17402 fi
17403 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17404 conftest.$ac_objext conftest.beam conftest.$ac_ext
17405 fi
17406
17407
17408 fi
17409 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
17410 printf "%s\n" "$gl_cv_header_working_fcntl_h" >&6; }
17411
17412 case $gl_cv_header_working_fcntl_h in #(
17413 *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
17414 *) ac_val=1;;
17415 esac
17416
17417 printf "%s\n" "#define HAVE_WORKING_O_NOATIME $ac_val" >>confdefs.h
17418
17419
17420 case $gl_cv_header_working_fcntl_h in #(
17421 *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
17422 *) ac_val=1;;
17423 esac
17424
17425 printf "%s\n" "#define HAVE_WORKING_O_NOFOLLOW $ac_val" >>confdefs.h
17426
17427
17428
17429 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
17430 "
17431 if test "x$ac_cv_type_pid_t" = xyes
17432 then :
17433
17434 else $as_nop
17435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17436 /* end confdefs.h. */
17437
17438 #if defined _WIN64 && !defined __CYGWIN__
17439 LLP64
17440 #endif
17441
17442 int
17443 main (void)
17444 {
17445
17446 ;
17447 return 0;
17448 }
17449
17450 _ACEOF
17451 if ac_fn_c_try_compile "$LINENO"
17452 then :
17453 ac_pid_type='int'
17454 else $as_nop
17455 ac_pid_type='__int64'
17456 fi
17457 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17458
17459 printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h
17460
17461
17462 fi
17463
17464
17465 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
17466 if test "x$ac_cv_type_mode_t" = xyes
17467 then :
17468
17469 else $as_nop
17470
17471 printf "%s\n" "#define mode_t int" >>confdefs.h
17472
17473 fi
17474
17475
17476
17477
17478
17479
17480
17481
17482
17483
17484
17485
17486 if test $gl_cv_have_include_next = yes; then
17487 gl_cv_next_fcntl_h='<'fcntl.h'>'
17488 else
17489 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
17490 printf %s "checking absolute name of <fcntl.h>... " >&6; }
17491 if test ${gl_cv_next_fcntl_h+y}
17492 then :
17493 printf %s "(cached) " >&6
17494 else $as_nop
17495
17496
17497
17498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17499 /* end confdefs.h. */
17500 #include <fcntl.h>
17501 _ACEOF
17502 case "$host_os" in
17503 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17504 *) gl_absname_cpp="$ac_cpp" ;;
17505 esac
17506
17507 case "$host_os" in
17508 mingw*)
17509 gl_dirsep_regex='[/\\]'
17510 ;;
17511 *)
17512 gl_dirsep_regex='\/'
17513 ;;
17514 esac
17515 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17516 gl_header_literal_regex=`echo 'fcntl.h' \
17517 | sed -e "$gl_make_literal_regex_sed"`
17518 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17519 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17520 s|^/[^/]|//&|
17521 p
17522 q
17523 }'
17524
17525 gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17526 sed -n "$gl_absolute_header_sed"`
17527
17528 gl_header=$gl_cv_absolute_fcntl_h
17529 gl_cv_next_fcntl_h='"'$gl_header'"'
17530
17531
17532 fi
17533 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
17534 printf "%s\n" "$gl_cv_next_fcntl_h" >&6; }
17535 fi
17536 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
17537
17538 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17539 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17540 gl_next_as_first_directive='<'fcntl.h'>'
17541 else
17542 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17543 gl_next_as_first_directive=$gl_cv_next_fcntl_h
17544 fi
17545 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
17546
17547
17548
17549
17550
17551
17552
17553
17554
17555
17556
17557
17558
17559
17560
17561 HAVE_FNMATCH=1;
17562 REPLACE_FNMATCH=0;
17563
17564
17565
17566
17567
17568
17569
17570
17571
17572
17573
17574
17575
17576
17577
17578 if test $gl_cv_have_include_next = yes; then
17579 gl_cv_next_fnmatch_h='<'fnmatch.h'>'
17580 else
17581 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <fnmatch.h>" >&5
17582 printf %s "checking absolute name of <fnmatch.h>... " >&6; }
17583 if test ${gl_cv_next_fnmatch_h+y}
17584 then :
17585 printf %s "(cached) " >&6
17586 else $as_nop
17587
17588 if test $ac_cv_header_fnmatch_h = yes; then
17589
17590
17591
17592
17593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17594 /* end confdefs.h. */
17595 #include <fnmatch.h>
17596 _ACEOF
17597 case "$host_os" in
17598 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17599 *) gl_absname_cpp="$ac_cpp" ;;
17600 esac
17601
17602 case "$host_os" in
17603 mingw*)
17604 gl_dirsep_regex='[/\\]'
17605 ;;
17606 *)
17607 gl_dirsep_regex='\/'
17608 ;;
17609 esac
17610 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17611 gl_header_literal_regex=`echo 'fnmatch.h' \
17612 | sed -e "$gl_make_literal_regex_sed"`
17613 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17614 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17615 s|^/[^/]|//&|
17616 p
17617 q
17618 }'
17619
17620 gl_cv_absolute_fnmatch_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17621 sed -n "$gl_absolute_header_sed"`
17622
17623 gl_header=$gl_cv_absolute_fnmatch_h
17624 gl_cv_next_fnmatch_h='"'$gl_header'"'
17625 else
17626 gl_cv_next_fnmatch_h='<'fnmatch.h'>'
17627 fi
17628
17629
17630 fi
17631 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fnmatch_h" >&5
17632 printf "%s\n" "$gl_cv_next_fnmatch_h" >&6; }
17633 fi
17634 NEXT_FNMATCH_H=$gl_cv_next_fnmatch_h
17635
17636 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17637 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17638 gl_next_as_first_directive='<'fnmatch.h'>'
17639 else
17640 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17641 gl_next_as_first_directive=$gl_cv_next_fnmatch_h
17642 fi
17643 NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H=$gl_next_as_first_directive
17644
17645
17646
17647
17648
17649
17650
17651 if test $ac_cv_header_fnmatch_h = yes; then
17652 HAVE_FNMATCH_H=1
17653 else
17654 HAVE_FNMATCH_H=0
17655 fi
17656
17657
17658 GL_GENERATE_FNMATCH_H=false
17659 if false; then
17660 GL_GENERATE_FNMATCH_H=true
17661 else
17662 if test $ac_cv_header_fnmatch_h != yes; then
17663 GL_GENERATE_FNMATCH_H=true
17664 fi
17665 fi
17666
17667
17668
17669
17670
17671
17672
17673
17674
17675 GL_GNULIB_FNMATCH=0
17676
17677
17678
17679
17680
17681 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
17682 printf %s "checking for mbstate_t... " >&6; }
17683 if test ${ac_cv_type_mbstate_t+y}
17684 then :
17685 printf %s "(cached) " >&6
17686 else $as_nop
17687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17688 /* end confdefs.h. */
17689 $ac_includes_default
17690 #include <wchar.h>
17691 int
17692 main (void)
17693 {
17694 mbstate_t x; return sizeof x;
17695 ;
17696 return 0;
17697 }
17698 _ACEOF
17699 if ac_fn_c_try_compile "$LINENO"
17700 then :
17701 ac_cv_type_mbstate_t=yes
17702 else $as_nop
17703 ac_cv_type_mbstate_t=no
17704 fi
17705 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17706 fi
17707 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
17708 printf "%s\n" "$ac_cv_type_mbstate_t" >&6; }
17709 if test $ac_cv_type_mbstate_t = yes; then
17710
17711 printf "%s\n" "#define HAVE_MBSTATE_T 1" >>confdefs.h
17712
17713 else
17714
17715 printf "%s\n" "#define mbstate_t int" >>confdefs.h
17716
17717 fi
17718
17719
17720
17721 HAVE_FCHMODAT=1;
17722 HAVE_FSTATAT=1;
17723 HAVE_FUTIMENS=1;
17724 HAVE_GETUMASK=1;
17725 HAVE_LCHMOD=1;
17726 HAVE_LSTAT=1;
17727 HAVE_MKDIRAT=1;
17728 HAVE_MKFIFO=1;
17729 HAVE_MKFIFOAT=1;
17730 HAVE_MKNOD=1;
17731 HAVE_MKNODAT=1;
17732 HAVE_UTIMENSAT=1;
17733 REPLACE_FCHMODAT=0;
17734 REPLACE_FSTAT=0;
17735 REPLACE_FSTATAT=0;
17736 REPLACE_FUTIMENS=0;
17737 REPLACE_LSTAT=0;
17738 REPLACE_MKDIR=0;
17739 REPLACE_MKFIFO=0;
17740 REPLACE_MKFIFOAT=0;
17741 REPLACE_MKNOD=0;
17742 REPLACE_MKNODAT=0;
17743 REPLACE_STAT=0;
17744 REPLACE_UTIMENSAT=0;
17745
17746 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
17747 printf %s "checking whether stat file-mode macros are broken... " >&6; }
17748 if test ${ac_cv_header_stat_broken+y}
17749 then :
17750 printf %s "(cached) " >&6
17751 else $as_nop
17752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17753 /* end confdefs.h. */
17754 #include <sys/types.h>
17755 #include <sys/stat.h>
17756
17757 #if defined S_ISBLK && defined S_IFDIR
17758 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
17759 #endif
17760
17761 #if defined S_ISBLK && defined S_IFCHR
17762 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
17763 #endif
17764
17765 #if defined S_ISLNK && defined S_IFREG
17766 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
17767 #endif
17768
17769 #if defined S_ISSOCK && defined S_IFREG
17770 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
17771 #endif
17772
17773 _ACEOF
17774 if ac_fn_c_try_compile "$LINENO"
17775 then :
17776 ac_cv_header_stat_broken=no
17777 else $as_nop
17778 ac_cv_header_stat_broken=yes
17779 fi
17780 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17781 fi
17782 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
17783 printf "%s\n" "$ac_cv_header_stat_broken" >&6; }
17784 if test $ac_cv_header_stat_broken = yes; then
17785
17786 printf "%s\n" "#define STAT_MACROS_BROKEN 1" >>confdefs.h
17787
17788 fi
17789
17790
17791
17792 case "$host_os" in
17793 mingw*)
17794 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
17795 printf %s "checking for 64-bit off_t... " >&6; }
17796 if test ${gl_cv_type_off_t_64+y}
17797 then :
17798 printf %s "(cached) " >&6
17799 else $as_nop
17800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17801 /* end confdefs.h. */
17802 #include <sys/types.h>
17803 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
17804
17805 int
17806 main (void)
17807 {
17808
17809 ;
17810 return 0;
17811 }
17812 _ACEOF
17813 if ac_fn_c_try_compile "$LINENO"
17814 then :
17815 gl_cv_type_off_t_64=yes
17816 else $as_nop
17817 gl_cv_type_off_t_64=no
17818 fi
17819 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17820
17821 fi
17822 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
17823 printf "%s\n" "$gl_cv_type_off_t_64" >&6; }
17824 if test $gl_cv_type_off_t_64 = no; then
17825 WINDOWS_64_BIT_OFF_T=1
17826 else
17827 WINDOWS_64_BIT_OFF_T=0
17828 fi
17829 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit st_size" >&5
17830 printf %s "checking for 64-bit st_size... " >&6; }
17831 if test ${gl_cv_member_st_size_64+y}
17832 then :
17833 printf %s "(cached) " >&6
17834 else $as_nop
17835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17836 /* end confdefs.h. */
17837 #include <sys/types.h>
17838 struct stat buf;
17839 int verify_st_size_size[sizeof (buf.st_size) >= 8 ? 1 : -1];
17840
17841 int
17842 main (void)
17843 {
17844
17845 ;
17846 return 0;
17847 }
17848 _ACEOF
17849 if ac_fn_c_try_compile "$LINENO"
17850 then :
17851 gl_cv_member_st_size_64=yes
17852 else $as_nop
17853 gl_cv_member_st_size_64=no
17854 fi
17855 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17856
17857 fi
17858 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_member_st_size_64" >&5
17859 printf "%s\n" "$gl_cv_member_st_size_64" >&6; }
17860 if test $gl_cv_member_st_size_64 = no; then
17861 WINDOWS_64_BIT_ST_SIZE=1
17862 else
17863 WINDOWS_64_BIT_ST_SIZE=0
17864 fi
17865 ;;
17866 *)
17867 WINDOWS_64_BIT_OFF_T=0
17868 WINDOWS_64_BIT_ST_SIZE=0
17869 ;;
17870 esac
17871
17872
17873
17874
17875
17876
17877
17878
17879
17880
17881
17882
17883
17884
17885
17886 if test $gl_cv_have_include_next = yes; then
17887 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
17888 else
17889 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
17890 printf %s "checking absolute name of <sys/stat.h>... " >&6; }
17891 if test ${gl_cv_next_sys_stat_h+y}
17892 then :
17893 printf %s "(cached) " >&6
17894 else $as_nop
17895
17896 if test $ac_cv_header_sys_stat_h = yes; then
17897
17898
17899
17900
17901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17902 /* end confdefs.h. */
17903 #include <sys/stat.h>
17904 _ACEOF
17905 case "$host_os" in
17906 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17907 *) gl_absname_cpp="$ac_cpp" ;;
17908 esac
17909
17910 case "$host_os" in
17911 mingw*)
17912 gl_dirsep_regex='[/\\]'
17913 ;;
17914 *)
17915 gl_dirsep_regex='\/'
17916 ;;
17917 esac
17918 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17919 gl_header_literal_regex=`echo 'sys/stat.h' \
17920 | sed -e "$gl_make_literal_regex_sed"`
17921 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17922 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17923 s|^/[^/]|//&|
17924 p
17925 q
17926 }'
17927
17928 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17929 sed -n "$gl_absolute_header_sed"`
17930
17931 gl_header=$gl_cv_absolute_sys_stat_h
17932 gl_cv_next_sys_stat_h='"'$gl_header'"'
17933 else
17934 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
17935 fi
17936
17937
17938 fi
17939 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
17940 printf "%s\n" "$gl_cv_next_sys_stat_h" >&6; }
17941 fi
17942 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
17943
17944 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17945 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17946 gl_next_as_first_directive='<'sys/stat.h'>'
17947 else
17948 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17949 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
17950 fi
17951 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
17952
17953
17954
17955
17956
17957
17958
17959
17960 WINDOWS_STAT_TIMESPEC=0
17961
17962
17963
17964
17965
17966
17967
17968
17969 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
17970 #include <sys/stat.h>
17971 "
17972 if test "x$ac_cv_type_nlink_t" = xyes
17973 then :
17974
17975 else $as_nop
17976
17977 printf "%s\n" "#define nlink_t int" >>confdefs.h
17978
17979 fi
17980
17981
17982
17983
17984
17985
17986
17987
17988
17989
17990 case "$host_os" in
17991 mingw*)
17992 ac_fn_c_check_header_compile "$LINENO" "sdkddkver.h" "ac_cv_header_sdkddkver_h" "$ac_includes_default"
17993 if test "x$ac_cv_header_sdkddkver_h" = xyes
17994 then :
17995 printf "%s\n" "#define HAVE_SDKDDKVER_H 1" >>confdefs.h
17996
17997 fi
17998
17999 ;;
18000 esac
18001
18002
18003
18004
18005
18006
18007
18008 GL_GNULIB_FCHMODAT=0
18009
18010
18011
18012 GL_GNULIB_FSTAT=0
18013
18014
18015
18016 GL_GNULIB_FSTATAT=0
18017
18018
18019
18020 GL_GNULIB_FUTIMENS=0
18021
18022
18023
18024 GL_GNULIB_GETUMASK=0
18025
18026
18027
18028 GL_GNULIB_LCHMOD=0
18029
18030
18031
18032 GL_GNULIB_LSTAT=0
18033
18034
18035
18036 GL_GNULIB_MKDIR=0
18037
18038
18039
18040 GL_GNULIB_MKDIRAT=0
18041
18042
18043
18044 GL_GNULIB_MKFIFO=0
18045
18046
18047
18048 GL_GNULIB_MKFIFOAT=0
18049
18050
18051
18052 GL_GNULIB_MKNOD=0
18053
18054
18055
18056 GL_GNULIB_MKNODAT=0
18057
18058
18059
18060 GL_GNULIB_STAT=0
18061
18062
18063
18064 GL_GNULIB_UTIMENSAT=0
18065
18066
18067
18068 GL_GNULIB_OVERRIDES_STRUCT_STAT=0
18069
18070
18071
18072 GL_GNULIB_MDA_CHMOD=1
18073
18074
18075
18076 GL_GNULIB_MDA_MKDIR=1
18077
18078
18079
18080 GL_GNULIB_MDA_UMASK=1
18081
18082
18083
18084
18085
18086 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
18087 printf %s "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
18088 if test ${gl_cv_func_getcwd_null+y}
18089 then :
18090 printf %s "(cached) " >&6
18091 else $as_nop
18092 if test "$cross_compiling" = yes
18093 then :
18094 case "$host_os" in
18095 # Guess yes on glibc systems.
18096 *-gnu* | gnu*) gl_cv_func_getcwd_null="guessing yes";;
18097 # Guess yes on musl systems.
18098 *-musl*) gl_cv_func_getcwd_null="guessing yes";;
18099 # Guess yes on Cygwin.
18100 cygwin*) gl_cv_func_getcwd_null="guessing yes";;
18101 # If we don't know, obey --enable-cross-guesses.
18102 *) gl_cv_func_getcwd_null="$gl_cross_guess_normal";;
18103 esac
18104
18105 else $as_nop
18106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18107 /* end confdefs.h. */
18108
18109 # include <stdlib.h>
18110 # if HAVE_UNISTD_H
18111 # include <unistd.h>
18112 # else /* on Windows with MSVC */
18113 # include <direct.h>
18114 # endif
18115
18116
18117 $gl_mda_defines
18118
18119 # ifndef getcwd
18120 char *getcwd ();
18121 # endif
18122
18123 int
18124 main (void)
18125 {
18126
18127 #if defined _WIN32 && ! defined __CYGWIN__
18128 /* mingw cwd does not start with '/', but _getcwd does allocate.
18129 However, mingw fails to honor non-zero size. */
18130 #else
18131 if (chdir ("/") != 0)
18132 return 1;
18133 else
18134 {
18135 char *f = getcwd (NULL, 0);
18136 if (! f)
18137 return 2;
18138 if (f[0] != '/')
18139 { free (f); return 3; }
18140 if (f[1] != '\0')
18141 { free (f); return 4; }
18142 free (f);
18143 return 0;
18144 }
18145 #endif
18146
18147 ;
18148 return 0;
18149 }
18150 _ACEOF
18151 if ac_fn_c_try_run "$LINENO"
18152 then :
18153 gl_cv_func_getcwd_null=yes
18154 else $as_nop
18155 gl_cv_func_getcwd_null=no
18156 fi
18157 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18158 conftest.$ac_objext conftest.beam conftest.$ac_ext
18159 fi
18160
18161 fi
18162 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
18163 printf "%s\n" "$gl_cv_func_getcwd_null" >&6; }
18164
18165
18166 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
18167 printf %s "checking for getcwd with POSIX signature... " >&6; }
18168 if test ${gl_cv_func_getcwd_posix_signature+y}
18169 then :
18170 printf %s "(cached) " >&6
18171 else $as_nop
18172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18173 /* end confdefs.h. */
18174 #include <unistd.h>
18175
18176
18177 $gl_mda_defines
18178
18179 int
18180 main (void)
18181 {
18182 extern
18183 #ifdef __cplusplus
18184 "C"
18185 #endif
18186 char *getcwd (char *, size_t);
18187
18188 ;
18189 return 0;
18190 }
18191
18192 _ACEOF
18193 if ac_fn_c_try_compile "$LINENO"
18194 then :
18195 gl_cv_func_getcwd_posix_signature=yes
18196 else $as_nop
18197 gl_cv_func_getcwd_posix_signature=no
18198 fi
18199 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18200
18201 fi
18202 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
18203 printf "%s\n" "$gl_cv_func_getcwd_posix_signature" >&6; }
18204
18205
18206 HAVE_DECL_FCLOSEALL=1;
18207 HAVE_DECL_FPURGE=1;
18208 HAVE_DECL_FSEEKO=1;
18209 HAVE_DECL_FTELLO=1;
18210 HAVE_DECL_GETDELIM=1;
18211 HAVE_DECL_GETLINE=1;
18212 HAVE_DECL_OBSTACK_PRINTF=1;
18213 HAVE_DECL_SNPRINTF=1;
18214 HAVE_DECL_VSNPRINTF=1;
18215 HAVE_DPRINTF=1;
18216 HAVE_FSEEKO=1;
18217 HAVE_FTELLO=1;
18218 HAVE_PCLOSE=1;
18219 HAVE_POPEN=1;
18220 HAVE_RENAMEAT=1;
18221 HAVE_VASPRINTF=1;
18222 HAVE_VDPRINTF=1;
18223 REPLACE_DPRINTF=0;
18224 REPLACE_FCLOSE=0;
18225 REPLACE_FDOPEN=0;
18226 REPLACE_FFLUSH=0;
18227 REPLACE_FOPEN=0;
18228 REPLACE_FOPEN_FOR_FOPEN_GNU=0;
18229 REPLACE_FPRINTF=0;
18230 REPLACE_FPURGE=0;
18231 REPLACE_FREOPEN=0;
18232 REPLACE_FSEEK=0;
18233 REPLACE_FSEEKO=0;
18234 REPLACE_FTELL=0;
18235 REPLACE_FTELLO=0;
18236 REPLACE_GETDELIM=0;
18237 REPLACE_GETLINE=0;
18238 REPLACE_OBSTACK_PRINTF=0;
18239 REPLACE_PERROR=0;
18240 REPLACE_POPEN=0;
18241 REPLACE_PRINTF=0;
18242 REPLACE_REMOVE=0;
18243 REPLACE_RENAME=0;
18244 REPLACE_RENAMEAT=0;
18245 REPLACE_SNPRINTF=0;
18246 REPLACE_SPRINTF=0;
18247 REPLACE_STDIO_READ_FUNCS=0;
18248 REPLACE_STDIO_WRITE_FUNCS=0;
18249 REPLACE_TMPFILE=0;
18250 REPLACE_VASPRINTF=0;
18251 REPLACE_VDPRINTF=0;
18252 REPLACE_VFPRINTF=0;
18253 REPLACE_VPRINTF=0;
18254 REPLACE_VSNPRINTF=0;
18255 REPLACE_VSPRINTF=0;
18256
18257 ac_fn_check_decl "$LINENO" "getdelim" "ac_cv_have_decl_getdelim" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
18258 if test "x$ac_cv_have_decl_getdelim" = xyes
18259 then :
18260 ac_have_decl=1
18261 else $as_nop
18262 ac_have_decl=0
18263 fi
18264 printf "%s\n" "#define HAVE_DECL_GETDELIM $ac_have_decl" >>confdefs.h
18265
18266
18267
18268
18269 GL_GNULIB_DPRINTF=0
18270
18271
18272
18273 GL_GNULIB_FCLOSE=0
18274
18275
18276
18277 GL_GNULIB_FDOPEN=0
18278
18279
18280
18281 GL_GNULIB_FFLUSH=0
18282
18283
18284
18285 GL_GNULIB_FGETC=0
18286
18287
18288
18289 GL_GNULIB_FGETS=0
18290
18291
18292
18293 GL_GNULIB_FOPEN=0
18294
18295
18296
18297 GL_GNULIB_FOPEN_GNU=0
18298
18299
18300
18301 GL_GNULIB_FPRINTF=0
18302
18303
18304
18305 GL_GNULIB_FPRINTF_POSIX=0
18306
18307
18308
18309 GL_GNULIB_FPURGE=0
18310
18311
18312
18313 GL_GNULIB_FPUTC=0
18314
18315
18316
18317 GL_GNULIB_FPUTS=0
18318
18319
18320
18321 GL_GNULIB_FREAD=0
18322
18323
18324
18325 GL_GNULIB_FREOPEN=0
18326
18327
18328
18329 GL_GNULIB_FSCANF=0
18330
18331
18332
18333 GL_GNULIB_FSEEK=0
18334
18335
18336
18337 GL_GNULIB_FSEEKO=0
18338
18339
18340
18341 GL_GNULIB_FTELL=0
18342
18343
18344
18345 GL_GNULIB_FTELLO=0
18346
18347
18348
18349 GL_GNULIB_FWRITE=0
18350
18351
18352
18353 GL_GNULIB_GETC=0
18354
18355
18356
18357 GL_GNULIB_GETCHAR=0
18358
18359
18360
18361 GL_GNULIB_GETDELIM=0
18362
18363
18364
18365 GL_GNULIB_GETLINE=0
18366
18367
18368
18369 GL_GNULIB_OBSTACK_PRINTF=0
18370
18371
18372
18373 GL_GNULIB_OBSTACK_PRINTF_POSIX=0
18374
18375
18376
18377 GL_GNULIB_PCLOSE=0
18378
18379
18380
18381 GL_GNULIB_PERROR=0
18382
18383
18384
18385 GL_GNULIB_POPEN=0
18386
18387
18388
18389 GL_GNULIB_PRINTF=0
18390
18391
18392
18393 GL_GNULIB_PRINTF_POSIX=0
18394
18395
18396
18397 GL_GNULIB_PUTC=0
18398
18399
18400
18401 GL_GNULIB_PUTCHAR=0
18402
18403
18404
18405 GL_GNULIB_PUTS=0
18406
18407
18408
18409 GL_GNULIB_REMOVE=0
18410
18411
18412
18413 GL_GNULIB_RENAME=0
18414
18415
18416
18417 GL_GNULIB_RENAMEAT=0
18418
18419
18420
18421 GL_GNULIB_SCANF=0
18422
18423
18424
18425 GL_GNULIB_SNPRINTF=0
18426
18427
18428
18429 GL_GNULIB_SPRINTF_POSIX=0
18430
18431
18432
18433 GL_GNULIB_STDIO_H_NONBLOCKING=0
18434
18435
18436
18437 GL_GNULIB_STDIO_H_SIGPIPE=0
18438
18439
18440
18441 GL_GNULIB_TMPFILE=0
18442
18443
18444
18445 GL_GNULIB_VASPRINTF=0
18446
18447
18448
18449 GL_GNULIB_VFSCANF=0
18450
18451
18452
18453 GL_GNULIB_VSCANF=0
18454
18455
18456
18457 GL_GNULIB_VDPRINTF=0
18458
18459
18460
18461 GL_GNULIB_VFPRINTF=0
18462
18463
18464
18465 GL_GNULIB_VFPRINTF_POSIX=0
18466
18467
18468
18469 GL_GNULIB_VPRINTF=0
18470
18471
18472
18473 GL_GNULIB_VPRINTF_POSIX=0
18474
18475
18476
18477 GL_GNULIB_VSNPRINTF=0
18478
18479
18480
18481 GL_GNULIB_VSPRINTF_POSIX=0
18482
18483
18484
18485 GL_GNULIB_MDA_FCLOSEALL=1
18486
18487
18488
18489 GL_GNULIB_MDA_FDOPEN=1
18490
18491
18492
18493 GL_GNULIB_MDA_FILENO=1
18494
18495
18496
18497 GL_GNULIB_MDA_GETW=1
18498
18499
18500
18501 GL_GNULIB_MDA_PUTW=1
18502
18503
18504
18505 GL_GNULIB_MDA_TEMPNAM=1
18506
18507
18508
18509
18510 ac_fn_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
18511 if test "x$ac_cv_have_decl_getdtablesize" = xyes
18512 then :
18513 ac_have_decl=1
18514 else $as_nop
18515 ac_have_decl=0
18516 fi
18517 printf "%s\n" "#define HAVE_DECL_GETDTABLESIZE $ac_have_decl" >>confdefs.h
18518
18519 ac_fn_check_decl "$LINENO" "getline" "ac_cv_have_decl_getline" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
18520 if test "x$ac_cv_have_decl_getline" = xyes
18521 then :
18522 ac_have_decl=1
18523 else $as_nop
18524 ac_have_decl=0
18525 fi
18526 printf "%s\n" "#define HAVE_DECL_GETLINE $ac_have_decl" >>confdefs.h
18527
18528
18529
18530
18531
18532
18533
18534
18535
18536
18537
18538
18539
18540
18541
18542 if test $gl_cv_have_include_next = yes; then
18543 gl_cv_next_getopt_h='<'getopt.h'>'
18544 else
18545 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
18546 printf %s "checking absolute name of <getopt.h>... " >&6; }
18547 if test ${gl_cv_next_getopt_h+y}
18548 then :
18549 printf %s "(cached) " >&6
18550 else $as_nop
18551
18552 if test $ac_cv_header_getopt_h = yes; then
18553
18554
18555
18556
18557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18558 /* end confdefs.h. */
18559 #include <getopt.h>
18560 _ACEOF
18561 case "$host_os" in
18562 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18563 *) gl_absname_cpp="$ac_cpp" ;;
18564 esac
18565
18566 case "$host_os" in
18567 mingw*)
18568 gl_dirsep_regex='[/\\]'
18569 ;;
18570 *)
18571 gl_dirsep_regex='\/'
18572 ;;
18573 esac
18574 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18575 gl_header_literal_regex=`echo 'getopt.h' \
18576 | sed -e "$gl_make_literal_regex_sed"`
18577 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18578 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18579 s|^/[^/]|//&|
18580 p
18581 q
18582 }'
18583
18584 gl_cv_absolute_getopt_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18585 sed -n "$gl_absolute_header_sed"`
18586
18587 gl_header=$gl_cv_absolute_getopt_h
18588 gl_cv_next_getopt_h='"'$gl_header'"'
18589 else
18590 gl_cv_next_getopt_h='<'getopt.h'>'
18591 fi
18592
18593
18594 fi
18595 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
18596 printf "%s\n" "$gl_cv_next_getopt_h" >&6; }
18597 fi
18598 NEXT_GETOPT_H=$gl_cv_next_getopt_h
18599
18600 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18601 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18602 gl_next_as_first_directive='<'getopt.h'>'
18603 else
18604 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18605 gl_next_as_first_directive=$gl_cv_next_getopt_h
18606 fi
18607 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
18608
18609
18610
18611
18612 if test $ac_cv_header_getopt_h = yes; then
18613 HAVE_GETOPT_H=1
18614 else
18615 HAVE_GETOPT_H=0
18616 fi
18617
18618
18619 gl_replace_getopt=
18620
18621 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
18622 for ac_header in getopt.h
18623 do :
18624 ac_fn_c_check_header_compile "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
18625 if test "x$ac_cv_header_getopt_h" = xyes
18626 then :
18627 printf "%s\n" "#define HAVE_GETOPT_H 1" >>confdefs.h
18628
18629 else $as_nop
18630 gl_replace_getopt=yes
18631 fi
18632
18633 done
18634 fi
18635
18636 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
18637
18638 for ac_func in getopt_long_only
18639 do :
18640 ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
18641 if test "x$ac_cv_func_getopt_long_only" = xyes
18642 then :
18643 printf "%s\n" "#define HAVE_GETOPT_LONG_ONLY 1" >>confdefs.h
18644
18645 else $as_nop
18646 gl_replace_getopt=yes
18647 fi
18648
18649 done
18650 fi
18651
18652 if test -z "$gl_replace_getopt"; then
18653 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
18654 printf %s "checking whether getopt is POSIX compatible... " >&6; }
18655 if test ${gl_cv_func_getopt_posix+y}
18656 then :
18657 printf %s "(cached) " >&6
18658 else $as_nop
18659
18660 if test $cross_compiling = no; then
18661 if test "$cross_compiling" = yes
18662 then :
18663 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18664 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
18665 as_fn_error $? "cannot run test program while cross compiling
18666 See \`config.log' for more details" "$LINENO" 5; }
18667 else $as_nop
18668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18669 /* end confdefs.h. */
18670
18671 #include <unistd.h>
18672 #include <stdlib.h>
18673 #include <string.h>
18674
18675 int
18676 main ()
18677 {
18678 static char program[] = "program";
18679 static char a[] = "-a";
18680 static char foo[] = "foo";
18681 static char bar[] = "bar";
18682 char *argv[] = { program, a, foo, bar, NULL };
18683 int c;
18684
18685 c = getopt (4, argv, "ab");
18686 if (!(c == 'a'))
18687 return 1;
18688 c = getopt (4, argv, "ab");
18689 if (!(c == -1))
18690 return 2;
18691 if (!(optind == 2))
18692 return 3;
18693 return 0;
18694 }
18695
18696 _ACEOF
18697 if ac_fn_c_try_run "$LINENO"
18698 then :
18699 gl_cv_func_getopt_posix=maybe
18700 else $as_nop
18701 gl_cv_func_getopt_posix=no
18702 fi
18703 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18704 conftest.$ac_objext conftest.beam conftest.$ac_ext
18705 fi
18706
18707 if test $gl_cv_func_getopt_posix = maybe; then
18708 if test "$cross_compiling" = yes
18709 then :
18710 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18711 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
18712 as_fn_error $? "cannot run test program while cross compiling
18713 See \`config.log' for more details" "$LINENO" 5; }
18714 else $as_nop
18715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18716 /* end confdefs.h. */
18717
18718 #include <unistd.h>
18719 #include <stdlib.h>
18720 #include <string.h>
18721
18722 int
18723 main ()
18724 {
18725 static char program[] = "program";
18726 static char donald[] = "donald";
18727 static char p[] = "-p";
18728 static char billy[] = "billy";
18729 static char duck[] = "duck";
18730 static char a[] = "-a";
18731 static char bar[] = "bar";
18732 char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
18733 int c;
18734
18735 c = getopt (7, argv, "+abp:q:");
18736 if (!(c == -1))
18737 return 4;
18738 if (!(strcmp (argv[0], "program") == 0))
18739 return 5;
18740 if (!(strcmp (argv[1], "donald") == 0))
18741 return 6;
18742 if (!(strcmp (argv[2], "-p") == 0))
18743 return 7;
18744 if (!(strcmp (argv[3], "billy") == 0))
18745 return 8;
18746 if (!(strcmp (argv[4], "duck") == 0))
18747 return 9;
18748 if (!(strcmp (argv[5], "-a") == 0))
18749 return 10;
18750 if (!(strcmp (argv[6], "bar") == 0))
18751 return 11;
18752 if (!(optind == 1))
18753 return 12;
18754 return 0;
18755 }
18756
18757 _ACEOF
18758 if ac_fn_c_try_run "$LINENO"
18759 then :
18760 gl_cv_func_getopt_posix=maybe
18761 else $as_nop
18762 gl_cv_func_getopt_posix=no
18763 fi
18764 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18765 conftest.$ac_objext conftest.beam conftest.$ac_ext
18766 fi
18767
18768 fi
18769 if test $gl_cv_func_getopt_posix = maybe; then
18770 if test "$cross_compiling" = yes
18771 then :
18772 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18773 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
18774 as_fn_error $? "cannot run test program while cross compiling
18775 See \`config.log' for more details" "$LINENO" 5; }
18776 else $as_nop
18777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18778 /* end confdefs.h. */
18779
18780 #include <unistd.h>
18781 #include <stdlib.h>
18782 #include <string.h>
18783
18784 int
18785 main ()
18786 {
18787 static char program[] = "program";
18788 static char ab[] = "-ab";
18789 char *argv[3] = { program, ab, NULL };
18790 if (getopt (2, argv, "ab:") != 'a')
18791 return 13;
18792 if (getopt (2, argv, "ab:") != '?')
18793 return 14;
18794 if (optopt != 'b')
18795 return 15;
18796 if (optind != 2)
18797 return 16;
18798 return 0;
18799 }
18800
18801 _ACEOF
18802 if ac_fn_c_try_run "$LINENO"
18803 then :
18804 gl_cv_func_getopt_posix=yes
18805 else $as_nop
18806 gl_cv_func_getopt_posix=no
18807 fi
18808 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18809 conftest.$ac_objext conftest.beam conftest.$ac_ext
18810 fi
18811
18812 fi
18813 else
18814 case "$host_os" in
18815 darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
18816 *) gl_cv_func_getopt_posix="guessing yes";;
18817 esac
18818 fi
18819
18820 fi
18821 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
18822 printf "%s\n" "$gl_cv_func_getopt_posix" >&6; }
18823 case "$gl_cv_func_getopt_posix" in
18824 *no) gl_replace_getopt=yes ;;
18825 esac
18826 fi
18827
18828 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
18829 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
18830 printf %s "checking for working GNU getopt function... " >&6; }
18831 if test ${gl_cv_func_getopt_gnu+y}
18832 then :
18833 printf %s "(cached) " >&6
18834 else $as_nop
18835 # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
18836 # optstring is necessary for programs like m4 that have POSIX-mandated
18837 # semantics for supporting options interspersed with files.
18838 # Also, since getopt_long is a GNU extension, we require optind=0.
18839 # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
18840 # so take care to revert to the correct (non-)export state.
18841 gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
18842 case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
18843 xx) gl_had_POSIXLY_CORRECT=exported ;;
18844 x) gl_had_POSIXLY_CORRECT=yes ;;
18845 *) gl_had_POSIXLY_CORRECT= ;;
18846 esac
18847 POSIXLY_CORRECT=1
18848 export POSIXLY_CORRECT
18849 if test "$cross_compiling" = yes
18850 then :
18851 gl_cv_func_getopt_gnu="$gl_cross_guess_normal"
18852
18853 else $as_nop
18854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18855 /* end confdefs.h. */
18856 #include <getopt.h>
18857 #include <stddef.h>
18858 #include <string.h>
18859
18860 #include <stdlib.h>
18861 #if defined __MACH__ && defined __APPLE__
18862 /* Avoid a crash on Mac OS X. */
18863 #include <mach/mach.h>
18864 #include <mach/mach_error.h>
18865 #include <mach/thread_status.h>
18866 #include <mach/exception.h>
18867 #include <mach/task.h>
18868 #include <pthread.h>
18869 /* The exception port on which our thread listens. */
18870 static mach_port_t our_exception_port;
18871 /* The main function of the thread listening for exceptions of type
18872 EXC_BAD_ACCESS. */
18873 static void *
18874 mach_exception_thread (void *arg)
18875 {
18876 /* Buffer for a message to be received. */
18877 struct {
18878 mach_msg_header_t head;
18879 mach_msg_body_t msgh_body;
18880 char data[1024];
18881 } msg;
18882 mach_msg_return_t retval;
18883 /* Wait for a message on the exception port. */
18884 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
18885 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
18886 if (retval != MACH_MSG_SUCCESS)
18887 abort ();
18888 exit (1);
18889 }
18890 static void
18891 nocrash_init (void)
18892 {
18893 mach_port_t self = mach_task_self ();
18894 /* Allocate a port on which the thread shall listen for exceptions. */
18895 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
18896 == KERN_SUCCESS) {
18897 /* See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
18898 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
18899 MACH_MSG_TYPE_MAKE_SEND)
18900 == KERN_SUCCESS) {
18901 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
18902 for us. */
18903 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
18904 /* Create the thread listening on the exception port. */
18905 pthread_attr_t attr;
18906 pthread_t thread;
18907 if (pthread_attr_init (&attr) == 0
18908 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
18909 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
18910 pthread_attr_destroy (&attr);
18911 /* Replace the exception port info for these exceptions with our own.
18912 Note that we replace the exception port for the entire task, not only
18913 for a particular thread. This has the effect that when our exception
18914 port gets the message, the thread specific exception port has already
18915 been asked, and we don't need to bother about it.
18916 See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
18917 task_set_exception_ports (self, mask, our_exception_port,
18918 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
18919 }
18920 }
18921 }
18922 }
18923 #elif defined _WIN32 && ! defined __CYGWIN__
18924 /* Avoid a crash on native Windows. */
18925 #define WIN32_LEAN_AND_MEAN
18926 #include <windows.h>
18927 #include <winerror.h>
18928 static LONG WINAPI
18929 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
18930 {
18931 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
18932 {
18933 case EXCEPTION_ACCESS_VIOLATION:
18934 case EXCEPTION_IN_PAGE_ERROR:
18935 case EXCEPTION_STACK_OVERFLOW:
18936 case EXCEPTION_GUARD_PAGE:
18937 case EXCEPTION_PRIV_INSTRUCTION:
18938 case EXCEPTION_ILLEGAL_INSTRUCTION:
18939 case EXCEPTION_DATATYPE_MISALIGNMENT:
18940 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
18941 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
18942 exit (1);
18943 }
18944 return EXCEPTION_CONTINUE_SEARCH;
18945 }
18946 static void
18947 nocrash_init (void)
18948 {
18949 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
18950 }
18951 #else
18952 /* Avoid a crash on POSIX systems. */
18953 #include <signal.h>
18954 #include <unistd.h>
18955 /* A POSIX signal handler. */
18956 static void
18957 exception_handler (int sig)
18958 {
18959 _exit (1);
18960 }
18961 static void
18962 nocrash_init (void)
18963 {
18964 #ifdef SIGSEGV
18965 signal (SIGSEGV, exception_handler);
18966 #endif
18967 #ifdef SIGBUS
18968 signal (SIGBUS, exception_handler);
18969 #endif
18970 }
18971 #endif
18972
18973
18974 int
18975 main (void)
18976 {
18977
18978 int result = 0;
18979
18980 nocrash_init();
18981
18982 /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
18983 and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
18984 OSF/1 5.1, Solaris 10. */
18985 {
18986 static char conftest[] = "conftest";
18987 static char plus[] = "-+";
18988 char *argv[3] = { conftest, plus, NULL };
18989 opterr = 0;
18990 if (getopt (2, argv, "+a") != '?')
18991 result |= 1;
18992 }
18993 /* This code succeeds on glibc 2.8, mingw,
18994 and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
18995 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */
18996 {
18997 static char program[] = "program";
18998 static char p[] = "-p";
18999 static char foo[] = "foo";
19000 static char bar[] = "bar";
19001 char *argv[] = { program, p, foo, bar, NULL };
19002
19003 optind = 1;
19004 if (getopt (4, argv, "p::") != 'p')
19005 result |= 2;
19006 else if (optarg != NULL)
19007 result |= 4;
19008 else if (getopt (4, argv, "p::") != -1)
19009 result |= 6;
19010 else if (optind != 2)
19011 result |= 8;
19012 }
19013 /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */
19014 {
19015 static char program[] = "program";
19016 static char foo[] = "foo";
19017 static char p[] = "-p";
19018 char *argv[] = { program, foo, p, NULL };
19019 optind = 0;
19020 if (getopt (3, argv, "-p") != 1)
19021 result |= 16;
19022 else if (getopt (3, argv, "-p") != 'p')
19023 result |= 16;
19024 }
19025 /* This code fails on glibc 2.11. */
19026 {
19027 static char program[] = "program";
19028 static char b[] = "-b";
19029 static char a[] = "-a";
19030 char *argv[] = { program, b, a, NULL };
19031 optind = opterr = 0;
19032 if (getopt (3, argv, "+:a:b") != 'b')
19033 result |= 32;
19034 else if (getopt (3, argv, "+:a:b") != ':')
19035 result |= 32;
19036 }
19037 /* This code dumps core on glibc 2.14. */
19038 {
19039 static char program[] = "program";
19040 static char w[] = "-W";
19041 static char dummy[] = "dummy";
19042 char *argv[] = { program, w, dummy, NULL };
19043 optind = opterr = 1;
19044 if (getopt (3, argv, "W;") != 'W')
19045 result |= 64;
19046 }
19047 return result;
19048
19049 ;
19050 return 0;
19051 }
19052 _ACEOF
19053 if ac_fn_c_try_run "$LINENO"
19054 then :
19055 gl_cv_func_getopt_gnu=yes
19056 else $as_nop
19057 gl_cv_func_getopt_gnu=no
19058 fi
19059 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19060 conftest.$ac_objext conftest.beam conftest.$ac_ext
19061 fi
19062
19063 case $gl_had_POSIXLY_CORRECT in
19064 exported) ;;
19065 yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
19066 *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
19067 esac
19068
19069 fi
19070 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
19071 printf "%s\n" "$gl_cv_func_getopt_gnu" >&6; }
19072 if test "$gl_cv_func_getopt_gnu" != yes; then
19073 gl_replace_getopt=yes
19074 else
19075 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
19076 printf %s "checking for working GNU getopt_long function... " >&6; }
19077 if test ${gl_cv_func_getopt_long_gnu+y}
19078 then :
19079 printf %s "(cached) " >&6
19080 else $as_nop
19081 if test "$cross_compiling" = yes
19082 then :
19083 case "$host_os" in
19084 openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
19085 *) gl_cv_func_getopt_long_gnu="guessing yes";;
19086 esac
19087
19088 else $as_nop
19089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19090 /* end confdefs.h. */
19091 #include <getopt.h>
19092 #include <stddef.h>
19093 #include <string.h>
19094
19095 int
19096 main (void)
19097 {
19098 static const struct option long_options[] =
19099 {
19100 { "xtremely-",no_argument, NULL, 1003 },
19101 { "xtra", no_argument, NULL, 1001 },
19102 { "xtreme", no_argument, NULL, 1002 },
19103 { "xtremely", no_argument, NULL, 1003 },
19104 { NULL, 0, NULL, 0 }
19105 };
19106 /* This code fails on OpenBSD 5.0. */
19107 {
19108 static char program[] = "program";
19109 static char xtremel[] = "--xtremel";
19110 char *argv[] = { program, xtremel, NULL };
19111 int option_index;
19112 optind = 1; opterr = 0;
19113 if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
19114 return 1;
19115 }
19116 return 0;
19117
19118 ;
19119 return 0;
19120 }
19121 _ACEOF
19122 if ac_fn_c_try_run "$LINENO"
19123 then :
19124 gl_cv_func_getopt_long_gnu=yes
19125 else $as_nop
19126 gl_cv_func_getopt_long_gnu=no
19127 fi
19128 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19129 conftest.$ac_objext conftest.beam conftest.$ac_ext
19130 fi
19131
19132
19133 fi
19134 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
19135 printf "%s\n" "$gl_cv_func_getopt_long_gnu" >&6; }
19136 case "$gl_cv_func_getopt_long_gnu" in
19137 *yes) ;;
19138 *) gl_replace_getopt=yes ;;
19139 esac
19140 fi
19141 fi
19142
19143
19144
19145
19146
19147
19148
19149
19150 if test -z "$gl_pthreadlib_body_done"; then
19151 gl_pthread_api=no
19152 LIBPTHREAD=
19153 LIBPMULTITHREAD=
19154 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
19155 # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
19156 ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
19157 if test "x$ac_cv_header_pthread_h" = xyes
19158 then :
19159 gl_have_pthread_h=yes
19160 else $as_nop
19161 gl_have_pthread_h=no
19162 fi
19163
19164 if test "$gl_have_pthread_h" = yes; then
19165 # Other possible tests:
19166 # -lpthreads (FSU threads, PCthreads)
19167 # -lgthreads
19168 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
19169 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
19170 # the second one only in libpthread, and lock.c needs it.
19171 #
19172 # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
19173 # needs -pthread for some reason. See:
19174 # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
19175 save_LIBS=$LIBS
19176 for gl_pthread in '' '-pthread'; do
19177 LIBS="$LIBS $gl_pthread"
19178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19179 /* end confdefs.h. */
19180 #include <pthread.h>
19181 pthread_mutex_t m;
19182 pthread_mutexattr_t ma;
19183
19184 int
19185 main (void)
19186 {
19187 pthread_mutex_lock (&m);
19188 pthread_mutexattr_init (&ma);
19189 ;
19190 return 0;
19191 }
19192 _ACEOF
19193 if ac_fn_c_try_link "$LINENO"
19194 then :
19195 gl_pthread_api=yes
19196 LIBPTHREAD=$gl_pthread
19197 LIBPMULTITHREAD=$gl_pthread
19198 fi
19199 rm -f core conftest.err conftest.$ac_objext conftest.beam \
19200 conftest$ac_exeext conftest.$ac_ext
19201 LIBS=$save_LIBS
19202 test $gl_pthread_api = yes && break
19203 done
19204 echo "$as_me:19204: gl_pthread_api=$gl_pthread_api" >&5
19205 echo "$as_me:19205: LIBPTHREAD=$LIBPTHREAD" >&5
19206
19207 gl_pthread_in_glibc=no
19208 # On Linux with glibc >= 2.34, libc contains the fully functional
19209 # pthread functions.
19210 case "$host_os" in
19211 linux*)
19212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19213 /* end confdefs.h. */
19214 #include <features.h>
19215 #ifdef __GNU_LIBRARY__
19216 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 34) || (__GLIBC__ > 2)
19217 Lucky user
19218 #endif
19219 #endif
19220
19221 _ACEOF
19222 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19223 $EGREP "Lucky user" >/dev/null 2>&1
19224 then :
19225 gl_pthread_in_glibc=yes
19226 fi
19227 rm -rf conftest*
19228
19229 ;;
19230 esac
19231 echo "$as_me:19231: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&5
19232
19233 # Test for libpthread by looking for pthread_kill. (Not pthread_self,
19234 # since it is defined as a macro on OSF/1.)
19235 if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
19236 # The program links fine without libpthread. But it may actually
19237 # need to link with libpthread in order to create multiple threads.
19238 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
19239 printf %s "checking for pthread_kill in -lpthread... " >&6; }
19240 if test ${ac_cv_lib_pthread_pthread_kill+y}
19241 then :
19242 printf %s "(cached) " >&6
19243 else $as_nop
19244 ac_check_lib_save_LIBS=$LIBS
19245 LIBS="-lpthread $LIBS"
19246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19247 /* end confdefs.h. */
19248
19249 /* Override any GCC internal prototype to avoid an error.
19250 Use char because int might match the return type of a GCC
19251 builtin and then its argument prototype would still apply. */
19252 char pthread_kill ();
19253 int
19254 main (void)
19255 {
19256 return pthread_kill ();
19257 ;
19258 return 0;
19259 }
19260 _ACEOF
19261 if ac_fn_c_try_link "$LINENO"
19262 then :
19263 ac_cv_lib_pthread_pthread_kill=yes
19264 else $as_nop
19265 ac_cv_lib_pthread_pthread_kill=no
19266 fi
19267 rm -f core conftest.err conftest.$ac_objext conftest.beam \
19268 conftest$ac_exeext conftest.$ac_ext
19269 LIBS=$ac_check_lib_save_LIBS
19270 fi
19271 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
19272 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
19273 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
19274 then :
19275 if test $gl_pthread_in_glibc = yes; then
19276 LIBPMULTITHREAD=
19277 else
19278 LIBPMULTITHREAD=-lpthread
19279 # On Solaris and HP-UX, most pthread functions exist also in libc.
19280 # Therefore pthread_in_use() needs to actually try to create a
19281 # thread: pthread_create from libc will fail, whereas
19282 # pthread_create will actually create a thread.
19283 # On Solaris 10 or newer, this test is no longer needed, because
19284 # libc contains the fully functional pthread functions.
19285 case "$host_os" in
19286 solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
19287
19288 printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
19289
19290 esac
19291 fi
19292
19293 fi
19294
19295 elif test $gl_pthread_api != yes; then
19296 # Some library is needed. Try libpthread and libc_r.
19297 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
19298 printf %s "checking for pthread_kill in -lpthread... " >&6; }
19299 if test ${ac_cv_lib_pthread_pthread_kill+y}
19300 then :
19301 printf %s "(cached) " >&6
19302 else $as_nop
19303 ac_check_lib_save_LIBS=$LIBS
19304 LIBS="-lpthread $LIBS"
19305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19306 /* end confdefs.h. */
19307
19308 /* Override any GCC internal prototype to avoid an error.
19309 Use char because int might match the return type of a GCC
19310 builtin and then its argument prototype would still apply. */
19311 char pthread_kill ();
19312 int
19313 main (void)
19314 {
19315 return pthread_kill ();
19316 ;
19317 return 0;
19318 }
19319 _ACEOF
19320 if ac_fn_c_try_link "$LINENO"
19321 then :
19322 ac_cv_lib_pthread_pthread_kill=yes
19323 else $as_nop
19324 ac_cv_lib_pthread_pthread_kill=no
19325 fi
19326 rm -f core conftest.err conftest.$ac_objext conftest.beam \
19327 conftest$ac_exeext conftest.$ac_ext
19328 LIBS=$ac_check_lib_save_LIBS
19329 fi
19330 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
19331 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
19332 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
19333 then :
19334 gl_pthread_api=yes
19335 LIBPTHREAD=-lpthread
19336 LIBPMULTITHREAD=-lpthread
19337 fi
19338
19339 if test $gl_pthread_api != yes; then
19340 # For FreeBSD 4.
19341 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
19342 printf %s "checking for pthread_kill in -lc_r... " >&6; }
19343 if test ${ac_cv_lib_c_r_pthread_kill+y}
19344 then :
19345 printf %s "(cached) " >&6
19346 else $as_nop
19347 ac_check_lib_save_LIBS=$LIBS
19348 LIBS="-lc_r $LIBS"
19349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19350 /* end confdefs.h. */
19351
19352 /* Override any GCC internal prototype to avoid an error.
19353 Use char because int might match the return type of a GCC
19354 builtin and then its argument prototype would still apply. */
19355 char pthread_kill ();
19356 int
19357 main (void)
19358 {
19359 return pthread_kill ();
19360 ;
19361 return 0;
19362 }
19363 _ACEOF
19364 if ac_fn_c_try_link "$LINENO"
19365 then :
19366 ac_cv_lib_c_r_pthread_kill=yes
19367 else $as_nop
19368 ac_cv_lib_c_r_pthread_kill=no
19369 fi
19370 rm -f core conftest.err conftest.$ac_objext conftest.beam \
19371 conftest$ac_exeext conftest.$ac_ext
19372 LIBS=$ac_check_lib_save_LIBS
19373 fi
19374 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
19375 printf "%s\n" "$ac_cv_lib_c_r_pthread_kill" >&6; }
19376 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes
19377 then :
19378 gl_pthread_api=yes
19379 LIBPTHREAD=-lc_r
19380 LIBPMULTITHREAD=-lc_r
19381 fi
19382
19383 fi
19384 fi
19385 echo "$as_me:19385: LIBPMULTITHREAD=$LIBPMULTITHREAD" >&5
19386 fi
19387 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
19388 printf %s "checking whether POSIX threads API is available... " >&6; }
19389 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
19390 printf "%s\n" "$gl_pthread_api" >&6; }
19391
19392
19393 if test $gl_pthread_api = yes; then
19394
19395 printf "%s\n" "#define HAVE_PTHREAD_API 1" >>confdefs.h
19396
19397 fi
19398
19399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19400 /* end confdefs.h. */
19401 #include <sched.h>
19402 int
19403 main (void)
19404 {
19405 sched_yield ();
19406 ;
19407 return 0;
19408 }
19409 _ACEOF
19410 if ac_fn_c_try_link "$LINENO"
19411 then :
19412 LIB_SCHED_YIELD=
19413
19414 else $as_nop
19415 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
19416 printf %s "checking for sched_yield in -lrt... " >&6; }
19417 if test ${ac_cv_lib_rt_sched_yield+y}
19418 then :
19419 printf %s "(cached) " >&6
19420 else $as_nop
19421 ac_check_lib_save_LIBS=$LIBS
19422 LIBS="-lrt $LIBS"
19423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19424 /* end confdefs.h. */
19425
19426 /* Override any GCC internal prototype to avoid an error.
19427 Use char because int might match the return type of a GCC
19428 builtin and then its argument prototype would still apply. */
19429 char sched_yield ();
19430 int
19431 main (void)
19432 {
19433 return sched_yield ();
19434 ;
19435 return 0;
19436 }
19437 _ACEOF
19438 if ac_fn_c_try_link "$LINENO"
19439 then :
19440 ac_cv_lib_rt_sched_yield=yes
19441 else $as_nop
19442 ac_cv_lib_rt_sched_yield=no
19443 fi
19444 rm -f core conftest.err conftest.$ac_objext conftest.beam \
19445 conftest$ac_exeext conftest.$ac_ext
19446 LIBS=$ac_check_lib_save_LIBS
19447 fi
19448 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
19449 printf "%s\n" "$ac_cv_lib_rt_sched_yield" >&6; }
19450 if test "x$ac_cv_lib_rt_sched_yield" = xyes
19451 then :
19452 LIB_SCHED_YIELD=-lrt
19453 else $as_nop
19454 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
19455 printf %s "checking for sched_yield in -lposix4... " >&6; }
19456 if test ${ac_cv_lib_posix4_sched_yield+y}
19457 then :
19458 printf %s "(cached) " >&6
19459 else $as_nop
19460 ac_check_lib_save_LIBS=$LIBS
19461 LIBS="-lposix4 $LIBS"
19462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19463 /* end confdefs.h. */
19464
19465 /* Override any GCC internal prototype to avoid an error.
19466 Use char because int might match the return type of a GCC
19467 builtin and then its argument prototype would still apply. */
19468 char sched_yield ();
19469 int
19470 main (void)
19471 {
19472 return sched_yield ();
19473 ;
19474 return 0;
19475 }
19476 _ACEOF
19477 if ac_fn_c_try_link "$LINENO"
19478 then :
19479 ac_cv_lib_posix4_sched_yield=yes
19480 else $as_nop
19481 ac_cv_lib_posix4_sched_yield=no
19482 fi
19483 rm -f core conftest.err conftest.$ac_objext conftest.beam \
19484 conftest$ac_exeext conftest.$ac_ext
19485 LIBS=$ac_check_lib_save_LIBS
19486 fi
19487 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
19488 printf "%s\n" "$ac_cv_lib_posix4_sched_yield" >&6; }
19489 if test "x$ac_cv_lib_posix4_sched_yield" = xyes
19490 then :
19491 LIB_SCHED_YIELD=-lposix4
19492 fi
19493
19494 fi
19495
19496
19497 fi
19498 rm -f core conftest.err conftest.$ac_objext conftest.beam \
19499 conftest$ac_exeext conftest.$ac_ext
19500
19501
19502 gl_pthreadlib_body_done=done
19503 fi
19504
19505
19506
19507
19508
19509
19510
19511
19512 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setlocale (LC_ALL, NULL) is multithread-safe" >&5
19513 printf %s "checking whether setlocale (LC_ALL, NULL) is multithread-safe... " >&6; }
19514 if test ${gl_cv_func_setlocale_null_all_mtsafe+y}
19515 then :
19516 printf %s "(cached) " >&6
19517 else $as_nop
19518 case "$host_os" in
19519 # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin.
19520 *-musl* | darwin* | freebsd* | midnightbsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*)
19521 gl_cv_func_setlocale_null_all_mtsafe=no ;;
19522 # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
19523 *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*)
19524 gl_cv_func_setlocale_null_all_mtsafe=yes ;;
19525 # If we don't know, obey --enable-cross-guesses.
19526 *)
19527 gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;;
19528 esac
19529
19530 fi
19531 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_all_mtsafe" >&5
19532 printf "%s\n" "$gl_cv_func_setlocale_null_all_mtsafe" >&6; }
19533 case "$host_os" in
19534 mingw*) ;;
19535 *)
19536 if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
19537 gl_cv_func_setlocale_null_all_mtsafe="trivially yes"
19538 fi
19539 ;;
19540 esac
19541 case "$gl_cv_func_setlocale_null_all_mtsafe" in
19542 *yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;;
19543 *) SETLOCALE_NULL_ALL_MTSAFE=0 ;;
19544 esac
19545
19546 printf "%s\n" "#define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE" >>confdefs.h
19547
19548
19549 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setlocale (category, NULL) is multithread-safe" >&5
19550 printf %s "checking whether setlocale (category, NULL) is multithread-safe... " >&6; }
19551 if test ${gl_cv_func_setlocale_null_one_mtsafe+y}
19552 then :
19553 printf %s "(cached) " >&6
19554 else $as_nop
19555 case "$host_os" in
19556 # Guess no on OpenBSD, AIX.
19557 openbsd* | aix*)
19558 gl_cv_func_setlocale_null_one_mtsafe=no ;;
19559 # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows.
19560 *-gnu* | gnu* | *-musl* | darwin* | freebsd* | midnightbsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
19561 gl_cv_func_setlocale_null_one_mtsafe=yes ;;
19562 # If we don't know, obey --enable-cross-guesses.
19563 *)
19564 gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;;
19565 esac
19566
19567 fi
19568 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_one_mtsafe" >&5
19569 printf "%s\n" "$gl_cv_func_setlocale_null_one_mtsafe" >&6; }
19570 case "$host_os" in
19571 mingw*) ;;
19572 *)
19573 if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
19574 gl_cv_func_setlocale_null_one_mtsafe="trivially yes"
19575 fi
19576 ;;
19577 esac
19578 case "$gl_cv_func_setlocale_null_one_mtsafe" in
19579 *yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;;
19580 *) SETLOCALE_NULL_ONE_MTSAFE=0 ;;
19581 esac
19582
19583 printf "%s\n" "#define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE" >>confdefs.h
19584
19585
19586 if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
19587 case "$host_os" in
19588 mingw*) LIB_SETLOCALE_NULL= ;;
19589 *)
19590
19591
19592 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
19593 printf %s "checking whether imported symbols can be declared weak... " >&6; }
19594 if test ${gl_cv_have_weak+y}
19595 then :
19596 printf %s "(cached) " >&6
19597 else $as_nop
19598 case "$host_os" in
19599 cygwin*)
19600 gl_cv_have_weak="guessing no"
19601 ;;
19602 *)
19603 gl_cv_have_weak=no
19604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19605 /* end confdefs.h. */
19606 extern void xyzzy ();
19607 #pragma weak xyzzy
19608 int
19609 main (void)
19610 {
19611 xyzzy();
19612 ;
19613 return 0;
19614 }
19615 _ACEOF
19616 if ac_fn_c_try_link "$LINENO"
19617 then :
19618 gl_cv_have_weak=maybe
19619 fi
19620 rm -f core conftest.err conftest.$ac_objext conftest.beam \
19621 conftest$ac_exeext conftest.$ac_ext
19622 if test $gl_cv_have_weak = maybe; then
19623 if test "$cross_compiling" = yes
19624 then :
19625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19626 /* end confdefs.h. */
19627 #ifdef __ELF__
19628 Extensible Linking Format
19629 #endif
19630
19631 _ACEOF
19632 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19633 $EGREP "Extensible Linking Format" >/dev/null 2>&1
19634 then :
19635 gl_cv_have_weak="guessing yes"
19636 else $as_nop
19637 gl_cv_have_weak="guessing no"
19638 fi
19639 rm -rf conftest*
19640
19641
19642 else $as_nop
19643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19644 /* end confdefs.h. */
19645
19646 #include <stdio.h>
19647 #pragma weak fputs
19648 int main ()
19649 {
19650 return (fputs == NULL);
19651 }
19652 _ACEOF
19653 if ac_fn_c_try_run "$LINENO"
19654 then :
19655 gl_cv_have_weak=yes
19656 else $as_nop
19657 gl_cv_have_weak=no
19658 fi
19659 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19660 conftest.$ac_objext conftest.beam conftest.$ac_ext
19661 fi
19662
19663 fi
19664 ;;
19665 esac
19666 case " $LDFLAGS " in
19667 *" -static "*) gl_cv_have_weak=no ;;
19668 esac
19669 case "$gl_cv_have_weak" in
19670 *yes)
19671 case "$host_os" in
19672 freebsd* | dragonfly* | midnightbsd*)
19673 : > conftest1.c
19674 $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
19675 cat <<EOF > conftest2.c
19676 #include <pthread.h>
19677 #pragma weak pthread_mutexattr_gettype
19678 int main ()
19679 {
19680 return (pthread_mutexattr_gettype != NULL);
19681 }
19682 EOF
19683 $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
19684 || gl_cv_have_weak=no
19685 rm -f conftest1.c libempty.so conftest2.c conftest
19686 ;;
19687 esac
19688 ;;
19689 esac
19690
19691 fi
19692 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
19693 printf "%s\n" "$gl_cv_have_weak" >&6; }
19694 case "$gl_cv_have_weak" in
19695 *yes)
19696
19697 printf "%s\n" "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
19698
19699 ;;
19700 esac
19701
19702 case "$gl_cv_have_weak" in
19703 *yes) LIB_SETLOCALE_NULL= ;;
19704 *) LIB_SETLOCALE_NULL="$LIBPTHREAD" ;;
19705 esac
19706 ;;
19707 esac
19708 else
19709 LIB_SETLOCALE_NULL=
19710 fi
19711
19712
19713
19714
19715
19716
19717
19718
19719
19720
19721
19722
19723
19724 if test $gl_cv_have_include_next = yes; then
19725 gl_cv_next_limits_h='<'limits.h'>'
19726 else
19727 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
19728 printf %s "checking absolute name of <limits.h>... " >&6; }
19729 if test ${gl_cv_next_limits_h+y}
19730 then :
19731 printf %s "(cached) " >&6
19732 else $as_nop
19733
19734 if test $ac_cv_header_limits_h = yes; then
19735
19736
19737
19738
19739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19740 /* end confdefs.h. */
19741 #include <limits.h>
19742 _ACEOF
19743 case "$host_os" in
19744 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19745 *) gl_absname_cpp="$ac_cpp" ;;
19746 esac
19747
19748 case "$host_os" in
19749 mingw*)
19750 gl_dirsep_regex='[/\\]'
19751 ;;
19752 *)
19753 gl_dirsep_regex='\/'
19754 ;;
19755 esac
19756 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19757 gl_header_literal_regex=`echo 'limits.h' \
19758 | sed -e "$gl_make_literal_regex_sed"`
19759 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19760 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19761 s|^/[^/]|//&|
19762 p
19763 q
19764 }'
19765
19766 gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19767 sed -n "$gl_absolute_header_sed"`
19768
19769 gl_header=$gl_cv_absolute_limits_h
19770 gl_cv_next_limits_h='"'$gl_header'"'
19771 else
19772 gl_cv_next_limits_h='<'limits.h'>'
19773 fi
19774
19775
19776 fi
19777 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
19778 printf "%s\n" "$gl_cv_next_limits_h" >&6; }
19779 fi
19780 NEXT_LIMITS_H=$gl_cv_next_limits_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='<'limits.h'>'
19785 else
19786 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19787 gl_next_as_first_directive=$gl_cv_next_limits_h
19788 fi
19789 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
19790
19791
19792
19793
19794
19795 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether limits.h has WORD_BIT, BOOL_WIDTH etc." >&5
19796 printf %s "checking whether limits.h has WORD_BIT, BOOL_WIDTH etc.... " >&6; }
19797 if test ${gl_cv_header_limits_width+y}
19798 then :
19799 printf %s "(cached) " >&6
19800 else $as_nop
19801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19802 /* end confdefs.h. */
19803 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
19804 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
19805 #endif
19806 #include <limits.h>
19807 long long llm = LLONG_MAX;
19808 int wb = WORD_BIT;
19809 int ullw = ULLONG_WIDTH;
19810 int bw = BOOL_WIDTH;
19811
19812 int
19813 main (void)
19814 {
19815
19816 ;
19817 return 0;
19818 }
19819 _ACEOF
19820 if ac_fn_c_try_compile "$LINENO"
19821 then :
19822 gl_cv_header_limits_width=yes
19823 else $as_nop
19824 gl_cv_header_limits_width=no
19825 fi
19826 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19827 fi
19828 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5
19829 printf "%s\n" "$gl_cv_header_limits_width" >&6; }
19830 if test "$gl_cv_header_limits_width" = yes; then
19831 GL_GENERATE_LIMITS_H=false
19832 else
19833 GL_GENERATE_LIMITS_H=true
19834 fi
19835
19836
19837 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
19838 printf %s "checking for wint_t... " >&6; }
19839 if test ${gt_cv_c_wint_t+y}
19840 then :
19841 printf %s "(cached) " >&6
19842 else $as_nop
19843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19844 /* end confdefs.h. */
19845 #include <wchar.h>
19846 wint_t foo = (wchar_t)'\0';
19847 int
19848 main (void)
19849 {
19850
19851 ;
19852 return 0;
19853 }
19854 _ACEOF
19855 if ac_fn_c_try_compile "$LINENO"
19856 then :
19857 gt_cv_c_wint_t=yes
19858 else $as_nop
19859 gt_cv_c_wint_t=no
19860 fi
19861 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19862 fi
19863 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
19864 printf "%s\n" "$gt_cv_c_wint_t" >&6; }
19865 if test $gt_cv_c_wint_t = yes; then
19866
19867 printf "%s\n" "#define HAVE_WINT_T 1" >>confdefs.h
19868
19869
19870 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wint_t is large enough" >&5
19871 printf %s "checking whether wint_t is large enough... " >&6; }
19872 if test ${gl_cv_type_wint_t_large_enough+y}
19873 then :
19874 printf %s "(cached) " >&6
19875 else $as_nop
19876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19877 /* end confdefs.h. */
19878 #include <wchar.h>
19879 int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1];
19880
19881 int
19882 main (void)
19883 {
19884
19885 ;
19886 return 0;
19887 }
19888 _ACEOF
19889 if ac_fn_c_try_compile "$LINENO"
19890 then :
19891 gl_cv_type_wint_t_large_enough=yes
19892 else $as_nop
19893 gl_cv_type_wint_t_large_enough=no
19894 fi
19895 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19896 fi
19897 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wint_t_large_enough" >&5
19898 printf "%s\n" "$gl_cv_type_wint_t_large_enough" >&6; }
19899 if test $gl_cv_type_wint_t_large_enough = no; then
19900 GNULIBHEADERS_OVERRIDE_WINT_T=1
19901 else
19902 GNULIBHEADERS_OVERRIDE_WINT_T=0
19903 fi
19904 else
19905 GNULIBHEADERS_OVERRIDE_WINT_T=0
19906 fi
19907
19908
19909
19910 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler produces multi-arch binaries" >&5
19911 printf %s "checking whether the compiler produces multi-arch binaries... " >&6; }
19912 if test ${gl_cv_c_multiarch+y}
19913 then :
19914 printf %s "(cached) " >&6
19915 else $as_nop
19916 gl_cv_c_multiarch=no
19917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19918 /* end confdefs.h. */
19919 #ifndef __APPLE_CC__
19920 not a universal capable compiler
19921 #endif
19922 typedef int dummy;
19923
19924 _ACEOF
19925 if ac_fn_c_try_compile "$LINENO"
19926 then :
19927
19928 arch=
19929 prev=
19930 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
19931 if test -n "$prev"; then
19932 case $word in
19933 i?86 | x86_64 | ppc | ppc64 | arm | arm64)
19934 if test -z "$arch" || test "$arch" = "$word"; then
19935 arch="$word"
19936 else
19937 gl_cv_c_multiarch=yes
19938 fi
19939 ;;
19940 esac
19941 prev=
19942 else
19943 if test "x$word" = "x-arch"; then
19944 prev=arch
19945 fi
19946 fi
19947 done
19948
19949 fi
19950 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19951
19952 fi
19953 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_multiarch" >&5
19954 printf "%s\n" "$gl_cv_c_multiarch" >&6; }
19955 if test $gl_cv_c_multiarch = yes; then
19956 APPLE_UNIVERSAL_BUILD=1
19957 else
19958 APPLE_UNIVERSAL_BUILD=0
19959 fi
19960
19961
19962
19963
19964
19965
19966
19967
19968 printf "%s\n" "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
19969
19970
19971 printf "%s\n" "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
19972
19973
19974
19975 if test $ac_cv_header_wchar_h = yes; then
19976 HAVE_WCHAR_H=1
19977 else
19978 HAVE_WCHAR_H=0
19979 fi
19980
19981
19982
19983 if test $ac_cv_header_inttypes_h = yes; then
19984 HAVE_INTTYPES_H=1
19985 else
19986 HAVE_INTTYPES_H=0
19987 fi
19988
19989
19990
19991 if test $ac_cv_header_sys_types_h = yes; then
19992 HAVE_SYS_TYPES_H=1
19993 else
19994 HAVE_SYS_TYPES_H=0
19995 fi
19996
19997
19998
19999
20000
20001
20002
20003
20004
20005
20006
20007 if test $gl_cv_have_include_next = yes; then
20008 gl_cv_next_stdint_h='<'stdint.h'>'
20009 else
20010 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
20011 printf %s "checking absolute name of <stdint.h>... " >&6; }
20012 if test ${gl_cv_next_stdint_h+y}
20013 then :
20014 printf %s "(cached) " >&6
20015 else $as_nop
20016
20017 if test $ac_cv_header_stdint_h = yes; then
20018
20019
20020
20021
20022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20023 /* end confdefs.h. */
20024 #include <stdint.h>
20025 _ACEOF
20026 case "$host_os" in
20027 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20028 *) gl_absname_cpp="$ac_cpp" ;;
20029 esac
20030
20031 case "$host_os" in
20032 mingw*)
20033 gl_dirsep_regex='[/\\]'
20034 ;;
20035 *)
20036 gl_dirsep_regex='\/'
20037 ;;
20038 esac
20039 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20040 gl_header_literal_regex=`echo 'stdint.h' \
20041 | sed -e "$gl_make_literal_regex_sed"`
20042 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20043 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20044 s|^/[^/]|//&|
20045 p
20046 q
20047 }'
20048
20049 gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20050 sed -n "$gl_absolute_header_sed"`
20051
20052 gl_header=$gl_cv_absolute_stdint_h
20053 gl_cv_next_stdint_h='"'$gl_header'"'
20054 else
20055 gl_cv_next_stdint_h='<'stdint.h'>'
20056 fi
20057
20058
20059 fi
20060 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
20061 printf "%s\n" "$gl_cv_next_stdint_h" >&6; }
20062 fi
20063 NEXT_STDINT_H=$gl_cv_next_stdint_h
20064
20065 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20066 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20067 gl_next_as_first_directive='<'stdint.h'>'
20068 else
20069 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20070 gl_next_as_first_directive=$gl_cv_next_stdint_h
20071 fi
20072 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
20073
20074
20075
20076
20077 if test $ac_cv_header_stdint_h = yes; then
20078 HAVE_STDINT_H=1
20079 else
20080 HAVE_STDINT_H=0
20081 fi
20082
20083
20084 if test $ac_cv_header_stdint_h = yes; then
20085 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
20086 printf %s "checking whether stdint.h conforms to C99... " >&6; }
20087 if test ${gl_cv_header_working_stdint_h+y}
20088 then :
20089 printf %s "(cached) " >&6
20090 else $as_nop
20091 gl_cv_header_working_stdint_h=no
20092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20093 /* end confdefs.h. */
20094
20095
20096 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
20097 #define __STDC_CONSTANT_MACROS 1
20098 #define __STDC_LIMIT_MACROS 1
20099 #include <stdint.h>
20100 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
20101 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
20102 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
20103 #endif
20104
20105
20106 #include <stddef.h>
20107 #include <signal.h>
20108 #if HAVE_WCHAR_H
20109 # include <wchar.h>
20110 #endif
20111
20112
20113 #ifdef INT8_MAX
20114 int8_t a1 = INT8_MAX;
20115 int8_t a1min = INT8_MIN;
20116 #endif
20117 #ifdef INT16_MAX
20118 int16_t a2 = INT16_MAX;
20119 int16_t a2min = INT16_MIN;
20120 #endif
20121 #ifdef INT32_MAX
20122 int32_t a3 = INT32_MAX;
20123 int32_t a3min = INT32_MIN;
20124 #endif
20125 #ifdef INT64_MAX
20126 int64_t a4 = INT64_MAX;
20127 int64_t a4min = INT64_MIN;
20128 #endif
20129 #ifdef UINT8_MAX
20130 uint8_t b1 = UINT8_MAX;
20131 #else
20132 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
20133 #endif
20134 #ifdef UINT16_MAX
20135 uint16_t b2 = UINT16_MAX;
20136 #endif
20137 #ifdef UINT32_MAX
20138 uint32_t b3 = UINT32_MAX;
20139 #endif
20140 #ifdef UINT64_MAX
20141 uint64_t b4 = UINT64_MAX;
20142 #endif
20143 int_least8_t c1 = INT8_C (0x7f);
20144 int_least8_t c1max = INT_LEAST8_MAX;
20145 int_least8_t c1min = INT_LEAST8_MIN;
20146 int_least16_t c2 = INT16_C (0x7fff);
20147 int_least16_t c2max = INT_LEAST16_MAX;
20148 int_least16_t c2min = INT_LEAST16_MIN;
20149 int_least32_t c3 = INT32_C (0x7fffffff);
20150 int_least32_t c3max = INT_LEAST32_MAX;
20151 int_least32_t c3min = INT_LEAST32_MIN;
20152 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
20153 int_least64_t c4max = INT_LEAST64_MAX;
20154 int_least64_t c4min = INT_LEAST64_MIN;
20155 uint_least8_t d1 = UINT8_C (0xff);
20156 uint_least8_t d1max = UINT_LEAST8_MAX;
20157 uint_least16_t d2 = UINT16_C (0xffff);
20158 uint_least16_t d2max = UINT_LEAST16_MAX;
20159 uint_least32_t d3 = UINT32_C (0xffffffff);
20160 uint_least32_t d3max = UINT_LEAST32_MAX;
20161 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
20162 uint_least64_t d4max = UINT_LEAST64_MAX;
20163 int_fast8_t e1 = INT_FAST8_MAX;
20164 int_fast8_t e1min = INT_FAST8_MIN;
20165 int_fast16_t e2 = INT_FAST16_MAX;
20166 int_fast16_t e2min = INT_FAST16_MIN;
20167 int_fast32_t e3 = INT_FAST32_MAX;
20168 int_fast32_t e3min = INT_FAST32_MIN;
20169 int_fast64_t e4 = INT_FAST64_MAX;
20170 int_fast64_t e4min = INT_FAST64_MIN;
20171 uint_fast8_t f1 = UINT_FAST8_MAX;
20172 uint_fast16_t f2 = UINT_FAST16_MAX;
20173 uint_fast32_t f3 = UINT_FAST32_MAX;
20174 uint_fast64_t f4 = UINT_FAST64_MAX;
20175 #ifdef INTPTR_MAX
20176 intptr_t g = INTPTR_MAX;
20177 intptr_t gmin = INTPTR_MIN;
20178 #endif
20179 #ifdef UINTPTR_MAX
20180 uintptr_t h = UINTPTR_MAX;
20181 #endif
20182 intmax_t i = INTMAX_MAX;
20183 uintmax_t j = UINTMAX_MAX;
20184
20185 /* Check that SIZE_MAX has the correct type, if possible. */
20186 #if 201112 <= __STDC_VERSION__
20187 int k = _Generic (SIZE_MAX, size_t: 0);
20188 #elif (2 <= __GNUC__ || 4 <= __clang_major__ || defined __IBM__TYPEOF__ \
20189 || (0x5110 <= __SUNPRO_C && !__STDC__))
20190 extern size_t k;
20191 extern __typeof__ (SIZE_MAX) k;
20192 #endif
20193
20194 #include <limits.h> /* for CHAR_BIT */
20195 #define TYPE_MINIMUM(t) \
20196 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
20197 #define TYPE_MAXIMUM(t) \
20198 ((t) ((t) 0 < (t) -1 \
20199 ? (t) -1 \
20200 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
20201 struct s {
20202 int check_PTRDIFF:
20203 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
20204 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
20205 ? 1 : -1;
20206 /* Detect bug in FreeBSD 6.0/ia64 and FreeBSD 13.0/arm64. */
20207 int check_SIG_ATOMIC:
20208 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
20209 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
20210 ? 1 : -1;
20211 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
20212 int check_WCHAR:
20213 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
20214 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
20215 ? 1 : -1;
20216 /* Detect bug in mingw. */
20217 int check_WINT:
20218 WINT_MIN == TYPE_MINIMUM (wint_t)
20219 && WINT_MAX == TYPE_MAXIMUM (wint_t)
20220 ? 1 : -1;
20221
20222 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
20223 int check_UINT8_C:
20224 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
20225 int check_UINT16_C:
20226 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
20227
20228 /* Detect bugs in OpenBSD 3.9 stdint.h. */
20229 #ifdef UINT8_MAX
20230 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
20231 #endif
20232 #ifdef UINT16_MAX
20233 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
20234 #endif
20235 #ifdef UINT32_MAX
20236 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
20237 #endif
20238 #ifdef UINT64_MAX
20239 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
20240 #endif
20241 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
20242 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
20243 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
20244 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
20245 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
20246 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
20247 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
20248 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
20249 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
20250 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
20251 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
20252 };
20253
20254 int
20255 main (void)
20256 {
20257
20258 ;
20259 return 0;
20260 }
20261 _ACEOF
20262 if ac_fn_c_try_compile "$LINENO"
20263 then :
20264 if test "$cross_compiling" = yes
20265 then :
20266 case "$host_os" in
20267 # Guess yes on native Windows.
20268 mingw*) gl_cv_header_working_stdint_h="guessing yes" ;;
20269 # In general, assume it works.
20270 *) gl_cv_header_working_stdint_h="guessing yes" ;;
20271 esac
20272
20273 else $as_nop
20274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20275 /* end confdefs.h. */
20276
20277
20278 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
20279 #define __STDC_CONSTANT_MACROS 1
20280 #define __STDC_LIMIT_MACROS 1
20281 #include <stdint.h>
20282
20283
20284 #include <stddef.h>
20285 #include <signal.h>
20286 #if HAVE_WCHAR_H
20287 # include <wchar.h>
20288 #endif
20289
20290
20291 #include <stdio.h>
20292 #include <string.h>
20293 #define MVAL(macro) MVAL1(macro)
20294 #define MVAL1(expression) #expression
20295 static const char *macro_values[] =
20296 {
20297 #ifdef INT8_MAX
20298 MVAL (INT8_MAX),
20299 #endif
20300 #ifdef INT16_MAX
20301 MVAL (INT16_MAX),
20302 #endif
20303 #ifdef INT32_MAX
20304 MVAL (INT32_MAX),
20305 #endif
20306 #ifdef INT64_MAX
20307 MVAL (INT64_MAX),
20308 #endif
20309 #ifdef UINT8_MAX
20310 MVAL (UINT8_MAX),
20311 #endif
20312 #ifdef UINT16_MAX
20313 MVAL (UINT16_MAX),
20314 #endif
20315 #ifdef UINT32_MAX
20316 MVAL (UINT32_MAX),
20317 #endif
20318 #ifdef UINT64_MAX
20319 MVAL (UINT64_MAX),
20320 #endif
20321 NULL
20322 };
20323
20324 int
20325 main (void)
20326 {
20327
20328 const char **mv;
20329 for (mv = macro_values; *mv != NULL; mv++)
20330 {
20331 const char *value = *mv;
20332 /* Test whether it looks like a cast expression. */
20333 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
20334 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
20335 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
20336 || strncmp (value, "((int)"/*)*/, 6) == 0
20337 || strncmp (value, "((signed short)"/*)*/, 15) == 0
20338 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
20339 return mv - macro_values + 1;
20340 }
20341 return 0;
20342
20343 ;
20344 return 0;
20345 }
20346 _ACEOF
20347 if ac_fn_c_try_run "$LINENO"
20348 then :
20349 gl_cv_header_working_stdint_h=yes
20350 fi
20351 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20352 conftest.$ac_objext conftest.beam conftest.$ac_ext
20353 fi
20354
20355
20356 fi
20357 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
20358
20359 fi
20360 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
20361 printf "%s\n" "$gl_cv_header_working_stdint_h" >&6; }
20362 fi
20363
20364 HAVE_C99_STDINT_H=0
20365 HAVE_SYS_BITYPES_H=0
20366 HAVE_SYS_INTTYPES_H=0
20367 GL_GENERATE_STDINT_H=true
20368 case "$gl_cv_header_working_stdint_h" in
20369 *yes)
20370 HAVE_C99_STDINT_H=1
20371 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h works without ISO C predefines" >&5
20372 printf %s "checking whether stdint.h works without ISO C predefines... " >&6; }
20373 if test ${gl_cv_header_stdint_without_STDC_macros+y}
20374 then :
20375 printf %s "(cached) " >&6
20376 else $as_nop
20377 gl_cv_header_stdint_without_STDC_macros=no
20378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20379 /* end confdefs.h. */
20380
20381
20382 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
20383 #include <stdint.h>
20384
20385
20386 #include <stddef.h>
20387 #include <signal.h>
20388 #if HAVE_WCHAR_H
20389 # include <wchar.h>
20390 #endif
20391
20392
20393 intmax_t im = INTMAX_MAX;
20394 int32_t i32 = INT32_C (0x7fffffff);
20395
20396 int
20397 main (void)
20398 {
20399
20400 ;
20401 return 0;
20402 }
20403 _ACEOF
20404 if ac_fn_c_try_compile "$LINENO"
20405 then :
20406 gl_cv_header_stdint_without_STDC_macros=yes
20407 fi
20408 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
20409
20410 fi
20411 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_without_STDC_macros" >&5
20412 printf "%s\n" "$gl_cv_header_stdint_without_STDC_macros" >&6; }
20413
20414 if test $gl_cv_header_stdint_without_STDC_macros = no; then
20415
20416 printf "%s\n" "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
20417
20418
20419 printf "%s\n" "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
20420
20421 fi
20422 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
20423 printf %s "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; }
20424 if test ${gl_cv_header_stdint_width+y}
20425 then :
20426 printf %s "(cached) " >&6
20427 else $as_nop
20428 gl_cv_header_stdint_width=no
20429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20430 /* end confdefs.h. */
20431
20432 /* Work if build is not clean. */
20433 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
20434 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
20435 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
20436 #endif
20437 #include <stdint.h>
20438
20439 #include <stddef.h>
20440 #include <signal.h>
20441 #if HAVE_WCHAR_H
20442 # include <wchar.h>
20443 #endif
20444
20445 int iw = UINTMAX_WIDTH;
20446
20447 int
20448 main (void)
20449 {
20450
20451 ;
20452 return 0;
20453 }
20454 _ACEOF
20455 if ac_fn_c_try_compile "$LINENO"
20456 then :
20457 gl_cv_header_stdint_width=yes
20458 fi
20459 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
20460 fi
20461 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5
20462 printf "%s\n" "$gl_cv_header_stdint_width" >&6; }
20463 if test "$gl_cv_header_stdint_width" = yes; then
20464 GL_GENERATE_STDINT_H=false
20465 fi
20466 ;;
20467 *)
20468 ac_fn_c_check_header_compile "$LINENO" "sys/inttypes.h" "ac_cv_header_sys_inttypes_h" "$ac_includes_default"
20469 if test "x$ac_cv_header_sys_inttypes_h" = xyes
20470 then :
20471 printf "%s\n" "#define HAVE_SYS_INTTYPES_H 1" >>confdefs.h
20472
20473 fi
20474 ac_fn_c_check_header_compile "$LINENO" "sys/bitypes.h" "ac_cv_header_sys_bitypes_h" "$ac_includes_default"
20475 if test "x$ac_cv_header_sys_bitypes_h" = xyes
20476 then :
20477 printf "%s\n" "#define HAVE_SYS_BITYPES_H 1" >>confdefs.h
20478
20479 fi
20480
20481 if test $ac_cv_header_sys_inttypes_h = yes; then
20482 HAVE_SYS_INTTYPES_H=1
20483 fi
20484 if test $ac_cv_header_sys_bitypes_h = yes; then
20485 HAVE_SYS_BITYPES_H=1
20486 fi
20487
20488
20489 if test $APPLE_UNIVERSAL_BUILD = 0; then
20490
20491
20492 for gltype in ptrdiff_t size_t ; do
20493 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
20494 printf %s "checking for bit size of $gltype... " >&6; }
20495 if eval test \${gl_cv_bitsizeof_${gltype}+y}
20496 then :
20497 printf %s "(cached) " >&6
20498 else $as_nop
20499 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
20500 #include <stddef.h>
20501 #include <signal.h>
20502 #if HAVE_WCHAR_H
20503 # include <wchar.h>
20504 #endif
20505
20506 #include <limits.h>"
20507 then :
20508
20509 else $as_nop
20510 result=unknown
20511 fi
20512
20513 eval gl_cv_bitsizeof_${gltype}=\$result
20514
20515 fi
20516 eval ac_res=\$gl_cv_bitsizeof_${gltype}
20517 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20518 printf "%s\n" "$ac_res" >&6; }
20519 eval result=\$gl_cv_bitsizeof_${gltype}
20520 if test $result = unknown; then
20521 result=0
20522 fi
20523 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20524 printf "%s\n" "#define BITSIZEOF_${GLTYPE} $result" >>confdefs.h
20525
20526 eval BITSIZEOF_${GLTYPE}=\$result
20527 done
20528
20529
20530 fi
20531
20532
20533 for gltype in sig_atomic_t wchar_t wint_t ; do
20534 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
20535 printf %s "checking for bit size of $gltype... " >&6; }
20536 if eval test \${gl_cv_bitsizeof_${gltype}+y}
20537 then :
20538 printf %s "(cached) " >&6
20539 else $as_nop
20540 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
20541 #include <stddef.h>
20542 #include <signal.h>
20543 #if HAVE_WCHAR_H
20544 # include <wchar.h>
20545 #endif
20546
20547 #include <limits.h>"
20548 then :
20549
20550 else $as_nop
20551 result=unknown
20552 fi
20553
20554 eval gl_cv_bitsizeof_${gltype}=\$result
20555
20556 fi
20557 eval ac_res=\$gl_cv_bitsizeof_${gltype}
20558 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20559 printf "%s\n" "$ac_res" >&6; }
20560 eval result=\$gl_cv_bitsizeof_${gltype}
20561 if test $result = unknown; then
20562 result=0
20563 fi
20564 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20565 printf "%s\n" "#define BITSIZEOF_${GLTYPE} $result" >>confdefs.h
20566
20567 eval BITSIZEOF_${GLTYPE}=\$result
20568 done
20569
20570
20571
20572
20573 for gltype in sig_atomic_t wchar_t wint_t ; do
20574 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
20575 printf %s "checking whether $gltype is signed... " >&6; }
20576 if eval test \${gl_cv_type_${gltype}_signed+y}
20577 then :
20578 printf %s "(cached) " >&6
20579 else $as_nop
20580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20581 /* end confdefs.h. */
20582
20583 #include <stddef.h>
20584 #include <signal.h>
20585 #if HAVE_WCHAR_H
20586 # include <wchar.h>
20587 #endif
20588
20589 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
20590 int
20591 main (void)
20592 {
20593
20594 ;
20595 return 0;
20596 }
20597 _ACEOF
20598 if ac_fn_c_try_compile "$LINENO"
20599 then :
20600 result=yes
20601 else $as_nop
20602 result=no
20603 fi
20604 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
20605 eval gl_cv_type_${gltype}_signed=\$result
20606
20607 fi
20608 eval ac_res=\$gl_cv_type_${gltype}_signed
20609 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20610 printf "%s\n" "$ac_res" >&6; }
20611 eval result=\$gl_cv_type_${gltype}_signed
20612 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20613 if test "$result" = yes; then
20614 printf "%s\n" "#define HAVE_SIGNED_${GLTYPE} 1" >>confdefs.h
20615
20616 eval HAVE_SIGNED_${GLTYPE}=1
20617 else
20618 eval HAVE_SIGNED_${GLTYPE}=0
20619 fi
20620 done
20621
20622
20623 gl_cv_type_ptrdiff_t_signed=yes
20624 gl_cv_type_size_t_signed=no
20625 if test $APPLE_UNIVERSAL_BUILD = 0; then
20626
20627
20628 for gltype in ptrdiff_t size_t ; do
20629 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
20630 printf %s "checking for $gltype integer literal suffix... " >&6; }
20631 if eval test \${gl_cv_type_${gltype}_suffix+y}
20632 then :
20633 printf %s "(cached) " >&6
20634 else $as_nop
20635 eval gl_cv_type_${gltype}_suffix=no
20636 eval result=\$gl_cv_type_${gltype}_signed
20637 if test "$result" = yes; then
20638 glsufu=
20639 else
20640 glsufu=u
20641 fi
20642 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
20643 case $glsuf in
20644 '') gltype1='int';;
20645 l) gltype1='long int';;
20646 ll) gltype1='long long int';;
20647 i64) gltype1='__int64';;
20648 u) gltype1='unsigned int';;
20649 ul) gltype1='unsigned long int';;
20650 ull) gltype1='unsigned long long int';;
20651 ui64)gltype1='unsigned __int64';;
20652 esac
20653 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20654 /* end confdefs.h. */
20655
20656 #include <stddef.h>
20657 #include <signal.h>
20658 #if HAVE_WCHAR_H
20659 # include <wchar.h>
20660 #endif
20661
20662 extern $gltype foo;
20663 extern $gltype1 foo;
20664 int
20665 main (void)
20666 {
20667
20668 ;
20669 return 0;
20670 }
20671 _ACEOF
20672 if ac_fn_c_try_compile "$LINENO"
20673 then :
20674 eval gl_cv_type_${gltype}_suffix=\$glsuf
20675 fi
20676 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
20677 eval result=\$gl_cv_type_${gltype}_suffix
20678 test "$result" != no && break
20679 done
20680 fi
20681 eval ac_res=\$gl_cv_type_${gltype}_suffix
20682 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20683 printf "%s\n" "$ac_res" >&6; }
20684 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20685 eval result=\$gl_cv_type_${gltype}_suffix
20686 test "$result" = no && result=
20687 eval ${GLTYPE}_SUFFIX=\$result
20688 printf "%s\n" "#define ${GLTYPE}_SUFFIX $result" >>confdefs.h
20689
20690 done
20691
20692
20693 fi
20694
20695
20696 for gltype in sig_atomic_t wchar_t wint_t ; do
20697 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
20698 printf %s "checking for $gltype integer literal suffix... " >&6; }
20699 if eval test \${gl_cv_type_${gltype}_suffix+y}
20700 then :
20701 printf %s "(cached) " >&6
20702 else $as_nop
20703 eval gl_cv_type_${gltype}_suffix=no
20704 eval result=\$gl_cv_type_${gltype}_signed
20705 if test "$result" = yes; then
20706 glsufu=
20707 else
20708 glsufu=u
20709 fi
20710 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
20711 case $glsuf in
20712 '') gltype1='int';;
20713 l) gltype1='long int';;
20714 ll) gltype1='long long int';;
20715 i64) gltype1='__int64';;
20716 u) gltype1='unsigned int';;
20717 ul) gltype1='unsigned long int';;
20718 ull) gltype1='unsigned long long int';;
20719 ui64)gltype1='unsigned __int64';;
20720 esac
20721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20722 /* end confdefs.h. */
20723
20724 #include <stddef.h>
20725 #include <signal.h>
20726 #if HAVE_WCHAR_H
20727 # include <wchar.h>
20728 #endif
20729
20730 extern $gltype foo;
20731 extern $gltype1 foo;
20732 int
20733 main (void)
20734 {
20735
20736 ;
20737 return 0;
20738 }
20739 _ACEOF
20740 if ac_fn_c_try_compile "$LINENO"
20741 then :
20742 eval gl_cv_type_${gltype}_suffix=\$glsuf
20743 fi
20744 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
20745 eval result=\$gl_cv_type_${gltype}_suffix
20746 test "$result" != no && break
20747 done
20748 fi
20749 eval ac_res=\$gl_cv_type_${gltype}_suffix
20750 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20751 printf "%s\n" "$ac_res" >&6; }
20752 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
20753 eval result=\$gl_cv_type_${gltype}_suffix
20754 test "$result" = no && result=
20755 eval ${GLTYPE}_SUFFIX=\$result
20756 printf "%s\n" "#define ${GLTYPE}_SUFFIX $result" >>confdefs.h
20757
20758 done
20759
20760
20761
20762 if test $GNULIBHEADERS_OVERRIDE_WINT_T = 1; then
20763 BITSIZEOF_WINT_T=32
20764 fi
20765
20766 ;;
20767 esac
20768
20769
20770
20771 GL_GENERATE_LIMITS_H=true
20772
20773
20774
20775
20776
20777
20778
20779 HAVE_DECL_IMAXABS=1;
20780 HAVE_DECL_IMAXDIV=1;
20781 HAVE_DECL_STRTOIMAX=1;
20782 HAVE_DECL_STRTOUMAX=1;
20783 HAVE_IMAXDIV_T=1;
20784 REPLACE_STRTOIMAX=0;
20785 REPLACE_STRTOUMAX=0;
20786 INT32_MAX_LT_INTMAX_MAX=1;
20787 INT64_MAX_EQ_LONG_MAX='defined _LP64';
20788 PRIPTR_PREFIX=__PRIPTR_PREFIX;
20789 UINT32_MAX_LT_UINTMAX_MAX=1;
20790 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
20791
20792
20793
20794
20795
20796
20797
20798
20799
20800
20801
20802
20803
20804
20805
20806 if test $gl_cv_have_include_next = yes; then
20807 gl_cv_next_inttypes_h='<'inttypes.h'>'
20808 else
20809 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
20810 printf %s "checking absolute name of <inttypes.h>... " >&6; }
20811 if test ${gl_cv_next_inttypes_h+y}
20812 then :
20813 printf %s "(cached) " >&6
20814 else $as_nop
20815
20816 if test $ac_cv_header_inttypes_h = yes; then
20817
20818
20819
20820
20821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20822 /* end confdefs.h. */
20823 #include <inttypes.h>
20824 _ACEOF
20825 case "$host_os" in
20826 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20827 *) gl_absname_cpp="$ac_cpp" ;;
20828 esac
20829
20830 case "$host_os" in
20831 mingw*)
20832 gl_dirsep_regex='[/\\]'
20833 ;;
20834 *)
20835 gl_dirsep_regex='\/'
20836 ;;
20837 esac
20838 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20839 gl_header_literal_regex=`echo 'inttypes.h' \
20840 | sed -e "$gl_make_literal_regex_sed"`
20841 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20842 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20843 s|^/[^/]|//&|
20844 p
20845 q
20846 }'
20847
20848 gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20849 sed -n "$gl_absolute_header_sed"`
20850
20851 gl_header=$gl_cv_absolute_inttypes_h
20852 gl_cv_next_inttypes_h='"'$gl_header'"'
20853 else
20854 gl_cv_next_inttypes_h='<'inttypes.h'>'
20855 fi
20856
20857
20858 fi
20859 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
20860 printf "%s\n" "$gl_cv_next_inttypes_h" >&6; }
20861 fi
20862 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
20863
20864 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20865 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20866 gl_next_as_first_directive='<'inttypes.h'>'
20867 else
20868 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20869 gl_next_as_first_directive=$gl_cv_next_inttypes_h
20870 fi
20871 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
20872
20873
20874
20875
20876
20877
20878
20879
20880
20881
20882
20883
20884
20885
20886
20887 GL_GNULIB_IMAXABS=0
20888
20889
20890
20891 GL_GNULIB_IMAXDIV=0
20892
20893
20894
20895 GL_GNULIB_STRTOIMAX=0
20896
20897
20898
20899 GL_GNULIB_STRTOUMAX=0
20900
20901
20902
20903
20904
20905 HAVE_NL_LANGINFO=1;
20906 REPLACE_NL_LANGINFO=0;
20907
20908
20909
20910
20911
20912
20913
20914
20915
20916
20917
20918
20919
20920
20921
20922
20923 if test $gl_cv_have_include_next = yes; then
20924 gl_cv_next_langinfo_h='<'langinfo.h'>'
20925 else
20926 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <langinfo.h>" >&5
20927 printf %s "checking absolute name of <langinfo.h>... " >&6; }
20928 if test ${gl_cv_next_langinfo_h+y}
20929 then :
20930 printf %s "(cached) " >&6
20931 else $as_nop
20932
20933 if test $ac_cv_header_langinfo_h = yes; then
20934
20935
20936
20937
20938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20939 /* end confdefs.h. */
20940 #include <langinfo.h>
20941 _ACEOF
20942 case "$host_os" in
20943 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20944 *) gl_absname_cpp="$ac_cpp" ;;
20945 esac
20946
20947 case "$host_os" in
20948 mingw*)
20949 gl_dirsep_regex='[/\\]'
20950 ;;
20951 *)
20952 gl_dirsep_regex='\/'
20953 ;;
20954 esac
20955 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20956 gl_header_literal_regex=`echo 'langinfo.h' \
20957 | sed -e "$gl_make_literal_regex_sed"`
20958 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20959 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20960 s|^/[^/]|//&|
20961 p
20962 q
20963 }'
20964
20965 gl_cv_absolute_langinfo_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20966 sed -n "$gl_absolute_header_sed"`
20967
20968 gl_header=$gl_cv_absolute_langinfo_h
20969 gl_cv_next_langinfo_h='"'$gl_header'"'
20970 else
20971 gl_cv_next_langinfo_h='<'langinfo.h'>'
20972 fi
20973
20974
20975 fi
20976 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_langinfo_h" >&5
20977 printf "%s\n" "$gl_cv_next_langinfo_h" >&6; }
20978 fi
20979 NEXT_LANGINFO_H=$gl_cv_next_langinfo_h
20980
20981 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20982 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20983 gl_next_as_first_directive='<'langinfo.h'>'
20984 else
20985 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20986 gl_next_as_first_directive=$gl_cv_next_langinfo_h
20987 fi
20988 NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H=$gl_next_as_first_directive
20989
20990
20991
20992
20993
20994 HAVE_LANGINFO_CODESET=0
20995 HAVE_LANGINFO_T_FMT_AMPM=0
20996 HAVE_LANGINFO_ALTMON=0
20997 HAVE_LANGINFO_ERA=0
20998 HAVE_LANGINFO_YESEXPR=0
20999
21000 if test $ac_cv_header_langinfo_h = yes; then
21001 HAVE_LANGINFO_H=1
21002 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines CODESET" >&5
21003 printf %s "checking whether langinfo.h defines CODESET... " >&6; }
21004 if test ${gl_cv_header_langinfo_codeset+y}
21005 then :
21006 printf %s "(cached) " >&6
21007 else $as_nop
21008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21009 /* end confdefs.h. */
21010 #include <langinfo.h>
21011 int a = CODESET;
21012
21013 int
21014 main (void)
21015 {
21016
21017 ;
21018 return 0;
21019 }
21020 _ACEOF
21021 if ac_fn_c_try_compile "$LINENO"
21022 then :
21023 gl_cv_header_langinfo_codeset=yes
21024 else $as_nop
21025 gl_cv_header_langinfo_codeset=no
21026 fi
21027 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21028
21029 fi
21030 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_codeset" >&5
21031 printf "%s\n" "$gl_cv_header_langinfo_codeset" >&6; }
21032 if test $gl_cv_header_langinfo_codeset = yes; then
21033 HAVE_LANGINFO_CODESET=1
21034 fi
21035 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines T_FMT_AMPM" >&5
21036 printf %s "checking whether langinfo.h defines T_FMT_AMPM... " >&6; }
21037 if test ${gl_cv_header_langinfo_t_fmt_ampm+y}
21038 then :
21039 printf %s "(cached) " >&6
21040 else $as_nop
21041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21042 /* end confdefs.h. */
21043 #include <langinfo.h>
21044 int a = T_FMT_AMPM;
21045
21046 int
21047 main (void)
21048 {
21049
21050 ;
21051 return 0;
21052 }
21053 _ACEOF
21054 if ac_fn_c_try_compile "$LINENO"
21055 then :
21056 gl_cv_header_langinfo_t_fmt_ampm=yes
21057 else $as_nop
21058 gl_cv_header_langinfo_t_fmt_ampm=no
21059 fi
21060 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21061
21062 fi
21063 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_t_fmt_ampm" >&5
21064 printf "%s\n" "$gl_cv_header_langinfo_t_fmt_ampm" >&6; }
21065 if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then
21066 HAVE_LANGINFO_T_FMT_AMPM=1
21067 fi
21068 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ALTMON_1" >&5
21069 printf %s "checking whether langinfo.h defines ALTMON_1... " >&6; }
21070 if test ${gl_cv_header_langinfo_altmon+y}
21071 then :
21072 printf %s "(cached) " >&6
21073 else $as_nop
21074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21075 /* end confdefs.h. */
21076 #include <langinfo.h>
21077 int a = ALTMON_1;
21078
21079 int
21080 main (void)
21081 {
21082
21083 ;
21084 return 0;
21085 }
21086 _ACEOF
21087 if ac_fn_c_try_compile "$LINENO"
21088 then :
21089 gl_cv_header_langinfo_altmon=yes
21090 else $as_nop
21091 gl_cv_header_langinfo_altmon=no
21092 fi
21093 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21094
21095 fi
21096 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_altmon" >&5
21097 printf "%s\n" "$gl_cv_header_langinfo_altmon" >&6; }
21098 if test $gl_cv_header_langinfo_altmon = yes; then
21099 HAVE_LANGINFO_ALTMON=1
21100 fi
21101 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ERA" >&5
21102 printf %s "checking whether langinfo.h defines ERA... " >&6; }
21103 if test ${gl_cv_header_langinfo_era+y}
21104 then :
21105 printf %s "(cached) " >&6
21106 else $as_nop
21107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21108 /* end confdefs.h. */
21109 #include <langinfo.h>
21110 int a = ERA;
21111
21112 int
21113 main (void)
21114 {
21115
21116 ;
21117 return 0;
21118 }
21119 _ACEOF
21120 if ac_fn_c_try_compile "$LINENO"
21121 then :
21122 gl_cv_header_langinfo_era=yes
21123 else $as_nop
21124 gl_cv_header_langinfo_era=no
21125 fi
21126 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21127
21128 fi
21129 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_era" >&5
21130 printf "%s\n" "$gl_cv_header_langinfo_era" >&6; }
21131 if test $gl_cv_header_langinfo_era = yes; then
21132 HAVE_LANGINFO_ERA=1
21133 fi
21134 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines YESEXPR" >&5
21135 printf %s "checking whether langinfo.h defines YESEXPR... " >&6; }
21136 if test ${gl_cv_header_langinfo_yesexpr+y}
21137 then :
21138 printf %s "(cached) " >&6
21139 else $as_nop
21140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21141 /* end confdefs.h. */
21142 #include <langinfo.h>
21143 int a = YESEXPR;
21144
21145 int
21146 main (void)
21147 {
21148
21149 ;
21150 return 0;
21151 }
21152 _ACEOF
21153 if ac_fn_c_try_compile "$LINENO"
21154 then :
21155 gl_cv_header_langinfo_yesexpr=yes
21156 else $as_nop
21157 gl_cv_header_langinfo_yesexpr=no
21158 fi
21159 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21160
21161 fi
21162 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_yesexpr" >&5
21163 printf "%s\n" "$gl_cv_header_langinfo_yesexpr" >&6; }
21164 if test $gl_cv_header_langinfo_yesexpr = yes; then
21165 HAVE_LANGINFO_YESEXPR=1
21166 fi
21167 else
21168 HAVE_LANGINFO_H=0
21169 fi
21170
21171
21172
21173
21174
21175
21176
21177
21178
21179
21180
21181
21182
21183 GL_GNULIB_NL_LANGINFO=0
21184
21185
21186
21187
21188 HAVE_NEWLOCALE=1;
21189 HAVE_DUPLOCALE=1;
21190 HAVE_FREELOCALE=1;
21191 REPLACE_LOCALECONV=0;
21192 REPLACE_SETLOCALE=0;
21193 REPLACE_NEWLOCALE=0;
21194 REPLACE_DUPLOCALE=0;
21195 REPLACE_FREELOCALE=0;
21196 REPLACE_STRUCT_LCONV=0;
21197 LOCALENAME_ENHANCE_LOCALE_FUNCS=0;
21198
21199
21200 REPLACE_NULL=0;
21201 HAVE_MAX_ALIGN_T=1;
21202 HAVE_WCHAR_T=1;
21203
21204
21205 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
21206 printf %s "checking for wchar_t... " >&6; }
21207 if test ${gt_cv_c_wchar_t+y}
21208 then :
21209 printf %s "(cached) " >&6
21210 else $as_nop
21211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21212 /* end confdefs.h. */
21213 #include <stddef.h>
21214 wchar_t foo = (wchar_t)'\0';
21215 int
21216 main (void)
21217 {
21218
21219 ;
21220 return 0;
21221 }
21222 _ACEOF
21223 if ac_fn_c_try_compile "$LINENO"
21224 then :
21225 gt_cv_c_wchar_t=yes
21226 else $as_nop
21227 gt_cv_c_wchar_t=no
21228 fi
21229 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21230 fi
21231 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
21232 printf "%s\n" "$gt_cv_c_wchar_t" >&6; }
21233 if test $gt_cv_c_wchar_t = yes; then
21234
21235 printf "%s\n" "#define HAVE_WCHAR_T 1" >>confdefs.h
21236
21237 fi
21238
21239
21240
21241
21242
21243
21244
21245 GL_GENERATE_STDDEF_H=false
21246
21247 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5
21248 printf %s "checking for good max_align_t... " >&6; }
21249 if test ${gl_cv_type_max_align_t+y}
21250 then :
21251 printf %s "(cached) " >&6
21252 else $as_nop
21253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21254 /* end confdefs.h. */
21255 #include <stddef.h>
21256 unsigned int s = sizeof (max_align_t);
21257 #if defined __GNUC__ || defined __clang__ || defined __IBM__ALIGNOF__
21258 int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
21259 int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
21260 #endif
21261 typedef struct { char a; max_align_t b; } max_helper;
21262 typedef struct { char a; long b; } long_helper;
21263 typedef struct { char a; double b; } double_helper;
21264 typedef struct { char a; long double b; } long_double_helper;
21265 int check3[2 * (offsetof (long_helper, b) <= offsetof (max_helper, b)) - 1];
21266 int check4[2 * (offsetof (double_helper, b) <= offsetof (max_helper, b)) - 1];
21267 int check5[2 * (offsetof (long_double_helper, b) <= offsetof (max_helper, b)) - 1];
21268
21269 int
21270 main (void)
21271 {
21272
21273 ;
21274 return 0;
21275 }
21276 _ACEOF
21277 if ac_fn_c_try_compile "$LINENO"
21278 then :
21279 gl_cv_type_max_align_t=yes
21280 else $as_nop
21281 gl_cv_type_max_align_t=no
21282 fi
21283 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21284
21285 fi
21286 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5
21287 printf "%s\n" "$gl_cv_type_max_align_t" >&6; }
21288 if test $gl_cv_type_max_align_t = no; then
21289 HAVE_MAX_ALIGN_T=0
21290 GL_GENERATE_STDDEF_H=true
21291 fi
21292
21293 if test $gt_cv_c_wchar_t = no; then
21294 HAVE_WCHAR_T=0
21295 GL_GENERATE_STDDEF_H=true
21296 fi
21297
21298 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
21299 printf %s "checking whether NULL can be used in arbitrary expressions... " >&6; }
21300 if test ${gl_cv_decl_null_works+y}
21301 then :
21302 printf %s "(cached) " >&6
21303 else $as_nop
21304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21305 /* end confdefs.h. */
21306 #include <stddef.h>
21307 int test[2 * (sizeof NULL == sizeof (void *)) -1];
21308
21309 int
21310 main (void)
21311 {
21312
21313 ;
21314 return 0;
21315 }
21316 _ACEOF
21317 if ac_fn_c_try_compile "$LINENO"
21318 then :
21319 gl_cv_decl_null_works=yes
21320 else $as_nop
21321 gl_cv_decl_null_works=no
21322 fi
21323 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21324 fi
21325 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
21326 printf "%s\n" "$gl_cv_decl_null_works" >&6; }
21327 if test $gl_cv_decl_null_works = no; then
21328 REPLACE_NULL=1
21329 GL_GENERATE_STDDEF_H=true
21330 fi
21331
21332 if $GL_GENERATE_STDDEF_H; then
21333
21334
21335
21336
21337
21338
21339
21340
21341 if test $gl_cv_have_include_next = yes; then
21342 gl_cv_next_stddef_h='<'stddef.h'>'
21343 else
21344 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
21345 printf %s "checking absolute name of <stddef.h>... " >&6; }
21346 if test ${gl_cv_next_stddef_h+y}
21347 then :
21348 printf %s "(cached) " >&6
21349 else $as_nop
21350
21351
21352
21353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21354 /* end confdefs.h. */
21355 #include <stddef.h>
21356 _ACEOF
21357 case "$host_os" in
21358 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21359 *) gl_absname_cpp="$ac_cpp" ;;
21360 esac
21361
21362 case "$host_os" in
21363 mingw*)
21364 gl_dirsep_regex='[/\\]'
21365 ;;
21366 *)
21367 gl_dirsep_regex='\/'
21368 ;;
21369 esac
21370 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21371 gl_header_literal_regex=`echo 'stddef.h' \
21372 | sed -e "$gl_make_literal_regex_sed"`
21373 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21374 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21375 s|^/[^/]|//&|
21376 p
21377 q
21378 }'
21379
21380 gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21381 sed -n "$gl_absolute_header_sed"`
21382
21383 gl_header=$gl_cv_absolute_stddef_h
21384 gl_cv_next_stddef_h='"'$gl_header'"'
21385
21386
21387 fi
21388 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
21389 printf "%s\n" "$gl_cv_next_stddef_h" >&6; }
21390 fi
21391 NEXT_STDDEF_H=$gl_cv_next_stddef_h
21392
21393 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21394 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21395 gl_next_as_first_directive='<'stddef.h'>'
21396 else
21397 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21398 gl_next_as_first_directive=$gl_cv_next_stddef_h
21399 fi
21400 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
21401
21402
21403
21404
21405 fi
21406
21407
21408
21409
21410
21411 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5
21412 printf %s "checking whether locale.h defines locale_t... " >&6; }
21413 if test ${gl_cv_header_locale_has_locale_t+y}
21414 then :
21415 printf %s "(cached) " >&6
21416 else $as_nop
21417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21418 /* end confdefs.h. */
21419 #include <locale.h>
21420 locale_t x;
21421 int
21422 main (void)
21423 {
21424
21425 ;
21426 return 0;
21427 }
21428 _ACEOF
21429 if ac_fn_c_try_compile "$LINENO"
21430 then :
21431 gl_cv_header_locale_has_locale_t=yes
21432 else $as_nop
21433 gl_cv_header_locale_has_locale_t=no
21434 fi
21435 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21436
21437 fi
21438 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5
21439 printf "%s\n" "$gl_cv_header_locale_has_locale_t" >&6; }
21440
21441
21442 if test $ac_cv_header_xlocale_h = yes; then
21443 HAVE_XLOCALE_H=1
21444 if test $gl_cv_header_locale_has_locale_t = yes; then
21445 gl_cv_header_locale_h_needs_xlocale_h=no
21446 else
21447 gl_cv_header_locale_h_needs_xlocale_h=yes
21448 fi
21449 HAVE_LOCALE_T=1
21450 else
21451 HAVE_XLOCALE_H=0
21452 gl_cv_header_locale_h_needs_xlocale_h=no
21453 if test $gl_cv_header_locale_has_locale_t = yes; then
21454 HAVE_LOCALE_T=1
21455 else
21456 HAVE_LOCALE_T=0
21457 fi
21458 fi
21459
21460
21461
21462
21463
21464
21465
21466
21467
21468
21469
21470
21471 case "$host_os" in
21472 solaris*)
21473
21474 printf "%s\n" "#define _LCONV_C99 1" >>confdefs.h
21475
21476 ;;
21477 esac
21478
21479 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5
21480 printf %s "checking whether locale.h conforms to POSIX:2001... " >&6; }
21481 if test ${gl_cv_header_locale_h_posix2001+y}
21482 then :
21483 printf %s "(cached) " >&6
21484 else $as_nop
21485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21486 /* end confdefs.h. */
21487 #include <locale.h>
21488 int x = LC_MESSAGES;
21489 int y = sizeof (((struct lconv *) 0)->decimal_point);
21490 int
21491 main (void)
21492 {
21493
21494 ;
21495 return 0;
21496 }
21497 _ACEOF
21498 if ac_fn_c_try_compile "$LINENO"
21499 then :
21500 gl_cv_header_locale_h_posix2001=yes
21501 else $as_nop
21502 gl_cv_header_locale_h_posix2001=no
21503 fi
21504 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21505 fi
21506 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5
21507 printf "%s\n" "$gl_cv_header_locale_h_posix2001" >&6; }
21508
21509 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct lconv is properly defined" >&5
21510 printf %s "checking whether struct lconv is properly defined... " >&6; }
21511 if test ${gl_cv_sys_struct_lconv_ok+y}
21512 then :
21513 printf %s "(cached) " >&6
21514 else $as_nop
21515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21516 /* end confdefs.h. */
21517 #include <locale.h>
21518 struct lconv l;
21519 int x = sizeof (l.decimal_point);
21520 int y = sizeof (l.int_p_cs_precedes);
21521 int
21522 main (void)
21523 {
21524
21525 ;
21526 return 0;
21527 }
21528 _ACEOF
21529 if ac_fn_c_try_compile "$LINENO"
21530 then :
21531 gl_cv_sys_struct_lconv_ok=yes
21532 else $as_nop
21533 gl_cv_sys_struct_lconv_ok=no
21534 fi
21535 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21536
21537 fi
21538 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_lconv_ok" >&5
21539 printf "%s\n" "$gl_cv_sys_struct_lconv_ok" >&6; }
21540 if test $gl_cv_sys_struct_lconv_ok = no; then
21541 case "$host_os" in
21542 mingw*)
21543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21544 /* end confdefs.h. */
21545
21546 #ifdef _MSC_VER
21547 Special
21548 #endif
21549
21550 _ACEOF
21551 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21552 $EGREP "Special" >/dev/null 2>&1
21553 then :
21554
21555 else $as_nop
21556 REPLACE_STRUCT_LCONV=1
21557 fi
21558 rm -rf conftest*
21559
21560 ;;
21561 *) REPLACE_STRUCT_LCONV=1 ;;
21562 esac
21563 fi
21564
21565
21566
21567
21568
21569
21570
21571
21572
21573 if test $gl_cv_have_include_next = yes; then
21574 gl_cv_next_locale_h='<'locale.h'>'
21575 else
21576 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <locale.h>" >&5
21577 printf %s "checking absolute name of <locale.h>... " >&6; }
21578 if test ${gl_cv_next_locale_h+y}
21579 then :
21580 printf %s "(cached) " >&6
21581 else $as_nop
21582
21583
21584
21585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21586 /* end confdefs.h. */
21587 #include <locale.h>
21588 _ACEOF
21589 case "$host_os" in
21590 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21591 *) gl_absname_cpp="$ac_cpp" ;;
21592 esac
21593
21594 case "$host_os" in
21595 mingw*)
21596 gl_dirsep_regex='[/\\]'
21597 ;;
21598 *)
21599 gl_dirsep_regex='\/'
21600 ;;
21601 esac
21602 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21603 gl_header_literal_regex=`echo 'locale.h' \
21604 | sed -e "$gl_make_literal_regex_sed"`
21605 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21606 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21607 s|^/[^/]|//&|
21608 p
21609 q
21610 }'
21611
21612 gl_cv_absolute_locale_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21613 sed -n "$gl_absolute_header_sed"`
21614
21615 gl_header=$gl_cv_absolute_locale_h
21616 gl_cv_next_locale_h='"'$gl_header'"'
21617
21618
21619 fi
21620 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5
21621 printf "%s\n" "$gl_cv_next_locale_h" >&6; }
21622 fi
21623 NEXT_LOCALE_H=$gl_cv_next_locale_h
21624
21625 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21626 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21627 gl_next_as_first_directive='<'locale.h'>'
21628 else
21629 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21630 gl_next_as_first_directive=$gl_cv_next_locale_h
21631 fi
21632 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H=$gl_next_as_first_directive
21633
21634
21635
21636
21637
21638
21639
21640
21641
21642
21643
21644 GL_GNULIB_LOCALECONV=0
21645
21646
21647
21648 GL_GNULIB_SETLOCALE=0
21649
21650
21651
21652 GL_GNULIB_SETLOCALE_NULL=0
21653
21654
21655
21656 GL_GNULIB_DUPLOCALE=0
21657
21658
21659
21660 GL_GNULIB_LOCALENAME=0
21661
21662
21663
21664
21665
21666 gl_threads_api=none
21667 LIBTHREAD=
21668 LTLIBTHREAD=
21669 LIBMULTITHREAD=
21670 LTLIBMULTITHREAD=
21671 if test "$gl_use_threads" != no; then
21672
21673
21674 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
21675 printf %s "checking whether imported symbols can be declared weak... " >&6; }
21676 if test ${gl_cv_have_weak+y}
21677 then :
21678 printf %s "(cached) " >&6
21679 else $as_nop
21680 case "$host_os" in
21681 cygwin*)
21682 gl_cv_have_weak="guessing no"
21683 ;;
21684 *)
21685 gl_cv_have_weak=no
21686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21687 /* end confdefs.h. */
21688 extern void xyzzy ();
21689 #pragma weak xyzzy
21690 int
21691 main (void)
21692 {
21693 xyzzy();
21694 ;
21695 return 0;
21696 }
21697 _ACEOF
21698 if ac_fn_c_try_link "$LINENO"
21699 then :
21700 gl_cv_have_weak=maybe
21701 fi
21702 rm -f core conftest.err conftest.$ac_objext conftest.beam \
21703 conftest$ac_exeext conftest.$ac_ext
21704 if test $gl_cv_have_weak = maybe; then
21705 if test "$cross_compiling" = yes
21706 then :
21707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21708 /* end confdefs.h. */
21709 #ifdef __ELF__
21710 Extensible Linking Format
21711 #endif
21712
21713 _ACEOF
21714 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21715 $EGREP "Extensible Linking Format" >/dev/null 2>&1
21716 then :
21717 gl_cv_have_weak="guessing yes"
21718 else $as_nop
21719 gl_cv_have_weak="guessing no"
21720 fi
21721 rm -rf conftest*
21722
21723
21724 else $as_nop
21725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21726 /* end confdefs.h. */
21727
21728 #include <stdio.h>
21729 #pragma weak fputs
21730 int main ()
21731 {
21732 return (fputs == NULL);
21733 }
21734 _ACEOF
21735 if ac_fn_c_try_run "$LINENO"
21736 then :
21737 gl_cv_have_weak=yes
21738 else $as_nop
21739 gl_cv_have_weak=no
21740 fi
21741 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21742 conftest.$ac_objext conftest.beam conftest.$ac_ext
21743 fi
21744
21745 fi
21746 ;;
21747 esac
21748 case " $LDFLAGS " in
21749 *" -static "*) gl_cv_have_weak=no ;;
21750 esac
21751 case "$gl_cv_have_weak" in
21752 *yes)
21753 case "$host_os" in
21754 freebsd* | dragonfly* | midnightbsd*)
21755 : > conftest1.c
21756 $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
21757 cat <<EOF > conftest2.c
21758 #include <pthread.h>
21759 #pragma weak pthread_mutexattr_gettype
21760 int main ()
21761 {
21762 return (pthread_mutexattr_gettype != NULL);
21763 }
21764 EOF
21765 $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
21766 || gl_cv_have_weak=no
21767 rm -f conftest1.c libempty.so conftest2.c conftest
21768 ;;
21769 esac
21770 ;;
21771 esac
21772
21773 fi
21774 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
21775 printf "%s\n" "$gl_cv_have_weak" >&6; }
21776 case "$gl_cv_have_weak" in
21777 *yes)
21778
21779 printf "%s\n" "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
21780
21781 ;;
21782 esac
21783
21784 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
21785
21786 :
21787 fi
21788 if test "$gl_use_threads" = isoc || test "$gl_use_threads" = isoc+posix; then
21789
21790 gl_have_isoc_threads="$ac_cv_header_threads_h"
21791 fi
21792 if test "$gl_use_threads" = yes \
21793 || test "$gl_use_threads" = posix \
21794 || test "$gl_use_threads" = isoc+posix; then
21795
21796
21797 if test -z "$gl_pthreadlib_body_done"; then
21798 gl_pthread_api=no
21799 LIBPTHREAD=
21800 LIBPMULTITHREAD=
21801 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
21802 # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
21803 ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
21804 if test "x$ac_cv_header_pthread_h" = xyes
21805 then :
21806 gl_have_pthread_h=yes
21807 else $as_nop
21808 gl_have_pthread_h=no
21809 fi
21810
21811 if test "$gl_have_pthread_h" = yes; then
21812 # Other possible tests:
21813 # -lpthreads (FSU threads, PCthreads)
21814 # -lgthreads
21815 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
21816 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
21817 # the second one only in libpthread, and lock.c needs it.
21818 #
21819 # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
21820 # needs -pthread for some reason. See:
21821 # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
21822 save_LIBS=$LIBS
21823 for gl_pthread in '' '-pthread'; do
21824 LIBS="$LIBS $gl_pthread"
21825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21826 /* end confdefs.h. */
21827 #include <pthread.h>
21828 pthread_mutex_t m;
21829 pthread_mutexattr_t ma;
21830
21831 int
21832 main (void)
21833 {
21834 pthread_mutex_lock (&m);
21835 pthread_mutexattr_init (&ma);
21836 ;
21837 return 0;
21838 }
21839 _ACEOF
21840 if ac_fn_c_try_link "$LINENO"
21841 then :
21842 gl_pthread_api=yes
21843 LIBPTHREAD=$gl_pthread
21844 LIBPMULTITHREAD=$gl_pthread
21845 fi
21846 rm -f core conftest.err conftest.$ac_objext conftest.beam \
21847 conftest$ac_exeext conftest.$ac_ext
21848 LIBS=$save_LIBS
21849 test $gl_pthread_api = yes && break
21850 done
21851 echo "$as_me:21851: gl_pthread_api=$gl_pthread_api" >&5
21852 echo "$as_me:21852: LIBPTHREAD=$LIBPTHREAD" >&5
21853
21854 gl_pthread_in_glibc=no
21855 # On Linux with glibc >= 2.34, libc contains the fully functional
21856 # pthread functions.
21857 case "$host_os" in
21858 linux*)
21859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21860 /* end confdefs.h. */
21861 #include <features.h>
21862 #ifdef __GNU_LIBRARY__
21863 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 34) || (__GLIBC__ > 2)
21864 Lucky user
21865 #endif
21866 #endif
21867
21868 _ACEOF
21869 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21870 $EGREP "Lucky user" >/dev/null 2>&1
21871 then :
21872 gl_pthread_in_glibc=yes
21873 fi
21874 rm -rf conftest*
21875
21876 ;;
21877 esac
21878 echo "$as_me:21878: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&5
21879
21880 # Test for libpthread by looking for pthread_kill. (Not pthread_self,
21881 # since it is defined as a macro on OSF/1.)
21882 if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
21883 # The program links fine without libpthread. But it may actually
21884 # need to link with libpthread in order to create multiple threads.
21885 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
21886 printf %s "checking for pthread_kill in -lpthread... " >&6; }
21887 if test ${ac_cv_lib_pthread_pthread_kill+y}
21888 then :
21889 printf %s "(cached) " >&6
21890 else $as_nop
21891 ac_check_lib_save_LIBS=$LIBS
21892 LIBS="-lpthread $LIBS"
21893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21894 /* end confdefs.h. */
21895
21896 /* Override any GCC internal prototype to avoid an error.
21897 Use char because int might match the return type of a GCC
21898 builtin and then its argument prototype would still apply. */
21899 char pthread_kill ();
21900 int
21901 main (void)
21902 {
21903 return pthread_kill ();
21904 ;
21905 return 0;
21906 }
21907 _ACEOF
21908 if ac_fn_c_try_link "$LINENO"
21909 then :
21910 ac_cv_lib_pthread_pthread_kill=yes
21911 else $as_nop
21912 ac_cv_lib_pthread_pthread_kill=no
21913 fi
21914 rm -f core conftest.err conftest.$ac_objext conftest.beam \
21915 conftest$ac_exeext conftest.$ac_ext
21916 LIBS=$ac_check_lib_save_LIBS
21917 fi
21918 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
21919 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
21920 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
21921 then :
21922 if test $gl_pthread_in_glibc = yes; then
21923 LIBPMULTITHREAD=
21924 else
21925 LIBPMULTITHREAD=-lpthread
21926 # On Solaris and HP-UX, most pthread functions exist also in libc.
21927 # Therefore pthread_in_use() needs to actually try to create a
21928 # thread: pthread_create from libc will fail, whereas
21929 # pthread_create will actually create a thread.
21930 # On Solaris 10 or newer, this test is no longer needed, because
21931 # libc contains the fully functional pthread functions.
21932 case "$host_os" in
21933 solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
21934
21935 printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
21936
21937 esac
21938 fi
21939
21940 fi
21941
21942 elif test $gl_pthread_api != yes; then
21943 # Some library is needed. Try libpthread and libc_r.
21944 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
21945 printf %s "checking for pthread_kill in -lpthread... " >&6; }
21946 if test ${ac_cv_lib_pthread_pthread_kill+y}
21947 then :
21948 printf %s "(cached) " >&6
21949 else $as_nop
21950 ac_check_lib_save_LIBS=$LIBS
21951 LIBS="-lpthread $LIBS"
21952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21953 /* end confdefs.h. */
21954
21955 /* Override any GCC internal prototype to avoid an error.
21956 Use char because int might match the return type of a GCC
21957 builtin and then its argument prototype would still apply. */
21958 char pthread_kill ();
21959 int
21960 main (void)
21961 {
21962 return pthread_kill ();
21963 ;
21964 return 0;
21965 }
21966 _ACEOF
21967 if ac_fn_c_try_link "$LINENO"
21968 then :
21969 ac_cv_lib_pthread_pthread_kill=yes
21970 else $as_nop
21971 ac_cv_lib_pthread_pthread_kill=no
21972 fi
21973 rm -f core conftest.err conftest.$ac_objext conftest.beam \
21974 conftest$ac_exeext conftest.$ac_ext
21975 LIBS=$ac_check_lib_save_LIBS
21976 fi
21977 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
21978 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
21979 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
21980 then :
21981 gl_pthread_api=yes
21982 LIBPTHREAD=-lpthread
21983 LIBPMULTITHREAD=-lpthread
21984 fi
21985
21986 if test $gl_pthread_api != yes; then
21987 # For FreeBSD 4.
21988 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
21989 printf %s "checking for pthread_kill in -lc_r... " >&6; }
21990 if test ${ac_cv_lib_c_r_pthread_kill+y}
21991 then :
21992 printf %s "(cached) " >&6
21993 else $as_nop
21994 ac_check_lib_save_LIBS=$LIBS
21995 LIBS="-lc_r $LIBS"
21996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21997 /* end confdefs.h. */
21998
21999 /* Override any GCC internal prototype to avoid an error.
22000 Use char because int might match the return type of a GCC
22001 builtin and then its argument prototype would still apply. */
22002 char pthread_kill ();
22003 int
22004 main (void)
22005 {
22006 return pthread_kill ();
22007 ;
22008 return 0;
22009 }
22010 _ACEOF
22011 if ac_fn_c_try_link "$LINENO"
22012 then :
22013 ac_cv_lib_c_r_pthread_kill=yes
22014 else $as_nop
22015 ac_cv_lib_c_r_pthread_kill=no
22016 fi
22017 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22018 conftest$ac_exeext conftest.$ac_ext
22019 LIBS=$ac_check_lib_save_LIBS
22020 fi
22021 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
22022 printf "%s\n" "$ac_cv_lib_c_r_pthread_kill" >&6; }
22023 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes
22024 then :
22025 gl_pthread_api=yes
22026 LIBPTHREAD=-lc_r
22027 LIBPMULTITHREAD=-lc_r
22028 fi
22029
22030 fi
22031 fi
22032 echo "$as_me:22032: LIBPMULTITHREAD=$LIBPMULTITHREAD" >&5
22033 fi
22034 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
22035 printf %s "checking whether POSIX threads API is available... " >&6; }
22036 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
22037 printf "%s\n" "$gl_pthread_api" >&6; }
22038
22039
22040 if test $gl_pthread_api = yes; then
22041
22042 printf "%s\n" "#define HAVE_PTHREAD_API 1" >>confdefs.h
22043
22044 fi
22045
22046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22047 /* end confdefs.h. */
22048 #include <sched.h>
22049 int
22050 main (void)
22051 {
22052 sched_yield ();
22053 ;
22054 return 0;
22055 }
22056 _ACEOF
22057 if ac_fn_c_try_link "$LINENO"
22058 then :
22059 LIB_SCHED_YIELD=
22060
22061 else $as_nop
22062 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
22063 printf %s "checking for sched_yield in -lrt... " >&6; }
22064 if test ${ac_cv_lib_rt_sched_yield+y}
22065 then :
22066 printf %s "(cached) " >&6
22067 else $as_nop
22068 ac_check_lib_save_LIBS=$LIBS
22069 LIBS="-lrt $LIBS"
22070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22071 /* end confdefs.h. */
22072
22073 /* Override any GCC internal prototype to avoid an error.
22074 Use char because int might match the return type of a GCC
22075 builtin and then its argument prototype would still apply. */
22076 char sched_yield ();
22077 int
22078 main (void)
22079 {
22080 return sched_yield ();
22081 ;
22082 return 0;
22083 }
22084 _ACEOF
22085 if ac_fn_c_try_link "$LINENO"
22086 then :
22087 ac_cv_lib_rt_sched_yield=yes
22088 else $as_nop
22089 ac_cv_lib_rt_sched_yield=no
22090 fi
22091 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22092 conftest$ac_exeext conftest.$ac_ext
22093 LIBS=$ac_check_lib_save_LIBS
22094 fi
22095 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
22096 printf "%s\n" "$ac_cv_lib_rt_sched_yield" >&6; }
22097 if test "x$ac_cv_lib_rt_sched_yield" = xyes
22098 then :
22099 LIB_SCHED_YIELD=-lrt
22100 else $as_nop
22101 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
22102 printf %s "checking for sched_yield in -lposix4... " >&6; }
22103 if test ${ac_cv_lib_posix4_sched_yield+y}
22104 then :
22105 printf %s "(cached) " >&6
22106 else $as_nop
22107 ac_check_lib_save_LIBS=$LIBS
22108 LIBS="-lposix4 $LIBS"
22109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22110 /* end confdefs.h. */
22111
22112 /* Override any GCC internal prototype to avoid an error.
22113 Use char because int might match the return type of a GCC
22114 builtin and then its argument prototype would still apply. */
22115 char sched_yield ();
22116 int
22117 main (void)
22118 {
22119 return sched_yield ();
22120 ;
22121 return 0;
22122 }
22123 _ACEOF
22124 if ac_fn_c_try_link "$LINENO"
22125 then :
22126 ac_cv_lib_posix4_sched_yield=yes
22127 else $as_nop
22128 ac_cv_lib_posix4_sched_yield=no
22129 fi
22130 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22131 conftest$ac_exeext conftest.$ac_ext
22132 LIBS=$ac_check_lib_save_LIBS
22133 fi
22134 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
22135 printf "%s\n" "$ac_cv_lib_posix4_sched_yield" >&6; }
22136 if test "x$ac_cv_lib_posix4_sched_yield" = xyes
22137 then :
22138 LIB_SCHED_YIELD=-lposix4
22139 fi
22140
22141 fi
22142
22143
22144 fi
22145 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22146 conftest$ac_exeext conftest.$ac_ext
22147
22148
22149 gl_pthreadlib_body_done=done
22150 fi
22151
22152 LIBTHREAD=$LIBPTHREAD LTLIBTHREAD=$LIBPTHREAD
22153 LIBMULTITHREAD=$LIBPMULTITHREAD LTLIBMULTITHREAD=$LIBPMULTITHREAD
22154 if test $gl_pthread_api = yes; then
22155 if test "$gl_use_threads" = isoc+posix && test "$gl_have_isoc_threads" = yes; then
22156 gl_threads_api='isoc+posix'
22157
22158 printf "%s\n" "#define USE_ISOC_AND_POSIX_THREADS 1" >>confdefs.h
22159
22160 LIBTHREAD= LTLIBTHREAD=
22161 else
22162 gl_threads_api=posix
22163
22164 printf "%s\n" "#define USE_POSIX_THREADS 1" >>confdefs.h
22165
22166 if test -z "$LIBMULTITHREAD" && test -z "$LTLIBMULTITHREAD"; then
22167
22168 printf "%s\n" "#define USE_POSIX_THREADS_FROM_LIBC 1" >>confdefs.h
22169
22170 else
22171 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
22172
22173 printf "%s\n" "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h
22174
22175 LIBTHREAD= LTLIBTHREAD=
22176 else
22177 case "$host_os" in
22178 freebsd* | dragonfly* | midnightbsd*)
22179 if test "x$LIBTHREAD" != "x$LIBMULTITHREAD"; then
22180
22181 printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
22182
22183 fi
22184 ;;
22185 esac
22186 fi
22187 fi
22188 fi
22189 fi
22190 fi
22191 if test $gl_threads_api = none; then
22192 if test "$gl_use_threads" = isoc && test "$gl_have_isoc_threads" = yes; then
22193
22194
22195
22196 if test -z "$gl_stdthreadlib_body_done"; then
22197
22198
22199 case "$host_os" in
22200 mingw*)
22201 LIBSTDTHREAD=
22202 ;;
22203 *)
22204
22205
22206 if test -z "$gl_pthreadlib_body_done"; then
22207 gl_pthread_api=no
22208 LIBPTHREAD=
22209 LIBPMULTITHREAD=
22210 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
22211 # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
22212 ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
22213 if test "x$ac_cv_header_pthread_h" = xyes
22214 then :
22215 gl_have_pthread_h=yes
22216 else $as_nop
22217 gl_have_pthread_h=no
22218 fi
22219
22220 if test "$gl_have_pthread_h" = yes; then
22221 # Other possible tests:
22222 # -lpthreads (FSU threads, PCthreads)
22223 # -lgthreads
22224 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
22225 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
22226 # the second one only in libpthread, and lock.c needs it.
22227 #
22228 # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
22229 # needs -pthread for some reason. See:
22230 # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
22231 save_LIBS=$LIBS
22232 for gl_pthread in '' '-pthread'; do
22233 LIBS="$LIBS $gl_pthread"
22234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22235 /* end confdefs.h. */
22236 #include <pthread.h>
22237 pthread_mutex_t m;
22238 pthread_mutexattr_t ma;
22239
22240 int
22241 main (void)
22242 {
22243 pthread_mutex_lock (&m);
22244 pthread_mutexattr_init (&ma);
22245 ;
22246 return 0;
22247 }
22248 _ACEOF
22249 if ac_fn_c_try_link "$LINENO"
22250 then :
22251 gl_pthread_api=yes
22252 LIBPTHREAD=$gl_pthread
22253 LIBPMULTITHREAD=$gl_pthread
22254 fi
22255 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22256 conftest$ac_exeext conftest.$ac_ext
22257 LIBS=$save_LIBS
22258 test $gl_pthread_api = yes && break
22259 done
22260 echo "$as_me:22260: gl_pthread_api=$gl_pthread_api" >&5
22261 echo "$as_me:22261: LIBPTHREAD=$LIBPTHREAD" >&5
22262
22263 gl_pthread_in_glibc=no
22264 # On Linux with glibc >= 2.34, libc contains the fully functional
22265 # pthread functions.
22266 case "$host_os" in
22267 linux*)
22268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22269 /* end confdefs.h. */
22270 #include <features.h>
22271 #ifdef __GNU_LIBRARY__
22272 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 34) || (__GLIBC__ > 2)
22273 Lucky user
22274 #endif
22275 #endif
22276
22277 _ACEOF
22278 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22279 $EGREP "Lucky user" >/dev/null 2>&1
22280 then :
22281 gl_pthread_in_glibc=yes
22282 fi
22283 rm -rf conftest*
22284
22285 ;;
22286 esac
22287 echo "$as_me:22287: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&5
22288
22289 # Test for libpthread by looking for pthread_kill. (Not pthread_self,
22290 # since it is defined as a macro on OSF/1.)
22291 if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
22292 # The program links fine without libpthread. But it may actually
22293 # need to link with libpthread in order to create multiple threads.
22294 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
22295 printf %s "checking for pthread_kill in -lpthread... " >&6; }
22296 if test ${ac_cv_lib_pthread_pthread_kill+y}
22297 then :
22298 printf %s "(cached) " >&6
22299 else $as_nop
22300 ac_check_lib_save_LIBS=$LIBS
22301 LIBS="-lpthread $LIBS"
22302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22303 /* end confdefs.h. */
22304
22305 /* Override any GCC internal prototype to avoid an error.
22306 Use char because int might match the return type of a GCC
22307 builtin and then its argument prototype would still apply. */
22308 char pthread_kill ();
22309 int
22310 main (void)
22311 {
22312 return pthread_kill ();
22313 ;
22314 return 0;
22315 }
22316 _ACEOF
22317 if ac_fn_c_try_link "$LINENO"
22318 then :
22319 ac_cv_lib_pthread_pthread_kill=yes
22320 else $as_nop
22321 ac_cv_lib_pthread_pthread_kill=no
22322 fi
22323 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22324 conftest$ac_exeext conftest.$ac_ext
22325 LIBS=$ac_check_lib_save_LIBS
22326 fi
22327 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
22328 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
22329 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
22330 then :
22331 if test $gl_pthread_in_glibc = yes; then
22332 LIBPMULTITHREAD=
22333 else
22334 LIBPMULTITHREAD=-lpthread
22335 # On Solaris and HP-UX, most pthread functions exist also in libc.
22336 # Therefore pthread_in_use() needs to actually try to create a
22337 # thread: pthread_create from libc will fail, whereas
22338 # pthread_create will actually create a thread.
22339 # On Solaris 10 or newer, this test is no longer needed, because
22340 # libc contains the fully functional pthread functions.
22341 case "$host_os" in
22342 solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
22343
22344 printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
22345
22346 esac
22347 fi
22348
22349 fi
22350
22351 elif test $gl_pthread_api != yes; then
22352 # Some library is needed. Try libpthread and libc_r.
22353 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
22354 printf %s "checking for pthread_kill in -lpthread... " >&6; }
22355 if test ${ac_cv_lib_pthread_pthread_kill+y}
22356 then :
22357 printf %s "(cached) " >&6
22358 else $as_nop
22359 ac_check_lib_save_LIBS=$LIBS
22360 LIBS="-lpthread $LIBS"
22361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22362 /* end confdefs.h. */
22363
22364 /* Override any GCC internal prototype to avoid an error.
22365 Use char because int might match the return type of a GCC
22366 builtin and then its argument prototype would still apply. */
22367 char pthread_kill ();
22368 int
22369 main (void)
22370 {
22371 return pthread_kill ();
22372 ;
22373 return 0;
22374 }
22375 _ACEOF
22376 if ac_fn_c_try_link "$LINENO"
22377 then :
22378 ac_cv_lib_pthread_pthread_kill=yes
22379 else $as_nop
22380 ac_cv_lib_pthread_pthread_kill=no
22381 fi
22382 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22383 conftest$ac_exeext conftest.$ac_ext
22384 LIBS=$ac_check_lib_save_LIBS
22385 fi
22386 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
22387 printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; }
22388 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
22389 then :
22390 gl_pthread_api=yes
22391 LIBPTHREAD=-lpthread
22392 LIBPMULTITHREAD=-lpthread
22393 fi
22394
22395 if test $gl_pthread_api != yes; then
22396 # For FreeBSD 4.
22397 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
22398 printf %s "checking for pthread_kill in -lc_r... " >&6; }
22399 if test ${ac_cv_lib_c_r_pthread_kill+y}
22400 then :
22401 printf %s "(cached) " >&6
22402 else $as_nop
22403 ac_check_lib_save_LIBS=$LIBS
22404 LIBS="-lc_r $LIBS"
22405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22406 /* end confdefs.h. */
22407
22408 /* Override any GCC internal prototype to avoid an error.
22409 Use char because int might match the return type of a GCC
22410 builtin and then its argument prototype would still apply. */
22411 char pthread_kill ();
22412 int
22413 main (void)
22414 {
22415 return pthread_kill ();
22416 ;
22417 return 0;
22418 }
22419 _ACEOF
22420 if ac_fn_c_try_link "$LINENO"
22421 then :
22422 ac_cv_lib_c_r_pthread_kill=yes
22423 else $as_nop
22424 ac_cv_lib_c_r_pthread_kill=no
22425 fi
22426 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22427 conftest$ac_exeext conftest.$ac_ext
22428 LIBS=$ac_check_lib_save_LIBS
22429 fi
22430 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
22431 printf "%s\n" "$ac_cv_lib_c_r_pthread_kill" >&6; }
22432 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes
22433 then :
22434 gl_pthread_api=yes
22435 LIBPTHREAD=-lc_r
22436 LIBPMULTITHREAD=-lc_r
22437 fi
22438
22439 fi
22440 fi
22441 echo "$as_me:22441: LIBPMULTITHREAD=$LIBPMULTITHREAD" >&5
22442 fi
22443 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
22444 printf %s "checking whether POSIX threads API is available... " >&6; }
22445 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
22446 printf "%s\n" "$gl_pthread_api" >&6; }
22447
22448
22449 if test $gl_pthread_api = yes; then
22450
22451 printf "%s\n" "#define HAVE_PTHREAD_API 1" >>confdefs.h
22452
22453 fi
22454
22455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22456 /* end confdefs.h. */
22457 #include <sched.h>
22458 int
22459 main (void)
22460 {
22461 sched_yield ();
22462 ;
22463 return 0;
22464 }
22465 _ACEOF
22466 if ac_fn_c_try_link "$LINENO"
22467 then :
22468 LIB_SCHED_YIELD=
22469
22470 else $as_nop
22471 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
22472 printf %s "checking for sched_yield in -lrt... " >&6; }
22473 if test ${ac_cv_lib_rt_sched_yield+y}
22474 then :
22475 printf %s "(cached) " >&6
22476 else $as_nop
22477 ac_check_lib_save_LIBS=$LIBS
22478 LIBS="-lrt $LIBS"
22479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22480 /* end confdefs.h. */
22481
22482 /* Override any GCC internal prototype to avoid an error.
22483 Use char because int might match the return type of a GCC
22484 builtin and then its argument prototype would still apply. */
22485 char sched_yield ();
22486 int
22487 main (void)
22488 {
22489 return sched_yield ();
22490 ;
22491 return 0;
22492 }
22493 _ACEOF
22494 if ac_fn_c_try_link "$LINENO"
22495 then :
22496 ac_cv_lib_rt_sched_yield=yes
22497 else $as_nop
22498 ac_cv_lib_rt_sched_yield=no
22499 fi
22500 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22501 conftest$ac_exeext conftest.$ac_ext
22502 LIBS=$ac_check_lib_save_LIBS
22503 fi
22504 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
22505 printf "%s\n" "$ac_cv_lib_rt_sched_yield" >&6; }
22506 if test "x$ac_cv_lib_rt_sched_yield" = xyes
22507 then :
22508 LIB_SCHED_YIELD=-lrt
22509 else $as_nop
22510 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
22511 printf %s "checking for sched_yield in -lposix4... " >&6; }
22512 if test ${ac_cv_lib_posix4_sched_yield+y}
22513 then :
22514 printf %s "(cached) " >&6
22515 else $as_nop
22516 ac_check_lib_save_LIBS=$LIBS
22517 LIBS="-lposix4 $LIBS"
22518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22519 /* end confdefs.h. */
22520
22521 /* Override any GCC internal prototype to avoid an error.
22522 Use char because int might match the return type of a GCC
22523 builtin and then its argument prototype would still apply. */
22524 char sched_yield ();
22525 int
22526 main (void)
22527 {
22528 return sched_yield ();
22529 ;
22530 return 0;
22531 }
22532 _ACEOF
22533 if ac_fn_c_try_link "$LINENO"
22534 then :
22535 ac_cv_lib_posix4_sched_yield=yes
22536 else $as_nop
22537 ac_cv_lib_posix4_sched_yield=no
22538 fi
22539 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22540 conftest$ac_exeext conftest.$ac_ext
22541 LIBS=$ac_check_lib_save_LIBS
22542 fi
22543 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
22544 printf "%s\n" "$ac_cv_lib_posix4_sched_yield" >&6; }
22545 if test "x$ac_cv_lib_posix4_sched_yield" = xyes
22546 then :
22547 LIB_SCHED_YIELD=-lposix4
22548 fi
22549
22550 fi
22551
22552
22553 fi
22554 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22555 conftest$ac_exeext conftest.$ac_ext
22556
22557
22558 gl_pthreadlib_body_done=done
22559 fi
22560
22561 if test $ac_cv_header_threads_h = yes; then
22562 ac_fn_c_check_func "$LINENO" "thrd_create" "ac_cv_func_thrd_create"
22563 if test "x$ac_cv_func_thrd_create" = xyes
22564 then :
22565 printf "%s\n" "#define HAVE_THRD_CREATE 1" >>confdefs.h
22566
22567 fi
22568
22569 if test $ac_cv_func_thrd_create = yes; then
22570 LIBSTDTHREAD=
22571 else
22572 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for thrd_create in -lstdthreads" >&5
22573 printf %s "checking for thrd_create in -lstdthreads... " >&6; }
22574 if test ${ac_cv_lib_stdthreads_thrd_create+y}
22575 then :
22576 printf %s "(cached) " >&6
22577 else $as_nop
22578 ac_check_lib_save_LIBS=$LIBS
22579 LIBS="-lstdthreads $LIBS"
22580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22581 /* end confdefs.h. */
22582
22583 /* Override any GCC internal prototype to avoid an error.
22584 Use char because int might match the return type of a GCC
22585 builtin and then its argument prototype would still apply. */
22586 char thrd_create ();
22587 int
22588 main (void)
22589 {
22590 return thrd_create ();
22591 ;
22592 return 0;
22593 }
22594 _ACEOF
22595 if ac_fn_c_try_link "$LINENO"
22596 then :
22597 ac_cv_lib_stdthreads_thrd_create=yes
22598 else $as_nop
22599 ac_cv_lib_stdthreads_thrd_create=no
22600 fi
22601 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22602 conftest$ac_exeext conftest.$ac_ext
22603 LIBS=$ac_check_lib_save_LIBS
22604 fi
22605 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_stdthreads_thrd_create" >&5
22606 printf "%s\n" "$ac_cv_lib_stdthreads_thrd_create" >&6; }
22607 if test "x$ac_cv_lib_stdthreads_thrd_create" = xyes
22608 then :
22609
22610 LIBSTDTHREAD='-lstdthreads -lpthread'
22611
22612 else $as_nop
22613
22614 LIBSTDTHREAD="$LIBPMULTITHREAD"
22615
22616 fi
22617
22618 fi
22619 else
22620 LIBSTDTHREAD="$LIBPMULTITHREAD $LIB_SCHED_YIELD"
22621 fi
22622 ;;
22623 esac
22624
22625
22626 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ISO C threads API is available" >&5
22627 printf %s "checking whether ISO C threads API is available... " >&6; }
22628 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_threads_h" >&5
22629 printf "%s\n" "$ac_cv_header_threads_h" >&6; }
22630 gl_stdthreadlib_body_done=done
22631 fi
22632
22633 LIBTHREAD=$LIBSTDTHREAD LTLIBTHREAD=$LIBSTDTHREAD
22634 LIBMULTITHREAD=$LIBSTDTHREAD LTLIBMULTITHREAD=$LIBSTDTHREAD
22635 gl_threads_api=isoc
22636
22637 printf "%s\n" "#define USE_ISOC_THREADS 1" >>confdefs.h
22638
22639 fi
22640 fi
22641 if test $gl_threads_api = none; then
22642 case "$gl_use_threads" in
22643 yes | windows | win32) # The 'win32' is for backward compatibility.
22644 if { case "$host_os" in
22645 mingw*) true;;
22646 *) false;;
22647 esac
22648 }; then
22649 gl_threads_api=windows
22650
22651 printf "%s\n" "#define USE_WINDOWS_THREADS 1" >>confdefs.h
22652
22653 fi
22654 ;;
22655 esac
22656 fi
22657 fi
22658 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5
22659 printf %s "checking for multithread API to use... " >&6; }
22660 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5
22661 printf "%s\n" "$gl_threads_api" >&6; }
22662
22663
22664
22665
22666
22667
22668
22669
22670
22671
22672
22673 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc (0) returns nonnull" >&5
22674 printf %s "checking whether malloc (0) returns nonnull... " >&6; }
22675 if test ${ac_cv_func_malloc_0_nonnull+y}
22676 then :
22677 printf %s "(cached) " >&6
22678 else $as_nop
22679 if test "$cross_compiling" = yes
22680 then :
22681 case "$host_os" in
22682 # Guess yes on platforms where we know the result.
22683 *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
22684 | gnu* | *-musl* | midnightbsd* \
22685 | hpux* | solaris* | cygwin* | mingw* | msys* )
22686 ac_cv_func_malloc_0_nonnull="guessing yes" ;;
22687 # If we don't know, obey --enable-cross-guesses.
22688 *) ac_cv_func_malloc_0_nonnull="$gl_cross_guess_normal" ;;
22689 esac
22690
22691 else $as_nop
22692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22693 /* end confdefs.h. */
22694 #include <stdlib.h>
22695
22696 int
22697 main (void)
22698 {
22699 void *p = malloc (0);
22700 int result = !p;
22701 free (p);
22702 return result;
22703 ;
22704 return 0;
22705 }
22706
22707 _ACEOF
22708 if ac_fn_c_try_run "$LINENO"
22709 then :
22710 ac_cv_func_malloc_0_nonnull=yes
22711 else $as_nop
22712 ac_cv_func_malloc_0_nonnull=no
22713 fi
22714 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22715 conftest.$ac_objext conftest.beam conftest.$ac_ext
22716 fi
22717
22718
22719 fi
22720 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
22721 printf "%s\n" "$ac_cv_func_malloc_0_nonnull" >&6; }
22722 case $ac_cv_func_malloc_0_nonnull in #(
22723 *yes) :
22724 gl_cv_func_malloc_0_nonnull=1 ;; #(
22725 *) :
22726 gl_cv_func_malloc_0_nonnull=0 ;;
22727 esac
22728
22729
22730 printf "%s\n" "#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull" >>confdefs.h
22731
22732
22733
22734
22735
22736
22737
22738 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
22739 printf %s "checking for a traditional japanese locale... " >&6; }
22740 if test ${gt_cv_locale_ja+y}
22741 then :
22742 printf %s "(cached) " >&6
22743 else $as_nop
22744
22745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22746 /* end confdefs.h. */
22747
22748 #include <locale.h>
22749 #include <time.h>
22750 #if HAVE_LANGINFO_CODESET
22751 # include <langinfo.h>
22752 #endif
22753 #include <stdlib.h>
22754 #include <string.h>
22755 struct tm t;
22756 char buf[16];
22757 int main ()
22758 {
22759 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
22760 imitates locale dependent behaviour by looking at the environment
22761 variables, and all locales use the UTF-8 encoding. */
22762 #if defined __BEOS__ || defined __HAIKU__
22763 return 1;
22764 #else
22765 /* Check whether the given locale name is recognized by the system. */
22766 # if defined _WIN32 && !defined __CYGWIN__
22767 /* On native Windows, setlocale(category, "") looks at the system settings,
22768 not at the environment variables. Also, when an encoding suffix such
22769 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
22770 category of the locale to "C". */
22771 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
22772 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
22773 return 1;
22774 # else
22775 if (setlocale (LC_ALL, "") == NULL) return 1;
22776 # endif
22777 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
22778 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
22779 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
22780 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
22781 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
22782 some unit tests fail.
22783 On MirBSD 10, when an unsupported locale is specified, setlocale()
22784 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
22785 # if HAVE_LANGINFO_CODESET
22786 {
22787 const char *cs = nl_langinfo (CODESET);
22788 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
22789 || strcmp (cs, "UTF-8") == 0)
22790 return 1;
22791 }
22792 # endif
22793 # ifdef __CYGWIN__
22794 /* On Cygwin, avoid locale names without encoding suffix, because the
22795 locale_charset() function relies on the encoding suffix. Note that
22796 LC_ALL is set on the command line. */
22797 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
22798 # endif
22799 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
22800 on Cygwin 1.5.x. */
22801 if (MB_CUR_MAX == 1)
22802 return 1;
22803 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
22804 This excludes the UTF-8 encoding (except on MirBSD). */
22805 {
22806 const char *p;
22807 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
22808 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
22809 for (p = buf; *p != '\0'; p++)
22810 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
22811 return 1;
22812 }
22813 return 0;
22814 #endif
22815 }
22816
22817 _ACEOF
22818 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
22819 (eval $ac_link) 2>&5
22820 ac_status=$?
22821 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22822 test $ac_status = 0; } && test -s conftest$ac_exeext; then
22823 case "$host_os" in
22824 # Handle native Windows specially, because there setlocale() interprets
22825 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
22826 # "fr" or "fra" as "French" or "French_France.1252",
22827 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
22828 # "ja" as "Japanese" or "Japanese_Japan.932",
22829 # and similar.
22830 mingw*)
22831 # Note that on native Windows, the Japanese locale is
22832 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
22833 # cannot use it here.
22834 gt_cv_locale_ja=none
22835 ;;
22836 *)
22837 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
22838 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
22839 # configure script would override the LC_ALL setting. Likewise for
22840 # LC_CTYPE, which is also set at the beginning of the configure script.
22841 # Test for the AIX locale name.
22842 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
22843 gt_cv_locale_ja=ja_JP
22844 else
22845 # Test for the locale name with explicit encoding suffix.
22846 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
22847 gt_cv_locale_ja=ja_JP.EUC-JP
22848 else
22849 # Test for the HP-UX, OSF/1, NetBSD locale name.
22850 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
22851 gt_cv_locale_ja=ja_JP.eucJP
22852 else
22853 # Test for the IRIX, FreeBSD locale name.
22854 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
22855 gt_cv_locale_ja=ja_JP.EUC
22856 else
22857 # Test for the Solaris 7 locale name.
22858 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
22859 gt_cv_locale_ja=ja
22860 else
22861 # Special test for NetBSD 1.6.
22862 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
22863 gt_cv_locale_ja=ja_JP.eucJP
22864 else
22865 # None found.
22866 gt_cv_locale_ja=none
22867 fi
22868 fi
22869 fi
22870 fi
22871 fi
22872 fi
22873 ;;
22874 esac
22875 fi
22876 rm -fr conftest*
22877
22878 fi
22879 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
22880 printf "%s\n" "$gt_cv_locale_ja" >&6; }
22881 LOCALE_JA=$gt_cv_locale_ja
22882
22883
22884
22885
22886 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
22887 printf %s "checking for a french Unicode locale... " >&6; }
22888 if test ${gt_cv_locale_fr_utf8+y}
22889 then :
22890 printf %s "(cached) " >&6
22891 else $as_nop
22892
22893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22894 /* end confdefs.h. */
22895
22896 #include <locale.h>
22897 #include <time.h>
22898 #if HAVE_LANGINFO_CODESET
22899 # include <langinfo.h>
22900 #endif
22901 #include <stdlib.h>
22902 #include <string.h>
22903 struct tm t;
22904 char buf[16];
22905 int main () {
22906 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
22907 imitates locale dependent behaviour by looking at the environment
22908 variables, and all locales use the UTF-8 encoding. */
22909 #if !(defined __BEOS__ || defined __HAIKU__)
22910 /* Check whether the given locale name is recognized by the system. */
22911 # if defined _WIN32 && !defined __CYGWIN__
22912 /* On native Windows, setlocale(category, "") looks at the system settings,
22913 not at the environment variables. Also, when an encoding suffix such
22914 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
22915 category of the locale to "C". */
22916 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
22917 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
22918 return 1;
22919 # else
22920 if (setlocale (LC_ALL, "") == NULL) return 1;
22921 # endif
22922 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
22923 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
22924 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
22925 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
22926 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
22927 some unit tests fail. */
22928 # if HAVE_LANGINFO_CODESET
22929 {
22930 const char *cs = nl_langinfo (CODESET);
22931 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
22932 return 1;
22933 }
22934 # endif
22935 # ifdef __CYGWIN__
22936 /* On Cygwin, avoid locale names without encoding suffix, because the
22937 locale_charset() function relies on the encoding suffix. Note that
22938 LC_ALL is set on the command line. */
22939 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
22940 # endif
22941 /* Check whether in the abbreviation of the second month, the second
22942 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
22943 two bytes long, with UTF-8 encoding. */
22944 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
22945 if (strftime (buf, sizeof (buf), "%b", &t) < 4
22946 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
22947 return 1;
22948 #endif
22949 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
22950 /* Check whether the decimal separator is a comma.
22951 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
22952 are nl_langinfo(RADIXCHAR) are both ".". */
22953 if (localeconv () ->decimal_point[0] != ',') return 1;
22954 #endif
22955 return 0;
22956 }
22957
22958 _ACEOF
22959 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
22960 (eval $ac_link) 2>&5
22961 ac_status=$?
22962 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22963 test $ac_status = 0; } && test -s conftest$ac_exeext; then
22964 case "$host_os" in
22965 # Handle native Windows specially, because there setlocale() interprets
22966 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
22967 # "fr" or "fra" as "French" or "French_France.1252",
22968 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
22969 # "ja" as "Japanese" or "Japanese_Japan.932",
22970 # and similar.
22971 mingw*)
22972 # Test for the hypothetical native Windows locale name.
22973 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
22974 gt_cv_locale_fr_utf8=French_France.65001
22975 else
22976 # None found.
22977 gt_cv_locale_fr_utf8=none
22978 fi
22979 ;;
22980 *)
22981 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
22982 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
22983 # configure script would override the LC_ALL setting. Likewise for
22984 # LC_CTYPE, which is also set at the beginning of the configure script.
22985 # Test for the usual locale name.
22986 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
22987 gt_cv_locale_fr_utf8=fr_FR
22988 else
22989 # Test for the locale name with explicit encoding suffix.
22990 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
22991 gt_cv_locale_fr_utf8=fr_FR.UTF-8
22992 else
22993 # Test for the Solaris 7 locale name.
22994 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
22995 gt_cv_locale_fr_utf8=fr.UTF-8
22996 else
22997 # None found.
22998 gt_cv_locale_fr_utf8=none
22999 fi
23000 fi
23001 fi
23002 ;;
23003 esac
23004 fi
23005 rm -fr conftest*
23006
23007 fi
23008 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
23009 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
23010 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
23011
23012
23013
23014
23015
23016 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
23017 printf %s "checking for a transitional chinese locale... " >&6; }
23018 if test ${gt_cv_locale_zh_CN+y}
23019 then :
23020 printf %s "(cached) " >&6
23021 else $as_nop
23022
23023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23024 /* end confdefs.h. */
23025
23026 #include <locale.h>
23027 #include <stdlib.h>
23028 #include <time.h>
23029 #if HAVE_LANGINFO_CODESET
23030 # include <langinfo.h>
23031 #endif
23032 #include <stdlib.h>
23033 #include <string.h>
23034 struct tm t;
23035 char buf[16];
23036 int main ()
23037 {
23038 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
23039 imitates locale dependent behaviour by looking at the environment
23040 variables, and all locales use the UTF-8 encoding. */
23041 #if defined __BEOS__ || defined __HAIKU__
23042 return 1;
23043 #else
23044 /* Check whether the given locale name is recognized by the system. */
23045 # if defined _WIN32 && !defined __CYGWIN__
23046 /* On native Windows, setlocale(category, "") looks at the system settings,
23047 not at the environment variables. Also, when an encoding suffix such
23048 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
23049 category of the locale to "C". */
23050 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
23051 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
23052 return 1;
23053 # else
23054 if (setlocale (LC_ALL, "") == NULL) return 1;
23055 # endif
23056 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
23057 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
23058 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
23059 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
23060 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
23061 some unit tests fail.
23062 On MirBSD 10, when an unsupported locale is specified, setlocale()
23063 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
23064 # if HAVE_LANGINFO_CODESET
23065 {
23066 const char *cs = nl_langinfo (CODESET);
23067 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
23068 || strcmp (cs, "UTF-8") == 0)
23069 return 1;
23070 }
23071 # endif
23072 # ifdef __CYGWIN__
23073 /* On Cygwin, avoid locale names without encoding suffix, because the
23074 locale_charset() function relies on the encoding suffix. Note that
23075 LC_ALL is set on the command line. */
23076 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
23077 # endif
23078 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
23079 This excludes the UTF-8 encoding (except on MirBSD). */
23080 {
23081 const char *p;
23082 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
23083 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
23084 for (p = buf; *p != '\0'; p++)
23085 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
23086 return 1;
23087 }
23088 /* Check whether a typical GB18030 multibyte sequence is recognized as a
23089 single wide character. This excludes the GB2312 and GBK encodings. */
23090 if (mblen ("\203\062\332\066", 5) != 4)
23091 return 1;
23092 return 0;
23093 #endif
23094 }
23095
23096 _ACEOF
23097 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
23098 (eval $ac_link) 2>&5
23099 ac_status=$?
23100 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23101 test $ac_status = 0; } && test -s conftest$ac_exeext; then
23102 case "$host_os" in
23103 # Handle native Windows specially, because there setlocale() interprets
23104 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
23105 # "fr" or "fra" as "French" or "French_France.1252",
23106 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
23107 # "ja" as "Japanese" or "Japanese_Japan.932",
23108 # and similar.
23109 mingw*)
23110 # Test for the hypothetical native Windows locale name.
23111 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
23112 gt_cv_locale_zh_CN=Chinese_China.54936
23113 else
23114 # None found.
23115 gt_cv_locale_zh_CN=none
23116 fi
23117 ;;
23118 solaris2.8)
23119 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
23120 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
23121 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
23122 gt_cv_locale_zh_CN=none
23123 ;;
23124 *)
23125 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
23126 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
23127 # configure script would override the LC_ALL setting. Likewise for
23128 # LC_CTYPE, which is also set at the beginning of the configure script.
23129 # Test for the locale name without encoding suffix.
23130 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
23131 gt_cv_locale_zh_CN=zh_CN
23132 else
23133 # Test for the locale name with explicit encoding suffix.
23134 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
23135 gt_cv_locale_zh_CN=zh_CN.GB18030
23136 else
23137 # None found.
23138 gt_cv_locale_zh_CN=none
23139 fi
23140 fi
23141 ;;
23142 esac
23143 else
23144 # If there was a link error, due to mblen(), the system is so old that
23145 # it certainly doesn't have a chinese locale.
23146 gt_cv_locale_zh_CN=none
23147 fi
23148 rm -fr conftest*
23149
23150 fi
23151 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
23152 printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
23153 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
23154
23155
23156
23157
23158
23159
23160 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
23161 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
23162 # irrelevant for anonymous mappings.
23163 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
23164 if test "x$ac_cv_func_mmap" = xyes
23165 then :
23166 gl_have_mmap=yes
23167 else $as_nop
23168 gl_have_mmap=no
23169 fi
23170
23171
23172 # Try to allow MAP_ANONYMOUS.
23173 gl_have_mmap_anonymous=no
23174 if test $gl_have_mmap = yes; then
23175 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
23176 printf %s "checking for MAP_ANONYMOUS... " >&6; }
23177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23178 /* end confdefs.h. */
23179
23180 #include <sys/mman.h>
23181 #ifdef MAP_ANONYMOUS
23182 I cannot identify this map
23183 #endif
23184
23185 _ACEOF
23186 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23187 $EGREP "I cannot identify this map" >/dev/null 2>&1
23188 then :
23189 gl_have_mmap_anonymous=yes
23190 fi
23191 rm -rf conftest*
23192
23193 if test $gl_have_mmap_anonymous != yes; then
23194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23195 /* end confdefs.h. */
23196
23197 #include <sys/mman.h>
23198 #ifdef MAP_ANON
23199 I cannot identify this map
23200 #endif
23201
23202 _ACEOF
23203 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23204 $EGREP "I cannot identify this map" >/dev/null 2>&1
23205 then :
23206
23207 printf "%s\n" "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
23208
23209 gl_have_mmap_anonymous=yes
23210 fi
23211 rm -rf conftest*
23212
23213 fi
23214 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
23215 printf "%s\n" "$gl_have_mmap_anonymous" >&6; }
23216 if test $gl_have_mmap_anonymous = yes; then
23217
23218 printf "%s\n" "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
23219
23220 fi
23221 fi
23222
23223
23224
23225
23226 HAVE_MBSLEN=0;
23227 HAVE_EXPLICIT_BZERO=1;
23228 HAVE_FFSL=1;
23229 HAVE_FFSLL=1;
23230 HAVE_DECL_MEMMEM=1;
23231 HAVE_MEMPCPY=1;
23232 HAVE_DECL_MEMRCHR=1;
23233 HAVE_RAWMEMCHR=1;
23234 HAVE_STPCPY=1;
23235 HAVE_STPNCPY=1;
23236 HAVE_STRCHRNUL=1;
23237 HAVE_DECL_STRDUP=1;
23238 HAVE_DECL_STRNDUP=1;
23239 HAVE_DECL_STRNLEN=1;
23240 HAVE_STRPBRK=1;
23241 HAVE_STRSEP=1;
23242 HAVE_STRCASESTR=1;
23243 HAVE_DECL_STRTOK_R=1;
23244 HAVE_DECL_STRERROR_R=1;
23245 HAVE_STRERRORNAME_NP=1;
23246 HAVE_SIGABBREV_NP=1;
23247 HAVE_SIGDESCR_NP=1;
23248 HAVE_DECL_STRSIGNAL=1;
23249 HAVE_STRVERSCMP=1;
23250 REPLACE_FFSLL=0;
23251 REPLACE_MEMCHR=0;
23252 REPLACE_MEMMEM=0;
23253 REPLACE_STPNCPY=0;
23254 REPLACE_STRCHRNUL=0;
23255 REPLACE_STRDUP=0;
23256 REPLACE_STRNCAT=0;
23257 REPLACE_STRNDUP=0;
23258 REPLACE_STRNLEN=0;
23259 REPLACE_STRSTR=0;
23260 REPLACE_STRCASESTR=0;
23261 REPLACE_STRTOK_R=0;
23262 REPLACE_STRERROR=0;
23263 REPLACE_STRERROR_R=0;
23264 REPLACE_STRERRORNAME_NP=0;
23265 REPLACE_STRSIGNAL=0;
23266 UNDEFINE_STRTOK_R=0;
23267
23268
23269
23270
23271
23272
23273
23274
23275 # Detect platform-specific bugs in some versions of glibc:
23276 # memchr should not dereference anything with length 0
23277 # https://bugzilla.redhat.com/show_bug.cgi?id=499689
23278 # memchr should not dereference overestimated length after a match
23279 # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
23280 # https://sourceware.org/bugzilla/show_bug.cgi?id=10162
23281 # memchr should cast the second argument to 'unsigned char'.
23282 # This bug exists in Android 4.3.
23283 # Assume that memchr works on platforms that lack mprotect.
23284 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
23285 printf %s "checking whether memchr works... " >&6; }
23286 if test ${gl_cv_func_memchr_works+y}
23287 then :
23288 printf %s "(cached) " >&6
23289 else $as_nop
23290 if test "$cross_compiling" = yes
23291 then :
23292 case "$host_os" in
23293 # Guess no on Android.
23294 linux*-android*) gl_cv_func_memchr_works="guessing no" ;;
23295 # Guess yes on native Windows.
23296 mingw*) gl_cv_func_memchr_works="guessing yes" ;;
23297 # If we don't know, obey --enable-cross-guesses.
23298 *) gl_cv_func_memchr_works="$gl_cross_guess_normal" ;;
23299 esac
23300
23301 else $as_nop
23302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23303 /* end confdefs.h. */
23304
23305 #include <string.h>
23306 #if HAVE_SYS_MMAN_H
23307 # include <fcntl.h>
23308 # include <unistd.h>
23309 # include <sys/types.h>
23310 # include <sys/mman.h>
23311 # ifndef MAP_FILE
23312 # define MAP_FILE 0
23313 # endif
23314 #endif
23315
23316 int
23317 main (void)
23318 {
23319
23320 int result = 0;
23321 char *fence = NULL;
23322 #if HAVE_SYS_MMAN_H && HAVE_MPROTECT
23323 # if HAVE_MAP_ANONYMOUS
23324 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
23325 const int fd = -1;
23326 # else /* !HAVE_MAP_ANONYMOUS */
23327 const int flags = MAP_FILE | MAP_PRIVATE;
23328 int fd = open ("/dev/zero", O_RDONLY, 0666);
23329 if (fd >= 0)
23330 # endif
23331 {
23332 int pagesize = getpagesize ();
23333 char *two_pages =
23334 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
23335 flags, fd, 0);
23336 if (two_pages != (char *)(-1)
23337 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
23338 fence = two_pages + pagesize;
23339 }
23340 #endif
23341 if (fence)
23342 {
23343 /* Test against bugs on glibc systems. */
23344 if (memchr (fence, 0, 0))
23345 result |= 1;
23346 strcpy (fence - 9, "12345678");
23347 if (memchr (fence - 9, 0, 79) != fence - 1)
23348 result |= 2;
23349 if (memchr (fence - 1, 0, 3) != fence - 1)
23350 result |= 4;
23351 /* Test against bug on AIX 7.2. */
23352 if (memchr (fence - 4, '6', 16) != fence - 4)
23353 result |= 8;
23354 }
23355 /* Test against bug on Android 4.3. */
23356 {
23357 char input[3];
23358 input[0] = 'a';
23359 input[1] = 'b';
23360 input[2] = 'c';
23361 if (memchr (input, 0x789abc00 | 'b', 3) != input + 1)
23362 result |= 16;
23363 }
23364 return result;
23365
23366 ;
23367 return 0;
23368 }
23369 _ACEOF
23370 if ac_fn_c_try_run "$LINENO"
23371 then :
23372 gl_cv_func_memchr_works=yes
23373 else $as_nop
23374 gl_cv_func_memchr_works=no
23375 fi
23376 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23377 conftest.$ac_objext conftest.beam conftest.$ac_ext
23378 fi
23379
23380
23381 fi
23382 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
23383 printf "%s\n" "$gl_cv_func_memchr_works" >&6; }
23384 case "$gl_cv_func_memchr_works" in
23385 *yes) ;;
23386 *) REPLACE_MEMCHR=1 ;;
23387 esac
23388
23389
23390
23391 GL_GNULIB_EXPLICIT_BZERO=0
23392
23393
23394
23395 GL_GNULIB_FFSL=0
23396
23397
23398
23399 GL_GNULIB_FFSLL=0
23400
23401
23402
23403 GL_GNULIB_MEMCHR=0
23404
23405
23406
23407 GL_GNULIB_MEMMEM=0
23408
23409
23410
23411 GL_GNULIB_MEMPCPY=0
23412
23413
23414
23415 GL_GNULIB_MEMRCHR=0
23416
23417
23418
23419 GL_GNULIB_RAWMEMCHR=0
23420
23421
23422
23423 GL_GNULIB_STPCPY=0
23424
23425
23426
23427 GL_GNULIB_STPNCPY=0
23428
23429
23430
23431 GL_GNULIB_STRCHRNUL=0
23432
23433
23434
23435 GL_GNULIB_STRDUP=0
23436
23437
23438
23439 GL_GNULIB_STRNCAT=0
23440
23441
23442
23443 GL_GNULIB_STRNDUP=0
23444
23445
23446
23447 GL_GNULIB_STRNLEN=0
23448
23449
23450
23451 GL_GNULIB_STRPBRK=0
23452
23453
23454
23455 GL_GNULIB_STRSEP=0
23456
23457
23458
23459 GL_GNULIB_STRSTR=0
23460
23461
23462
23463 GL_GNULIB_STRCASESTR=0
23464
23465
23466
23467 GL_GNULIB_STRTOK_R=0
23468
23469
23470
23471 GL_GNULIB_MBSLEN=0
23472
23473
23474
23475 GL_GNULIB_MBSNLEN=0
23476
23477
23478
23479 GL_GNULIB_MBSCHR=0
23480
23481
23482
23483 GL_GNULIB_MBSRCHR=0
23484
23485
23486
23487 GL_GNULIB_MBSSTR=0
23488
23489
23490
23491 GL_GNULIB_MBSCASECMP=0
23492
23493
23494
23495 GL_GNULIB_MBSNCASECMP=0
23496
23497
23498
23499 GL_GNULIB_MBSPCASECMP=0
23500
23501
23502
23503 GL_GNULIB_MBSCASESTR=0
23504
23505
23506
23507 GL_GNULIB_MBSCSPN=0
23508
23509
23510
23511 GL_GNULIB_MBSPBRK=0
23512
23513
23514
23515 GL_GNULIB_MBSSPN=0
23516
23517
23518
23519 GL_GNULIB_MBSSEP=0
23520
23521
23522
23523 GL_GNULIB_MBSTOK_R=0
23524
23525
23526
23527 GL_GNULIB_STRERROR=0
23528
23529
23530
23531 GL_GNULIB_STRERROR_R=0
23532
23533
23534
23535 GL_GNULIB_STRERRORNAME_NP=0
23536
23537
23538
23539 GL_GNULIB_SIGABBREV_NP=0
23540
23541
23542
23543 GL_GNULIB_SIGDESCR_NP=0
23544
23545
23546
23547 GL_GNULIB_STRSIGNAL=0
23548
23549
23550
23551 GL_GNULIB_STRVERSCMP=0
23552
23553
23554
23555 GL_GNULIB_MDA_MEMCCPY=1
23556
23557
23558
23559 GL_GNULIB_MDA_STRDUP=1
23560
23561
23562
23563 ac_fn_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
23564 if test "x$ac_cv_have_decl_memrchr" = xyes
23565 then :
23566 ac_have_decl=1
23567 else $as_nop
23568 ac_have_decl=0
23569 fi
23570 printf "%s\n" "#define HAVE_DECL_MEMRCHR $ac_have_decl" >>confdefs.h
23571
23572
23573
23574
23575
23576
23577 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for O_CLOEXEC" >&5
23578 printf %s "checking for O_CLOEXEC... " >&6; }
23579 if test ${gl_cv_macro_O_CLOEXEC+y}
23580 then :
23581 printf %s "(cached) " >&6
23582 else $as_nop
23583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23584 /* end confdefs.h. */
23585 #include <fcntl.h>
23586 #ifndef O_CLOEXEC
23587 choke me;
23588 #endif
23589
23590 int
23591 main (void)
23592 {
23593 return O_CLOEXEC;
23594 ;
23595 return 0;
23596 }
23597 _ACEOF
23598 if ac_fn_c_try_compile "$LINENO"
23599 then :
23600 gl_cv_macro_O_CLOEXEC=yes
23601 else $as_nop
23602 gl_cv_macro_O_CLOEXEC=no
23603 fi
23604 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23605 fi
23606 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_macro_O_CLOEXEC" >&5
23607 printf "%s\n" "$gl_cv_macro_O_CLOEXEC" >&6; }
23608
23609
23610
23611
23612 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
23613 printf %s "checking for promoted mode_t type... " >&6; }
23614 if test ${gl_cv_promoted_mode_t+y}
23615 then :
23616 printf %s "(cached) " >&6
23617 else $as_nop
23618
23619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23620 /* end confdefs.h. */
23621 #include <sys/types.h>
23622 int
23623 main (void)
23624 {
23625 typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
23626 ;
23627 return 0;
23628 }
23629 _ACEOF
23630 if ac_fn_c_try_compile "$LINENO"
23631 then :
23632 gl_cv_promoted_mode_t='int'
23633 else $as_nop
23634 gl_cv_promoted_mode_t='mode_t'
23635 fi
23636 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23637
23638 fi
23639 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
23640 printf "%s\n" "$gl_cv_promoted_mode_t" >&6; }
23641
23642 printf "%s\n" "#define PROMOTED_MODE_T $gl_cv_promoted_mode_t" >>confdefs.h
23643
23644
23645
23646
23647 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
23648 printf %s "checking whether lstat correctly handles trailing slash... " >&6; }
23649 if test ${gl_cv_func_lstat_dereferences_slashed_symlink+y}
23650 then :
23651 printf %s "(cached) " >&6
23652 else $as_nop
23653 rm -f conftest.sym conftest.file
23654 echo >conftest.file
23655 if test "$cross_compiling" = yes
23656 then :
23657 case "$host_os" in
23658 linux-* | linux)
23659 # Guess yes on Linux systems.
23660 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
23661 *-gnu* | gnu*)
23662 # Guess yes on glibc systems.
23663 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
23664 mingw*)
23665 # Guess no on native Windows.
23666 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
23667 *)
23668 # If we don't know, obey --enable-cross-guesses.
23669 gl_cv_func_lstat_dereferences_slashed_symlink="$gl_cross_guess_normal" ;;
23670 esac
23671
23672 else $as_nop
23673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23674 /* end confdefs.h. */
23675 $ac_includes_default
23676 int
23677 main (void)
23678 {
23679 struct stat sbuf;
23680 if (symlink ("conftest.file", "conftest.sym") != 0)
23681 return 1;
23682 /* Linux will dereference the symlink and fail, as required by
23683 POSIX. That is better in the sense that it means we will not
23684 have to compile and use the lstat wrapper. */
23685 return lstat ("conftest.sym/", &sbuf) == 0;
23686
23687 ;
23688 return 0;
23689 }
23690 _ACEOF
23691 if ac_fn_c_try_run "$LINENO"
23692 then :
23693 gl_cv_func_lstat_dereferences_slashed_symlink=yes
23694 else $as_nop
23695 gl_cv_func_lstat_dereferences_slashed_symlink=no
23696 fi
23697 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23698 conftest.$ac_objext conftest.beam conftest.$ac_ext
23699 fi
23700
23701 rm -f conftest.sym conftest.file
23702
23703 fi
23704 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
23705 printf "%s\n" "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
23706 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
23707 *yes)
23708
23709 printf "%s\n" "#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1" >>confdefs.h
23710
23711 ;;
23712 esac
23713
23714
23715
23716
23717
23718 if test $REPLACE_MALLOC_FOR_MALLOC_POSIX = 1; then
23719 REPLACE_REALLOC_FOR_REALLOC_POSIX=1
23720 fi
23721
23722 ac_fn_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
23723 if test "x$ac_cv_have_decl_alarm" = xyes
23724 then :
23725 ac_have_decl=1
23726 else $as_nop
23727 ac_have_decl=0
23728 fi
23729 printf "%s\n" "#define HAVE_DECL_ALARM $ac_have_decl" >>confdefs.h
23730
23731
23732
23733
23734
23735 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
23736 printf %s "checking for stdbool.h that conforms to C99... " >&6; }
23737 if test ${ac_cv_header_stdbool_h+y}
23738 then :
23739 printf %s "(cached) " >&6
23740 else $as_nop
23741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23742 /* end confdefs.h. */
23743
23744 #include <stdbool.h>
23745
23746 #ifdef __cplusplus
23747 typedef bool Bool;
23748 #else
23749 typedef _Bool Bool;
23750 #ifndef bool
23751 "error: bool is not defined"
23752 #endif
23753 #ifndef false
23754 "error: false is not defined"
23755 #endif
23756 #if false
23757 "error: false is not 0"
23758 #endif
23759 #ifndef true
23760 "error: true is not defined"
23761 #endif
23762 #if true != 1
23763 "error: true is not 1"
23764 #endif
23765 #endif
23766
23767 #ifndef __bool_true_false_are_defined
23768 "error: __bool_true_false_are_defined is not defined"
23769 #endif
23770
23771 struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
23772
23773 char a[true == 1 ? 1 : -1];
23774 char b[false == 0 ? 1 : -1];
23775 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
23776 char d[(bool) 0.5 == true ? 1 : -1];
23777 /* See body of main program for 'e'. */
23778 char f[(Bool) 0.0 == false ? 1 : -1];
23779 char g[true];
23780 char h[sizeof (Bool)];
23781 char i[sizeof s.t];
23782 enum { j = false, k = true, l = false * true, m = true * 256 };
23783 /* The following fails for
23784 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
23785 Bool n[m];
23786 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
23787 char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
23788 /* Catch a bug in an HP-UX C compiler. See
23789 https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
23790 https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html
23791 */
23792 Bool q = true;
23793 Bool *pq = &q;
23794 bool *qq = &q;
23795
23796 int
23797 main (void)
23798 {
23799
23800 bool e = &s;
23801 *pq |= q; *pq |= ! q;
23802 *qq |= q; *qq |= ! q;
23803 /* Refer to every declared value, to avoid compiler optimizations. */
23804 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
23805 + !m + !n + !o + !p + !q + !pq + !qq);
23806
23807 ;
23808 return 0;
23809 }
23810 _ACEOF
23811 if ac_fn_c_try_compile "$LINENO"
23812 then :
23813 ac_cv_header_stdbool_h=yes
23814 else $as_nop
23815 ac_cv_header_stdbool_h=no
23816 fi
23817 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23818 fi
23819 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
23820 printf "%s\n" "$ac_cv_header_stdbool_h" >&6; }
23821 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
23822 if test "x$ac_cv_type__Bool" = xyes
23823 then :
23824
23825 printf "%s\n" "#define HAVE__BOOL 1" >>confdefs.h
23826
23827
23828 fi
23829
23830
23831
23832
23833 ac_fn_check_decl "$LINENO" "fcloseall" "ac_cv_have_decl_fcloseall" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
23834 if test "x$ac_cv_have_decl_fcloseall" = xyes
23835 then :
23836 ac_have_decl=1
23837 else $as_nop
23838 ac_have_decl=0
23839 fi
23840 printf "%s\n" "#define HAVE_DECL_FCLOSEALL $ac_have_decl" >>confdefs.h
23841
23842
23843
23844
23845 printf "%s\n" "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
23846
23847
23848
23849
23850
23851
23852
23853
23854
23855 if test $gl_cv_have_include_next = yes; then
23856 gl_cv_next_stdio_h='<'stdio.h'>'
23857 else
23858 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
23859 printf %s "checking absolute name of <stdio.h>... " >&6; }
23860 if test ${gl_cv_next_stdio_h+y}
23861 then :
23862 printf %s "(cached) " >&6
23863 else $as_nop
23864
23865
23866
23867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23868 /* end confdefs.h. */
23869 #include <stdio.h>
23870 _ACEOF
23871 case "$host_os" in
23872 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23873 *) gl_absname_cpp="$ac_cpp" ;;
23874 esac
23875
23876 case "$host_os" in
23877 mingw*)
23878 gl_dirsep_regex='[/\\]'
23879 ;;
23880 *)
23881 gl_dirsep_regex='\/'
23882 ;;
23883 esac
23884 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23885 gl_header_literal_regex=`echo 'stdio.h' \
23886 | sed -e "$gl_make_literal_regex_sed"`
23887 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23888 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23889 s|^/[^/]|//&|
23890 p
23891 q
23892 }'
23893
23894 gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23895 sed -n "$gl_absolute_header_sed"`
23896
23897 gl_header=$gl_cv_absolute_stdio_h
23898 gl_cv_next_stdio_h='"'$gl_header'"'
23899
23900
23901 fi
23902 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
23903 printf "%s\n" "$gl_cv_next_stdio_h" >&6; }
23904 fi
23905 NEXT_STDIO_H=$gl_cv_next_stdio_h
23906
23907 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23908 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23909 gl_next_as_first_directive='<'stdio.h'>'
23910 else
23911 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23912 gl_next_as_first_directive=$gl_cv_next_stdio_h
23913 fi
23914 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
23915
23916
23917
23918
23919
23920 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
23921 printf %s "checking which flavor of printf attribute matches inttypes macros... " >&6; }
23922 if test ${gl_cv_func_printf_attribute_flavor+y}
23923 then :
23924 printf %s "(cached) " >&6
23925 else $as_nop
23926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23927 /* end confdefs.h. */
23928
23929 #define __STDC_FORMAT_MACROS 1
23930 #include <stdio.h>
23931 #include <inttypes.h>
23932 /* For non-mingw systems, compilation will trivially succeed.
23933 For mingw, compilation will succeed for older mingw (system
23934 printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
23935 #if (defined _WIN32 && ! defined __CYGWIN__) && \
23936 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
23937 extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
23938 #endif
23939
23940 int
23941 main (void)
23942 {
23943
23944 ;
23945 return 0;
23946 }
23947 _ACEOF
23948 if ac_fn_c_try_compile "$LINENO"
23949 then :
23950 gl_cv_func_printf_attribute_flavor=system
23951 else $as_nop
23952 gl_cv_func_printf_attribute_flavor=gnu
23953 fi
23954 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23955 fi
23956 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
23957 printf "%s\n" "$gl_cv_func_printf_attribute_flavor" >&6; }
23958 if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
23959
23960 printf "%s\n" "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
23961
23962 fi
23963
23964
23965
23966
23967
23968
23969
23970
23971
23972
23973
23974
23975
23976 if test $ac_cv_have_decl_fcloseall = no; then
23977 HAVE_DECL_FCLOSEALL=0
23978 fi
23979
23980 ac_fn_check_decl "$LINENO" "ecvt" "ac_cv_have_decl_ecvt" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
23981 if test "x$ac_cv_have_decl_ecvt" = xyes
23982 then :
23983 ac_have_decl=1
23984 else $as_nop
23985 ac_have_decl=0
23986 fi
23987 printf "%s\n" "#define HAVE_DECL_ECVT $ac_have_decl" >>confdefs.h
23988
23989 ac_fn_check_decl "$LINENO" "fcvt" "ac_cv_have_decl_fcvt" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
23990 if test "x$ac_cv_have_decl_fcvt" = xyes
23991 then :
23992 ac_have_decl=1
23993 else $as_nop
23994 ac_have_decl=0
23995 fi
23996 printf "%s\n" "#define HAVE_DECL_FCVT $ac_have_decl" >>confdefs.h
23997
23998 ac_fn_check_decl "$LINENO" "gcvt" "ac_cv_have_decl_gcvt" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
23999 if test "x$ac_cv_have_decl_gcvt" = xyes
24000 then :
24001 ac_have_decl=1
24002 else $as_nop
24003 ac_have_decl=0
24004 fi
24005 printf "%s\n" "#define HAVE_DECL_GCVT $ac_have_decl" >>confdefs.h
24006
24007
24008
24009
24010
24011
24012
24013
24014
24015
24016
24017 if test $gl_cv_have_include_next = yes; then
24018 gl_cv_next_stdlib_h='<'stdlib.h'>'
24019 else
24020 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
24021 printf %s "checking absolute name of <stdlib.h>... " >&6; }
24022 if test ${gl_cv_next_stdlib_h+y}
24023 then :
24024 printf %s "(cached) " >&6
24025 else $as_nop
24026
24027
24028
24029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24030 /* end confdefs.h. */
24031 #include <stdlib.h>
24032 _ACEOF
24033 case "$host_os" in
24034 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24035 *) gl_absname_cpp="$ac_cpp" ;;
24036 esac
24037
24038 case "$host_os" in
24039 mingw*)
24040 gl_dirsep_regex='[/\\]'
24041 ;;
24042 *)
24043 gl_dirsep_regex='\/'
24044 ;;
24045 esac
24046 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24047 gl_header_literal_regex=`echo 'stdlib.h' \
24048 | sed -e "$gl_make_literal_regex_sed"`
24049 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24050 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24051 s|^/[^/]|//&|
24052 p
24053 q
24054 }'
24055
24056 gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24057 sed -n "$gl_absolute_header_sed"`
24058
24059 gl_header=$gl_cv_absolute_stdlib_h
24060 gl_cv_next_stdlib_h='"'$gl_header'"'
24061
24062
24063 fi
24064 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
24065 printf "%s\n" "$gl_cv_next_stdlib_h" >&6; }
24066 fi
24067 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
24068
24069 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24070 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24071 gl_next_as_first_directive='<'stdlib.h'>'
24072 else
24073 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24074 gl_next_as_first_directive=$gl_cv_next_stdlib_h
24075 fi
24076 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
24077
24078
24079
24080
24081
24082
24083
24084
24085
24086
24087
24088
24089 if test $ac_cv_have_decl_ecvt = no; then
24090 HAVE_DECL_ECVT=0
24091 fi
24092
24093 if test $ac_cv_have_decl_fcvt = no; then
24094 HAVE_DECL_FCVT=0
24095 fi
24096
24097 if test $ac_cv_have_decl_gcvt = no; then
24098 HAVE_DECL_GCVT=0
24099 fi
24100
24101
24102 HAVE_FFS=1;
24103 HAVE_STRCASECMP=1;
24104 HAVE_DECL_STRNCASECMP=1;
24105
24106 ac_fn_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
24107 if test "x$ac_cv_have_decl_strdup" = xyes
24108 then :
24109 ac_have_decl=1
24110 else $as_nop
24111 ac_have_decl=0
24112 fi
24113 printf "%s\n" "#define HAVE_DECL_STRDUP $ac_have_decl" >>confdefs.h
24114
24115
24116 REPLACE_STRERROR_0=0
24117 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
24118 printf %s "checking whether strerror(0) succeeds... " >&6; }
24119 if test ${gl_cv_func_strerror_0_works+y}
24120 then :
24121 printf %s "(cached) " >&6
24122 else $as_nop
24123 if test "$cross_compiling" = yes
24124 then :
24125 case "$host_os" in
24126 # Guess yes on glibc systems.
24127 *-gnu* | gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
24128 # Guess yes on musl systems.
24129 *-musl*) gl_cv_func_strerror_0_works="guessing yes" ;;
24130 # Guess yes on native Windows.
24131 mingw*) gl_cv_func_strerror_0_works="guessing yes" ;;
24132 # If we don't know, obey --enable-cross-guesses.
24133 *) gl_cv_func_strerror_0_works="$gl_cross_guess_normal" ;;
24134 esac
24135
24136 else $as_nop
24137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24138 /* end confdefs.h. */
24139 #include <string.h>
24140 #include <errno.h>
24141
24142 int
24143 main (void)
24144 {
24145 int result = 0;
24146 char *str;
24147 errno = 0;
24148 str = strerror (0);
24149 if (!*str) result |= 1;
24150 if (errno) result |= 2;
24151 if (strstr (str, "nknown") || strstr (str, "ndefined"))
24152 result |= 4;
24153 return result;
24154 ;
24155 return 0;
24156 }
24157 _ACEOF
24158 if ac_fn_c_try_run "$LINENO"
24159 then :
24160 gl_cv_func_strerror_0_works=yes
24161 else $as_nop
24162 gl_cv_func_strerror_0_works=no
24163 fi
24164 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24165 conftest.$ac_objext conftest.beam conftest.$ac_ext
24166 fi
24167
24168
24169 fi
24170 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
24171 printf "%s\n" "$gl_cv_func_strerror_0_works" >&6; }
24172 case "$gl_cv_func_strerror_0_works" in
24173 *yes) ;;
24174 *)
24175 REPLACE_STRERROR_0=1
24176
24177 printf "%s\n" "#define REPLACE_STRERROR_0 1" >>confdefs.h
24178
24179 ;;
24180 esac
24181
24182
24183
24184
24185
24186
24187
24188
24189
24190
24191
24192 if test $gl_cv_have_include_next = yes; then
24193 gl_cv_next_string_h='<'string.h'>'
24194 else
24195 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
24196 printf %s "checking absolute name of <string.h>... " >&6; }
24197 if test ${gl_cv_next_string_h+y}
24198 then :
24199 printf %s "(cached) " >&6
24200 else $as_nop
24201
24202
24203
24204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24205 /* end confdefs.h. */
24206 #include <string.h>
24207 _ACEOF
24208 case "$host_os" in
24209 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24210 *) gl_absname_cpp="$ac_cpp" ;;
24211 esac
24212
24213 case "$host_os" in
24214 mingw*)
24215 gl_dirsep_regex='[/\\]'
24216 ;;
24217 *)
24218 gl_dirsep_regex='\/'
24219 ;;
24220 esac
24221 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24222 gl_header_literal_regex=`echo 'string.h' \
24223 | sed -e "$gl_make_literal_regex_sed"`
24224 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24225 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24226 s|^/[^/]|//&|
24227 p
24228 q
24229 }'
24230
24231 gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24232 sed -n "$gl_absolute_header_sed"`
24233
24234 gl_header=$gl_cv_absolute_string_h
24235 gl_cv_next_string_h='"'$gl_header'"'
24236
24237
24238 fi
24239 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
24240 printf "%s\n" "$gl_cv_next_string_h" >&6; }
24241 fi
24242 NEXT_STRING_H=$gl_cv_next_string_h
24243
24244 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24245 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24246 gl_next_as_first_directive='<'string.h'>'
24247 else
24248 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24249 gl_next_as_first_directive=$gl_cv_next_string_h
24250 fi
24251 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
24252
24253
24254
24255
24256
24257
24258
24259
24260
24261
24262
24263
24264
24265
24266
24267
24268
24269
24270
24271
24272
24273
24274
24275 if test $gl_cv_have_include_next = yes; then
24276 gl_cv_next_strings_h='<'strings.h'>'
24277 else
24278 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <strings.h>" >&5
24279 printf %s "checking absolute name of <strings.h>... " >&6; }
24280 if test ${gl_cv_next_strings_h+y}
24281 then :
24282 printf %s "(cached) " >&6
24283 else $as_nop
24284
24285 if test $ac_cv_header_strings_h = yes; then
24286
24287
24288
24289
24290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24291 /* end confdefs.h. */
24292 #include <strings.h>
24293 _ACEOF
24294 case "$host_os" in
24295 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24296 *) gl_absname_cpp="$ac_cpp" ;;
24297 esac
24298
24299 case "$host_os" in
24300 mingw*)
24301 gl_dirsep_regex='[/\\]'
24302 ;;
24303 *)
24304 gl_dirsep_regex='\/'
24305 ;;
24306 esac
24307 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24308 gl_header_literal_regex=`echo 'strings.h' \
24309 | sed -e "$gl_make_literal_regex_sed"`
24310 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24311 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24312 s|^/[^/]|//&|
24313 p
24314 q
24315 }'
24316
24317 gl_cv_absolute_strings_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24318 sed -n "$gl_absolute_header_sed"`
24319
24320 gl_header=$gl_cv_absolute_strings_h
24321 gl_cv_next_strings_h='"'$gl_header'"'
24322 else
24323 gl_cv_next_strings_h='<'strings.h'>'
24324 fi
24325
24326
24327 fi
24328 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_strings_h" >&5
24329 printf "%s\n" "$gl_cv_next_strings_h" >&6; }
24330 fi
24331 NEXT_STRINGS_H=$gl_cv_next_strings_h
24332
24333 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24334 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24335 gl_next_as_first_directive='<'strings.h'>'
24336 else
24337 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24338 gl_next_as_first_directive=$gl_cv_next_strings_h
24339 fi
24340 NEXT_AS_FIRST_DIRECTIVE_STRINGS_H=$gl_next_as_first_directive
24341
24342
24343
24344
24345 if test $ac_cv_header_strings_h = yes; then
24346 HAVE_STRINGS_H=1
24347 else
24348 HAVE_STRINGS_H=0
24349 fi
24350
24351
24352
24353
24354
24355
24356
24357
24358 GL_GNULIB_FFS=0
24359
24360
24361
24362 ac_fn_check_decl "$LINENO" "strndup" "ac_cv_have_decl_strndup" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
24363 if test "x$ac_cv_have_decl_strndup" = xyes
24364 then :
24365 ac_have_decl=1
24366 else $as_nop
24367 ac_have_decl=0
24368 fi
24369 printf "%s\n" "#define HAVE_DECL_STRNDUP $ac_have_decl" >>confdefs.h
24370
24371
24372 ac_fn_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
24373 if test "x$ac_cv_have_decl_strnlen" = xyes
24374 then :
24375 ac_have_decl=1
24376 else $as_nop
24377 ac_have_decl=0
24378 fi
24379 printf "%s\n" "#define HAVE_DECL_STRNLEN $ac_have_decl" >>confdefs.h
24380
24381
24382
24383
24384
24385
24386
24387
24388
24389
24390
24391
24392
24393 printf "%s\n" "#define _USE_STD_STAT 1" >>confdefs.h
24394
24395
24396
24397
24398
24399
24400
24401
24402
24403
24404 if test $gl_cv_have_include_next = yes; then
24405 gl_cv_next_sys_types_h='<'sys/types.h'>'
24406 else
24407 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
24408 printf %s "checking absolute name of <sys/types.h>... " >&6; }
24409 if test ${gl_cv_next_sys_types_h+y}
24410 then :
24411 printf %s "(cached) " >&6
24412 else $as_nop
24413
24414
24415
24416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24417 /* end confdefs.h. */
24418 #include <sys/types.h>
24419 _ACEOF
24420 case "$host_os" in
24421 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24422 *) gl_absname_cpp="$ac_cpp" ;;
24423 esac
24424
24425 case "$host_os" in
24426 mingw*)
24427 gl_dirsep_regex='[/\\]'
24428 ;;
24429 *)
24430 gl_dirsep_regex='\/'
24431 ;;
24432 esac
24433 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24434 gl_header_literal_regex=`echo 'sys/types.h' \
24435 | sed -e "$gl_make_literal_regex_sed"`
24436 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24437 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24438 s|^/[^/]|//&|
24439 p
24440 q
24441 }'
24442
24443 gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24444 sed -n "$gl_absolute_header_sed"`
24445
24446 gl_header=$gl_cv_absolute_sys_types_h
24447 gl_cv_next_sys_types_h='"'$gl_header'"'
24448
24449
24450 fi
24451 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
24452 printf "%s\n" "$gl_cv_next_sys_types_h" >&6; }
24453 fi
24454 NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
24455
24456 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24457 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24458 gl_next_as_first_directive='<'sys/types.h'>'
24459 else
24460 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24461 gl_next_as_first_directive=$gl_cv_next_sys_types_h
24462 fi
24463 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
24464
24465
24466
24467
24468
24469
24470
24471
24472
24473
24474
24475
24476 WINDOWS_STAT_INODES=0
24477
24478
24479
24480
24481
24482
24483
24484 HAVE_DECL_LOCALTIME_R=1;
24485 HAVE_NANOSLEEP=1;
24486 HAVE_STRPTIME=1;
24487 HAVE_TIMEGM=1;
24488 HAVE_TIMESPEC_GET=1;
24489 HAVE_TIMESPEC_GETRES=1;
24490 HAVE_TIMEZONE_T=0;
24491 REPLACE_CTIME=GNULIB_PORTCHECK;
24492 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
24493 REPLACE_MKTIME=GNULIB_PORTCHECK;
24494 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
24495 REPLACE_STRFTIME=GNULIB_PORTCHECK;
24496 REPLACE_TIMEGM=GNULIB_PORTCHECK;
24497 REPLACE_TZSET=GNULIB_PORTCHECK;
24498
24499 : ${GNULIB_GETTIMEOFDAY=0};
24500 REPLACE_GMTIME=0;
24501 REPLACE_LOCALTIME=0;
24502
24503
24504
24505 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
24506 printf %s "checking for struct timespec in <time.h>... " >&6; }
24507 if test ${gl_cv_sys_struct_timespec_in_time_h+y}
24508 then :
24509 printf %s "(cached) " >&6
24510 else $as_nop
24511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24512 /* end confdefs.h. */
24513 #include <time.h>
24514
24515 int
24516 main (void)
24517 {
24518 static struct timespec x; x.tv_sec = x.tv_nsec;
24519 ;
24520 return 0;
24521 }
24522 _ACEOF
24523 if ac_fn_c_try_compile "$LINENO"
24524 then :
24525 gl_cv_sys_struct_timespec_in_time_h=yes
24526 else $as_nop
24527 gl_cv_sys_struct_timespec_in_time_h=no
24528 fi
24529 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
24530 fi
24531 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
24532 printf "%s\n" "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
24533
24534 TIME_H_DEFINES_STRUCT_TIMESPEC=0
24535 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
24536 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
24537 UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
24538 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
24539 TIME_H_DEFINES_STRUCT_TIMESPEC=1
24540 else
24541 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
24542 printf %s "checking for struct timespec in <sys/time.h>... " >&6; }
24543 if test ${gl_cv_sys_struct_timespec_in_sys_time_h+y}
24544 then :
24545 printf %s "(cached) " >&6
24546 else $as_nop
24547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24548 /* end confdefs.h. */
24549 #include <sys/time.h>
24550
24551 int
24552 main (void)
24553 {
24554 static struct timespec x; x.tv_sec = x.tv_nsec;
24555 ;
24556 return 0;
24557 }
24558 _ACEOF
24559 if ac_fn_c_try_compile "$LINENO"
24560 then :
24561 gl_cv_sys_struct_timespec_in_sys_time_h=yes
24562 else $as_nop
24563 gl_cv_sys_struct_timespec_in_sys_time_h=no
24564 fi
24565 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
24566 fi
24567 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
24568 printf "%s\n" "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
24569 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
24570 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
24571 else
24572 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
24573 printf %s "checking for struct timespec in <pthread.h>... " >&6; }
24574 if test ${gl_cv_sys_struct_timespec_in_pthread_h+y}
24575 then :
24576 printf %s "(cached) " >&6
24577 else $as_nop
24578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24579 /* end confdefs.h. */
24580 #include <pthread.h>
24581
24582 int
24583 main (void)
24584 {
24585 static struct timespec x; x.tv_sec = x.tv_nsec;
24586 ;
24587 return 0;
24588 }
24589 _ACEOF
24590 if ac_fn_c_try_compile "$LINENO"
24591 then :
24592 gl_cv_sys_struct_timespec_in_pthread_h=yes
24593 else $as_nop
24594 gl_cv_sys_struct_timespec_in_pthread_h=no
24595 fi
24596 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
24597 fi
24598 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
24599 printf "%s\n" "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
24600 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
24601 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
24602 else
24603 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
24604 printf %s "checking for struct timespec in <unistd.h>... " >&6; }
24605 if test ${gl_cv_sys_struct_timespec_in_unistd_h+y}
24606 then :
24607 printf %s "(cached) " >&6
24608 else $as_nop
24609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24610 /* end confdefs.h. */
24611 #include <unistd.h>
24612
24613 int
24614 main (void)
24615 {
24616 static struct timespec x; x.tv_sec = x.tv_nsec;
24617 ;
24618 return 0;
24619 }
24620 _ACEOF
24621 if ac_fn_c_try_compile "$LINENO"
24622 then :
24623 gl_cv_sys_struct_timespec_in_unistd_h=yes
24624 else $as_nop
24625 gl_cv_sys_struct_timespec_in_unistd_h=no
24626 fi
24627 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
24628 fi
24629 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
24630 printf "%s\n" "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
24631 if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
24632 UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
24633 fi
24634 fi
24635 fi
24636 fi
24637
24638
24639
24640
24641
24642
24643
24644
24645
24646
24647
24648
24649
24650
24651
24652
24653 if test $gl_cv_have_include_next = yes; then
24654 gl_cv_next_time_h='<'time.h'>'
24655 else
24656 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
24657 printf %s "checking absolute name of <time.h>... " >&6; }
24658 if test ${gl_cv_next_time_h+y}
24659 then :
24660 printf %s "(cached) " >&6
24661 else $as_nop
24662
24663
24664
24665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24666 /* end confdefs.h. */
24667 #include <time.h>
24668 _ACEOF
24669 case "$host_os" in
24670 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24671 *) gl_absname_cpp="$ac_cpp" ;;
24672 esac
24673
24674 case "$host_os" in
24675 mingw*)
24676 gl_dirsep_regex='[/\\]'
24677 ;;
24678 *)
24679 gl_dirsep_regex='\/'
24680 ;;
24681 esac
24682 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24683 gl_header_literal_regex=`echo 'time.h' \
24684 | sed -e "$gl_make_literal_regex_sed"`
24685 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24686 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24687 s|^/[^/]|//&|
24688 p
24689 q
24690 }'
24691
24692 gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24693 sed -n "$gl_absolute_header_sed"`
24694
24695 gl_header=$gl_cv_absolute_time_h
24696 gl_cv_next_time_h='"'$gl_header'"'
24697
24698
24699 fi
24700 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
24701 printf "%s\n" "$gl_cv_next_time_h" >&6; }
24702 fi
24703 NEXT_TIME_H=$gl_cv_next_time_h
24704
24705 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24706 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24707 gl_next_as_first_directive='<'time.h'>'
24708 else
24709 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24710 gl_next_as_first_directive=$gl_cv_next_time_h
24711 fi
24712 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
24713
24714
24715
24716
24717
24718
24719
24720
24721 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for TIME_UTC in <time.h>" >&5
24722 printf %s "checking for TIME_UTC in <time.h>... " >&6; }
24723 if test ${gl_cv_time_h_has_TIME_UTC+y}
24724 then :
24725 printf %s "(cached) " >&6
24726 else $as_nop
24727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24728 /* end confdefs.h. */
24729 #include <time.h>
24730
24731 int
24732 main (void)
24733 {
24734 static int x = TIME_UTC; x++;
24735 ;
24736 return 0;
24737 }
24738 _ACEOF
24739 if ac_fn_c_try_compile "$LINENO"
24740 then :
24741 gl_cv_time_h_has_TIME_UTC=yes
24742 else $as_nop
24743 gl_cv_time_h_has_TIME_UTC=no
24744 fi
24745 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
24746 fi
24747 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_h_has_TIME_UTC" >&5
24748 printf "%s\n" "$gl_cv_time_h_has_TIME_UTC" >&6; }
24749 if test $gl_cv_time_h_has_TIME_UTC = yes; then
24750 TIME_H_DEFINES_TIME_UTC=1
24751 else
24752 TIME_H_DEFINES_TIME_UTC=0
24753 fi
24754
24755
24756
24757
24758 GL_GNULIB_CTIME=0
24759
24760
24761
24762 GL_GNULIB_MKTIME=0
24763
24764
24765
24766 GL_GNULIB_LOCALTIME=0
24767
24768
24769
24770 GL_GNULIB_NANOSLEEP=0
24771
24772
24773
24774 GL_GNULIB_STRFTIME=0
24775
24776
24777
24778 GL_GNULIB_STRPTIME=0
24779
24780
24781
24782 GL_GNULIB_TIMEGM=0
24783
24784
24785
24786 GL_GNULIB_TIMESPEC_GET=0
24787
24788
24789
24790 GL_GNULIB_TIMESPEC_GETRES=0
24791
24792
24793
24794 GL_GNULIB_TIME_R=0
24795
24796
24797
24798 GL_GNULIB_TIME_RZ=0
24799
24800
24801
24802 GL_GNULIB_TZSET=0
24803
24804
24805
24806 GL_GNULIB_MDA_TZSET=1
24807
24808
24809
24810 ac_fn_check_decl "$LINENO" "execvpe" "ac_cv_have_decl_execvpe" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
24811 if test "x$ac_cv_have_decl_execvpe" = xyes
24812 then :
24813 ac_have_decl=1
24814 else $as_nop
24815 ac_have_decl=0
24816 fi
24817 printf "%s\n" "#define HAVE_DECL_EXECVPE $ac_have_decl" >>confdefs.h
24818
24819
24820
24821
24822
24823
24824
24825
24826
24827
24828
24829
24830
24831 if test $gl_cv_have_include_next = yes; then
24832 gl_cv_next_unistd_h='<'unistd.h'>'
24833 else
24834 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
24835 printf %s "checking absolute name of <unistd.h>... " >&6; }
24836 if test ${gl_cv_next_unistd_h+y}
24837 then :
24838 printf %s "(cached) " >&6
24839 else $as_nop
24840
24841 if test $ac_cv_header_unistd_h = yes; then
24842
24843
24844
24845
24846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24847 /* end confdefs.h. */
24848 #include <unistd.h>
24849 _ACEOF
24850 case "$host_os" in
24851 aix*) gl_absname_cpp="$ac_cpp -C" ;;
24852 *) gl_absname_cpp="$ac_cpp" ;;
24853 esac
24854
24855 case "$host_os" in
24856 mingw*)
24857 gl_dirsep_regex='[/\\]'
24858 ;;
24859 *)
24860 gl_dirsep_regex='\/'
24861 ;;
24862 esac
24863 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
24864 gl_header_literal_regex=`echo 'unistd.h' \
24865 | sed -e "$gl_make_literal_regex_sed"`
24866 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
24867 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
24868 s|^/[^/]|//&|
24869 p
24870 q
24871 }'
24872
24873 gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
24874 sed -n "$gl_absolute_header_sed"`
24875
24876 gl_header=$gl_cv_absolute_unistd_h
24877 gl_cv_next_unistd_h='"'$gl_header'"'
24878 else
24879 gl_cv_next_unistd_h='<'unistd.h'>'
24880 fi
24881
24882
24883 fi
24884 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
24885 printf "%s\n" "$gl_cv_next_unistd_h" >&6; }
24886 fi
24887 NEXT_UNISTD_H=$gl_cv_next_unistd_h
24888
24889 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
24890 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
24891 gl_next_as_first_directive='<'unistd.h'>'
24892 else
24893 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
24894 gl_next_as_first_directive=$gl_cv_next_unistd_h
24895 fi
24896 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
24897
24898
24899
24900
24901 if test $ac_cv_header_unistd_h = yes; then
24902 HAVE_UNISTD_H=1
24903 else
24904 HAVE_UNISTD_H=0
24905 fi
24906
24907
24908
24909
24910
24911
24912
24913
24914
24915
24916
24917
24918
24919 if test $ac_cv_have_decl_execvpe = no; then
24920 HAVE_DECL_EXECVPE=0
24921 fi
24922
24923
24924
24925
24926
24927
24928
24929 gl_libunistring_sed_extract_major='/^[0-9]/{s/^\([0-9]*\).*/\1/p;q;}
24930 i\
24931 0
24932 q
24933 '
24934 gl_libunistring_sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{s/^[0-9]*[.]\([0-9]*\).*/\1/p;q;}
24935 i\
24936 0
24937 q
24938 '
24939 gl_libunistring_sed_extract_subminor='/^[0-9][0-9]*[.][0-9][0-9]*[.][0-9]/{s/^[0-9]*[.][0-9]*[.]\([0-9]*\).*/\1/p;q;}
24940 i\
24941 0
24942 q
24943 '
24944
24945
24946 if test "$HAVE_LIBUNISTRING" = yes; then
24947 LIBUNISTRING_VERSION_MAJOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_major"`
24948 LIBUNISTRING_VERSION_MINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_minor"`
24949 LIBUNISTRING_VERSION_SUBMINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_subminor"`
24950 fi
24951
24952
24953
24954
24955 if test $ac_cv_header_features_h = yes; then
24956 HAVE_FEATURES_H=1
24957 else
24958 HAVE_FEATURES_H=0
24959 fi
24960
24961
24962
24963 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
24964 printf %s "checking for inttypes.h... " >&6; }
24965 if test ${gl_cv_header_inttypes_h+y}
24966 then :
24967 printf %s "(cached) " >&6
24968 else $as_nop
24969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24970 /* end confdefs.h. */
24971
24972 #include <sys/types.h>
24973 #include <inttypes.h>
24974
24975 int
24976 main (void)
24977 {
24978 uintmax_t i = (uintmax_t) -1; return !i;
24979 ;
24980 return 0;
24981 }
24982 _ACEOF
24983 if ac_fn_c_try_compile "$LINENO"
24984 then :
24985 gl_cv_header_inttypes_h=yes
24986 else $as_nop
24987 gl_cv_header_inttypes_h=no
24988 fi
24989 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
24990 fi
24991 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5
24992 printf "%s\n" "$gl_cv_header_inttypes_h" >&6; }
24993 if test $gl_cv_header_inttypes_h = yes; then
24994
24995 printf "%s\n" "#define HAVE_INTTYPES_H_WITH_UINTMAX 1" >>confdefs.h
24996
24997 fi
24998
24999
25000 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
25001 printf %s "checking for stdint.h... " >&6; }
25002 if test ${gl_cv_header_stdint_h+y}
25003 then :
25004 printf %s "(cached) " >&6
25005 else $as_nop
25006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25007 /* end confdefs.h. */
25008 #include <sys/types.h>
25009 #include <stdint.h>
25010 int
25011 main (void)
25012 {
25013 uintmax_t i = (uintmax_t) -1; return !i;
25014 ;
25015 return 0;
25016 }
25017 _ACEOF
25018 if ac_fn_c_try_compile "$LINENO"
25019 then :
25020 gl_cv_header_stdint_h=yes
25021 else $as_nop
25022 gl_cv_header_stdint_h=no
25023 fi
25024 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
25025 fi
25026 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5
25027 printf "%s\n" "$gl_cv_header_stdint_h" >&6; }
25028 if test $gl_cv_header_stdint_h = yes; then
25029
25030 printf "%s\n" "#define HAVE_STDINT_H_WITH_UINTMAX 1" >>confdefs.h
25031
25032 fi
25033
25034
25035
25036
25037 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
25038 printf %s "checking for intmax_t... " >&6; }
25039 if test ${gt_cv_c_intmax_t+y}
25040 then :
25041 printf %s "(cached) " >&6
25042 else $as_nop
25043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25044 /* end confdefs.h. */
25045
25046 #include <stddef.h>
25047 #include <stdlib.h>
25048 #if HAVE_STDINT_H_WITH_UINTMAX
25049 #include <stdint.h>
25050 #endif
25051 #if HAVE_INTTYPES_H_WITH_UINTMAX
25052 #include <inttypes.h>
25053 #endif
25054
25055 int
25056 main (void)
25057 {
25058 intmax_t x = -1; return !x;
25059 ;
25060 return 0;
25061 }
25062 _ACEOF
25063 if ac_fn_c_try_compile "$LINENO"
25064 then :
25065 gt_cv_c_intmax_t=yes
25066 else $as_nop
25067 gt_cv_c_intmax_t=no
25068 fi
25069 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
25070 fi
25071 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5
25072 printf "%s\n" "$gt_cv_c_intmax_t" >&6; }
25073 if test $gt_cv_c_intmax_t = yes; then
25074
25075 printf "%s\n" "#define HAVE_INTMAX_T 1" >>confdefs.h
25076
25077 else
25078
25079 printf "%s\n" "#define intmax_t long long" >>confdefs.h
25080
25081 fi
25082
25083
25084 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
25085 printf %s "checking where to find the exponent in a 'double'... " >&6; }
25086 if test ${gl_cv_cc_double_expbit0+y}
25087 then :
25088 printf %s "(cached) " >&6
25089 else $as_nop
25090
25091 if test "$cross_compiling" = yes
25092 then :
25093
25094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25095 /* end confdefs.h. */
25096
25097 #if defined arm || defined __arm || defined __arm__
25098 mixed_endianness
25099 #endif
25100
25101 _ACEOF
25102 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25103 $EGREP "mixed_endianness" >/dev/null 2>&1
25104 then :
25105 gl_cv_cc_double_expbit0="unknown"
25106 else $as_nop
25107
25108 :
25109 if test ${ac_cv_c_bigendian+y}
25110 then :
25111 printf %s "(cached) " >&6
25112 else $as_nop
25113 ac_cv_c_bigendian=unknown
25114 # See if we're dealing with a universal compiler.
25115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25116 /* end confdefs.h. */
25117 #ifndef __APPLE_CC__
25118 not a universal capable compiler
25119 #endif
25120 typedef int dummy;
25121
25122 _ACEOF
25123 if ac_fn_c_try_compile "$LINENO"
25124 then :
25125
25126 # Check for potential -arch flags. It is not universal unless
25127 # there are at least two -arch flags with different values.
25128 ac_arch=
25129 ac_prev=
25130 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
25131 if test -n "$ac_prev"; then
25132 case $ac_word in
25133 i?86 | x86_64 | ppc | ppc64)
25134 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
25135 ac_arch=$ac_word
25136 else
25137 ac_cv_c_bigendian=universal
25138 break
25139 fi
25140 ;;
25141 esac
25142 ac_prev=
25143 elif test "x$ac_word" = "x-arch"; then
25144 ac_prev=arch
25145 fi
25146 done
25147 fi
25148 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
25149 if test $ac_cv_c_bigendian = unknown; then
25150 # See if sys/param.h defines the BYTE_ORDER macro.
25151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25152 /* end confdefs.h. */
25153 #include <sys/types.h>
25154 #include <sys/param.h>
25155
25156 int
25157 main (void)
25158 {
25159 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
25160 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
25161 && LITTLE_ENDIAN)
25162 bogus endian macros
25163 #endif
25164
25165 ;
25166 return 0;
25167 }
25168 _ACEOF
25169 if ac_fn_c_try_compile "$LINENO"
25170 then :
25171 # It does; now see whether it defined to BIG_ENDIAN or not.
25172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25173 /* end confdefs.h. */
25174 #include <sys/types.h>
25175 #include <sys/param.h>
25176
25177 int
25178 main (void)
25179 {
25180 #if BYTE_ORDER != BIG_ENDIAN
25181 not big endian
25182 #endif
25183
25184 ;
25185 return 0;
25186 }
25187 _ACEOF
25188 if ac_fn_c_try_compile "$LINENO"
25189 then :
25190 ac_cv_c_bigendian=yes
25191 else $as_nop
25192 ac_cv_c_bigendian=no
25193 fi
25194 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
25195 fi
25196 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
25197 fi
25198 if test $ac_cv_c_bigendian = unknown; then
25199 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
25200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25201 /* end confdefs.h. */
25202 #include <limits.h>
25203
25204 int
25205 main (void)
25206 {
25207 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
25208 bogus endian macros
25209 #endif
25210
25211 ;
25212 return 0;
25213 }
25214 _ACEOF
25215 if ac_fn_c_try_compile "$LINENO"
25216 then :
25217 # It does; now see whether it defined to _BIG_ENDIAN or not.
25218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25219 /* end confdefs.h. */
25220 #include <limits.h>
25221
25222 int
25223 main (void)
25224 {
25225 #ifndef _BIG_ENDIAN
25226 not big endian
25227 #endif
25228
25229 ;
25230 return 0;
25231 }
25232 _ACEOF
25233 if ac_fn_c_try_compile "$LINENO"
25234 then :
25235 ac_cv_c_bigendian=yes
25236 else $as_nop
25237 ac_cv_c_bigendian=no
25238 fi
25239 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
25240 fi
25241 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
25242 fi
25243 if test $ac_cv_c_bigendian = unknown; then
25244 # Compile a test program.
25245 if test "$cross_compiling" = yes
25246 then :
25247 # Try to guess by grepping values from an object file.
25248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25249 /* end confdefs.h. */
25250 unsigned short int ascii_mm[] =
25251 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
25252 unsigned short int ascii_ii[] =
25253 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
25254 int use_ascii (int i) {
25255 return ascii_mm[i] + ascii_ii[i];
25256 }
25257 unsigned short int ebcdic_ii[] =
25258 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
25259 unsigned short int ebcdic_mm[] =
25260 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
25261 int use_ebcdic (int i) {
25262 return ebcdic_mm[i] + ebcdic_ii[i];
25263 }
25264 extern int foo;
25265
25266 int
25267 main (void)
25268 {
25269 return use_ascii (foo) == use_ebcdic (foo);
25270 ;
25271 return 0;
25272 }
25273 _ACEOF
25274 if ac_fn_c_try_compile "$LINENO"
25275 then :
25276 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
25277 ac_cv_c_bigendian=yes
25278 fi
25279 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
25280 if test "$ac_cv_c_bigendian" = unknown; then
25281 ac_cv_c_bigendian=no
25282 else
25283 # finding both strings is unlikely to happen, but who knows?
25284 ac_cv_c_bigendian=unknown
25285 fi
25286 fi
25287 fi
25288 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
25289 else $as_nop
25290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25291 /* end confdefs.h. */
25292 $ac_includes_default
25293 int
25294 main (void)
25295 {
25296
25297 /* Are we little or big endian? From Harbison&Steele. */
25298 union
25299 {
25300 long int l;
25301 char c[sizeof (long int)];
25302 } u;
25303 u.l = 1;
25304 return u.c[sizeof (long int) - 1] == 1;
25305
25306 ;
25307 return 0;
25308 }
25309 _ACEOF
25310 if ac_fn_c_try_run "$LINENO"
25311 then :
25312 ac_cv_c_bigendian=no
25313 else $as_nop
25314 ac_cv_c_bigendian=yes
25315 fi
25316 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25317 conftest.$ac_objext conftest.beam conftest.$ac_ext
25318 fi
25319
25320 fi
25321 fi
25322 :
25323 case $ac_cv_c_bigendian in #(
25324 yes)
25325 gl_cv_cc_double_expbit0="word 0 bit 20";; #(
25326 no)
25327 gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
25328 universal)
25329
25330 printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
25331
25332 ;; #(
25333 *)
25334 gl_cv_cc_double_expbit0="unknown" ;;
25335 esac
25336
25337
25338 fi
25339 rm -rf conftest*
25340
25341
25342 else $as_nop
25343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25344 /* end confdefs.h. */
25345
25346 #include <float.h>
25347 #include <stddef.h>
25348 #include <stdio.h>
25349 #include <string.h>
25350 #define NWORDS \
25351 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
25352 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
25353 static unsigned int ored_words[NWORDS];
25354 static unsigned int anded_words[NWORDS];
25355 static void add_to_ored_words (double x)
25356 {
25357 memory_double m;
25358 size_t i;
25359 /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
25360 memset (&m, 0, sizeof (memory_double));
25361 m.value = x;
25362 for (i = 0; i < NWORDS; i++)
25363 {
25364 ored_words[i] |= m.word[i];
25365 anded_words[i] &= m.word[i];
25366 }
25367 }
25368 int main ()
25369 {
25370 size_t j;
25371 FILE *fp = fopen ("conftest.out", "w");
25372 if (fp == NULL)
25373 return 1;
25374 for (j = 0; j < NWORDS; j++)
25375 anded_words[j] = ~ (unsigned int) 0;
25376 add_to_ored_words (0.25);
25377 add_to_ored_words (0.5);
25378 add_to_ored_words (1.0);
25379 add_to_ored_words (2.0);
25380 add_to_ored_words (4.0);
25381 /* Remove bits that are common (e.g. if representation of the first mantissa
25382 bit is explicit). */
25383 for (j = 0; j < NWORDS; j++)
25384 ored_words[j] &= ~anded_words[j];
25385 /* Now find the nonzero word. */
25386 for (j = 0; j < NWORDS; j++)
25387 if (ored_words[j] != 0)
25388 break;
25389 if (j < NWORDS)
25390 {
25391 size_t i;
25392 for (i = j + 1; i < NWORDS; i++)
25393 if (ored_words[i] != 0)
25394 {
25395 fprintf (fp, "unknown");
25396 return (fclose (fp) != 0);
25397 }
25398 for (i = 0; ; i++)
25399 if ((ored_words[j] >> i) & 1)
25400 {
25401 fprintf (fp, "word %d bit %d", (int) j, (int) i);
25402 return (fclose (fp) != 0);
25403 }
25404 }
25405 fprintf (fp, "unknown");
25406 return (fclose (fp) != 0);
25407 }
25408
25409 _ACEOF
25410 if ac_fn_c_try_run "$LINENO"
25411 then :
25412 gl_cv_cc_double_expbit0=`cat conftest.out`
25413 else $as_nop
25414 gl_cv_cc_double_expbit0="unknown"
25415 fi
25416 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25417 conftest.$ac_objext conftest.beam conftest.$ac_ext
25418 fi
25419
25420 rm -f conftest.out
25421
25422 fi
25423 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
25424 printf "%s\n" "$gl_cv_cc_double_expbit0" >&6; }
25425 case "$gl_cv_cc_double_expbit0" in
25426 word*bit*)
25427 word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
25428 bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
25429
25430 printf "%s\n" "#define DBL_EXPBIT0_WORD $word" >>confdefs.h
25431
25432
25433 printf "%s\n" "#define DBL_EXPBIT0_BIT $bit" >>confdefs.h
25434
25435 ;;
25436 esac
25437
25438
25439
25440
25441
25442
25443
25444
25445 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5
25446 printf %s "checking whether snprintf returns a byte count as in C99... " >&6; }
25447 if test ${gl_cv_func_snprintf_retval_c99+y}
25448 then :
25449 printf %s "(cached) " >&6
25450 else $as_nop
25451
25452 if test "$cross_compiling" = yes
25453 then :
25454 case "$host_os" in
25455 # Guess yes on glibc systems.
25456 *-gnu* | gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";;
25457 # Guess yes on musl systems.
25458 *-musl*) gl_cv_func_snprintf_retval_c99="guessing yes";;
25459 # Guess yes on FreeBSD >= 5.
25460 freebsd[1-4].*) gl_cv_func_snprintf_retval_c99="guessing no";;
25461 freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
25462 midnightbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
25463 # Guess yes on Mac OS X >= 10.3.
25464 darwin[1-6].*) gl_cv_func_snprintf_retval_c99="guessing no";;
25465 darwin*) gl_cv_func_snprintf_retval_c99="guessing yes";;
25466 # Guess yes on OpenBSD >= 3.9.
25467 openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
25468 gl_cv_func_snprintf_retval_c99="guessing no";;
25469 openbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
25470 # Guess yes on Solaris >= 2.10.
25471 solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
25472 solaris*) gl_cv_func_printf_sizes_c99="guessing no";;
25473 # Guess yes on AIX >= 4.
25474 aix[1-3]*) gl_cv_func_snprintf_retval_c99="guessing no";;
25475 aix*) gl_cv_func_snprintf_retval_c99="guessing yes";;
25476 # Guess yes on NetBSD >= 3.
25477 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
25478 gl_cv_func_snprintf_retval_c99="guessing no";;
25479 netbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
25480 # Guess yes on BeOS.
25481 beos*) gl_cv_func_snprintf_retval_c99="guessing yes";;
25482 # Guess yes on Android.
25483 linux*-android*) gl_cv_func_snprintf_retval_c99="guessing yes";;
25484 # Guess yes on MSVC, no on mingw.
25485 mingw*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25486 /* end confdefs.h. */
25487
25488 #ifdef _MSC_VER
25489 Known
25490 #endif
25491
25492 _ACEOF
25493 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25494 $EGREP "Known" >/dev/null 2>&1
25495 then :
25496 gl_cv_func_snprintf_retval_c99="guessing yes"
25497 else $as_nop
25498 gl_cv_func_snprintf_retval_c99="guessing no"
25499 fi
25500 rm -rf conftest*
25501
25502 ;;
25503 # If we don't know, obey --enable-cross-guesses.
25504 *) gl_cv_func_snprintf_retval_c99="$gl_cross_guess_normal";;
25505 esac
25506
25507 else $as_nop
25508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25509 /* end confdefs.h. */
25510
25511 #include <stdio.h>
25512 #include <string.h>
25513 #if HAVE_SNPRINTF
25514 # define my_snprintf snprintf
25515 #else
25516 # include <stdarg.h>
25517 static int my_snprintf (char *buf, int size, const char *format, ...)
25518 {
25519 va_list args;
25520 int ret;
25521 va_start (args, format);
25522 ret = vsnprintf (buf, size, format, args);
25523 va_end (args);
25524 return ret;
25525 }
25526 #endif
25527 static char buf[100];
25528 int main ()
25529 {
25530 strcpy (buf, "ABCDEF");
25531 if (my_snprintf (buf, 3, "%d %d", 4567, 89) != 7)
25532 return 1;
25533 if (my_snprintf (buf, 0, "%d %d", 4567, 89) != 7)
25534 return 2;
25535 if (my_snprintf (NULL, 0, "%d %d", 4567, 89) != 7)
25536 return 3;
25537 return 0;
25538 }
25539 _ACEOF
25540 if ac_fn_c_try_run "$LINENO"
25541 then :
25542 gl_cv_func_snprintf_retval_c99=yes
25543 else $as_nop
25544 gl_cv_func_snprintf_retval_c99=no
25545 fi
25546 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25547 conftest.$ac_objext conftest.beam conftest.$ac_ext
25548 fi
25549
25550
25551 fi
25552 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_retval_c99" >&5
25553 printf "%s\n" "$gl_cv_func_snprintf_retval_c99" >&6; }
25554
25555
25556
25557
25558 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether snprintf truncates the result as in C99" >&5
25559 printf %s "checking whether snprintf truncates the result as in C99... " >&6; }
25560 if test ${gl_cv_func_snprintf_truncation_c99+y}
25561 then :
25562 printf %s "(cached) " >&6
25563 else $as_nop
25564
25565 if test "$cross_compiling" = yes
25566 then :
25567
25568 case "$host_os" in
25569 # Guess yes on glibc systems.
25570 *-gnu* | gnu*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
25571 # Guess yes on musl systems.
25572 *-musl*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
25573 # Guess yes on FreeBSD >= 5.
25574 freebsd[1-4].*) gl_cv_func_snprintf_truncation_c99="guessing no";;
25575 freebsd* | kfreebsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
25576 midnightbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
25577 # Guess yes on Mac OS X >= 10.3.
25578 darwin[1-6].*) gl_cv_func_snprintf_truncation_c99="guessing no";;
25579 darwin*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
25580 # Guess yes on OpenBSD >= 3.9.
25581 openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
25582 gl_cv_func_snprintf_truncation_c99="guessing no";;
25583 openbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
25584 # Guess yes on Solaris >= 2.6.
25585 solaris2.[0-5] | solaris2.[0-5].*)
25586 gl_cv_func_snprintf_truncation_c99="guessing no";;
25587 solaris*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
25588 # Guess yes on AIX >= 4.
25589 aix[1-3]*) gl_cv_func_snprintf_truncation_c99="guessing no";;
25590 aix*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
25591 # Guess yes on HP-UX >= 11.
25592 hpux[7-9]* | hpux10*) gl_cv_func_snprintf_truncation_c99="guessing no";;
25593 hpux*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
25594 # Guess yes on IRIX >= 6.5.
25595 irix6.5) gl_cv_func_snprintf_truncation_c99="guessing yes";;
25596 # Guess yes on OSF/1 >= 5.
25597 osf[3-4]*) gl_cv_func_snprintf_truncation_c99="guessing no";;
25598 osf*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
25599 # Guess yes on NetBSD >= 3.
25600 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
25601 gl_cv_func_snprintf_truncation_c99="guessing no";;
25602 netbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
25603 # Guess yes on BeOS.
25604 beos*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
25605 # Guess yes on Android.
25606 linux*-android*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
25607 # Guess no on native Windows.
25608 mingw*) gl_cv_func_snprintf_truncation_c99="guessing no";;
25609 # If we don't know, obey --enable-cross-guesses.
25610 *) gl_cv_func_snprintf_truncation_c99="$gl_cross_guess_normal";;
25611 esac
25612
25613 else $as_nop
25614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25615 /* end confdefs.h. */
25616
25617 #include <stdio.h>
25618 #include <string.h>
25619 #if HAVE_SNPRINTF
25620 # define my_snprintf snprintf
25621 #else
25622 # include <stdarg.h>
25623 static int my_snprintf (char *buf, int size, const char *format, ...)
25624 {
25625 va_list args;
25626 int ret;
25627 va_start (args, format);
25628 ret = vsnprintf (buf, size, format, args);
25629 va_end (args);
25630 return ret;
25631 }
25632 #endif
25633 static char buf[100];
25634 int main ()
25635 {
25636 strcpy (buf, "ABCDEF");
25637 my_snprintf (buf, 3, "%d %d", 4567, 89);
25638 if (memcmp (buf, "45\0DEF", 6) != 0)
25639 return 1;
25640 return 0;
25641 }
25642 _ACEOF
25643 if ac_fn_c_try_run "$LINENO"
25644 then :
25645 gl_cv_func_snprintf_truncation_c99=yes
25646 else $as_nop
25647 gl_cv_func_snprintf_truncation_c99=no
25648 fi
25649 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25650 conftest.$ac_objext conftest.beam conftest.$ac_ext
25651 fi
25652
25653
25654 fi
25655 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_truncation_c99" >&5
25656 printf "%s\n" "$gl_cv_func_snprintf_truncation_c99" >&6; }
25657
25658
25659
25660
25661
25662 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
25663 if test "x$ac_cv_func_snprintf" = xyes
25664 then :
25665 printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h
25666
25667 fi
25668 ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
25669 if test "x$ac_cv_func_strnlen" = xyes
25670 then :
25671 printf "%s\n" "#define HAVE_STRNLEN 1" >>confdefs.h
25672
25673 fi
25674 ac_fn_c_check_func "$LINENO" "wcslen" "ac_cv_func_wcslen"
25675 if test "x$ac_cv_func_wcslen" = xyes
25676 then :
25677 printf "%s\n" "#define HAVE_WCSLEN 1" >>confdefs.h
25678
25679 fi
25680 ac_fn_c_check_func "$LINENO" "wcsnlen" "ac_cv_func_wcsnlen"
25681 if test "x$ac_cv_func_wcsnlen" = xyes
25682 then :
25683 printf "%s\n" "#define HAVE_WCSNLEN 1" >>confdefs.h
25684
25685 fi
25686 ac_fn_c_check_func "$LINENO" "mbrtowc" "ac_cv_func_mbrtowc"
25687 if test "x$ac_cv_func_mbrtowc" = xyes
25688 then :
25689 printf "%s\n" "#define HAVE_MBRTOWC 1" >>confdefs.h
25690
25691 fi
25692 ac_fn_c_check_func "$LINENO" "wcrtomb" "ac_cv_func_wcrtomb"
25693 if test "x$ac_cv_func_wcrtomb" = xyes
25694 then :
25695 printf "%s\n" "#define HAVE_WCRTOMB 1" >>confdefs.h
25696
25697 fi
25698
25699 ac_fn_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h>
25700 " "$ac_c_undeclared_builtin_options" "CFLAGS"
25701 if test "x$ac_cv_have_decl__snprintf" = xyes
25702 then :
25703 ac_have_decl=1
25704 else $as_nop
25705 ac_have_decl=0
25706 fi
25707 printf "%s\n" "#define HAVE_DECL__SNPRINTF $ac_have_decl" >>confdefs.h
25708
25709
25710
25711 case "$gl_cv_func_snprintf_retval_c99" in
25712 *yes)
25713
25714 printf "%s\n" "#define HAVE_SNPRINTF_RETVAL_C99 1" >>confdefs.h
25715
25716 ;;
25717 esac
25718
25719 case "$gl_cv_func_snprintf_truncation_c99" in
25720 *yes)
25721
25722 printf "%s\n" "#define HAVE_SNPRINTF_TRUNCATION_C99 1" >>confdefs.h
25723
25724 ;;
25725 esac
25726
25727 ac_fn_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
25728 if test "x$ac_cv_have_decl_vsnprintf" = xyes
25729 then :
25730 ac_have_decl=1
25731 else $as_nop
25732 ac_have_decl=0
25733 fi
25734 printf "%s\n" "#define HAVE_DECL_VSNPRINTF $ac_have_decl" >>confdefs.h
25735
25736
25737
25738
25739 if test $ac_cv_header_crtdefs_h = yes; then
25740 HAVE_CRTDEFS_H=1
25741 else
25742 HAVE_CRTDEFS_H=0
25743 fi
25744
25745
25746
25747
25748
25749
25750
25751
25752
25753
25754
25755
25756
25757
25758 if test $gl_cv_have_include_next = yes; then
25759 gl_cv_next_wchar_h='<'wchar.h'>'
25760 else
25761 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
25762 printf %s "checking absolute name of <wchar.h>... " >&6; }
25763 if test ${gl_cv_next_wchar_h+y}
25764 then :
25765 printf %s "(cached) " >&6
25766 else $as_nop
25767
25768 if test $ac_cv_header_wchar_h = yes; then
25769
25770
25771
25772
25773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25774 /* end confdefs.h. */
25775 #include <wchar.h>
25776 _ACEOF
25777 case "$host_os" in
25778 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25779 *) gl_absname_cpp="$ac_cpp" ;;
25780 esac
25781
25782 case "$host_os" in
25783 mingw*)
25784 gl_dirsep_regex='[/\\]'
25785 ;;
25786 *)
25787 gl_dirsep_regex='\/'
25788 ;;
25789 esac
25790 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25791 gl_header_literal_regex=`echo 'wchar.h' \
25792 | sed -e "$gl_make_literal_regex_sed"`
25793 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25794 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25795 s|^/[^/]|//&|
25796 p
25797 q
25798 }'
25799
25800 gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25801 sed -n "$gl_absolute_header_sed"`
25802
25803 gl_header=$gl_cv_absolute_wchar_h
25804 gl_cv_next_wchar_h='"'$gl_header'"'
25805 else
25806 gl_cv_next_wchar_h='<'wchar.h'>'
25807 fi
25808
25809
25810 fi
25811 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
25812 printf "%s\n" "$gl_cv_next_wchar_h" >&6; }
25813 fi
25814 NEXT_WCHAR_H=$gl_cv_next_wchar_h
25815
25816 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25817 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25818 gl_next_as_first_directive='<'wchar.h'>'
25819 else
25820 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25821 gl_next_as_first_directive=$gl_cv_next_wchar_h
25822 fi
25823 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
25824
25825
25826
25827
25828 if test $ac_cv_header_wchar_h = yes; then
25829 HAVE_WCHAR_H=1
25830 else
25831 HAVE_WCHAR_H=0
25832 fi
25833
25834
25835
25836
25837
25838 if test $gt_cv_c_wint_t = yes; then
25839 HAVE_WINT_T=1
25840 else
25841 HAVE_WINT_T=0
25842 fi
25843
25844
25845
25846
25847
25848
25849
25850
25851
25852
25853 ac_fn_check_decl "$LINENO" "wcsdup" "ac_cv_have_decl_wcsdup" "
25854 #include <wchar.h>
25855
25856 " "$ac_c_undeclared_builtin_options" "CFLAGS"
25857 if test "x$ac_cv_have_decl_wcsdup" = xyes
25858 then :
25859 ac_have_decl=1
25860 else $as_nop
25861 ac_have_decl=0
25862 fi
25863 printf "%s\n" "#define HAVE_DECL_WCSDUP $ac_have_decl" >>confdefs.h
25864
25865 if test $ac_cv_have_decl_wcsdup = no; then
25866 HAVE_DECL_WCSDUP=0
25867 fi
25868
25869
25870
25871 HAVE_ISWBLANK=1;
25872 HAVE_WCTYPE_T=1;
25873 HAVE_WCTRANS_T=1;
25874 REPLACE_ISWBLANK=0;
25875 REPLACE_ISWDIGIT=0;
25876 REPLACE_ISWXDIGIT=0;
25877
25878
25879
25880
25881
25882
25883
25884
25885 if test $ac_cv_func_iswcntrl = yes; then
25886 HAVE_ISWCNTRL=1
25887 else
25888 HAVE_ISWCNTRL=0
25889 fi
25890
25891
25892
25893 if test $gt_cv_c_wint_t = yes; then
25894 HAVE_WINT_T=1
25895 else
25896 HAVE_WINT_T=0
25897 fi
25898
25899
25900
25901
25902
25903
25904
25905
25906
25907
25908
25909
25910
25911 if test $gl_cv_have_include_next = yes; then
25912 gl_cv_next_wctype_h='<'wctype.h'>'
25913 else
25914 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
25915 printf %s "checking absolute name of <wctype.h>... " >&6; }
25916 if test ${gl_cv_next_wctype_h+y}
25917 then :
25918 printf %s "(cached) " >&6
25919 else $as_nop
25920
25921 if test $ac_cv_header_wctype_h = yes; then
25922
25923
25924
25925
25926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25927 /* end confdefs.h. */
25928 #include <wctype.h>
25929 _ACEOF
25930 case "$host_os" in
25931 aix*) gl_absname_cpp="$ac_cpp -C" ;;
25932 *) gl_absname_cpp="$ac_cpp" ;;
25933 esac
25934
25935 case "$host_os" in
25936 mingw*)
25937 gl_dirsep_regex='[/\\]'
25938 ;;
25939 *)
25940 gl_dirsep_regex='\/'
25941 ;;
25942 esac
25943 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
25944 gl_header_literal_regex=`echo 'wctype.h' \
25945 | sed -e "$gl_make_literal_regex_sed"`
25946 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
25947 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
25948 s|^/[^/]|//&|
25949 p
25950 q
25951 }'
25952
25953 gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
25954 sed -n "$gl_absolute_header_sed"`
25955
25956 gl_header=$gl_cv_absolute_wctype_h
25957 gl_cv_next_wctype_h='"'$gl_header'"'
25958 else
25959 gl_cv_next_wctype_h='<'wctype.h'>'
25960 fi
25961
25962
25963 fi
25964 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
25965 printf "%s\n" "$gl_cv_next_wctype_h" >&6; }
25966 fi
25967 NEXT_WCTYPE_H=$gl_cv_next_wctype_h
25968
25969 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
25970 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
25971 gl_next_as_first_directive='<'wctype.h'>'
25972 else
25973 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
25974 gl_next_as_first_directive=$gl_cv_next_wctype_h
25975 fi
25976 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
25977
25978
25979
25980
25981 if test $ac_cv_header_wctype_h = yes; then
25982 if test $ac_cv_func_iswcntrl = yes; then
25983 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
25984 printf %s "checking whether iswcntrl works... " >&6; }
25985 if test ${gl_cv_func_iswcntrl_works+y}
25986 then :
25987 printf %s "(cached) " >&6
25988 else $as_nop
25989
25990 if test "$cross_compiling" = yes
25991 then :
25992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25993 /* end confdefs.h. */
25994 #include <stdlib.h>
25995 #if __GNU_LIBRARY__ == 1
25996 Linux libc5 i18n is broken.
25997 #endif
25998 int
25999 main (void)
26000 {
26001
26002 ;
26003 return 0;
26004 }
26005 _ACEOF
26006 if ac_fn_c_try_compile "$LINENO"
26007 then :
26008 gl_cv_func_iswcntrl_works="guessing yes"
26009 else $as_nop
26010 gl_cv_func_iswcntrl_works="guessing no"
26011 fi
26012 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
26013
26014 else $as_nop
26015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26016 /* end confdefs.h. */
26017
26018 #include <wchar.h>
26019 #include <wctype.h>
26020 int main () { return iswprint ('x') == 0; }
26021
26022 _ACEOF
26023 if ac_fn_c_try_run "$LINENO"
26024 then :
26025 gl_cv_func_iswcntrl_works=yes
26026 else $as_nop
26027 gl_cv_func_iswcntrl_works=no
26028 fi
26029 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26030 conftest.$ac_objext conftest.beam conftest.$ac_ext
26031 fi
26032
26033
26034 fi
26035 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
26036 printf "%s\n" "$gl_cv_func_iswcntrl_works" >&6; }
26037 fi
26038 HAVE_WCTYPE_H=1
26039 else
26040 HAVE_WCTYPE_H=0
26041 fi
26042
26043
26044 if test $GNULIBHEADERS_OVERRIDE_WINT_T = 1; then
26045 REPLACE_ISWCNTRL=1
26046 else
26047 case "$gl_cv_func_iswcntrl_works" in
26048 *yes) REPLACE_ISWCNTRL=0 ;;
26049 *) REPLACE_ISWCNTRL=1 ;;
26050 esac
26051 fi
26052
26053
26054 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
26055 :
26056 fi
26057
26058 if test $REPLACE_ISWCNTRL = 1; then
26059 REPLACE_TOWLOWER=1
26060 else
26061 ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
26062 if test "x$ac_cv_func_towlower" = xyes
26063 then :
26064 printf "%s\n" "#define HAVE_TOWLOWER 1" >>confdefs.h
26065
26066 fi
26067
26068 if test $ac_cv_func_towlower = yes; then
26069 REPLACE_TOWLOWER=0
26070 else
26071 ac_fn_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "#include <wchar.h>
26072 #if HAVE_WCTYPE_H
26073 # include <wctype.h>
26074 #endif
26075
26076 " "$ac_c_undeclared_builtin_options" "CFLAGS"
26077 if test "x$ac_cv_have_decl_towlower" = xyes
26078 then :
26079 ac_have_decl=1
26080 else $as_nop
26081 ac_have_decl=0
26082 fi
26083 printf "%s\n" "#define HAVE_DECL_TOWLOWER $ac_have_decl" >>confdefs.h
26084
26085 if test $ac_cv_have_decl_towlower = yes; then
26086 REPLACE_TOWLOWER=1
26087 else
26088 REPLACE_TOWLOWER=0
26089 fi
26090 fi
26091 fi
26092
26093
26094 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
26095 :
26096 fi
26097
26098 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
26099 printf %s "checking for wctype_t... " >&6; }
26100 if test ${gl_cv_type_wctype_t+y}
26101 then :
26102 printf %s "(cached) " >&6
26103 else $as_nop
26104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26105 /* end confdefs.h. */
26106 #include <wchar.h>
26107 #if HAVE_WCTYPE_H
26108 # include <wctype.h>
26109 #endif
26110 wctype_t a;
26111
26112 int
26113 main (void)
26114 {
26115
26116 ;
26117 return 0;
26118 }
26119 _ACEOF
26120 if ac_fn_c_try_compile "$LINENO"
26121 then :
26122 gl_cv_type_wctype_t=yes
26123 else $as_nop
26124 gl_cv_type_wctype_t=no
26125 fi
26126 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
26127
26128 fi
26129 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
26130 printf "%s\n" "$gl_cv_type_wctype_t" >&6; }
26131 if test $gl_cv_type_wctype_t = no; then
26132 HAVE_WCTYPE_T=0
26133 fi
26134
26135 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
26136 printf %s "checking for wctrans_t... " >&6; }
26137 if test ${gl_cv_type_wctrans_t+y}
26138 then :
26139 printf %s "(cached) " >&6
26140 else $as_nop
26141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26142 /* end confdefs.h. */
26143 #include <wchar.h>
26144 #include <wctype.h>
26145 wctrans_t a;
26146
26147 int
26148 main (void)
26149 {
26150
26151 ;
26152 return 0;
26153 }
26154 _ACEOF
26155 if ac_fn_c_try_compile "$LINENO"
26156 then :
26157 gl_cv_type_wctrans_t=yes
26158 else $as_nop
26159 gl_cv_type_wctrans_t=no
26160 fi
26161 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
26162
26163 fi
26164 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
26165 printf "%s\n" "$gl_cv_type_wctrans_t" >&6; }
26166 if test $gl_cv_type_wctrans_t = no; then
26167 HAVE_WCTRANS_T=0
26168 fi
26169
26170
26171
26172
26173
26174
26175
26176 GL_GNULIB_ISWBLANK=0
26177
26178
26179
26180 GL_GNULIB_ISWDIGIT=0
26181
26182
26183
26184 GL_GNULIB_ISWXDIGIT=0
26185
26186
26187
26188 GL_GNULIB_WCTYPE=0
26189
26190
26191
26192 GL_GNULIB_ISWCTYPE=0
26193
26194
26195
26196 GL_GNULIB_WCTRANS=0
26197
26198
26199
26200 GL_GNULIB_TOWCTRANS=0
26201
26202
26203
26204
26205
26206
26207
26208 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler option to allow warnings" >&5
26209 printf %s "checking for C compiler option to allow warnings... " >&6; }
26210 if test ${gl_cv_cc_wallow+y}
26211 then :
26212 printf %s "(cached) " >&6
26213 else $as_nop
26214 rm -f conftest*
26215 echo 'int dummy;' > conftest.c
26216 { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -c conftest.c 2>conftest1.err'
26217 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
26218 (eval $ac_try) 2>&5
26219 ac_status=$?
26220 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26221 test $ac_status = 0; }; } >/dev/null
26222 { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -Wno-error -c conftest.c 2>conftest2.err'
26223 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
26224 (eval $ac_try) 2>&5
26225 ac_status=$?
26226 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26227 test $ac_status = 0; }; } >/dev/null
26228 if test $? = 0 && test `wc -l < conftest1.err` = `wc -l < conftest2.err`; then
26229 gl_cv_cc_wallow='-Wno-error'
26230 else
26231 gl_cv_cc_wallow=none
26232 fi
26233 rm -f conftest*
26234
26235 fi
26236 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_wallow" >&5
26237 printf "%s\n" "$gl_cv_cc_wallow" >&6; }
26238 case "$gl_cv_cc_wallow" in
26239 none) GL_CFLAG_ALLOW_WARNINGS='' ;;
26240 *) GL_CFLAG_ALLOW_WARNINGS="$gl_cv_cc_wallow" ;;
26241 esac
26242
26243
26244
26245
26246 GL_CFLAG_GNULIB_WARNINGS=''
26247 if test -n "$GL_CFLAG_ALLOW_WARNINGS"; then
26248 cat > conftest.c <<\EOF
26249 #if __GNUC__ >= 3 || (__clang_major__ + (__clang_minor__ >= 9) > 3)
26250 -Wno-cast-qual
26251 -Wno-conversion
26252 -Wno-float-equal
26253 -Wno-sign-compare
26254 -Wno-undef
26255 -Wno-unused-function
26256 -Wno-unused-parameter
26257 #endif
26258 #if __GNUC__ + (__GNUC_MINOR__ >= 9) > 4 || (__clang_major__ + (__clang_minor__ >= 9) > 3)
26259 -Wno-float-conversion
26260 #endif
26261 #if __GNUC__ >= 7 || (__clang_major__ + (__clang_minor__ >= 9) > 3)
26262 -Wimplicit-fallthrough
26263 #endif
26264 #if __GNUC__ + (__GNUC_MINOR__ >= 8) > 4 || (__clang_major__ + (__clang_minor__ >= 9) > 3)
26265 -Wno-pedantic
26266 #endif
26267 #if __GNUC__ + (__GNUC_MINOR__ >= 3) > 4 || (__clang_major__ + (__clang_minor__ >= 9) > 3)
26268 -Wno-sign-conversion
26269 -Wno-type-limits
26270 #endif
26271 #if __GNUC__ + (__GNUC_MINOR__ >= 5) > 4
26272 -Wno-unsuffixed-float-constants
26273 #endif
26274 EOF
26275 gl_command="$CC $CFLAGS $CPPFLAGS -E conftest.c > conftest.out"
26276 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gl_command\""; } >&5
26277 (eval $gl_command) 2>&5
26278 ac_status=$?
26279 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26280 test $ac_status = 0; }; then
26281 gl_options=`grep -v '#' conftest.out`
26282 for word in $gl_options; do
26283 GL_CFLAG_GNULIB_WARNINGS="$GL_CFLAG_GNULIB_WARNINGS $word"
26284 done
26285 fi
26286 rm -f conftest.c conftest.out
26287 fi
26288
26289
26290
26291
26292 if false; then
26293 GL_COND_LIBTOOL_TRUE=
26294 GL_COND_LIBTOOL_FALSE='#'
26295 else
26296 GL_COND_LIBTOOL_TRUE='#'
26297 GL_COND_LIBTOOL_FALSE=
26298 fi
26299
26300 gl_cond_libtool=false
26301 gl_libdeps=
26302 gl_ltlibdeps=
26303 gl_m4_base='m4'
26304
26305
26306
26307
26308
26309
26310
26311
26312
26313
26314
26315
26316 gl_source_base='grub-core/lib/gnulib'
26317 gl_source_base_prefix=
26318
26319
26320 if test $ac_cv_func_alloca_works = no; then
26321 :
26322 fi
26323
26324 # Define an additional variable used in the Makefile substitution.
26325 if test $ac_cv_working_alloca_h = yes; then
26326 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
26327 printf %s "checking for alloca as a compiler built-in... " >&6; }
26328 if test ${gl_cv_rpl_alloca+y}
26329 then :
26330 printf %s "(cached) " >&6
26331 else $as_nop
26332
26333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26334 /* end confdefs.h. */
26335
26336 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
26337 Need own alloca
26338 #endif
26339
26340 _ACEOF
26341 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26342 $EGREP "Need own alloca" >/dev/null 2>&1
26343 then :
26344 gl_cv_rpl_alloca=yes
26345 else $as_nop
26346 gl_cv_rpl_alloca=no
26347 fi
26348 rm -rf conftest*
26349
26350
26351 fi
26352 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
26353 printf "%s\n" "$gl_cv_rpl_alloca" >&6; }
26354 if test $gl_cv_rpl_alloca = yes; then
26355
26356 printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h
26357
26358 GL_GENERATE_ALLOCA_H=true
26359 else
26360 GL_GENERATE_ALLOCA_H=false
26361 fi
26362 else
26363 GL_GENERATE_ALLOCA_H=true
26364 fi
26365
26366 if test $ac_cv_working_alloca_h = yes; then
26367 HAVE_ALLOCA_H=1
26368 else
26369 HAVE_ALLOCA_H=0
26370 fi
26371
26372
26373
26374
26375
26376
26377 case "$GL_GENERATE_ALLOCA_H" in
26378 false) ALLOCA_H='' ;;
26379 true)
26380 if test -z "$ALLOCA_H"; then
26381 ALLOCA_H="${gl_source_base_prefix}alloca.h"
26382 fi
26383 ;;
26384 *) echo "*** GL_GENERATE_ALLOCA_H is not set correctly" 1>&2; exit 1 ;;
26385 esac
26386
26387
26388 if $GL_GENERATE_ALLOCA_H; then
26389 GL_GENERATE_ALLOCA_H_TRUE=
26390 GL_GENERATE_ALLOCA_H_FALSE='#'
26391 else
26392 GL_GENERATE_ALLOCA_H_TRUE='#'
26393 GL_GENERATE_ALLOCA_H_FALSE=
26394 fi
26395 :
26396 if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
26397 GL_GENERATE_ALLOCA_H_TRUE='#'
26398 GL_GENERATE_ALLOCA_H_FALSE='#'
26399 fi
26400
26401
26402
26403
26404
26405
26406
26407
26408
26409
26410
26411 ac_fn_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
26412 " "$ac_c_undeclared_builtin_options" "CFLAGS"
26413 if test "x$ac_cv_have_decl_program_invocation_name" = xyes
26414 then :
26415 ac_have_decl=1
26416 else $as_nop
26417 ac_have_decl=0
26418 fi
26419 printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl" >>confdefs.h
26420 if test $ac_have_decl = 1
26421 then :
26422
26423 else $as_nop
26424
26425 printf "%s\n" "#define GNULIB_PROGRAM_INVOCATION_NAME 1" >>confdefs.h
26426
26427 fi
26428
26429 ac_fn_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
26430 " "$ac_c_undeclared_builtin_options" "CFLAGS"
26431 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes
26432 then :
26433 ac_have_decl=1
26434 else $as_nop
26435 ac_have_decl=0
26436 fi
26437 printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl" >>confdefs.h
26438 if test $ac_have_decl = 1
26439 then :
26440
26441 else $as_nop
26442
26443 printf "%s\n" "#define GNULIB_PROGRAM_INVOCATION_SHORT_NAME 1" >>confdefs.h
26444
26445 fi
26446
26447
26448 # Check if program_invocation_name and program_invocation_short_name
26449 # are defined elsewhere. It is improbable that only one of them will
26450 # be defined and other not, I prefer to stay on the safe side and to
26451 # test each one separately.
26452 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether program_invocation_name is defined" >&5
26453 printf %s "checking whether program_invocation_name is defined... " >&6; }
26454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26455 /* end confdefs.h. */
26456 extern char *program_invocation_name;
26457 int
26458 main (void)
26459 {
26460 program_invocation_name = "test";
26461 ;
26462 return 0;
26463 }
26464 _ACEOF
26465 if ac_fn_c_try_link "$LINENO"
26466 then :
26467
26468 printf "%s\n" "#define HAVE_PROGRAM_INVOCATION_NAME 1" >>confdefs.h
26469
26470 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26471 printf "%s\n" "yes" >&6; }
26472
26473 else $as_nop
26474 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
26475 printf "%s\n" "no" >&6; }
26476 fi
26477 rm -f core conftest.err conftest.$ac_objext conftest.beam \
26478 conftest$ac_exeext conftest.$ac_ext
26479
26480 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether program_invocation_short_name is defined" >&5
26481 printf %s "checking whether program_invocation_short_name is defined... " >&6; }
26482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26483 /* end confdefs.h. */
26484 extern char *program_invocation_short_name;
26485 int
26486 main (void)
26487 {
26488 program_invocation_short_name = "test";
26489 ;
26490 return 0;
26491 }
26492 _ACEOF
26493 if ac_fn_c_try_link "$LINENO"
26494 then :
26495
26496 printf "%s\n" "#define HAVE_PROGRAM_INVOCATION_SHORT_NAME 1" >>confdefs.h
26497
26498 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26499 printf "%s\n" "yes" >&6; }
26500
26501 else $as_nop
26502 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
26503 printf "%s\n" "no" >&6; }
26504 fi
26505 rm -f core conftest.err conftest.$ac_objext conftest.beam \
26506 conftest$ac_exeext conftest.$ac_ext
26507
26508
26509
26510
26511
26512
26513
26514
26515
26516
26517
26518
26519
26520
26521
26522
26523
26524
26525
26526
26527 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=argp_error:2:c-format"
26528
26529
26530
26531 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=argp_failure:4:c-format"
26532
26533
26534
26535
26536
26537
26538
26539
26540
26541
26542
26543
26544
26545 if test $ac_cv_func_btowc = no; then
26546 HAVE_BTOWC=0
26547 else
26548
26549
26550
26551
26552 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether btowc(0) is correct" >&5
26553 printf %s "checking whether btowc(0) is correct... " >&6; }
26554 if test ${gl_cv_func_btowc_nul+y}
26555 then :
26556 printf %s "(cached) " >&6
26557 else $as_nop
26558
26559 if test "$cross_compiling" = yes
26560 then :
26561
26562 case "$host_os" in
26563 # Guess no on Cygwin.
26564 cygwin*) gl_cv_func_btowc_nul="guessing no" ;;
26565 # Guess yes on native Windows.
26566 mingw*) gl_cv_func_btowc_nul="guessing yes" ;;
26567 # Guess yes otherwise.
26568 *) gl_cv_func_btowc_nul="guessing yes" ;;
26569 esac
26570
26571 else $as_nop
26572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26573 /* end confdefs.h. */
26574
26575 #include <wchar.h>
26576 int main ()
26577 {
26578 if (btowc ('\0') != 0)
26579 return 1;
26580 return 0;
26581 }
26582 _ACEOF
26583 if ac_fn_c_try_run "$LINENO"
26584 then :
26585 gl_cv_func_btowc_nul=yes
26586 else $as_nop
26587 gl_cv_func_btowc_nul=no
26588 fi
26589 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26590 conftest.$ac_objext conftest.beam conftest.$ac_ext
26591 fi
26592
26593
26594 fi
26595 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_nul" >&5
26596 printf "%s\n" "$gl_cv_func_btowc_nul" >&6; }
26597
26598 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5
26599 printf %s "checking whether btowc(EOF) is correct... " >&6; }
26600 if test ${gl_cv_func_btowc_eof+y}
26601 then :
26602 printf %s "(cached) " >&6
26603 else $as_nop
26604
26605 case "$host_os" in
26606 # Guess no on IRIX.
26607 irix*) gl_cv_func_btowc_eof="guessing no" ;;
26608 # Guess yes on native Windows.
26609 mingw*) gl_cv_func_btowc_eof="guessing yes" ;;
26610 # Guess yes otherwise.
26611 *) gl_cv_func_btowc_eof="guessing yes" ;;
26612 esac
26613 if test $LOCALE_FR != none; then
26614 if test "$cross_compiling" = yes
26615 then :
26616 :
26617 else $as_nop
26618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26619 /* end confdefs.h. */
26620
26621 #include <locale.h>
26622 #include <stdio.h>
26623 #include <wchar.h>
26624 int main ()
26625 {
26626 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
26627 {
26628 if (btowc (EOF) != WEOF)
26629 return 1;
26630 }
26631 return 0;
26632 }
26633 _ACEOF
26634 if ac_fn_c_try_run "$LINENO"
26635 then :
26636 gl_cv_func_btowc_eof=yes
26637 else $as_nop
26638 gl_cv_func_btowc_eof=no
26639 fi
26640 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26641 conftest.$ac_objext conftest.beam conftest.$ac_ext
26642 fi
26643
26644 fi
26645
26646 fi
26647 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5
26648 printf "%s\n" "$gl_cv_func_btowc_eof" >&6; }
26649
26650 case "$gl_cv_func_btowc_nul" in
26651 *yes) ;;
26652 *) REPLACE_BTOWC=1 ;;
26653 esac
26654 case "$gl_cv_func_btowc_eof" in
26655 *yes) ;;
26656 *) REPLACE_BTOWC=1 ;;
26657 esac
26658 fi
26659
26660
26661 if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
26662 GL_COND_OBJ_BTOWC_TRUE=
26663 GL_COND_OBJ_BTOWC_FALSE='#'
26664 else
26665 GL_COND_OBJ_BTOWC_TRUE='#'
26666 GL_COND_OBJ_BTOWC_FALSE=
26667 fi
26668 :
26669 if test -z "${GL_COND_OBJ_BTOWC_TRUE}" && test -z "${GL_COND_OBJ_BTOWC_FALSE}"; then
26670 GL_COND_OBJ_BTOWC_TRUE='#'
26671 GL_COND_OBJ_BTOWC_FALSE='#'
26672 fi
26673
26674 if test -z "$GL_COND_OBJ_BTOWC_TRUE"; then :
26675
26676
26677 :
26678
26679
26680 fi
26681
26682
26683
26684
26685
26686
26687
26688
26689
26690
26691
26692
26693
26694
26695 GL_GNULIB_BTOWC=1
26696
26697
26698
26699
26700
26701 printf "%s\n" "#define GNULIB_TEST_BTOWC 1" >>confdefs.h
26702
26703
26704
26705
26706 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __builtin_expect" >&5
26707 printf %s "checking for __builtin_expect... " >&6; }
26708 if test ${gl_cv___builtin_expect+y}
26709 then :
26710 printf %s "(cached) " >&6
26711 else $as_nop
26712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26713 /* end confdefs.h. */
26714
26715 int
26716 main (int argc, char **argv)
26717 {
26718 argc = __builtin_expect (argc, 100);
26719 return argv[argc != 100][0];
26720 }
26721 _ACEOF
26722 if ac_fn_c_try_link "$LINENO"
26723 then :
26724 gl_cv___builtin_expect=yes
26725 else $as_nop
26726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26727 /* end confdefs.h. */
26728
26729 #include <builtins.h>
26730 int
26731 main (int argc, char **argv)
26732 {
26733 argc = __builtin_expect (argc, 100);
26734 return argv[argc != 100][0];
26735 }
26736 _ACEOF
26737 if ac_fn_c_try_link "$LINENO"
26738 then :
26739 gl_cv___builtin_expect="in <builtins.h>"
26740 else $as_nop
26741 gl_cv___builtin_expect=no
26742 fi
26743 rm -f core conftest.err conftest.$ac_objext conftest.beam \
26744 conftest$ac_exeext conftest.$ac_ext
26745 fi
26746 rm -f core conftest.err conftest.$ac_objext conftest.beam \
26747 conftest$ac_exeext conftest.$ac_ext
26748 fi
26749 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv___builtin_expect" >&5
26750 printf "%s\n" "$gl_cv___builtin_expect" >&6; }
26751 if test "$gl_cv___builtin_expect" = yes; then
26752 printf "%s\n" "#define HAVE___BUILTIN_EXPECT 1" >>confdefs.h
26753
26754 elif test "$gl_cv___builtin_expect" = "in <builtins.h>"; then
26755 printf "%s\n" "#define HAVE___BUILTIN_EXPECT 2" >>confdefs.h
26756
26757 fi
26758
26759
26760
26761
26762
26763 REPLACE_CALLOC_FOR_CALLOC_GNU="$REPLACE_CALLOC_FOR_CALLOC_POSIX"
26764 if test $REPLACE_CALLOC_FOR_CALLOC_GNU = 0; then
26765
26766 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether calloc (0, n) and calloc (n, 0) return nonnull" >&5
26767 printf %s "checking whether calloc (0, n) and calloc (n, 0) return nonnull... " >&6; }
26768 if test ${ac_cv_func_calloc_0_nonnull+y}
26769 then :
26770 printf %s "(cached) " >&6
26771 else $as_nop
26772 if test $cross_compiling != yes; then
26773 ac_cv_func_calloc_0_nonnull=yes
26774 if test "$cross_compiling" = yes
26775 then :
26776 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
26777 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
26778 as_fn_error $? "cannot run test program while cross compiling
26779 See \`config.log' for more details" "$LINENO" 5; }
26780 else $as_nop
26781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26782 /* end confdefs.h. */
26783 $ac_includes_default
26784 int
26785 main (void)
26786 {
26787 int result = 0;
26788 char * volatile p = calloc (0, 0);
26789 if (!p)
26790 result |= 1;
26791 free (p);
26792 return result;
26793
26794 ;
26795 return 0;
26796 }
26797 _ACEOF
26798 if ac_fn_c_try_run "$LINENO"
26799 then :
26800
26801 else $as_nop
26802 ac_cv_func_calloc_0_nonnull=no
26803 fi
26804 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26805 conftest.$ac_objext conftest.beam conftest.$ac_ext
26806 fi
26807
26808 else
26809 case "$host_os" in
26810 # Guess yes on glibc systems.
26811 *-gnu* | gnu*) ac_cv_func_calloc_0_nonnull="guessing yes" ;;
26812 # Guess yes on musl systems.
26813 *-musl*) ac_cv_func_calloc_0_nonnull="guessing yes" ;;
26814 # Guess yes on native Windows.
26815 mingw*) ac_cv_func_calloc_0_nonnull="guessing yes" ;;
26816 # If we don't know, obey --enable-cross-guesses.
26817 *) ac_cv_func_calloc_0_nonnull="$gl_cross_guess_normal" ;;
26818 esac
26819 fi
26820
26821 fi
26822 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_calloc_0_nonnull" >&5
26823 printf "%s\n" "$ac_cv_func_calloc_0_nonnull" >&6; }
26824 case $ac_cv_func_calloc_0_nonnull in #(
26825 *yes) :
26826 ;; #(
26827 *) :
26828 REPLACE_CALLOC_FOR_CALLOC_GNU=1 ;;
26829 esac
26830
26831 fi
26832
26833 if test $REPLACE_CALLOC_FOR_CALLOC_GNU = 1; then
26834
26835
26836
26837
26838
26839
26840
26841
26842 gl_LIBOBJS="$gl_LIBOBJS calloc.$ac_objext"
26843
26844 fi
26845
26846
26847
26848
26849
26850
26851
26852
26853
26854 GL_GNULIB_CALLOC_GNU=1
26855
26856
26857
26858
26859
26860 printf "%s\n" "#define GNULIB_TEST_CALLOC_GNU 1" >>confdefs.h
26861
26862
26863
26864
26865
26866
26867 if test $REPLACE_MALLOC_FOR_MALLOC_POSIX = 1; then
26868 REPLACE_CALLOC_FOR_CALLOC_POSIX=1
26869 fi
26870
26871 if test $REPLACE_CALLOC_FOR_CALLOC_POSIX = 1; then
26872
26873
26874
26875
26876
26877
26878
26879
26880 gl_LIBOBJS="$gl_LIBOBJS calloc.$ac_objext"
26881
26882 fi
26883
26884
26885
26886
26887
26888
26889
26890
26891
26892 GL_GNULIB_CALLOC_POSIX=1
26893
26894
26895
26896
26897
26898 printf "%s\n" "#define GNULIB_TEST_CALLOC_POSIX 1" >>confdefs.h
26899
26900
26901
26902
26903
26904
26905
26906
26907
26908
26909
26910
26911 GL_GNULIB_CHDIR=1
26912
26913
26914
26915
26916
26917 printf "%s\n" "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
26918
26919
26920
26921
26922
26923 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether this system supports file names of any length" >&5
26924 printf %s "checking whether this system supports file names of any length... " >&6; }
26925 if test ${gl_cv_have_unlimited_file_name_length+y}
26926 then :
26927 printf %s "(cached) " >&6
26928 else $as_nop
26929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26930 /* end confdefs.h. */
26931
26932 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
26933 #if HAVE_UNISTD_H
26934 # include <unistd.h>
26935 #endif
26936 #include <limits.h>
26937 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
26938 # include <sys/param.h>
26939 #endif
26940 #if !defined PATH_MAX && defined MAXPATHLEN
26941 # define PATH_MAX MAXPATHLEN
26942 #endif
26943 #ifdef __hpux
26944 # undef PATH_MAX
26945 # define PATH_MAX 1024
26946 #endif
26947 #if defined _WIN32 && ! defined __CYGWIN__
26948 # undef PATH_MAX
26949 # define PATH_MAX 260
26950 #endif
26951
26952 #ifdef PATH_MAX
26953 have_arbitrary_file_name_length_limit
26954 #endif
26955 _ACEOF
26956 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26957 $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1
26958 then :
26959 gl_cv_have_unlimited_file_name_length=no
26960 else $as_nop
26961 gl_cv_have_unlimited_file_name_length=yes
26962 fi
26963 rm -rf conftest*
26964
26965 fi
26966 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_unlimited_file_name_length" >&5
26967 printf "%s\n" "$gl_cv_have_unlimited_file_name_length" >&6; }
26968
26969
26970 if test $gl_cv_have_unlimited_file_name_length = no; then
26971 GL_COND_OBJ_CHDIR_LONG_TRUE=
26972 GL_COND_OBJ_CHDIR_LONG_FALSE='#'
26973 else
26974 GL_COND_OBJ_CHDIR_LONG_TRUE='#'
26975 GL_COND_OBJ_CHDIR_LONG_FALSE=
26976 fi
26977 :
26978 if test -z "${GL_COND_OBJ_CHDIR_LONG_TRUE}" && test -z "${GL_COND_OBJ_CHDIR_LONG_FALSE}"; then
26979 GL_COND_OBJ_CHDIR_LONG_TRUE='#'
26980 GL_COND_OBJ_CHDIR_LONG_FALSE='#'
26981 fi
26982
26983 if test -z "$GL_COND_OBJ_CHDIR_LONG_TRUE"; then :
26984
26985 :
26986
26987 fi
26988
26989
26990 printf "%s\n" "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
26991
26992
26993
26994
26995
26996
26997 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
26998 REPLACE_CLOSE=1
26999 fi
27000
27001
27002
27003
27004
27005
27006 if test $ac_cv_header_sys_socket_h != yes; then
27007 ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
27008 if test "x$ac_cv_header_winsock2_h" = xyes
27009 then :
27010 printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
27011
27012 fi
27013
27014 fi
27015 if test "$ac_cv_header_winsock2_h" = yes; then
27016 HAVE_WINSOCK2_H=1
27017 UNISTD_H_HAVE_WINSOCK2_H=1
27018 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
27019 else
27020 HAVE_WINSOCK2_H=0
27021 fi
27022
27023
27024 if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
27025 REPLACE_CLOSE=1
27026 fi
27027
27028
27029 if test $REPLACE_CLOSE = 0; then
27030
27031
27032
27033 if test $ac_cv_func_fchdir = no; then
27034 HAVE_FCHDIR=0
27035 fi
27036
27037 if test $HAVE_FCHDIR = 0; then
27038 REPLACE_CLOSE=1
27039 fi
27040 fi
27041
27042
27043
27044 if test $REPLACE_CLOSE = 1; then
27045 GL_COND_OBJ_CLOSE_TRUE=
27046 GL_COND_OBJ_CLOSE_FALSE='#'
27047 else
27048 GL_COND_OBJ_CLOSE_TRUE='#'
27049 GL_COND_OBJ_CLOSE_FALSE=
27050 fi
27051 :
27052 if test -z "${GL_COND_OBJ_CLOSE_TRUE}" && test -z "${GL_COND_OBJ_CLOSE_FALSE}"; then
27053 GL_COND_OBJ_CLOSE_TRUE='#'
27054 GL_COND_OBJ_CLOSE_FALSE='#'
27055 fi
27056
27057
27058
27059
27060
27061
27062
27063
27064
27065
27066 GL_GNULIB_CLOSE=1
27067
27068
27069
27070
27071
27072 printf "%s\n" "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
27073
27074
27075
27076
27077
27078
27079
27080
27081
27082
27083
27084
27085
27086
27087
27088
27089
27090
27091
27092
27093
27094
27095 ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
27096 if test "x$ac_cv_func_dirfd" = xyes
27097 then :
27098 printf "%s\n" "#define HAVE_DIRFD 1" >>confdefs.h
27099
27100 fi
27101
27102 ac_fn_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
27103 #include <dirent.h>
27104 " "$ac_c_undeclared_builtin_options" "CFLAGS"
27105 if test "x$ac_cv_have_decl_dirfd" = xyes
27106 then :
27107 ac_have_decl=1
27108 else $as_nop
27109 ac_have_decl=0
27110 fi
27111 printf "%s\n" "#define HAVE_DECL_DIRFD $ac_have_decl" >>confdefs.h
27112
27113 if test $ac_cv_have_decl_dirfd = no; then
27114 HAVE_DECL_DIRFD=0
27115 fi
27116
27117 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
27118 printf %s "checking whether dirfd is a macro... " >&6; }
27119 if test ${gl_cv_func_dirfd_macro+y}
27120 then :
27121 printf %s "(cached) " >&6
27122 else $as_nop
27123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27124 /* end confdefs.h. */
27125
27126 #include <sys/types.h>
27127 #include <dirent.h>
27128 #ifdef dirfd
27129 dirent_header_defines_dirfd
27130 #endif
27131 _ACEOF
27132 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27133 $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1
27134 then :
27135 gl_cv_func_dirfd_macro=yes
27136 else $as_nop
27137 gl_cv_func_dirfd_macro=no
27138 fi
27139 rm -rf conftest*
27140
27141 fi
27142 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
27143 printf "%s\n" "$gl_cv_func_dirfd_macro" >&6; }
27144
27145 # Use the replacement if we have no function or macro with that name,
27146 # or if OS/2 kLIBC whose dirfd() does not work.
27147 # Replace only if the system declares dirfd already.
27148 case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in
27149 no,no,*,yes | *,*,os2*,yes)
27150 REPLACE_DIRFD=1
27151
27152 printf "%s\n" "#define REPLACE_DIRFD 1" >>confdefs.h
27153 ;;
27154 esac
27155
27156
27157 if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no || test $REPLACE_DIRFD = 1; then
27158 GL_COND_OBJ_DIRFD_TRUE=
27159 GL_COND_OBJ_DIRFD_FALSE='#'
27160 else
27161 GL_COND_OBJ_DIRFD_TRUE='#'
27162 GL_COND_OBJ_DIRFD_FALSE=
27163 fi
27164 :
27165 if test -z "${GL_COND_OBJ_DIRFD_TRUE}" && test -z "${GL_COND_OBJ_DIRFD_FALSE}"; then
27166 GL_COND_OBJ_DIRFD_TRUE='#'
27167 GL_COND_OBJ_DIRFD_FALSE='#'
27168 fi
27169
27170 if test -z "$GL_COND_OBJ_DIRFD_TRUE"; then :
27171
27172
27173 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
27174 printf %s "checking how to get the file descriptor associated with an open DIR*... " >&6; }
27175 if test ${gl_cv_sys_dir_fd_member_name+y}
27176 then :
27177 printf %s "(cached) " >&6
27178 else $as_nop
27179
27180 dirfd_save_CFLAGS=$CFLAGS
27181 for ac_expr in d_fd dd_fd; do
27182
27183 CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
27184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27185 /* end confdefs.h. */
27186
27187 #include <sys/types.h>
27188 #include <dirent.h>
27189 int
27190 main (void)
27191 {
27192 DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
27193 ;
27194 return 0;
27195 }
27196 _ACEOF
27197 if ac_fn_c_try_compile "$LINENO"
27198 then :
27199 dir_fd_found=yes
27200
27201 fi
27202 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27203 CFLAGS=$dirfd_save_CFLAGS
27204 test "$dir_fd_found" = yes && break
27205 done
27206 test "$dir_fd_found" = yes || ac_expr=no_such_member
27207
27208 gl_cv_sys_dir_fd_member_name=$ac_expr
27209
27210
27211 fi
27212 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
27213 printf "%s\n" "$gl_cv_sys_dir_fd_member_name" >&6; }
27214 if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
27215
27216 printf "%s\n" "#define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name" >>confdefs.h
27217
27218 fi
27219
27220
27221
27222 fi
27223
27224
27225
27226
27227
27228
27229
27230
27231
27232 GL_GNULIB_DIRFD=1
27233
27234
27235
27236
27237
27238 printf "%s\n" "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
27239
27240
27241
27242
27243
27244 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
27245 printf %s "checking whether // is distinct from /... " >&6; }
27246 if test ${gl_cv_double_slash_root+y}
27247 then :
27248 printf %s "(cached) " >&6
27249 else $as_nop
27250 if test x"$cross_compiling" = xyes ; then
27251 # When cross-compiling, there is no way to tell whether // is special
27252 # short of a list of hosts. However, the only known hosts to date
27253 # that have a distinct // are Apollo DomainOS (too old to port to),
27254 # Cygwin, and z/OS. If anyone knows of another system for which // has
27255 # special semantics and is distinct from /, please report it to
27256 # <[email protected]>.
27257 case $host in
27258 *-cygwin | i370-ibm-openedition)
27259 gl_cv_double_slash_root=yes ;;
27260 *)
27261 # Be optimistic and assume that / and // are the same when we
27262 # don't know.
27263 gl_cv_double_slash_root='unknown, assuming no' ;;
27264 esac
27265 else
27266 set x `ls -di / // 2>/dev/null`
27267 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
27268 gl_cv_double_slash_root=no
27269 else
27270 gl_cv_double_slash_root=yes
27271 fi
27272 fi
27273 fi
27274 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
27275 printf "%s\n" "$gl_cv_double_slash_root" >&6; }
27276 if test "$gl_cv_double_slash_root" = yes; then
27277
27278 printf "%s\n" "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
27279
27280 fi
27281
27282
27283
27284
27285 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
27286 printf %s "checking whether dup2 works... " >&6; }
27287 if test ${gl_cv_func_dup2_works+y}
27288 then :
27289 printf %s "(cached) " >&6
27290 else $as_nop
27291 if test "$cross_compiling" = yes
27292 then :
27293 case "$host_os" in
27294 mingw*) # on this platform, dup2 always returns 0 for success
27295 gl_cv_func_dup2_works="guessing no" ;;
27296 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
27297 gl_cv_func_dup2_works="guessing no" ;;
27298 aix* | freebsd*)
27299 # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
27300 # not EBADF.
27301 gl_cv_func_dup2_works="guessing no" ;;
27302 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
27303 gl_cv_func_dup2_works="guessing no" ;;
27304 *-android*) # implemented using dup3(), which fails if oldfd == newfd
27305 gl_cv_func_dup2_works="guessing no" ;;
27306 os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
27307 gl_cv_func_dup2_works="guessing no" ;;
27308 *) gl_cv_func_dup2_works="guessing yes" ;;
27309 esac
27310 else $as_nop
27311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27312 /* end confdefs.h. */
27313
27314 #include <errno.h>
27315 #include <fcntl.h>
27316 #include <limits.h>
27317 #include <sys/resource.h>
27318 #include <unistd.h>
27319
27320
27321 $gl_mda_defines
27322
27323 #ifndef RLIM_SAVED_CUR
27324 # define RLIM_SAVED_CUR RLIM_INFINITY
27325 #endif
27326 #ifndef RLIM_SAVED_MAX
27327 # define RLIM_SAVED_MAX RLIM_INFINITY
27328 #endif
27329
27330 int
27331 main (void)
27332 {
27333 int result = 0;
27334 int bad_fd = INT_MAX;
27335 struct rlimit rlim;
27336 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
27337 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
27338 && rlim.rlim_cur != RLIM_INFINITY
27339 && rlim.rlim_cur != RLIM_SAVED_MAX
27340 && rlim.rlim_cur != RLIM_SAVED_CUR)
27341 bad_fd = rlim.rlim_cur;
27342 #ifdef FD_CLOEXEC
27343 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
27344 result |= 1;
27345 #endif
27346 if (dup2 (1, 1) != 1)
27347 result |= 2;
27348 #ifdef FD_CLOEXEC
27349 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
27350 result |= 4;
27351 #endif
27352 close (0);
27353 if (dup2 (0, 0) != -1)
27354 result |= 8;
27355 /* Many gnulib modules require POSIX conformance of EBADF. */
27356 if (dup2 (2, bad_fd) == -1 && errno != EBADF)
27357 result |= 16;
27358 /* Flush out some cygwin core dumps. */
27359 if (dup2 (2, -1) != -1 || errno != EBADF)
27360 result |= 32;
27361 dup2 (2, 255);
27362 dup2 (2, 256);
27363 /* On OS/2 kLIBC, dup2() does not work on a directory fd. */
27364 {
27365 int fd = open (".", O_RDONLY);
27366 if (fd == -1)
27367 result |= 64;
27368 else if (dup2 (fd, fd + 1) == -1)
27369 result |= 128;
27370 close (fd);
27371 }
27372 return result;
27373 ;
27374 return 0;
27375 }
27376
27377 _ACEOF
27378 if ac_fn_c_try_run "$LINENO"
27379 then :
27380 gl_cv_func_dup2_works=yes
27381 else $as_nop
27382 gl_cv_func_dup2_works=no
27383 fi
27384 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27385 conftest.$ac_objext conftest.beam conftest.$ac_ext
27386 fi
27387
27388
27389 fi
27390 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
27391 printf "%s\n" "$gl_cv_func_dup2_works" >&6; }
27392 case "$gl_cv_func_dup2_works" in
27393 *yes) ;;
27394 *)
27395 REPLACE_DUP2=1
27396 ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
27397 if test "x$ac_cv_func_setdtablesize" = xyes
27398 then :
27399 printf "%s\n" "#define HAVE_SETDTABLESIZE 1" >>confdefs.h
27400
27401 fi
27402
27403 ;;
27404 esac
27405
27406
27407
27408
27409 if test $ac_cv_func_fchdir = no; then
27410 HAVE_FCHDIR=0
27411 fi
27412
27413 if test $HAVE_FCHDIR = 0; then
27414 REPLACE_DUP2=1
27415 fi
27416
27417
27418
27419 if test $REPLACE_DUP2 = 1; then
27420 GL_COND_OBJ_DUP2_TRUE=
27421 GL_COND_OBJ_DUP2_FALSE='#'
27422 else
27423 GL_COND_OBJ_DUP2_TRUE='#'
27424 GL_COND_OBJ_DUP2_FALSE=
27425 fi
27426 :
27427 if test -z "${GL_COND_OBJ_DUP2_TRUE}" && test -z "${GL_COND_OBJ_DUP2_FALSE}"; then
27428 GL_COND_OBJ_DUP2_TRUE='#'
27429 GL_COND_OBJ_DUP2_FALSE='#'
27430 fi
27431
27432 if test -z "$GL_COND_OBJ_DUP2_TRUE"; then :
27433
27434
27435
27436 fi
27437
27438
27439
27440
27441
27442
27443
27444
27445
27446 GL_GNULIB_DUP2=1
27447
27448
27449
27450
27451
27452 printf "%s\n" "#define GNULIB_TEST_DUP2 1" >>confdefs.h
27453
27454
27455
27456
27457
27458
27459
27460
27461
27462 case "$GL_GENERATE_ERRNO_H" in
27463 false) ERRNO_H='' ;;
27464 true)
27465 if test -z "$ERRNO_H"; then
27466 ERRNO_H="${gl_source_base_prefix}errno.h"
27467 fi
27468 ;;
27469 *) echo "*** GL_GENERATE_ERRNO_H is not set correctly" 1>&2; exit 1 ;;
27470 esac
27471
27472
27473 if $GL_GENERATE_ERRNO_H; then
27474 GL_GENERATE_ERRNO_H_TRUE=
27475 GL_GENERATE_ERRNO_H_FALSE='#'
27476 else
27477 GL_GENERATE_ERRNO_H_TRUE='#'
27478 GL_GENERATE_ERRNO_H_FALSE=
27479 fi
27480 :
27481 if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
27482 GL_GENERATE_ERRNO_H_TRUE='#'
27483 GL_GENERATE_ERRNO_H_FALSE='#'
27484 fi
27485
27486
27487
27488
27489
27490
27491
27492 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
27493 printf %s "checking for error_at_line... " >&6; }
27494 if test ${ac_cv_lib_error_at_line+y}
27495 then :
27496 printf %s "(cached) " >&6
27497 else $as_nop
27498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27499 /* end confdefs.h. */
27500 #include <error.h>
27501 int
27502 main (void)
27503 {
27504 error_at_line (0, 0, "", 0, "an error occurred");
27505 ;
27506 return 0;
27507 }
27508 _ACEOF
27509 if ac_fn_c_try_link "$LINENO"
27510 then :
27511 ac_cv_lib_error_at_line=yes
27512 else $as_nop
27513 ac_cv_lib_error_at_line=no
27514 fi
27515 rm -f core conftest.err conftest.$ac_objext conftest.beam \
27516 conftest$ac_exeext conftest.$ac_ext
27517 fi
27518 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
27519 printf "%s\n" "$ac_cv_lib_error_at_line" >&6; }
27520
27521
27522 if test "$ac_cv_lib_error_at_line" = no; then
27523 GL_COND_OBJ_ERROR_TRUE=
27524 GL_COND_OBJ_ERROR_FALSE='#'
27525 else
27526 GL_COND_OBJ_ERROR_TRUE='#'
27527 GL_COND_OBJ_ERROR_FALSE=
27528 fi
27529 :
27530 if test -z "${GL_COND_OBJ_ERROR_TRUE}" && test -z "${GL_COND_OBJ_ERROR_FALSE}"; then
27531 GL_COND_OBJ_ERROR_TRUE='#'
27532 GL_COND_OBJ_ERROR_FALSE='#'
27533 fi
27534
27535 if test -z "$GL_COND_OBJ_ERROR_TRUE"; then :
27536
27537
27538
27539
27540
27541 :
27542
27543
27544 fi
27545
27546
27547 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
27548
27549
27550
27551 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format"
27552
27553
27554
27555
27556
27557
27558
27559 if test $ac_cv_have_decl_fchdir = no; then
27560 HAVE_DECL_FCHDIR=0
27561 fi
27562
27563
27564 if test $HAVE_FCHDIR = 0; then
27565
27566 printf "%s\n" "#define REPLACE_FCHDIR 1" >>confdefs.h
27567
27568 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5
27569 printf %s "checking whether open can visit directories... " >&6; }
27570 if test ${gl_cv_func_open_directory_works+y}
27571 then :
27572 printf %s "(cached) " >&6
27573 else $as_nop
27574 if test "$cross_compiling" = yes
27575 then :
27576 case "$host_os" in
27577 # Guess yes on Linux systems.
27578 linux-* | linux) gl_cv_func_open_directory_works="guessing yes" ;;
27579 # Guess yes on glibc systems.
27580 *-gnu* | gnu*) gl_cv_func_open_directory_works="guessing yes" ;;
27581 # Guess no on native Windows.
27582 mingw*) gl_cv_func_open_directory_works="guessing no" ;;
27583 # If we don't know, obey --enable-cross-guesses.
27584 *) gl_cv_func_open_directory_works="$gl_cross_guess_normal" ;;
27585 esac
27586
27587 else $as_nop
27588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27589 /* end confdefs.h. */
27590 #include <fcntl.h>
27591
27592
27593 $gl_mda_defines
27594
27595 int
27596 main (void)
27597 {
27598 return open(".", O_RDONLY) < 0;
27599 ;
27600 return 0;
27601 }
27602 _ACEOF
27603 if ac_fn_c_try_run "$LINENO"
27604 then :
27605 gl_cv_func_open_directory_works=yes
27606 else $as_nop
27607 gl_cv_func_open_directory_works=no
27608 fi
27609 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27610 conftest.$ac_objext conftest.beam conftest.$ac_ext
27611 fi
27612
27613 fi
27614 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5
27615 printf "%s\n" "$gl_cv_func_open_directory_works" >&6; }
27616 case "$gl_cv_func_open_directory_works" in
27617 *yes) ;;
27618 *)
27619
27620 printf "%s\n" "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
27621
27622 ;;
27623 esac
27624 fi
27625
27626
27627 if test $HAVE_FCHDIR = 0; then
27628 GL_COND_OBJ_FCHDIR_TRUE=
27629 GL_COND_OBJ_FCHDIR_FALSE='#'
27630 else
27631 GL_COND_OBJ_FCHDIR_TRUE='#'
27632 GL_COND_OBJ_FCHDIR_FALSE=
27633 fi
27634 :
27635 if test -z "${GL_COND_OBJ_FCHDIR_TRUE}" && test -z "${GL_COND_OBJ_FCHDIR_FALSE}"; then
27636 GL_COND_OBJ_FCHDIR_TRUE='#'
27637 GL_COND_OBJ_FCHDIR_FALSE='#'
27638 fi
27639
27640 if test -z "$GL_COND_OBJ_FCHDIR_TRUE"; then :
27641
27642 :
27643
27644 fi
27645
27646
27647
27648
27649
27650
27651
27652
27653
27654 GL_GNULIB_FCHDIR=1
27655
27656
27657
27658
27659
27660 printf "%s\n" "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h
27661
27662
27663
27664
27665
27666
27667
27668
27669 if test $ac_cv_func_fcntl = no; then
27670
27671
27672
27673 if test $ac_cv_func_fcntl = no; then
27674 HAVE_FCNTL=0
27675 else
27676 REPLACE_FCNTL=1
27677 fi
27678
27679 else
27680 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
27681 printf %s "checking whether fcntl handles F_DUPFD correctly... " >&6; }
27682 if test ${gl_cv_func_fcntl_f_dupfd_works+y}
27683 then :
27684 printf %s "(cached) " >&6
27685 else $as_nop
27686 if test "$cross_compiling" = yes
27687 then :
27688 case $host_os in
27689 aix* | cygwin* | haiku*)
27690 gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
27691 *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
27692 esac
27693 else $as_nop
27694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27695 /* end confdefs.h. */
27696 #include <errno.h>
27697 #include <fcntl.h>
27698 #include <limits.h>
27699 #include <sys/resource.h>
27700 #include <unistd.h>
27701
27702
27703 $gl_mda_defines
27704
27705 #ifndef RLIM_SAVED_CUR
27706 # define RLIM_SAVED_CUR RLIM_INFINITY
27707 #endif
27708 #ifndef RLIM_SAVED_MAX
27709 # define RLIM_SAVED_MAX RLIM_INFINITY
27710 #endif
27711
27712 int
27713 main (void)
27714 {
27715 int result = 0;
27716 int bad_fd = INT_MAX;
27717 struct rlimit rlim;
27718 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
27719 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
27720 && rlim.rlim_cur != RLIM_INFINITY
27721 && rlim.rlim_cur != RLIM_SAVED_MAX
27722 && rlim.rlim_cur != RLIM_SAVED_CUR)
27723 bad_fd = rlim.rlim_cur;
27724 if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
27725 if (errno != EINVAL) result |= 2;
27726 if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
27727 if (errno != EINVAL) result |= 8;
27728 /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
27729 {
27730 int fd;
27731 fd = open (".", O_RDONLY);
27732 if (fd == -1)
27733 result |= 16;
27734 else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
27735 result |= 32;
27736
27737 close (fd);
27738 }
27739 return result;
27740 ;
27741 return 0;
27742 }
27743 _ACEOF
27744 if ac_fn_c_try_run "$LINENO"
27745 then :
27746 gl_cv_func_fcntl_f_dupfd_works=yes
27747 else $as_nop
27748 gl_cv_func_fcntl_f_dupfd_works=no
27749 fi
27750 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27751 conftest.$ac_objext conftest.beam conftest.$ac_ext
27752 fi
27753
27754 fi
27755 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
27756 printf "%s\n" "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
27757 case $gl_cv_func_fcntl_f_dupfd_works in
27758 *yes) ;;
27759 *)
27760
27761
27762 if test $ac_cv_func_fcntl = no; then
27763 HAVE_FCNTL=0
27764 else
27765 REPLACE_FCNTL=1
27766 fi
27767
27768
27769 printf "%s\n" "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
27770 ;;
27771 esac
27772
27773 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
27774 printf %s "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
27775 if test ${gl_cv_func_fcntl_f_dupfd_cloexec+y}
27776 then :
27777 printf %s "(cached) " >&6
27778 else $as_nop
27779 if test "$cross_compiling" = yes
27780 then :
27781 case "$host_os" in
27782 # Guess no on NetBSD.
27783 netbsd*) gl_cv_func_fcntl_f_dupfd_cloexec="guessing no" ;;
27784 *) gl_cv_func_fcntl_f_dupfd_cloexec="$gl_cross_guess_normal" ;;
27785 esac
27786
27787 else $as_nop
27788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27789 /* end confdefs.h. */
27790 #include <fcntl.h>
27791 #include <unistd.h>
27792 int main (int argc, char *argv[])
27793 {
27794 if (argc == 1)
27795 /* parent process */
27796 {
27797 if (fcntl (1, F_DUPFD_CLOEXEC, 10) < 0)
27798 return 1;
27799 return execl ("./conftest", "./conftest", "child", NULL);
27800 }
27801 else
27802 /* child process */
27803 return (fcntl (10, F_GETFL) < 0 ? 0 : 42);
27804 }
27805
27806
27807 _ACEOF
27808 if ac_fn_c_try_run "$LINENO"
27809 then :
27810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27811 /* end confdefs.h. */
27812
27813 #ifdef __linux__
27814 /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
27815 it to support the semantics on older kernels that failed with EINVAL. */
27816 choke me
27817 #endif
27818
27819 int
27820 main (void)
27821 {
27822
27823 ;
27824 return 0;
27825 }
27826 _ACEOF
27827 if ac_fn_c_try_compile "$LINENO"
27828 then :
27829 gl_cv_func_fcntl_f_dupfd_cloexec=yes
27830 else $as_nop
27831 gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
27832 fi
27833 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27834
27835 else $as_nop
27836 gl_cv_func_fcntl_f_dupfd_cloexec=no
27837 fi
27838 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27839 conftest.$ac_objext conftest.beam conftest.$ac_ext
27840 fi
27841
27842
27843 fi
27844 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
27845 printf "%s\n" "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
27846 case "$gl_cv_func_fcntl_f_dupfd_cloexec" in
27847 *yes) ;;
27848 *)
27849
27850
27851 if test $ac_cv_func_fcntl = no; then
27852 HAVE_FCNTL=0
27853 else
27854 REPLACE_FCNTL=1
27855 fi
27856
27857 ;;
27858 esac
27859 fi
27860
27861
27862
27863
27864 if test $ac_cv_func_fchdir = no; then
27865 HAVE_FCHDIR=0
27866 fi
27867
27868 if test $HAVE_FCHDIR = 0; then
27869
27870
27871
27872 if test $ac_cv_func_fcntl = no; then
27873 HAVE_FCNTL=0
27874 else
27875 REPLACE_FCNTL=1
27876 fi
27877
27878 fi
27879
27880
27881
27882 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
27883 GL_COND_OBJ_FCNTL_TRUE=
27884 GL_COND_OBJ_FCNTL_FALSE='#'
27885 else
27886 GL_COND_OBJ_FCNTL_TRUE='#'
27887 GL_COND_OBJ_FCNTL_FALSE=
27888 fi
27889 :
27890 if test -z "${GL_COND_OBJ_FCNTL_TRUE}" && test -z "${GL_COND_OBJ_FCNTL_FALSE}"; then
27891 GL_COND_OBJ_FCNTL_TRUE='#'
27892 GL_COND_OBJ_FCNTL_FALSE='#'
27893 fi
27894
27895
27896
27897
27898
27899
27900
27901
27902
27903
27904 GL_GNULIB_FCNTL=1
27905
27906
27907
27908
27909
27910 printf "%s\n" "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
27911
27912
27913
27914
27915
27916
27917
27918
27919
27920
27921
27922
27923 printf "%s\n" "#define GNULIB_FD_SAFER_FLAG 1" >>confdefs.h
27924
27925
27926
27927
27928
27929
27930 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
27931 printf %s "checking for flexible array member... " >&6; }
27932 if test ${ac_cv_c_flexmember+y}
27933 then :
27934 printf %s "(cached) " >&6
27935 else $as_nop
27936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27937 /* end confdefs.h. */
27938 #include <stdlib.h>
27939 #include <stdio.h>
27940 #include <stddef.h>
27941 struct m { struct m *next, **list; char name[]; };
27942 struct s { struct s *p; struct m *m; int n; double d[]; };
27943 int
27944 main (void)
27945 {
27946 int m = getchar ();
27947 size_t nbytes = offsetof (struct s, d) + m * sizeof (double);
27948 nbytes += sizeof (struct s) - 1;
27949 nbytes -= nbytes % sizeof (struct s);
27950 struct s *p = malloc (nbytes);
27951 p->p = p;
27952 p->m = NULL;
27953 p->d[0] = 0.0;
27954 return p->d != (double *) NULL;
27955 ;
27956 return 0;
27957 }
27958 _ACEOF
27959 if ac_fn_c_try_compile "$LINENO"
27960 then :
27961 ac_cv_c_flexmember=yes
27962 else $as_nop
27963 ac_cv_c_flexmember=no
27964 fi
27965 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27966 fi
27967 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
27968 printf "%s\n" "$ac_cv_c_flexmember" >&6; }
27969 if test $ac_cv_c_flexmember = yes; then
27970
27971 printf "%s\n" "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
27972
27973 else
27974 printf "%s\n" "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
27975
27976 fi
27977
27978
27979
27980
27981 GL_GENERATE_FLOAT_H=false
27982 REPLACE_FLOAT_LDBL=0
27983 case "$host_os" in
27984 aix* | beos* | openbsd* | mirbsd* | irix*)
27985 GL_GENERATE_FLOAT_H=true
27986 ;;
27987 freebsd* | dragonfly*)
27988 case "$host_cpu" in
27989 i[34567]86 )
27990 GL_GENERATE_FLOAT_H=true
27991 ;;
27992 x86_64 )
27993 # On x86_64 systems, the C compiler may still be generating
27994 # 32-bit code.
27995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27996 /* end confdefs.h. */
27997 #if defined __LP64__ || defined __x86_64__ || defined __amd64__
27998 int ok;
27999 #else
28000 error fail
28001 #endif
28002
28003 _ACEOF
28004 if ac_fn_c_try_compile "$LINENO"
28005 then :
28006
28007 else $as_nop
28008 GL_GENERATE_FLOAT_H=true
28009 fi
28010 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
28011 ;;
28012 esac
28013 ;;
28014 linux*)
28015 case "$host_cpu" in
28016 powerpc*)
28017 GL_GENERATE_FLOAT_H=true
28018 ;;
28019 esac
28020 ;;
28021 esac
28022 case "$host_os" in
28023 aix* | freebsd* | dragonfly* | linux*)
28024 if $GL_GENERATE_FLOAT_H; then
28025 REPLACE_FLOAT_LDBL=1
28026 fi
28027 ;;
28028 esac
28029
28030 REPLACE_ITOLD=0
28031 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
28032 printf %s "checking whether conversion from 'int' to 'long double' works... " >&6; }
28033 if test ${gl_cv_func_itold_works+y}
28034 then :
28035 printf %s "(cached) " >&6
28036 else $as_nop
28037
28038 if test "$cross_compiling" = yes
28039 then :
28040 case "$host" in
28041 sparc*-*-linux*)
28042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28043 /* end confdefs.h. */
28044 #if defined __LP64__ || defined __arch64__
28045 int ok;
28046 #else
28047 error fail
28048 #endif
28049
28050 _ACEOF
28051 if ac_fn_c_try_compile "$LINENO"
28052 then :
28053 gl_cv_func_itold_works="guessing no"
28054 else $as_nop
28055 gl_cv_func_itold_works="guessing yes"
28056 fi
28057 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
28058 ;;
28059 # Guess yes on native Windows.
28060 mingw*) gl_cv_func_itold_works="guessing yes" ;;
28061 *) gl_cv_func_itold_works="guessing yes" ;;
28062 esac
28063
28064 else $as_nop
28065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28066 /* end confdefs.h. */
28067
28068 int i = -1;
28069 volatile long double ld;
28070 int main ()
28071 {
28072 ld += i * 1.0L;
28073 if (ld > 0)
28074 return 1;
28075 return 0;
28076 }
28077 _ACEOF
28078 if ac_fn_c_try_run "$LINENO"
28079 then :
28080 gl_cv_func_itold_works=yes
28081 else $as_nop
28082 gl_cv_func_itold_works=no
28083 fi
28084 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28085 conftest.$ac_objext conftest.beam conftest.$ac_ext
28086 fi
28087
28088
28089 fi
28090 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
28091 printf "%s\n" "$gl_cv_func_itold_works" >&6; }
28092 case "$gl_cv_func_itold_works" in
28093 *no)
28094 REPLACE_ITOLD=1
28095 GL_GENERATE_FLOAT_H=true
28096 ;;
28097 esac
28098
28099 if $GL_GENERATE_FLOAT_H; then
28100
28101
28102
28103
28104
28105
28106
28107
28108 if test $gl_cv_have_include_next = yes; then
28109 gl_cv_next_float_h='<'float.h'>'
28110 else
28111 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
28112 printf %s "checking absolute name of <float.h>... " >&6; }
28113 if test ${gl_cv_next_float_h+y}
28114 then :
28115 printf %s "(cached) " >&6
28116 else $as_nop
28117
28118
28119
28120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28121 /* end confdefs.h. */
28122 #include <float.h>
28123 _ACEOF
28124 case "$host_os" in
28125 aix*) gl_absname_cpp="$ac_cpp -C" ;;
28126 *) gl_absname_cpp="$ac_cpp" ;;
28127 esac
28128
28129 case "$host_os" in
28130 mingw*)
28131 gl_dirsep_regex='[/\\]'
28132 ;;
28133 *)
28134 gl_dirsep_regex='\/'
28135 ;;
28136 esac
28137 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28138 gl_header_literal_regex=`echo 'float.h' \
28139 | sed -e "$gl_make_literal_regex_sed"`
28140 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28141 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28142 s|^/[^/]|//&|
28143 p
28144 q
28145 }'
28146
28147 gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28148 sed -n "$gl_absolute_header_sed"`
28149
28150 gl_header=$gl_cv_absolute_float_h
28151 gl_cv_next_float_h='"'$gl_header'"'
28152
28153
28154 fi
28155 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
28156 printf "%s\n" "$gl_cv_next_float_h" >&6; }
28157 fi
28158 NEXT_FLOAT_H=$gl_cv_next_float_h
28159
28160 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28161 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28162 gl_next_as_first_directive='<'float.h'>'
28163 else
28164 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28165 gl_next_as_first_directive=$gl_cv_next_float_h
28166 fi
28167 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
28168
28169
28170
28171
28172 fi
28173
28174
28175
28176
28177
28178
28179 case "$GL_GENERATE_FLOAT_H" in
28180 false) FLOAT_H='' ;;
28181 true)
28182 if test -z "$FLOAT_H"; then
28183 FLOAT_H="${gl_source_base_prefix}float.h"
28184 fi
28185 ;;
28186 *) echo "*** GL_GENERATE_FLOAT_H is not set correctly" 1>&2; exit 1 ;;
28187 esac
28188
28189
28190 if $GL_GENERATE_FLOAT_H; then
28191 GL_GENERATE_FLOAT_H_TRUE=
28192 GL_GENERATE_FLOAT_H_FALSE='#'
28193 else
28194 GL_GENERATE_FLOAT_H_TRUE='#'
28195 GL_GENERATE_FLOAT_H_FALSE=
28196 fi
28197 :
28198 if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
28199 GL_GENERATE_FLOAT_H_TRUE='#'
28200 GL_GENERATE_FLOAT_H_FALSE='#'
28201 fi
28202
28203
28204
28205
28206
28207
28208
28209 if test $REPLACE_FLOAT_LDBL = 1; then
28210 GL_COND_OBJ_FLOAT_TRUE=
28211 GL_COND_OBJ_FLOAT_FALSE='#'
28212 else
28213 GL_COND_OBJ_FLOAT_TRUE='#'
28214 GL_COND_OBJ_FLOAT_FALSE=
28215 fi
28216 :
28217 if test -z "${GL_COND_OBJ_FLOAT_TRUE}" && test -z "${GL_COND_OBJ_FLOAT_FALSE}"; then
28218 GL_COND_OBJ_FLOAT_TRUE='#'
28219 GL_COND_OBJ_FLOAT_FALSE='#'
28220 fi
28221
28222
28223 if test $REPLACE_ITOLD = 1; then
28224 GL_COND_OBJ_ITOLD_TRUE=
28225 GL_COND_OBJ_ITOLD_FALSE='#'
28226 else
28227 GL_COND_OBJ_ITOLD_TRUE='#'
28228 GL_COND_OBJ_ITOLD_FALSE=
28229 fi
28230 :
28231 if test -z "${GL_COND_OBJ_ITOLD_TRUE}" && test -z "${GL_COND_OBJ_ITOLD_FALSE}"; then
28232 GL_COND_OBJ_ITOLD_TRUE='#'
28233 GL_COND_OBJ_ITOLD_FALSE='#'
28234 fi
28235
28236
28237
28238
28239
28240 gl_fnmatch_required_lowercase=`
28241 echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]'
28242 `
28243
28244 if test $ac_cv_func_fnmatch = no; then
28245 HAVE_FNMATCH=0
28246 else
28247 gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
28248 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5
28249 printf %s "checking for working $gl_fnmatch_required fnmatch... " >&6; }
28250 if eval test \${$gl_fnmatch_cache_var+y}
28251 then :
28252 printf %s "(cached) " >&6
28253 else $as_nop
28254 if test $gl_fnmatch_required = GNU; then
28255 gl_fnmatch_gnu_start=
28256 gl_fnmatch_gnu_end=
28257 else
28258 gl_fnmatch_gnu_start='#if 0'
28259 gl_fnmatch_gnu_end='#endif'
28260 fi
28261 if test "$cross_compiling" = yes
28262 then :
28263 case "$host_os" in
28264 # Guess yes on musl systems.
28265 *-musl*) eval "$gl_fnmatch_cache_var=\"guessing yes\"" ;;
28266 # Guess no otherwise, even on glibc systems.
28267 *) eval "$gl_fnmatch_cache_var=\"guessing no\"" ;;
28268 esac
28269
28270 else $as_nop
28271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28272 /* end confdefs.h. */
28273 #include <fnmatch.h>
28274 static int
28275 y (char const *pattern, char const *string, int flags)
28276 {
28277 return fnmatch (pattern, string, flags) == 0;
28278 }
28279 static int
28280 n (char const *pattern, char const *string, int flags)
28281 {
28282 return fnmatch (pattern, string, flags) == FNM_NOMATCH;
28283 }
28284
28285 int
28286 main (void)
28287 {
28288 char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]";
28289 char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]";
28290 static char const A_1[] = { 'A' - 1, 0 };
28291 static char const A01[] = { 'A' + 1, 0 };
28292 static char const a_1[] = { 'a' - 1, 0 };
28293 static char const a01[] = { 'a' + 1, 0 };
28294 static char const bs_1[] = { '\\\\' - 1, 0 };
28295 static char const bs01[] = { '\\\\' + 1, 0 };
28296 int result = 0;
28297 if (!n ("a*", "", 0))
28298 return 1;
28299 if (!y ("a*", "abc", 0))
28300 return 1;
28301 if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */
28302 return 1;
28303 if (!n ("d*/*1", "d/s/1", FNM_PATHNAME))
28304 return 2;
28305 if (!y ("a\\\\bc", "abc", 0))
28306 return 3;
28307 if (!n ("a\\\\bc", "abc", FNM_NOESCAPE))
28308 return 3;
28309 if (!y ("*x", ".x", 0))
28310 return 4;
28311 if (!n ("*x", ".x", FNM_PERIOD))
28312 return 4;
28313 if (!y (Apat, "\\\\", 0))
28314 return 5;
28315 if (!y (Apat, "A", 0))
28316 return 5;
28317 if (!y (apat, "\\\\", 0))
28318 return 5;
28319 if (!y (apat, "a", 0))
28320 return 5;
28321 if (!(n (Apat, A_1, 0) == ('A' < '\\\\')))
28322 return 5;
28323 if (!(n (apat, a_1, 0) == ('a' < '\\\\')))
28324 return 5;
28325 if (!(y (Apat, A01, 0) == ('A' < '\\\\')))
28326 return 5;
28327 if (!(y (apat, a01, 0) == ('a' < '\\\\')))
28328 return 5;
28329 if (!(y (Apat, bs_1, 0) == ('A' < '\\\\')))
28330 return 5;
28331 if (!(y (apat, bs_1, 0) == ('a' < '\\\\')))
28332 return 5;
28333 if (!(n (Apat, bs01, 0) == ('A' < '\\\\')))
28334 return 5;
28335 if (!(n (apat, bs01, 0) == ('a' < '\\\\')))
28336 return 5;
28337 $gl_fnmatch_gnu_start
28338 if (!y ("xxXX", "xXxX", FNM_CASEFOLD))
28339 result |= 8;
28340 if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH))
28341 result |= 16;
28342 if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME))
28343 result |= 32;
28344 if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR))
28345 result |= 64;
28346 if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR))
28347 result |= 64;
28348 if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR))
28349 result |= 64;
28350 $gl_fnmatch_gnu_end
28351 return result;
28352
28353 ;
28354 return 0;
28355 }
28356 _ACEOF
28357 if ac_fn_c_try_run "$LINENO"
28358 then :
28359 eval "$gl_fnmatch_cache_var=yes"
28360 else $as_nop
28361 eval "$gl_fnmatch_cache_var=no"
28362 fi
28363 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28364 conftest.$ac_objext conftest.beam conftest.$ac_ext
28365 fi
28366
28367
28368 fi
28369 eval ac_res=\$$gl_fnmatch_cache_var
28370 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
28371 printf "%s\n" "$ac_res" >&6; }
28372 eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\""
28373 case "$gl_fnmatch_result" in
28374 *yes) ;;
28375 *) REPLACE_FNMATCH=1 ;;
28376 esac
28377 fi
28378 if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
28379
28380
28381
28382
28383
28384
28385 GL_GENERATE_FNMATCH_H=true
28386
28387 fi
28388
28389
28390
28391
28392
28393 case "$GL_GENERATE_FNMATCH_H" in
28394 false) FNMATCH_H='' ;;
28395 true)
28396 if test -z "$FNMATCH_H"; then
28397 FNMATCH_H="${gl_source_base_prefix}fnmatch.h"
28398 fi
28399 ;;
28400 *) echo "*** GL_GENERATE_FNMATCH_H is not set correctly" 1>&2; exit 1 ;;
28401 esac
28402
28403
28404 if $GL_GENERATE_FNMATCH_H; then
28405 GL_GENERATE_FNMATCH_H_TRUE=
28406 GL_GENERATE_FNMATCH_H_FALSE='#'
28407 else
28408 GL_GENERATE_FNMATCH_H_TRUE='#'
28409 GL_GENERATE_FNMATCH_H_FALSE=
28410 fi
28411 :
28412 if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
28413 GL_GENERATE_FNMATCH_H_TRUE='#'
28414 GL_GENERATE_FNMATCH_H_FALSE='#'
28415 fi
28416
28417
28418
28419
28420
28421 if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
28422
28423
28424
28425
28426
28427
28428
28429
28430 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
28431
28432
28433
28434
28435
28436 fi
28437
28438
28439
28440
28441
28442
28443
28444
28445
28446 GL_GNULIB_FNMATCH=1
28447
28448
28449
28450
28451
28452 printf "%s\n" "#define GNULIB_TEST_FNMATCH 1" >>confdefs.h
28453
28454
28455
28456
28457
28458
28459
28460
28461
28462
28463
28464
28465
28466 case "$GL_GENERATE_FNMATCH_H" in
28467 false) FNMATCH_H='' ;;
28468 true)
28469 if test -z "$FNMATCH_H"; then
28470 FNMATCH_H="${gl_source_base_prefix}fnmatch.h"
28471 fi
28472 ;;
28473 *) echo "*** GL_GENERATE_FNMATCH_H is not set correctly" 1>&2; exit 1 ;;
28474 esac
28475
28476
28477 if $GL_GENERATE_FNMATCH_H; then
28478 GL_GENERATE_FNMATCH_H_TRUE=
28479 GL_GENERATE_FNMATCH_H_FALSE='#'
28480 else
28481 GL_GENERATE_FNMATCH_H_TRUE='#'
28482 GL_GENERATE_FNMATCH_H_FALSE=
28483 fi
28484 :
28485 if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
28486 GL_GENERATE_FNMATCH_H_TRUE='#'
28487 GL_GENERATE_FNMATCH_H_FALSE='#'
28488 fi
28489
28490
28491
28492
28493
28494
28495
28496
28497
28498 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether free is known to preserve errno" >&5
28499 printf %s "checking whether free is known to preserve errno... " >&6; }
28500 if test ${gl_cv_func_free_preserves_errno+y}
28501 then :
28502 printf %s "(cached) " >&6
28503 else $as_nop
28504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28505 /* end confdefs.h. */
28506 #include <stdlib.h>
28507
28508 int
28509 main (void)
28510 {
28511 #if 2 < __GLIBC__ + (33 <= __GLIBC_MINOR__)
28512 #elif defined __OpenBSD__
28513 #elif defined __sun
28514 #else
28515 #error "'free' is not known to preserve errno"
28516 #endif
28517
28518 ;
28519 return 0;
28520 }
28521 _ACEOF
28522 if ac_fn_c_try_compile "$LINENO"
28523 then :
28524 gl_cv_func_free_preserves_errno=yes
28525 else $as_nop
28526 gl_cv_func_free_preserves_errno=no
28527 fi
28528 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
28529
28530 fi
28531 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_free_preserves_errno" >&5
28532 printf "%s\n" "$gl_cv_func_free_preserves_errno" >&6; }
28533
28534 case $gl_cv_func_free_preserves_errno in
28535 *yes)
28536
28537 printf "%s\n" "#define HAVE_FREE_POSIX 1" >>confdefs.h
28538
28539 ;;
28540 *) REPLACE_FREE=1 ;;
28541 esac
28542
28543
28544 if test $REPLACE_FREE = 1; then
28545 GL_COND_OBJ_FREE_TRUE=
28546 GL_COND_OBJ_FREE_FALSE='#'
28547 else
28548 GL_COND_OBJ_FREE_TRUE='#'
28549 GL_COND_OBJ_FREE_FALSE=
28550 fi
28551 :
28552 if test -z "${GL_COND_OBJ_FREE_TRUE}" && test -z "${GL_COND_OBJ_FREE_FALSE}"; then
28553 GL_COND_OBJ_FREE_TRUE='#'
28554 GL_COND_OBJ_FREE_FALSE='#'
28555 fi
28556
28557 if test -z "$GL_COND_OBJ_FREE_TRUE"; then :
28558
28559 :
28560
28561 fi
28562
28563
28564
28565
28566
28567
28568
28569
28570
28571 GL_GNULIB_FREE_POSIX=1
28572
28573
28574
28575
28576
28577 printf "%s\n" "#define GNULIB_TEST_FREE_POSIX 1" >>confdefs.h
28578
28579
28580
28581
28582
28583
28584
28585 case "$host_os" in
28586 mingw* | solaris*)
28587 REPLACE_FSTAT=1
28588 ;;
28589 esac
28590
28591
28592
28593
28594
28595 if test $ac_cv_func_fchdir = no; then
28596 HAVE_FCHDIR=0
28597 fi
28598
28599 if test $HAVE_FCHDIR = 0; then
28600 case "$gl_cv_func_open_directory_works" in
28601 *yes) ;;
28602 *)
28603 REPLACE_FSTAT=1
28604 ;;
28605 esac
28606 fi
28607
28608
28609
28610 if test $REPLACE_FSTAT = 1; then
28611 GL_COND_OBJ_FSTAT_TRUE=
28612 GL_COND_OBJ_FSTAT_FALSE='#'
28613 else
28614 GL_COND_OBJ_FSTAT_TRUE='#'
28615 GL_COND_OBJ_FSTAT_FALSE=
28616 fi
28617 :
28618 if test -z "${GL_COND_OBJ_FSTAT_TRUE}" && test -z "${GL_COND_OBJ_FSTAT_FALSE}"; then
28619 GL_COND_OBJ_FSTAT_TRUE='#'
28620 GL_COND_OBJ_FSTAT_FALSE='#'
28621 fi
28622
28623 if test -z "$GL_COND_OBJ_FSTAT_TRUE"; then :
28624
28625 case "$host_os" in
28626 mingw*)
28627
28628
28629
28630
28631
28632
28633
28634
28635 gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
28636
28637 ;;
28638 esac
28639
28640
28641
28642 :
28643
28644
28645 fi
28646
28647
28648
28649
28650
28651
28652
28653
28654
28655 GL_GNULIB_FSTAT=1
28656
28657
28658
28659
28660
28661 printf "%s\n" "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
28662
28663
28664
28665
28666
28667
28668
28669
28670 case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
28671 *yes,yes) ;;
28672 *)
28673 REPLACE_GETCWD=1
28674 ;;
28675 esac
28676
28677
28678 if test $REPLACE_GETCWD = 1; then
28679 GL_COND_OBJ_GETCWD_LGPL_TRUE=
28680 GL_COND_OBJ_GETCWD_LGPL_FALSE='#'
28681 else
28682 GL_COND_OBJ_GETCWD_LGPL_TRUE='#'
28683 GL_COND_OBJ_GETCWD_LGPL_FALSE=
28684 fi
28685 :
28686 if test -z "${GL_COND_OBJ_GETCWD_LGPL_TRUE}" && test -z "${GL_COND_OBJ_GETCWD_LGPL_FALSE}"; then
28687 GL_COND_OBJ_GETCWD_LGPL_TRUE='#'
28688 GL_COND_OBJ_GETCWD_LGPL_FALSE='#'
28689 fi
28690
28691
28692
28693
28694
28695
28696
28697
28698
28699
28700 GL_GNULIB_GETCWD=1
28701
28702
28703
28704
28705
28706 printf "%s\n" "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
28707
28708
28709
28710
28711
28712
28713
28714
28715
28716
28717
28718 if test $ac_cv_func_getdelim = yes; then
28719 HAVE_GETDELIM=1
28720 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working getdelim function" >&5
28721 printf %s "checking for working getdelim function... " >&6; }
28722 if test ${gl_cv_func_working_getdelim+y}
28723 then :
28724 printf %s "(cached) " >&6
28725 else $as_nop
28726 echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
28727 if test "$cross_compiling" = yes
28728 then :
28729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28730 /* end confdefs.h. */
28731
28732 #include <features.h>
28733 #ifdef __GNU_LIBRARY__
28734 #if (__GLIBC__ >= 2) && !defined __UCLIBC__
28735 Lucky GNU user
28736 #endif
28737 #endif
28738
28739 _ACEOF
28740 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28741 $EGREP "Lucky GNU user" >/dev/null 2>&1
28742 then :
28743 gl_cv_func_working_getdelim="guessing yes"
28744 else $as_nop
28745 case "$host_os" in
28746 *-musl*) gl_cv_func_working_getdelim="guessing yes" ;;
28747 *) gl_cv_func_working_getdelim="$gl_cross_guess_normal" ;;
28748 esac
28749
28750 fi
28751 rm -rf conftest*
28752
28753
28754 else $as_nop
28755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28756 /* end confdefs.h. */
28757
28758 # include <stdio.h>
28759 # include <stdlib.h>
28760 # include <string.h>
28761 int main ()
28762 {
28763 FILE *in = fopen ("./conftest.data", "r");
28764 if (!in)
28765 return 1;
28766 {
28767 /* Test result for a NULL buffer and a zero size.
28768 Based on a test program from Karl Heuer. */
28769 char *line = NULL;
28770 size_t siz = 0;
28771 int len = getdelim (&line, &siz, '\n', in);
28772 if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
28773 { free (line); fclose (in); return 2; }
28774 free (line);
28775 }
28776 {
28777 /* Test result for a NULL buffer and a non-zero size.
28778 This crashes on FreeBSD 8.0. */
28779 char *line = NULL;
28780 size_t siz = (size_t)(~0) / 4;
28781 if (getdelim (&line, &siz, '\n', in) == -1)
28782 { fclose (in); return 3; }
28783 free (line);
28784 }
28785 fclose (in);
28786 return 0;
28787 }
28788
28789 _ACEOF
28790 if ac_fn_c_try_run "$LINENO"
28791 then :
28792 gl_cv_func_working_getdelim=yes
28793 else $as_nop
28794 gl_cv_func_working_getdelim=no
28795 fi
28796 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28797 conftest.$ac_objext conftest.beam conftest.$ac_ext
28798 fi
28799
28800
28801 fi
28802 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_getdelim" >&5
28803 printf "%s\n" "$gl_cv_func_working_getdelim" >&6; }
28804 case "$gl_cv_func_working_getdelim" in
28805 *yes) ;;
28806 *) REPLACE_GETDELIM=1 ;;
28807 esac
28808 else
28809 HAVE_GETDELIM=0
28810 fi
28811
28812 if test $ac_cv_have_decl_getdelim = no; then
28813 HAVE_DECL_GETDELIM=0
28814 fi
28815
28816
28817 if test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1; then
28818 GL_COND_OBJ_GETDELIM_TRUE=
28819 GL_COND_OBJ_GETDELIM_FALSE='#'
28820 else
28821 GL_COND_OBJ_GETDELIM_TRUE='#'
28822 GL_COND_OBJ_GETDELIM_FALSE=
28823 fi
28824 :
28825 if test -z "${GL_COND_OBJ_GETDELIM_TRUE}" && test -z "${GL_COND_OBJ_GETDELIM_FALSE}"; then
28826 GL_COND_OBJ_GETDELIM_TRUE='#'
28827 GL_COND_OBJ_GETDELIM_FALSE='#'
28828 fi
28829
28830 if test -z "$GL_COND_OBJ_GETDELIM_TRUE"; then :
28831
28832
28833 ac_fn_c_check_func "$LINENO" "flockfile" "ac_cv_func_flockfile"
28834 if test "x$ac_cv_func_flockfile" = xyes
28835 then :
28836 printf "%s\n" "#define HAVE_FLOCKFILE 1" >>confdefs.h
28837
28838 fi
28839 ac_fn_c_check_func "$LINENO" "funlockfile" "ac_cv_func_funlockfile"
28840 if test "x$ac_cv_func_funlockfile" = xyes
28841 then :
28842 printf "%s\n" "#define HAVE_FUNLOCKFILE 1" >>confdefs.h
28843
28844 fi
28845
28846 ac_fn_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
28847 if test "x$ac_cv_have_decl_getc_unlocked" = xyes
28848 then :
28849 ac_have_decl=1
28850 else $as_nop
28851 ac_have_decl=0
28852 fi
28853 printf "%s\n" "#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl" >>confdefs.h
28854
28855
28856
28857 fi
28858
28859
28860
28861
28862
28863
28864
28865
28866
28867 GL_GNULIB_GETDELIM=1
28868
28869
28870
28871
28872
28873 printf "%s\n" "#define GNULIB_TEST_GETDELIM 1" >>confdefs.h
28874
28875
28876
28877
28878
28879
28880
28881
28882 if test $ac_cv_func_getdtablesize = yes &&
28883 test $ac_cv_have_decl_getdtablesize = yes; then
28884 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
28885 printf %s "checking whether getdtablesize works... " >&6; }
28886 if test ${gl_cv_func_getdtablesize_works+y}
28887 then :
28888 printf %s "(cached) " >&6
28889 else $as_nop
28890 case "$host_os" in
28891 vms*) gl_cv_func_getdtablesize_works="no (limitation)" ;;
28892 *)
28893 if test "$cross_compiling" = yes
28894 then :
28895 case "$host_os" in
28896 cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
28897 gl_cv_func_getdtablesize_works="guessing no" ;;
28898 *) gl_cv_func_getdtablesize_works="guessing yes" ;;
28899 esac
28900
28901 else $as_nop
28902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28903 /* end confdefs.h. */
28904
28905 #include <unistd.h>
28906
28907
28908 $gl_mda_defines
28909
28910
28911 int
28912 main (void)
28913 {
28914 int size = getdtablesize();
28915 if (dup2 (0, getdtablesize()) != -1)
28916 return 1;
28917 if (size != getdtablesize())
28918 return 2;
28919
28920 ;
28921 return 0;
28922 }
28923 _ACEOF
28924 if ac_fn_c_try_run "$LINENO"
28925 then :
28926 gl_cv_func_getdtablesize_works=yes
28927 else $as_nop
28928 gl_cv_func_getdtablesize_works=no
28929 fi
28930 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28931 conftest.$ac_objext conftest.beam conftest.$ac_ext
28932 fi
28933
28934 ;;
28935 esac
28936
28937 fi
28938 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
28939 printf "%s\n" "$gl_cv_func_getdtablesize_works" >&6; }
28940 case "$gl_cv_func_getdtablesize_works" in
28941 *yes | "no (limitation)") ;;
28942 *) REPLACE_GETDTABLESIZE=1 ;;
28943 esac
28944 else
28945 HAVE_GETDTABLESIZE=0
28946 fi
28947
28948
28949 if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
28950 GL_COND_OBJ_GETDTABLESIZE_TRUE=
28951 GL_COND_OBJ_GETDTABLESIZE_FALSE='#'
28952 else
28953 GL_COND_OBJ_GETDTABLESIZE_TRUE='#'
28954 GL_COND_OBJ_GETDTABLESIZE_FALSE=
28955 fi
28956 :
28957 if test -z "${GL_COND_OBJ_GETDTABLESIZE_TRUE}" && test -z "${GL_COND_OBJ_GETDTABLESIZE_FALSE}"; then
28958 GL_COND_OBJ_GETDTABLESIZE_TRUE='#'
28959 GL_COND_OBJ_GETDTABLESIZE_FALSE='#'
28960 fi
28961
28962 if test -z "$GL_COND_OBJ_GETDTABLESIZE_TRUE"; then :
28963
28964 :
28965
28966 fi
28967
28968
28969
28970
28971
28972
28973
28974
28975
28976 GL_GNULIB_GETDTABLESIZE=1
28977
28978
28979
28980
28981
28982 printf "%s\n" "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
28983
28984
28985
28986
28987
28988
28989
28990
28991
28992
28993 gl_getline_needs_run_time_check=no
28994 ac_fn_c_check_func "$LINENO" "getline" "ac_cv_func_getline"
28995 if test "x$ac_cv_func_getline" = xyes
28996 then :
28997 gl_getline_needs_run_time_check=yes
28998 else $as_nop
28999 am_cv_func_working_getline=no
29000 fi
29001
29002 if test $gl_getline_needs_run_time_check = yes; then
29003 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working getline function" >&5
29004 printf %s "checking for working getline function... " >&6; }
29005 if test ${am_cv_func_working_getline+y}
29006 then :
29007 printf %s "(cached) " >&6
29008 else $as_nop
29009 echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
29010 if test "$cross_compiling" = yes
29011 then :
29012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29013 /* end confdefs.h. */
29014
29015 #include <features.h>
29016 #ifdef __GNU_LIBRARY__
29017 #if (__GLIBC__ >= 2) && !defined __UCLIBC__
29018 Lucky GNU user
29019 #endif
29020 #endif
29021
29022 _ACEOF
29023 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
29024 $EGREP "Lucky GNU user" >/dev/null 2>&1
29025 then :
29026 am_cv_func_working_getline="guessing yes"
29027 else $as_nop
29028 case "$host_os" in
29029 *-musl*) am_cv_func_working_getline="guessing yes" ;;
29030 *) am_cv_func_working_getline="$gl_cross_guess_normal" ;;
29031 esac
29032
29033 fi
29034 rm -rf conftest*
29035
29036
29037 else $as_nop
29038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29039 /* end confdefs.h. */
29040
29041 # include <stdio.h>
29042 # include <stdlib.h>
29043 # include <string.h>
29044 int main ()
29045 {
29046 FILE *in = fopen ("./conftest.data", "r");
29047 if (!in)
29048 return 1;
29049 {
29050 /* Test result for a NULL buffer and a zero size.
29051 Based on a test program from Karl Heuer. */
29052 char *line = NULL;
29053 size_t siz = 0;
29054 int len = getline (&line, &siz, in);
29055 if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
29056 { free (line); fclose (in); return 2; }
29057 free (line);
29058 }
29059 {
29060 /* Test result for a NULL buffer and a non-zero size.
29061 This crashes on FreeBSD 8.0. */
29062 char *line = NULL;
29063 size_t siz = (size_t)(~0) / 4;
29064 if (getline (&line, &siz, in) == -1)
29065 { fclose (in); return 3; }
29066 free (line);
29067 }
29068 fclose (in);
29069 return 0;
29070 }
29071
29072 _ACEOF
29073 if ac_fn_c_try_run "$LINENO"
29074 then :
29075 am_cv_func_working_getline=yes
29076 else $as_nop
29077 am_cv_func_working_getline=no
29078 fi
29079 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29080 conftest.$ac_objext conftest.beam conftest.$ac_ext
29081 fi
29082
29083
29084 fi
29085 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_working_getline" >&5
29086 printf "%s\n" "$am_cv_func_working_getline" >&6; }
29087 fi
29088
29089 if test $ac_cv_have_decl_getline = no; then
29090 HAVE_DECL_GETLINE=0
29091 fi
29092
29093 case "$am_cv_func_working_getline" in
29094 *yes) ;;
29095 *)
29096 REPLACE_GETLINE=1
29097 ;;
29098 esac
29099
29100
29101 if test $REPLACE_GETLINE = 1; then
29102 GL_COND_OBJ_GETLINE_TRUE=
29103 GL_COND_OBJ_GETLINE_FALSE='#'
29104 else
29105 GL_COND_OBJ_GETLINE_TRUE='#'
29106 GL_COND_OBJ_GETLINE_FALSE=
29107 fi
29108 :
29109 if test -z "${GL_COND_OBJ_GETLINE_TRUE}" && test -z "${GL_COND_OBJ_GETLINE_FALSE}"; then
29110 GL_COND_OBJ_GETLINE_TRUE='#'
29111 GL_COND_OBJ_GETLINE_FALSE='#'
29112 fi
29113
29114 if test -z "$GL_COND_OBJ_GETLINE_TRUE"; then :
29115
29116
29117 :
29118
29119
29120 fi
29121
29122
29123
29124
29125
29126
29127
29128
29129
29130 GL_GNULIB_GETLINE=1
29131
29132
29133
29134
29135
29136 printf "%s\n" "#define GNULIB_TEST_GETLINE 1" >>confdefs.h
29137
29138
29139
29140
29141
29142
29143
29144
29145
29146
29147
29148
29149 REPLACE_GETOPT=1
29150
29151 GL_GENERATE_GETOPT_H=false
29152 GL_GENERATE_GETOPT_CDEFS_H=false
29153 if test $REPLACE_GETOPT = 1; then
29154
29155
29156 if test $ac_cv_header_sys_cdefs_h = yes; then
29157 HAVE_SYS_CDEFS_H=1
29158 else
29159 HAVE_SYS_CDEFS_H=0
29160 fi
29161
29162
29163
29164 printf "%s\n" "#define __GETOPT_PREFIX rpl_" >>confdefs.h
29165
29166 GL_GENERATE_GETOPT_H=true
29167 GL_GENERATE_GETOPT_CDEFS_H=true
29168
29169 fi
29170
29171
29172
29173
29174
29175 case "$GL_GENERATE_GETOPT_H" in
29176 false) GETOPT_H='' ;;
29177 true)
29178 if test -z "$GETOPT_H"; then
29179 GETOPT_H="${gl_source_base_prefix}getopt.h"
29180 fi
29181 ;;
29182 *) echo "*** GL_GENERATE_GETOPT_H is not set correctly" 1>&2; exit 1 ;;
29183 esac
29184
29185
29186 if $GL_GENERATE_GETOPT_H; then
29187 GL_GENERATE_GETOPT_H_TRUE=
29188 GL_GENERATE_GETOPT_H_FALSE='#'
29189 else
29190 GL_GENERATE_GETOPT_H_TRUE='#'
29191 GL_GENERATE_GETOPT_H_FALSE=
29192 fi
29193 :
29194 if test -z "${GL_GENERATE_GETOPT_H_TRUE}" && test -z "${GL_GENERATE_GETOPT_H_FALSE}"; then
29195 GL_GENERATE_GETOPT_H_TRUE='#'
29196 GL_GENERATE_GETOPT_H_FALSE='#'
29197 fi
29198
29199
29200
29201
29202
29203
29204
29205
29206
29207 case "$GL_GENERATE_GETOPT_CDEFS_H" in
29208 false) GETOPT_CDEFS_H='' ;;
29209 true)
29210 if test -z "$GETOPT_CDEFS_H"; then
29211 GETOPT_CDEFS_H="${gl_source_base_prefix}getopt-cdefs.h"
29212 fi
29213 ;;
29214 *) echo "*** GL_GENERATE_GETOPT_CDEFS_H is not set correctly" 1>&2; exit 1 ;;
29215 esac
29216
29217
29218 if $GL_GENERATE_GETOPT_CDEFS_H; then
29219 GL_GENERATE_GETOPT_CDEFS_H_TRUE=
29220 GL_GENERATE_GETOPT_CDEFS_H_FALSE='#'
29221 else
29222 GL_GENERATE_GETOPT_CDEFS_H_TRUE='#'
29223 GL_GENERATE_GETOPT_CDEFS_H_FALSE=
29224 fi
29225 :
29226 if test -z "${GL_GENERATE_GETOPT_CDEFS_H_TRUE}" && test -z "${GL_GENERATE_GETOPT_CDEFS_H_FALSE}"; then
29227 GL_GENERATE_GETOPT_CDEFS_H_TRUE='#'
29228 GL_GENERATE_GETOPT_CDEFS_H_FALSE='#'
29229 fi
29230
29231
29232
29233
29234
29235
29236
29237 if test $REPLACE_GETOPT = 1; then
29238 GL_COND_OBJ_GETOPT_TRUE=
29239 GL_COND_OBJ_GETOPT_FALSE='#'
29240 else
29241 GL_COND_OBJ_GETOPT_TRUE='#'
29242 GL_COND_OBJ_GETOPT_FALSE=
29243 fi
29244 :
29245 if test -z "${GL_COND_OBJ_GETOPT_TRUE}" && test -z "${GL_COND_OBJ_GETOPT_FALSE}"; then
29246 GL_COND_OBJ_GETOPT_TRUE='#'
29247 GL_COND_OBJ_GETOPT_FALSE='#'
29248 fi
29249
29250 if test -z "$GL_COND_OBJ_GETOPT_TRUE"; then :
29251
29252
29253
29254
29255
29256
29257
29258 GL_GNULIB_UNISTD_H_GETOPT=1
29259
29260
29261
29262 fi
29263
29264
29265
29266
29267
29268
29269
29270
29271
29272 GL_GNULIB_GETOPT_POSIX=1
29273
29274
29275
29276
29277
29278 printf "%s\n" "#define GNULIB_TEST_GETOPT_POSIX 1" >>confdefs.h
29279
29280
29281
29282
29283
29284
29285 ac_found=0
29286 ac_fn_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
29287 " "$ac_c_undeclared_builtin_options" "CFLAGS"
29288 if test "x$ac_cv_have_decl_program_invocation_name" = xyes
29289 then :
29290 ac_have_decl=1
29291 else $as_nop
29292 ac_have_decl=0
29293 fi
29294 printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl" >>confdefs.h
29295 if test $ac_have_decl = 1
29296 then :
29297 ac_found=1
29298 fi
29299
29300 ac_fn_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
29301 " "$ac_c_undeclared_builtin_options" "CFLAGS"
29302 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes
29303 then :
29304 ac_have_decl=1
29305 else $as_nop
29306 ac_have_decl=0
29307 fi
29308 printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl" >>confdefs.h
29309 if test $ac_have_decl = 1
29310 then :
29311 ac_found=1
29312 fi
29313
29314 ac_fn_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include <stdlib.h>
29315 " "$ac_c_undeclared_builtin_options" "CFLAGS"
29316 if test "x$ac_cv_have_decl___argv" = xyes
29317 then :
29318 ac_have_decl=1
29319 else $as_nop
29320 ac_have_decl=0
29321 fi
29322 printf "%s\n" "#define HAVE_DECL___ARGV $ac_have_decl" >>confdefs.h
29323 if test $ac_have_decl = 1
29324 then :
29325 ac_found=1
29326 fi
29327
29328
29329 # Incur the cost of this test only if none of the above worked.
29330 if test $ac_found = 0; then
29331 # On OpenBSD 5.1, using the global __progname variable appears to be
29332 # the only way to implement getprogname.
29333 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __progname is defined in default libraries" >&5
29334 printf %s "checking whether __progname is defined in default libraries... " >&6; }
29335 if test ${gl_cv_var___progname+y}
29336 then :
29337 printf %s "(cached) " >&6
29338 else $as_nop
29339
29340 gl_cv_var___progname=
29341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29342 /* end confdefs.h. */
29343 extern char *__progname;
29344 int
29345 main (void)
29346 {
29347 return *__progname;
29348
29349 ;
29350 return 0;
29351 }
29352 _ACEOF
29353 if ac_fn_c_try_link "$LINENO"
29354 then :
29355 gl_cv_var___progname=yes
29356
29357 fi
29358 rm -f core conftest.err conftest.$ac_objext conftest.beam \
29359 conftest$ac_exeext conftest.$ac_ext
29360
29361
29362 fi
29363 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var___progname" >&5
29364 printf "%s\n" "$gl_cv_var___progname" >&6; }
29365 if test "$gl_cv_var___progname" = yes; then
29366
29367 printf "%s\n" "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
29368
29369 fi
29370 fi
29371
29372
29373
29374
29375 LIB_HARD_LOCALE="$LIB_SETLOCALE_NULL"
29376
29377
29378
29379
29380
29381
29382
29383
29384
29385
29386
29387
29388
29389 if test $ac_cv_func_isblank = no; then
29390 HAVE_ISBLANK=0
29391 fi
29392
29393
29394 if test $HAVE_ISBLANK = 0; then
29395 GL_COND_OBJ_ISBLANK_TRUE=
29396 GL_COND_OBJ_ISBLANK_FALSE='#'
29397 else
29398 GL_COND_OBJ_ISBLANK_TRUE='#'
29399 GL_COND_OBJ_ISBLANK_FALSE=
29400 fi
29401 :
29402 if test -z "${GL_COND_OBJ_ISBLANK_TRUE}" && test -z "${GL_COND_OBJ_ISBLANK_FALSE}"; then
29403 GL_COND_OBJ_ISBLANK_TRUE='#'
29404 GL_COND_OBJ_ISBLANK_FALSE='#'
29405 fi
29406
29407
29408
29409 printf "%s\n" "#define GNULIB_ISBLANK 1" >>confdefs.h
29410
29411
29412
29413
29414
29415
29416
29417
29418
29419
29420
29421 GL_GNULIB_ISBLANK=1
29422
29423
29424
29425
29426
29427
29428
29429
29430
29431
29432
29433
29434
29435 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the __inline keyword" >&5
29436 printf %s "checking whether the compiler supports the __inline keyword... " >&6; }
29437 if test ${gl_cv_c___inline+y}
29438 then :
29439 printf %s "(cached) " >&6
29440 else $as_nop
29441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29442 /* end confdefs.h. */
29443 typedef int foo_t;
29444 static __inline foo_t foo (void) { return 0; }
29445 int
29446 main (void)
29447 {
29448 return foo ();
29449 ;
29450 return 0;
29451 }
29452 _ACEOF
29453 if ac_fn_c_try_compile "$LINENO"
29454 then :
29455 gl_cv_c___inline=yes
29456 else $as_nop
29457 gl_cv_c___inline=no
29458 fi
29459 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
29460 fi
29461 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c___inline" >&5
29462 printf "%s\n" "$gl_cv_c___inline" >&6; }
29463 if test $gl_cv_c___inline = yes; then
29464
29465 printf "%s\n" "#define HAVE___INLINE 1" >>confdefs.h
29466
29467 fi
29468
29469
29470
29471
29472
29473
29474 case "$GL_GENERATE_LIMITS_H" in
29475 false) LIMITS_H='' ;;
29476 true)
29477 if test -z "$LIMITS_H"; then
29478 LIMITS_H="${gl_source_base_prefix}limits.h"
29479 fi
29480 ;;
29481 *) echo "*** GL_GENERATE_LIMITS_H is not set correctly" 1>&2; exit 1 ;;
29482 esac
29483
29484
29485 if $GL_GENERATE_LIMITS_H; then
29486 GL_GENERATE_LIMITS_H_TRUE=
29487 GL_GENERATE_LIMITS_H_FALSE='#'
29488 else
29489 GL_GENERATE_LIMITS_H_TRUE='#'
29490 GL_GENERATE_LIMITS_H_FALSE=
29491 fi
29492 :
29493 if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
29494 GL_GENERATE_LIMITS_H_TRUE='#'
29495 GL_GENERATE_LIMITS_H_FALSE='#'
29496 fi
29497
29498
29499
29500
29501
29502
29503
29504
29505
29506 LOCALCHARSET_TESTS_ENVIRONMENT=
29507
29508
29509
29510
29511
29512
29513
29514
29515
29516
29517
29518
29519 if test $REPLACE_STRUCT_LCONV = 1; then
29520 REPLACE_LOCALECONV=1
29521 fi
29522
29523
29524 if test $REPLACE_LOCALECONV = 1; then
29525 GL_COND_OBJ_LOCALECONV_TRUE=
29526 GL_COND_OBJ_LOCALECONV_FALSE='#'
29527 else
29528 GL_COND_OBJ_LOCALECONV_TRUE='#'
29529 GL_COND_OBJ_LOCALECONV_FALSE=
29530 fi
29531 :
29532 if test -z "${GL_COND_OBJ_LOCALECONV_TRUE}" && test -z "${GL_COND_OBJ_LOCALECONV_FALSE}"; then
29533 GL_COND_OBJ_LOCALECONV_TRUE='#'
29534 GL_COND_OBJ_LOCALECONV_FALSE='#'
29535 fi
29536
29537 if test -z "$GL_COND_OBJ_LOCALECONV_TRUE"; then :
29538
29539
29540 ac_fn_c_check_member "$LINENO" "struct lconv" "decimal_point" "ac_cv_member_struct_lconv_decimal_point" "#include <locale.h>
29541 "
29542 if test "x$ac_cv_member_struct_lconv_decimal_point" = xyes
29543 then :
29544
29545 printf "%s\n" "#define HAVE_STRUCT_LCONV_DECIMAL_POINT 1" >>confdefs.h
29546
29547
29548 fi
29549
29550
29551
29552 fi
29553
29554
29555
29556
29557
29558
29559
29560
29561
29562 GL_GNULIB_LOCALECONV=1
29563
29564
29565
29566
29567
29568 printf "%s\n" "#define GNULIB_TEST_LOCALECONV 1" >>confdefs.h
29569
29570
29571
29572
29573
29574 if test "$gl_threads_api" = posix; then
29575 # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
29576 # pthread_rwlock_* functions.
29577 has_rwlock=false
29578 ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
29579 "
29580 if test "x$ac_cv_type_pthread_rwlock_t" = xyes
29581 then :
29582 has_rwlock=true
29583
29584 printf "%s\n" "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
29585
29586 fi
29587
29588 if $has_rwlock; then
29589
29590
29591 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_rwlock_rdlock prefers a writer to a reader" >&5
29592 printf %s "checking whether pthread_rwlock_rdlock prefers a writer to a reader... " >&6; }
29593 if test ${gl_cv_pthread_rwlock_rdlock_prefer_writer+y}
29594 then :
29595 printf %s "(cached) " >&6
29596 else $as_nop
29597 save_LIBS="$LIBS"
29598 LIBS="$LIBS $LIBMULTITHREAD"
29599 if test "$cross_compiling" = yes
29600 then :
29601 case "$host_os" in
29602 # Guess no on glibc systems.
29603 *-gnu* | gnu*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
29604 # Guess no on musl systems.
29605 *-musl*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
29606 # Guess no on bionic systems.
29607 *-android*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
29608 # Guess yes on native Windows with the mingw-w64 winpthreads library.
29609 # Guess no on native Windows with the gnulib windows-rwlock module.
29610 mingw*) if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
29611 gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes"
29612 else
29613 gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no"
29614 fi
29615 ;;
29616 # If we don't know, obey --enable-cross-guesses.
29617 *) gl_cv_pthread_rwlock_rdlock_prefer_writer="$gl_cross_guess_normal" ;;
29618 esac
29619
29620 else $as_nop
29621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29622 /* end confdefs.h. */
29623
29624 #include <errno.h>
29625 #include <pthread.h>
29626 #include <stdlib.h>
29627 #include <unistd.h>
29628
29629 #define SUCCEED() exit (0)
29630 #define FAILURE() exit (1)
29631 #define UNEXPECTED(n) (exit (10 + (n)))
29632
29633 /* The main thread creates the waiting writer and the requesting reader threads
29634 in the default way; this guarantees that they have the same priority.
29635 We can reuse the main thread as first reader thread. */
29636
29637 static pthread_rwlock_t lock;
29638 static pthread_t reader1;
29639 static pthread_t writer;
29640 static pthread_t reader2;
29641 static pthread_t timer;
29642 /* Used to pass control from writer to reader2 and from reader2 to timer,
29643 as in a relay race.
29644 Passing control from one running thread to another running thread
29645 is most likely faster than to create the second thread. */
29646 static pthread_mutex_t baton;
29647
29648 static void *
29649 timer_func (void *ignored)
29650 {
29651 /* Step 13 (can be before or after step 12):
29652 The timer thread takes the baton, then waits a moment to make sure
29653 it can tell whether the second reader thread is blocked at step 12. */
29654 if (pthread_mutex_lock (&baton))
29655 UNEXPECTED (13);
29656 usleep (100000);
29657 /* By the time we get here, it's clear that the second reader thread is
29658 blocked at step 12. This is the desired behaviour. */
29659 SUCCEED ();
29660 }
29661
29662 static void *
29663 reader2_func (void *ignored)
29664 {
29665 int err;
29666
29667 /* Step 8 (can be before or after step 7):
29668 The second reader thread takes the baton, then waits a moment to make sure
29669 the writer thread has reached step 7. */
29670 if (pthread_mutex_lock (&baton))
29671 UNEXPECTED (8);
29672 usleep (100000);
29673 /* Step 9: The second reader thread requests the lock. */
29674 err = pthread_rwlock_tryrdlock (&lock);
29675 if (err == 0)
29676 FAILURE ();
29677 else if (err != EBUSY)
29678 UNEXPECTED (9);
29679 /* Step 10: Launch a timer, to test whether the next call blocks. */
29680 if (pthread_create (&timer, NULL, timer_func, NULL))
29681 UNEXPECTED (10);
29682 /* Step 11: Release the baton. */
29683 if (pthread_mutex_unlock (&baton))
29684 UNEXPECTED (11);
29685 /* Step 12: The second reader thread requests the lock. */
29686 err = pthread_rwlock_rdlock (&lock);
29687 if (err == 0)
29688 FAILURE ();
29689 else
29690 UNEXPECTED (12);
29691 }
29692
29693 static void *
29694 writer_func (void *ignored)
29695 {
29696 /* Step 4: Take the baton, so that the second reader thread does not go ahead
29697 too early. */
29698 if (pthread_mutex_lock (&baton))
29699 UNEXPECTED (4);
29700 /* Step 5: Create the second reader thread. */
29701 if (pthread_create (&reader2, NULL, reader2_func, NULL))
29702 UNEXPECTED (5);
29703 /* Step 6: Release the baton. */
29704 if (pthread_mutex_unlock (&baton))
29705 UNEXPECTED (6);
29706 /* Step 7: The writer thread requests the lock. */
29707 if (pthread_rwlock_wrlock (&lock))
29708 UNEXPECTED (7);
29709 return NULL;
29710 }
29711
29712 int
29713 main ()
29714 {
29715 reader1 = pthread_self ();
29716
29717 /* Step 1: The main thread initializes the lock and the baton. */
29718 if (pthread_rwlock_init (&lock, NULL))
29719 UNEXPECTED (1);
29720 if (pthread_mutex_init (&baton, NULL))
29721 UNEXPECTED (1);
29722 /* Step 2: The main thread acquires the lock as a reader. */
29723 if (pthread_rwlock_rdlock (&lock))
29724 UNEXPECTED (2);
29725 /* Step 3: Create the writer thread. */
29726 if (pthread_create (&writer, NULL, writer_func, NULL))
29727 UNEXPECTED (3);
29728 /* Job done. Go to sleep. */
29729 for (;;)
29730 {
29731 sleep (1);
29732 }
29733 }
29734
29735 _ACEOF
29736 if ac_fn_c_try_run "$LINENO"
29737 then :
29738 gl_cv_pthread_rwlock_rdlock_prefer_writer=yes
29739 else $as_nop
29740 gl_cv_pthread_rwlock_rdlock_prefer_writer=no
29741 fi
29742 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29743 conftest.$ac_objext conftest.beam conftest.$ac_ext
29744 fi
29745
29746 LIBS="$save_LIBS"
29747
29748 fi
29749 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pthread_rwlock_rdlock_prefer_writer" >&5
29750 printf "%s\n" "$gl_cv_pthread_rwlock_rdlock_prefer_writer" >&6; }
29751 case "$gl_cv_pthread_rwlock_rdlock_prefer_writer" in
29752 *yes)
29753
29754 printf "%s\n" "#define HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER 1" >>confdefs.h
29755
29756 ;;
29757 esac
29758
29759 fi
29760 # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
29761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29762 /* end confdefs.h. */
29763
29764 #include <pthread.h>
29765 int
29766 main (void)
29767 {
29768
29769 #if __FreeBSD__ == 4
29770 error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
29771 #elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
29772 && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
29773 error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
29774 #else
29775 int x = (int)PTHREAD_MUTEX_RECURSIVE;
29776 return !x;
29777 #endif
29778
29779 ;
29780 return 0;
29781 }
29782 _ACEOF
29783 if ac_fn_c_try_compile "$LINENO"
29784 then :
29785
29786 printf "%s\n" "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
29787
29788 fi
29789 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
29790 fi
29791 :
29792
29793
29794
29795 printf "%s\n" "#define GNULIB_LOCK 1" >>confdefs.h
29796
29797
29798
29799
29800
29801 REPLACE_MALLOC_FOR_MALLOC_GNU="$REPLACE_MALLOC_FOR_MALLOC_POSIX"
29802 if test $REPLACE_MALLOC_FOR_MALLOC_GNU = 0; then
29803
29804 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc (0) returns nonnull" >&5
29805 printf %s "checking whether malloc (0) returns nonnull... " >&6; }
29806 if test ${ac_cv_func_malloc_0_nonnull+y}
29807 then :
29808 printf %s "(cached) " >&6
29809 else $as_nop
29810 if test "$cross_compiling" = yes
29811 then :
29812 case "$host_os" in
29813 # Guess yes on platforms where we know the result.
29814 *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
29815 | gnu* | *-musl* | midnightbsd* \
29816 | hpux* | solaris* | cygwin* | mingw* | msys* )
29817 ac_cv_func_malloc_0_nonnull="guessing yes" ;;
29818 # If we don't know, obey --enable-cross-guesses.
29819 *) ac_cv_func_malloc_0_nonnull="$gl_cross_guess_normal" ;;
29820 esac
29821
29822 else $as_nop
29823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29824 /* end confdefs.h. */
29825 #include <stdlib.h>
29826
29827 int
29828 main (void)
29829 {
29830 void *p = malloc (0);
29831 int result = !p;
29832 free (p);
29833 return result;
29834 ;
29835 return 0;
29836 }
29837
29838 _ACEOF
29839 if ac_fn_c_try_run "$LINENO"
29840 then :
29841 ac_cv_func_malloc_0_nonnull=yes
29842 else $as_nop
29843 ac_cv_func_malloc_0_nonnull=no
29844 fi
29845 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29846 conftest.$ac_objext conftest.beam conftest.$ac_ext
29847 fi
29848
29849
29850 fi
29851 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
29852 printf "%s\n" "$ac_cv_func_malloc_0_nonnull" >&6; }
29853 case $ac_cv_func_malloc_0_nonnull in #(
29854 *yes) :
29855 ;; #(
29856 *) :
29857 REPLACE_MALLOC_FOR_MALLOC_GNU=1 ;;
29858 esac
29859
29860 fi
29861
29862 if test $REPLACE_MALLOC_FOR_MALLOC_GNU = 1; then
29863
29864
29865
29866
29867
29868
29869
29870
29871 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
29872
29873 fi
29874
29875
29876
29877
29878
29879
29880
29881
29882
29883 GL_GNULIB_MALLOC_GNU=1
29884
29885
29886
29887
29888
29889 printf "%s\n" "#define GNULIB_TEST_MALLOC_GNU 1" >>confdefs.h
29890
29891
29892
29893
29894 if test $REPLACE_MALLOC_FOR_MALLOC_POSIX = 1; then
29895
29896
29897
29898
29899
29900
29901
29902
29903 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
29904
29905 fi
29906
29907
29908
29909
29910
29911
29912
29913
29914
29915 GL_GNULIB_MALLOC_POSIX=1
29916
29917
29918
29919
29920
29921 printf "%s\n" "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
29922
29923
29924
29925
29926
29927
29928
29929
29930
29931
29932
29933
29934
29935
29936
29937
29938
29939
29940
29941 if case "$host_os" in
29942 mingw*) true ;;
29943 *) test $ac_cv_func_mbsinit = yes ;;
29944 esac \
29945 && test $ac_cv_func_mbrtowc = yes; then
29946
29947
29948
29949
29950 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
29951 printf %s "checking whether mbrtowc handles incomplete characters... " >&6; }
29952 if test ${gl_cv_func_mbrtowc_incomplete_state+y}
29953 then :
29954 printf %s "(cached) " >&6
29955 else $as_nop
29956
29957 case "$host_os" in
29958 # Guess no on AIX and OSF/1.
29959 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
29960 # Guess yes otherwise.
29961 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
29962 esac
29963 if test $LOCALE_JA != none; then
29964 if test "$cross_compiling" = yes
29965 then :
29966 :
29967 else $as_nop
29968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29969 /* end confdefs.h. */
29970
29971 #include <locale.h>
29972 #include <string.h>
29973 #include <wchar.h>
29974 int main ()
29975 {
29976 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
29977 {
29978 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
29979 mbstate_t state;
29980 wchar_t wc;
29981
29982 memset (&state, '\0', sizeof (mbstate_t));
29983 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
29984 if (mbsinit (&state))
29985 return 2;
29986 }
29987 return 0;
29988 }
29989 _ACEOF
29990 if ac_fn_c_try_run "$LINENO"
29991 then :
29992 gl_cv_func_mbrtowc_incomplete_state=yes
29993 else $as_nop
29994 gl_cv_func_mbrtowc_incomplete_state=no
29995 fi
29996 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29997 conftest.$ac_objext conftest.beam conftest.$ac_ext
29998 fi
29999
30000 else
30001 if test $LOCALE_FR_UTF8 != none; then
30002 if test "$cross_compiling" = yes
30003 then :
30004 :
30005 else $as_nop
30006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30007 /* end confdefs.h. */
30008
30009 #include <locale.h>
30010 #include <string.h>
30011 #include <wchar.h>
30012 int main ()
30013 {
30014 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
30015 {
30016 const char input[] = "B\303\274\303\237er"; /* "Büßer" */
30017 mbstate_t state;
30018 wchar_t wc;
30019
30020 memset (&state, '\0', sizeof (mbstate_t));
30021 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
30022 if (mbsinit (&state))
30023 return 2;
30024 }
30025 return 0;
30026 }
30027 _ACEOF
30028 if ac_fn_c_try_run "$LINENO"
30029 then :
30030 gl_cv_func_mbrtowc_incomplete_state=yes
30031 else $as_nop
30032 gl_cv_func_mbrtowc_incomplete_state=no
30033 fi
30034 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30035 conftest.$ac_objext conftest.beam conftest.$ac_ext
30036 fi
30037
30038 fi
30039 fi
30040
30041 fi
30042 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
30043 printf "%s\n" "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
30044
30045
30046
30047
30048 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
30049 printf %s "checking whether mbrtowc works as well as mbtowc... " >&6; }
30050 if test ${gl_cv_func_mbrtowc_sanitycheck+y}
30051 then :
30052 printf %s "(cached) " >&6
30053 else $as_nop
30054
30055 case "$host_os" in
30056 # Guess no on Solaris 8.
30057 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
30058 # Guess yes otherwise.
30059 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
30060 esac
30061 if test $LOCALE_ZH_CN != none; then
30062 if test "$cross_compiling" = yes
30063 then :
30064 :
30065 else $as_nop
30066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30067 /* end confdefs.h. */
30068
30069 #include <locale.h>
30070 #include <stdlib.h>
30071 #include <string.h>
30072 #include <wchar.h>
30073 int main ()
30074 {
30075 /* This fails on Solaris 8:
30076 mbrtowc returns 2, and sets wc to 0x00F0.
30077 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
30078 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
30079 {
30080 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
30081 mbstate_t state;
30082 wchar_t wc;
30083
30084 memset (&state, '\0', sizeof (mbstate_t));
30085 if (mbrtowc (&wc, input + 3, 6, &state) != 4
30086 && mbtowc (&wc, input + 3, 6) == 4)
30087 return 2;
30088 }
30089 return 0;
30090 }
30091 _ACEOF
30092 if ac_fn_c_try_run "$LINENO"
30093 then :
30094 gl_cv_func_mbrtowc_sanitycheck=yes
30095 else $as_nop
30096 gl_cv_func_mbrtowc_sanitycheck=no
30097 fi
30098 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30099 conftest.$ac_objext conftest.beam conftest.$ac_ext
30100 fi
30101
30102 fi
30103
30104 fi
30105 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
30106 printf "%s\n" "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
30107
30108 REPLACE_MBSTATE_T=0
30109 case "$gl_cv_func_mbrtowc_incomplete_state" in
30110 *yes) ;;
30111 *) REPLACE_MBSTATE_T=1 ;;
30112 esac
30113 case "$gl_cv_func_mbrtowc_sanitycheck" in
30114 *yes) ;;
30115 *) REPLACE_MBSTATE_T=1 ;;
30116 esac
30117 else
30118 REPLACE_MBSTATE_T=1
30119 fi
30120
30121
30122
30123 if test $ac_cv_func_mbrtowc = no; then
30124 HAVE_MBRTOWC=0
30125 ac_fn_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
30126 #include <wchar.h>
30127
30128 " "$ac_c_undeclared_builtin_options" "CFLAGS"
30129 if test "x$ac_cv_have_decl_mbrtowc" = xyes
30130 then :
30131 ac_have_decl=1
30132 else $as_nop
30133 ac_have_decl=0
30134 fi
30135 printf "%s\n" "#define HAVE_DECL_MBRTOWC $ac_have_decl" >>confdefs.h
30136
30137 if test $ac_cv_have_decl_mbrtowc = yes; then
30138 REPLACE_MBRTOWC=1
30139 fi
30140 else
30141 if test $REPLACE_MBSTATE_T = 1; then
30142 REPLACE_MBRTOWC=1
30143 else
30144
30145
30146
30147 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
30148 printf %s "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
30149 if test ${gl_cv_func_mbrtowc_null_arg1+y}
30150 then :
30151 printf %s "(cached) " >&6
30152 else $as_nop
30153
30154 case "$host_os" in
30155 # Guess no on Solaris.
30156 solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
30157 # Guess yes otherwise.
30158 *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
30159 esac
30160 if test $LOCALE_FR_UTF8 != none; then
30161 if test "$cross_compiling" = yes
30162 then :
30163 :
30164 else $as_nop
30165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30166 /* end confdefs.h. */
30167
30168 #include <locale.h>
30169 #include <stdlib.h>
30170 #include <string.h>
30171 #include <wchar.h>
30172 int main ()
30173 {
30174 int result = 0;
30175
30176 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
30177 {
30178 char input[] = "\303\237er";
30179 mbstate_t state;
30180 wchar_t wc;
30181 size_t ret;
30182
30183 memset (&state, '\0', sizeof (mbstate_t));
30184 wc = (wchar_t) 0xBADFACE;
30185 ret = mbrtowc (&wc, input, 5, &state);
30186 if (ret != 2)
30187 result |= 1;
30188 if (!mbsinit (&state))
30189 result |= 2;
30190
30191 memset (&state, '\0', sizeof (mbstate_t));
30192 ret = mbrtowc (NULL, input, 5, &state);
30193 if (ret != 2) /* Solaris 7 fails here: ret is -1. */
30194 result |= 4;
30195 if (!mbsinit (&state))
30196 result |= 8;
30197 }
30198 return result;
30199 }
30200 _ACEOF
30201 if ac_fn_c_try_run "$LINENO"
30202 then :
30203 gl_cv_func_mbrtowc_null_arg1=yes
30204 else $as_nop
30205 gl_cv_func_mbrtowc_null_arg1=no
30206 fi
30207 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30208 conftest.$ac_objext conftest.beam conftest.$ac_ext
30209 fi
30210
30211 fi
30212
30213 fi
30214 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
30215 printf "%s\n" "$gl_cv_func_mbrtowc_null_arg1" >&6; }
30216
30217
30218
30219
30220 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
30221 printf %s "checking whether mbrtowc handles a NULL string argument... " >&6; }
30222 if test ${gl_cv_func_mbrtowc_null_arg2+y}
30223 then :
30224 printf %s "(cached) " >&6
30225 else $as_nop
30226
30227 case "$host_os" in
30228 # Guess no on OSF/1.
30229 osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
30230 # Guess yes otherwise.
30231 *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
30232 esac
30233 if test $LOCALE_FR_UTF8 != none; then
30234 if test "$cross_compiling" = yes
30235 then :
30236 :
30237 else $as_nop
30238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30239 /* end confdefs.h. */
30240
30241 #include <locale.h>
30242 #include <string.h>
30243 #include <wchar.h>
30244 int main ()
30245 {
30246 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
30247 {
30248 mbstate_t state;
30249 wchar_t wc;
30250 int ret;
30251
30252 memset (&state, '\0', sizeof (mbstate_t));
30253 wc = (wchar_t) 0xBADFACE;
30254 mbrtowc (&wc, NULL, 5, &state);
30255 /* Check that wc was not modified. */
30256 if (wc != (wchar_t) 0xBADFACE)
30257 return 2;
30258 }
30259 return 0;
30260 }
30261 _ACEOF
30262 if ac_fn_c_try_run "$LINENO"
30263 then :
30264 gl_cv_func_mbrtowc_null_arg2=yes
30265 else $as_nop
30266 gl_cv_func_mbrtowc_null_arg2=no
30267 fi
30268 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30269 conftest.$ac_objext conftest.beam conftest.$ac_ext
30270 fi
30271
30272 fi
30273
30274 fi
30275 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
30276 printf "%s\n" "$gl_cv_func_mbrtowc_null_arg2" >&6; }
30277
30278
30279
30280
30281
30282
30283 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
30284 printf %s "checking whether mbrtowc has a correct return value... " >&6; }
30285 if test ${gl_cv_func_mbrtowc_retval+y}
30286 then :
30287 printf %s "(cached) " >&6
30288 else $as_nop
30289
30290 case "$host_os" in
30291 # Guess no on HP-UX, Solaris, native Windows.
30292 hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
30293 # Guess yes otherwise.
30294 *) gl_cv_func_mbrtowc_retval="guessing yes" ;;
30295 esac
30296 if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
30297 || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
30298 if test "$cross_compiling" = yes
30299 then :
30300 :
30301 else $as_nop
30302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30303 /* end confdefs.h. */
30304
30305 #include <locale.h>
30306 #include <string.h>
30307 #include <wchar.h>
30308 int main ()
30309 {
30310 int result = 0;
30311 int found_some_locale = 0;
30312 /* This fails on Solaris. */
30313 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
30314 {
30315 char input[] = "B\303\274\303\237er"; /* "Büßer" */
30316 mbstate_t state;
30317 wchar_t wc;
30318
30319 memset (&state, '\0', sizeof (mbstate_t));
30320 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
30321 {
30322 input[1] = '\0';
30323 if (mbrtowc (&wc, input + 2, 5, &state) != 1)
30324 result |= 1;
30325 }
30326 found_some_locale = 1;
30327 }
30328 /* This fails on HP-UX 11.11. */
30329 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
30330 {
30331 char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
30332 mbstate_t state;
30333 wchar_t wc;
30334
30335 memset (&state, '\0', sizeof (mbstate_t));
30336 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
30337 {
30338 input[1] = '\0';
30339 if (mbrtowc (&wc, input + 2, 5, &state) != 2)
30340 result |= 2;
30341 }
30342 found_some_locale = 1;
30343 }
30344 /* This fails on native Windows. */
30345 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
30346 {
30347 char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
30348 mbstate_t state;
30349 wchar_t wc;
30350
30351 memset (&state, '\0', sizeof (mbstate_t));
30352 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
30353 {
30354 input[3] = '\0';
30355 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
30356 result |= 4;
30357 }
30358 found_some_locale = 1;
30359 }
30360 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
30361 {
30362 char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
30363 mbstate_t state;
30364 wchar_t wc;
30365
30366 memset (&state, '\0', sizeof (mbstate_t));
30367 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
30368 {
30369 input[3] = '\0';
30370 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
30371 result |= 8;
30372 }
30373 found_some_locale = 1;
30374 }
30375 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
30376 {
30377 char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
30378 mbstate_t state;
30379 wchar_t wc;
30380
30381 memset (&state, '\0', sizeof (mbstate_t));
30382 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
30383 {
30384 input[3] = '\0';
30385 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
30386 result |= 16;
30387 }
30388 found_some_locale = 1;
30389 }
30390 return (found_some_locale ? result : 77);
30391 }
30392 _ACEOF
30393 if ac_fn_c_try_run "$LINENO"
30394 then :
30395 gl_cv_func_mbrtowc_retval=yes
30396 else $as_nop
30397 if test $? != 77; then
30398 gl_cv_func_mbrtowc_retval=no
30399 fi
30400
30401 fi
30402 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30403 conftest.$ac_objext conftest.beam conftest.$ac_ext
30404 fi
30405
30406 fi
30407
30408 fi
30409 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
30410 printf "%s\n" "$gl_cv_func_mbrtowc_retval" >&6; }
30411
30412
30413
30414
30415 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
30416 printf %s "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
30417 if test ${gl_cv_func_mbrtowc_nul_retval+y}
30418 then :
30419 printf %s "(cached) " >&6
30420 else $as_nop
30421
30422 case "$host_os" in
30423 # Guess no on Solaris 8 and 9.
30424 solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
30425 # Guess yes otherwise.
30426 *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
30427 esac
30428 if test $LOCALE_ZH_CN != none; then
30429 if test "$cross_compiling" = yes
30430 then :
30431 :
30432 else $as_nop
30433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30434 /* end confdefs.h. */
30435
30436 #include <locale.h>
30437 #include <string.h>
30438 #include <wchar.h>
30439 int main ()
30440 {
30441 /* This fails on Solaris 8 and 9. */
30442 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
30443 {
30444 mbstate_t state;
30445 wchar_t wc;
30446
30447 memset (&state, '\0', sizeof (mbstate_t));
30448 if (mbrtowc (&wc, "", 1, &state) != 0)
30449 return 2;
30450 }
30451 return 0;
30452 }
30453 _ACEOF
30454 if ac_fn_c_try_run "$LINENO"
30455 then :
30456 gl_cv_func_mbrtowc_nul_retval=yes
30457 else $as_nop
30458 gl_cv_func_mbrtowc_nul_retval=no
30459 fi
30460 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30461 conftest.$ac_objext conftest.beam conftest.$ac_ext
30462 fi
30463
30464 fi
30465
30466 fi
30467 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
30468 printf "%s\n" "$gl_cv_func_mbrtowc_nul_retval" >&6; }
30469
30470
30471
30472 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc stores incomplete characters" >&5
30473 printf %s "checking whether mbrtowc stores incomplete characters... " >&6; }
30474 if test ${gl_cv_func_mbrtowc_stores_incomplete+y}
30475 then :
30476 printf %s "(cached) " >&6
30477 else $as_nop
30478
30479 case "$host_os" in
30480 # Guess yes on native Windows.
30481 mingw*) gl_cv_func_mbrtowc_stores_incomplete="guessing yes" ;;
30482 *) gl_cv_func_mbrtowc_stores_incomplete="guessing no" ;;
30483 esac
30484 case "$host_os" in
30485 mingw*)
30486 if test "$cross_compiling" = yes
30487 then :
30488 :
30489 else $as_nop
30490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30491 /* end confdefs.h. */
30492
30493 #include <locale.h>
30494 #include <string.h>
30495 #include <wchar.h>
30496 int main ()
30497 {
30498 int result = 0;
30499 if (setlocale (LC_ALL, "French_France.65001") != NULL)
30500 {
30501 wchar_t wc = (wchar_t) 0xBADFACE;
30502 mbstate_t state;
30503
30504 memset (&state, '\0', sizeof (mbstate_t));
30505 if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2)
30506 && wc != (wchar_t) 0xBADFACE)
30507 result |= 1;
30508 }
30509 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
30510 {
30511 wchar_t wc = (wchar_t) 0xBADFACE;
30512 mbstate_t state;
30513
30514 memset (&state, '\0', sizeof (mbstate_t));
30515 if (mbrtowc (&wc, "\226", 1, &state) == (size_t)(-2)
30516 && wc != (wchar_t) 0xBADFACE)
30517 result |= 2;
30518 }
30519 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
30520 {
30521 wchar_t wc = (wchar_t) 0xBADFACE;
30522 mbstate_t state;
30523
30524 memset (&state, '\0', sizeof (mbstate_t));
30525 if (mbrtowc (&wc, "\245", 1, &state) == (size_t)(-2)
30526 && wc != (wchar_t) 0xBADFACE)
30527 result |= 4;
30528 }
30529 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
30530 {
30531 wchar_t wc = (wchar_t) 0xBADFACE;
30532 mbstate_t state;
30533
30534 memset (&state, '\0', sizeof (mbstate_t));
30535 if (mbrtowc (&wc, "\261", 1, &state) == (size_t)(-2)
30536 && wc != (wchar_t) 0xBADFACE)
30537 result |= 8;
30538 }
30539 return result;
30540 }
30541 _ACEOF
30542 if ac_fn_c_try_run "$LINENO"
30543 then :
30544 gl_cv_func_mbrtowc_stores_incomplete=no
30545 else $as_nop
30546 gl_cv_func_mbrtowc_stores_incomplete=yes
30547 fi
30548 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30549 conftest.$ac_objext conftest.beam conftest.$ac_ext
30550 fi
30551
30552 ;;
30553 *)
30554
30555 if test $LOCALE_FR_UTF8 != none; then
30556 if test "$cross_compiling" = yes
30557 then :
30558 :
30559 else $as_nop
30560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30561 /* end confdefs.h. */
30562
30563 #include <locale.h>
30564 #include <string.h>
30565 #include <wchar.h>
30566 int main ()
30567 {
30568 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
30569 {
30570 wchar_t wc = (wchar_t) 0xBADFACE;
30571 mbstate_t state;
30572
30573 memset (&state, '\0', sizeof (mbstate_t));
30574 if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2)
30575 && wc != (wchar_t) 0xBADFACE)
30576 return 1;
30577 }
30578 return 0;
30579 }
30580 _ACEOF
30581 if ac_fn_c_try_run "$LINENO"
30582 then :
30583 gl_cv_func_mbrtowc_stores_incomplete=no
30584 else $as_nop
30585 gl_cv_func_mbrtowc_stores_incomplete=yes
30586 fi
30587 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30588 conftest.$ac_objext conftest.beam conftest.$ac_ext
30589 fi
30590
30591 fi
30592 ;;
30593 esac
30594
30595 fi
30596 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_stores_incomplete" >&5
30597 printf "%s\n" "$gl_cv_func_mbrtowc_stores_incomplete" >&6; }
30598
30599
30600
30601 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5
30602 printf %s "checking whether mbrtowc works on empty input... " >&6; }
30603 if test ${gl_cv_func_mbrtowc_empty_input+y}
30604 then :
30605 printf %s "(cached) " >&6
30606 else $as_nop
30607
30608 case "$host_os" in
30609 # Guess no on AIX and glibc systems.
30610 aix* | *-gnu* | gnu*) gl_cv_func_mbrtowc_empty_input="guessing no" ;;
30611 # Guess yes on native Windows.
30612 mingw*) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
30613 *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
30614 esac
30615 if test "$cross_compiling" = yes
30616 then :
30617 :
30618 else $as_nop
30619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30620 /* end confdefs.h. */
30621
30622 #include <wchar.h>
30623 static wchar_t wc;
30624 static mbstate_t mbs;
30625 int
30626 main (void)
30627 {
30628 return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
30629 }
30630 _ACEOF
30631 if ac_fn_c_try_run "$LINENO"
30632 then :
30633 gl_cv_func_mbrtowc_empty_input=yes
30634 else $as_nop
30635 gl_cv_func_mbrtowc_empty_input=no
30636 fi
30637 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30638 conftest.$ac_objext conftest.beam conftest.$ac_ext
30639 fi
30640
30641
30642 fi
30643 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5
30644 printf "%s\n" "$gl_cv_func_mbrtowc_empty_input" >&6; }
30645
30646
30647 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
30648 printf %s "checking whether the C locale is free of encoding errors... " >&6; }
30649 if test ${gl_cv_func_mbrtowc_C_locale_sans_EILSEQ+y}
30650 then :
30651 printf %s "(cached) " >&6
30652 else $as_nop
30653
30654 gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="$gl_cross_guess_normal"
30655
30656 if test "$cross_compiling" = yes
30657 then :
30658 case "$host_os" in
30659 # Guess yes on native Windows.
30660 mingw*) gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="guessing yes" ;;
30661 esac
30662
30663 else $as_nop
30664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30665 /* end confdefs.h. */
30666 #include <limits.h>
30667 #include <locale.h>
30668 #include <wchar.h>
30669
30670 int
30671 main (void)
30672 {
30673
30674 int i;
30675 char *locale = setlocale (LC_ALL, "C");
30676 if (! locale)
30677 return 2;
30678 for (i = CHAR_MIN; i <= CHAR_MAX; i++)
30679 {
30680 char c = i;
30681 wchar_t wc;
30682 mbstate_t mbs = { 0, };
30683 size_t ss = mbrtowc (&wc, &c, 1, &mbs);
30684 if (1 < ss)
30685 return 3;
30686 }
30687 return 0;
30688
30689 ;
30690 return 0;
30691 }
30692 _ACEOF
30693 if ac_fn_c_try_run "$LINENO"
30694 then :
30695 gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=yes
30696 else $as_nop
30697 gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=no
30698 fi
30699 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30700 conftest.$ac_objext conftest.beam conftest.$ac_ext
30701 fi
30702
30703
30704 fi
30705 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&5
30706 printf "%s\n" "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&6; }
30707
30708 case "$gl_cv_func_mbrtowc_null_arg1" in
30709 *yes) ;;
30710 *)
30711 printf "%s\n" "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
30712
30713 REPLACE_MBRTOWC=1
30714 ;;
30715 esac
30716 case "$gl_cv_func_mbrtowc_null_arg2" in
30717 *yes) ;;
30718 *)
30719 printf "%s\n" "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
30720
30721 REPLACE_MBRTOWC=1
30722 ;;
30723 esac
30724 case "$gl_cv_func_mbrtowc_retval" in
30725 *yes) ;;
30726 *)
30727 printf "%s\n" "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
30728
30729 REPLACE_MBRTOWC=1
30730 ;;
30731 esac
30732 case "$gl_cv_func_mbrtowc_nul_retval" in
30733 *yes) ;;
30734 *)
30735 printf "%s\n" "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
30736
30737 REPLACE_MBRTOWC=1
30738 ;;
30739 esac
30740 case "$gl_cv_func_mbrtowc_stores_incomplete" in
30741 *no) ;;
30742 *)
30743 printf "%s\n" "#define MBRTOWC_STORES_INCOMPLETE_BUG 1" >>confdefs.h
30744
30745 REPLACE_MBRTOWC=1
30746 ;;
30747 esac
30748 case "$gl_cv_func_mbrtowc_empty_input" in
30749 *yes) ;;
30750 *)
30751 printf "%s\n" "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h
30752
30753 REPLACE_MBRTOWC=1
30754 ;;
30755 esac
30756 case "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" in
30757 *yes) ;;
30758 *)
30759 printf "%s\n" "#define MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
30760
30761 REPLACE_MBRTOWC=1
30762 ;;
30763 esac
30764 fi
30765 fi
30766 if test $REPLACE_MBSTATE_T = 1; then
30767 case "$host_os" in
30768 mingw*) LIB_MBRTOWC= ;;
30769 *)
30770
30771
30772 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
30773 printf %s "checking whether imported symbols can be declared weak... " >&6; }
30774 if test ${gl_cv_have_weak+y}
30775 then :
30776 printf %s "(cached) " >&6
30777 else $as_nop
30778 case "$host_os" in
30779 cygwin*)
30780 gl_cv_have_weak="guessing no"
30781 ;;
30782 *)
30783 gl_cv_have_weak=no
30784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30785 /* end confdefs.h. */
30786 extern void xyzzy ();
30787 #pragma weak xyzzy
30788 int
30789 main (void)
30790 {
30791 xyzzy();
30792 ;
30793 return 0;
30794 }
30795 _ACEOF
30796 if ac_fn_c_try_link "$LINENO"
30797 then :
30798 gl_cv_have_weak=maybe
30799 fi
30800 rm -f core conftest.err conftest.$ac_objext conftest.beam \
30801 conftest$ac_exeext conftest.$ac_ext
30802 if test $gl_cv_have_weak = maybe; then
30803 if test "$cross_compiling" = yes
30804 then :
30805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30806 /* end confdefs.h. */
30807 #ifdef __ELF__
30808 Extensible Linking Format
30809 #endif
30810
30811 _ACEOF
30812 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
30813 $EGREP "Extensible Linking Format" >/dev/null 2>&1
30814 then :
30815 gl_cv_have_weak="guessing yes"
30816 else $as_nop
30817 gl_cv_have_weak="guessing no"
30818 fi
30819 rm -rf conftest*
30820
30821
30822 else $as_nop
30823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30824 /* end confdefs.h. */
30825
30826 #include <stdio.h>
30827 #pragma weak fputs
30828 int main ()
30829 {
30830 return (fputs == NULL);
30831 }
30832 _ACEOF
30833 if ac_fn_c_try_run "$LINENO"
30834 then :
30835 gl_cv_have_weak=yes
30836 else $as_nop
30837 gl_cv_have_weak=no
30838 fi
30839 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30840 conftest.$ac_objext conftest.beam conftest.$ac_ext
30841 fi
30842
30843 fi
30844 ;;
30845 esac
30846 case " $LDFLAGS " in
30847 *" -static "*) gl_cv_have_weak=no ;;
30848 esac
30849 case "$gl_cv_have_weak" in
30850 *yes)
30851 case "$host_os" in
30852 freebsd* | dragonfly* | midnightbsd*)
30853 : > conftest1.c
30854 $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
30855 cat <<EOF > conftest2.c
30856 #include <pthread.h>
30857 #pragma weak pthread_mutexattr_gettype
30858 int main ()
30859 {
30860 return (pthread_mutexattr_gettype != NULL);
30861 }
30862 EOF
30863 $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
30864 || gl_cv_have_weak=no
30865 rm -f conftest1.c libempty.so conftest2.c conftest
30866 ;;
30867 esac
30868 ;;
30869 esac
30870
30871 fi
30872 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
30873 printf "%s\n" "$gl_cv_have_weak" >&6; }
30874 case "$gl_cv_have_weak" in
30875 *yes)
30876
30877 printf "%s\n" "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
30878
30879 ;;
30880 esac
30881
30882 case "$gl_cv_have_weak" in
30883 *yes) LIB_MBRTOWC= ;;
30884 *) LIB_MBRTOWC="$LIBPTHREAD" ;;
30885 esac
30886 ;;
30887 esac
30888 else
30889 LIB_MBRTOWC=
30890 fi
30891
30892
30893
30894 if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
30895 GL_COND_OBJ_MBRTOWC_TRUE=
30896 GL_COND_OBJ_MBRTOWC_FALSE='#'
30897 else
30898 GL_COND_OBJ_MBRTOWC_TRUE='#'
30899 GL_COND_OBJ_MBRTOWC_FALSE=
30900 fi
30901 :
30902 if test -z "${GL_COND_OBJ_MBRTOWC_TRUE}" && test -z "${GL_COND_OBJ_MBRTOWC_FALSE}"; then
30903 GL_COND_OBJ_MBRTOWC_TRUE='#'
30904 GL_COND_OBJ_MBRTOWC_FALSE='#'
30905 fi
30906
30907 if test -z "$GL_COND_OBJ_MBRTOWC_TRUE"; then :
30908
30909 if test $REPLACE_MBSTATE_T = 1; then
30910
30911
30912
30913
30914
30915
30916
30917
30918 gl_LIBOBJS="$gl_LIBOBJS lc-charset-dispatch.$ac_objext"
30919
30920
30921
30922
30923
30924
30925
30926
30927
30928 gl_LIBOBJS="$gl_LIBOBJS mbtowc-lock.$ac_objext"
30929
30930
30931
30932
30933 CFLAG_VISIBILITY=
30934 HAVE_VISIBILITY=0
30935 if test -n "$GCC"; then
30936 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
30937 printf %s "checking whether the -Werror option is usable... " >&6; }
30938 if test ${gl_cv_cc_vis_werror+y}
30939 then :
30940 printf %s "(cached) " >&6
30941 else $as_nop
30942 gl_save_CFLAGS="$CFLAGS"
30943 CFLAGS="$CFLAGS -Werror"
30944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30945 /* end confdefs.h. */
30946
30947 int
30948 main (void)
30949 {
30950
30951 ;
30952 return 0;
30953 }
30954 _ACEOF
30955 if ac_fn_c_try_compile "$LINENO"
30956 then :
30957 gl_cv_cc_vis_werror=yes
30958 else $as_nop
30959 gl_cv_cc_vis_werror=no
30960 fi
30961 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
30962 CFLAGS="$gl_save_CFLAGS"
30963
30964 fi
30965 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
30966 printf "%s\n" "$gl_cv_cc_vis_werror" >&6; }
30967 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
30968 printf %s "checking for simple visibility declarations... " >&6; }
30969 if test ${gl_cv_cc_visibility+y}
30970 then :
30971 printf %s "(cached) " >&6
30972 else $as_nop
30973 gl_save_CFLAGS="$CFLAGS"
30974 CFLAGS="$CFLAGS -fvisibility=hidden"
30975 if test $gl_cv_cc_vis_werror = yes; then
30976 CFLAGS="$CFLAGS -Werror"
30977 fi
30978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30979 /* end confdefs.h. */
30980 extern __attribute__((__visibility__("hidden"))) int hiddenvar;
30981 extern __attribute__((__visibility__("default"))) int exportedvar;
30982 extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
30983 extern __attribute__((__visibility__("default"))) int exportedfunc (void);
30984 void dummyfunc (void);
30985 int hiddenvar;
30986 int exportedvar;
30987 int hiddenfunc (void) { return 51; }
30988 int exportedfunc (void) { return 1225736919; }
30989 void dummyfunc (void) {}
30990
30991 int
30992 main (void)
30993 {
30994
30995 ;
30996 return 0;
30997 }
30998 _ACEOF
30999 if ac_fn_c_try_compile "$LINENO"
31000 then :
31001 gl_cv_cc_visibility=yes
31002 else $as_nop
31003 gl_cv_cc_visibility=no
31004 fi
31005 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
31006 CFLAGS="$gl_save_CFLAGS"
31007
31008 fi
31009 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
31010 printf "%s\n" "$gl_cv_cc_visibility" >&6; }
31011 if test $gl_cv_cc_visibility = yes; then
31012 CFLAG_VISIBILITY="-fvisibility=hidden"
31013 HAVE_VISIBILITY=1
31014 fi
31015 fi
31016
31017
31018
31019 printf "%s\n" "#define HAVE_VISIBILITY $HAVE_VISIBILITY" >>confdefs.h
31020
31021
31022
31023 fi
31024
31025
31026 :
31027
31028
31029 fi
31030
31031
31032
31033
31034
31035
31036
31037
31038
31039
31040
31041
31042
31043
31044 GL_GNULIB_MBRTOWC=1
31045
31046
31047
31048
31049
31050 printf "%s\n" "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
31051
31052
31053
31054
31055
31056
31057
31058
31059
31060
31061
31062
31063
31064
31065
31066 if case "$host_os" in
31067 mingw*) true ;;
31068 *) test $ac_cv_func_mbsinit = yes ;;
31069 esac \
31070 && test $ac_cv_func_mbrtowc = yes; then
31071
31072
31073
31074
31075 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
31076 printf %s "checking whether mbrtowc handles incomplete characters... " >&6; }
31077 if test ${gl_cv_func_mbrtowc_incomplete_state+y}
31078 then :
31079 printf %s "(cached) " >&6
31080 else $as_nop
31081
31082 case "$host_os" in
31083 # Guess no on AIX and OSF/1.
31084 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
31085 # Guess yes otherwise.
31086 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
31087 esac
31088 if test $LOCALE_JA != none; then
31089 if test "$cross_compiling" = yes
31090 then :
31091 :
31092 else $as_nop
31093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31094 /* end confdefs.h. */
31095
31096 #include <locale.h>
31097 #include <string.h>
31098 #include <wchar.h>
31099 int main ()
31100 {
31101 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
31102 {
31103 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
31104 mbstate_t state;
31105 wchar_t wc;
31106
31107 memset (&state, '\0', sizeof (mbstate_t));
31108 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
31109 if (mbsinit (&state))
31110 return 2;
31111 }
31112 return 0;
31113 }
31114 _ACEOF
31115 if ac_fn_c_try_run "$LINENO"
31116 then :
31117 gl_cv_func_mbrtowc_incomplete_state=yes
31118 else $as_nop
31119 gl_cv_func_mbrtowc_incomplete_state=no
31120 fi
31121 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31122 conftest.$ac_objext conftest.beam conftest.$ac_ext
31123 fi
31124
31125 else
31126 if test $LOCALE_FR_UTF8 != none; then
31127 if test "$cross_compiling" = yes
31128 then :
31129 :
31130 else $as_nop
31131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31132 /* end confdefs.h. */
31133
31134 #include <locale.h>
31135 #include <string.h>
31136 #include <wchar.h>
31137 int main ()
31138 {
31139 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
31140 {
31141 const char input[] = "B\303\274\303\237er"; /* "Büßer" */
31142 mbstate_t state;
31143 wchar_t wc;
31144
31145 memset (&state, '\0', sizeof (mbstate_t));
31146 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
31147 if (mbsinit (&state))
31148 return 2;
31149 }
31150 return 0;
31151 }
31152 _ACEOF
31153 if ac_fn_c_try_run "$LINENO"
31154 then :
31155 gl_cv_func_mbrtowc_incomplete_state=yes
31156 else $as_nop
31157 gl_cv_func_mbrtowc_incomplete_state=no
31158 fi
31159 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31160 conftest.$ac_objext conftest.beam conftest.$ac_ext
31161 fi
31162
31163 fi
31164 fi
31165
31166 fi
31167 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
31168 printf "%s\n" "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
31169
31170
31171
31172
31173 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
31174 printf %s "checking whether mbrtowc works as well as mbtowc... " >&6; }
31175 if test ${gl_cv_func_mbrtowc_sanitycheck+y}
31176 then :
31177 printf %s "(cached) " >&6
31178 else $as_nop
31179
31180 case "$host_os" in
31181 # Guess no on Solaris 8.
31182 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
31183 # Guess yes otherwise.
31184 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
31185 esac
31186 if test $LOCALE_ZH_CN != none; then
31187 if test "$cross_compiling" = yes
31188 then :
31189 :
31190 else $as_nop
31191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31192 /* end confdefs.h. */
31193
31194 #include <locale.h>
31195 #include <stdlib.h>
31196 #include <string.h>
31197 #include <wchar.h>
31198 int main ()
31199 {
31200 /* This fails on Solaris 8:
31201 mbrtowc returns 2, and sets wc to 0x00F0.
31202 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
31203 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
31204 {
31205 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
31206 mbstate_t state;
31207 wchar_t wc;
31208
31209 memset (&state, '\0', sizeof (mbstate_t));
31210 if (mbrtowc (&wc, input + 3, 6, &state) != 4
31211 && mbtowc (&wc, input + 3, 6) == 4)
31212 return 2;
31213 }
31214 return 0;
31215 }
31216 _ACEOF
31217 if ac_fn_c_try_run "$LINENO"
31218 then :
31219 gl_cv_func_mbrtowc_sanitycheck=yes
31220 else $as_nop
31221 gl_cv_func_mbrtowc_sanitycheck=no
31222 fi
31223 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31224 conftest.$ac_objext conftest.beam conftest.$ac_ext
31225 fi
31226
31227 fi
31228
31229 fi
31230 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
31231 printf "%s\n" "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
31232
31233 REPLACE_MBSTATE_T=0
31234 case "$gl_cv_func_mbrtowc_incomplete_state" in
31235 *yes) ;;
31236 *) REPLACE_MBSTATE_T=1 ;;
31237 esac
31238 case "$gl_cv_func_mbrtowc_sanitycheck" in
31239 *yes) ;;
31240 *) REPLACE_MBSTATE_T=1 ;;
31241 esac
31242 else
31243 REPLACE_MBSTATE_T=1
31244 fi
31245
31246
31247
31248 if test $ac_cv_func_mbsinit = no; then
31249 HAVE_MBSINIT=0
31250 ac_fn_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
31251 #include <wchar.h>
31252
31253 " "$ac_c_undeclared_builtin_options" "CFLAGS"
31254 if test "x$ac_cv_have_decl_mbsinit" = xyes
31255 then :
31256 ac_have_decl=1
31257 else $as_nop
31258 ac_have_decl=0
31259 fi
31260 printf "%s\n" "#define HAVE_DECL_MBSINIT $ac_have_decl" >>confdefs.h
31261
31262 if test $ac_cv_have_decl_mbsinit = yes; then
31263 REPLACE_MBSINIT=1
31264 fi
31265 else
31266 if test $REPLACE_MBSTATE_T = 1; then
31267 REPLACE_MBSINIT=1
31268 else
31269 case "$host_os" in
31270 mingw*) REPLACE_MBSINIT=1 ;;
31271 esac
31272 fi
31273 fi
31274
31275
31276 if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
31277 GL_COND_OBJ_MBSINIT_TRUE=
31278 GL_COND_OBJ_MBSINIT_FALSE='#'
31279 else
31280 GL_COND_OBJ_MBSINIT_TRUE='#'
31281 GL_COND_OBJ_MBSINIT_FALSE=
31282 fi
31283 :
31284 if test -z "${GL_COND_OBJ_MBSINIT_TRUE}" && test -z "${GL_COND_OBJ_MBSINIT_FALSE}"; then
31285 GL_COND_OBJ_MBSINIT_TRUE='#'
31286 GL_COND_OBJ_MBSINIT_FALSE='#'
31287 fi
31288
31289 if test -z "$GL_COND_OBJ_MBSINIT_TRUE"; then :
31290
31291
31292 :
31293
31294
31295 fi
31296
31297
31298
31299
31300
31301
31302
31303
31304
31305
31306
31307
31308
31309
31310 GL_GNULIB_MBSINIT=1
31311
31312
31313
31314
31315
31316 printf "%s\n" "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
31317
31318
31319
31320
31321
31322
31323
31324
31325
31326
31327
31328
31329
31330
31331 if case "$host_os" in
31332 mingw*) true ;;
31333 *) test $ac_cv_func_mbsinit = yes ;;
31334 esac \
31335 && test $ac_cv_func_mbrtowc = yes; then
31336
31337
31338
31339
31340 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
31341 printf %s "checking whether mbrtowc handles incomplete characters... " >&6; }
31342 if test ${gl_cv_func_mbrtowc_incomplete_state+y}
31343 then :
31344 printf %s "(cached) " >&6
31345 else $as_nop
31346
31347 case "$host_os" in
31348 # Guess no on AIX and OSF/1.
31349 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
31350 # Guess yes otherwise.
31351 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
31352 esac
31353 if test $LOCALE_JA != none; then
31354 if test "$cross_compiling" = yes
31355 then :
31356 :
31357 else $as_nop
31358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31359 /* end confdefs.h. */
31360
31361 #include <locale.h>
31362 #include <string.h>
31363 #include <wchar.h>
31364 int main ()
31365 {
31366 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
31367 {
31368 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
31369 mbstate_t state;
31370 wchar_t wc;
31371
31372 memset (&state, '\0', sizeof (mbstate_t));
31373 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
31374 if (mbsinit (&state))
31375 return 2;
31376 }
31377 return 0;
31378 }
31379 _ACEOF
31380 if ac_fn_c_try_run "$LINENO"
31381 then :
31382 gl_cv_func_mbrtowc_incomplete_state=yes
31383 else $as_nop
31384 gl_cv_func_mbrtowc_incomplete_state=no
31385 fi
31386 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31387 conftest.$ac_objext conftest.beam conftest.$ac_ext
31388 fi
31389
31390 else
31391 if test $LOCALE_FR_UTF8 != none; then
31392 if test "$cross_compiling" = yes
31393 then :
31394 :
31395 else $as_nop
31396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31397 /* end confdefs.h. */
31398
31399 #include <locale.h>
31400 #include <string.h>
31401 #include <wchar.h>
31402 int main ()
31403 {
31404 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
31405 {
31406 const char input[] = "B\303\274\303\237er"; /* "Büßer" */
31407 mbstate_t state;
31408 wchar_t wc;
31409
31410 memset (&state, '\0', sizeof (mbstate_t));
31411 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
31412 if (mbsinit (&state))
31413 return 2;
31414 }
31415 return 0;
31416 }
31417 _ACEOF
31418 if ac_fn_c_try_run "$LINENO"
31419 then :
31420 gl_cv_func_mbrtowc_incomplete_state=yes
31421 else $as_nop
31422 gl_cv_func_mbrtowc_incomplete_state=no
31423 fi
31424 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31425 conftest.$ac_objext conftest.beam conftest.$ac_ext
31426 fi
31427
31428 fi
31429 fi
31430
31431 fi
31432 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
31433 printf "%s\n" "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
31434
31435
31436
31437
31438 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
31439 printf %s "checking whether mbrtowc works as well as mbtowc... " >&6; }
31440 if test ${gl_cv_func_mbrtowc_sanitycheck+y}
31441 then :
31442 printf %s "(cached) " >&6
31443 else $as_nop
31444
31445 case "$host_os" in
31446 # Guess no on Solaris 8.
31447 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
31448 # Guess yes otherwise.
31449 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
31450 esac
31451 if test $LOCALE_ZH_CN != none; then
31452 if test "$cross_compiling" = yes
31453 then :
31454 :
31455 else $as_nop
31456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31457 /* end confdefs.h. */
31458
31459 #include <locale.h>
31460 #include <stdlib.h>
31461 #include <string.h>
31462 #include <wchar.h>
31463 int main ()
31464 {
31465 /* This fails on Solaris 8:
31466 mbrtowc returns 2, and sets wc to 0x00F0.
31467 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
31468 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
31469 {
31470 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
31471 mbstate_t state;
31472 wchar_t wc;
31473
31474 memset (&state, '\0', sizeof (mbstate_t));
31475 if (mbrtowc (&wc, input + 3, 6, &state) != 4
31476 && mbtowc (&wc, input + 3, 6) == 4)
31477 return 2;
31478 }
31479 return 0;
31480 }
31481 _ACEOF
31482 if ac_fn_c_try_run "$LINENO"
31483 then :
31484 gl_cv_func_mbrtowc_sanitycheck=yes
31485 else $as_nop
31486 gl_cv_func_mbrtowc_sanitycheck=no
31487 fi
31488 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31489 conftest.$ac_objext conftest.beam conftest.$ac_ext
31490 fi
31491
31492 fi
31493
31494 fi
31495 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
31496 printf "%s\n" "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
31497
31498 REPLACE_MBSTATE_T=0
31499 case "$gl_cv_func_mbrtowc_incomplete_state" in
31500 *yes) ;;
31501 *) REPLACE_MBSTATE_T=1 ;;
31502 esac
31503 case "$gl_cv_func_mbrtowc_sanitycheck" in
31504 *yes) ;;
31505 *) REPLACE_MBSTATE_T=1 ;;
31506 esac
31507 else
31508 REPLACE_MBSTATE_T=1
31509 fi
31510
31511
31512
31513 if test $ac_cv_func_mbsrtowcs = no; then
31514 HAVE_MBSRTOWCS=0
31515 ac_fn_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" "
31516 #include <wchar.h>
31517
31518 " "$ac_c_undeclared_builtin_options" "CFLAGS"
31519 if test "x$ac_cv_have_decl_mbsrtowcs" = xyes
31520 then :
31521 ac_have_decl=1
31522 else $as_nop
31523 ac_have_decl=0
31524 fi
31525 printf "%s\n" "#define HAVE_DECL_MBSRTOWCS $ac_have_decl" >>confdefs.h
31526
31527 if test $ac_cv_have_decl_mbsrtowcs = yes; then
31528 REPLACE_MBSRTOWCS=1
31529 fi
31530 else
31531 if test $REPLACE_MBSTATE_T = 1; then
31532 REPLACE_MBSRTOWCS=1
31533 else
31534
31535
31536
31537
31538
31539
31540 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5
31541 printf %s "checking whether mbsrtowcs works... " >&6; }
31542 if test ${gl_cv_func_mbsrtowcs_works+y}
31543 then :
31544 printf %s "(cached) " >&6
31545 else $as_nop
31546
31547 case "$host_os" in
31548 # Guess no on HP-UX, Solaris, mingw.
31549 hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;;
31550 # Guess yes otherwise.
31551 *) gl_cv_func_mbsrtowcs_works="guessing yes" ;;
31552 esac
31553 if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
31554 if test "$cross_compiling" = yes
31555 then :
31556 :
31557 else $as_nop
31558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31559 /* end confdefs.h. */
31560
31561 #include <locale.h>
31562 #include <string.h>
31563 #include <wchar.h>
31564 int main ()
31565 {
31566 int result = 0;
31567 /* Test whether the function supports a NULL destination argument.
31568 This fails on native Windows. */
31569 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
31570 {
31571 const char input[] = "\337er";
31572 const char *src = input;
31573 mbstate_t state;
31574
31575 memset (&state, '\0', sizeof (mbstate_t));
31576 if (mbsrtowcs (NULL, &src, 1, &state) != 3
31577 || src != input)
31578 result |= 1;
31579 }
31580 /* Test whether the function works when started with a conversion state
31581 in non-initial state. This fails on HP-UX 11.11 and Solaris 10. */
31582 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
31583 {
31584 const char input[] = "B\303\274\303\237er";
31585 mbstate_t state;
31586
31587 memset (&state, '\0', sizeof (mbstate_t));
31588 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
31589 if (!mbsinit (&state))
31590 {
31591 const char *src = input + 2;
31592 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
31593 result |= 2;
31594 }
31595 }
31596 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
31597 {
31598 const char input[] = "<\306\374\313\334\270\354>";
31599 mbstate_t state;
31600
31601 memset (&state, '\0', sizeof (mbstate_t));
31602 if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2))
31603 if (!mbsinit (&state))
31604 {
31605 const char *src = input + 4;
31606 if (mbsrtowcs (NULL, &src, 10, &state) != 3)
31607 result |= 4;
31608 }
31609 }
31610 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
31611 {
31612 const char input[] = "B\250\271\201\060\211\070er";
31613 mbstate_t state;
31614
31615 memset (&state, '\0', sizeof (mbstate_t));
31616 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
31617 if (!mbsinit (&state))
31618 {
31619 const char *src = input + 2;
31620 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
31621 result |= 8;
31622 }
31623 }
31624 return result;
31625 }
31626 _ACEOF
31627 if ac_fn_c_try_run "$LINENO"
31628 then :
31629 gl_cv_func_mbsrtowcs_works=yes
31630 else $as_nop
31631 gl_cv_func_mbsrtowcs_works=no
31632 fi
31633 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31634 conftest.$ac_objext conftest.beam conftest.$ac_ext
31635 fi
31636
31637 fi
31638
31639 fi
31640 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5
31641 printf "%s\n" "$gl_cv_func_mbsrtowcs_works" >&6; }
31642
31643 case "$gl_cv_func_mbsrtowcs_works" in
31644 *yes) ;;
31645 *) REPLACE_MBSRTOWCS=1 ;;
31646 esac
31647 fi
31648 fi
31649
31650
31651 if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
31652 GL_COND_OBJ_MBSRTOWCS_TRUE=
31653 GL_COND_OBJ_MBSRTOWCS_FALSE='#'
31654 else
31655 GL_COND_OBJ_MBSRTOWCS_TRUE='#'
31656 GL_COND_OBJ_MBSRTOWCS_FALSE=
31657 fi
31658 :
31659 if test -z "${GL_COND_OBJ_MBSRTOWCS_TRUE}" && test -z "${GL_COND_OBJ_MBSRTOWCS_FALSE}"; then
31660 GL_COND_OBJ_MBSRTOWCS_TRUE='#'
31661 GL_COND_OBJ_MBSRTOWCS_FALSE='#'
31662 fi
31663
31664 if test -z "$GL_COND_OBJ_MBSRTOWCS_TRUE"; then :
31665
31666
31667
31668
31669
31670
31671
31672
31673
31674 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext"
31675
31676
31677 :
31678
31679
31680 fi
31681
31682
31683
31684
31685
31686
31687
31688
31689
31690
31691
31692
31693
31694
31695 GL_GNULIB_MBSRTOWCS=1
31696
31697
31698
31699
31700
31701 printf "%s\n" "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h
31702
31703
31704
31705
31706
31707
31708
31709 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbswidth is declared in <wchar.h>" >&5
31710 printf %s "checking whether mbswidth is declared in <wchar.h>... " >&6; }
31711 if test ${ac_cv_have_decl_mbswidth+y}
31712 then :
31713 printf %s "(cached) " >&6
31714 else $as_nop
31715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31716 /* end confdefs.h. */
31717 #include <wchar.h>
31718
31719 int
31720 main (void)
31721 {
31722 char *p = (char *) mbswidth;
31723 return !p;
31724
31725 ;
31726 return 0;
31727 }
31728 _ACEOF
31729 if ac_fn_c_try_compile "$LINENO"
31730 then :
31731 ac_cv_have_decl_mbswidth=yes
31732 else $as_nop
31733 ac_cv_have_decl_mbswidth=no
31734 fi
31735 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
31736 fi
31737 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_decl_mbswidth" >&5
31738 printf "%s\n" "$ac_cv_have_decl_mbswidth" >&6; }
31739 if test $ac_cv_have_decl_mbswidth = yes; then
31740 ac_val=1
31741 else
31742 ac_val=0
31743 fi
31744
31745 printf "%s\n" "#define HAVE_DECL_MBSWIDTH_IN_WCHAR_H $ac_val" >>confdefs.h
31746
31747
31748
31749
31750 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
31751 printf %s "checking for mbstate_t... " >&6; }
31752 if test ${ac_cv_type_mbstate_t+y}
31753 then :
31754 printf %s "(cached) " >&6
31755 else $as_nop
31756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31757 /* end confdefs.h. */
31758 $ac_includes_default
31759 #include <wchar.h>
31760 int
31761 main (void)
31762 {
31763 mbstate_t x; return sizeof x;
31764 ;
31765 return 0;
31766 }
31767 _ACEOF
31768 if ac_fn_c_try_compile "$LINENO"
31769 then :
31770 ac_cv_type_mbstate_t=yes
31771 else $as_nop
31772 ac_cv_type_mbstate_t=no
31773 fi
31774 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
31775 fi
31776 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
31777 printf "%s\n" "$ac_cv_type_mbstate_t" >&6; }
31778 if test $ac_cv_type_mbstate_t = yes; then
31779
31780 printf "%s\n" "#define HAVE_MBSTATE_T 1" >>confdefs.h
31781
31782 else
31783
31784 printf "%s\n" "#define mbstate_t int" >>confdefs.h
31785
31786 fi
31787
31788
31789
31790
31791
31792 ac_fn_c_check_func "$LINENO" "mbtowc" "ac_cv_func_mbtowc"
31793 if test "x$ac_cv_func_mbtowc" = xyes
31794 then :
31795 printf "%s\n" "#define HAVE_MBTOWC 1" >>confdefs.h
31796
31797 fi
31798
31799 if test $ac_cv_func_mbtowc = no; then
31800 HAVE_MBTOWC=0
31801 else
31802 if false; then
31803 REPLACE_MBTOWC=1
31804 fi
31805 fi
31806
31807
31808 if test $HAVE_MBTOWC = 0 || test $REPLACE_MBTOWC = 1; then
31809 GL_COND_OBJ_MBTOWC_TRUE=
31810 GL_COND_OBJ_MBTOWC_FALSE='#'
31811 else
31812 GL_COND_OBJ_MBTOWC_TRUE='#'
31813 GL_COND_OBJ_MBTOWC_FALSE=
31814 fi
31815 :
31816 if test -z "${GL_COND_OBJ_MBTOWC_TRUE}" && test -z "${GL_COND_OBJ_MBTOWC_FALSE}"; then
31817 GL_COND_OBJ_MBTOWC_TRUE='#'
31818 GL_COND_OBJ_MBTOWC_FALSE='#'
31819 fi
31820
31821 if test -z "$GL_COND_OBJ_MBTOWC_TRUE"; then :
31822
31823
31824 :
31825
31826
31827 fi
31828
31829
31830
31831
31832
31833
31834
31835
31836
31837 GL_GNULIB_MBTOWC=1
31838
31839
31840
31841
31842
31843 printf "%s\n" "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h
31844
31845
31846
31847
31848
31849 if test $REPLACE_MEMCHR = 1; then
31850 GL_COND_OBJ_MEMCHR_TRUE=
31851 GL_COND_OBJ_MEMCHR_FALSE='#'
31852 else
31853 GL_COND_OBJ_MEMCHR_TRUE='#'
31854 GL_COND_OBJ_MEMCHR_FALSE=
31855 fi
31856 :
31857 if test -z "${GL_COND_OBJ_MEMCHR_TRUE}" && test -z "${GL_COND_OBJ_MEMCHR_FALSE}"; then
31858 GL_COND_OBJ_MEMCHR_TRUE='#'
31859 GL_COND_OBJ_MEMCHR_FALSE='#'
31860 fi
31861
31862 if test -z "$GL_COND_OBJ_MEMCHR_TRUE"; then :
31863
31864
31865 ac_fn_c_check_header_compile "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
31866 if test "x$ac_cv_header_bp_sym_h" = xyes
31867 then :
31868 printf "%s\n" "#define HAVE_BP_SYM_H 1" >>confdefs.h
31869
31870 fi
31871
31872
31873
31874 fi
31875
31876
31877
31878
31879
31880
31881
31882
31883
31884
31885
31886
31887
31888
31889 GL_GNULIB_MEMCHR=1
31890
31891
31892
31893
31894
31895 printf "%s\n" "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
31896
31897
31898
31899
31900
31901
31902
31903
31904
31905 ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
31906 if test "x$ac_cv_func_mempcpy" = xyes
31907 then :
31908 printf "%s\n" "#define HAVE_MEMPCPY 1" >>confdefs.h
31909
31910 fi
31911
31912 if test $ac_cv_func_mempcpy = no; then
31913 HAVE_MEMPCPY=0
31914 fi
31915
31916
31917 if test $HAVE_MEMPCPY = 0; then
31918 GL_COND_OBJ_MEMPCPY_TRUE=
31919 GL_COND_OBJ_MEMPCPY_FALSE='#'
31920 else
31921 GL_COND_OBJ_MEMPCPY_TRUE='#'
31922 GL_COND_OBJ_MEMPCPY_FALSE=
31923 fi
31924 :
31925 if test -z "${GL_COND_OBJ_MEMPCPY_TRUE}" && test -z "${GL_COND_OBJ_MEMPCPY_FALSE}"; then
31926 GL_COND_OBJ_MEMPCPY_TRUE='#'
31927 GL_COND_OBJ_MEMPCPY_FALSE='#'
31928 fi
31929
31930 if test -z "$GL_COND_OBJ_MEMPCPY_TRUE"; then :
31931
31932
31933 :
31934
31935
31936 fi
31937
31938
31939
31940
31941
31942
31943
31944
31945
31946
31947
31948
31949
31950
31951 GL_GNULIB_MEMPCPY=1
31952
31953
31954
31955
31956
31957 printf "%s\n" "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h
31958
31959
31960
31961
31962
31963
31964
31965
31966 if test $ac_cv_have_decl_memrchr = no; then
31967 HAVE_DECL_MEMRCHR=0
31968 fi
31969
31970 ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
31971 if test "x$ac_cv_func_memrchr" = xyes
31972 then :
31973 printf "%s\n" "#define HAVE_MEMRCHR 1" >>confdefs.h
31974
31975 fi
31976
31977
31978
31979 if test $ac_cv_func_memrchr = no; then
31980 GL_COND_OBJ_MEMRCHR_TRUE=
31981 GL_COND_OBJ_MEMRCHR_FALSE='#'
31982 else
31983 GL_COND_OBJ_MEMRCHR_TRUE='#'
31984 GL_COND_OBJ_MEMRCHR_FALSE=
31985 fi
31986 :
31987 if test -z "${GL_COND_OBJ_MEMRCHR_TRUE}" && test -z "${GL_COND_OBJ_MEMRCHR_FALSE}"; then
31988 GL_COND_OBJ_MEMRCHR_TRUE='#'
31989 GL_COND_OBJ_MEMRCHR_FALSE='#'
31990 fi
31991
31992 if test -z "$GL_COND_OBJ_MEMRCHR_TRUE"; then :
31993
31994 :
31995
31996 fi
31997
31998
31999
32000
32001
32002
32003
32004
32005
32006
32007
32008
32009
32010
32011 GL_GNULIB_MEMRCHR=1
32012
32013
32014
32015
32016
32017 printf "%s\n" "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h
32018
32019
32020
32021
32022
32023 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
32024 GL_COND_OBJ_MSVC_INVAL_TRUE=
32025 GL_COND_OBJ_MSVC_INVAL_FALSE='#'
32026 else
32027 GL_COND_OBJ_MSVC_INVAL_TRUE='#'
32028 GL_COND_OBJ_MSVC_INVAL_FALSE=
32029 fi
32030 :
32031 if test -z "${GL_COND_OBJ_MSVC_INVAL_TRUE}" && test -z "${GL_COND_OBJ_MSVC_INVAL_FALSE}"; then
32032 GL_COND_OBJ_MSVC_INVAL_TRUE='#'
32033 GL_COND_OBJ_MSVC_INVAL_FALSE='#'
32034 fi
32035
32036
32037
32038 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
32039 GL_COND_OBJ_MSVC_NOTHROW_TRUE=
32040 GL_COND_OBJ_MSVC_NOTHROW_FALSE='#'
32041 else
32042 GL_COND_OBJ_MSVC_NOTHROW_TRUE='#'
32043 GL_COND_OBJ_MSVC_NOTHROW_FALSE=
32044 fi
32045 :
32046 if test -z "${GL_COND_OBJ_MSVC_NOTHROW_TRUE}" && test -z "${GL_COND_OBJ_MSVC_NOTHROW_FALSE}"; then
32047 GL_COND_OBJ_MSVC_NOTHROW_TRUE='#'
32048 GL_COND_OBJ_MSVC_NOTHROW_FALSE='#'
32049 fi
32050
32051
32052
32053 printf "%s\n" "#define GNULIB_MSVC_NOTHROW 1" >>confdefs.h
32054
32055
32056
32057
32058
32059
32060
32061
32062
32063
32064
32065 if test $ac_cv_func_nl_langinfo = yes; then
32066 # On Irix 6.5, YESEXPR is defined, but nl_langinfo(YESEXPR) is broken.
32067 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether YESEXPR works" >&5
32068 printf %s "checking whether YESEXPR works... " >&6; }
32069 if test ${gl_cv_func_nl_langinfo_yesexpr_works+y}
32070 then :
32071 printf %s "(cached) " >&6
32072 else $as_nop
32073 if test "$cross_compiling" = yes
32074 then :
32075
32076 case "$host_os" in
32077 # Guess no on irix systems.
32078 irix*) gl_cv_func_nl_langinfo_yesexpr_works="guessing no";;
32079 # Guess yes elsewhere.
32080 *) gl_cv_func_nl_langinfo_yesexpr_works="guessing yes";;
32081 esac
32082
32083 else $as_nop
32084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32085 /* end confdefs.h. */
32086 #include <langinfo.h>
32087
32088 int
32089 main (void)
32090 {
32091 return !*nl_langinfo(YESEXPR);
32092
32093 ;
32094 return 0;
32095 }
32096 _ACEOF
32097 if ac_fn_c_try_run "$LINENO"
32098 then :
32099 gl_cv_func_nl_langinfo_yesexpr_works=yes
32100 else $as_nop
32101 gl_cv_func_nl_langinfo_yesexpr_works=no
32102 fi
32103 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32104 conftest.$ac_objext conftest.beam conftest.$ac_ext
32105 fi
32106
32107
32108 fi
32109 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nl_langinfo_yesexpr_works" >&5
32110 printf "%s\n" "$gl_cv_func_nl_langinfo_yesexpr_works" >&6; }
32111 case $gl_cv_func_nl_langinfo_yesexpr_works in
32112 *yes) FUNC_NL_LANGINFO_YESEXPR_WORKS=1 ;;
32113 *) FUNC_NL_LANGINFO_YESEXPR_WORKS=0 ;;
32114 esac
32115
32116 printf "%s\n" "#define FUNC_NL_LANGINFO_YESEXPR_WORKS $FUNC_NL_LANGINFO_YESEXPR_WORKS" >>confdefs.h
32117
32118 # On Solaris 10 and Solaris 11.3, nl_langinfo is not multithread-safe.
32119 case "$host_os" in
32120 solaris*) NL_LANGINFO_MTSAFE=0 ;;
32121 *) NL_LANGINFO_MTSAFE=1 ;;
32122 esac
32123
32124 printf "%s\n" "#define NL_LANGINFO_MTSAFE $NL_LANGINFO_MTSAFE" >>confdefs.h
32125
32126 if test $HAVE_LANGINFO_CODESET = 1 \
32127 && test $HAVE_LANGINFO_T_FMT_AMPM = 1 \
32128 && test $HAVE_LANGINFO_ALTMON = 1 \
32129 && test $HAVE_LANGINFO_ERA = 1 \
32130 && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1 \
32131 && test $NL_LANGINFO_MTSAFE = 1; then
32132 :
32133 else
32134 REPLACE_NL_LANGINFO=1
32135
32136 printf "%s\n" "#define REPLACE_NL_LANGINFO 1" >>confdefs.h
32137
32138 fi
32139 else
32140 HAVE_NL_LANGINFO=0
32141 fi
32142 if test $HAVE_NL_LANGINFO = 0 || test $HAVE_LANGINFO_CODESET = 0; then
32143 LIB_NL_LANGINFO="$LIB_SETLOCALE_NULL"
32144 else
32145 LIB_NL_LANGINFO=
32146 fi
32147
32148
32149
32150 if test $HAVE_NL_LANGINFO = 0 || test $REPLACE_NL_LANGINFO = 1; then
32151 GL_COND_OBJ_NL_LANGINFO_TRUE=
32152 GL_COND_OBJ_NL_LANGINFO_FALSE='#'
32153 else
32154 GL_COND_OBJ_NL_LANGINFO_TRUE='#'
32155 GL_COND_OBJ_NL_LANGINFO_FALSE=
32156 fi
32157 :
32158 if test -z "${GL_COND_OBJ_NL_LANGINFO_TRUE}" && test -z "${GL_COND_OBJ_NL_LANGINFO_FALSE}"; then
32159 GL_COND_OBJ_NL_LANGINFO_TRUE='#'
32160 GL_COND_OBJ_NL_LANGINFO_FALSE='#'
32161 fi
32162
32163
32164 if test $REPLACE_NL_LANGINFO = 1 && test $NL_LANGINFO_MTSAFE = 0; then
32165 GL_COND_OBJ_NL_LANGINFO_LOCK_TRUE=
32166 GL_COND_OBJ_NL_LANGINFO_LOCK_FALSE='#'
32167 else
32168 GL_COND_OBJ_NL_LANGINFO_LOCK_TRUE='#'
32169 GL_COND_OBJ_NL_LANGINFO_LOCK_FALSE=
32170 fi
32171 :
32172 if test -z "${GL_COND_OBJ_NL_LANGINFO_LOCK_TRUE}" && test -z "${GL_COND_OBJ_NL_LANGINFO_LOCK_FALSE}"; then
32173 GL_COND_OBJ_NL_LANGINFO_LOCK_TRUE='#'
32174 GL_COND_OBJ_NL_LANGINFO_LOCK_FALSE='#'
32175 fi
32176
32177 if test $REPLACE_NL_LANGINFO = 1 && test $NL_LANGINFO_MTSAFE = 0; then
32178
32179
32180
32181 CFLAG_VISIBILITY=
32182 HAVE_VISIBILITY=0
32183 if test -n "$GCC"; then
32184 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
32185 printf %s "checking whether the -Werror option is usable... " >&6; }
32186 if test ${gl_cv_cc_vis_werror+y}
32187 then :
32188 printf %s "(cached) " >&6
32189 else $as_nop
32190 gl_save_CFLAGS="$CFLAGS"
32191 CFLAGS="$CFLAGS -Werror"
32192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32193 /* end confdefs.h. */
32194
32195 int
32196 main (void)
32197 {
32198
32199 ;
32200 return 0;
32201 }
32202 _ACEOF
32203 if ac_fn_c_try_compile "$LINENO"
32204 then :
32205 gl_cv_cc_vis_werror=yes
32206 else $as_nop
32207 gl_cv_cc_vis_werror=no
32208 fi
32209 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
32210 CFLAGS="$gl_save_CFLAGS"
32211
32212 fi
32213 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
32214 printf "%s\n" "$gl_cv_cc_vis_werror" >&6; }
32215 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
32216 printf %s "checking for simple visibility declarations... " >&6; }
32217 if test ${gl_cv_cc_visibility+y}
32218 then :
32219 printf %s "(cached) " >&6
32220 else $as_nop
32221 gl_save_CFLAGS="$CFLAGS"
32222 CFLAGS="$CFLAGS -fvisibility=hidden"
32223 if test $gl_cv_cc_vis_werror = yes; then
32224 CFLAGS="$CFLAGS -Werror"
32225 fi
32226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32227 /* end confdefs.h. */
32228 extern __attribute__((__visibility__("hidden"))) int hiddenvar;
32229 extern __attribute__((__visibility__("default"))) int exportedvar;
32230 extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
32231 extern __attribute__((__visibility__("default"))) int exportedfunc (void);
32232 void dummyfunc (void);
32233 int hiddenvar;
32234 int exportedvar;
32235 int hiddenfunc (void) { return 51; }
32236 int exportedfunc (void) { return 1225736919; }
32237 void dummyfunc (void) {}
32238
32239 int
32240 main (void)
32241 {
32242
32243 ;
32244 return 0;
32245 }
32246 _ACEOF
32247 if ac_fn_c_try_compile "$LINENO"
32248 then :
32249 gl_cv_cc_visibility=yes
32250 else $as_nop
32251 gl_cv_cc_visibility=no
32252 fi
32253 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
32254 CFLAGS="$gl_save_CFLAGS"
32255
32256 fi
32257 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
32258 printf "%s\n" "$gl_cv_cc_visibility" >&6; }
32259 if test $gl_cv_cc_visibility = yes; then
32260 CFLAG_VISIBILITY="-fvisibility=hidden"
32261 HAVE_VISIBILITY=1
32262 fi
32263 fi
32264
32265
32266
32267 printf "%s\n" "#define HAVE_VISIBILITY $HAVE_VISIBILITY" >>confdefs.h
32268
32269
32270
32271 fi
32272
32273
32274
32275
32276
32277
32278
32279
32280
32281 GL_GNULIB_NL_LANGINFO=1
32282
32283
32284
32285
32286
32287 printf "%s\n" "#define GNULIB_TEST_NL_LANGINFO 1" >>confdefs.h
32288
32289
32290
32291
32292
32293
32294 case "$host_os" in
32295 mingw* | pw*)
32296 REPLACE_OPEN=1
32297 ;;
32298 *)
32299
32300 if test "$gl_cv_macro_O_CLOEXEC" != yes; then
32301 REPLACE_OPEN=1
32302 fi
32303
32304
32305 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
32306 printf %s "checking whether open recognizes a trailing slash... " >&6; }
32307 if test ${gl_cv_func_open_slash+y}
32308 then :
32309 printf %s "(cached) " >&6
32310 else $as_nop
32311 # Assume that if we have lstat, we can also check symlinks.
32312 if test $ac_cv_func_lstat = yes; then
32313 touch conftest.tmp
32314 ln -s conftest.tmp conftest.lnk
32315 fi
32316 if test "$cross_compiling" = yes
32317 then :
32318
32319 case "$host_os" in
32320 freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
32321 gl_cv_func_open_slash="guessing no" ;;
32322 *)
32323 gl_cv_func_open_slash="guessing yes" ;;
32324 esac
32325
32326 else $as_nop
32327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32328 /* end confdefs.h. */
32329
32330 #include <fcntl.h>
32331 #if HAVE_UNISTD_H
32332 # include <unistd.h>
32333 #endif
32334
32335
32336 $gl_mda_defines
32337
32338 int main ()
32339 {
32340 int result = 0;
32341 #if HAVE_LSTAT
32342 if (open ("conftest.lnk/", O_RDONLY) != -1)
32343 result |= 1;
32344 #endif
32345 if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
32346 result |= 2;
32347 return result;
32348 }
32349 _ACEOF
32350 if ac_fn_c_try_run "$LINENO"
32351 then :
32352 gl_cv_func_open_slash=yes
32353 else $as_nop
32354 gl_cv_func_open_slash=no
32355 fi
32356 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32357 conftest.$ac_objext conftest.beam conftest.$ac_ext
32358 fi
32359
32360 rm -f conftest.sl conftest.tmp conftest.lnk
32361
32362 fi
32363 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
32364 printf "%s\n" "$gl_cv_func_open_slash" >&6; }
32365 case "$gl_cv_func_open_slash" in
32366 *no)
32367
32368 printf "%s\n" "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
32369
32370 ;;
32371 esac
32372
32373 case "$gl_cv_func_open_slash" in
32374 *no)
32375 REPLACE_OPEN=1
32376 ;;
32377 esac
32378 ;;
32379 esac
32380
32381 if test $REPLACE_OPEN = 0; then
32382
32383
32384
32385 if test $ac_cv_func_fchdir = no; then
32386 HAVE_FCHDIR=0
32387 fi
32388
32389 if test $HAVE_FCHDIR = 0; then
32390 REPLACE_OPEN=1
32391 fi
32392 fi
32393
32394
32395
32396
32397 if test $REPLACE_OPEN = 1; then
32398 GL_COND_OBJ_OPEN_TRUE=
32399 GL_COND_OBJ_OPEN_FALSE='#'
32400 else
32401 GL_COND_OBJ_OPEN_TRUE='#'
32402 GL_COND_OBJ_OPEN_FALSE=
32403 fi
32404 :
32405 if test -z "${GL_COND_OBJ_OPEN_TRUE}" && test -z "${GL_COND_OBJ_OPEN_FALSE}"; then
32406 GL_COND_OBJ_OPEN_TRUE='#'
32407 GL_COND_OBJ_OPEN_FALSE='#'
32408 fi
32409
32410 if test -z "$GL_COND_OBJ_OPEN_TRUE"; then :
32411
32412
32413
32414 :
32415
32416
32417 fi
32418
32419
32420
32421
32422
32423
32424
32425
32426
32427 GL_GNULIB_OPEN=1
32428
32429
32430
32431
32432
32433 printf "%s\n" "#define GNULIB_TEST_OPEN 1" >>confdefs.h
32434
32435
32436
32437
32438
32439
32440
32441
32442
32443 case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink+$gl_cv_macro_O_CLOEXEC in
32444 yes+*yes+yes)
32445 ;;
32446 yes+*)
32447 # Solaris 10 lacks O_CLOEXEC.
32448 # Solaris 9 has *at functions, but uniformly mishandles trailing
32449 # slash in all of them.
32450 REPLACE_OPENAT=1
32451 ;;
32452 *)
32453 HAVE_OPENAT=0
32454 ;;
32455 esac
32456
32457
32458 if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
32459 GL_COND_OBJ_OPENAT_TRUE=
32460 GL_COND_OBJ_OPENAT_FALSE='#'
32461 else
32462 GL_COND_OBJ_OPENAT_TRUE='#'
32463 GL_COND_OBJ_OPENAT_FALSE=
32464 fi
32465 :
32466 if test -z "${GL_COND_OBJ_OPENAT_TRUE}" && test -z "${GL_COND_OBJ_OPENAT_FALSE}"; then
32467 GL_COND_OBJ_OPENAT_TRUE='#'
32468 GL_COND_OBJ_OPENAT_FALSE='#'
32469 fi
32470
32471 if test -z "$GL_COND_OBJ_OPENAT_TRUE"; then :
32472
32473
32474
32475 :
32476
32477
32478 fi
32479
32480
32481 printf "%s\n" "#define GNULIB_OPENAT 1" >>confdefs.h
32482
32483
32484
32485
32486
32487
32488
32489
32490
32491
32492 GL_GNULIB_OPENAT=1
32493
32494
32495
32496
32497
32498 printf "%s\n" "#define GNULIB_TEST_OPENAT 1" >>confdefs.h
32499
32500
32501
32502
32503
32504
32505
32506
32507
32508
32509 if test $ac_cv_func_pipe != yes; then
32510 HAVE_PIPE=0
32511 fi
32512
32513
32514 if test $HAVE_PIPE = 0; then
32515 GL_COND_OBJ_PIPE_TRUE=
32516 GL_COND_OBJ_PIPE_FALSE='#'
32517 else
32518 GL_COND_OBJ_PIPE_TRUE='#'
32519 GL_COND_OBJ_PIPE_FALSE=
32520 fi
32521 :
32522 if test -z "${GL_COND_OBJ_PIPE_TRUE}" && test -z "${GL_COND_OBJ_PIPE_FALSE}"; then
32523 GL_COND_OBJ_PIPE_TRUE='#'
32524 GL_COND_OBJ_PIPE_FALSE='#'
32525 fi
32526
32527
32528
32529
32530
32531
32532
32533
32534
32535
32536 GL_GNULIB_PIPE=1
32537
32538
32539
32540
32541
32542 printf "%s\n" "#define GNULIB_TEST_PIPE 1" >>confdefs.h
32543
32544
32545
32546 ac_fn_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
32547 " "$ac_c_undeclared_builtin_options" "CFLAGS"
32548 if test "x$ac_cv_have_decl_program_invocation_name" = xyes
32549 then :
32550 ac_have_decl=1
32551 else $as_nop
32552 ac_have_decl=0
32553 fi
32554 printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl" >>confdefs.h
32555
32556 ac_fn_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
32557 " "$ac_c_undeclared_builtin_options" "CFLAGS"
32558 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes
32559 then :
32560 ac_have_decl=1
32561 else $as_nop
32562 ac_have_decl=0
32563 fi
32564 printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl" >>confdefs.h
32565
32566
32567
32568
32569
32570 ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
32571 if test "x$ac_cv_func_rawmemchr" = xyes
32572 then :
32573 printf "%s\n" "#define HAVE_RAWMEMCHR 1" >>confdefs.h
32574
32575 fi
32576
32577 if test $ac_cv_func_rawmemchr = no; then
32578 HAVE_RAWMEMCHR=0
32579 fi
32580
32581
32582 if test $HAVE_RAWMEMCHR = 0; then
32583 GL_COND_OBJ_RAWMEMCHR_TRUE=
32584 GL_COND_OBJ_RAWMEMCHR_FALSE='#'
32585 else
32586 GL_COND_OBJ_RAWMEMCHR_TRUE='#'
32587 GL_COND_OBJ_RAWMEMCHR_FALSE=
32588 fi
32589 :
32590 if test -z "${GL_COND_OBJ_RAWMEMCHR_TRUE}" && test -z "${GL_COND_OBJ_RAWMEMCHR_FALSE}"; then
32591 GL_COND_OBJ_RAWMEMCHR_TRUE='#'
32592 GL_COND_OBJ_RAWMEMCHR_FALSE='#'
32593 fi
32594
32595 if test -z "$GL_COND_OBJ_RAWMEMCHR_TRUE"; then :
32596
32597 :
32598
32599 fi
32600
32601
32602
32603
32604
32605
32606
32607
32608
32609
32610
32611
32612
32613
32614 GL_GNULIB_RAWMEMCHR=1
32615
32616
32617
32618
32619
32620 printf "%s\n" "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
32621
32622
32623
32624
32625
32626
32627 if test $REPLACE_REALLOC_FOR_REALLOC_GNU = 0; then
32628
32629 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether realloc (0, 0) returns nonnull" >&5
32630 printf %s "checking whether realloc (0, 0) returns nonnull... " >&6; }
32631 if test ${ac_cv_func_realloc_0_nonnull+y}
32632 then :
32633 printf %s "(cached) " >&6
32634 else $as_nop
32635 if test "$cross_compiling" = yes
32636 then :
32637 case "$host_os" in
32638 # Guess yes on platforms where we know the result.
32639 *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
32640 | gnu* | *-musl* | midnightbsd* \
32641 | hpux* | solaris* | cygwin* | mingw* | msys* )
32642 ac_cv_func_realloc_0_nonnull="guessing yes" ;;
32643 # If we don't know, obey --enable-cross-guesses.
32644 *) ac_cv_func_realloc_0_nonnull="$gl_cross_guess_normal" ;;
32645 esac
32646
32647 else $as_nop
32648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32649 /* end confdefs.h. */
32650 #include <stdlib.h>
32651
32652 int
32653 main (void)
32654 {
32655 void *p = realloc (0, 0);
32656 int result = !p;
32657 free (p);
32658 return result;
32659 ;
32660 return 0;
32661 }
32662
32663 _ACEOF
32664 if ac_fn_c_try_run "$LINENO"
32665 then :
32666 ac_cv_func_realloc_0_nonnull=yes
32667 else $as_nop
32668 ac_cv_func_realloc_0_nonnull=no
32669 fi
32670 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32671 conftest.$ac_objext conftest.beam conftest.$ac_ext
32672 fi
32673
32674
32675 fi
32676 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5
32677 printf "%s\n" "$ac_cv_func_realloc_0_nonnull" >&6; }
32678 case $ac_cv_func_realloc_0_nonnull in #(
32679 *yes) :
32680 ;; #(
32681 *) :
32682 REPLACE_REALLOC_FOR_REALLOC_GNU=1 ;;
32683 esac
32684
32685 fi
32686
32687 if test $REPLACE_REALLOC_FOR_REALLOC_GNU = 1; then
32688
32689
32690
32691
32692
32693
32694
32695
32696 gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
32697
32698 fi
32699
32700
32701
32702
32703
32704
32705
32706
32707
32708 GL_GNULIB_REALLOC_GNU=1
32709
32710
32711
32712
32713
32714 printf "%s\n" "#define GNULIB_TEST_REALLOC_GNU 1" >>confdefs.h
32715
32716
32717
32718
32719
32720
32721 if test $REPLACE_MALLOC_FOR_MALLOC_POSIX = 1; then
32722 REPLACE_REALLOC_FOR_REALLOC_POSIX=1
32723 fi
32724
32725 if test $REPLACE_REALLOC_FOR_REALLOC_POSIX = 1; then
32726
32727
32728
32729
32730
32731
32732
32733
32734 gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
32735
32736 fi
32737
32738
32739
32740
32741
32742
32743
32744
32745
32746 GL_GNULIB_REALLOC_POSIX=1
32747
32748
32749
32750
32751
32752 printf "%s\n" "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
32753
32754
32755
32756
32757
32758
32759
32760
32761 ac_fn_c_check_func "$LINENO" "reallocarray" "ac_cv_func_reallocarray"
32762 if test "x$ac_cv_func_reallocarray" = xyes
32763 then :
32764 printf "%s\n" "#define HAVE_REALLOCARRAY 1" >>confdefs.h
32765
32766 fi
32767
32768 if test "$ac_cv_func_reallocarray" = no; then
32769 HAVE_REALLOCARRAY=0
32770 elif test "$gl_cv_malloc_ptrdiff" = no; then
32771 REPLACE_REALLOCARRAY=1
32772 fi
32773
32774
32775 if test $HAVE_REALLOCARRAY = 0 || test $REPLACE_REALLOCARRAY = 1; then
32776 GL_COND_OBJ_REALLOCARRAY_TRUE=
32777 GL_COND_OBJ_REALLOCARRAY_FALSE='#'
32778 else
32779 GL_COND_OBJ_REALLOCARRAY_TRUE='#'
32780 GL_COND_OBJ_REALLOCARRAY_FALSE=
32781 fi
32782 :
32783 if test -z "${GL_COND_OBJ_REALLOCARRAY_TRUE}" && test -z "${GL_COND_OBJ_REALLOCARRAY_FALSE}"; then
32784 GL_COND_OBJ_REALLOCARRAY_TRUE='#'
32785 GL_COND_OBJ_REALLOCARRAY_FALSE='#'
32786 fi
32787
32788 if test -z "$GL_COND_OBJ_REALLOCARRAY_TRUE"; then :
32789
32790 :
32791
32792 fi
32793
32794
32795 printf "%s\n" "#define GNULIB_REALLOCARRAY 1" >>confdefs.h
32796
32797
32798
32799
32800
32801
32802
32803
32804
32805
32806
32807 GL_GNULIB_REALLOCARRAY=1
32808
32809
32810
32811
32812
32813 printf "%s\n" "#define GNULIB_TEST_REALLOCARRAY 1" >>confdefs.h
32814
32815
32816
32817
32818
32819 # Check whether --with-included-regex was given.
32820 if test ${with_included_regex+y}
32821 then :
32822 withval=$with_included_regex;
32823 fi
32824
32825
32826 case $with_included_regex in #(
32827 yes|no) ac_use_included_regex=$with_included_regex
32828 ;;
32829 '')
32830 # If the system regex support is good enough that it passes the
32831 # following run test, then default to *not* using the included regex.c.
32832 # If cross compiling, assume the test would fail and use the included
32833 # regex.c.
32834
32835
32836 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working re_compile_pattern" >&5
32837 printf %s "checking for working re_compile_pattern... " >&6; }
32838 if test ${gl_cv_func_re_compile_pattern_working+y}
32839 then :
32840 printf %s "(cached) " >&6
32841 else $as_nop
32842 if test "$cross_compiling" = yes
32843 then :
32844 case "$host_os" in
32845 # Guess no on native Windows.
32846 mingw*) gl_cv_func_re_compile_pattern_working="guessing no" ;;
32847 # Otherwise obey --enable-cross-guesses.
32848 *) gl_cv_func_re_compile_pattern_working="$gl_cross_guess_normal" ;;
32849 esac
32850
32851 else $as_nop
32852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32853 /* end confdefs.h. */
32854 #include <regex.h>
32855
32856 #include <locale.h>
32857 #include <limits.h>
32858 #include <string.h>
32859
32860 #if defined M_CHECK_ACTION || HAVE_DECL_ALARM
32861 # include <signal.h>
32862 # include <unistd.h>
32863 #endif
32864
32865 #if HAVE_MALLOC_H
32866 # include <malloc.h>
32867 #endif
32868
32869 #ifdef M_CHECK_ACTION
32870 /* Exit with distinguishable exit code. */
32871 static void sigabrt_no_core (int sig) { raise (SIGTERM); }
32872 #endif
32873
32874 int
32875 main (void)
32876 {
32877 int result = 0;
32878 static struct re_pattern_buffer regex;
32879 unsigned char folded_chars[UCHAR_MAX + 1];
32880 int i;
32881 const char *s;
32882 struct re_registers regs;
32883
32884 /* Some builds of glibc go into an infinite loop on this
32885 test. Use alarm to force death, and mallopt to avoid
32886 malloc recursion in diagnosing the corrupted heap. */
32887 #if HAVE_DECL_ALARM
32888 signal (SIGALRM, SIG_DFL);
32889 alarm (2);
32890 #endif
32891 #ifdef M_CHECK_ACTION
32892 signal (SIGABRT, sigabrt_no_core);
32893 mallopt (M_CHECK_ACTION, 2);
32894 #endif
32895
32896 if (setlocale (LC_ALL, "en_US.UTF-8"))
32897 {
32898 {
32899 /* https://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
32900 This test needs valgrind to catch the bug on Debian
32901 GNU/Linux 3.1 x86, but it might catch the bug better
32902 on other platforms and it shouldn't hurt to try the
32903 test here. */
32904 static char const pat[] = "insert into";
32905 static char const data[] =
32906 "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
32907 re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
32908 | RE_ICASE);
32909 memset (&regex, 0, sizeof regex);
32910 s = re_compile_pattern (pat, sizeof pat - 1, &regex);
32911 if (s)
32912 result |= 1;
32913 else
32914 {
32915 if (re_search (&regex, data, sizeof data - 1,
32916 0, sizeof data - 1, &regs)
32917 != -1)
32918 result |= 1;
32919 regfree (&regex);
32920 }
32921 }
32922
32923 {
32924 /* This test is from glibc bug 15078.
32925 The test case is from Andreas Schwab in
32926 <https://sourceware.org/ml/libc-alpha/2013-01/msg00967.html>.
32927 */
32928 static char const pat[] = "[^x]x";
32929 static char const data[] =
32930 /* <U1000><U103B><U103D><U1014><U103A><U102F><U1015><U103A> */
32931 "\xe1\x80\x80"
32932 "\xe1\x80\xbb"
32933 "\xe1\x80\xbd"
32934 "\xe1\x80\x94"
32935 "\xe1\x80\xba"
32936 "\xe1\x80\xaf"
32937 "\xe1\x80\x95"
32938 "\xe1\x80\xba"
32939 "x";
32940 re_set_syntax (0);
32941 memset (&regex, 0, sizeof regex);
32942 s = re_compile_pattern (pat, sizeof pat - 1, &regex);
32943 if (s)
32944 result |= 1;
32945 else
32946 {
32947 i = re_search (&regex, data, sizeof data - 1,
32948 0, sizeof data - 1, 0);
32949 if (i != 0 && i != 21)
32950 result |= 1;
32951 regfree (&regex);
32952 }
32953 }
32954
32955 if (! setlocale (LC_ALL, "C"))
32956 return 1;
32957 }
32958
32959 /* This test is from glibc bug 3957, reported by Andrew Mackey. */
32960 re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE);
32961 memset (&regex, 0, sizeof regex);
32962 s = re_compile_pattern ("a[^x]b", 6, &regex);
32963 if (s)
32964 result |= 2;
32965 else
32966 {
32967 /* This should fail, but succeeds for glibc-2.5. */
32968 if (re_search (&regex, "a\nb", 3, 0, 3, &regs) != -1)
32969 result |= 2;
32970 regfree (&regex);
32971 }
32972
32973 /* This regular expression is from Spencer ere test number 75
32974 in grep-2.3. */
32975 re_set_syntax (RE_SYNTAX_POSIX_EGREP);
32976 memset (&regex, 0, sizeof regex);
32977 for (i = 0; i <= UCHAR_MAX; i++)
32978 folded_chars[i] = i;
32979 regex.translate = folded_chars;
32980 s = re_compile_pattern ("a[[:]:]]b\n", 11, &regex);
32981 /* This should fail with _Invalid character class name_ error. */
32982 if (!s)
32983 {
32984 result |= 4;
32985 regfree (&regex);
32986 }
32987
32988 /* Ensure that [b-a] is diagnosed as invalid, when
32989 using RE_NO_EMPTY_RANGES. */
32990 re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES);
32991 memset (&regex, 0, sizeof regex);
32992 s = re_compile_pattern ("a[b-a]", 6, &regex);
32993 if (s == 0)
32994 {
32995 result |= 8;
32996 regfree (&regex);
32997 }
32998
32999 /* This should succeed, but does not for glibc-2.1.3. */
33000 memset (&regex, 0, sizeof regex);
33001 s = re_compile_pattern ("{1", 2, &regex);
33002 if (s)
33003 result |= 8;
33004 else
33005 regfree (&regex);
33006
33007 /* The following example is derived from a problem report
33008 against gawk from Jorge Stolfi <[email protected]>. */
33009 memset (&regex, 0, sizeof regex);
33010 s = re_compile_pattern ("[an\371]*n", 7, &regex);
33011 if (s)
33012 result |= 8;
33013 else
33014 {
33015 /* This should match, but does not for glibc-2.2.1. */
33016 if (re_match (&regex, "an", 2, 0, &regs) != 2)
33017 result |= 8;
33018 else
33019 {
33020 free (regs.start);
33021 free (regs.end);
33022 }
33023 regfree (&regex);
33024 }
33025
33026 memset (&regex, 0, sizeof regex);
33027 s = re_compile_pattern ("x", 1, &regex);
33028 if (s)
33029 result |= 8;
33030 else
33031 {
33032 /* glibc-2.2.93 does not work with a negative RANGE argument. */
33033 if (re_search (&regex, "wxy", 3, 2, -2, &regs) != 1)
33034 result |= 8;
33035 else
33036 {
33037 free (regs.start);
33038 free (regs.end);
33039 }
33040 regfree (&regex);
33041 }
33042
33043 /* The version of regex.c in older versions of gnulib
33044 ignored RE_ICASE. Detect that problem too. */
33045 re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE);
33046 memset (&regex, 0, sizeof regex);
33047 s = re_compile_pattern ("x", 1, &regex);
33048 if (s)
33049 result |= 16;
33050 else
33051 {
33052 if (re_search (&regex, "WXY", 3, 0, 3, &regs) < 0)
33053 result |= 16;
33054 else
33055 {
33056 free (regs.start);
33057 free (regs.end);
33058 }
33059 regfree (&regex);
33060 }
33061
33062 /* Catch a bug reported by Vin Shelton in
33063 https://lists.gnu.org/r/bug-coreutils/2007-06/msg00089.html
33064 */
33065 re_set_syntax (RE_SYNTAX_POSIX_BASIC
33066 & ~RE_CONTEXT_INVALID_DUP
33067 & ~RE_NO_EMPTY_RANGES);
33068 memset (&regex, 0, sizeof regex);
33069 s = re_compile_pattern ("[[:alnum:]_-]\\\\+\$", 16, &regex);
33070 if (s)
33071 result |= 32;
33072 else
33073 regfree (&regex);
33074
33075 /* REG_STARTEND was added to glibc on 2004-01-15.
33076 Reject older versions. */
33077 if (! REG_STARTEND)
33078 result |= 64;
33079
33080 /* Matching with the compiled form of this regexp would provoke
33081 an assertion failure prior to glibc-2.28:
33082 regexec.c:1375: pop_fail_stack: Assertion 'num >= 0' failed
33083 With glibc-2.28, compilation fails and reports the invalid
33084 back reference. */
33085 re_set_syntax (RE_SYNTAX_POSIX_EGREP);
33086 memset (&regex, 0, sizeof regex);
33087 s = re_compile_pattern ("0|()0|\\\\1|0", 10, &regex);
33088 if (!s)
33089 {
33090 memset (&regs, 0, sizeof regs);
33091 i = re_search (&regex, "x", 1, 0, 1, &regs);
33092 if (i != -1)
33093 result |= 64;
33094 if (0 <= i)
33095 {
33096 free (regs.start);
33097 free (regs.end);
33098 }
33099 regfree (&regex);
33100 }
33101 else
33102 {
33103 if (strcmp (s, "Invalid back reference"))
33104 result |= 64;
33105 }
33106
33107 /* glibc bug 11053. */
33108 re_set_syntax (RE_SYNTAX_POSIX_BASIC);
33109 memset (&regex, 0, sizeof regex);
33110 static char const pat_sub2[] = "\\\\(a*\\\\)*a*\\\\1";
33111 s = re_compile_pattern (pat_sub2, sizeof pat_sub2 - 1, &regex);
33112 if (s)
33113 result |= 64;
33114 else
33115 {
33116 memset (&regs, 0, sizeof regs);
33117 static char const data[] = "a";
33118 int datalen = sizeof data - 1;
33119 i = re_search (&regex, data, datalen, 0, datalen, &regs);
33120 if (i != 0)
33121 result |= 64;
33122 else if (regs.num_regs < 2)
33123 result |= 64;
33124 else if (! (regs.start[0] == 0 && regs.end[0] == 1))
33125 result |= 64;
33126 else if (! (regs.start[1] == 0 && regs.end[1] == 0))
33127 result |= 64;
33128 regfree (&regex);
33129 free (regs.start);
33130 free (regs.end);
33131 }
33132
33133 #if 0
33134 /* It would be nice to reject hosts whose regoff_t values are too
33135 narrow (including glibc on hosts with 64-bit ptrdiff_t and
33136 32-bit int), but we should wait until glibc implements this
33137 feature. Otherwise, support for equivalence classes and
33138 multibyte collation symbols would always be broken except
33139 when compiling --without-included-regex. */
33140 if (sizeof (regoff_t) < sizeof (ptrdiff_t)
33141 || sizeof (regoff_t) < sizeof (ssize_t))
33142 result |= 64;
33143 #endif
33144
33145 return result;
33146
33147 ;
33148 return 0;
33149 }
33150 _ACEOF
33151 if ac_fn_c_try_run "$LINENO"
33152 then :
33153 gl_cv_func_re_compile_pattern_working=yes
33154 else $as_nop
33155 gl_cv_func_re_compile_pattern_working=no
33156 fi
33157 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33158 conftest.$ac_objext conftest.beam conftest.$ac_ext
33159 fi
33160
33161
33162 fi
33163 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_re_compile_pattern_working" >&5
33164 printf "%s\n" "$gl_cv_func_re_compile_pattern_working" >&6; }
33165 case "$gl_cv_func_re_compile_pattern_working" in #(
33166 *yes) ac_use_included_regex=no;; #(
33167 *no) ac_use_included_regex=yes;;
33168 esac
33169 ;;
33170 *) as_fn_error $? "Invalid value for --with-included-regex: $with_included_regex" "$LINENO" 5
33171 ;;
33172 esac
33173
33174 if test $ac_use_included_regex = yes; then
33175
33176 printf "%s\n" "#define _REGEX_INCLUDE_LIMITS_H 1" >>confdefs.h
33177
33178
33179 printf "%s\n" "#define _REGEX_LARGE_OFFSETS 1" >>confdefs.h
33180
33181
33182 printf "%s\n" "#define re_syntax_options rpl_re_syntax_options" >>confdefs.h
33183
33184
33185 printf "%s\n" "#define re_set_syntax rpl_re_set_syntax" >>confdefs.h
33186
33187
33188 printf "%s\n" "#define re_compile_pattern rpl_re_compile_pattern" >>confdefs.h
33189
33190
33191 printf "%s\n" "#define re_compile_fastmap rpl_re_compile_fastmap" >>confdefs.h
33192
33193
33194 printf "%s\n" "#define re_search rpl_re_search" >>confdefs.h
33195
33196
33197 printf "%s\n" "#define re_search_2 rpl_re_search_2" >>confdefs.h
33198
33199
33200 printf "%s\n" "#define re_match rpl_re_match" >>confdefs.h
33201
33202
33203 printf "%s\n" "#define re_match_2 rpl_re_match_2" >>confdefs.h
33204
33205
33206 printf "%s\n" "#define re_set_registers rpl_re_set_registers" >>confdefs.h
33207
33208
33209 printf "%s\n" "#define re_comp rpl_re_comp" >>confdefs.h
33210
33211
33212 printf "%s\n" "#define re_exec rpl_re_exec" >>confdefs.h
33213
33214
33215 printf "%s\n" "#define regcomp rpl_regcomp" >>confdefs.h
33216
33217
33218 printf "%s\n" "#define regexec rpl_regexec" >>confdefs.h
33219
33220
33221 printf "%s\n" "#define regerror rpl_regerror" >>confdefs.h
33222
33223
33224 printf "%s\n" "#define regfree rpl_regfree" >>confdefs.h
33225
33226 fi
33227
33228
33229 if test $ac_use_included_regex = yes; then
33230 GL_COND_OBJ_REGEX_TRUE=
33231 GL_COND_OBJ_REGEX_FALSE='#'
33232 else
33233 GL_COND_OBJ_REGEX_TRUE='#'
33234 GL_COND_OBJ_REGEX_FALSE=
33235 fi
33236 :
33237 if test -z "${GL_COND_OBJ_REGEX_TRUE}" && test -z "${GL_COND_OBJ_REGEX_FALSE}"; then
33238 GL_COND_OBJ_REGEX_TRUE='#'
33239 GL_COND_OBJ_REGEX_FALSE='#'
33240 fi
33241
33242 if test -z "$GL_COND_OBJ_REGEX_TRUE"; then :
33243
33244
33245
33246
33247
33248
33249
33250 ac_fn_c_check_header_compile "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
33251 if test "x$ac_cv_header_libintl_h" = xyes
33252 then :
33253 printf "%s\n" "#define HAVE_LIBINTL_H 1" >>confdefs.h
33254
33255 fi
33256
33257
33258 ac_fn_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
33259 " "$ac_c_undeclared_builtin_options" "CFLAGS"
33260 if test "x$ac_cv_have_decl_isblank" = xyes
33261 then :
33262 ac_have_decl=1
33263 else $as_nop
33264 ac_have_decl=0
33265 fi
33266 printf "%s\n" "#define HAVE_DECL_ISBLANK $ac_have_decl" >>confdefs.h
33267
33268
33269
33270 fi
33271
33272
33273
33274
33275
33276
33277
33278
33279 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setlocale (LC_ALL, NULL) is multithread-safe" >&5
33280 printf %s "checking whether setlocale (LC_ALL, NULL) is multithread-safe... " >&6; }
33281 if test ${gl_cv_func_setlocale_null_all_mtsafe+y}
33282 then :
33283 printf %s "(cached) " >&6
33284 else $as_nop
33285 case "$host_os" in
33286 # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin.
33287 *-musl* | darwin* | freebsd* | midnightbsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*)
33288 gl_cv_func_setlocale_null_all_mtsafe=no ;;
33289 # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
33290 *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*)
33291 gl_cv_func_setlocale_null_all_mtsafe=yes ;;
33292 # If we don't know, obey --enable-cross-guesses.
33293 *)
33294 gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;;
33295 esac
33296
33297 fi
33298 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_all_mtsafe" >&5
33299 printf "%s\n" "$gl_cv_func_setlocale_null_all_mtsafe" >&6; }
33300 case "$host_os" in
33301 mingw*) ;;
33302 *)
33303 if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
33304 gl_cv_func_setlocale_null_all_mtsafe="trivially yes"
33305 fi
33306 ;;
33307 esac
33308 case "$gl_cv_func_setlocale_null_all_mtsafe" in
33309 *yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;;
33310 *) SETLOCALE_NULL_ALL_MTSAFE=0 ;;
33311 esac
33312
33313 printf "%s\n" "#define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE" >>confdefs.h
33314
33315
33316 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setlocale (category, NULL) is multithread-safe" >&5
33317 printf %s "checking whether setlocale (category, NULL) is multithread-safe... " >&6; }
33318 if test ${gl_cv_func_setlocale_null_one_mtsafe+y}
33319 then :
33320 printf %s "(cached) " >&6
33321 else $as_nop
33322 case "$host_os" in
33323 # Guess no on OpenBSD, AIX.
33324 openbsd* | aix*)
33325 gl_cv_func_setlocale_null_one_mtsafe=no ;;
33326 # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows.
33327 *-gnu* | gnu* | *-musl* | darwin* | freebsd* | midnightbsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
33328 gl_cv_func_setlocale_null_one_mtsafe=yes ;;
33329 # If we don't know, obey --enable-cross-guesses.
33330 *)
33331 gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;;
33332 esac
33333
33334 fi
33335 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_one_mtsafe" >&5
33336 printf "%s\n" "$gl_cv_func_setlocale_null_one_mtsafe" >&6; }
33337 case "$host_os" in
33338 mingw*) ;;
33339 *)
33340 if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
33341 gl_cv_func_setlocale_null_one_mtsafe="trivially yes"
33342 fi
33343 ;;
33344 esac
33345 case "$gl_cv_func_setlocale_null_one_mtsafe" in
33346 *yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;;
33347 *) SETLOCALE_NULL_ONE_MTSAFE=0 ;;
33348 esac
33349
33350 printf "%s\n" "#define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE" >>confdefs.h
33351
33352
33353 if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
33354 case "$host_os" in
33355 mingw*) LIB_SETLOCALE_NULL= ;;
33356 *)
33357
33358
33359 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
33360 printf %s "checking whether imported symbols can be declared weak... " >&6; }
33361 if test ${gl_cv_have_weak+y}
33362 then :
33363 printf %s "(cached) " >&6
33364 else $as_nop
33365 case "$host_os" in
33366 cygwin*)
33367 gl_cv_have_weak="guessing no"
33368 ;;
33369 *)
33370 gl_cv_have_weak=no
33371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33372 /* end confdefs.h. */
33373 extern void xyzzy ();
33374 #pragma weak xyzzy
33375 int
33376 main (void)
33377 {
33378 xyzzy();
33379 ;
33380 return 0;
33381 }
33382 _ACEOF
33383 if ac_fn_c_try_link "$LINENO"
33384 then :
33385 gl_cv_have_weak=maybe
33386 fi
33387 rm -f core conftest.err conftest.$ac_objext conftest.beam \
33388 conftest$ac_exeext conftest.$ac_ext
33389 if test $gl_cv_have_weak = maybe; then
33390 if test "$cross_compiling" = yes
33391 then :
33392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33393 /* end confdefs.h. */
33394 #ifdef __ELF__
33395 Extensible Linking Format
33396 #endif
33397
33398 _ACEOF
33399 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
33400 $EGREP "Extensible Linking Format" >/dev/null 2>&1
33401 then :
33402 gl_cv_have_weak="guessing yes"
33403 else $as_nop
33404 gl_cv_have_weak="guessing no"
33405 fi
33406 rm -rf conftest*
33407
33408
33409 else $as_nop
33410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33411 /* end confdefs.h. */
33412
33413 #include <stdio.h>
33414 #pragma weak fputs
33415 int main ()
33416 {
33417 return (fputs == NULL);
33418 }
33419 _ACEOF
33420 if ac_fn_c_try_run "$LINENO"
33421 then :
33422 gl_cv_have_weak=yes
33423 else $as_nop
33424 gl_cv_have_weak=no
33425 fi
33426 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33427 conftest.$ac_objext conftest.beam conftest.$ac_ext
33428 fi
33429
33430 fi
33431 ;;
33432 esac
33433 case " $LDFLAGS " in
33434 *" -static "*) gl_cv_have_weak=no ;;
33435 esac
33436 case "$gl_cv_have_weak" in
33437 *yes)
33438 case "$host_os" in
33439 freebsd* | dragonfly* | midnightbsd*)
33440 : > conftest1.c
33441 $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
33442 cat <<EOF > conftest2.c
33443 #include <pthread.h>
33444 #pragma weak pthread_mutexattr_gettype
33445 int main ()
33446 {
33447 return (pthread_mutexattr_gettype != NULL);
33448 }
33449 EOF
33450 $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
33451 || gl_cv_have_weak=no
33452 rm -f conftest1.c libempty.so conftest2.c conftest
33453 ;;
33454 esac
33455 ;;
33456 esac
33457
33458 fi
33459 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
33460 printf "%s\n" "$gl_cv_have_weak" >&6; }
33461 case "$gl_cv_have_weak" in
33462 *yes)
33463
33464 printf "%s\n" "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
33465
33466 ;;
33467 esac
33468
33469 case "$gl_cv_have_weak" in
33470 *yes) LIB_SETLOCALE_NULL= ;;
33471 *) LIB_SETLOCALE_NULL="$LIBPTHREAD" ;;
33472 esac
33473 ;;
33474 esac
33475 else
33476 LIB_SETLOCALE_NULL=
33477 fi
33478
33479
33480
33481 if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
33482 GL_COND_OBJ_SETLOCALE_LOCK_TRUE=
33483 GL_COND_OBJ_SETLOCALE_LOCK_FALSE='#'
33484 else
33485 GL_COND_OBJ_SETLOCALE_LOCK_TRUE='#'
33486 GL_COND_OBJ_SETLOCALE_LOCK_FALSE=
33487 fi
33488 :
33489 if test -z "${GL_COND_OBJ_SETLOCALE_LOCK_TRUE}" && test -z "${GL_COND_OBJ_SETLOCALE_LOCK_FALSE}"; then
33490 GL_COND_OBJ_SETLOCALE_LOCK_TRUE='#'
33491 GL_COND_OBJ_SETLOCALE_LOCK_FALSE='#'
33492 fi
33493
33494 if test -z "$GL_COND_OBJ_SETLOCALE_LOCK_TRUE"; then :
33495
33496
33497
33498
33499 CFLAG_VISIBILITY=
33500 HAVE_VISIBILITY=0
33501 if test -n "$GCC"; then
33502 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
33503 printf %s "checking whether the -Werror option is usable... " >&6; }
33504 if test ${gl_cv_cc_vis_werror+y}
33505 then :
33506 printf %s "(cached) " >&6
33507 else $as_nop
33508 gl_save_CFLAGS="$CFLAGS"
33509 CFLAGS="$CFLAGS -Werror"
33510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33511 /* end confdefs.h. */
33512
33513 int
33514 main (void)
33515 {
33516
33517 ;
33518 return 0;
33519 }
33520 _ACEOF
33521 if ac_fn_c_try_compile "$LINENO"
33522 then :
33523 gl_cv_cc_vis_werror=yes
33524 else $as_nop
33525 gl_cv_cc_vis_werror=no
33526 fi
33527 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
33528 CFLAGS="$gl_save_CFLAGS"
33529
33530 fi
33531 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
33532 printf "%s\n" "$gl_cv_cc_vis_werror" >&6; }
33533 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
33534 printf %s "checking for simple visibility declarations... " >&6; }
33535 if test ${gl_cv_cc_visibility+y}
33536 then :
33537 printf %s "(cached) " >&6
33538 else $as_nop
33539 gl_save_CFLAGS="$CFLAGS"
33540 CFLAGS="$CFLAGS -fvisibility=hidden"
33541 if test $gl_cv_cc_vis_werror = yes; then
33542 CFLAGS="$CFLAGS -Werror"
33543 fi
33544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33545 /* end confdefs.h. */
33546 extern __attribute__((__visibility__("hidden"))) int hiddenvar;
33547 extern __attribute__((__visibility__("default"))) int exportedvar;
33548 extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
33549 extern __attribute__((__visibility__("default"))) int exportedfunc (void);
33550 void dummyfunc (void);
33551 int hiddenvar;
33552 int exportedvar;
33553 int hiddenfunc (void) { return 51; }
33554 int exportedfunc (void) { return 1225736919; }
33555 void dummyfunc (void) {}
33556
33557 int
33558 main (void)
33559 {
33560
33561 ;
33562 return 0;
33563 }
33564 _ACEOF
33565 if ac_fn_c_try_compile "$LINENO"
33566 then :
33567 gl_cv_cc_visibility=yes
33568 else $as_nop
33569 gl_cv_cc_visibility=no
33570 fi
33571 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
33572 CFLAGS="$gl_save_CFLAGS"
33573
33574 fi
33575 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
33576 printf "%s\n" "$gl_cv_cc_visibility" >&6; }
33577 if test $gl_cv_cc_visibility = yes; then
33578 CFLAG_VISIBILITY="-fvisibility=hidden"
33579 HAVE_VISIBILITY=1
33580 fi
33581 fi
33582
33583
33584
33585 printf "%s\n" "#define HAVE_VISIBILITY $HAVE_VISIBILITY" >>confdefs.h
33586
33587
33588
33589
33590 fi
33591
33592
33593
33594
33595
33596
33597
33598
33599
33600 GL_GNULIB_SETLOCALE_NULL=1
33601
33602
33603
33604
33605
33606 printf "%s\n" "#define GNULIB_TEST_SETLOCALE_NULL 1" >>confdefs.h
33607
33608
33609
33610
33611 ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
33612 if test "x$ac_cv_header_stdint_h" = xyes
33613 then :
33614 printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h
33615
33616 fi
33617
33618 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
33619 printf %s "checking for SIZE_MAX... " >&6; }
33620 if test ${gl_cv_size_max+y}
33621 then :
33622 printf %s "(cached) " >&6
33623 else $as_nop
33624
33625 gl_cv_size_max=no
33626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33627 /* end confdefs.h. */
33628
33629 #include <limits.h>
33630 #if HAVE_STDINT_H
33631 #include <stdint.h>
33632 #endif
33633 #ifdef SIZE_MAX
33634 Found it
33635 #endif
33636
33637 _ACEOF
33638 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
33639 $EGREP "Found it" >/dev/null 2>&1
33640 then :
33641 gl_cv_size_max=yes
33642 fi
33643 rm -rf conftest*
33644
33645 if test $gl_cv_size_max != yes; then
33646 if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1" "#include <stddef.h>
33647 #include <limits.h>"
33648 then :
33649
33650 else $as_nop
33651 size_t_bits_minus_1=
33652 fi
33653
33654 if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint" "#include <stddef.h>"
33655 then :
33656
33657 else $as_nop
33658 fits_in_uint=
33659 fi
33660
33661 if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
33662 if test $fits_in_uint = 1; then
33663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33664 /* end confdefs.h. */
33665 #include <stddef.h>
33666 extern size_t foo;
33667 extern unsigned long foo;
33668
33669 int
33670 main (void)
33671 {
33672
33673 ;
33674 return 0;
33675 }
33676 _ACEOF
33677 if ac_fn_c_try_compile "$LINENO"
33678 then :
33679 fits_in_uint=0
33680 fi
33681 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
33682 fi
33683 if test $fits_in_uint = 1; then
33684 gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
33685 else
33686 gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
33687 fi
33688 else
33689 gl_cv_size_max='((size_t)~(size_t)0)'
33690 fi
33691 fi
33692
33693 fi
33694 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5
33695 printf "%s\n" "$gl_cv_size_max" >&6; }
33696 if test "$gl_cv_size_max" != yes; then
33697
33698 printf "%s\n" "#define SIZE_MAX $gl_cv_size_max" >>confdefs.h
33699
33700 fi
33701
33702
33703
33704
33705 ac_fn_check_decl "$LINENO" "sleep" "ac_cv_have_decl_sleep" "#include <unistd.h>
33706 " "$ac_c_undeclared_builtin_options" "CFLAGS"
33707 if test "x$ac_cv_have_decl_sleep" = xyes
33708 then :
33709 ac_have_decl=1
33710 else $as_nop
33711 ac_have_decl=0
33712 fi
33713 printf "%s\n" "#define HAVE_DECL_SLEEP $ac_have_decl" >>confdefs.h
33714
33715
33716 if test $ac_cv_have_decl_sleep != yes; then
33717 HAVE_SLEEP=0
33718 else
33719 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working sleep" >&5
33720 printf %s "checking for working sleep... " >&6; }
33721 if test ${gl_cv_func_sleep_works+y}
33722 then :
33723 printf %s "(cached) " >&6
33724 else $as_nop
33725 if test "$cross_compiling" = yes
33726 then :
33727 case "$host_os" in
33728 # Guess yes on glibc systems.
33729 *-gnu* | gnu*) gl_cv_func_sleep_works="guessing yes" ;;
33730 # Guess yes on musl systems.
33731 *-musl*) gl_cv_func_sleep_works="guessing yes" ;;
33732 # Guess no on native Windows.
33733 mingw*) gl_cv_func_sleep_works="guessing no" ;;
33734 # If we don't know, obey --enable-cross-guesses.
33735 *) gl_cv_func_sleep_works="$gl_cross_guess_normal" ;;
33736 esac
33737
33738 else $as_nop
33739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33740 /* end confdefs.h. */
33741
33742 #include <errno.h>
33743 #include <unistd.h>
33744 #include <signal.h>
33745 static void
33746 handle_alarm (int sig)
33747 {
33748 if (sig != SIGALRM)
33749 _exit (2);
33750 }
33751
33752 int
33753 main (void)
33754 {
33755
33756 /* Failure to compile this test due to missing alarm is okay,
33757 since all such platforms (mingw) also lack sleep. */
33758 unsigned int pentecost = 50 * 24 * 60 * 60; /* 50 days. */
33759 unsigned int remaining;
33760 signal (SIGALRM, handle_alarm);
33761 alarm (1);
33762 remaining = sleep (pentecost);
33763 if (remaining > pentecost)
33764 return 3;
33765 if (remaining <= pentecost - 10)
33766 return 4;
33767 return 0;
33768
33769 ;
33770 return 0;
33771 }
33772 _ACEOF
33773 if ac_fn_c_try_run "$LINENO"
33774 then :
33775 gl_cv_func_sleep_works=yes
33776 else $as_nop
33777 gl_cv_func_sleep_works=no
33778 fi
33779 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33780 conftest.$ac_objext conftest.beam conftest.$ac_ext
33781 fi
33782
33783 fi
33784 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_sleep_works" >&5
33785 printf "%s\n" "$gl_cv_func_sleep_works" >&6; }
33786 case "$gl_cv_func_sleep_works" in
33787 *yes) ;;
33788 *)
33789 REPLACE_SLEEP=1
33790 ;;
33791 esac
33792 fi
33793
33794
33795 if test $HAVE_SLEEP = 0 || test $REPLACE_SLEEP = 1; then
33796 GL_COND_OBJ_SLEEP_TRUE=
33797 GL_COND_OBJ_SLEEP_FALSE='#'
33798 else
33799 GL_COND_OBJ_SLEEP_TRUE='#'
33800 GL_COND_OBJ_SLEEP_FALSE=
33801 fi
33802 :
33803 if test -z "${GL_COND_OBJ_SLEEP_TRUE}" && test -z "${GL_COND_OBJ_SLEEP_FALSE}"; then
33804 GL_COND_OBJ_SLEEP_TRUE='#'
33805 GL_COND_OBJ_SLEEP_FALSE='#'
33806 fi
33807
33808
33809
33810
33811
33812
33813
33814
33815
33816
33817 GL_GNULIB_SLEEP=1
33818
33819
33820
33821
33822
33823 printf "%s\n" "#define GNULIB_TEST_SLEEP 1" >>confdefs.h
33824
33825
33826
33827
33828 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
33829 printf %s "checking for ssize_t... " >&6; }
33830 if test ${gt_cv_ssize_t+y}
33831 then :
33832 printf %s "(cached) " >&6
33833 else $as_nop
33834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33835 /* end confdefs.h. */
33836 #include <sys/types.h>
33837 int
33838 main (void)
33839 {
33840 int x = sizeof (ssize_t *) + sizeof (ssize_t);
33841 return !x;
33842 ;
33843 return 0;
33844 }
33845 _ACEOF
33846 if ac_fn_c_try_compile "$LINENO"
33847 then :
33848 gt_cv_ssize_t=yes
33849 else $as_nop
33850 gt_cv_ssize_t=no
33851 fi
33852 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
33853 fi
33854 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
33855 printf "%s\n" "$gt_cv_ssize_t" >&6; }
33856 if test $gt_cv_ssize_t = no; then
33857
33858 printf "%s\n" "#define ssize_t int" >>confdefs.h
33859
33860 fi
33861
33862
33863
33864
33865
33866 case "$host_os" in
33867 mingw*)
33868 REPLACE_STAT=1
33869 ;;
33870 *)
33871 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
33872 printf %s "checking whether stat handles trailing slashes on files... " >&6; }
33873 if test ${gl_cv_func_stat_file_slash+y}
33874 then :
33875 printf %s "(cached) " >&6
33876 else $as_nop
33877 touch conftest.tmp
33878 # Assume that if we have lstat, we can also check symlinks.
33879 if test $ac_cv_func_lstat = yes; then
33880 ln -s conftest.tmp conftest.lnk
33881 fi
33882 if test "$cross_compiling" = yes
33883 then :
33884 case "$host_os" in
33885 # Guess yes on Linux systems.
33886 linux-* | linux) gl_cv_func_stat_file_slash="guessing yes" ;;
33887 # Guess yes on glibc systems.
33888 *-gnu* | gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
33889 # If we don't know, obey --enable-cross-guesses.
33890 *) gl_cv_func_stat_file_slash="$gl_cross_guess_normal" ;;
33891 esac
33892
33893 else $as_nop
33894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33895 /* end confdefs.h. */
33896 #include <sys/stat.h>
33897
33898 int
33899 main (void)
33900 {
33901 int result = 0;
33902 struct stat st;
33903 if (!stat ("conftest.tmp/", &st))
33904 result |= 1;
33905 #if HAVE_LSTAT
33906 if (!stat ("conftest.lnk/", &st))
33907 result |= 2;
33908 #endif
33909 return result;
33910
33911 ;
33912 return 0;
33913 }
33914 _ACEOF
33915 if ac_fn_c_try_run "$LINENO"
33916 then :
33917 gl_cv_func_stat_file_slash=yes
33918 else $as_nop
33919 gl_cv_func_stat_file_slash=no
33920 fi
33921 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33922 conftest.$ac_objext conftest.beam conftest.$ac_ext
33923 fi
33924
33925 rm -f conftest.tmp conftest.lnk
33926 fi
33927 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
33928 printf "%s\n" "$gl_cv_func_stat_file_slash" >&6; }
33929 case $gl_cv_func_stat_file_slash in
33930 *no)
33931 REPLACE_STAT=1
33932
33933 printf "%s\n" "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
33934 ;;
33935 esac
33936 case $host_os in
33937 solaris*)
33938 REPLACE_FSTAT=1 ;;
33939 esac
33940 ;;
33941 esac
33942
33943
33944 if test $REPLACE_STAT = 1; then
33945 GL_COND_OBJ_STAT_TRUE=
33946 GL_COND_OBJ_STAT_FALSE='#'
33947 else
33948 GL_COND_OBJ_STAT_TRUE='#'
33949 GL_COND_OBJ_STAT_FALSE=
33950 fi
33951 :
33952 if test -z "${GL_COND_OBJ_STAT_TRUE}" && test -z "${GL_COND_OBJ_STAT_FALSE}"; then
33953 GL_COND_OBJ_STAT_TRUE='#'
33954 GL_COND_OBJ_STAT_FALSE='#'
33955 fi
33956
33957 if test -z "$GL_COND_OBJ_STAT_TRUE"; then :
33958
33959 case "$host_os" in
33960 mingw*)
33961
33962
33963
33964
33965
33966
33967
33968
33969 gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
33970
33971 ;;
33972 esac
33973
33974
33975
33976 :
33977
33978
33979 fi
33980
33981
33982
33983
33984
33985
33986
33987
33988
33989 GL_GNULIB_STAT=1
33990
33991
33992
33993
33994
33995 printf "%s\n" "#define GNULIB_TEST_STAT 1" >>confdefs.h
33996
33997
33998
33999
34000
34001
34002
34003 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>
34004 #include <sys/stat.h>
34005 "
34006 if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes
34007 then :
34008
34009 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1" >>confdefs.h
34010
34011 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
34012 printf %s "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
34013 if test ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+y}
34014 then :
34015 printf %s "(cached) " >&6
34016 else $as_nop
34017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34018 /* end confdefs.h. */
34019
34020 #include <sys/types.h>
34021 #include <sys/stat.h>
34022 #if HAVE_SYS_TIME_H
34023 # include <sys/time.h>
34024 #endif
34025 #include <time.h>
34026 struct timespec ts;
34027 struct stat st;
34028
34029 int
34030 main (void)
34031 {
34032
34033 st.st_atim = ts;
34034
34035 ;
34036 return 0;
34037 }
34038 _ACEOF
34039 if ac_fn_c_try_compile "$LINENO"
34040 then :
34041 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
34042 else $as_nop
34043 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
34044 fi
34045 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
34046 fi
34047 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
34048 printf "%s\n" "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
34049 if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
34050
34051 printf "%s\n" "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
34052
34053 fi
34054 else $as_nop
34055 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>
34056 #include <sys/stat.h>
34057 "
34058 if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes
34059 then :
34060
34061 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1" >>confdefs.h
34062
34063
34064 else $as_nop
34065 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
34066 #include <sys/stat.h>
34067 "
34068 if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes
34069 then :
34070
34071 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1" >>confdefs.h
34072
34073
34074 else $as_nop
34075 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>
34076 #include <sys/stat.h>
34077 "
34078 if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes
34079 then :
34080
34081 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1" >>confdefs.h
34082
34083
34084 fi
34085
34086 fi
34087
34088 fi
34089
34090 fi
34091
34092
34093
34094
34095
34096 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>
34097 #include <sys/stat.h>
34098 "
34099 if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes
34100 then :
34101
34102 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1" >>confdefs.h
34103
34104
34105 else $as_nop
34106 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
34107 #include <sys/stat.h>
34108 "
34109 if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes
34110 then :
34111
34112 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1" >>confdefs.h
34113
34114
34115 else $as_nop
34116 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>
34117 #include <sys/stat.h>
34118 "
34119 if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes
34120 then :
34121
34122 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1" >>confdefs.h
34123
34124
34125 fi
34126
34127 fi
34128
34129 fi
34130
34131
34132
34133 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
34134 printf %s "checking for working stdalign.h... " >&6; }
34135 if test ${gl_cv_header_working_stdalign_h+y}
34136 then :
34137 printf %s "(cached) " >&6
34138 else $as_nop
34139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34140 /* end confdefs.h. */
34141 #include <stdint.h>
34142 #include <stdalign.h>
34143 #include <stddef.h>
34144
34145 /* Test that alignof yields a result consistent with offsetof.
34146 This catches GCC bug 52023
34147 <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
34148 #ifdef __cplusplus
34149 template <class t> struct alignof_helper { char a; t b; };
34150 # define ao(type) offsetof (alignof_helper<type>, b)
34151 #else
34152 # define ao(type) offsetof (struct { char a; type b; }, b)
34153 #endif
34154 char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
34155 char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
34156 char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
34157
34158 /* Test _Alignas only on platforms where gnulib can help. */
34159 #if \
34160 ((defined __cplusplus && 201103 <= __cplusplus) \
34161 || (__TINYC__ && defined __attribute__) \
34162 || (defined __APPLE__ && defined __MACH__ \
34163 ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
34164 : __GNUC__) \
34165 || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \
34166 || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__ \
34167 || 1300 <= _MSC_VER)
34168 struct alignas_test { char c; char alignas (8) alignas_8; };
34169 char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
34170 ? 1 : -1];
34171 #endif
34172
34173 int
34174 main (void)
34175 {
34176
34177 ;
34178 return 0;
34179 }
34180 _ACEOF
34181 if ac_fn_c_try_compile "$LINENO"
34182 then :
34183 gl_cv_header_working_stdalign_h=yes
34184 else $as_nop
34185 gl_cv_header_working_stdalign_h=no
34186 fi
34187 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
34188 fi
34189 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
34190 printf "%s\n" "$gl_cv_header_working_stdalign_h" >&6; }
34191
34192 if test $gl_cv_header_working_stdalign_h = yes; then
34193 GL_GENERATE_STDALIGN_H=false
34194 else
34195 GL_GENERATE_STDALIGN_H=true
34196 fi
34197
34198
34199
34200
34201
34202 case "$GL_GENERATE_STDALIGN_H" in
34203 false) STDALIGN_H='' ;;
34204 true)
34205 if test -z "$STDALIGN_H"; then
34206 STDALIGN_H="${gl_source_base_prefix}stdalign.h"
34207 fi
34208 ;;
34209 *) echo "*** GL_GENERATE_STDALIGN_H is not set correctly" 1>&2; exit 1 ;;
34210 esac
34211
34212
34213 if $GL_GENERATE_STDALIGN_H; then
34214 GL_GENERATE_STDALIGN_H_TRUE=
34215 GL_GENERATE_STDALIGN_H_FALSE='#'
34216 else
34217 GL_GENERATE_STDALIGN_H_TRUE='#'
34218 GL_GENERATE_STDALIGN_H_FALSE=
34219 fi
34220 :
34221 if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
34222 GL_GENERATE_STDALIGN_H_TRUE='#'
34223 GL_GENERATE_STDALIGN_H_FALSE='#'
34224 fi
34225
34226
34227
34228
34229
34230
34231
34232
34233
34234
34235 if test "$ac_cv_header_stdbool_h" = yes; then
34236 case "$host_os" in
34237 solaris*)
34238 if test -z "$GCC"; then
34239 GL_GENERATE_STDBOOL_H=true
34240 else
34241 GL_GENERATE_STDBOOL_H=false
34242 fi
34243 ;;
34244 *)
34245 GL_GENERATE_STDBOOL_H=false
34246 ;;
34247 esac
34248 else
34249 GL_GENERATE_STDBOOL_H=true
34250 fi
34251
34252 if test "$ac_cv_type__Bool" = yes; then
34253 HAVE__BOOL=1
34254 else
34255 HAVE__BOOL=0
34256 fi
34257
34258
34259
34260
34261
34262
34263 case "$GL_GENERATE_STDBOOL_H" in
34264 false) STDBOOL_H='' ;;
34265 true)
34266 if test -z "$STDBOOL_H"; then
34267 STDBOOL_H="${gl_source_base_prefix}stdbool.h"
34268 fi
34269 ;;
34270 *) echo "*** GL_GENERATE_STDBOOL_H is not set correctly" 1>&2; exit 1 ;;
34271 esac
34272
34273
34274 if $GL_GENERATE_STDBOOL_H; then
34275 GL_GENERATE_STDBOOL_H_TRUE=
34276 GL_GENERATE_STDBOOL_H_FALSE='#'
34277 else
34278 GL_GENERATE_STDBOOL_H_TRUE='#'
34279 GL_GENERATE_STDBOOL_H_FALSE=
34280 fi
34281 :
34282 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
34283 GL_GENERATE_STDBOOL_H_TRUE='#'
34284 GL_GENERATE_STDBOOL_H_FALSE='#'
34285 fi
34286
34287
34288
34289
34290
34291
34292
34293
34294
34295
34296
34297
34298
34299
34300
34301
34302 case "$GL_GENERATE_STDDEF_H" in
34303 false) STDDEF_H='' ;;
34304 true)
34305 if test -z "$STDDEF_H"; then
34306 STDDEF_H="${gl_source_base_prefix}stddef.h"
34307 fi
34308 ;;
34309 *) echo "*** GL_GENERATE_STDDEF_H is not set correctly" 1>&2; exit 1 ;;
34310 esac
34311
34312
34313 if $GL_GENERATE_STDDEF_H; then
34314 GL_GENERATE_STDDEF_H_TRUE=
34315 GL_GENERATE_STDDEF_H_FALSE='#'
34316 else
34317 GL_GENERATE_STDDEF_H_TRUE='#'
34318 GL_GENERATE_STDDEF_H_FALSE=
34319 fi
34320 :
34321 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
34322 GL_GENERATE_STDDEF_H_TRUE='#'
34323 GL_GENERATE_STDDEF_H_FALSE='#'
34324 fi
34325
34326
34327
34328
34329
34330
34331
34332
34333
34334
34335
34336 case "$GL_GENERATE_STDINT_H" in
34337 false) STDINT_H='' ;;
34338 true)
34339 if test -z "$STDINT_H"; then
34340 STDINT_H="${gl_source_base_prefix}stdint.h"
34341 fi
34342 ;;
34343 *) echo "*** GL_GENERATE_STDINT_H is not set correctly" 1>&2; exit 1 ;;
34344 esac
34345
34346
34347 if $GL_GENERATE_STDINT_H; then
34348 GL_GENERATE_STDINT_H_TRUE=
34349 GL_GENERATE_STDINT_H_FALSE='#'
34350 else
34351 GL_GENERATE_STDINT_H_TRUE='#'
34352 GL_GENERATE_STDINT_H_FALSE=
34353 fi
34354 :
34355 if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
34356 GL_GENERATE_STDINT_H_TRUE='#'
34357 GL_GENERATE_STDINT_H_FALSE='#'
34358 fi
34359
34360
34361
34362
34363
34364
34365
34366
34367
34368 case "$GL_GENERATE_LIMITS_H" in
34369 false) LIMITS_H='' ;;
34370 true)
34371 if test -z "$LIMITS_H"; then
34372 LIMITS_H="${gl_source_base_prefix}limits.h"
34373 fi
34374 ;;
34375 *) echo "*** GL_GENERATE_LIMITS_H is not set correctly" 1>&2; exit 1 ;;
34376 esac
34377
34378
34379 if $GL_GENERATE_LIMITS_H; then
34380 GL_GENERATE_LIMITS_H_TRUE=
34381 GL_GENERATE_LIMITS_H_FALSE='#'
34382 else
34383 GL_GENERATE_LIMITS_H_TRUE='#'
34384 GL_GENERATE_LIMITS_H_FALSE=
34385 fi
34386 :
34387 if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
34388 GL_GENERATE_LIMITS_H_TRUE='#'
34389 GL_GENERATE_LIMITS_H_FALSE='#'
34390 fi
34391
34392
34393
34394
34395
34396
34397
34398
34399
34400
34401
34402
34403
34404
34405 if test $REPLACE_STDIO_READ_FUNCS = 1; then
34406 GL_COND_OBJ_STDIO_READ_TRUE=
34407 GL_COND_OBJ_STDIO_READ_FALSE='#'
34408 else
34409 GL_COND_OBJ_STDIO_READ_TRUE='#'
34410 GL_COND_OBJ_STDIO_READ_FALSE=
34411 fi
34412 :
34413 if test -z "${GL_COND_OBJ_STDIO_READ_TRUE}" && test -z "${GL_COND_OBJ_STDIO_READ_FALSE}"; then
34414 GL_COND_OBJ_STDIO_READ_TRUE='#'
34415 GL_COND_OBJ_STDIO_READ_FALSE='#'
34416 fi
34417
34418
34419 if test $REPLACE_STDIO_WRITE_FUNCS = 1; then
34420 GL_COND_OBJ_STDIO_WRITE_TRUE=
34421 GL_COND_OBJ_STDIO_WRITE_FALSE='#'
34422 else
34423 GL_COND_OBJ_STDIO_WRITE_TRUE='#'
34424 GL_COND_OBJ_STDIO_WRITE_FALSE=
34425 fi
34426 :
34427 if test -z "${GL_COND_OBJ_STDIO_WRITE_TRUE}" && test -z "${GL_COND_OBJ_STDIO_WRITE_FALSE}"; then
34428 GL_COND_OBJ_STDIO_WRITE_TRUE='#'
34429 GL_COND_OBJ_STDIO_WRITE_FALSE='#'
34430 fi
34431
34432
34433
34434
34435
34436
34437
34438
34439
34440
34441 GL_GNULIB_FSCANF=1
34442
34443
34444
34445
34446
34447 printf "%s\n" "#define GNULIB_TEST_FSCANF 1" >>confdefs.h
34448
34449
34450
34451
34452
34453 printf "%s\n" "#define GNULIB_FSCANF 1" >>confdefs.h
34454
34455
34456
34457
34458
34459
34460
34461
34462
34463
34464
34465 GL_GNULIB_SCANF=1
34466
34467
34468
34469
34470
34471 printf "%s\n" "#define GNULIB_TEST_SCANF 1" >>confdefs.h
34472
34473
34474
34475
34476
34477 printf "%s\n" "#define GNULIB_SCANF 1" >>confdefs.h
34478
34479
34480
34481
34482
34483
34484
34485
34486
34487
34488
34489 GL_GNULIB_FGETC=1
34490
34491
34492
34493
34494
34495 printf "%s\n" "#define GNULIB_TEST_FGETC 1" >>confdefs.h
34496
34497
34498
34499
34500
34501
34502
34503
34504
34505
34506
34507
34508 GL_GNULIB_GETC=1
34509
34510
34511
34512
34513
34514 printf "%s\n" "#define GNULIB_TEST_GETC 1" >>confdefs.h
34515
34516
34517
34518
34519
34520
34521
34522
34523
34524
34525
34526
34527 GL_GNULIB_GETCHAR=1
34528
34529
34530
34531
34532
34533 printf "%s\n" "#define GNULIB_TEST_GETCHAR 1" >>confdefs.h
34534
34535
34536
34537
34538
34539
34540
34541
34542
34543
34544
34545
34546 GL_GNULIB_FGETS=1
34547
34548
34549
34550
34551
34552 printf "%s\n" "#define GNULIB_TEST_FGETS 1" >>confdefs.h
34553
34554
34555
34556
34557
34558
34559
34560
34561
34562
34563
34564
34565 GL_GNULIB_FREAD=1
34566
34567
34568
34569
34570
34571 printf "%s\n" "#define GNULIB_TEST_FREAD 1" >>confdefs.h
34572
34573
34574
34575
34576
34577
34578
34579
34580
34581
34582
34583
34584 GL_GNULIB_FPRINTF=1
34585
34586
34587
34588
34589
34590 printf "%s\n" "#define GNULIB_TEST_FPRINTF 1" >>confdefs.h
34591
34592
34593
34594
34595
34596
34597
34598
34599
34600
34601
34602
34603 GL_GNULIB_PRINTF=1
34604
34605
34606
34607
34608
34609 printf "%s\n" "#define GNULIB_TEST_PRINTF 1" >>confdefs.h
34610
34611
34612
34613
34614
34615
34616
34617
34618
34619
34620
34621
34622 GL_GNULIB_VFPRINTF=1
34623
34624
34625
34626
34627
34628 printf "%s\n" "#define GNULIB_TEST_VFPRINTF 1" >>confdefs.h
34629
34630
34631
34632
34633
34634
34635
34636
34637
34638
34639
34640
34641 GL_GNULIB_VPRINTF=1
34642
34643
34644
34645
34646
34647 printf "%s\n" "#define GNULIB_TEST_VPRINTF 1" >>confdefs.h
34648
34649
34650
34651
34652
34653
34654
34655
34656
34657
34658
34659
34660 GL_GNULIB_FPUTC=1
34661
34662
34663
34664
34665
34666 printf "%s\n" "#define GNULIB_TEST_FPUTC 1" >>confdefs.h
34667
34668
34669
34670
34671
34672
34673
34674
34675
34676
34677
34678
34679 GL_GNULIB_PUTC=1
34680
34681
34682
34683
34684
34685 printf "%s\n" "#define GNULIB_TEST_PUTC 1" >>confdefs.h
34686
34687
34688
34689
34690
34691
34692
34693
34694
34695
34696
34697
34698 GL_GNULIB_PUTCHAR=1
34699
34700
34701
34702
34703
34704 printf "%s\n" "#define GNULIB_TEST_PUTCHAR 1" >>confdefs.h
34705
34706
34707
34708
34709
34710
34711
34712
34713
34714
34715
34716
34717 GL_GNULIB_FPUTS=1
34718
34719
34720
34721
34722
34723 printf "%s\n" "#define GNULIB_TEST_FPUTS 1" >>confdefs.h
34724
34725
34726
34727
34728
34729
34730
34731
34732
34733
34734
34735
34736 GL_GNULIB_PUTS=1
34737
34738
34739
34740
34741
34742 printf "%s\n" "#define GNULIB_TEST_PUTS 1" >>confdefs.h
34743
34744
34745
34746
34747
34748
34749
34750
34751
34752
34753
34754
34755 GL_GNULIB_FWRITE=1
34756
34757
34758
34759
34760
34761 printf "%s\n" "#define GNULIB_TEST_FWRITE 1" >>confdefs.h
34762
34763
34764
34765
34766
34767
34768
34769
34770
34771
34772
34773
34774
34775 ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
34776 if test "x$ac_cv_func_strcasecmp" = xyes
34777 then :
34778 printf "%s\n" "#define HAVE_STRCASECMP 1" >>confdefs.h
34779
34780 fi
34781
34782 if test $ac_cv_func_strcasecmp = no; then
34783 HAVE_STRCASECMP=0
34784 fi
34785
34786
34787
34788 ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp"
34789 if test "x$ac_cv_func_strncasecmp" = xyes
34790 then :
34791 printf "%s\n" "#define HAVE_STRNCASECMP 1" >>confdefs.h
34792
34793 fi
34794
34795 if test $ac_cv_func_strncasecmp = yes; then
34796 HAVE_STRNCASECMP=1
34797 else
34798 HAVE_STRNCASECMP=0
34799 fi
34800 ac_fn_check_decl "$LINENO" "strncasecmp" "ac_cv_have_decl_strncasecmp" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
34801 if test "x$ac_cv_have_decl_strncasecmp" = xyes
34802 then :
34803 ac_have_decl=1
34804 else $as_nop
34805 ac_have_decl=0
34806 fi
34807 printf "%s\n" "#define HAVE_DECL_STRNCASECMP $ac_have_decl" >>confdefs.h
34808
34809 if test $ac_cv_have_decl_strncasecmp = no; then
34810 HAVE_DECL_STRNCASECMP=0
34811 fi
34812
34813
34814
34815 if test $HAVE_STRCASECMP = 0; then
34816 GL_COND_OBJ_STRCASECMP_TRUE=
34817 GL_COND_OBJ_STRCASECMP_FALSE='#'
34818 else
34819 GL_COND_OBJ_STRCASECMP_TRUE='#'
34820 GL_COND_OBJ_STRCASECMP_FALSE=
34821 fi
34822 :
34823 if test -z "${GL_COND_OBJ_STRCASECMP_TRUE}" && test -z "${GL_COND_OBJ_STRCASECMP_FALSE}"; then
34824 GL_COND_OBJ_STRCASECMP_TRUE='#'
34825 GL_COND_OBJ_STRCASECMP_FALSE='#'
34826 fi
34827
34828 if test -z "$GL_COND_OBJ_STRCASECMP_TRUE"; then :
34829
34830
34831 :
34832
34833
34834 fi
34835
34836 if test $HAVE_STRNCASECMP = 0; then
34837 GL_COND_OBJ_STRNCASECMP_TRUE=
34838 GL_COND_OBJ_STRNCASECMP_FALSE='#'
34839 else
34840 GL_COND_OBJ_STRNCASECMP_TRUE='#'
34841 GL_COND_OBJ_STRNCASECMP_FALSE=
34842 fi
34843 :
34844 if test -z "${GL_COND_OBJ_STRNCASECMP_TRUE}" && test -z "${GL_COND_OBJ_STRNCASECMP_FALSE}"; then
34845 GL_COND_OBJ_STRNCASECMP_TRUE='#'
34846 GL_COND_OBJ_STRNCASECMP_FALSE='#'
34847 fi
34848
34849 if test -z "$GL_COND_OBJ_STRNCASECMP_TRUE"; then :
34850
34851
34852 :
34853
34854
34855 fi
34856
34857
34858
34859
34860 ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
34861 if test "x$ac_cv_func_strchrnul" = xyes
34862 then :
34863 printf "%s\n" "#define HAVE_STRCHRNUL 1" >>confdefs.h
34864
34865 fi
34866
34867 if test $ac_cv_func_strchrnul = no; then
34868 HAVE_STRCHRNUL=0
34869 else
34870 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5
34871 printf %s "checking whether strchrnul works... " >&6; }
34872 if test ${gl_cv_func_strchrnul_works+y}
34873 then :
34874 printf %s "(cached) " >&6
34875 else $as_nop
34876 if test "$cross_compiling" = yes
34877 then :
34878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34879 /* end confdefs.h. */
34880
34881 #if defined __CYGWIN__
34882 #include <cygwin/version.h>
34883 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
34884 Lucky user
34885 #endif
34886 #else
34887 Lucky user
34888 #endif
34889
34890 _ACEOF
34891 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
34892 $EGREP "Lucky user" >/dev/null 2>&1
34893 then :
34894 gl_cv_func_strchrnul_works="guessing yes"
34895 else $as_nop
34896 gl_cv_func_strchrnul_works="guessing no"
34897 fi
34898 rm -rf conftest*
34899
34900
34901 else $as_nop
34902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34903 /* end confdefs.h. */
34904
34905 #include <string.h> /* for strchrnul */
34906
34907 int
34908 main (void)
34909 {
34910 const char *buf = "a";
34911 return strchrnul (buf, 'b') != buf + 1;
34912
34913 ;
34914 return 0;
34915 }
34916 _ACEOF
34917 if ac_fn_c_try_run "$LINENO"
34918 then :
34919 gl_cv_func_strchrnul_works=yes
34920 else $as_nop
34921 gl_cv_func_strchrnul_works=no
34922 fi
34923 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34924 conftest.$ac_objext conftest.beam conftest.$ac_ext
34925 fi
34926
34927
34928 fi
34929 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5
34930 printf "%s\n" "$gl_cv_func_strchrnul_works" >&6; }
34931 case "$gl_cv_func_strchrnul_works" in
34932 *yes) ;;
34933 *) REPLACE_STRCHRNUL=1 ;;
34934 esac
34935 fi
34936
34937
34938 if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
34939 GL_COND_OBJ_STRCHRNUL_TRUE=
34940 GL_COND_OBJ_STRCHRNUL_FALSE='#'
34941 else
34942 GL_COND_OBJ_STRCHRNUL_TRUE='#'
34943 GL_COND_OBJ_STRCHRNUL_FALSE=
34944 fi
34945 :
34946 if test -z "${GL_COND_OBJ_STRCHRNUL_TRUE}" && test -z "${GL_COND_OBJ_STRCHRNUL_FALSE}"; then
34947 GL_COND_OBJ_STRCHRNUL_TRUE='#'
34948 GL_COND_OBJ_STRCHRNUL_FALSE='#'
34949 fi
34950
34951 if test -z "$GL_COND_OBJ_STRCHRNUL_TRUE"; then :
34952
34953 :
34954
34955 fi
34956
34957
34958
34959
34960
34961
34962
34963
34964
34965
34966
34967
34968
34969
34970 GL_GNULIB_STRCHRNUL=1
34971
34972
34973
34974
34975
34976 printf "%s\n" "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
34977
34978
34979
34980
34981
34982
34983 if test $gl_cv_func_malloc_posix != yes; then
34984 REPLACE_STRDUP=1
34985 fi
34986
34987 if test $ac_cv_have_decl_strdup = no; then
34988 HAVE_DECL_STRDUP=0
34989 fi
34990
34991
34992 if test $REPLACE_STRDUP = 1; then
34993 GL_COND_OBJ_STRDUP_TRUE=
34994 GL_COND_OBJ_STRDUP_FALSE='#'
34995 else
34996 GL_COND_OBJ_STRDUP_TRUE='#'
34997 GL_COND_OBJ_STRDUP_FALSE=
34998 fi
34999 :
35000 if test -z "${GL_COND_OBJ_STRDUP_TRUE}" && test -z "${GL_COND_OBJ_STRDUP_FALSE}"; then
35001 GL_COND_OBJ_STRDUP_TRUE='#'
35002 GL_COND_OBJ_STRDUP_FALSE='#'
35003 fi
35004
35005 if test -z "$GL_COND_OBJ_STRDUP_TRUE"; then :
35006
35007 :
35008
35009 fi
35010
35011
35012
35013
35014
35015
35016
35017
35018
35019
35020
35021
35022
35023
35024 GL_GNULIB_STRDUP=1
35025
35026
35027
35028
35029
35030 printf "%s\n" "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
35031
35032
35033
35034
35035
35036
35037
35038
35039 if test "$GL_GENERATE_ERRNO_H:$REPLACE_STRERROR_0" = false:0; then
35040 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
35041 printf %s "checking for working strerror function... " >&6; }
35042 if test ${gl_cv_func_working_strerror+y}
35043 then :
35044 printf %s "(cached) " >&6
35045 else $as_nop
35046 if test "$cross_compiling" = yes
35047 then :
35048 case "$host_os" in
35049 # Guess yes on glibc systems.
35050 *-gnu* | gnu*) gl_cv_func_working_strerror="guessing yes" ;;
35051 # Guess yes on musl systems.
35052 *-musl*) gl_cv_func_working_strerror="guessing yes" ;;
35053 # If we don't know, obey --enable-cross-guesses.
35054 *) gl_cv_func_working_strerror="$gl_cross_guess_normal" ;;
35055 esac
35056
35057 else $as_nop
35058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35059 /* end confdefs.h. */
35060 #include <string.h>
35061
35062 int
35063 main (void)
35064 {
35065 if (!*strerror (-2)) return 1;
35066 ;
35067 return 0;
35068 }
35069 _ACEOF
35070 if ac_fn_c_try_run "$LINENO"
35071 then :
35072 gl_cv_func_working_strerror=yes
35073 else $as_nop
35074 gl_cv_func_working_strerror=no
35075 fi
35076 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35077 conftest.$ac_objext conftest.beam conftest.$ac_ext
35078 fi
35079
35080
35081 fi
35082 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
35083 printf "%s\n" "$gl_cv_func_working_strerror" >&6; }
35084 case "$gl_cv_func_working_strerror" in
35085 *yes) ;;
35086 *)
35087 REPLACE_STRERROR=1
35088 ;;
35089 esac
35090
35091 else
35092 REPLACE_STRERROR=1
35093 fi
35094
35095
35096 if test $REPLACE_STRERROR = 1; then
35097 GL_COND_OBJ_STRERROR_TRUE=
35098 GL_COND_OBJ_STRERROR_FALSE='#'
35099 else
35100 GL_COND_OBJ_STRERROR_TRUE='#'
35101 GL_COND_OBJ_STRERROR_FALSE=
35102 fi
35103 :
35104 if test -z "${GL_COND_OBJ_STRERROR_TRUE}" && test -z "${GL_COND_OBJ_STRERROR_FALSE}"; then
35105 GL_COND_OBJ_STRERROR_TRUE='#'
35106 GL_COND_OBJ_STRERROR_FALSE='#'
35107 fi
35108
35109
35110
35111 printf "%s\n" "#define GNULIB_STRERROR 1" >>confdefs.h
35112
35113
35114
35115
35116
35117
35118
35119
35120
35121
35122
35123
35124
35125
35126
35127
35128 GL_GNULIB_STRERROR=1
35129
35130
35131
35132
35133
35134 printf "%s\n" "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
35135
35136
35137
35138
35139
35140
35141 if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
35142 GL_COND_OBJ_STRERROR_OVERRIDE_TRUE=
35143 GL_COND_OBJ_STRERROR_OVERRIDE_FALSE='#'
35144 else
35145 GL_COND_OBJ_STRERROR_OVERRIDE_TRUE='#'
35146 GL_COND_OBJ_STRERROR_OVERRIDE_FALSE=
35147 fi
35148 :
35149 if test -z "${GL_COND_OBJ_STRERROR_OVERRIDE_TRUE}" && test -z "${GL_COND_OBJ_STRERROR_OVERRIDE_FALSE}"; then
35150 GL_COND_OBJ_STRERROR_OVERRIDE_TRUE='#'
35151 GL_COND_OBJ_STRERROR_OVERRIDE_FALSE='#'
35152 fi
35153
35154 if test -z "$GL_COND_OBJ_STRERROR_OVERRIDE_TRUE"; then :
35155
35156
35157
35158
35159
35160 if test $ac_cv_header_sys_socket_h != yes; then
35161 ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
35162 if test "x$ac_cv_header_winsock2_h" = xyes
35163 then :
35164 printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
35165
35166 fi
35167
35168 fi
35169 if test "$ac_cv_header_winsock2_h" = yes; then
35170 HAVE_WINSOCK2_H=1
35171 UNISTD_H_HAVE_WINSOCK2_H=1
35172 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
35173 else
35174 HAVE_WINSOCK2_H=0
35175 fi
35176
35177
35178
35179 fi
35180
35181
35182
35183
35184
35185
35186
35187
35188
35189
35190
35191
35192
35193
35194
35195
35196
35197
35198
35199
35200
35201
35202
35203
35204
35205 if test $ac_cv_have_decl_strndup = no; then
35206 HAVE_DECL_STRNDUP=0
35207 fi
35208
35209 if test $ac_cv_func_strndup = yes; then
35210 HAVE_STRNDUP=1
35211 # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'.
35212 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strndup" >&5
35213 printf %s "checking for working strndup... " >&6; }
35214 if test ${gl_cv_func_strndup_works+y}
35215 then :
35216 printf %s "(cached) " >&6
35217 else $as_nop
35218 if test "$cross_compiling" = yes
35219 then :
35220
35221 case $host_os in
35222 aix | aix[3-6]*) gl_cv_func_strndup_works="guessing no";;
35223 *) gl_cv_func_strndup_works="guessing yes";;
35224 esac
35225
35226 else $as_nop
35227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35228 /* end confdefs.h. */
35229
35230 #include <string.h>
35231 #include <stdlib.h>
35232 int
35233 main (void)
35234 {
35235
35236 #if !HAVE_DECL_STRNDUP
35237 extern
35238 #ifdef __cplusplus
35239 "C"
35240 #endif
35241 char *strndup (const char *, size_t);
35242 #endif
35243 int result;
35244 char *s;
35245 s = strndup ("some longer string", 15);
35246 free (s);
35247 s = strndup ("shorter string", 13);
35248 result = s[13] != '\0';
35249 free (s);
35250 return result;
35251 ;
35252 return 0;
35253 }
35254 _ACEOF
35255 if ac_fn_c_try_run "$LINENO"
35256 then :
35257 gl_cv_func_strndup_works=yes
35258 else $as_nop
35259 gl_cv_func_strndup_works=no
35260 fi
35261 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35262 conftest.$ac_objext conftest.beam conftest.$ac_ext
35263 fi
35264
35265 fi
35266 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strndup_works" >&5
35267 printf "%s\n" "$gl_cv_func_strndup_works" >&6; }
35268 case $gl_cv_func_strndup_works in
35269 *no) REPLACE_STRNDUP=1 ;;
35270 esac
35271 else
35272 HAVE_STRNDUP=0
35273 fi
35274
35275
35276 if test $HAVE_STRNDUP = 0 || test $REPLACE_STRNDUP = 1; then
35277 GL_COND_OBJ_STRNDUP_TRUE=
35278 GL_COND_OBJ_STRNDUP_FALSE='#'
35279 else
35280 GL_COND_OBJ_STRNDUP_TRUE='#'
35281 GL_COND_OBJ_STRNDUP_FALSE=
35282 fi
35283 :
35284 if test -z "${GL_COND_OBJ_STRNDUP_TRUE}" && test -z "${GL_COND_OBJ_STRNDUP_FALSE}"; then
35285 GL_COND_OBJ_STRNDUP_TRUE='#'
35286 GL_COND_OBJ_STRNDUP_FALSE='#'
35287 fi
35288
35289
35290
35291
35292
35293
35294
35295
35296
35297
35298
35299
35300
35301
35302
35303 GL_GNULIB_STRNDUP=1
35304
35305
35306
35307
35308
35309 printf "%s\n" "#define GNULIB_TEST_STRNDUP 1" >>confdefs.h
35310
35311
35312
35313
35314
35315
35316
35317
35318
35319 if test $ac_cv_have_decl_strnlen = no; then
35320 HAVE_DECL_STRNLEN=0
35321 else
35322
35323 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5
35324 printf %s "checking for working strnlen... " >&6; }
35325 if test ${ac_cv_func_strnlen_working+y}
35326 then :
35327 printf %s "(cached) " >&6
35328 else $as_nop
35329 if test "$cross_compiling" = yes
35330 then :
35331 # Guess no on AIX systems, yes otherwise.
35332 case "$host_os" in
35333 aix*) ac_cv_func_strnlen_working=no;;
35334 *) ac_cv_func_strnlen_working=yes;;
35335 esac
35336 else $as_nop
35337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35338 /* end confdefs.h. */
35339 $ac_includes_default
35340 int
35341 main (void)
35342 {
35343
35344 #define S "foobar"
35345 #define S_LEN (sizeof S - 1)
35346
35347 /* At least one implementation is buggy: that of AIX 4.3 would
35348 give strnlen (S, 1) == 3. */
35349
35350 int i;
35351 for (i = 0; i < S_LEN + 1; ++i)
35352 {
35353 int expected = i <= S_LEN ? i : S_LEN;
35354 if (strnlen (S, i) != expected)
35355 return 1;
35356 }
35357 return 0;
35358
35359 ;
35360 return 0;
35361 }
35362 _ACEOF
35363 if ac_fn_c_try_run "$LINENO"
35364 then :
35365 ac_cv_func_strnlen_working=yes
35366 else $as_nop
35367 ac_cv_func_strnlen_working=no
35368 fi
35369 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35370 conftest.$ac_objext conftest.beam conftest.$ac_ext
35371 fi
35372
35373 fi
35374 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5
35375 printf "%s\n" "$ac_cv_func_strnlen_working" >&6; }
35376 test $ac_cv_func_strnlen_working = no && :
35377
35378
35379 if test $ac_cv_func_strnlen_working = no; then
35380 REPLACE_STRNLEN=1
35381 fi
35382 fi
35383
35384
35385 if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
35386 GL_COND_OBJ_STRNLEN_TRUE=
35387 GL_COND_OBJ_STRNLEN_FALSE='#'
35388 else
35389 GL_COND_OBJ_STRNLEN_TRUE='#'
35390 GL_COND_OBJ_STRNLEN_FALSE=
35391 fi
35392 :
35393 if test -z "${GL_COND_OBJ_STRNLEN_TRUE}" && test -z "${GL_COND_OBJ_STRNLEN_FALSE}"; then
35394 GL_COND_OBJ_STRNLEN_TRUE='#'
35395 GL_COND_OBJ_STRNLEN_FALSE='#'
35396 fi
35397
35398 if test -z "$GL_COND_OBJ_STRNLEN_TRUE"; then :
35399
35400 :
35401
35402 fi
35403
35404
35405
35406
35407
35408
35409
35410
35411
35412
35413
35414
35415
35416
35417 GL_GNULIB_STRNLEN=1
35418
35419
35420
35421
35422
35423 printf "%s\n" "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h
35424
35425
35426
35427
35428
35429
35430
35431
35432
35433
35434
35435
35436
35437
35438
35439
35440
35441
35442
35443 if test $ac_cv_header_sysexits_h = yes; then
35444 HAVE_SYSEXITS_H=1
35445
35446
35447
35448
35449
35450
35451
35452
35453
35454 if test $gl_cv_have_include_next = yes; then
35455 gl_cv_next_sysexits_h='<'sysexits.h'>'
35456 else
35457 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sysexits.h>" >&5
35458 printf %s "checking absolute name of <sysexits.h>... " >&6; }
35459 if test ${gl_cv_next_sysexits_h+y}
35460 then :
35461 printf %s "(cached) " >&6
35462 else $as_nop
35463
35464 if test $ac_cv_header_sysexits_h = yes; then
35465
35466
35467
35468
35469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35470 /* end confdefs.h. */
35471 #include <sysexits.h>
35472 _ACEOF
35473 case "$host_os" in
35474 aix*) gl_absname_cpp="$ac_cpp -C" ;;
35475 *) gl_absname_cpp="$ac_cpp" ;;
35476 esac
35477
35478 case "$host_os" in
35479 mingw*)
35480 gl_dirsep_regex='[/\\]'
35481 ;;
35482 *)
35483 gl_dirsep_regex='\/'
35484 ;;
35485 esac
35486 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
35487 gl_header_literal_regex=`echo 'sysexits.h' \
35488 | sed -e "$gl_make_literal_regex_sed"`
35489 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
35490 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
35491 s|^/[^/]|//&|
35492 p
35493 q
35494 }'
35495
35496 gl_cv_absolute_sysexits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
35497 sed -n "$gl_absolute_header_sed"`
35498
35499 gl_header=$gl_cv_absolute_sysexits_h
35500 gl_cv_next_sysexits_h='"'$gl_header'"'
35501 else
35502 gl_cv_next_sysexits_h='<'sysexits.h'>'
35503 fi
35504
35505
35506 fi
35507 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sysexits_h" >&5
35508 printf "%s\n" "$gl_cv_next_sysexits_h" >&6; }
35509 fi
35510 NEXT_SYSEXITS_H=$gl_cv_next_sysexits_h
35511
35512 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
35513 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
35514 gl_next_as_first_directive='<'sysexits.h'>'
35515 else
35516 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
35517 gl_next_as_first_directive=$gl_cv_next_sysexits_h
35518 fi
35519 NEXT_AS_FIRST_DIRECTIVE_SYSEXITS_H=$gl_next_as_first_directive
35520
35521
35522
35523
35524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35525 /* end confdefs.h. */
35526 #include <sysexits.h>
35527 int
35528 main (void)
35529 {
35530 switch (0)
35531 {
35532 case EX_OK:
35533 case EX_USAGE:
35534 case EX_DATAERR:
35535 case EX_NOINPUT:
35536 case EX_NOUSER:
35537 case EX_NOHOST:
35538 case EX_UNAVAILABLE:
35539 case EX_SOFTWARE:
35540 case EX_OSERR:
35541 case EX_OSFILE:
35542 case EX_CANTCREAT:
35543 case EX_IOERR:
35544 case EX_TEMPFAIL:
35545 case EX_PROTOCOL:
35546 case EX_NOPERM:
35547 case EX_CONFIG:
35548 break;
35549 }
35550
35551 ;
35552 return 0;
35553 }
35554 _ACEOF
35555 if ac_fn_c_try_compile "$LINENO"
35556 then :
35557 GL_GENERATE_SYSEXITS_H=false
35558 else $as_nop
35559 GL_GENERATE_SYSEXITS_H=true
35560 fi
35561 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
35562 else
35563 HAVE_SYSEXITS_H=0
35564 GL_GENERATE_SYSEXITS_H=true
35565 fi
35566
35567
35568
35569
35570
35571
35572 case "$GL_GENERATE_SYSEXITS_H" in
35573 false) SYSEXITS_H='' ;;
35574 true)
35575 if test -z "$SYSEXITS_H"; then
35576 SYSEXITS_H="${gl_source_base_prefix}sysexits.h"
35577 fi
35578 ;;
35579 *) echo "*** GL_GENERATE_SYSEXITS_H is not set correctly" 1>&2; exit 1 ;;
35580 esac
35581
35582
35583 if $GL_GENERATE_SYSEXITS_H; then
35584 GL_GENERATE_SYSEXITS_H_TRUE=
35585 GL_GENERATE_SYSEXITS_H_FALSE='#'
35586 else
35587 GL_GENERATE_SYSEXITS_H_TRUE='#'
35588 GL_GENERATE_SYSEXITS_H_FALSE=
35589 fi
35590 :
35591 if test -z "${GL_GENERATE_SYSEXITS_H_TRUE}" && test -z "${GL_GENERATE_SYSEXITS_H_FALSE}"; then
35592 GL_GENERATE_SYSEXITS_H_TRUE='#'
35593 GL_GENERATE_SYSEXITS_H_FALSE='#'
35594 fi
35595
35596
35597
35598
35599
35600
35601
35602
35603
35604
35605
35606
35607
35608
35609
35610
35611
35612
35613
35614
35615
35616
35617
35618
35619
35620
35621 if { test "$HAVE_LIBUNISTRING" != yes \
35622 || {
35623
35624
35625
35626 test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
35627 || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
35628 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
35629 || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
35630 && test $LIBUNISTRING_VERSION_SUBMINOR -lt 11
35631 }
35632 }
35633 }
35634
35635
35636
35637
35638 }
35639 }; then
35640 if test -z "$LIBUNISTRING_UNITYPES_H"; then
35641 LIBUNISTRING_UNITYPES_H="${gl_source_base_prefix}unitypes.h"
35642 fi
35643 else
35644 LIBUNISTRING_UNITYPES_H=
35645 fi
35646
35647
35648
35649
35650
35651
35652 if { test "$HAVE_LIBUNISTRING" != yes \
35653 || {
35654
35655
35656
35657 test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
35658 || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
35659 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
35660 || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
35661 && test $LIBUNISTRING_VERSION_SUBMINOR -lt 11
35662 }
35663 }
35664 }
35665
35666
35667
35668
35669 }
35670 }; then
35671 if test -z "$LIBUNISTRING_UNIWIDTH_H"; then
35672 LIBUNISTRING_UNIWIDTH_H="${gl_source_base_prefix}uniwidth.h"
35673 fi
35674 else
35675 LIBUNISTRING_UNIWIDTH_H=
35676 fi
35677
35678
35679
35680
35681
35682
35683 if { test "$HAVE_LIBUNISTRING" != yes \
35684 || {
35685
35686
35687
35688 test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
35689 || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
35690 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
35691 || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
35692 && test $LIBUNISTRING_VERSION_SUBMINOR -lt 11
35693 }
35694 }
35695 }
35696
35697
35698
35699
35700 }
35701 }; then
35702 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE=
35703 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE='#'
35704 else
35705 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE='#'
35706 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE=
35707 fi
35708 :
35709 if test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE}"; then
35710 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE='#'
35711 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE='#'
35712 fi
35713
35714
35715
35716 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for variable-length arrays" >&5
35717 printf %s "checking for variable-length arrays... " >&6; }
35718 if test ${ac_cv_c_vararrays+y}
35719 then :
35720 printf %s "(cached) " >&6
35721 else $as_nop
35722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35723 /* end confdefs.h. */
35724 #ifdef __STDC_NO_VLA__
35725 defined
35726 #endif
35727
35728 _ACEOF
35729 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
35730 $EGREP "defined" >/dev/null 2>&1
35731 then :
35732 ac_cv_c_vararrays='no: __STDC_NO_VLA__ is defined'
35733 else $as_nop
35734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35735 /* end confdefs.h. */
35736 /* Test for VLA support. This test is partly inspired
35737 from examples in the C standard. Use at least two VLA
35738 functions to detect the GCC 3.4.3 bug described in:
35739 https://lists.gnu.org/archive/html/bug-gnulib/2014-08/msg00014.html
35740 */
35741 #ifdef __STDC_NO_VLA__
35742 syntax error;
35743 #else
35744 extern int n;
35745 int B[100];
35746 int fvla (int m, int C[m][m]);
35747
35748 int
35749 simple (int count, int all[static count])
35750 {
35751 return all[count - 1];
35752 }
35753
35754 int
35755 fvla (int m, int C[m][m])
35756 {
35757 typedef int VLA[m][m];
35758 VLA x;
35759 int D[m];
35760 static int (*q)[m] = &B;
35761 int (*s)[n] = q;
35762 return C && &x[0][0] == &D[0] && &D[0] == s[0];
35763 }
35764 #endif
35765
35766 int
35767 main (void)
35768 {
35769
35770 ;
35771 return 0;
35772 }
35773 _ACEOF
35774 if ac_fn_c_try_compile "$LINENO"
35775 then :
35776 ac_cv_c_vararrays=yes
35777 else $as_nop
35778 ac_cv_c_vararrays=no
35779 fi
35780 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
35781 fi
35782 rm -rf conftest*
35783
35784 fi
35785 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_vararrays" >&5
35786 printf "%s\n" "$ac_cv_c_vararrays" >&6; }
35787 if test "$ac_cv_c_vararrays" = yes; then
35788
35789 printf "%s\n" "#define HAVE_C_VARARRAYS 1" >>confdefs.h
35790
35791 elif test "$ac_cv_c_vararrays" = no; then
35792
35793 printf "%s\n" "#define __STDC_NO_VLA__ 1" >>confdefs.h
35794
35795 fi
35796
35797
35798
35799
35800 if test $ac_cv_func_vasnprintf = no; then
35801
35802
35803
35804
35805
35806
35807
35808
35809
35810
35811 gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
35812
35813
35814
35815
35816
35817
35818
35819
35820
35821 gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
35822
35823
35824
35825
35826
35827
35828
35829
35830
35831 gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
35832
35833
35834
35835
35836
35837
35838
35839
35840
35841 gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
35842
35843 if test $ac_cv_func_vasnprintf = yes; then
35844
35845 printf "%s\n" "#define REPLACE_VASNPRINTF 1" >>confdefs.h
35846
35847 fi
35848
35849
35850
35851
35852
35853
35854
35855
35856
35857 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
35858 if test "x$ac_cv_type_ptrdiff_t" = xyes
35859 then :
35860
35861 else $as_nop
35862
35863 printf "%s\n" "#define ptrdiff_t long" >>confdefs.h
35864
35865
35866 fi
35867
35868
35869
35870
35871
35872
35873
35874 fi
35875
35876
35877
35878 gl_cv_func_vsnprintf_usable=no
35879 ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
35880 if test "x$ac_cv_func_vsnprintf" = xyes
35881 then :
35882 printf "%s\n" "#define HAVE_VSNPRINTF 1" >>confdefs.h
35883
35884 fi
35885
35886 if test $ac_cv_func_vsnprintf = yes; then
35887
35888
35889
35890 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5
35891 printf %s "checking whether snprintf respects a size of 1... " >&6; }
35892 if test ${gl_cv_func_snprintf_size1+y}
35893 then :
35894 printf %s "(cached) " >&6
35895 else $as_nop
35896
35897 if test "$cross_compiling" = yes
35898 then :
35899 case "$host_os" in
35900 # Guess yes on Android.
35901 linux*-android*) gl_cv_func_snprintf_size1="guessing yes" ;;
35902 # Guess yes on native Windows.
35903 mingw*) gl_cv_func_snprintf_size1="guessing yes" ;;
35904 *) gl_cv_func_snprintf_size1="guessing yes" ;;
35905 esac
35906
35907 else $as_nop
35908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35909 /* end confdefs.h. */
35910
35911 #include <stdio.h>
35912 #if HAVE_SNPRINTF
35913 # define my_snprintf snprintf
35914 #else
35915 # include <stdarg.h>
35916 static int my_snprintf (char *buf, int size, const char *format, ...)
35917 {
35918 va_list args;
35919 int ret;
35920 va_start (args, format);
35921 ret = vsnprintf (buf, size, format, args);
35922 va_end (args);
35923 return ret;
35924 }
35925 #endif
35926 int main()
35927 {
35928 static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
35929 my_snprintf (buf, 1, "%d", 12345);
35930 return buf[1] != 'E';
35931 }
35932 _ACEOF
35933 if ac_fn_c_try_run "$LINENO"
35934 then :
35935 gl_cv_func_snprintf_size1=yes
35936 else $as_nop
35937 gl_cv_func_snprintf_size1=no
35938 fi
35939 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35940 conftest.$ac_objext conftest.beam conftest.$ac_ext
35941 fi
35942
35943
35944 fi
35945 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5
35946 printf "%s\n" "$gl_cv_func_snprintf_size1" >&6; }
35947
35948 case "$gl_cv_func_snprintf_size1" in
35949 *yes)
35950
35951 case "$gl_cv_func_snprintf_retval_c99" in
35952 *yes)
35953
35954
35955 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
35956 printf %s "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
35957 if test ${gl_cv_func_printf_positions+y}
35958 then :
35959 printf %s "(cached) " >&6
35960 else $as_nop
35961
35962 if test "$cross_compiling" = yes
35963 then :
35964
35965 case "$host_os" in
35966 netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
35967 gl_cv_func_printf_positions="guessing no";;
35968 beos*) gl_cv_func_printf_positions="guessing no";;
35969 # Guess yes on Android.
35970 linux*-android*) gl_cv_func_printf_positions="guessing yes";;
35971 # Guess no on native Windows.
35972 mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
35973 *) gl_cv_func_printf_positions="guessing yes";;
35974 esac
35975
35976 else $as_nop
35977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35978 /* end confdefs.h. */
35979
35980 #include <stdio.h>
35981 #include <string.h>
35982 /* The string "%2$d %1$d", with dollar characters protected from the shell's
35983 dollar expansion (possibly an autoconf bug). */
35984 static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
35985 static char buf[100];
35986 int main ()
35987 {
35988 sprintf (buf, format, 33, 55);
35989 return (strcmp (buf, "55 33") != 0);
35990 }
35991 _ACEOF
35992 if ac_fn_c_try_run "$LINENO"
35993 then :
35994 gl_cv_func_printf_positions=yes
35995 else $as_nop
35996 gl_cv_func_printf_positions=no
35997 fi
35998 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35999 conftest.$ac_objext conftest.beam conftest.$ac_ext
36000 fi
36001
36002
36003 fi
36004 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
36005 printf "%s\n" "$gl_cv_func_printf_positions" >&6; }
36006
36007 case "$gl_cv_func_printf_positions" in
36008 *yes)
36009 gl_cv_func_vsnprintf_usable=yes
36010 ;;
36011 esac
36012 ;;
36013 esac
36014 ;;
36015 esac
36016 fi
36017 if test $gl_cv_func_vsnprintf_usable = no; then
36018
36019
36020
36021
36022
36023
36024
36025
36026
36027
36028 gl_LIBOBJS="$gl_LIBOBJS vsnprintf.$ac_objext"
36029
36030 if test $ac_cv_func_vsnprintf = yes; then
36031 REPLACE_VSNPRINTF=1
36032 else
36033
36034 if test $ac_cv_have_decl_vsnprintf = yes; then
36035 REPLACE_VSNPRINTF=1
36036 fi
36037 fi
36038 :
36039
36040 fi
36041
36042 if test $ac_cv_have_decl_vsnprintf = no; then
36043 HAVE_DECL_VSNPRINTF=0
36044 fi
36045
36046
36047
36048
36049
36050
36051
36052
36053
36054
36055 GL_GNULIB_VSNPRINTF=1
36056
36057
36058
36059
36060
36061 printf "%s\n" "#define GNULIB_TEST_VSNPRINTF 1" >>confdefs.h
36062
36063
36064
36065
36066
36067
36068
36069
36070
36071
36072
36073
36074
36075
36076
36077
36078
36079
36080
36081
36082
36083
36084
36085
36086
36087
36088 if case "$host_os" in
36089 mingw*) true ;;
36090 *) test $ac_cv_func_mbsinit = yes ;;
36091 esac \
36092 && test $ac_cv_func_mbrtowc = yes; then
36093
36094
36095
36096
36097 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
36098 printf %s "checking whether mbrtowc handles incomplete characters... " >&6; }
36099 if test ${gl_cv_func_mbrtowc_incomplete_state+y}
36100 then :
36101 printf %s "(cached) " >&6
36102 else $as_nop
36103
36104 case "$host_os" in
36105 # Guess no on AIX and OSF/1.
36106 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
36107 # Guess yes otherwise.
36108 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
36109 esac
36110 if test $LOCALE_JA != none; then
36111 if test "$cross_compiling" = yes
36112 then :
36113 :
36114 else $as_nop
36115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36116 /* end confdefs.h. */
36117
36118 #include <locale.h>
36119 #include <string.h>
36120 #include <wchar.h>
36121 int main ()
36122 {
36123 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
36124 {
36125 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
36126 mbstate_t state;
36127 wchar_t wc;
36128
36129 memset (&state, '\0', sizeof (mbstate_t));
36130 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
36131 if (mbsinit (&state))
36132 return 2;
36133 }
36134 return 0;
36135 }
36136 _ACEOF
36137 if ac_fn_c_try_run "$LINENO"
36138 then :
36139 gl_cv_func_mbrtowc_incomplete_state=yes
36140 else $as_nop
36141 gl_cv_func_mbrtowc_incomplete_state=no
36142 fi
36143 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36144 conftest.$ac_objext conftest.beam conftest.$ac_ext
36145 fi
36146
36147 else
36148 if test $LOCALE_FR_UTF8 != none; then
36149 if test "$cross_compiling" = yes
36150 then :
36151 :
36152 else $as_nop
36153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36154 /* end confdefs.h. */
36155
36156 #include <locale.h>
36157 #include <string.h>
36158 #include <wchar.h>
36159 int main ()
36160 {
36161 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
36162 {
36163 const char input[] = "B\303\274\303\237er"; /* "Büßer" */
36164 mbstate_t state;
36165 wchar_t wc;
36166
36167 memset (&state, '\0', sizeof (mbstate_t));
36168 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
36169 if (mbsinit (&state))
36170 return 2;
36171 }
36172 return 0;
36173 }
36174 _ACEOF
36175 if ac_fn_c_try_run "$LINENO"
36176 then :
36177 gl_cv_func_mbrtowc_incomplete_state=yes
36178 else $as_nop
36179 gl_cv_func_mbrtowc_incomplete_state=no
36180 fi
36181 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36182 conftest.$ac_objext conftest.beam conftest.$ac_ext
36183 fi
36184
36185 fi
36186 fi
36187
36188 fi
36189 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
36190 printf "%s\n" "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
36191
36192
36193
36194
36195 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
36196 printf %s "checking whether mbrtowc works as well as mbtowc... " >&6; }
36197 if test ${gl_cv_func_mbrtowc_sanitycheck+y}
36198 then :
36199 printf %s "(cached) " >&6
36200 else $as_nop
36201
36202 case "$host_os" in
36203 # Guess no on Solaris 8.
36204 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
36205 # Guess yes otherwise.
36206 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
36207 esac
36208 if test $LOCALE_ZH_CN != none; then
36209 if test "$cross_compiling" = yes
36210 then :
36211 :
36212 else $as_nop
36213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36214 /* end confdefs.h. */
36215
36216 #include <locale.h>
36217 #include <stdlib.h>
36218 #include <string.h>
36219 #include <wchar.h>
36220 int main ()
36221 {
36222 /* This fails on Solaris 8:
36223 mbrtowc returns 2, and sets wc to 0x00F0.
36224 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
36225 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
36226 {
36227 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
36228 mbstate_t state;
36229 wchar_t wc;
36230
36231 memset (&state, '\0', sizeof (mbstate_t));
36232 if (mbrtowc (&wc, input + 3, 6, &state) != 4
36233 && mbtowc (&wc, input + 3, 6) == 4)
36234 return 2;
36235 }
36236 return 0;
36237 }
36238 _ACEOF
36239 if ac_fn_c_try_run "$LINENO"
36240 then :
36241 gl_cv_func_mbrtowc_sanitycheck=yes
36242 else $as_nop
36243 gl_cv_func_mbrtowc_sanitycheck=no
36244 fi
36245 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36246 conftest.$ac_objext conftest.beam conftest.$ac_ext
36247 fi
36248
36249 fi
36250
36251 fi
36252 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
36253 printf "%s\n" "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
36254
36255 REPLACE_MBSTATE_T=0
36256 case "$gl_cv_func_mbrtowc_incomplete_state" in
36257 *yes) ;;
36258 *) REPLACE_MBSTATE_T=1 ;;
36259 esac
36260 case "$gl_cv_func_mbrtowc_sanitycheck" in
36261 *yes) ;;
36262 *) REPLACE_MBSTATE_T=1 ;;
36263 esac
36264 else
36265 REPLACE_MBSTATE_T=1
36266 fi
36267
36268
36269
36270 if test $ac_cv_func_wcrtomb = no; then
36271 HAVE_WCRTOMB=0
36272 ac_fn_check_decl "$LINENO" "wcrtomb" "ac_cv_have_decl_wcrtomb" "
36273 #include <wchar.h>
36274
36275 " "$ac_c_undeclared_builtin_options" "CFLAGS"
36276 if test "x$ac_cv_have_decl_wcrtomb" = xyes
36277 then :
36278 ac_have_decl=1
36279 else $as_nop
36280 ac_have_decl=0
36281 fi
36282 printf "%s\n" "#define HAVE_DECL_WCRTOMB $ac_have_decl" >>confdefs.h
36283
36284 if test $ac_cv_have_decl_wcrtomb = yes; then
36285 REPLACE_WCRTOMB=1
36286 fi
36287 else
36288 if test $REPLACE_WCRTOMB = 0; then
36289
36290
36291
36292
36293
36294 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb works in the C locale" >&5
36295 printf %s "checking whether wcrtomb works in the C locale... " >&6; }
36296 if test ${gl_cv_func_wcrtomb_works+y}
36297 then :
36298 printf %s "(cached) " >&6
36299 else $as_nop
36300 if test "$cross_compiling" = yes
36301 then :
36302 case "$host_os" in
36303 # Guess no on Android.
36304 linux*-android*) gl_cv_func_wcrtomb_works="guessing no";;
36305 # Guess yes otherwise.
36306 *) gl_cv_func_wcrtomb_works="guessing yes";;
36307 esac
36308
36309 else $as_nop
36310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36311 /* end confdefs.h. */
36312
36313 #include <string.h>
36314 #include <stdlib.h>
36315 #include <wchar.h>
36316 int main ()
36317 {
36318 mbstate_t state;
36319 char out[64];
36320 int count;
36321 memset (&state, 0, sizeof (state));
36322 out[0] = 'x';
36323 count = wcrtomb (out, L'a', &state);
36324 return !(count == 1 && out[0] == 'a');
36325 }
36326 _ACEOF
36327 if ac_fn_c_try_run "$LINENO"
36328 then :
36329 gl_cv_func_wcrtomb_works=yes
36330 else $as_nop
36331 gl_cv_func_wcrtomb_works=no
36332 fi
36333 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36334 conftest.$ac_objext conftest.beam conftest.$ac_ext
36335 fi
36336
36337
36338 fi
36339 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_works" >&5
36340 printf "%s\n" "$gl_cv_func_wcrtomb_works" >&6; }
36341 case "$gl_cv_func_wcrtomb_works" in
36342 *yes) ;;
36343 *)
36344 printf "%s\n" "#define WCRTOMB_C_LOCALE_BUG 1" >>confdefs.h
36345
36346 REPLACE_WCRTOMB=1 ;;
36347 esac
36348 fi
36349 if test $REPLACE_WCRTOMB = 0; then
36350 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb return value is correct" >&5
36351 printf %s "checking whether wcrtomb return value is correct... " >&6; }
36352 if test ${gl_cv_func_wcrtomb_retval+y}
36353 then :
36354 printf %s "(cached) " >&6
36355 else $as_nop
36356
36357 case "$host_os" in
36358 # Guess no on AIX 4, OSF/1, Solaris, native Windows.
36359 aix4* | osf* | solaris* | mingw*) gl_cv_func_wcrtomb_retval="guessing no" ;;
36360 # Guess yes otherwise.
36361 *) gl_cv_func_wcrtomb_retval="guessing yes" ;;
36362 esac
36363 if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
36364 if test "$cross_compiling" = yes
36365 then :
36366 :
36367 else $as_nop
36368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36369 /* end confdefs.h. */
36370
36371 #include <locale.h>
36372 #include <string.h>
36373 #include <wchar.h>
36374 #include <stdlib.h>
36375 int main ()
36376 {
36377 int result = 0;
36378 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
36379 {
36380 if (wcrtomb (NULL, 0, NULL) != 1)
36381 result |= 1;
36382 }
36383 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
36384 {
36385 if (wcrtomb (NULL, 0, NULL) != 1)
36386 result |= 2;
36387 {
36388 wchar_t wc = (wchar_t) 0xBADFACE;
36389 if (mbtowc (&wc, "\303\274", 2) == 2)
36390 if (wcrtomb (NULL, wc, NULL) != 1)
36391 result |= 2;
36392 }
36393 }
36394 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
36395 {
36396 if (wcrtomb (NULL, 0, NULL) != 1)
36397 result |= 4;
36398 }
36399 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
36400 {
36401 if (wcrtomb (NULL, 0, NULL) != 1)
36402 result |= 8;
36403 }
36404 return result;
36405 }
36406 _ACEOF
36407 if ac_fn_c_try_run "$LINENO"
36408 then :
36409 gl_cv_func_wcrtomb_retval=yes
36410 else $as_nop
36411 gl_cv_func_wcrtomb_retval=no
36412 fi
36413 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36414 conftest.$ac_objext conftest.beam conftest.$ac_ext
36415 fi
36416
36417 fi
36418
36419 fi
36420 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_retval" >&5
36421 printf "%s\n" "$gl_cv_func_wcrtomb_retval" >&6; }
36422 case "$gl_cv_func_wcrtomb_retval" in
36423 *yes) ;;
36424 *)
36425 printf "%s\n" "#define WCRTOMB_RETVAL_BUG 1" >>confdefs.h
36426
36427 REPLACE_WCRTOMB=1 ;;
36428 esac
36429 fi
36430 fi
36431
36432
36433 if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then
36434 GL_COND_OBJ_WCRTOMB_TRUE=
36435 GL_COND_OBJ_WCRTOMB_FALSE='#'
36436 else
36437 GL_COND_OBJ_WCRTOMB_TRUE='#'
36438 GL_COND_OBJ_WCRTOMB_FALSE=
36439 fi
36440 :
36441 if test -z "${GL_COND_OBJ_WCRTOMB_TRUE}" && test -z "${GL_COND_OBJ_WCRTOMB_FALSE}"; then
36442 GL_COND_OBJ_WCRTOMB_TRUE='#'
36443 GL_COND_OBJ_WCRTOMB_FALSE='#'
36444 fi
36445
36446 if test -z "$GL_COND_OBJ_WCRTOMB_TRUE"; then :
36447
36448
36449 :
36450
36451
36452 fi
36453
36454
36455
36456
36457
36458
36459
36460
36461
36462
36463
36464
36465
36466
36467 GL_GNULIB_WCRTOMB=1
36468
36469
36470
36471
36472
36473 printf "%s\n" "#define GNULIB_TEST_WCRTOMB 1" >>confdefs.h
36474
36475
36476
36477
36478
36479
36480
36481
36482
36483
36484
36485
36486
36487
36488
36489
36490
36491
36492
36493
36494
36495 ac_fn_check_decl "$LINENO" "wcwidth" "ac_cv_have_decl_wcwidth" "
36496 #include <wchar.h>
36497
36498 " "$ac_c_undeclared_builtin_options" "CFLAGS"
36499 if test "x$ac_cv_have_decl_wcwidth" = xyes
36500 then :
36501 ac_have_decl=1
36502 else $as_nop
36503 ac_have_decl=0
36504 fi
36505 printf "%s\n" "#define HAVE_DECL_WCWIDTH $ac_have_decl" >>confdefs.h
36506
36507 if test $ac_cv_have_decl_wcwidth != yes; then
36508 HAVE_DECL_WCWIDTH=0
36509 fi
36510
36511 if test $ac_cv_func_wcwidth != yes; then
36512 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wcwidth is a macro" >&5
36513 printf %s "checking whether wcwidth is a macro... " >&6; }
36514 if test ${gl_cv_func_wcwidth_macro+y}
36515 then :
36516 printf %s "(cached) " >&6
36517 else $as_nop
36518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36519 /* end confdefs.h. */
36520
36521 #include <wchar.h>
36522 #ifdef wcwidth
36523 wchar_header_defines_wcwidth
36524 #endif
36525 _ACEOF
36526 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
36527 $EGREP "wchar_header_defines_wcwidth" >/dev/null 2>&1
36528 then :
36529 gl_cv_func_wcwidth_macro=yes
36530 else $as_nop
36531 gl_cv_func_wcwidth_macro=no
36532 fi
36533 rm -rf conftest*
36534
36535
36536 fi
36537 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcwidth_macro" >&5
36538 printf "%s\n" "$gl_cv_func_wcwidth_macro" >&6; }
36539 fi
36540
36541 if test $ac_cv_func_wcwidth = yes || test $gl_cv_func_wcwidth_macro = yes; then
36542 HAVE_WCWIDTH=1
36543 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wcwidth works reasonably in UTF-8 locales" >&5
36544 printf %s "checking whether wcwidth works reasonably in UTF-8 locales... " >&6; }
36545 if test ${gl_cv_func_wcwidth_works+y}
36546 then :
36547 printf %s "(cached) " >&6
36548 else $as_nop
36549
36550 if test "$cross_compiling" = yes
36551 then :
36552
36553 case "$host_os" in
36554 # Guess yes on glibc systems.
36555 *-gnu* | gnu*) gl_cv_func_wcwidth_works="guessing yes";;
36556 # Guess yes on musl systems.
36557 *-musl*) gl_cv_func_wcwidth_works="guessing yes";;
36558 # Guess yes on AIX 7 systems.
36559 aix[7-9]*) gl_cv_func_wcwidth_works="guessing yes";;
36560 *) gl_cv_func_wcwidth_works="$gl_cross_guess_normal";;
36561 esac
36562
36563 else $as_nop
36564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36565 /* end confdefs.h. */
36566
36567 #include <locale.h>
36568 #include <wchar.h>
36569 #if !HAVE_DECL_WCWIDTH
36570 extern
36571 # ifdef __cplusplus
36572 "C"
36573 # endif
36574 int wcwidth (int);
36575 #endif
36576 int main ()
36577 {
36578 int result = 0;
36579 if (setlocale (LC_ALL, "en_US.UTF-8") != NULL)
36580 {
36581 if (wcwidth (0x0301) > 0)
36582 result |= 1;
36583 if (wcwidth (0x05B0) > 0)
36584 result |= 2;
36585 if (wcwidth (0x200B) > 0)
36586 result |= 4;
36587 if (wcwidth (0xFF1A) == 0)
36588 result |= 8;
36589 if (wcwidth (0x2202) > 1)
36590 result |= 16;
36591 }
36592 return result;
36593 }
36594 _ACEOF
36595 if ac_fn_c_try_run "$LINENO"
36596 then :
36597 gl_cv_func_wcwidth_works=yes
36598 else $as_nop
36599 gl_cv_func_wcwidth_works=no
36600 fi
36601 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36602 conftest.$ac_objext conftest.beam conftest.$ac_ext
36603 fi
36604
36605
36606 fi
36607 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcwidth_works" >&5
36608 printf "%s\n" "$gl_cv_func_wcwidth_works" >&6; }
36609 case "$gl_cv_func_wcwidth_works" in
36610 *yes) ;;
36611 *no) REPLACE_WCWIDTH=1 ;;
36612 esac
36613 else
36614 HAVE_WCWIDTH=0
36615 fi
36616
36617
36618 if test $HAVE_WCWIDTH = 0 || test $REPLACE_WCWIDTH = 1; then
36619 GL_COND_OBJ_WCWIDTH_TRUE=
36620 GL_COND_OBJ_WCWIDTH_FALSE='#'
36621 else
36622 GL_COND_OBJ_WCWIDTH_TRUE='#'
36623 GL_COND_OBJ_WCWIDTH_FALSE=
36624 fi
36625 :
36626 if test -z "${GL_COND_OBJ_WCWIDTH_TRUE}" && test -z "${GL_COND_OBJ_WCWIDTH_FALSE}"; then
36627 GL_COND_OBJ_WCWIDTH_TRUE='#'
36628 GL_COND_OBJ_WCWIDTH_FALSE='#'
36629 fi
36630
36631 if test -z "$GL_COND_OBJ_WCWIDTH_TRUE"; then :
36632
36633
36634
36635 :
36636
36637
36638 fi
36639
36640
36641
36642
36643
36644
36645
36646
36647
36648
36649
36650
36651
36652
36653 GL_GNULIB_WCWIDTH=1
36654
36655
36656
36657
36658
36659 printf "%s\n" "#define GNULIB_TEST_WCWIDTH 1" >>confdefs.h
36660
36661
36662
36663
36664
36665 if case "$host_os" in mingw*) true;; *) false;; esac; then
36666 GL_COND_OBJ_WINDOWS_MUTEX_TRUE=
36667 GL_COND_OBJ_WINDOWS_MUTEX_FALSE='#'
36668 else
36669 GL_COND_OBJ_WINDOWS_MUTEX_TRUE='#'
36670 GL_COND_OBJ_WINDOWS_MUTEX_FALSE=
36671 fi
36672 :
36673 if test -z "${GL_COND_OBJ_WINDOWS_MUTEX_TRUE}" && test -z "${GL_COND_OBJ_WINDOWS_MUTEX_FALSE}"; then
36674 GL_COND_OBJ_WINDOWS_MUTEX_TRUE='#'
36675 GL_COND_OBJ_WINDOWS_MUTEX_FALSE='#'
36676 fi
36677
36678
36679
36680 if case "$host_os" in mingw*) true;; *) false;; esac; then
36681 GL_COND_OBJ_WINDOWS_ONCE_TRUE=
36682 GL_COND_OBJ_WINDOWS_ONCE_FALSE='#'
36683 else
36684 GL_COND_OBJ_WINDOWS_ONCE_TRUE='#'
36685 GL_COND_OBJ_WINDOWS_ONCE_FALSE=
36686 fi
36687 :
36688 if test -z "${GL_COND_OBJ_WINDOWS_ONCE_TRUE}" && test -z "${GL_COND_OBJ_WINDOWS_ONCE_FALSE}"; then
36689 GL_COND_OBJ_WINDOWS_ONCE_TRUE='#'
36690 GL_COND_OBJ_WINDOWS_ONCE_FALSE='#'
36691 fi
36692
36693
36694
36695 if case "$host_os" in mingw*) true;; *) false;; esac; then
36696 GL_COND_OBJ_WINDOWS_RECMUTEX_TRUE=
36697 GL_COND_OBJ_WINDOWS_RECMUTEX_FALSE='#'
36698 else
36699 GL_COND_OBJ_WINDOWS_RECMUTEX_TRUE='#'
36700 GL_COND_OBJ_WINDOWS_RECMUTEX_FALSE=
36701 fi
36702 :
36703 if test -z "${GL_COND_OBJ_WINDOWS_RECMUTEX_TRUE}" && test -z "${GL_COND_OBJ_WINDOWS_RECMUTEX_FALSE}"; then
36704 GL_COND_OBJ_WINDOWS_RECMUTEX_TRUE='#'
36705 GL_COND_OBJ_WINDOWS_RECMUTEX_FALSE='#'
36706 fi
36707
36708
36709
36710 if case "$host_os" in mingw*) true;; *) false;; esac; then
36711 GL_COND_OBJ_WINDOWS_RWLOCK_TRUE=
36712 GL_COND_OBJ_WINDOWS_RWLOCK_FALSE='#'
36713 else
36714 GL_COND_OBJ_WINDOWS_RWLOCK_TRUE='#'
36715 GL_COND_OBJ_WINDOWS_RWLOCK_FALSE=
36716 fi
36717 :
36718 if test -z "${GL_COND_OBJ_WINDOWS_RWLOCK_TRUE}" && test -z "${GL_COND_OBJ_WINDOWS_RWLOCK_FALSE}"; then
36719 GL_COND_OBJ_WINDOWS_RWLOCK_TRUE='#'
36720 GL_COND_OBJ_WINDOWS_RWLOCK_FALSE='#'
36721 fi
36722
36723
36724
36725 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wmemchr" >&5
36726 printf %s "checking for wmemchr... " >&6; }
36727 if test ${gl_cv_func_wmemchr+y}
36728 then :
36729 printf %s "(cached) " >&6
36730 else $as_nop
36731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36732 /* end confdefs.h. */
36733 #include <wchar.h>
36734
36735 int
36736 main (void)
36737 {
36738 return ! wmemchr ((const wchar_t *) 0, (wchar_t) ' ', 0);
36739 ;
36740 return 0;
36741 }
36742
36743 _ACEOF
36744 if ac_fn_c_try_link "$LINENO"
36745 then :
36746 gl_cv_func_wmemchr=yes
36747 else $as_nop
36748 gl_cv_func_wmemchr=no
36749 fi
36750 rm -f core conftest.err conftest.$ac_objext conftest.beam \
36751 conftest$ac_exeext conftest.$ac_ext
36752
36753 fi
36754 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wmemchr" >&5
36755 printf "%s\n" "$gl_cv_func_wmemchr" >&6; }
36756 if test $gl_cv_func_wmemchr = no; then
36757 HAVE_WMEMCHR=0
36758 fi
36759
36760
36761 if test $HAVE_WMEMCHR = 0; then
36762 GL_COND_OBJ_WMEMCHR_TRUE=
36763 GL_COND_OBJ_WMEMCHR_FALSE='#'
36764 else
36765 GL_COND_OBJ_WMEMCHR_TRUE='#'
36766 GL_COND_OBJ_WMEMCHR_FALSE=
36767 fi
36768 :
36769 if test -z "${GL_COND_OBJ_WMEMCHR_TRUE}" && test -z "${GL_COND_OBJ_WMEMCHR_FALSE}"; then
36770 GL_COND_OBJ_WMEMCHR_TRUE='#'
36771 GL_COND_OBJ_WMEMCHR_FALSE='#'
36772 fi
36773
36774
36775
36776
36777
36778
36779
36780
36781
36782
36783
36784
36785
36786
36787
36788 GL_GNULIB_WMEMCHR=1
36789
36790
36791
36792
36793
36794 printf "%s\n" "#define GNULIB_TEST_WMEMCHR 1" >>confdefs.h
36795
36796
36797
36798
36799
36800
36801
36802
36803
36804
36805
36806 if test $ac_cv_func_wmempcpy = no; then
36807 HAVE_WMEMPCPY=0
36808 fi
36809
36810
36811 if test $HAVE_WMEMPCPY = 0; then
36812 GL_COND_OBJ_WMEMPCPY_TRUE=
36813 GL_COND_OBJ_WMEMPCPY_FALSE='#'
36814 else
36815 GL_COND_OBJ_WMEMPCPY_TRUE='#'
36816 GL_COND_OBJ_WMEMPCPY_FALSE=
36817 fi
36818 :
36819 if test -z "${GL_COND_OBJ_WMEMPCPY_TRUE}" && test -z "${GL_COND_OBJ_WMEMPCPY_FALSE}"; then
36820 GL_COND_OBJ_WMEMPCPY_TRUE='#'
36821 GL_COND_OBJ_WMEMPCPY_FALSE='#'
36822 fi
36823
36824
36825
36826
36827
36828
36829
36830
36831
36832
36833
36834
36835
36836
36837
36838 GL_GNULIB_WMEMPCPY=1
36839
36840
36841
36842
36843
36844 printf "%s\n" "#define GNULIB_TEST_WMEMPCPY 1" >>confdefs.h
36845
36846
36847
36848
36849
36850 ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
36851 if test "x$ac_cv_header_stdint_h" = xyes
36852 then :
36853 printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h
36854
36855 fi
36856
36857
36858 # End of code from modules
36859
36860
36861
36862
36863
36864
36865
36866
36867
36868
36869
36870 gltests_libdeps=
36871 gltests_ltlibdeps=
36872
36873
36874
36875
36876
36877
36878
36879
36880
36881
36882
36883
36884 gl_source_base='tests'
36885 gl_source_base_prefix=
36886 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
36887
36888 gl_module_indicator_condition=$gltests_WITNESS
36889
36890
36891
36892
36893
36894
36895
36896
36897
36898
36899
36900
36901 LIBGNU_LIBDEPS="$gl_libdeps"
36902
36903 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
36904
36905
36906
36907 WARN_FLAGS="-Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmissing-braces -Wmissing-format-attribute -Wmultichar -Wparentheses -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wswitch -Wtrigraphs -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -Wwrite-strings -Wnested-externs -Wstrict-prototypes"
36908 EXTRA_WARN_FLAGS="-Wextra -Wattributes -Wendif-labels -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmissing-field-initializers -Wnonnull -Woverflow -Wvla -Wpointer-to-int-cast -Wstrict-aliasing -Wvariadic-macros -Wvolatile-register-var -Wpointer-sign -Wmissing-include-dirs -Wmissing-prototypes -Wmissing-declarations -Wformat=2"
36909
36910 HOST_CFLAGS="$HOST_CFLAGS $WARN_FLAGS -Wcast-align"
36911
36912 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which extra warnings work" >&5
36913 printf %s "checking which extra warnings work... " >&6; }
36914 if test ${grub_cv_cc_w_extra_flags+y}
36915 then :
36916 printf %s "(cached) " >&6
36917 else $as_nop
36918
36919 SAVED_CFLAGS="$CFLAGS"
36920 grub_cv_cc_w_extra_flags=
36921 for x in $EXTRA_WARN_FLAGS; do
36922 CFLAGS="$HOST_CFLAGS $x -Werror"
36923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36924 /* end confdefs.h. */
36925
36926 int
36927 main (void)
36928 {
36929
36930 ;
36931 return 0;
36932 }
36933 _ACEOF
36934 if ac_fn_c_try_link "$LINENO"
36935 then :
36936 flag=1
36937 else $as_nop
36938 flag=0
36939 fi
36940 rm -f core conftest.err conftest.$ac_objext conftest.beam \
36941 conftest$ac_exeext conftest.$ac_ext
36942 if test x$flag = x1 ; then
36943 grub_cv_cc_w_extra_flags="$grub_cv_cc_w_extra_flags $x"
36944 fi
36945 done
36946 CFLAGS="$SAVED_CFLAGS"
36947
36948 fi
36949 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_cc_w_extra_flags" >&5
36950 printf "%s\n" "$grub_cv_cc_w_extra_flags" >&6; }
36951
36952 HOST_CFLAGS="$HOST_CFLAGS $grub_cv_cc_w_extra_flags"
36953
36954 #
36955 # Check for target programs.
36956 #
36957
36958 # Find tools for the target.
36959 if test "x$target_alias" != x && test "x$host_alias" != "x$target_alias"; then
36960 tmp_ac_tool_prefix="$ac_tool_prefix"
36961 ac_tool_prefix=$target_alias-
36962
36963 if test -n "$ac_tool_prefix"; then
36964 for ac_prog in gcc egcs cc
36965 do
36966 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36967 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36968 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36969 printf %s "checking for $ac_word... " >&6; }
36970 if test ${ac_cv_prog_TARGET_CC+y}
36971 then :
36972 printf %s "(cached) " >&6
36973 else $as_nop
36974 if test -n "$TARGET_CC"; then
36975 ac_cv_prog_TARGET_CC="$TARGET_CC" # Let the user override the test.
36976 else
36977 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36978 for as_dir in $PATH
36979 do
36980 IFS=$as_save_IFS
36981 case $as_dir in #(((
36982 '') as_dir=./ ;;
36983 */) ;;
36984 *) as_dir=$as_dir/ ;;
36985 esac
36986 for ac_exec_ext in '' $ac_executable_extensions; do
36987 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
36988 ac_cv_prog_TARGET_CC="$ac_tool_prefix$ac_prog"
36989 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
36990 break 2
36991 fi
36992 done
36993 done
36994 IFS=$as_save_IFS
36995
36996 fi
36997 fi
36998 TARGET_CC=$ac_cv_prog_TARGET_CC
36999 if test -n "$TARGET_CC"; then
37000 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $TARGET_CC" >&5
37001 printf "%s\n" "$TARGET_CC" >&6; }
37002 else
37003 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
37004 printf "%s\n" "no" >&6; }
37005 fi
37006
37007
37008 test -n "$TARGET_CC" && break
37009 done
37010 fi
37011 if test -z "$TARGET_CC"; then
37012 ac_ct_TARGET_CC=$TARGET_CC
37013 for ac_prog in gcc egcs cc
37014 do
37015 # Extract the first word of "$ac_prog", so it can be a program name with args.
37016 set dummy $ac_prog; ac_word=$2
37017 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37018 printf %s "checking for $ac_word... " >&6; }
37019 if test ${ac_cv_prog_ac_ct_TARGET_CC+y}
37020 then :
37021 printf %s "(cached) " >&6
37022 else $as_nop
37023 if test -n "$ac_ct_TARGET_CC"; then
37024 ac_cv_prog_ac_ct_TARGET_CC="$ac_ct_TARGET_CC" # Let the user override the test.
37025 else
37026 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37027 for as_dir in $PATH
37028 do
37029 IFS=$as_save_IFS
37030 case $as_dir in #(((
37031 '') as_dir=./ ;;
37032 */) ;;
37033 *) as_dir=$as_dir/ ;;
37034 esac
37035 for ac_exec_ext in '' $ac_executable_extensions; do
37036 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
37037 ac_cv_prog_ac_ct_TARGET_CC="$ac_prog"
37038 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
37039 break 2
37040 fi
37041 done
37042 done
37043 IFS=$as_save_IFS
37044
37045 fi
37046 fi
37047 ac_ct_TARGET_CC=$ac_cv_prog_ac_ct_TARGET_CC
37048 if test -n "$ac_ct_TARGET_CC"; then
37049 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_TARGET_CC" >&5
37050 printf "%s\n" "$ac_ct_TARGET_CC" >&6; }
37051 else
37052 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
37053 printf "%s\n" "no" >&6; }
37054 fi
37055
37056
37057 test -n "$ac_ct_TARGET_CC" && break
37058 done
37059
37060 if test "x$ac_ct_TARGET_CC" = x; then
37061 TARGET_CC="as_fn_error $? "none of gcc, egcs and cc is found. set TARGET_CC manually." "$LINENO" 5"
37062 else
37063 case $cross_compiling:$ac_tool_warned in
37064 yes:)
37065 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37066 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37067 ac_tool_warned=yes ;;
37068 esac
37069 TARGET_CC=$ac_ct_TARGET_CC
37070 fi
37071 fi
37072
37073 if test -n "$ac_tool_prefix"; then
37074 # Extract the first word of "${ac_tool_prefix}objcopy", so it can be a program name with args.
37075 set dummy ${ac_tool_prefix}objcopy; ac_word=$2
37076 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37077 printf %s "checking for $ac_word... " >&6; }
37078 if test ${ac_cv_prog_TARGET_OBJCOPY+y}
37079 then :
37080 printf %s "(cached) " >&6
37081 else $as_nop
37082 if test -n "$TARGET_OBJCOPY"; then
37083 ac_cv_prog_TARGET_OBJCOPY="$TARGET_OBJCOPY" # Let the user override the test.
37084 else
37085 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37086 for as_dir in $PATH
37087 do
37088 IFS=$as_save_IFS
37089 case $as_dir in #(((
37090 '') as_dir=./ ;;
37091 */) ;;
37092 *) as_dir=$as_dir/ ;;
37093 esac
37094 for ac_exec_ext in '' $ac_executable_extensions; do
37095 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
37096 ac_cv_prog_TARGET_OBJCOPY="${ac_tool_prefix}objcopy"
37097 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
37098 break 2
37099 fi
37100 done
37101 done
37102 IFS=$as_save_IFS
37103
37104 fi
37105 fi
37106 TARGET_OBJCOPY=$ac_cv_prog_TARGET_OBJCOPY
37107 if test -n "$TARGET_OBJCOPY"; then
37108 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $TARGET_OBJCOPY" >&5
37109 printf "%s\n" "$TARGET_OBJCOPY" >&6; }
37110 else
37111 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
37112 printf "%s\n" "no" >&6; }
37113 fi
37114
37115
37116 fi
37117 if test -z "$ac_cv_prog_TARGET_OBJCOPY"; then
37118 ac_ct_TARGET_OBJCOPY=$TARGET_OBJCOPY
37119 # Extract the first word of "objcopy", so it can be a program name with args.
37120 set dummy objcopy; ac_word=$2
37121 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37122 printf %s "checking for $ac_word... " >&6; }
37123 if test ${ac_cv_prog_ac_ct_TARGET_OBJCOPY+y}
37124 then :
37125 printf %s "(cached) " >&6
37126 else $as_nop
37127 if test -n "$ac_ct_TARGET_OBJCOPY"; then
37128 ac_cv_prog_ac_ct_TARGET_OBJCOPY="$ac_ct_TARGET_OBJCOPY" # Let the user override the test.
37129 else
37130 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37131 for as_dir in $PATH
37132 do
37133 IFS=$as_save_IFS
37134 case $as_dir in #(((
37135 '') as_dir=./ ;;
37136 */) ;;
37137 *) as_dir=$as_dir/ ;;
37138 esac
37139 for ac_exec_ext in '' $ac_executable_extensions; do
37140 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
37141 ac_cv_prog_ac_ct_TARGET_OBJCOPY="objcopy"
37142 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
37143 break 2
37144 fi
37145 done
37146 done
37147 IFS=$as_save_IFS
37148
37149 fi
37150 fi
37151 ac_ct_TARGET_OBJCOPY=$ac_cv_prog_ac_ct_TARGET_OBJCOPY
37152 if test -n "$ac_ct_TARGET_OBJCOPY"; then
37153 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_TARGET_OBJCOPY" >&5
37154 printf "%s\n" "$ac_ct_TARGET_OBJCOPY" >&6; }
37155 else
37156 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
37157 printf "%s\n" "no" >&6; }
37158 fi
37159
37160 if test "x$ac_ct_TARGET_OBJCOPY" = x; then
37161 TARGET_OBJCOPY=""
37162 else
37163 case $cross_compiling:$ac_tool_warned in
37164 yes:)
37165 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37166 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37167 ac_tool_warned=yes ;;
37168 esac
37169 TARGET_OBJCOPY=$ac_ct_TARGET_OBJCOPY
37170 fi
37171 else
37172 TARGET_OBJCOPY="$ac_cv_prog_TARGET_OBJCOPY"
37173 fi
37174
37175 if test -n "$ac_tool_prefix"; then
37176 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
37177 set dummy ${ac_tool_prefix}strip; ac_word=$2
37178 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37179 printf %s "checking for $ac_word... " >&6; }
37180 if test ${ac_cv_prog_TARGET_STRIP+y}
37181 then :
37182 printf %s "(cached) " >&6
37183 else $as_nop
37184 if test -n "$TARGET_STRIP"; then
37185 ac_cv_prog_TARGET_STRIP="$TARGET_STRIP" # Let the user override the test.
37186 else
37187 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37188 for as_dir in $PATH
37189 do
37190 IFS=$as_save_IFS
37191 case $as_dir in #(((
37192 '') as_dir=./ ;;
37193 */) ;;
37194 *) as_dir=$as_dir/ ;;
37195 esac
37196 for ac_exec_ext in '' $ac_executable_extensions; do
37197 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
37198 ac_cv_prog_TARGET_STRIP="${ac_tool_prefix}strip"
37199 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
37200 break 2
37201 fi
37202 done
37203 done
37204 IFS=$as_save_IFS
37205
37206 fi
37207 fi
37208 TARGET_STRIP=$ac_cv_prog_TARGET_STRIP
37209 if test -n "$TARGET_STRIP"; then
37210 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $TARGET_STRIP" >&5
37211 printf "%s\n" "$TARGET_STRIP" >&6; }
37212 else
37213 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
37214 printf "%s\n" "no" >&6; }
37215 fi
37216
37217
37218 fi
37219 if test -z "$ac_cv_prog_TARGET_STRIP"; then
37220 ac_ct_TARGET_STRIP=$TARGET_STRIP
37221 # Extract the first word of "strip", so it can be a program name with args.
37222 set dummy strip; ac_word=$2
37223 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37224 printf %s "checking for $ac_word... " >&6; }
37225 if test ${ac_cv_prog_ac_ct_TARGET_STRIP+y}
37226 then :
37227 printf %s "(cached) " >&6
37228 else $as_nop
37229 if test -n "$ac_ct_TARGET_STRIP"; then
37230 ac_cv_prog_ac_ct_TARGET_STRIP="$ac_ct_TARGET_STRIP" # Let the user override the test.
37231 else
37232 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37233 for as_dir in $PATH
37234 do
37235 IFS=$as_save_IFS
37236 case $as_dir in #(((
37237 '') as_dir=./ ;;
37238 */) ;;
37239 *) as_dir=$as_dir/ ;;
37240 esac
37241 for ac_exec_ext in '' $ac_executable_extensions; do
37242 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
37243 ac_cv_prog_ac_ct_TARGET_STRIP="strip"
37244 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
37245 break 2
37246 fi
37247 done
37248 done
37249 IFS=$as_save_IFS
37250
37251 fi
37252 fi
37253 ac_ct_TARGET_STRIP=$ac_cv_prog_ac_ct_TARGET_STRIP
37254 if test -n "$ac_ct_TARGET_STRIP"; then
37255 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_TARGET_STRIP" >&5
37256 printf "%s\n" "$ac_ct_TARGET_STRIP" >&6; }
37257 else
37258 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
37259 printf "%s\n" "no" >&6; }
37260 fi
37261
37262 if test "x$ac_ct_TARGET_STRIP" = x; then
37263 TARGET_STRIP=""
37264 else
37265 case $cross_compiling:$ac_tool_warned in
37266 yes:)
37267 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37268 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37269 ac_tool_warned=yes ;;
37270 esac
37271 TARGET_STRIP=$ac_ct_TARGET_STRIP
37272 fi
37273 else
37274 TARGET_STRIP="$ac_cv_prog_TARGET_STRIP"
37275 fi
37276
37277 if test -n "$ac_tool_prefix"; then
37278 # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
37279 set dummy ${ac_tool_prefix}nm; ac_word=$2
37280 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37281 printf %s "checking for $ac_word... " >&6; }
37282 if test ${ac_cv_prog_TARGET_NM+y}
37283 then :
37284 printf %s "(cached) " >&6
37285 else $as_nop
37286 if test -n "$TARGET_NM"; then
37287 ac_cv_prog_TARGET_NM="$TARGET_NM" # Let the user override the test.
37288 else
37289 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37290 for as_dir in $PATH
37291 do
37292 IFS=$as_save_IFS
37293 case $as_dir in #(((
37294 '') as_dir=./ ;;
37295 */) ;;
37296 *) as_dir=$as_dir/ ;;
37297 esac
37298 for ac_exec_ext in '' $ac_executable_extensions; do
37299 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
37300 ac_cv_prog_TARGET_NM="${ac_tool_prefix}nm"
37301 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
37302 break 2
37303 fi
37304 done
37305 done
37306 IFS=$as_save_IFS
37307
37308 fi
37309 fi
37310 TARGET_NM=$ac_cv_prog_TARGET_NM
37311 if test -n "$TARGET_NM"; then
37312 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $TARGET_NM" >&5
37313 printf "%s\n" "$TARGET_NM" >&6; }
37314 else
37315 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
37316 printf "%s\n" "no" >&6; }
37317 fi
37318
37319
37320 fi
37321 if test -z "$ac_cv_prog_TARGET_NM"; then
37322 ac_ct_TARGET_NM=$TARGET_NM
37323 # Extract the first word of "nm", so it can be a program name with args.
37324 set dummy nm; ac_word=$2
37325 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37326 printf %s "checking for $ac_word... " >&6; }
37327 if test ${ac_cv_prog_ac_ct_TARGET_NM+y}
37328 then :
37329 printf %s "(cached) " >&6
37330 else $as_nop
37331 if test -n "$ac_ct_TARGET_NM"; then
37332 ac_cv_prog_ac_ct_TARGET_NM="$ac_ct_TARGET_NM" # Let the user override the test.
37333 else
37334 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37335 for as_dir in $PATH
37336 do
37337 IFS=$as_save_IFS
37338 case $as_dir in #(((
37339 '') as_dir=./ ;;
37340 */) ;;
37341 *) as_dir=$as_dir/ ;;
37342 esac
37343 for ac_exec_ext in '' $ac_executable_extensions; do
37344 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
37345 ac_cv_prog_ac_ct_TARGET_NM="nm"
37346 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
37347 break 2
37348 fi
37349 done
37350 done
37351 IFS=$as_save_IFS
37352
37353 fi
37354 fi
37355 ac_ct_TARGET_NM=$ac_cv_prog_ac_ct_TARGET_NM
37356 if test -n "$ac_ct_TARGET_NM"; then
37357 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_TARGET_NM" >&5
37358 printf "%s\n" "$ac_ct_TARGET_NM" >&6; }
37359 else
37360 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
37361 printf "%s\n" "no" >&6; }
37362 fi
37363
37364 if test "x$ac_ct_TARGET_NM" = x; then
37365 TARGET_NM=""
37366 else
37367 case $cross_compiling:$ac_tool_warned in
37368 yes:)
37369 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37370 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37371 ac_tool_warned=yes ;;
37372 esac
37373 TARGET_NM=$ac_ct_TARGET_NM
37374 fi
37375 else
37376 TARGET_NM="$ac_cv_prog_TARGET_NM"
37377 fi
37378
37379 if test -n "$ac_tool_prefix"; then
37380 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
37381 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
37382 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37383 printf %s "checking for $ac_word... " >&6; }
37384 if test ${ac_cv_prog_TARGET_RANLIB+y}
37385 then :
37386 printf %s "(cached) " >&6
37387 else $as_nop
37388 if test -n "$TARGET_RANLIB"; then
37389 ac_cv_prog_TARGET_RANLIB="$TARGET_RANLIB" # Let the user override the test.
37390 else
37391 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37392 for as_dir in $PATH
37393 do
37394 IFS=$as_save_IFS
37395 case $as_dir in #(((
37396 '') as_dir=./ ;;
37397 */) ;;
37398 *) as_dir=$as_dir/ ;;
37399 esac
37400 for ac_exec_ext in '' $ac_executable_extensions; do
37401 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
37402 ac_cv_prog_TARGET_RANLIB="${ac_tool_prefix}ranlib"
37403 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
37404 break 2
37405 fi
37406 done
37407 done
37408 IFS=$as_save_IFS
37409
37410 fi
37411 fi
37412 TARGET_RANLIB=$ac_cv_prog_TARGET_RANLIB
37413 if test -n "$TARGET_RANLIB"; then
37414 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $TARGET_RANLIB" >&5
37415 printf "%s\n" "$TARGET_RANLIB" >&6; }
37416 else
37417 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
37418 printf "%s\n" "no" >&6; }
37419 fi
37420
37421
37422 fi
37423 if test -z "$ac_cv_prog_TARGET_RANLIB"; then
37424 ac_ct_TARGET_RANLIB=$TARGET_RANLIB
37425 # Extract the first word of "ranlib", so it can be a program name with args.
37426 set dummy ranlib; ac_word=$2
37427 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37428 printf %s "checking for $ac_word... " >&6; }
37429 if test ${ac_cv_prog_ac_ct_TARGET_RANLIB+y}
37430 then :
37431 printf %s "(cached) " >&6
37432 else $as_nop
37433 if test -n "$ac_ct_TARGET_RANLIB"; then
37434 ac_cv_prog_ac_ct_TARGET_RANLIB="$ac_ct_TARGET_RANLIB" # Let the user override the test.
37435 else
37436 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37437 for as_dir in $PATH
37438 do
37439 IFS=$as_save_IFS
37440 case $as_dir in #(((
37441 '') as_dir=./ ;;
37442 */) ;;
37443 *) as_dir=$as_dir/ ;;
37444 esac
37445 for ac_exec_ext in '' $ac_executable_extensions; do
37446 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
37447 ac_cv_prog_ac_ct_TARGET_RANLIB="ranlib"
37448 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
37449 break 2
37450 fi
37451 done
37452 done
37453 IFS=$as_save_IFS
37454
37455 fi
37456 fi
37457 ac_ct_TARGET_RANLIB=$ac_cv_prog_ac_ct_TARGET_RANLIB
37458 if test -n "$ac_ct_TARGET_RANLIB"; then
37459 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_TARGET_RANLIB" >&5
37460 printf "%s\n" "$ac_ct_TARGET_RANLIB" >&6; }
37461 else
37462 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
37463 printf "%s\n" "no" >&6; }
37464 fi
37465
37466 if test "x$ac_ct_TARGET_RANLIB" = x; then
37467 TARGET_RANLIB=""
37468 else
37469 case $cross_compiling:$ac_tool_warned in
37470 yes:)
37471 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37472 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37473 ac_tool_warned=yes ;;
37474 esac
37475 TARGET_RANLIB=$ac_ct_TARGET_RANLIB
37476 fi
37477 else
37478 TARGET_RANLIB="$ac_cv_prog_TARGET_RANLIB"
37479 fi
37480
37481
37482 ac_tool_prefix="$tmp_ac_tool_prefix"
37483 else
37484 if test "x$TARGET_CC" = x; then
37485 TARGET_CC=$CC
37486 fi
37487 if test -n "$ac_tool_prefix"; then
37488 # Extract the first word of "${ac_tool_prefix}objcopy", so it can be a program name with args.
37489 set dummy ${ac_tool_prefix}objcopy; ac_word=$2
37490 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37491 printf %s "checking for $ac_word... " >&6; }
37492 if test ${ac_cv_prog_TARGET_OBJCOPY+y}
37493 then :
37494 printf %s "(cached) " >&6
37495 else $as_nop
37496 if test -n "$TARGET_OBJCOPY"; then
37497 ac_cv_prog_TARGET_OBJCOPY="$TARGET_OBJCOPY" # Let the user override the test.
37498 else
37499 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37500 for as_dir in $PATH
37501 do
37502 IFS=$as_save_IFS
37503 case $as_dir in #(((
37504 '') as_dir=./ ;;
37505 */) ;;
37506 *) as_dir=$as_dir/ ;;
37507 esac
37508 for ac_exec_ext in '' $ac_executable_extensions; do
37509 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
37510 ac_cv_prog_TARGET_OBJCOPY="${ac_tool_prefix}objcopy"
37511 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
37512 break 2
37513 fi
37514 done
37515 done
37516 IFS=$as_save_IFS
37517
37518 fi
37519 fi
37520 TARGET_OBJCOPY=$ac_cv_prog_TARGET_OBJCOPY
37521 if test -n "$TARGET_OBJCOPY"; then
37522 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $TARGET_OBJCOPY" >&5
37523 printf "%s\n" "$TARGET_OBJCOPY" >&6; }
37524 else
37525 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
37526 printf "%s\n" "no" >&6; }
37527 fi
37528
37529
37530 fi
37531 if test -z "$ac_cv_prog_TARGET_OBJCOPY"; then
37532 ac_ct_TARGET_OBJCOPY=$TARGET_OBJCOPY
37533 # Extract the first word of "objcopy", so it can be a program name with args.
37534 set dummy objcopy; ac_word=$2
37535 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37536 printf %s "checking for $ac_word... " >&6; }
37537 if test ${ac_cv_prog_ac_ct_TARGET_OBJCOPY+y}
37538 then :
37539 printf %s "(cached) " >&6
37540 else $as_nop
37541 if test -n "$ac_ct_TARGET_OBJCOPY"; then
37542 ac_cv_prog_ac_ct_TARGET_OBJCOPY="$ac_ct_TARGET_OBJCOPY" # Let the user override the test.
37543 else
37544 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37545 for as_dir in $PATH
37546 do
37547 IFS=$as_save_IFS
37548 case $as_dir in #(((
37549 '') as_dir=./ ;;
37550 */) ;;
37551 *) as_dir=$as_dir/ ;;
37552 esac
37553 for ac_exec_ext in '' $ac_executable_extensions; do
37554 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
37555 ac_cv_prog_ac_ct_TARGET_OBJCOPY="objcopy"
37556 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
37557 break 2
37558 fi
37559 done
37560 done
37561 IFS=$as_save_IFS
37562
37563 fi
37564 fi
37565 ac_ct_TARGET_OBJCOPY=$ac_cv_prog_ac_ct_TARGET_OBJCOPY
37566 if test -n "$ac_ct_TARGET_OBJCOPY"; then
37567 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_TARGET_OBJCOPY" >&5
37568 printf "%s\n" "$ac_ct_TARGET_OBJCOPY" >&6; }
37569 else
37570 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
37571 printf "%s\n" "no" >&6; }
37572 fi
37573
37574 if test "x$ac_ct_TARGET_OBJCOPY" = x; then
37575 TARGET_OBJCOPY=""
37576 else
37577 case $cross_compiling:$ac_tool_warned in
37578 yes:)
37579 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37580 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37581 ac_tool_warned=yes ;;
37582 esac
37583 TARGET_OBJCOPY=$ac_ct_TARGET_OBJCOPY
37584 fi
37585 else
37586 TARGET_OBJCOPY="$ac_cv_prog_TARGET_OBJCOPY"
37587 fi
37588
37589 if test -n "$ac_tool_prefix"; then
37590 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
37591 set dummy ${ac_tool_prefix}strip; ac_word=$2
37592 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37593 printf %s "checking for $ac_word... " >&6; }
37594 if test ${ac_cv_prog_TARGET_STRIP+y}
37595 then :
37596 printf %s "(cached) " >&6
37597 else $as_nop
37598 if test -n "$TARGET_STRIP"; then
37599 ac_cv_prog_TARGET_STRIP="$TARGET_STRIP" # Let the user override the test.
37600 else
37601 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37602 for as_dir in $PATH
37603 do
37604 IFS=$as_save_IFS
37605 case $as_dir in #(((
37606 '') as_dir=./ ;;
37607 */) ;;
37608 *) as_dir=$as_dir/ ;;
37609 esac
37610 for ac_exec_ext in '' $ac_executable_extensions; do
37611 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
37612 ac_cv_prog_TARGET_STRIP="${ac_tool_prefix}strip"
37613 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
37614 break 2
37615 fi
37616 done
37617 done
37618 IFS=$as_save_IFS
37619
37620 fi
37621 fi
37622 TARGET_STRIP=$ac_cv_prog_TARGET_STRIP
37623 if test -n "$TARGET_STRIP"; then
37624 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $TARGET_STRIP" >&5
37625 printf "%s\n" "$TARGET_STRIP" >&6; }
37626 else
37627 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
37628 printf "%s\n" "no" >&6; }
37629 fi
37630
37631
37632 fi
37633 if test -z "$ac_cv_prog_TARGET_STRIP"; then
37634 ac_ct_TARGET_STRIP=$TARGET_STRIP
37635 # Extract the first word of "strip", so it can be a program name with args.
37636 set dummy strip; ac_word=$2
37637 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37638 printf %s "checking for $ac_word... " >&6; }
37639 if test ${ac_cv_prog_ac_ct_TARGET_STRIP+y}
37640 then :
37641 printf %s "(cached) " >&6
37642 else $as_nop
37643 if test -n "$ac_ct_TARGET_STRIP"; then
37644 ac_cv_prog_ac_ct_TARGET_STRIP="$ac_ct_TARGET_STRIP" # Let the user override the test.
37645 else
37646 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37647 for as_dir in $PATH
37648 do
37649 IFS=$as_save_IFS
37650 case $as_dir in #(((
37651 '') as_dir=./ ;;
37652 */) ;;
37653 *) as_dir=$as_dir/ ;;
37654 esac
37655 for ac_exec_ext in '' $ac_executable_extensions; do
37656 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
37657 ac_cv_prog_ac_ct_TARGET_STRIP="strip"
37658 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
37659 break 2
37660 fi
37661 done
37662 done
37663 IFS=$as_save_IFS
37664
37665 fi
37666 fi
37667 ac_ct_TARGET_STRIP=$ac_cv_prog_ac_ct_TARGET_STRIP
37668 if test -n "$ac_ct_TARGET_STRIP"; then
37669 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_TARGET_STRIP" >&5
37670 printf "%s\n" "$ac_ct_TARGET_STRIP" >&6; }
37671 else
37672 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
37673 printf "%s\n" "no" >&6; }
37674 fi
37675
37676 if test "x$ac_ct_TARGET_STRIP" = x; then
37677 TARGET_STRIP=""
37678 else
37679 case $cross_compiling:$ac_tool_warned in
37680 yes:)
37681 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37682 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37683 ac_tool_warned=yes ;;
37684 esac
37685 TARGET_STRIP=$ac_ct_TARGET_STRIP
37686 fi
37687 else
37688 TARGET_STRIP="$ac_cv_prog_TARGET_STRIP"
37689 fi
37690
37691 if test -n "$ac_tool_prefix"; then
37692 # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
37693 set dummy ${ac_tool_prefix}nm; ac_word=$2
37694 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37695 printf %s "checking for $ac_word... " >&6; }
37696 if test ${ac_cv_prog_TARGET_NM+y}
37697 then :
37698 printf %s "(cached) " >&6
37699 else $as_nop
37700 if test -n "$TARGET_NM"; then
37701 ac_cv_prog_TARGET_NM="$TARGET_NM" # Let the user override the test.
37702 else
37703 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37704 for as_dir in $PATH
37705 do
37706 IFS=$as_save_IFS
37707 case $as_dir in #(((
37708 '') as_dir=./ ;;
37709 */) ;;
37710 *) as_dir=$as_dir/ ;;
37711 esac
37712 for ac_exec_ext in '' $ac_executable_extensions; do
37713 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
37714 ac_cv_prog_TARGET_NM="${ac_tool_prefix}nm"
37715 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
37716 break 2
37717 fi
37718 done
37719 done
37720 IFS=$as_save_IFS
37721
37722 fi
37723 fi
37724 TARGET_NM=$ac_cv_prog_TARGET_NM
37725 if test -n "$TARGET_NM"; then
37726 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $TARGET_NM" >&5
37727 printf "%s\n" "$TARGET_NM" >&6; }
37728 else
37729 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
37730 printf "%s\n" "no" >&6; }
37731 fi
37732
37733
37734 fi
37735 if test -z "$ac_cv_prog_TARGET_NM"; then
37736 ac_ct_TARGET_NM=$TARGET_NM
37737 # Extract the first word of "nm", so it can be a program name with args.
37738 set dummy nm; ac_word=$2
37739 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37740 printf %s "checking for $ac_word... " >&6; }
37741 if test ${ac_cv_prog_ac_ct_TARGET_NM+y}
37742 then :
37743 printf %s "(cached) " >&6
37744 else $as_nop
37745 if test -n "$ac_ct_TARGET_NM"; then
37746 ac_cv_prog_ac_ct_TARGET_NM="$ac_ct_TARGET_NM" # Let the user override the test.
37747 else
37748 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37749 for as_dir in $PATH
37750 do
37751 IFS=$as_save_IFS
37752 case $as_dir in #(((
37753 '') as_dir=./ ;;
37754 */) ;;
37755 *) as_dir=$as_dir/ ;;
37756 esac
37757 for ac_exec_ext in '' $ac_executable_extensions; do
37758 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
37759 ac_cv_prog_ac_ct_TARGET_NM="nm"
37760 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
37761 break 2
37762 fi
37763 done
37764 done
37765 IFS=$as_save_IFS
37766
37767 fi
37768 fi
37769 ac_ct_TARGET_NM=$ac_cv_prog_ac_ct_TARGET_NM
37770 if test -n "$ac_ct_TARGET_NM"; then
37771 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_TARGET_NM" >&5
37772 printf "%s\n" "$ac_ct_TARGET_NM" >&6; }
37773 else
37774 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
37775 printf "%s\n" "no" >&6; }
37776 fi
37777
37778 if test "x$ac_ct_TARGET_NM" = x; then
37779 TARGET_NM=""
37780 else
37781 case $cross_compiling:$ac_tool_warned in
37782 yes:)
37783 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37784 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37785 ac_tool_warned=yes ;;
37786 esac
37787 TARGET_NM=$ac_ct_TARGET_NM
37788 fi
37789 else
37790 TARGET_NM="$ac_cv_prog_TARGET_NM"
37791 fi
37792
37793 if test -n "$ac_tool_prefix"; then
37794 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
37795 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
37796 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37797 printf %s "checking for $ac_word... " >&6; }
37798 if test ${ac_cv_prog_TARGET_RANLIB+y}
37799 then :
37800 printf %s "(cached) " >&6
37801 else $as_nop
37802 if test -n "$TARGET_RANLIB"; then
37803 ac_cv_prog_TARGET_RANLIB="$TARGET_RANLIB" # Let the user override the test.
37804 else
37805 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37806 for as_dir in $PATH
37807 do
37808 IFS=$as_save_IFS
37809 case $as_dir in #(((
37810 '') as_dir=./ ;;
37811 */) ;;
37812 *) as_dir=$as_dir/ ;;
37813 esac
37814 for ac_exec_ext in '' $ac_executable_extensions; do
37815 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
37816 ac_cv_prog_TARGET_RANLIB="${ac_tool_prefix}ranlib"
37817 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
37818 break 2
37819 fi
37820 done
37821 done
37822 IFS=$as_save_IFS
37823
37824 fi
37825 fi
37826 TARGET_RANLIB=$ac_cv_prog_TARGET_RANLIB
37827 if test -n "$TARGET_RANLIB"; then
37828 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $TARGET_RANLIB" >&5
37829 printf "%s\n" "$TARGET_RANLIB" >&6; }
37830 else
37831 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
37832 printf "%s\n" "no" >&6; }
37833 fi
37834
37835
37836 fi
37837 if test -z "$ac_cv_prog_TARGET_RANLIB"; then
37838 ac_ct_TARGET_RANLIB=$TARGET_RANLIB
37839 # Extract the first word of "ranlib", so it can be a program name with args.
37840 set dummy ranlib; ac_word=$2
37841 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37842 printf %s "checking for $ac_word... " >&6; }
37843 if test ${ac_cv_prog_ac_ct_TARGET_RANLIB+y}
37844 then :
37845 printf %s "(cached) " >&6
37846 else $as_nop
37847 if test -n "$ac_ct_TARGET_RANLIB"; then
37848 ac_cv_prog_ac_ct_TARGET_RANLIB="$ac_ct_TARGET_RANLIB" # Let the user override the test.
37849 else
37850 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37851 for as_dir in $PATH
37852 do
37853 IFS=$as_save_IFS
37854 case $as_dir in #(((
37855 '') as_dir=./ ;;
37856 */) ;;
37857 *) as_dir=$as_dir/ ;;
37858 esac
37859 for ac_exec_ext in '' $ac_executable_extensions; do
37860 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
37861 ac_cv_prog_ac_ct_TARGET_RANLIB="ranlib"
37862 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
37863 break 2
37864 fi
37865 done
37866 done
37867 IFS=$as_save_IFS
37868
37869 fi
37870 fi
37871 ac_ct_TARGET_RANLIB=$ac_cv_prog_ac_ct_TARGET_RANLIB
37872 if test -n "$ac_ct_TARGET_RANLIB"; then
37873 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_TARGET_RANLIB" >&5
37874 printf "%s\n" "$ac_ct_TARGET_RANLIB" >&6; }
37875 else
37876 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
37877 printf "%s\n" "no" >&6; }
37878 fi
37879
37880 if test "x$ac_ct_TARGET_RANLIB" = x; then
37881 TARGET_RANLIB=""
37882 else
37883 case $cross_compiling:$ac_tool_warned in
37884 yes:)
37885 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37886 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37887 ac_tool_warned=yes ;;
37888 esac
37889 TARGET_RANLIB=$ac_ct_TARGET_RANLIB
37890 fi
37891 else
37892 TARGET_RANLIB="$ac_cv_prog_TARGET_RANLIB"
37893 fi
37894
37895 fi
37896
37897
37898
37899
37900
37901
37902
37903
37904
37905
37906
37907
37908 # Test the C compiler for the target environment.
37909 tmp_CC="$CC"
37910 tmp_CFLAGS="$CFLAGS"
37911 tmp_LDFLAGS="$LDFLAGS"
37912 tmp_CPPFLAGS="$CPPFLAGS"
37913 tmp_LIBS="$LIBS"
37914 CC="$TARGET_CC"
37915 CFLAGS="$TARGET_CFLAGS"
37916 CPPFLAGS="$TARGET_CPPFLAGS"
37917 LDFLAGS="$TARGET_LDFLAGS"
37918 LIBS=""
37919
37920 if test "x$target_m32" = x1; then
37921 # Force 32-bit mode.
37922 TARGET_CFLAGS="$TARGET_CFLAGS -m32"
37923 TARGET_CCASFLAGS="$TARGET_CCASFLAGS -m32"
37924 TARGET_CPPFLAGS="$TARGET_CPPFLAGS -m32"
37925 TARGET_LDFLAGS="$TARGET_LDFLAGS -m32"
37926 TARGET_MODULE_FORMAT="elf32"
37927 fi
37928
37929 if test "x$target_m64" = x1; then
37930 # Force 64-bit mode.
37931 TARGET_CFLAGS="$TARGET_CFLAGS -m64"
37932 TARGET_CCASFLAGS="$TARGET_CCASFLAGS -m64"
37933 TARGET_CPPFLAGS="$TARGET_CPPFLAGS -m64"
37934 TARGET_LDFLAGS="$TARGET_LDFLAGS -m64"
37935 TARGET_MODULE_FORMAT="elf64"
37936 fi
37937
37938 # debug flags.
37939 TARGET_CFLAGS="$TARGET_CFLAGS $WARN_FLAGS -g -Wredundant-decls -Wmissing-prototypes -Wmissing-declarations"
37940 TARGET_CCASFLAGS="$TARGET_CCASFLAGS -g"
37941
37942 if test "x$target_cpu" != xi386 && test "x$target_cpu" != xx86_64; then
37943 TARGET_CFLAGS="$TARGET_CFLAGS -Wcast-align"
37944 fi
37945
37946 TARGET_CC_VERSION="$(LC_ALL=C $TARGET_CC --version | head -n1)"
37947
37948 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which extra warnings work" >&5
37949 printf %s "checking which extra warnings work... " >&6; }
37950 if test ${grub_cv_target_cc_w_extra_flags+y}
37951 then :
37952 printf %s "(cached) " >&6
37953 else $as_nop
37954
37955 LDFLAGS="$TARGET_LDFLAGS -nostdlib -static"
37956
37957 grub_cv_target_cc_w_extra_flags=
37958 for x in $EXTRA_WARN_FLAGS; do
37959 CFLAGS="$TARGET_CFLAGS $x -Werror"
37960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37961 /* end confdefs.h. */
37962
37963 asm (".globl start; start:");
37964 void __main (void);
37965 void __main (void) {}
37966 int main (void);
37967
37968 int
37969 main (void)
37970 {
37971
37972 ;
37973 return 0;
37974 }
37975 _ACEOF
37976 if ac_fn_c_try_link "$LINENO"
37977 then :
37978 flag=1
37979 else $as_nop
37980 flag=0
37981 fi
37982 rm -f core conftest.err conftest.$ac_objext conftest.beam \
37983 conftest$ac_exeext conftest.$ac_ext
37984 if test x$flag = x1 ; then
37985 grub_cv_target_cc_w_extra_flags="$grub_cv_target_cc_w_extra_flags $x"
37986 fi
37987 done
37988
37989 fi
37990 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_target_cc_w_extra_flags" >&5
37991 printf "%s\n" "$grub_cv_target_cc_w_extra_flags" >&6; }
37992
37993 TARGET_CFLAGS="$TARGET_CFLAGS $grub_cv_target_cc_w_extra_flags"
37994
37995 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiling with clang" >&5
37996 printf %s "checking if compiling with clang... " >&6; }
37997 if test ${grub_cv_cc_target_clang+y}
37998 then :
37999 printf %s "(cached) " >&6
38000 else $as_nop
38001
38002 CFLAGS="$TARGET_CFLAGS"
38003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38004 /* end confdefs.h. */
38005
38006 int
38007 main (void)
38008 {
38009
38010 #ifdef __clang__
38011 #error "is clang"
38012 #endif
38013
38014 ;
38015 return 0;
38016 }
38017 _ACEOF
38018 if ac_fn_c_try_compile "$LINENO"
38019 then :
38020 grub_cv_cc_target_clang=no
38021 else $as_nop
38022 grub_cv_cc_target_clang=yes
38023 fi
38024 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
38025 fi
38026 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_cc_target_clang" >&5
38027 printf "%s\n" "$grub_cv_cc_target_clang" >&6; }
38028
38029 if test x$target_cpu = xpowerpc -o x$target_cpu = xmips; then
38030 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for options to get big-endian compilation" >&5
38031 printf %s "checking for options to get big-endian compilation... " >&6; }
38032 if test ${grub_cv_target_cc_big_endian+y}
38033 then :
38034 printf %s "(cached) " >&6
38035 else $as_nop
38036
38037 grub_cv_target_cc_big_endian=no
38038 for cand in "-target $target_cpu -Wl,-EB" "-target $target_cpu" \
38039 "-target $target_cpu-linux-gnu -Wl,-EB" "-target $target_cpu-linux-gnu" \
38040 "-EB" "-mbig-endian"; do
38041 if test x"$grub_cv_target_cc_big_endian" != xno ; then
38042 break
38043 fi
38044 CFLAGS="$TARGET_CFLAGS $cand -Werror"
38045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38046 /* end confdefs.h. */
38047
38048 #if defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) && (__ORDER_BIG_ENDIAN__ != __BYTE_ORDER__)
38049 #error still little endian
38050 #endif
38051 asm (".globl start; start:");
38052 asm (".globl _start; _start:");
38053 asm (".globl __start; __start:");
38054 void __main (void);
38055 void __main (void) {}
38056 int main (void);
38057
38058 int
38059 main (void)
38060 {
38061
38062 ;
38063 return 0;
38064 }
38065 _ACEOF
38066 if ac_fn_c_try_link "$LINENO"
38067 then :
38068 grub_cv_target_cc_big_endian="$cand"
38069 fi
38070 rm -f core conftest.err conftest.$ac_objext conftest.beam \
38071 conftest$ac_exeext conftest.$ac_ext
38072 done
38073
38074 fi
38075 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_target_cc_big_endian" >&5
38076 printf "%s\n" "$grub_cv_target_cc_big_endian" >&6; }
38077
38078 if test x"$grub_cv_target_cc_big_endian" = xno ; then
38079 as_fn_error $? "could not force big-endian" "$LINENO" 5
38080 fi
38081
38082 skip_linkflags="$(echo "$grub_cv_target_cc_big_endian"|sed 's@-Wl,-EB@@')"
38083
38084 TARGET_CFLAGS="$TARGET_CFLAGS $skip_linkflags"
38085 TARGET_CPPFLAGS="$TARGET_CPPFLAGS $skip_linkflags"
38086 TARGET_CCASFLAGS="$TARGET_CCASFLAGS $skip_linkflags"
38087 TARGET_LDFLAGS="$TARGET_LDFLAGS $grub_cv_target_cc_big_endian"
38088 elif test x$target_cpu = xmipsel; then
38089 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for options to get little-endian compilation" >&5
38090 printf %s "checking for options to get little-endian compilation... " >&6; }
38091 if test ${grub_cv_target_cc_little_endian+y}
38092 then :
38093 printf %s "(cached) " >&6
38094 else $as_nop
38095
38096 grub_cv_target_cc_little_endian=no
38097 for cand in "-target $target_cpu -Wl,-EL" "-target $target_cpu" \
38098 "-target $target_cpu-linux-gnu -Wl,-EL" "-target $target_cpu-linux-gnu" \
38099 "-EL"; do
38100 if test x"$grub_cv_target_cc_little_endian" != xno ; then
38101 break
38102 fi
38103 CFLAGS="$TARGET_CFLAGS $cand -Werror"
38104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38105 /* end confdefs.h. */
38106
38107 #if defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) && (__ORDER_BIG_ENDIAN__ == __BYTE_ORDER__)
38108 #error still big endian
38109 #endif
38110 asm (".globl start; start:");
38111 asm (".globl _start; _start:");
38112 asm (".globl __start; __start:");
38113 void __main (void);
38114 void __main (void) {}
38115 int main (void);
38116
38117 int
38118 main (void)
38119 {
38120
38121 ;
38122 return 0;
38123 }
38124 _ACEOF
38125 if ac_fn_c_try_link "$LINENO"
38126 then :
38127 grub_cv_target_cc_little_endian="$cand"
38128 fi
38129 rm -f core conftest.err conftest.$ac_objext conftest.beam \
38130 conftest$ac_exeext conftest.$ac_ext
38131 done
38132
38133 fi
38134 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_target_cc_little_endian" >&5
38135 printf "%s\n" "$grub_cv_target_cc_little_endian" >&6; }
38136
38137 if test x"$grub_cv_target_cc_little_endian" = xno ; then
38138 as_fn_error $? "could not force little-endian" "$LINENO" 5
38139 fi
38140
38141 skip_linkflags="$(echo "$grub_cv_target_cc_little_endian"|sed 's@-Wl,-EL@@')"
38142
38143 TARGET_CFLAGS="$TARGET_CFLAGS $skip_linkflags"
38144 TARGET_CPPFLAGS="$TARGET_CPPFLAGS $skip_linkflags"
38145 TARGET_CCASFLAGS="$TARGET_CCASFLAGS $skip_linkflags"
38146 TARGET_LDFLAGS="$TARGET_LDFLAGS $grub_cv_target_cc_little_endian"
38147 fi
38148
38149 # GRUB code is N32-compliant but it's experimental and we would prefer to
38150 # avoid having too much variety when it doesn't result in any real improvement.
38151 # Moreover N64 isn't supported.
38152 if test "x$target_cpu" = xmips || test "x$target_cpu" = xmipsel ; then
38153 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for options to force MIPS o32 ABI" >&5
38154 printf %s "checking for options to force MIPS o32 ABI... " >&6; }
38155 if test ${grub_cv_target_cc_mips_o32_abi+y}
38156 then :
38157 printf %s "(cached) " >&6
38158 else $as_nop
38159
38160 grub_cv_target_cc_mips_o32_abi=no
38161 for arg in "" "-mabi=32" "-target $target_cpu -mabi=32" ; do
38162 if test x"$grub_cv_target_cc_mips_o32_abi" != xno ; then
38163 break
38164 fi
38165 CFLAGS="$TARGET_CFLAGS $arg -Werror"
38166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38167 /* end confdefs.h. */
38168
38169 #if !defined(_ABIO32) || !defined(_MIPS_SIM) || (_MIPS_SIM != _ABIO32)
38170 #error not o32 ABI
38171 #endif
38172 asm (".globl start; start:");
38173 asm (".globl _start; _start:");
38174 asm (".globl __start; __start:");
38175 void __main (void);
38176 void __main (void) {}
38177 int main (void);
38178
38179 int
38180 main (void)
38181 {
38182
38183 ;
38184 return 0;
38185 }
38186 _ACEOF
38187 if ac_fn_c_try_link "$LINENO"
38188 then :
38189 grub_cv_target_cc_mips_o32_abi="$arg"
38190 fi
38191 rm -f core conftest.err conftest.$ac_objext conftest.beam \
38192 conftest$ac_exeext conftest.$ac_ext
38193 done
38194
38195 fi
38196 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_target_cc_mips_o32_abi" >&5
38197 printf "%s\n" "$grub_cv_target_cc_mips_o32_abi" >&6; }
38198
38199 if test x"$grub_cv_target_cc_mips_o32_abi" = xno ; then
38200 as_fn_error $? "could not force MIPS o32 ABI" "$LINENO" 5
38201 fi
38202
38203 TARGET_CFLAGS="$TARGET_CFLAGS $grub_cv_target_cc_mips_o32_abi"
38204 TARGET_CCASFLAGS="$TARGET_CCASFLAGS $grub_cv_target_cc_mips_o32_abi"
38205 fi
38206
38207 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for options to compile assembly" >&5
38208 printf %s "checking for options to compile assembly... " >&6; }
38209 if test ${grub_cv_cc_target_asm_compile+y}
38210 then :
38211 printf %s "(cached) " >&6
38212 else $as_nop
38213
38214 test_program=
38215 case "x$target_cpu-$platform" in
38216 xmips-* | xmipsel-*)
38217 test_program=mips
38218 ;;
38219 xi386-pc)
38220 test_program=i386-pc
38221 ;;
38222 xi386-* | xx86_64-*)
38223 test_program=i386
38224 ;;
38225 xpowerpc-* | xsparc64-* | xarm-*)
38226 test_program=$target_cpu
38227 ;;
38228 esac
38229 if test x"$test_program" = x ; then
38230 grub_cv_cc_target_asm_compile=
38231 else
38232 found=no
38233 for arg in "" "-no-integrated-as"; do
38234 cmdline="$TARGET_CC -c -o /dev/null $TARGET_CCASFLAGS $arg $TARGET_CPPFLAGS $srcdir/asm-tests/$test_program.S"
38235 echo "Running $cmdline" >&5
38236 if $cmdline >&5 2>&5; then
38237 grub_cv_cc_target_asm_compile="$arg"
38238 found=yes
38239 break
38240 fi
38241 done
38242 if test x"$found" = xno ; then
38243 as_fn_error $? "could not compile assembly" "$LINENO" 5
38244 fi
38245 fi
38246
38247 fi
38248 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_cc_target_asm_compile" >&5
38249 printf "%s\n" "$grub_cv_cc_target_asm_compile" >&6; }
38250
38251 TARGET_CCASFLAGS="$TARGET_CCASFLAGS $grub_cv_cc_target_asm_compile"
38252
38253 if test "x$target_cpu" = xi386 && test "x$platform" != xemu; then
38254 TARGET_CFLAGS="$TARGET_CFLAGS -march=i386"
38255 fi
38256
38257 if test "x$grub_cv_cc_target_clang" = xno && test "x$target_cpu" = xi386 && test "x$platform" != xemu && test "x$platform" != xefi; then
38258 TARGET_CFLAGS="$TARGET_CFLAGS -mrtd -mregparm=3"
38259 fi
38260
38261 # on mips redirect cache flushing function to non-existant one.
38262 if test "x$target_cpu" = xmips || test "x$target_cpu" = xmipsel ; then
38263 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -mflush-func=grub_red_herring works" >&5
38264 printf %s "checking whether -mflush-func=grub_red_herring works... " >&6; }
38265 if test ${grub_cv_cc_mflush_func+y}
38266 then :
38267 printf %s "(cached) " >&6
38268 else $as_nop
38269
38270 CFLAGS="$TARGET_CFLAGS -mflush-func=grub_red_herring -Werror"
38271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38272 /* end confdefs.h. */
38273
38274 int
38275 main (void)
38276 {
38277
38278 ;
38279 return 0;
38280 }
38281 _ACEOF
38282 if ac_fn_c_try_compile "$LINENO"
38283 then :
38284 grub_cv_cc_mflush_func=yes
38285 else $as_nop
38286 grub_cv_cc_mflush_func=no
38287 fi
38288 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
38289
38290 fi
38291 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_cc_mflush_func" >&5
38292 printf "%s\n" "$grub_cv_cc_mflush_func" >&6; }
38293
38294 if test "x$grub_cv_cc_mflush_func" = xyes; then
38295 TARGET_CFLAGS="$TARGET_CFLAGS -mflush-func=grub_red_herring"
38296 fi
38297
38298 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -mno-gpopt works" >&5
38299 printf %s "checking whether -mno-gpopt works... " >&6; }
38300 if test ${grub_cv_cc_mno_gpopt+y}
38301 then :
38302 printf %s "(cached) " >&6
38303 else $as_nop
38304
38305 CFLAGS="$TARGET_CFLAGS -mno-gpopt -Werror"
38306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38307 /* end confdefs.h. */
38308
38309 int
38310 main (void)
38311 {
38312
38313 ;
38314 return 0;
38315 }
38316 _ACEOF
38317 if ac_fn_c_try_compile "$LINENO"
38318 then :
38319 grub_cv_cc_mno_gpopt=yes
38320 else $as_nop
38321 grub_cv_cc_mno_gpopt=no
38322 fi
38323 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
38324
38325 fi
38326 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_cc_mno_gpopt" >&5
38327 printf "%s\n" "$grub_cv_cc_mno_gpopt" >&6; }
38328
38329 if test "x$grub_cv_cc_mno_gpopt" = xyes; then
38330 TARGET_CFLAGS="$TARGET_CFLAGS -mno-gpopt"
38331 fi
38332 fi
38333
38334
38335 # Force no alignment to save space on i386.
38336 if test "x$target_cpu" = xi386; then
38337 TARGET_CFLAGS="$TARGET_CFLAGS -falign-functions=1"
38338
38339 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -falign-loops works" >&5
38340 printf %s "checking whether -falign-loops works... " >&6; }
38341 if test ${grub_cv_cc_falign_loop+y}
38342 then :
38343 printf %s "(cached) " >&6
38344 else $as_nop
38345
38346 CFLAGS="$TARGET_CFLAGS -falign-loops=1 -Werror"
38347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38348 /* end confdefs.h. */
38349
38350 int
38351 main (void)
38352 {
38353
38354 ;
38355 return 0;
38356 }
38357 _ACEOF
38358 if ac_fn_c_try_compile "$LINENO"
38359 then :
38360 grub_cv_cc_falign_loop=yes
38361 else $as_nop
38362 grub_cv_cc_falign_loop=no
38363 fi
38364 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
38365
38366 fi
38367 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_cc_falign_loop" >&5
38368 printf "%s\n" "$grub_cv_cc_falign_loop" >&6; }
38369
38370 if test "x$grub_cv_cc_falign_loop" = xyes; then
38371 TARGET_CFLAGS="$TARGET_CFLAGS -falign-loops=1"
38372 fi
38373
38374 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -falign-jumps works" >&5
38375 printf %s "checking whether -falign-jumps works... " >&6; }
38376 if test ${grub_cv_cc_falign_jumps+y}
38377 then :
38378 printf %s "(cached) " >&6
38379 else $as_nop
38380
38381 CFLAGS="$TARGET_CFLAGS -falign-jumps=1 -Werror"
38382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38383 /* end confdefs.h. */
38384
38385 int
38386 main (void)
38387 {
38388
38389 ;
38390 return 0;
38391 }
38392 _ACEOF
38393 if ac_fn_c_try_compile "$LINENO"
38394 then :
38395 grub_cv_cc_falign_jumps=yes
38396 else $as_nop
38397 grub_cv_cc_falign_jumps=no
38398 fi
38399 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
38400
38401 fi
38402 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_cc_falign_jumps" >&5
38403 printf "%s\n" "$grub_cv_cc_falign_jumps" >&6; }
38404
38405 if test "x$grub_cv_cc_falign_jumps" = xyes; then
38406 TARGET_CFLAGS="$TARGET_CFLAGS -falign-jumps=1"
38407 fi
38408 fi
38409
38410 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -freg-struct-return works" >&5
38411 printf %s "checking whether -freg-struct-return works... " >&6; }
38412 if test ${grub_cv_cc_freg_struct_return+y}
38413 then :
38414 printf %s "(cached) " >&6
38415 else $as_nop
38416
38417 CFLAGS="$TARGET_CFLAGS -freg-struct-return -Werror"
38418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38419 /* end confdefs.h. */
38420
38421 int
38422 main (void)
38423 {
38424
38425 ;
38426 return 0;
38427 }
38428 _ACEOF
38429 if ac_fn_c_try_compile "$LINENO"
38430 then :
38431 grub_cv_cc_freg_struct_return=yes
38432 else $as_nop
38433 grub_cv_cc_freg_struct_return=no
38434 fi
38435 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
38436
38437 fi
38438 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_cc_freg_struct_return" >&5
38439 printf "%s\n" "$grub_cv_cc_freg_struct_return" >&6; }
38440
38441 if test "x$grub_cv_cc_freg_struct_return" = xyes; then
38442 TARGET_CFLAGS="$TARGET_CFLAGS -freg-struct-return"
38443 fi
38444
38445 if ( test "x$target_cpu" = xi386 || test "x$target_cpu" = xx86_64 ) && test "x$platform" != xemu; then
38446 # Some toolchains enable these features by default, but they need
38447 # registers that aren't set up properly in GRUB.
38448 TARGET_CFLAGS="$TARGET_CFLAGS -mno-mmx -mno-sse -mno-sse2 -mno-sse3 -mno-3dnow"
38449 fi
38450
38451 if ( test "x$target_cpu" = xi386 || test "x$target_cpu" = xx86_64 ); then
38452 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wa,-mx86-used-note works" >&5
38453 printf %s "checking whether -Wa,-mx86-used-note works... " >&6; }
38454 if test ${grub_cv_cc_mx86_used_note+y}
38455 then :
38456 printf %s "(cached) " >&6
38457 else $as_nop
38458
38459 CFLAGS="$TARGET_CFLAGS -Wa,-mx86-used-note=no -Werror"
38460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38461 /* end confdefs.h. */
38462
38463 int
38464 main (void)
38465 {
38466
38467 ;
38468 return 0;
38469 }
38470 _ACEOF
38471 if ac_fn_c_try_compile "$LINENO"
38472 then :
38473 grub_cv_cc_mx86_used_note=yes
38474 else $as_nop
38475 grub_cv_cc_mx86_used_note=no
38476 fi
38477 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
38478
38479 fi
38480 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_cc_mx86_used_note" >&5
38481 printf "%s\n" "$grub_cv_cc_mx86_used_note" >&6; }
38482
38483 if test "x$grub_cv_cc_mx86_used_note" = xyes; then
38484 TARGET_CFLAGS="$TARGET_CFLAGS -Wa,-mx86-used-note=no"
38485 TARGET_CCASFLAGS="$TARGET_CCASFLAGS -Wa,-mx86-used-note=no"
38486 fi
38487 fi
38488
38489 if test "x$target_cpu" = xloongarch64; then
38490 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _mno_explicit_relocs works" >&5
38491 printf %s "checking whether _mno_explicit_relocs works... " >&6; }
38492 if test ${grub_cv_cc_mno_explicit_relocs+y}
38493 then :
38494 printf %s "(cached) " >&6
38495 else $as_nop
38496
38497 CFLAGS="$TARGET_CFLAGS -mno-explicit-relocs -Werror"
38498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38499 /* end confdefs.h. */
38500
38501 int
38502 main (void)
38503 {
38504
38505 ;
38506 return 0;
38507 }
38508 _ACEOF
38509 if ac_fn_c_try_compile "$LINENO"
38510 then :
38511 grub_cv_cc_mno_explicit_relocs=yes
38512 else $as_nop
38513 grub_cv_cc_mno_explicit_relocs=no
38514 fi
38515 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
38516
38517 fi
38518 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_cc_mno_explicit_relocs" >&5
38519 printf "%s\n" "$grub_cv_cc_mno_explicit_relocs" >&6; }
38520 if test "x$grub_cv_cc_mno_explicit_relocs" = xyes; then
38521 TARGET_CFLAGS="$TARGET_CFLAGS -mno-explicit-relocs -fno-plt"
38522 TARGET_CCASFLAGS="$TARGET_CCASFLAGS -mno-explicit-relocs -fno-plt"
38523 fi
38524
38525 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for no-relax options" >&5
38526 printf %s "checking for no-relax options... " >&6; }
38527 if test ${grub_cv_target_cc_mno_relax+y}
38528 then :
38529 printf %s "(cached) " >&6
38530 else $as_nop
38531
38532 grub_cv_target_cc_mno_relax=no
38533 for cand in "-mno-relax" "-Wa,-mno-relax"; do
38534 if test x"$grub_cv_target_cc_mno_relax" != xno ; then
38535 break
38536 fi
38537 CFLAGS="$TARGET_CFLAGS $cand -Werror"
38538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38539 /* end confdefs.h. */
38540
38541 asm (".globl start; start:");
38542 void __main (void);
38543 void __main (void) {}
38544 int main (void);
38545
38546 int
38547 main (void)
38548 {
38549
38550 ;
38551 return 0;
38552 }
38553 _ACEOF
38554 if ac_fn_c_try_link "$LINENO"
38555 then :
38556 grub_cv_target_cc_mno_relax="$cand"
38557 fi
38558 rm -f core conftest.err conftest.$ac_objext conftest.beam \
38559 conftest$ac_exeext conftest.$ac_ext
38560 done
38561
38562 fi
38563 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_target_cc_mno_relax" >&5
38564 printf "%s\n" "$grub_cv_target_cc_mno_relax" >&6; }
38565 CFLAGS="$TARGET_CFLAGS"
38566
38567 if test x"$grub_cv_target_cc_mno_relax" != xno ; then
38568 TARGET_CFLAGS="$TARGET_CFLAGS $grub_cv_target_cc_mno_relax"
38569 TARGET_CCASFLAGS="$TARGET_CCASFLAGS $grub_cv_target_cc_mno_relax"
38570 fi
38571
38572 TARGET_CFLAGS="$TARGET_CFLAGS -Wa,-mla-global-with-abs"
38573 TARGET_CCASFLAGS="$TARGET_CCASFLAGS -Wa,-mla-global-with-abs"
38574 fi
38575
38576 if test "x$target_cpu" = xriscv64 || test "x$target_cpu" = xriscv32; then
38577 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for no-relax options" >&5
38578 printf %s "checking for no-relax options... " >&6; }
38579 if test ${grub_cv_target_cc_mno_relax+y}
38580 then :
38581 printf %s "(cached) " >&6
38582 else $as_nop
38583
38584 grub_cv_target_cc_mno_relax=no
38585 for cand in "-mno-relax" "-Wa,-mno-relax"; do
38586 if test x"$grub_cv_target_cc_mno_relax" != xno ; then
38587 break
38588 fi
38589 CFLAGS="$TARGET_CFLAGS $cand -Werror"
38590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38591 /* end confdefs.h. */
38592
38593 asm (".globl start; start:");
38594 void __main (void);
38595 void __main (void) {}
38596 int main (void);
38597
38598 int
38599 main (void)
38600 {
38601
38602 ;
38603 return 0;
38604 }
38605 _ACEOF
38606 if ac_fn_c_try_link "$LINENO"
38607 then :
38608 grub_cv_target_cc_mno_relax="$cand"
38609 fi
38610 rm -f core conftest.err conftest.$ac_objext conftest.beam \
38611 conftest$ac_exeext conftest.$ac_ext
38612 done
38613
38614 fi
38615 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_target_cc_mno_relax" >&5
38616 printf "%s\n" "$grub_cv_target_cc_mno_relax" >&6; }
38617
38618 CFLAGS="$TARGET_CFLAGS"
38619
38620 if test x"$grub_cv_target_cc_mno_relax" != xno ; then
38621 TARGET_CFLAGS="$TARGET_CFLAGS $grub_cv_target_cc_mno_relax"
38622 TARGET_CCASFLAGS="$TARGET_CCASFLAGS $grub_cv_target_cc_mno_relax"
38623 fi
38624 fi
38625
38626 # GRUB doesn't use float or doubles at all. Yet some toolchains may decide
38627 # that floats are a good fit to run instead of what's written in the code.
38628 # Given that floating point unit is disabled (if present to begin with)
38629 # when GRUB is running which may result in various hard crashes.
38630 if test x"$platform" != xemu ; then
38631 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for options to get soft-float" >&5
38632 printf %s "checking for options to get soft-float... " >&6; }
38633 if test ${grub_cv_target_cc_soft_float+y}
38634 then :
38635 printf %s "(cached) " >&6
38636 else $as_nop
38637
38638 grub_cv_target_cc_soft_float=no
38639 if test "x$target_cpu" = xarm64; then
38640 CFLAGS="$TARGET_CFLAGS -mgeneral-regs-only -Werror"
38641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38642 /* end confdefs.h. */
38643
38644 int
38645 main (void)
38646 {
38647
38648 ;
38649 return 0;
38650 }
38651 _ACEOF
38652 if ac_fn_c_try_compile "$LINENO"
38653 then :
38654 grub_cv_target_cc_soft_float="-mgeneral-regs-only"
38655 fi
38656 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
38657 fi
38658 if test "x$target_cpu" = xriscv32; then
38659 CFLAGS="$TARGET_CFLAGS -march=rv32imac -mabi=ilp32 -Werror"
38660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38661 /* end confdefs.h. */
38662
38663 int
38664 main (void)
38665 {
38666
38667 ;
38668 return 0;
38669 }
38670 _ACEOF
38671 if ac_fn_c_try_compile "$LINENO"
38672 then :
38673 grub_cv_target_cc_soft_float="-march=rv32imac -mabi=ilp32"
38674 fi
38675 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
38676 # ISA spec version 20191213 factored out extensions Zicsr and Zifencei
38677 CFLAGS="$TARGET_CFLAGS -march=rv32imac_zicsr_zifencei -mabi=ilp32 -Werror"
38678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38679 /* end confdefs.h. */
38680
38681 int
38682 main (void)
38683 {
38684
38685 ;
38686 return 0;
38687 }
38688 _ACEOF
38689 if ac_fn_c_try_compile "$LINENO"
38690 then :
38691 grub_cv_target_cc_soft_float="-march=rv32imac_zicsr_zifencei -mabi=ilp32"
38692 fi
38693 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
38694 fi
38695 if test "x$target_cpu" = xriscv64; then
38696 CFLAGS="$TARGET_CFLAGS -march=rv64imac -mabi=lp64 -Werror"
38697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38698 /* end confdefs.h. */
38699
38700 int
38701 main (void)
38702 {
38703
38704 ;
38705 return 0;
38706 }
38707 _ACEOF
38708 if ac_fn_c_try_compile "$LINENO"
38709 then :
38710 grub_cv_target_cc_soft_float="-march=rv64imac -mabi=lp64"
38711 fi
38712 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
38713 # ISA spec version 20191213 factored out extensions Zicsr and Zifencei
38714 CFLAGS="$TARGET_CFLAGS -march=rv64imac_zicsr_zifencei -mabi=lp64 -Werror"
38715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38716 /* end confdefs.h. */
38717
38718 int
38719 main (void)
38720 {
38721
38722 ;
38723 return 0;
38724 }
38725 _ACEOF
38726 if ac_fn_c_try_compile "$LINENO"
38727 then :
38728 grub_cv_target_cc_soft_float="-march=rv64imac_zicsr_zifencei -mabi=lp64"
38729 fi
38730 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
38731 fi
38732 if test "x$target_cpu" = xia64; then
38733 CFLAGS="$TARGET_CFLAGS -mno-inline-float-divide -mno-inline-sqrt -Werror"
38734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38735 /* end confdefs.h. */
38736
38737 int
38738 main (void)
38739 {
38740
38741 ;
38742 return 0;
38743 }
38744 _ACEOF
38745 if ac_fn_c_try_compile "$LINENO"
38746 then :
38747 grub_cv_target_cc_soft_float="-mno-inline-float-divide -mno-inline-sqrt"
38748 fi
38749 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
38750 fi
38751 if test "x$target_cpu" = xsh4; then
38752 CFLAGS="$TARGET_CFLAGS -m4-nofpu -Werror"
38753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38754 /* end confdefs.h. */
38755
38756 int
38757 main (void)
38758 {
38759
38760 ;
38761 return 0;
38762 }
38763 _ACEOF
38764 if ac_fn_c_try_compile "$LINENO"
38765 then :
38766 grub_cv_target_cc_soft_float="-m4-nofpu"
38767 fi
38768 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
38769 fi
38770 for cand in "-msoft-float -Xclang -msoft-float -Xclang -no-implicit-float" \
38771 "-Xclang -msoft-float -Xclang -no-implicit-float" \
38772 "-Xclang -msoft-float" "-msoft-float"; do
38773 if test x"$grub_cv_target_cc_soft_float" != xno ; then
38774 break
38775 fi
38776 CFLAGS="$TARGET_CFLAGS $cand -Werror"
38777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38778 /* end confdefs.h. */
38779
38780 int
38781 main (void)
38782 {
38783
38784 ;
38785 return 0;
38786 }
38787 _ACEOF
38788 if ac_fn_c_try_compile "$LINENO"
38789 then :
38790 grub_cv_target_cc_soft_float="$cand"
38791 fi
38792 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
38793 done
38794
38795 fi
38796 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_target_cc_soft_float" >&5
38797 printf "%s\n" "$grub_cv_target_cc_soft_float" >&6; }
38798
38799 if test x"$grub_cv_target_cc_soft_float" = xno ; then
38800 as_fn_error $? "could not force soft-float" "$LINENO" 5
38801 fi
38802
38803 case x"$grub_cv_target_cc_soft_float" in
38804 x*"-Xclang"*)
38805 # A trick so that clang doesn't see it on link stаge
38806 TARGET_CPPFLAGS="$TARGET_CPPFLAGS $grub_cv_target_cc_soft_float"
38807 ;;
38808 *)
38809 TARGET_CFLAGS="$TARGET_CFLAGS $grub_cv_target_cc_soft_float"
38810 ;;
38811 esac
38812 TARGET_CCASFLAGS="$TARGET_CCASFLAGS $grub_cv_target_cc_soft_float"
38813
38814 fi
38815
38816 if test x"$target_cpu" = xsparc64 ; then
38817 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for options to reserve application registers" >&5
38818 printf %s "checking for options to reserve application registers... " >&6; }
38819 if test ${grub_cv_target_cc_mno_app_regs+y}
38820 then :
38821 printf %s "(cached) " >&6
38822 else $as_nop
38823
38824 grub_cv_target_cc_mno_app_regs=no
38825 for cand in "-mllvm -sparc-reserve-app-registers" \
38826 "-mno-app-regs"; do
38827 if test x"$grub_cv_target_cc_mno_app_regs" != xno ; then
38828 break
38829 fi
38830 CFLAGS="$TARGET_CFLAGS $cand -Werror"
38831 CPPFLAGS="$TARGET_CPPFLAGS"
38832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38833 /* end confdefs.h. */
38834
38835 int
38836 main (void)
38837 {
38838
38839 ;
38840 return 0;
38841 }
38842 _ACEOF
38843 if ac_fn_c_try_compile "$LINENO"
38844 then :
38845 grub_cv_target_cc_mno_app_regs="$cand"
38846 fi
38847 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
38848 done
38849
38850 fi
38851 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_target_cc_mno_app_regs" >&5
38852 printf "%s\n" "$grub_cv_target_cc_mno_app_regs" >&6; }
38853
38854 if test x"$grub_cv_target_cc_mno_app_regs" = xno ; then
38855 as_fn_error $? "could not reserve application registers" "$LINENO" 5
38856 fi
38857 if test x"$grub_cv_target_cc_mno_app_regs" = x"-mllvm -sparc-reserve-app-registers" ; then
38858 # A trick so that clang doesn't see it on link stаge
38859 TARGET_CPPFLAGS="$TARGET_CPPFLAGS $grub_cv_target_cc_mno_app_regs"
38860 else
38861 TARGET_CFLAGS="$TARGET_CFLAGS $grub_cv_target_cc_mno_app_regs"
38862 fi
38863
38864 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for no-relax options" >&5
38865 printf %s "checking for no-relax options... " >&6; }
38866 if test ${grub_cv_target_cc_mno_relax+y}
38867 then :
38868 printf %s "(cached) " >&6
38869 else $as_nop
38870
38871 grub_cv_target_cc_mno_relax=no
38872 for cand in "-mno-relax" "-Wl,--no-relax"; do
38873 if test x"$grub_cv_target_cc_mno_relax" != xno ; then
38874 break
38875 fi
38876 LDFLAGS="$TARGET_LDFLAGS $cand -nostdlib -static"
38877 CFLAGS="$TARGET_CFLAGS -Werror"
38878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38879 /* end confdefs.h. */
38880
38881 asm (".globl start; start:");
38882 void __main (void);
38883 void __main (void) {}
38884 int main (void);
38885
38886 int
38887 main (void)
38888 {
38889
38890 ;
38891 return 0;
38892 }
38893 _ACEOF
38894 if ac_fn_c_try_link "$LINENO"
38895 then :
38896 grub_cv_target_cc_mno_relax="$cand"
38897 fi
38898 rm -f core conftest.err conftest.$ac_objext conftest.beam \
38899 conftest$ac_exeext conftest.$ac_ext
38900 done
38901
38902 fi
38903 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_target_cc_mno_relax" >&5
38904 printf "%s\n" "$grub_cv_target_cc_mno_relax" >&6; }
38905 LDFLAGS="$TARGET_LDFLAGS"
38906 CFLAGS="$TARGET_CFLAGS"
38907
38908 if test x"$grub_cv_target_cc_mno_relax" = xno ; then
38909 as_fn_error $? "could not find no-relax options" "$LINENO" 5
38910 fi
38911 TARGET_LDFLAGS="$TARGET_LDFLAGS $grub_cv_target_cc_mno_relax"
38912 fi
38913
38914 # The backtrace module relies on frame pointers and the default optimization
38915 # level, -Os, omits them. Make sure they are enabled.
38916 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -fno-omit-frame-pointer works" >&5
38917 printf %s "checking whether -fno-omit-frame-pointer works... " >&6; }
38918 if test ${grub_cv_cc_fno_omit_frame_pointer+y}
38919 then :
38920 printf %s "(cached) " >&6
38921 else $as_nop
38922
38923 CFLAGS="$TARGET_CFLAGS -fno-omit-frame-pointer"
38924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38925 /* end confdefs.h. */
38926
38927 int
38928 main (void)
38929 {
38930
38931 ;
38932 return 0;
38933 }
38934 _ACEOF
38935 if ac_fn_c_try_compile "$LINENO"
38936 then :
38937 grub_cv_cc_fno_omit_frame_pointer=yes
38938 else $as_nop
38939 grub_cv_cc_fno_omit_frame_pointer=no
38940 fi
38941 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
38942
38943 fi
38944 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_cc_fno_omit_frame_pointer" >&5
38945 printf "%s\n" "$grub_cv_cc_fno_omit_frame_pointer" >&6; }
38946
38947 if test "x$grub_cv_cc_fno_omit_frame_pointer" = xyes; then
38948 TARGET_CFLAGS="$TARGET_CFLAGS -fno-omit-frame-pointer"
38949 fi
38950
38951 # By default, GCC 4.4 generates .eh_frame sections containing unwind
38952 # information in some cases where it previously did not. GRUB doesn't need
38953 # these and they just use up vital space. Restore the old compiler
38954 # behaviour.
38955 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -fno-dwarf2-cfi-asm works" >&5
38956 printf %s "checking whether -fno-dwarf2-cfi-asm works... " >&6; }
38957 if test ${grub_cv_cc_fno_dwarf2_cfi_asm+y}
38958 then :
38959 printf %s "(cached) " >&6
38960 else $as_nop
38961
38962 CFLAGS="$TARGET_CFLAGS -fno-dwarf2-cfi-asm"
38963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38964 /* end confdefs.h. */
38965
38966 int
38967 main (void)
38968 {
38969
38970 ;
38971 return 0;
38972 }
38973 _ACEOF
38974 if ac_fn_c_try_compile "$LINENO"
38975 then :
38976 grub_cv_cc_fno_dwarf2_cfi_asm=yes
38977 else $as_nop
38978 grub_cv_cc_fno_dwarf2_cfi_asm=no
38979 fi
38980 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
38981
38982 fi
38983 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_cc_fno_dwarf2_cfi_asm" >&5
38984 printf "%s\n" "$grub_cv_cc_fno_dwarf2_cfi_asm" >&6; }
38985
38986 if test "x$grub_cv_cc_fno_dwarf2_cfi_asm" = xyes; then
38987 TARGET_CFLAGS="$TARGET_CFLAGS -fno-dwarf2-cfi-asm"
38988 fi
38989
38990 if test x"$target_os" = xcygwin; then
38991 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether option -fno-reorder-functions works" >&5
38992 printf %s "checking whether option -fno-reorder-functions works... " >&6; }
38993 if test ${grub_cv_cc_no_reorder_functions+y}
38994 then :
38995 printf %s "(cached) " >&6
38996 else $as_nop
38997
38998 CFLAGS="$TARGET_CFLAGS -fno-reorder-functions"
38999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39000 /* end confdefs.h. */
39001
39002 int
39003 main (void)
39004 {
39005
39006 ;
39007 return 0;
39008 }
39009 _ACEOF
39010 if ac_fn_c_try_compile "$LINENO"
39011 then :
39012 grub_cv_cc_no_reorder_functions=yes
39013 else $as_nop
39014 grub_cv_cc_no_reorder_functions=no
39015 fi
39016 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
39017
39018 fi
39019 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_cc_no_reorder_functions" >&5
39020 printf "%s\n" "$grub_cv_cc_no_reorder_functions" >&6; }
39021 fi
39022
39023 if test x"$target_os" = xcygwin && test "x$grub_cv_cc_no_reorder_functions" = xyes; then
39024 TARGET_CFLAGS="$TARGET_CFLAGS -fno-reorder-functions"
39025 fi
39026
39027 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -mno-stack-arg-probe works" >&5
39028 printf %s "checking whether -mno-stack-arg-probe works... " >&6; }
39029 if test ${grub_cv_cc_mno_stack_arg_probe+y}
39030 then :
39031 printf %s "(cached) " >&6
39032 else $as_nop
39033
39034 CFLAGS="$TARGET_CFLAGS -mno-stack-arg-probe"
39035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39036 /* end confdefs.h. */
39037
39038 int
39039 main (void)
39040 {
39041
39042 ;
39043 return 0;
39044 }
39045 _ACEOF
39046 if ac_fn_c_try_compile "$LINENO"
39047 then :
39048 grub_cv_cc_mno_stack_arg_probe=yes
39049 else $as_nop
39050 grub_cv_cc_mno_stack_arg_probe=no
39051 fi
39052 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
39053
39054 fi
39055 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_cc_mno_stack_arg_probe" >&5
39056 printf "%s\n" "$grub_cv_cc_mno_stack_arg_probe" >&6; }
39057
39058 if test "x$grub_cv_cc_mno_stack_arg_probe" = xyes; then
39059 TARGET_CFLAGS="$TARGET_CFLAGS -mno-stack-arg-probe"
39060 fi
39061
39062
39063 # By default, GCC 4.6 generates .eh_frame sections containing unwind
39064 # information in some cases where it previously did not. GRUB doesn't need
39065 # these and they just use up vital space. Restore the old compiler
39066 # behaviour.
39067 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -fno-asynchronous-unwind-tables works" >&5
39068 printf %s "checking whether -fno-asynchronous-unwind-tables works... " >&6; }
39069 if test ${grub_cv_cc_fno_asynchronous_unwind_tables+y}
39070 then :
39071 printf %s "(cached) " >&6
39072 else $as_nop
39073
39074 CFLAGS="$TARGET_CFLAGS -fno-asynchronous-unwind-tables"
39075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39076 /* end confdefs.h. */
39077
39078 int
39079 main (void)
39080 {
39081
39082 ;
39083 return 0;
39084 }
39085 _ACEOF
39086 if ac_fn_c_try_compile "$LINENO"
39087 then :
39088 grub_cv_cc_fno_asynchronous_unwind_tables=yes
39089 else $as_nop
39090 grub_cv_cc_fno_asynchronous_unwind_tables=no
39091 fi
39092 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
39093
39094 fi
39095 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_cc_fno_asynchronous_unwind_tables" >&5
39096 printf "%s\n" "$grub_cv_cc_fno_asynchronous_unwind_tables" >&6; }
39097
39098 if test "x$grub_cv_cc_fno_asynchronous_unwind_tables" = xyes; then
39099 TARGET_CFLAGS="$TARGET_CFLAGS -fno-asynchronous-unwind-tables"
39100 fi
39101
39102 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -fno-unwind-tables works" >&5
39103 printf %s "checking whether -fno-unwind-tables works... " >&6; }
39104 if test ${grub_cv_cc_fno_unwind_tables+y}
39105 then :
39106 printf %s "(cached) " >&6
39107 else $as_nop
39108
39109 CFLAGS="$TARGET_CFLAGS -fno-unwind-tables"
39110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39111 /* end confdefs.h. */
39112
39113 int
39114 main (void)
39115 {
39116
39117 ;
39118 return 0;
39119 }
39120 _ACEOF
39121 if ac_fn_c_try_compile "$LINENO"
39122 then :
39123 grub_cv_cc_fno_unwind_tables=yes
39124 else $as_nop
39125 grub_cv_cc_fno_unwind_tables=no
39126 fi
39127 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
39128
39129 fi
39130 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_cc_fno_unwind_tables" >&5
39131 printf "%s\n" "$grub_cv_cc_fno_unwind_tables" >&6; }
39132
39133 if test "x$grub_cv_cc_fno_unwind_tables" = xyes; then
39134 TARGET_CFLAGS="$TARGET_CFLAGS -fno-unwind-tables"
39135 fi
39136
39137 # Do not generate .ident sections.
39138 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -fno-ident works" >&5
39139 printf %s "checking whether -fno-ident works... " >&6; }
39140 if test ${grub_cv_cc_fno_ident+y}
39141 then :
39142 printf %s "(cached) " >&6
39143 else $as_nop
39144
39145 CFLAGS="$TARGET_CFLAGS -fno-ident"
39146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39147 /* end confdefs.h. */
39148
39149 int
39150 main (void)
39151 {
39152
39153 ;
39154 return 0;
39155 }
39156 _ACEOF
39157 if ac_fn_c_try_compile "$LINENO"
39158 then :
39159 grub_cv_cc_fno_ident=yes
39160 else $as_nop
39161 grub_cv_cc_fno_ident=no
39162 fi
39163 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
39164
39165 fi
39166 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_cc_fno_ident" >&5
39167 printf "%s\n" "$grub_cv_cc_fno_ident" >&6; }
39168
39169 if test "x$grub_cv_cc_fno_ident" = xyes; then
39170 TARGET_CFLAGS="$TARGET_CFLAGS -fno-ident"
39171 fi
39172
39173 # Implementation of the --disable-amd64-as-feature-detection switch.
39174 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable AMD64 as(1) feature detection" >&5
39175 printf %s "checking whether to enable AMD64 as(1) feature detection... " >&6; }
39176 if test x$target_cpu = xx86_64 -a x$platform = xefi; then
39177 CPPFLAGS_GCRY_ASM="-D__x86_64 -DHAVE_CPU_ARCH_X86"
39178 # Check whether --enable-amd64-as-feature-detection was given.
39179 if test ${enable_amd64_as_feature_detection+y}
39180 then :
39181 enableval=$enable_amd64_as_feature_detection; amd64_as_feature_detection=$enableval
39182 else $as_nop
39183 amd64_as_feature_detection=yes
39184 fi
39185
39186 else
39187 CPPFLAGS_GCRY_ASM=
39188 amd64_as_feature_detection=no
39189 fi
39190 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $amd64_as_feature_detection" >&5
39191 printf "%s\n" "$amd64_as_feature_detection" >&6; }
39192
39193 #
39194 # Check whether GCC assembler supports features needed for libgcrypt amd64
39195 # implementations
39196 #
39197 if test $amd64_as_feature_detection = yes; then
39198 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether GCC assembler is compatible for amd64 assembly implementations" >&5
39199 printf %s "checking whether GCC assembler is compatible for amd64 assembly implementations... " >&6; }
39200 if test ${grub_cv_gcc_x86_platform_as_ok+y}
39201 then :
39202 printf %s "(cached) " >&6
39203 else $as_nop
39204 if test "$target_cpu" != "x86_64" ; then
39205 grub_cv_gcc_x86_platform_as_ok="n/a"
39206 else
39207 grub_cv_gcc_x86_platform_as_ok=no
39208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39209 /* end confdefs.h. */
39210 __asm__(
39211 /* Test if '.type' and '.size' are supported. */
39212 /* These work only on ELF targets. */
39213 ".text\n\t"
39214 "asmfunc:\n\t"
39215 ".size asmfunc,.-asmfunc;\n\t"
39216 ".type asmfunc,@function;\n\t"
39217 /* Test if assembler allows use of '/' for constant division
39218 * (Solaris/x86 issue). If previous constant division check
39219 * and "-Wa,--divide" workaround failed, this causes assembly
39220 * to be disable on this machine. */
39221 "xorl \$(123456789/12345678), %ebp;\n\t"
39222 );
39223 void asmfunc(void);
39224 int
39225 main (void)
39226 {
39227 asmfunc();
39228 ;
39229 return 0;
39230 }
39231 _ACEOF
39232 if ac_fn_c_try_link "$LINENO"
39233 then :
39234 grub_cv_gcc_x86_platform_as_ok=yes
39235 fi
39236 rm -f core conftest.err conftest.$ac_objext conftest.beam \
39237 conftest$ac_exeext conftest.$ac_ext
39238 fi
39239 fi
39240 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_gcc_x86_platform_as_ok" >&5
39241 printf "%s\n" "$grub_cv_gcc_x86_platform_as_ok" >&6; }
39242 if test "$grub_cv_gcc_x86_platform_as_ok" = "yes"; then
39243 # Define __PIC__ to ensure the assembly code use PIC instructions
39244 CPPFLAGS_GCRY_ASM="$CPPFLAGS_GCRY_ASM -D__PIC__=1 -DHAVE_COMPATIBLE_GCC_AMD64_PLATFORM_AS"
39245 fi
39246
39247 #
39248 # Check whether GCC assembler supports Intel syntax
39249 #
39250 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether GCC assembler is compatible for Intel syntax assembly implementations" >&5
39251 printf %s "checking whether GCC assembler is compatible for Intel syntax assembly implementations... " >&6; }
39252 if test ${grub_cv_gcc_platform_as_ok_for_intel_syntax+y}
39253 then :
39254 printf %s "(cached) " >&6
39255 else $as_nop
39256 if test "$target_cpu" != "x86_64" ; then
39257 grub_cv_gcc_platform_as_ok_for_intel_syntax="n/a"
39258 else
39259 grub_cv_gcc_platform_as_ok_for_intel_syntax=no
39260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39261 /* end confdefs.h. */
39262 __asm__(
39263 ".intel_syntax noprefix\n\t"
39264 ".text\n\t"
39265 "actest:\n\t"
39266 "pxor xmm1, xmm7;\n\t"
39267 "vperm2i128 ymm2, ymm3, ymm0, 1;\n\t"
39268 "add eax, ebp;\n\t"
39269 "rorx eax, ebp, 1;\n\t"
39270 "sub eax, [esp + 4];\n\t"
39271 "add dword ptr [esp + eax], 0b10101;\n\t"
39272 ".att_syntax prefix\n\t"
39273 );
39274 void actest(void);
39275 int
39276 main (void)
39277 {
39278 actest();
39279 ;
39280 return 0;
39281 }
39282 _ACEOF
39283 if ac_fn_c_try_link "$LINENO"
39284 then :
39285 grub_cv_gcc_platform_as_ok_for_intel_syntax=yes
39286 fi
39287 rm -f core conftest.err conftest.$ac_objext conftest.beam \
39288 conftest$ac_exeext conftest.$ac_ext
39289 fi
39290 fi
39291 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_gcc_platform_as_ok_for_intel_syntax" >&5
39292 printf "%s\n" "$grub_cv_gcc_platform_as_ok_for_intel_syntax" >&6; }
39293 if test "$grub_cv_gcc_platform_as_ok_for_intel_syntax" = "yes" ; then
39294 CPPFLAGS_GCRY_ASM="$CPPFLAGS_GCRY_ASM -DHAVE_INTEL_SYNTAX_PLATFORM_AS"
39295 fi
39296
39297 #
39298 # Check whether GCC inline assembler supports SSSE3 instructions
39299 #
39300 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether GCC inline assembler supports SSSE3 instructions" >&5
39301 printf %s "checking whether GCC inline assembler supports SSSE3 instructions... " >&6; }
39302 if test ${grub_cv_gcc_inline_asm_ssse3+y}
39303 then :
39304 printf %s "(cached) " >&6
39305 else $as_nop
39306 if test "$target_cpu" != "x86_64" ; then
39307 grub_cv_gcc_inline_asm_ssse3="n/a"
39308 else
39309 grub_cv_gcc_inline_asm_ssse3=no
39310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39311 /* end confdefs.h. */
39312 static unsigned char be_mask[16] __attribute__ ((aligned (16))) =
39313 { 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 };
39314 void a(void) {
39315 __asm__("pshufb %[mask], %%xmm2\n\t"::[mask]"m"(*be_mask):);
39316 }
39317 int
39318 main (void)
39319 {
39320 a();
39321 ;
39322 return 0;
39323 }
39324 _ACEOF
39325 if ac_fn_c_try_link "$LINENO"
39326 then :
39327 grub_cv_gcc_inline_asm_ssse3=yes
39328 fi
39329 rm -f core conftest.err conftest.$ac_objext conftest.beam \
39330 conftest$ac_exeext conftest.$ac_ext
39331 fi
39332 fi
39333 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_gcc_inline_asm_ssse3" >&5
39334 printf "%s\n" "$grub_cv_gcc_inline_asm_ssse3" >&6; }
39335 if test "$grub_cv_gcc_inline_asm_ssse3" = "yes" ; then
39336 CPPFLAGS_GCRY_ASM="$CPPFLAGS_GCRY_ASM -DHAVE_GCC_INLINE_ASM_SSSE3"
39337 fi
39338
39339 #
39340 # Check whether GCC inline assembler supports SHA Extensions instructions.
39341 #
39342 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether GCC inline assembler supports SHA Extensions instructions" >&5
39343 printf %s "checking whether GCC inline assembler supports SHA Extensions instructions... " >&6; }
39344 if test ${grub_cv_gcc_inline_asm_shaext+y}
39345 then :
39346 printf %s "(cached) " >&6
39347 else $as_nop
39348 if test "$target_cpu" != "x86_64" ; then
39349 grub_cv_gcc_inline_asm_shaext="n/a"
39350 else
39351 grub_cv_gcc_inline_asm_shaext=no
39352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39353 /* end confdefs.h. */
39354 void a(void) {
39355 __asm__("sha1rnds4 \$0, %%xmm1, %%xmm3\n\t":::"cc");
39356 __asm__("sha1nexte %%xmm1, %%xmm3\n\t":::"cc");
39357 __asm__("sha1msg1 %%xmm1, %%xmm3\n\t":::"cc");
39358 __asm__("sha1msg2 %%xmm1, %%xmm3\n\t":::"cc");
39359 __asm__("sha256rnds2 %%xmm0, %%xmm1, %%xmm3\n\t":::"cc");
39360 __asm__("sha256msg1 %%xmm1, %%xmm3\n\t":::"cc");
39361 __asm__("sha256msg2 %%xmm1, %%xmm3\n\t":::"cc");
39362 }
39363 int
39364 main (void)
39365 {
39366 a();
39367 ;
39368 return 0;
39369 }
39370 _ACEOF
39371 if ac_fn_c_try_link "$LINENO"
39372 then :
39373 grub_cv_gcc_inline_asm_shaext=yes
39374 fi
39375 rm -f core conftest.err conftest.$ac_objext conftest.beam \
39376 conftest$ac_exeext conftest.$ac_ext
39377 fi
39378 fi
39379 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_gcc_inline_asm_shaext" >&5
39380 printf "%s\n" "$grub_cv_gcc_inline_asm_shaext" >&6; }
39381 if test "$grub_cv_gcc_inline_asm_shaext" = "yes" ; then
39382 CPPFLAGS_GCRY_ASM="$CPPFLAGS_GCRY_ASM -DHAVE_GCC_INLINE_ASM_SHAEXT -DENABLE_SHAEXT_SUPPORT"
39383 fi
39384
39385 #
39386 # Check whether GCC inline assembler supports SSE4.1 instructions.
39387 #
39388 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether GCC inline assembler supports SSE4.1 instructions" >&5
39389 printf %s "checking whether GCC inline assembler supports SSE4.1 instructions... " >&6; }
39390 if test ${grub_cv_gcc_inline_asm_sse41+y}
39391 then :
39392 printf %s "(cached) " >&6
39393 else $as_nop
39394 if test "$target_cpu" != "x86_64" ; then
39395 grub_cv_gcc_inline_asm_sse41="n/a"
39396 else
39397 grub_cv_gcc_inline_asm_sse41=no
39398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39399 /* end confdefs.h. */
39400 void a(void) {
39401 int i;
39402 __asm__("pextrd \$2, %%xmm0, %[out]\n\t" : [out] "=m" (i));
39403 }
39404 int
39405 main (void)
39406 {
39407 a();
39408 ;
39409 return 0;
39410 }
39411 _ACEOF
39412 if ac_fn_c_try_link "$LINENO"
39413 then :
39414 grub_cv_gcc_inline_asm_sse41=yes
39415 fi
39416 rm -f core conftest.err conftest.$ac_objext conftest.beam \
39417 conftest$ac_exeext conftest.$ac_ext
39418 fi
39419 fi
39420 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_gcc_inline_asm_sse41" >&5
39421 printf "%s\n" "$grub_cv_gcc_inline_asm_sse41" >&6; }
39422 if test "$grub_cv_gcc_inline_asm_sse41" = "yes" ; then
39423 CPPFLAGS_GCRY_ASM="$CPPFLAGS_GCRY_ASM -DHAVE_GCC_INLINE_ASM_SSE41"
39424 fi
39425
39426 #
39427 # Check whether GCC inline assembler supports AVX instructions
39428 #
39429 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether GCC inline assembler supports AVX instructions" >&5
39430 printf %s "checking whether GCC inline assembler supports AVX instructions... " >&6; }
39431 if test ${grub_cv_gcc_inline_asm_avx+y}
39432 then :
39433 printf %s "(cached) " >&6
39434 else $as_nop
39435 if test "$target_cpu" != "x86_64" ; then
39436 grub_cv_gcc_inline_asm_avx="n/a"
39437 else
39438 grub_cv_gcc_inline_asm_avx=no
39439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39440 /* end confdefs.h. */
39441 void a(void) {
39442 __asm__("xgetbv; vaesdeclast (%[mem]),%%xmm0,%%xmm7\n\t"::[mem]"r"(0):);
39443 }
39444 int
39445 main (void)
39446 {
39447 a();
39448 ;
39449 return 0;
39450 }
39451 _ACEOF
39452 if ac_fn_c_try_link "$LINENO"
39453 then :
39454 grub_cv_gcc_inline_asm_avx=yes
39455 fi
39456 rm -f core conftest.err conftest.$ac_objext conftest.beam \
39457 conftest$ac_exeext conftest.$ac_ext
39458 fi
39459 fi
39460 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_gcc_inline_asm_avx" >&5
39461 printf "%s\n" "$grub_cv_gcc_inline_asm_avx" >&6; }
39462 if test "$grub_cv_gcc_inline_asm_avx" = "yes" ; then
39463 CPPFLAGS_GCRY_ASM="$CPPFLAGS_GCRY_ASM -DHAVE_GCC_INLINE_ASM_AVX"
39464 fi
39465
39466 #
39467 # Check whether GCC inline assembler supports AVX2 instructions
39468 #
39469 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether GCC inline assembler supports AVX2 instructions" >&5
39470 printf %s "checking whether GCC inline assembler supports AVX2 instructions... " >&6; }
39471 if test ${grub_cv_gcc_inline_asm_avx2+y}
39472 then :
39473 printf %s "(cached) " >&6
39474 else $as_nop
39475 if test "$target_cpu" != "x86_64" ; then
39476 grub_cv_gcc_inline_asm_avx2="n/a"
39477 else
39478 grub_cv_gcc_inline_asm_avx2=no
39479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39480 /* end confdefs.h. */
39481 void a(void) {
39482 __asm__("xgetbv; vpbroadcastb %%xmm7,%%ymm1\n\t":::"cc");
39483 }
39484 int
39485 main (void)
39486 {
39487 a();
39488 ;
39489 return 0;
39490 }
39491 _ACEOF
39492 if ac_fn_c_try_link "$LINENO"
39493 then :
39494 grub_cv_gcc_inline_asm_avx2=yes
39495 fi
39496 rm -f core conftest.err conftest.$ac_objext conftest.beam \
39497 conftest$ac_exeext conftest.$ac_ext
39498 fi
39499 fi
39500 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_gcc_inline_asm_avx2" >&5
39501 printf "%s\n" "$grub_cv_gcc_inline_asm_avx2" >&6; }
39502 if test "$grub_cv_gcc_inline_asm_avx2" = "yes" ; then
39503 CPPFLAGS_GCRY_ASM="$CPPFLAGS_GCRY_ASM -DHAVE_GCC_INLINE_ASM_AVX2"
39504 fi
39505
39506 #
39507 # Check whether GCC inline assembler supports AVX512 instructions
39508 #
39509 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether GCC inline assembler supports AVX512 instructions" >&5
39510 printf %s "checking whether GCC inline assembler supports AVX512 instructions... " >&6; }
39511 if test ${grub_cv_gcc_inline_asm_avx512+y}
39512 then :
39513 printf %s "(cached) " >&6
39514 else $as_nop
39515 if test "$target_cpu" != "x86_64" ; then
39516 grub_cv_gcc_inline_asm_avx512="n/a"
39517 else
39518 grub_cv_gcc_inline_asm_avx512=no
39519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39520 /* end confdefs.h. */
39521 void a(void) {
39522 __asm__("xgetbv; vpopcntq %%zmm7, %%zmm1%{%%k1%}%{z%};\n\t":::"cc");
39523 __asm__("vpexpandb %%zmm3, %%zmm1;\n\t":::"cc");
39524 __asm__("vpxorq %%xmm7, %%xmm7, %%xmm7;\n\t":::"cc");
39525 __asm__("vpxorq %%ymm7, %%ymm7, %%ymm7;\n\t":::"cc");
39526 __asm__("vpxorq (%%eax)%{1to8%}, %%zmm7, %%zmm7;\n\t":::"cc");
39527 }
39528 int
39529 main (void)
39530 {
39531 a();
39532 ;
39533 return 0;
39534 }
39535 _ACEOF
39536 if ac_fn_c_try_link "$LINENO"
39537 then :
39538 grub_cv_gcc_inline_asm_avx512=yes
39539 fi
39540 rm -f core conftest.err conftest.$ac_objext conftest.beam \
39541 conftest$ac_exeext conftest.$ac_ext
39542 fi
39543 fi
39544 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_gcc_inline_asm_avx512" >&5
39545 printf "%s\n" "$grub_cv_gcc_inline_asm_avx512" >&6; }
39546 if test "$grub_cv_gcc_inline_asm_avx512" = "yes" ; then
39547 CPPFLAGS_GCRY_ASM="$CPPFLAGS_GCRY_ASM -DHAVE_GCC_INLINE_ASM_AVX512"
39548 fi
39549
39550 #
39551 # Check whether GCC inline assembler supports BMI2 instructions
39552 #
39553 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether GCC inline assembler supports BMI2 instructions" >&5
39554 printf %s "checking whether GCC inline assembler supports BMI2 instructions... " >&6; }
39555 if test ${grub_cv_gcc_inline_asm_bmi2+y}
39556 then :
39557 printf %s "(cached) " >&6
39558 else $as_nop
39559 if test "$target_cpu" != "x86_64" ; then
39560 grub_cv_gcc_inline_asm_bmi2="n/a"
39561 else
39562 grub_cv_gcc_inline_asm_bmi2=no
39563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39564 /* end confdefs.h. */
39565 unsigned int a(unsigned int x, unsigned int y) {
39566 unsigned int tmp1, tmp2;
39567 asm ("rorxl %2, %1, %0"
39568 : "=r" (tmp1)
39569 : "rm0" (x), "J" (32 - ((23) & 31)));
39570 asm ("andnl %2, %1, %0"
39571 : "=r" (tmp2)
39572 : "r0" (x), "rm" (y));
39573 return tmp1 + tmp2;
39574 }
39575 int
39576 main (void)
39577 {
39578 a(1, 2);
39579 ;
39580 return 0;
39581 }
39582 _ACEOF
39583 if ac_fn_c_try_link "$LINENO"
39584 then :
39585 grub_cv_gcc_inline_asm_bmi2=yes
39586 fi
39587 rm -f core conftest.err conftest.$ac_objext conftest.beam \
39588 conftest$ac_exeext conftest.$ac_ext
39589 fi
39590 fi
39591 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_gcc_inline_asm_bmi2" >&5
39592 printf "%s\n" "$grub_cv_gcc_inline_asm_bmi2" >&6; }
39593 if test "$grub_cv_gcc_inline_asm_bmi2" = "yes" ; then
39594 CPPFLAGS_GCRY_ASM="$CPPFLAGS_GCRY_ASM -DHAVE_GCC_INLINE_ASM_BMI2"
39595 fi
39596 fi
39597
39598
39599
39600 CFLAGS="$TARGET_CFLAGS"
39601
39602
39603 if test x"$platform" = xemu ; then
39604 TARGET_OBJ2ELF=
39605 grub_cv_target_cc_link_format=
39606 case "$host_os" in
39607 *darwin* | *mac*)
39608 grub_cv_target_cc_link_format="-arch,${target_cpu}"
39609 TARGET_LDFLAGS="$TARGET_LDFLAGS -Wl,$grub_cv_target_cc_link_format"
39610 ;;
39611 *windows* | *cygwin* | *mingw*)
39612 if test x${target_cpu} = xi386 ; then
39613 grub_cv_target_cc_link_format=-mi386pe
39614 TARGET_OBJ2ELF='./build-grub-pe2elf$(BUILD_EXEEXT)'
39615 fi
39616 if test x${target_cpu} = xx86_64 ; then
39617 grub_cv_target_cc_link_format=-mi386pep
39618 TARGET_OBJ2ELF='./build-grub-pep2elf$(BUILD_EXEEXT)'
39619 fi
39620 TARGET_LDFLAGS="$TARGET_LDFLAGS -Wl,$grub_cv_target_cc_link_format"
39621 ;;
39622 esac
39623 elif test x"$target_cpu" = xi386 || test x"$target_cpu" = xx86_64; then
39624 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for target linking format" >&5
39625 printf %s "checking for target linking format... " >&6; }
39626 if test ${grub_cv_target_cc_link_format+y}
39627 then :
39628 printf %s "(cached) " >&6
39629 else $as_nop
39630
39631 grub_cv_target_cc_link_format=unknown
39632 for format in -melf_${target_cpu} -melf_${target_cpu}_fbsd -melf_${target_cpu}_obsd -melf_${target_cpu}_haiku -mi386pe -mi386pep -arch,${target_cpu}; do
39633 if test x${target_cpu} != xi386 && test x$format = x-mi386pe; then
39634 continue
39635 fi
39636 if test x${target_cpu} != xx86_64 && test x$format = x-mi386pep; then
39637 continue
39638 fi
39639 CFLAGS="$TARGET_CFLAGS"
39640 LDFLAGS="$TARGET_LDFLAGS -Wl,$format -nostdlib -static"
39641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39642 /* end confdefs.h. */
39643
39644 asm (".globl start; start:");
39645 asm (".globl _start; _start:");
39646 asm (".globl __start; __start:");
39647 void __main (void);
39648 void __main (void) {}
39649
39650 int
39651 main (void)
39652 {
39653
39654 ;
39655 return 0;
39656 }
39657 _ACEOF
39658 if ac_fn_c_try_link "$LINENO"
39659 then :
39660 flag=1
39661 else $as_nop
39662 flag=0
39663 fi
39664 rm -f core conftest.err conftest.$ac_objext conftest.beam \
39665 conftest$ac_exeext conftest.$ac_ext
39666 if test x"$flag" = x1; then
39667 grub_cv_target_cc_link_format="$format"
39668 break
39669 fi
39670 done
39671 fi
39672 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_target_cc_link_format" >&5
39673 printf "%s\n" "$grub_cv_target_cc_link_format" >&6; }
39674 if test x"$grub_cv_target_cc_link_format" = xunknown; then
39675 as_fn_error $? "no suitable link format found" "$LINENO" 5
39676 fi
39677 TARGET_LDFLAGS="$TARGET_LDFLAGS -Wl,$grub_cv_target_cc_link_format"
39678 if test x"$grub_cv_target_cc_link_format" = x-mi386pe ; then
39679 TARGET_OBJ2ELF='./build-grub-pe2elf$(BUILD_EXEEXT)'
39680 fi
39681 if test x"$grub_cv_target_cc_link_format" = x-mi386pep ; then
39682 TARGET_OBJ2ELF='./build-grub-pep2elf$(BUILD_EXEEXT)'
39683 fi
39684 fi
39685
39686 if test x$grub_cv_target_cc_link_format = x-arch,i386 || test x$grub_cv_target_cc_link_format = x-arch,x86_64; then
39687 TARGET_APPLE_LINKER=1
39688 # Extract the first word of "objconv", so it can be a program name with args.
39689 set dummy objconv; ac_word=$2
39690 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39691 printf %s "checking for $ac_word... " >&6; }
39692 if test ${ac_cv_prog_TARGET_OBJCONV+y}
39693 then :
39694 printf %s "(cached) " >&6
39695 else $as_nop
39696 if test -n "$TARGET_OBJCONV"; then
39697 ac_cv_prog_TARGET_OBJCONV="$TARGET_OBJCONV" # Let the user override the test.
39698 else
39699 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39700 for as_dir in $PATH
39701 do
39702 IFS=$as_save_IFS
39703 case $as_dir in #(((
39704 '') as_dir=./ ;;
39705 */) ;;
39706 *) as_dir=$as_dir/ ;;
39707 esac
39708 for ac_exec_ext in '' $ac_executable_extensions; do
39709 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
39710 ac_cv_prog_TARGET_OBJCONV="objconv"
39711 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
39712 break 2
39713 fi
39714 done
39715 done
39716 IFS=$as_save_IFS
39717
39718 fi
39719 fi
39720 TARGET_OBJCONV=$ac_cv_prog_TARGET_OBJCONV
39721 if test -n "$TARGET_OBJCONV"; then
39722 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $TARGET_OBJCONV" >&5
39723 printf "%s\n" "$TARGET_OBJCONV" >&6; }
39724 else
39725 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
39726 printf "%s\n" "no" >&6; }
39727 fi
39728
39729
39730 if test "x$TARGET_OBJCONV" = x ; then
39731 # Extract the first word of "objconv", so it can be a program name with args.
39732 set dummy objconv; ac_word=$2
39733 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39734 printf %s "checking for $ac_word... " >&6; }
39735 if test ${ac_cv_prog_TARGET_OBJCONV+y}
39736 then :
39737 printf %s "(cached) " >&6
39738 else $as_nop
39739 if test -n "$TARGET_OBJCONV"; then
39740 ac_cv_prog_TARGET_OBJCONV="$TARGET_OBJCONV" # Let the user override the test.
39741 else
39742 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39743 for as_dir in .
39744 do
39745 IFS=$as_save_IFS
39746 case $as_dir in #(((
39747 '') as_dir=./ ;;
39748 */) ;;
39749 *) as_dir=$as_dir/ ;;
39750 esac
39751 for ac_exec_ext in '' $ac_executable_extensions; do
39752 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
39753 ac_cv_prog_TARGET_OBJCONV="./objconv"
39754 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
39755 break 2
39756 fi
39757 done
39758 done
39759 IFS=$as_save_IFS
39760
39761 fi
39762 fi
39763 TARGET_OBJCONV=$ac_cv_prog_TARGET_OBJCONV
39764 if test -n "$TARGET_OBJCONV"; then
39765 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $TARGET_OBJCONV" >&5
39766 printf "%s\n" "$TARGET_OBJCONV" >&6; }
39767 else
39768 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
39769 printf "%s\n" "no" >&6; }
39770 fi
39771
39772
39773 fi
39774 if test "x$TARGET_OBJCONV" = x ; then
39775 as_fn_error $? "objconv not found which is required when building with apple compiler" "$LINENO" 5
39776 fi
39777 TARGET_IMG_LDSCRIPT=
39778 TARGET_IMG_CFLAGS="-static"
39779 TARGET_IMG_LDFLAGS='-nostdlib -static -Wl,-preload -Wl,-segalign,20'
39780 TARGET_IMG_LDFLAGS_AC='-nostdlib -static -Wl,-preload -Wl,-segalign,20'
39781 TARGET_IMG_BASE_LDOPT="-Wl,-image_base"
39782 TARGET_LDFLAGS_OLDMAGIC=""
39783 elif test x$grub_cv_target_cc_link_format = x-mi386pe || test x$grub_cv_target_cc_link_format = x-mi386pep ; then
39784 TARGET_APPLE_LINKER=0
39785 TARGET_LDFLAGS_OLDMAGIC="-Wl,-N"
39786 TARGET_IMG_LDSCRIPT='$(top_srcdir)'"/conf/i386-cygwin-img-ld.sc"
39787 TARGET_IMG_LDFLAGS="-Wl,-T${TARGET_IMG_LDSCRIPT}"
39788 TARGET_IMG_LDFLAGS_AC="-Wl,-T${srcdir}/conf/i386-cygwin-img-ld.sc"
39789 TARGET_IMG_CFLAGS=
39790 else
39791 TARGET_APPLE_LINKER=0
39792 TARGET_LDFLAGS_OLDMAGIC="-Wl,-N"
39793 TARGET_IMG_LDSCRIPT=
39794 TARGET_IMG_LDFLAGS='-Wl,-N'
39795 TARGET_IMG_LDFLAGS_AC='-Wl,-N'
39796 TARGET_IMG_CFLAGS=
39797 fi
39798
39799 CFLAGS="$TARGET_CFLAGS"
39800
39801 # Check whether --enable-efiemu was given.
39802 if test ${enable_efiemu+y}
39803 then :
39804 enableval=$enable_efiemu;
39805 fi
39806
39807 if test x"$enable_efiemu" = xno ; then
39808 efiemu_excuse="explicitly disabled"
39809 fi
39810
39811 if test x"$grub_cv_target_cc_link_format" = x-mi386pe || test x"$grub_cv_target_cc_link_format" = x-mi386pep ; then
39812 efiemu_excuse="not available on cygwin"
39813 fi
39814 if test x"$target_cpu" != xi386 ; then
39815 efiemu_excuse="only available on i386"
39816 fi
39817 if test x"$platform" = xefi ; then
39818 efiemu_excuse="not available on efi"
39819 fi
39820
39821 if test x"$efiemu_excuse" = x ; then
39822 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether options required for efiemu work" >&5
39823 printf %s "checking whether options required for efiemu work... " >&6; }
39824 if test ${grub_cv_cc_efiemu+y}
39825 then :
39826 printf %s "(cached) " >&6
39827 else $as_nop
39828
39829 CFLAGS="-m64 -nostdlib -O2 -mcmodel=large -mno-red-zone"
39830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39831 /* end confdefs.h. */
39832
39833 int
39834 main (void)
39835 {
39836
39837 ;
39838 return 0;
39839 }
39840 _ACEOF
39841 if ac_fn_c_try_compile "$LINENO"
39842 then :
39843 grub_cv_cc_efiemu=yes
39844 else $as_nop
39845 grub_cv_cc_efiemu=no
39846 fi
39847 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
39848
39849 fi
39850 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_cc_efiemu" >&5
39851 printf "%s\n" "$grub_cv_cc_efiemu" >&6; }
39852 if test x$grub_cv_cc_efiemu = xno; then
39853 efiemu_excuse="cannot compile with -m64 -mcmodel=large -mno-red-zone -nostdlib"
39854 fi
39855 fi
39856 if test x"$efiemu_excuse" = x ; then
39857 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for efiemu64 linking format" >&5
39858 printf %s "checking for efiemu64 linking format... " >&6; }
39859 if test ${grub_cv_target_cc_efiemu64_link_format+y}
39860 then :
39861 printf %s "(cached) " >&6
39862 else $as_nop
39863
39864 grub_cv_target_cc_efiemu64_link_format=unknown
39865 for format in -melf_x86_64 -melf_x86_64_fbsd -melf_x86_64_obsd -melf_x86_64_haiku -arch,x86_64; do
39866 CFLAGS="-m64 -nostdlib -O2 -mcmodel=large -mno-red-zone"
39867 LDFLAGS="-m64 -Wl,$format -nostdlib -static"
39868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39869 /* end confdefs.h. */
39870
39871 asm (".globl start; start:");
39872 asm (".globl _start; _start:");
39873 asm (".globl __start; __start:");
39874 void __main (void);
39875 void __main (void) {}
39876
39877 int
39878 main (void)
39879 {
39880
39881 ;
39882 return 0;
39883 }
39884 _ACEOF
39885 if ac_fn_c_try_link "$LINENO"
39886 then :
39887 flag=1
39888 else $as_nop
39889 flag=0
39890 fi
39891 rm -f core conftest.err conftest.$ac_objext conftest.beam \
39892 conftest$ac_exeext conftest.$ac_ext
39893 if test x"$flag" = x1; then
39894 grub_cv_target_cc_efiemu64_link_format="$format"
39895 break
39896 fi
39897 done
39898 fi
39899 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_target_cc_efiemu64_link_format" >&5
39900 printf "%s\n" "$grub_cv_target_cc_efiemu64_link_format" >&6; }
39901 if test x"$grub_cv_target_cc_efiemu64_link_format" = xunknown; then
39902 efiemu_excuse="no suitable link format for efiemu64 found"
39903 else
39904 EFIEMU64_LINK_FORMAT="-Wl,$grub_cv_target_cc_efiemu64_link_format"
39905 fi
39906 fi
39907 if test x"$enable_efiemu" = xyes && test x"$efiemu_excuse" != x ; then
39908 as_fn_error $? "efiemu runtime was explicitly requested but can't be compiled ($efiemu_excuse)" "$LINENO" 5
39909 fi
39910 if test x"$efiemu_excuse" = x ; then
39911 enable_efiemu=yes
39912 else
39913 enable_efiemu=no
39914 fi
39915
39916
39917
39918 CFLAGS="$TARGET_CFLAGS"
39919
39920
39921
39922
39923 LDFLAGS="$TARGET_LDFLAGS"
39924
39925 if test "$target_cpu"-"$platform" = x86_64-efi; then
39926 # EFI writes to stack below %rsp, we must not use the red zone
39927 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether option -mno-red-zone works" >&5
39928 printf %s "checking whether option -mno-red-zone works... " >&6; }
39929 if test ${grub_cv_cc_no_red_zone+y}
39930 then :
39931 printf %s "(cached) " >&6
39932 else $as_nop
39933
39934 CFLAGS="$TARGET_CFLAGS -mno-red-zone"
39935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39936 /* end confdefs.h. */
39937
39938 int
39939 main (void)
39940 {
39941
39942 ;
39943 return 0;
39944 }
39945 _ACEOF
39946 if ac_fn_c_try_compile "$LINENO"
39947 then :
39948 grub_cv_cc_no_red_zone=yes
39949 else $as_nop
39950 grub_cv_cc_no_red_zone=no
39951 fi
39952 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
39953
39954 fi
39955 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_cc_no_red_zone" >&5
39956 printf "%s\n" "$grub_cv_cc_no_red_zone" >&6; }
39957 if test "x$grub_cv_cc_no_red_zone" = xno; then
39958 as_fn_error $? "-mno-red-zone not supported, upgrade your gcc" "$LINENO" 5
39959 fi
39960
39961 TARGET_CFLAGS="$TARGET_CFLAGS -mno-red-zone"
39962 fi
39963
39964 if test "x$target_cpu" = xarm; then
39965 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for options to disable movt and movw" >&5
39966 printf %s "checking for options to disable movt and movw... " >&6; }
39967 if test ${grub_cv_target_cc_mno_movt+y}
39968 then :
39969 printf %s "(cached) " >&6
39970 else $as_nop
39971
39972 grub_cv_target_cc_mno_movt=no
39973 for cand in "-mno-movt" \
39974 "-mllvm -arm-use-movt=0" \
39975 "-mword-relocations"; do
39976 if test x"$grub_cv_target_cc_mno_movt" != xno ; then
39977 break
39978 fi
39979 CFLAGS="$TARGET_CFLAGS $cand -Werror"
39980 CPPFLAGS="$TARGET_CPPFLAGS"
39981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39982 /* end confdefs.h. */
39983
39984 int
39985 main (void)
39986 {
39987
39988 ;
39989 return 0;
39990 }
39991 _ACEOF
39992 if ac_fn_c_try_compile "$LINENO"
39993 then :
39994 grub_cv_target_cc_mno_movt="$cand"
39995 fi
39996 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
39997 done
39998
39999 fi
40000 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_target_cc_mno_movt" >&5
40001 printf "%s\n" "$grub_cv_target_cc_mno_movt" >&6; }
40002
40003 if test x"$grub_cv_target_cc_mno_movt" != xno ; then
40004 # A trick so that clang doesn't see it on link stage
40005 TARGET_CPPFLAGS="$TARGET_CPPFLAGS $grub_cv_target_cc_mno_movt"
40006 fi
40007 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether option -mthumb-interwork works" >&5
40008 printf %s "checking whether option -mthumb-interwork works... " >&6; }
40009 if test ${grub_cv_cc_mthumb_interwork+y}
40010 then :
40011 printf %s "(cached) " >&6
40012 else $as_nop
40013
40014 CFLAGS="$TARGET_CFLAGS -mthumb-interwork -Werror"
40015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40016 /* end confdefs.h. */
40017
40018 int
40019 main (void)
40020 {
40021
40022 ;
40023 return 0;
40024 }
40025 _ACEOF
40026 if ac_fn_c_try_compile "$LINENO"
40027 then :
40028 grub_cv_cc_mthumb_interwork=yes
40029 else $as_nop
40030 grub_cv_cc_mthumb_interwork=no
40031 fi
40032 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
40033
40034 fi
40035 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_cc_mthumb_interwork" >&5
40036 printf "%s\n" "$grub_cv_cc_mthumb_interwork" >&6; }
40037 if test "x$grub_cv_cc_mthumb_interwork" = xyes; then
40038 TARGET_CFLAGS="$TARGET_CFLAGS -mthumb-interwork"
40039 # Clang defaults to thumb interworking
40040 elif test "x$grub_cv_cc_target_clang" = xno ; then
40041 as_fn_error $? "your compiler doesn't support -mthumb-interwork" "$LINENO" 5
40042 fi
40043 fi
40044
40045 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether option -Qn works" >&5
40046 printf %s "checking whether option -Qn works... " >&6; }
40047 if test ${grub_cv_target_cc_qn+y}
40048 then :
40049 printf %s "(cached) " >&6
40050 else $as_nop
40051
40052 CFLAGS="$TARGET_CFLAGS -Qn -Qunused-arguments -Werror"
40053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40054 /* end confdefs.h. */
40055
40056 int
40057 main (void)
40058 {
40059
40060 ;
40061 return 0;
40062 }
40063 _ACEOF
40064 if ac_fn_c_try_compile "$LINENO"
40065 then :
40066 grub_cv_target_cc_qn=yes
40067 else $as_nop
40068 grub_cv_target_cc_qn=no
40069 fi
40070 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
40071 fi
40072 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_target_cc_qn" >&5
40073 printf "%s\n" "$grub_cv_target_cc_qn" >&6; }
40074 if test "x$grub_cv_target_cc_qn" = xyes; then
40075 TARGET_CFLAGS="$TARGET_CFLAGS -Qn -Qunused-arguments"
40076 fi
40077
40078 #
40079 # Compiler features.
40080 #
40081
40082 CFLAGS="$TARGET_CFLAGS"
40083
40084 # Position independent executable.
40085
40086 # Position independent executable.
40087 pie_possible=yes
40088 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether \`$CC' has \`-fPIE' as default" >&5
40089 printf %s "checking whether \`$CC' has \`-fPIE' as default... " >&6; }
40090 # Is this a reliable test case?
40091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40092 /* end confdefs.h. */
40093
40094 #ifdef __PIE__
40095 int main() {
40096 return 0;
40097 }
40098 #else
40099 #error NO __PIE__ DEFINED
40100 #endif
40101
40102 _ACEOF
40103
40104 # `$CC -c -o ...' might not be portable. But, oh, well... Is calling
40105 # `ac_compile' like this correct, after all?
40106 if eval "$ac_compile -S -o conftest.s" 2> /dev/null; then
40107 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40108 printf "%s\n" "yes" >&6; }
40109 # Should we clear up other files as well, having called `AC_LANG_CONFTEST'?
40110 rm -f conftest.s
40111 else
40112 pie_possible=no
40113 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
40114 printf "%s\n" "no" >&6; }
40115 fi
40116
40117 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether linker accepts -no-pie" >&5
40118 printf %s "checking whether linker accepts -no-pie... " >&6; }
40119 if test ${grub_cv_cc_ld_no_pie+y}
40120 then :
40121 printf %s "(cached) " >&6
40122 else $as_nop
40123 save_LDFLAGS="$LDFLAGS"
40124 LDFLAGS="$LDFLAGS -no-pie -nostdlib -Werror"
40125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40126 /* end confdefs.h. */
40127
40128 int
40129 main (void)
40130 {
40131
40132 ;
40133 return 0;
40134 }
40135 _ACEOF
40136 if ac_fn_c_try_link "$LINENO"
40137 then :
40138 grub_cv_cc_ld_no_pie=yes
40139 else $as_nop
40140 grub_cv_cc_ld_no_pie=no
40141 fi
40142 rm -f core conftest.err conftest.$ac_objext conftest.beam \
40143 conftest$ac_exeext conftest.$ac_ext
40144 LDFLAGS="$save_LDFLAGS"
40145
40146 fi
40147
40148 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_cc_ld_no_pie" >&5
40149 printf "%s\n" "$grub_cv_cc_ld_no_pie" >&6; }
40150 nopie_possible=no
40151 if test "x$grub_cv_cc_ld_no_pie" = xyes ; then
40152 nopie_possible=yes
40153 fi
40154
40155 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether linker accepts -nopie" >&5
40156 printf %s "checking whether linker accepts -nopie... " >&6; }
40157 if test ${grub_cv_cc_ld_no_pie_oneword+y}
40158 then :
40159 printf %s "(cached) " >&6
40160 else $as_nop
40161 save_LDFLAGS="$LDFLAGS"
40162 LDFLAGS="$LDFLAGS -nopie -nostdlib -Werror"
40163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40164 /* end confdefs.h. */
40165
40166 int
40167 main (void)
40168 {
40169
40170 ;
40171 return 0;
40172 }
40173 _ACEOF
40174 if ac_fn_c_try_link "$LINENO"
40175 then :
40176 grub_cv_cc_ld_no_pie_oneword=yes
40177 else $as_nop
40178 grub_cv_cc_ld_no_pie_oneword=no
40179 fi
40180 rm -f core conftest.err conftest.$ac_objext conftest.beam \
40181 conftest$ac_exeext conftest.$ac_ext
40182 LDFLAGS="$save_LDFLAGS"
40183
40184 fi
40185
40186 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_cc_ld_no_pie_oneword" >&5
40187 printf "%s\n" "$grub_cv_cc_ld_no_pie_oneword" >&6; }
40188 nopie_oneword_possible=no
40189 if test "x$grub_cv_cc_ld_no_pie_oneword" = xyes ; then
40190 nopie_oneword_possible=yes
40191 fi
40192
40193
40194 # Position independent executable.
40195 link_nopie_needed=no
40196 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether linker needs disabling of PIE to work" >&5
40197 printf %s "checking whether linker needs disabling of PIE to work... " >&6; }
40198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40199 /* end confdefs.h. */
40200
40201 _ACEOF
40202
40203 if eval "$ac_compile -Wl,-r -nostdlib -Werror -o conftest.o" 2> /dev/null; then
40204 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
40205 printf "%s\n" "no" >&6; }
40206 # Should we clear up other files as well, having called `AC_LANG_CONFTEST'?
40207 rm -f conftest.o
40208 else
40209 link_nopie_needed=yes
40210 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40211 printf "%s\n" "yes" >&6; }
40212 fi
40213
40214 # Need that, because some distributions ship compilers that include
40215 # `-fPIE' or '-fpie' and '-pie' in the default specs.
40216 if [ x"$pie_possible" = xyes ]; then
40217 TARGET_CFLAGS="$TARGET_CFLAGS -fno-PIE -fno-pie"
40218 TARGET_CCASFLAGS="$TARGET_CCASFLAGS -fno-PIE -fno-pie"
40219 fi
40220
40221 if [ x"$link_nopie_needed" = xyes ] || [ x"$pie_possible" = xyes ]; then
40222 if [ x"$nopie_possible" = xyes ]; then
40223 TARGET_LDFLAGS="$TARGET_LDFLAGS -no-pie"
40224 fi
40225 if [ x"$nopie_oneword_possible" = xyes ]; then
40226 TARGET_LDFLAGS="$TARGET_LDFLAGS -nopie"
40227 fi
40228 fi
40229
40230 CFLAGS="$TARGET_CFLAGS"
40231 LDFLAGS="$TARGET_LDFLAGS"
40232
40233 # Position independent executable.
40234
40235 # Position independent executable.
40236 pic_possible=yes
40237 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether \`$CC' has \`-fPIC' as default" >&5
40238 printf %s "checking whether \`$CC' has \`-fPIC' as default... " >&6; }
40239 # Is this a reliable test case?
40240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40241 /* end confdefs.h. */
40242
40243 #ifdef __PIC__
40244 int main() {
40245 return 0;
40246 }
40247 #else
40248 #error NO __PIC__ DEFINED
40249 #endif
40250
40251 _ACEOF
40252
40253 # `$CC -c -o ...' might not be portable. But, oh, well... Is calling
40254 # `ac_compile' like this correct, after all?
40255 if eval "$ac_compile -S -o conftest.s" 2> /dev/null; then
40256 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40257 printf "%s\n" "yes" >&6; }
40258 # Should we clear up other files as well, having called `AC_LANG_CONFTEST'?
40259 rm -f conftest.s
40260 else
40261 pic_possible=no
40262 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
40263 printf "%s\n" "no" >&6; }
40264 fi
40265
40266 # On most platforms we don't want PIC as it only makes relocations harder
40267 # and code less efficient. On mips we want to have one got table per module
40268 # and reload $gp in every function.
40269 # GCC implements it using symbol __gnu_local_gp in non-PIC as well.
40270 # However with clang we need PIC for this reloading to happen.
40271 # With arm64 we need relocations that are in some way representable in
40272 # PE as we need to support arm64-efi. Without -fPIC clang generates
40273 # movk's which aren't representable.
40274 # Since default varies across dictributions use either -fPIC or -fno-PIC
40275 # explicitly.
40276 if ( test x$target_cpu = xmips || test x$target_cpu = xmipsel || test x$target_cpu = xarm64 ) && test "x$grub_cv_cc_target_clang" = xyes ; then
40277 TARGET_CFLAGS="$TARGET_CFLAGS -fPIC"
40278 elif [ x"$pic_possible" = xyes ]; then
40279 TARGET_CFLAGS="$TARGET_CFLAGS -fno-PIC"
40280 fi
40281
40282 CFLAGS="$TARGET_CFLAGS"
40283
40284 if test "$target_cpu" = x86_64 || test "$target_cpu" = sparc64 || test "$target_cpu" = riscv64 ; then
40285 # Use large model to support 4G memory
40286 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether option -mcmodel=large works" >&5
40287 printf %s "checking whether option -mcmodel=large works... " >&6; }
40288 if test ${grub_cv_cc_mcmodel+y}
40289 then :
40290 printf %s "(cached) " >&6
40291 else $as_nop
40292
40293 CFLAGS="$TARGET_CFLAGS -mcmodel=large"
40294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40295 /* end confdefs.h. */
40296
40297 int
40298 main (void)
40299 {
40300
40301 ;
40302 return 0;
40303 }
40304 _ACEOF
40305 if ac_fn_c_try_compile "$LINENO"
40306 then :
40307 grub_cv_cc_mcmodel=yes
40308 else $as_nop
40309 grub_cv_cc_mcmodel=no
40310 fi
40311 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
40312
40313 fi
40314 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_cc_mcmodel" >&5
40315 printf "%s\n" "$grub_cv_cc_mcmodel" >&6; }
40316 if test "x$grub_cv_cc_mcmodel" = xyes; then
40317 TARGET_CFLAGS="$TARGET_CFLAGS -mcmodel=large"
40318 elif test "$target_cpu" = sparc64 || test "$target_cpu" = riscv64; then
40319 TARGET_CFLAGS="$TARGET_CFLAGS -mcmodel=medany"
40320 fi
40321 fi
40322
40323 # Stack smashing protector.
40324
40325 # Stack smashing protector.
40326 ssp_possible=yes
40327 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether \`$CC' accepts \`-fstack-protector'" >&5
40328 printf %s "checking whether \`$CC' accepts \`-fstack-protector'... " >&6; }
40329 # Is this a reliable test case?
40330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40331 /* end confdefs.h. */
40332
40333 void foo (void) { volatile char a[8]; a[3]; }
40334
40335 _ACEOF
40336 # `$CC -c -o ...' might not be portable. But, oh, well... Is calling
40337 # `ac_compile' like this correct, after all?
40338 if eval "$ac_compile -S -fstack-protector -o conftest.s" 2> /dev/null; then
40339 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40340 printf "%s\n" "yes" >&6; }
40341 # Should we clear up other files as well, having called `AC_LANG_CONFTEST'?
40342 rm -f conftest.s
40343 else
40344 ssp_possible=no
40345 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
40346 printf "%s\n" "no" >&6; }
40347 fi
40348 # Strong stack smashing protector.
40349 ssp_strong_possible=yes
40350 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether \`$CC' accepts \`-fstack-protector-strong'" >&5
40351 printf %s "checking whether \`$CC' accepts \`-fstack-protector-strong'... " >&6; }
40352 # Is this a reliable test case?
40353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40354 /* end confdefs.h. */
40355
40356 void foo (void) { volatile char a[8]; a[3]; }
40357
40358 _ACEOF
40359 # `$CC -c -o ...' might not be portable. But, oh, well... Is calling
40360 # `ac_compile' like this correct, after all?
40361 if eval "$ac_compile -S -fstack-protector-strong -o conftest.s" 2> /dev/null; then
40362 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40363 printf "%s\n" "yes" >&6; }
40364 # Should we clear up other files as well, having called `AC_LANG_CONFTEST'?
40365 rm -f conftest.s
40366 else
40367 ssp_strong_possible=no
40368 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
40369 printf "%s\n" "no" >&6; }
40370 fi
40371 # Global stack smashing protector.
40372 ssp_global_possible=yes
40373 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether \`$CC' accepts \`-mstack-protector-guard=global'" >&5
40374 printf %s "checking whether \`$CC' accepts \`-mstack-protector-guard=global'... " >&6; }
40375 # Is this a reliable test case?
40376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40377 /* end confdefs.h. */
40378
40379 void foo (void) { volatile char a[8]; a[3]; }
40380
40381 _ACEOF
40382 # `$CC -c -o ...' might not be portable. But, oh, well... Is calling
40383 # `ac_compile' like this correct, after all?
40384 if eval "$ac_compile -S -fstack-protector -mstack-protector-guard=global -o conftest.s" 2> /dev/null; then
40385 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40386 printf "%s\n" "yes" >&6; }
40387 # Should we clear up other files as well, having called `AC_LANG_CONFTEST'?
40388 rm -f conftest.s
40389 else
40390 ssp_global_possible=no
40391 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
40392 printf "%s\n" "no" >&6; }
40393 fi
40394
40395 # Check whether --enable-stack-protector was given.
40396 if test ${enable_stack_protector+y}
40397 then :
40398 enableval=$enable_stack_protector;
40399 else $as_nop
40400 enable_stack_protector=no
40401 fi
40402
40403 if test "x$enable_stack_protector" = xno; then
40404 if test "x$ssp_possible" = xyes; then
40405 # Need that, because some distributions ship compilers that include
40406 # `-fstack-protector' in the default specs.
40407 TARGET_CFLAGS="$TARGET_CFLAGS -fno-stack-protector"
40408 fi
40409 elif test "x$platform" != xefi; then
40410 if test "$ERROR_PLATFORM_NOT_SUPPORT_SSP" = "yes"; then
40411 as_fn_error $? "--enable-stack-protector is only supported on EFI platforms" "$LINENO" 5
40412 else
40413 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: --enable-stack-protector is only supported on EFI platforms" >&5
40414 printf "%s\n" "$as_me: WARNING: --enable-stack-protector is only supported on EFI platforms" >&2;}
40415 fi
40416 enable_stack_protector=no
40417 elif test "x$ssp_global_possible" != xyes; then
40418 as_fn_error $? "--enable-stack-protector is not supported (compiler doesn't support -mstack-protector-guard=global)" "$LINENO" 5
40419 else
40420 TARGET_CFLAGS="$TARGET_CFLAGS -mstack-protector-guard=global"
40421 if test "x$enable_stack_protector" = xyes; then
40422 if test "x$ssp_possible" != xyes; then
40423 as_fn_error $? "--enable-stack-protector is not supported (compiler doesn't support -fstack-protector)" "$LINENO" 5
40424 fi
40425 TARGET_CFLAGS="$TARGET_CFLAGS -fstack-protector"
40426 elif test "x$enable_stack_protector" = xstrong; then
40427 if test "x$ssp_strong_possible" != xyes; then
40428 as_fn_error $? "--enable-stack-protector=strong is not supported (compiler doesn't support -fstack-protector-strong)" "$LINENO" 5
40429 fi
40430 TARGET_CFLAGS="$TARGET_CFLAGS -fstack-protector-strong"
40431 else
40432 # Note, -fstack-protector-all requires that the protector is disabled for
40433 # functions that appear in the call stack when the canary is initialized.
40434 as_fn_error $? "invalid value $enable_stack_protector for --enable-stack-protector" "$LINENO" 5
40435 fi
40436 TARGET_CPPFLAGS="$TARGET_CPPFLAGS -DGRUB_STACK_PROTECTOR=1"
40437
40438 if test -n "$SOURCE_DATE_EPOCH"; then
40439 GRUB_STACK_PROTECTOR_INIT="0x00f2b7e2$(printf "%x" "$SOURCE_DATE_EPOCH" | sed 's/.*\(........\)$/\1/')"
40440 elif test -r /dev/urandom; then
40441 # Generate the 8 byte stack protector canary at build time if /dev/urandom
40442 # is able to be read. The first byte should be NUL to filter out string
40443 # buffer overflow attacks.
40444 GRUB_STACK_PROTECTOR_INIT="$($PYTHON -c 'import codecs; rf=open("/dev/urandom", "rb"); print("0x00"+codecs.encode(rf.read(7), "hex").decode("ascii"))')"
40445 else
40446 # Some hosts may not have a urandom, e.g. Windows, so use statically
40447 # generated random bytes
40448 GRUB_STACK_PROTECTOR_INIT="0x00f2b7e2f193b25c"
40449 fi
40450
40451 if test x"$target_m32" = x1 ; then
40452 # Make sure that the canary default value is 24-bits by only using the
40453 # lower 3 bytes on 32 bit systems. This allows the upper byte to be NUL
40454 # to filter out string buffer overflow attacks.
40455 GRUB_STACK_PROTECTOR_INIT="0x00$(echo "$GRUB_STACK_PROTECTOR_INIT" | sed 's/.*\(......\)$/\1/')"
40456 fi
40457
40458
40459 fi
40460
40461 CFLAGS="$TARGET_CFLAGS"
40462
40463
40464 # Smashing stack arg probe.
40465 sap_possible=yes
40466 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether \`$CC' accepts \`-mstack-arg-probe'" >&5
40467 printf %s "checking whether \`$CC' accepts \`-mstack-arg-probe'... " >&6; }
40468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40469 /* end confdefs.h. */
40470
40471 void foo (void) { volatile char a[8]; a[3]; }
40472
40473 _ACEOF
40474 if eval "$ac_compile -S -mstack-arg-probe -Werror -o conftest.s" 2> /dev/null; then
40475 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40476 printf "%s\n" "yes" >&6; }
40477 # Should we clear up other files as well, having called `AC_LANG_CONFTEST'?
40478 rm -f conftest.s
40479 else
40480 sap_possible=no
40481 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
40482 printf "%s\n" "no" >&6; }
40483 fi
40484
40485 # Cygwin's GCC uses alloca() to probe the stackframe on static
40486 # stack allocations above some threshold.
40487 if test x"$sap_possible" = xyes; then
40488 TARGET_CFLAGS="$TARGET_CFLAGS -mno-stack-arg-probe"
40489 fi
40490
40491 CFLAGS="$TARGET_CFLAGS"
40492
40493 # -mno-unaligned-access -mstrict-align
40494 if test "$target_cpu" = arm; then
40495 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compile options to get strict alignment" >&5
40496 printf %s "checking for compile options to get strict alignment... " >&6; }
40497 if test ${grub_cv_target_cc_strict_align+y}
40498 then :
40499 printf %s "(cached) " >&6
40500 else $as_nop
40501
40502 grub_cv_target_cc_strict_align=
40503 for arg in -mno-unaligned-access "-Xclang -mstrict-align" -mstrict-align; do
40504 CFLAGS="$TARGET_CFLAGS $arg -Werror"
40505 LDFLAGS="$TARGET_LDFLAGS"
40506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40507 /* end confdefs.h. */
40508
40509 int
40510 main (void)
40511 {
40512
40513 ;
40514 return 0;
40515 }
40516 _ACEOF
40517 if ac_fn_c_try_compile "$LINENO"
40518 then :
40519 flag=1
40520 else $as_nop
40521 flag=0
40522 fi
40523 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
40524 if test x"$flag" = x1; then
40525 grub_cv_target_cc_strict_align="$arg"
40526 break
40527 fi
40528 done
40529 fi
40530 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_target_cc_strict_align" >&5
40531 printf "%s\n" "$grub_cv_target_cc_strict_align" >&6; }
40532
40533 TARGET_CFLAGS="$TARGET_CFLAGS $grub_cv_target_cc_strict_align"
40534 if test x"$grub_cv_target_cc_strict_align" = x"-Xclang -mstrict-align"; then
40535 TARGET_LDFLAGS="$TARGET_LDFLAGS -Qunused-arguments"
40536 fi
40537 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler generates unaligned accesses" >&5
40538 printf %s "checking if compiler generates unaligned accesses... " >&6; }
40539 if test ${grub_cv_cc_target_emits_unaligned+y}
40540 then :
40541 printf %s "(cached) " >&6
40542 else $as_nop
40543 CFLAGS="$TARGET_CFLAGS"
40544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40545 /* end confdefs.h. */
40546
40547 int
40548 main (void)
40549 {
40550
40551 #ifdef __ARM_FEATURE_UNALIGNED
40552 #error "unaligned"
40553 #endif
40554
40555 ;
40556 return 0;
40557 }
40558 _ACEOF
40559 if ac_fn_c_try_compile "$LINENO"
40560 then :
40561 grub_cv_cc_target_emits_unaligned=no
40562 else $as_nop
40563 grub_cv_cc_target_emits_unaligned=yes
40564 fi
40565 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
40566 fi
40567 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_cc_target_emits_unaligned" >&5
40568 printf "%s\n" "$grub_cv_cc_target_emits_unaligned" >&6; }
40569 if test x$grub_cv_cc_target_emits_unaligned = xyes; then
40570 as_fn_error $? "compiler generates unaligned accesses" "$LINENO" 5
40571 fi
40572 fi
40573
40574 # Set them to their new values for the tests below.
40575 CC="$TARGET_CC"
40576 CPPFLAGS="$TARGET_CPPFLAGS"
40577
40578 # Check for libgcc symbols
40579 if test x"$platform" = xemu; then
40580 CFLAGS="$TARGET_CFLAGS -Wno-error"
40581 ac_fn_c_check_func "$LINENO" "__udivsi3" "ac_cv_func___udivsi3"
40582 if test "x$ac_cv_func___udivsi3" = xyes
40583 then :
40584 printf "%s\n" "#define HAVE___UDIVSI3 1" >>confdefs.h
40585
40586 fi
40587 ac_fn_c_check_func "$LINENO" "__umodsi3" "ac_cv_func___umodsi3"
40588 if test "x$ac_cv_func___umodsi3" = xyes
40589 then :
40590 printf "%s\n" "#define HAVE___UMODSI3 1" >>confdefs.h
40591
40592 fi
40593 ac_fn_c_check_func "$LINENO" "__divsi3" "ac_cv_func___divsi3"
40594 if test "x$ac_cv_func___divsi3" = xyes
40595 then :
40596 printf "%s\n" "#define HAVE___DIVSI3 1" >>confdefs.h
40597
40598 fi
40599 ac_fn_c_check_func "$LINENO" "__modsi3" "ac_cv_func___modsi3"
40600 if test "x$ac_cv_func___modsi3" = xyes
40601 then :
40602 printf "%s\n" "#define HAVE___MODSI3 1" >>confdefs.h
40603
40604 fi
40605 ac_fn_c_check_func "$LINENO" "__divdi3" "ac_cv_func___divdi3"
40606 if test "x$ac_cv_func___divdi3" = xyes
40607 then :
40608 printf "%s\n" "#define HAVE___DIVDI3 1" >>confdefs.h
40609
40610 fi
40611 ac_fn_c_check_func "$LINENO" "__moddi3" "ac_cv_func___moddi3"
40612 if test "x$ac_cv_func___moddi3" = xyes
40613 then :
40614 printf "%s\n" "#define HAVE___MODDI3 1" >>confdefs.h
40615
40616 fi
40617 ac_fn_c_check_func "$LINENO" "__udivdi3" "ac_cv_func___udivdi3"
40618 if test "x$ac_cv_func___udivdi3" = xyes
40619 then :
40620 printf "%s\n" "#define HAVE___UDIVDI3 1" >>confdefs.h
40621
40622 fi
40623 ac_fn_c_check_func "$LINENO" "__umoddi3" "ac_cv_func___umoddi3"
40624 if test "x$ac_cv_func___umoddi3" = xyes
40625 then :
40626 printf "%s\n" "#define HAVE___UMODDI3 1" >>confdefs.h
40627
40628 fi
40629 ac_fn_c_check_func "$LINENO" "__ctzdi2" "ac_cv_func___ctzdi2"
40630 if test "x$ac_cv_func___ctzdi2" = xyes
40631 then :
40632 printf "%s\n" "#define HAVE___CTZDI2 1" >>confdefs.h
40633
40634 fi
40635 ac_fn_c_check_func "$LINENO" "__ctzsi2" "ac_cv_func___ctzsi2"
40636 if test "x$ac_cv_func___ctzsi2" = xyes
40637 then :
40638 printf "%s\n" "#define HAVE___CTZSI2 1" >>confdefs.h
40639
40640 fi
40641 ac_fn_c_check_func "$LINENO" "__clzdi2" "ac_cv_func___clzdi2"
40642 if test "x$ac_cv_func___clzdi2" = xyes
40643 then :
40644 printf "%s\n" "#define HAVE___CLZDI2 1" >>confdefs.h
40645
40646 fi
40647 ac_fn_c_check_func "$LINENO" "__aeabi_uidiv" "ac_cv_func___aeabi_uidiv"
40648 if test "x$ac_cv_func___aeabi_uidiv" = xyes
40649 then :
40650 printf "%s\n" "#define HAVE___AEABI_UIDIV 1" >>confdefs.h
40651
40652 fi
40653 ac_fn_c_check_func "$LINENO" "__aeabi_uidivmod" "ac_cv_func___aeabi_uidivmod"
40654 if test "x$ac_cv_func___aeabi_uidivmod" = xyes
40655 then :
40656 printf "%s\n" "#define HAVE___AEABI_UIDIVMOD 1" >>confdefs.h
40657
40658 fi
40659 ac_fn_c_check_func "$LINENO" "__aeabi_idiv" "ac_cv_func___aeabi_idiv"
40660 if test "x$ac_cv_func___aeabi_idiv" = xyes
40661 then :
40662 printf "%s\n" "#define HAVE___AEABI_IDIV 1" >>confdefs.h
40663
40664 fi
40665 ac_fn_c_check_func "$LINENO" "__aeabi_idivmod" "ac_cv_func___aeabi_idivmod"
40666 if test "x$ac_cv_func___aeabi_idivmod" = xyes
40667 then :
40668 printf "%s\n" "#define HAVE___AEABI_IDIVMOD 1" >>confdefs.h
40669
40670 fi
40671 ac_fn_c_check_func "$LINENO" "__aeabi_ulcmp" "ac_cv_func___aeabi_ulcmp"
40672 if test "x$ac_cv_func___aeabi_ulcmp" = xyes
40673 then :
40674 printf "%s\n" "#define HAVE___AEABI_ULCMP 1" >>confdefs.h
40675
40676 fi
40677 ac_fn_c_check_func "$LINENO" "__muldi3" "ac_cv_func___muldi3"
40678 if test "x$ac_cv_func___muldi3" = xyes
40679 then :
40680 printf "%s\n" "#define HAVE___MULDI3 1" >>confdefs.h
40681
40682 fi
40683 ac_fn_c_check_func "$LINENO" "__aeabi_lmul" "ac_cv_func___aeabi_lmul"
40684 if test "x$ac_cv_func___aeabi_lmul" = xyes
40685 then :
40686 printf "%s\n" "#define HAVE___AEABI_LMUL 1" >>confdefs.h
40687
40688 fi
40689 ac_fn_c_check_func "$LINENO" "__aeabi_memcpy" "ac_cv_func___aeabi_memcpy"
40690 if test "x$ac_cv_func___aeabi_memcpy" = xyes
40691 then :
40692 printf "%s\n" "#define HAVE___AEABI_MEMCPY 1" >>confdefs.h
40693
40694 fi
40695 ac_fn_c_check_func "$LINENO" "__aeabi_memcpy4" "ac_cv_func___aeabi_memcpy4"
40696 if test "x$ac_cv_func___aeabi_memcpy4" = xyes
40697 then :
40698 printf "%s\n" "#define HAVE___AEABI_MEMCPY4 1" >>confdefs.h
40699
40700 fi
40701 ac_fn_c_check_func "$LINENO" "__aeabi_memcpy8" "ac_cv_func___aeabi_memcpy8"
40702 if test "x$ac_cv_func___aeabi_memcpy8" = xyes
40703 then :
40704 printf "%s\n" "#define HAVE___AEABI_MEMCPY8 1" >>confdefs.h
40705
40706 fi
40707 ac_fn_c_check_func "$LINENO" "__aeabi_memclr" "ac_cv_func___aeabi_memclr"
40708 if test "x$ac_cv_func___aeabi_memclr" = xyes
40709 then :
40710 printf "%s\n" "#define HAVE___AEABI_MEMCLR 1" >>confdefs.h
40711
40712 fi
40713 ac_fn_c_check_func "$LINENO" "__aeabi_memclr4" "ac_cv_func___aeabi_memclr4"
40714 if test "x$ac_cv_func___aeabi_memclr4" = xyes
40715 then :
40716 printf "%s\n" "#define HAVE___AEABI_MEMCLR4 1" >>confdefs.h
40717
40718 fi
40719 ac_fn_c_check_func "$LINENO" "__aeabi_memclr8" "ac_cv_func___aeabi_memclr8"
40720 if test "x$ac_cv_func___aeabi_memclr8" = xyes
40721 then :
40722 printf "%s\n" "#define HAVE___AEABI_MEMCLR8 1" >>confdefs.h
40723
40724 fi
40725 ac_fn_c_check_func "$LINENO" "__aeabi_memset" "ac_cv_func___aeabi_memset"
40726 if test "x$ac_cv_func___aeabi_memset" = xyes
40727 then :
40728 printf "%s\n" "#define HAVE___AEABI_MEMSET 1" >>confdefs.h
40729
40730 fi
40731 ac_fn_c_check_func "$LINENO" "__aeabi_lasr" "ac_cv_func___aeabi_lasr"
40732 if test "x$ac_cv_func___aeabi_lasr" = xyes
40733 then :
40734 printf "%s\n" "#define HAVE___AEABI_LASR 1" >>confdefs.h
40735
40736 fi
40737 ac_fn_c_check_func "$LINENO" "__aeabi_llsl" "ac_cv_func___aeabi_llsl"
40738 if test "x$ac_cv_func___aeabi_llsl" = xyes
40739 then :
40740 printf "%s\n" "#define HAVE___AEABI_LLSL 1" >>confdefs.h
40741
40742 fi
40743 ac_fn_c_check_func "$LINENO" "__aeabi_llsr" "ac_cv_func___aeabi_llsr"
40744 if test "x$ac_cv_func___aeabi_llsr" = xyes
40745 then :
40746 printf "%s\n" "#define HAVE___AEABI_LLSR 1" >>confdefs.h
40747
40748 fi
40749 ac_fn_c_check_func "$LINENO" "_restgpr_14_x" "ac_cv_func__restgpr_14_x"
40750 if test "x$ac_cv_func__restgpr_14_x" = xyes
40751 then :
40752 printf "%s\n" "#define HAVE__RESTGPR_14_X 1" >>confdefs.h
40753
40754 fi
40755 ac_fn_c_check_func "$LINENO" "__ucmpdi2" "ac_cv_func___ucmpdi2"
40756 if test "x$ac_cv_func___ucmpdi2" = xyes
40757 then :
40758 printf "%s\n" "#define HAVE___UCMPDI2 1" >>confdefs.h
40759
40760 fi
40761 ac_fn_c_check_func "$LINENO" "__ashldi3" "ac_cv_func___ashldi3"
40762 if test "x$ac_cv_func___ashldi3" = xyes
40763 then :
40764 printf "%s\n" "#define HAVE___ASHLDI3 1" >>confdefs.h
40765
40766 fi
40767 ac_fn_c_check_func "$LINENO" "__ashrdi3" "ac_cv_func___ashrdi3"
40768 if test "x$ac_cv_func___ashrdi3" = xyes
40769 then :
40770 printf "%s\n" "#define HAVE___ASHRDI3 1" >>confdefs.h
40771
40772 fi
40773 ac_fn_c_check_func "$LINENO" "__lshrdi3" "ac_cv_func___lshrdi3"
40774 if test "x$ac_cv_func___lshrdi3" = xyes
40775 then :
40776 printf "%s\n" "#define HAVE___LSHRDI3 1" >>confdefs.h
40777
40778 fi
40779 ac_fn_c_check_func "$LINENO" "__bswapsi2" "ac_cv_func___bswapsi2"
40780 if test "x$ac_cv_func___bswapsi2" = xyes
40781 then :
40782 printf "%s\n" "#define HAVE___BSWAPSI2 1" >>confdefs.h
40783
40784 fi
40785 ac_fn_c_check_func "$LINENO" "__bswapdi2" "ac_cv_func___bswapdi2"
40786 if test "x$ac_cv_func___bswapdi2" = xyes
40787 then :
40788 printf "%s\n" "#define HAVE___BSWAPDI2 1" >>confdefs.h
40789
40790 fi
40791 ac_fn_c_check_func "$LINENO" "__bzero" "ac_cv_func___bzero"
40792 if test "x$ac_cv_func___bzero" = xyes
40793 then :
40794 printf "%s\n" "#define HAVE___BZERO 1" >>confdefs.h
40795
40796 fi
40797 ac_fn_c_check_func "$LINENO" "__register_frame_info" "ac_cv_func___register_frame_info"
40798 if test "x$ac_cv_func___register_frame_info" = xyes
40799 then :
40800 printf "%s\n" "#define HAVE___REGISTER_FRAME_INFO 1" >>confdefs.h
40801
40802 fi
40803 ac_fn_c_check_func "$LINENO" "__deregister_frame_info" "ac_cv_func___deregister_frame_info"
40804 if test "x$ac_cv_func___deregister_frame_info" = xyes
40805 then :
40806 printf "%s\n" "#define HAVE___DEREGISTER_FRAME_INFO 1" >>confdefs.h
40807
40808 fi
40809 ac_fn_c_check_func "$LINENO" "___chkstk_ms" "ac_cv_func____chkstk_ms"
40810 if test "x$ac_cv_func____chkstk_ms" = xyes
40811 then :
40812 printf "%s\n" "#define HAVE____CHKSTK_MS 1" >>confdefs.h
40813
40814 fi
40815 ac_fn_c_check_func "$LINENO" "__chkstk_ms" "ac_cv_func___chkstk_ms"
40816 if test "x$ac_cv_func___chkstk_ms" = xyes
40817 then :
40818 printf "%s\n" "#define HAVE___CHKSTK_MS 1" >>confdefs.h
40819
40820 fi
40821
40822 fi
40823
40824 if test "x$TARGET_APPLE_LINKER" = x1 ; then
40825 CFLAGS="$TARGET_CFLAGS -nostdlib -static"
40826 else
40827 CFLAGS="$TARGET_CFLAGS -nostdlib"
40828 fi
40829 LIBS=""
40830
40831 # Defined in acinclude.m4.
40832
40833
40834 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if C symbols get an underscore after compilation" >&5
40835 printf %s "checking if C symbols get an underscore after compilation... " >&6; }
40836 if test ${grub_cv_asm_uscore+y}
40837 then :
40838 printf %s "(cached) " >&6
40839 else $as_nop
40840 cat > conftest.c <<\EOF
40841 int func (int *);
40842 int
40843 func (int *list)
40844 {
40845 *list = 0;
40846 return *list;
40847 }
40848 EOF
40849
40850 if { ac_try='${CC-cc} ${CFLAGS} -S conftest.c'
40851 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
40852 (eval $ac_try) 2>&5
40853 ac_status=$?
40854 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40855 test $ac_status = 0; }; } && test -s conftest.s; then
40856 true
40857 else
40858 as_fn_error $? "${CC-cc} failed to produce assembly code" "$LINENO" 5
40859 fi
40860
40861 if $EGREP '(^|^_[:alnum])_func' conftest.s >/dev/null 2>&1; then
40862 HAVE_ASM_USCORE=1
40863 grub_cv_asm_uscore=yes
40864 else
40865 HAVE_ASM_USCORE=0
40866 grub_cv_asm_uscore=no
40867 fi
40868
40869 rm -f conftest*
40870 fi
40871
40872
40873 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_asm_uscore" >&5
40874 printf "%s\n" "$grub_cv_asm_uscore" >&6; }
40875
40876 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether target compiler is working" >&5
40877 printf %s "checking whether target compiler is working... " >&6; }
40878 if test ${grub_cv_prog_target_cc+y}
40879 then :
40880 printf %s "(cached) " >&6
40881 else $as_nop
40882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40883 /* end confdefs.h. */
40884
40885 asm (".globl start; start:");
40886 void __main (void);
40887 void __main (void) {}
40888 int main (void);
40889
40890 int
40891 main (void)
40892 {
40893
40894 ;
40895 return 0;
40896 }
40897 _ACEOF
40898 if ac_fn_c_try_link "$LINENO"
40899 then :
40900 grub_cv_prog_target_cc=yes
40901 else $as_nop
40902 grub_cv_prog_target_cc=no
40903 fi
40904 rm -f core conftest.err conftest.$ac_objext conftest.beam \
40905 conftest$ac_exeext conftest.$ac_ext
40906
40907 fi
40908
40909 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_prog_target_cc" >&5
40910 printf "%s\n" "$grub_cv_prog_target_cc" >&6; }
40911
40912 if test "x$grub_cv_prog_target_cc" = xno; then
40913 as_fn_error $? "cannot compile for the target" "$LINENO" 5
40914 fi
40915
40916
40917 # The error message produced by autoconf if autoconf-archive is not installed is
40918 # quite misleading and not very helpful. So, try point people in the right direction.
40919
40920
40921 if test "x$TARGET_APPLE_LINKER" != x1 ; then
40922 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -Wl,--image-base,0x400000" >&5
40923 printf %s "checking whether the linker accepts -Wl,--image-base,0x400000... " >&6; }
40924 if test ${ax_cv_check_ldflags___Wl___image_base_0x400000+y}
40925 then :
40926 printf %s "(cached) " >&6
40927 else $as_nop
40928
40929 ax_check_save_flags=$LDFLAGS
40930 LDFLAGS="$LDFLAGS -Wl,--image-base,0x400000"
40931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40932 /* end confdefs.h. */
40933
40934 asm (".globl start; start:");
40935 asm (".globl _start; _start:");
40936 asm (".globl __start; __start:");
40937 void __main (void);
40938 void __main (void) {}
40939 int main (void);
40940
40941 _ACEOF
40942 if ac_fn_c_try_link "$LINENO"
40943 then :
40944 ax_cv_check_ldflags___Wl___image_base_0x400000=yes
40945 else $as_nop
40946 ax_cv_check_ldflags___Wl___image_base_0x400000=no
40947 fi
40948 rm -f core conftest.err conftest.$ac_objext conftest.beam \
40949 conftest$ac_exeext conftest.$ac_ext
40950 LDFLAGS=$ax_check_save_flags
40951 fi
40952 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_ldflags___Wl___image_base_0x400000" >&5
40953 printf "%s\n" "$ax_cv_check_ldflags___Wl___image_base_0x400000" >&6; }
40954 if test "x$ax_cv_check_ldflags___Wl___image_base_0x400000" = xyes
40955 then :
40956 TARGET_IMG_BASE_LDOPT="-Wl,--image-base"
40957 else $as_nop
40958 TARGET_IMG_BASE_LDOPT="-Wl,-Ttext"
40959 fi
40960
40961 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${TARGET_OBJCOPY} works for absolute addresses" >&5
40962 printf %s "checking whether ${TARGET_OBJCOPY} works for absolute addresses... " >&6; }
40963 if test ${grub_cv_prog_objcopy_absolute+y}
40964 then :
40965 printf %s "(cached) " >&6
40966 else $as_nop
40967 cat > conftest.c <<\EOF
40968 asm (
40969 ".globl start, _start, __start\n"
40970 ".ifdef cmain; .set start = _start = __start = cmain\n.endif\n"
40971 ".ifdef _cmain; .set start = _start = __start = _cmain\n.endif\n"
40972 );
40973 void cmain (void);
40974 void
40975 cmain (void)
40976 {
40977 *((int *) 0x1000) = 2;
40978 }
40979 EOF
40980
40981 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
40982 (eval $ac_compile) 2>&5
40983 ac_status=$?
40984 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40985 test $ac_status = 0; } && test -s conftest.o; then :
40986 else
40987 as_fn_error $? "${CC-cc} cannot compile C source code" "$LINENO" 5
40988 fi
40989 grub_cv_prog_objcopy_absolute=yes
40990 for link_addr in 0x2000 0x8000 0x7C00; do
40991 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'
40992 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
40993 (eval $ac_try) 2>&5
40994 ac_status=$?
40995 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40996 test $ac_status = 0; }; }; then :
40997 else
40998 as_fn_error $? "${CC-cc} cannot link at address $link_addr" "$LINENO" 5
40999 fi
41000 if { ac_try='${TARGET_OBJCOPY-objcopy} --only-section=.text -O binary conftest.exec conftest'
41001 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
41002 (eval $ac_try) 2>&5
41003 ac_status=$?
41004 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41005 test $ac_status = 0; }; }; then :
41006 else
41007 as_fn_error $? "${TARGET_OBJCOPY-objcopy} cannot create binary files" "$LINENO" 5
41008 fi
41009 if test ! -f conftest.old || { ac_try='cmp -s conftest.old conftest'
41010 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
41011 (eval $ac_try) 2>&5
41012 ac_status=$?
41013 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41014 test $ac_status = 0; }; }; then
41015 mv -f conftest conftest.old
41016 else
41017 grub_cv_prog_objcopy_absolute=no
41018 break
41019 fi
41020 done
41021 rm -f conftest*
41022 fi
41023
41024 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_prog_objcopy_absolute" >&5
41025 printf "%s\n" "$grub_cv_prog_objcopy_absolute" >&6; }
41026
41027 if test "x$grub_cv_prog_objcopy_absolute" = xno; then
41028 as_fn_error $? "GRUB requires a working absolute objcopy; upgrade your binutils" "$LINENO" 5
41029 fi
41030
41031 fi
41032 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether linker accepts --build-id=none" >&5
41033 printf %s "checking whether linker accepts --build-id=none... " >&6; }
41034 if test ${grub_cv_prog_ld_build_id_none+y}
41035 then :
41036 printf %s "(cached) " >&6
41037 else $as_nop
41038 save_LDFLAGS="$LDFLAGS"
41039 LDFLAGS="$LDFLAGS -Wl,--build-id=none"
41040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41041 /* end confdefs.h. */
41042
41043 int
41044 main (void)
41045 {
41046
41047 ;
41048 return 0;
41049 }
41050 _ACEOF
41051 if ac_fn_c_try_link "$LINENO"
41052 then :
41053 grub_cv_prog_ld_build_id_none=yes
41054 else $as_nop
41055 grub_cv_prog_ld_build_id_none=no
41056 fi
41057 rm -f core conftest.err conftest.$ac_objext conftest.beam \
41058 conftest$ac_exeext conftest.$ac_ext
41059 LDFLAGS="$save_LDFLAGS"
41060
41061 fi
41062
41063 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_prog_ld_build_id_none" >&5
41064 printf "%s\n" "$grub_cv_prog_ld_build_id_none" >&6; }
41065
41066 if test "x$grub_cv_prog_ld_build_id_none" = xyes; then
41067 TARGET_LDFLAGS="$TARGET_LDFLAGS -Wl,--build-id=none"
41068 fi
41069
41070 if test "x$target_cpu" = xi386; then
41071 if test "$platform" != emu && test "x$TARGET_APPLE_LINKER" != x1 ; then
41072 if test ! -z "$TARGET_IMG_LDSCRIPT"; then
41073 # Check symbols provided by linker script.
41074 CFLAGS="$TARGET_CFLAGS -nostdlib ${TARGET_IMG_LDFLAGS_AC} ${TARGET_IMG_BASE_LDOPT},0x8000"
41075 fi
41076
41077 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if __bss_start is defined by the compiler" >&5
41078 printf %s "checking if __bss_start is defined by the compiler... " >&6; }
41079 if test ${grub_cv_check_uscore_uscore_bss_start_symbol+y}
41080 then :
41081 printf %s "(cached) " >&6
41082 else $as_nop
41083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41084 /* end confdefs.h. */
41085
41086 asm (".globl start; start:");
41087 void __main (void);
41088 void __main (void) {}
41089 int main (void);
41090
41091 int
41092 main (void)
41093 {
41094 asm ("incl __bss_start")
41095 ;
41096 return 0;
41097 }
41098 _ACEOF
41099 if ac_fn_c_try_link "$LINENO"
41100 then :
41101 grub_cv_check_uscore_uscore_bss_start_symbol=yes
41102 else $as_nop
41103 grub_cv_check_uscore_uscore_bss_start_symbol=no
41104 fi
41105 rm -f core conftest.err conftest.$ac_objext conftest.beam \
41106 conftest$ac_exeext conftest.$ac_ext
41107 fi
41108
41109
41110 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_check_uscore_uscore_bss_start_symbol" >&5
41111 printf "%s\n" "$grub_cv_check_uscore_uscore_bss_start_symbol" >&6; }
41112
41113 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if edata is defined by the compiler" >&5
41114 printf %s "checking if edata is defined by the compiler... " >&6; }
41115 if test ${grub_cv_check_edata_symbol+y}
41116 then :
41117 printf %s "(cached) " >&6
41118 else $as_nop
41119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41120 /* end confdefs.h. */
41121
41122 asm (".globl start; start:");
41123 void __main (void);
41124 void __main (void) {}
41125 int main (void);
41126 int
41127 main (void)
41128 {
41129 asm ("incl edata")
41130 ;
41131 return 0;
41132 }
41133 _ACEOF
41134 if ac_fn_c_try_link "$LINENO"
41135 then :
41136 grub_cv_check_edata_symbol=yes
41137 else $as_nop
41138 grub_cv_check_edata_symbol=no
41139 fi
41140 rm -f core conftest.err conftest.$ac_objext conftest.beam \
41141 conftest$ac_exeext conftest.$ac_ext
41142 fi
41143
41144
41145 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_check_edata_symbol" >&5
41146 printf "%s\n" "$grub_cv_check_edata_symbol" >&6; }
41147
41148 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if _edata is defined by the compiler" >&5
41149 printf %s "checking if _edata is defined by the compiler... " >&6; }
41150 if test ${grub_cv_check_uscore_edata_symbol+y}
41151 then :
41152 printf %s "(cached) " >&6
41153 else $as_nop
41154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41155 /* end confdefs.h. */
41156
41157 asm (".globl start; start:");
41158 void __main (void);
41159 void __main (void) {}
41160 int main (void);
41161 int
41162 main (void)
41163 {
41164 asm ("incl _edata")
41165 ;
41166 return 0;
41167 }
41168 _ACEOF
41169 if ac_fn_c_try_link "$LINENO"
41170 then :
41171 grub_cv_check_uscore_edata_symbol=yes
41172 else $as_nop
41173 grub_cv_check_uscore_edata_symbol=no
41174 fi
41175 rm -f core conftest.err conftest.$ac_objext conftest.beam \
41176 conftest$ac_exeext conftest.$ac_ext
41177 fi
41178
41179
41180 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_check_uscore_edata_symbol" >&5
41181 printf "%s\n" "$grub_cv_check_uscore_edata_symbol" >&6; }
41182
41183 if test "x$grub_cv_check_uscore_uscore_bss_start_symbol" = xyes; then
41184 BSS_START_SYMBOL=__bss_start
41185 elif test "x$grub_cv_check_edata_symbol" = xyes; then
41186 BSS_START_SYMBOL=edata
41187 elif test "x$grub_cv_check_uscore_edata_symbol" = xyes; then
41188 BSS_START_SYMBOL=_edata
41189 else
41190 as_fn_error $? "none of __bss_start, edata or _edata is defined" "$LINENO" 5
41191 fi
41192
41193
41194 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if end is defined by the compiler" >&5
41195 printf %s "checking if end is defined by the compiler... " >&6; }
41196 if test ${grub_cv_check_end_symbol+y}
41197 then :
41198 printf %s "(cached) " >&6
41199 else $as_nop
41200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41201 /* end confdefs.h. */
41202
41203 asm (".globl start; start:");
41204 void __main (void);
41205 void __main (void) {}
41206 int main (void);
41207 int
41208 main (void)
41209 {
41210 asm ("incl end")
41211 ;
41212 return 0;
41213 }
41214 _ACEOF
41215 if ac_fn_c_try_link "$LINENO"
41216 then :
41217 grub_cv_check_end_symbol=yes
41218 else $as_nop
41219 grub_cv_check_end_symbol=no
41220 fi
41221 rm -f core conftest.err conftest.$ac_objext conftest.beam \
41222 conftest$ac_exeext conftest.$ac_ext
41223 fi
41224
41225
41226 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_check_end_symbol" >&5
41227 printf "%s\n" "$grub_cv_check_end_symbol" >&6; }
41228
41229 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if _end is defined by the compiler" >&5
41230 printf %s "checking if _end is defined by the compiler... " >&6; }
41231 if test ${grub_cv_check_uscore_end_symbol+y}
41232 then :
41233 printf %s "(cached) " >&6
41234 else $as_nop
41235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41236 /* end confdefs.h. */
41237
41238 asm (".globl start; start:");
41239 void __main (void);
41240 void __main (void) {}
41241 int main (void);
41242 int
41243 main (void)
41244 {
41245 asm ("incl _end")
41246 ;
41247 return 0;
41248 }
41249 _ACEOF
41250 if ac_fn_c_try_link "$LINENO"
41251 then :
41252 grub_cv_check_uscore_end_symbol=yes
41253 else $as_nop
41254 grub_cv_check_uscore_end_symbol=no
41255 fi
41256 rm -f core conftest.err conftest.$ac_objext conftest.beam \
41257 conftest$ac_exeext conftest.$ac_ext
41258 fi
41259
41260
41261 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_check_uscore_end_symbol" >&5
41262 printf "%s\n" "$grub_cv_check_uscore_end_symbol" >&6; }
41263
41264 if test "x$grub_cv_check_end_symbol" = xyes; then
41265 END_SYMBOL=end
41266 elif test "x$grub_cv_check_uscore_end_symbol" = xyes; then
41267 END_SYMBOL=_end
41268 else
41269 as_fn_error $? "neither end nor _end is defined" "$LINENO" 5
41270 fi
41271
41272 fi
41273 CFLAGS="$TARGET_CFLAGS"
41274 fi
41275
41276 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether nm works" >&5
41277 printf %s "checking whether nm works... " >&6; }
41278 if test ${grub_cv_prog_nm_works+y}
41279 then :
41280 printf %s "(cached) " >&6
41281 else $as_nop
41282
41283 nm_works_tmp_dir="$(mktemp -d "./confXXXXXX")"
41284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41285 /* end confdefs.h. */
41286
41287 int
41288 main (void)
41289 {
41290
41291 ;
41292 return 0;
41293 }
41294 _ACEOF
41295 $TARGET_CC $TARGET_CFLAGS -c conftest.c -o "$nm_works_tmp_dir/ef"
41296 if $TARGET_NM "$nm_works_tmp_dir/ef" > /dev/null; then
41297 grub_cv_prog_nm_works=yes
41298 else
41299 grub_cv_prog_nm_minus_p=no
41300 fi
41301 rm "$nm_works_tmp_dir/ef"
41302 rmdir "$nm_works_tmp_dir"
41303
41304 fi
41305
41306 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_prog_nm_works" >&5
41307 printf "%s\n" "$grub_cv_prog_nm_works" >&6; }
41308
41309 if test "x$grub_cv_prog_nm_works" != xyes; then
41310 as_fn_error $? "nm does not work" "$LINENO" 5
41311 fi
41312
41313 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether nm accepts -P" >&5
41314 printf %s "checking whether nm accepts -P... " >&6; }
41315 if test ${grub_cv_prog_nm_minus_p+y}
41316 then :
41317 printf %s "(cached) " >&6
41318 else $as_nop
41319
41320 nm_minus_p_tmp_dir="$(mktemp -d "./confXXXXXX")"
41321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41322 /* end confdefs.h. */
41323
41324 int
41325 main (void)
41326 {
41327
41328 ;
41329 return 0;
41330 }
41331 _ACEOF
41332 $TARGET_CC $TARGET_CFLAGS -c conftest.c -o "$nm_minus_p_tmp_dir/ef"
41333 if $TARGET_NM -P "$nm_minus_p_tmp_dir/ef" 2>&1 > /dev/null; then
41334 grub_cv_prog_nm_minus_p=yes
41335 else
41336 grub_cv_prog_nm_minus_p=no
41337 fi
41338 rm "$nm_minus_p_tmp_dir/ef"
41339 rmdir "$nm_minus_p_tmp_dir"
41340
41341 fi
41342
41343 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_prog_nm_minus_p" >&5
41344 printf "%s\n" "$grub_cv_prog_nm_minus_p" >&6; }
41345
41346 if test "x$grub_cv_prog_nm_minus_p" = xyes; then
41347 TARGET_NMFLAGS_MINUS_P="-P"
41348 else
41349 TARGET_NMFLAGS_MINUS_P=
41350 fi
41351
41352 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether nm accepts --defined-only" >&5
41353 printf %s "checking whether nm accepts --defined-only... " >&6; }
41354 if test ${grub_cv_prog_nm_defined_only+y}
41355 then :
41356 printf %s "(cached) " >&6
41357 else $as_nop
41358
41359 nm_defined_only_tmp_dir="$(mktemp -d "./confXXXXXX")"
41360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41361 /* end confdefs.h. */
41362
41363 int
41364 main (void)
41365 {
41366
41367 ;
41368 return 0;
41369 }
41370 _ACEOF
41371 $TARGET_CC $TARGET_CFLAGS -c conftest.c -o "$nm_defined_only_tmp_dir/ef"
41372 if $TARGET_NM --defined-only "$nm_defined_only_tmp_dir/ef" 2>&1 > /dev/null; then
41373 grub_cv_prog_nm_defined_only=yes
41374 else
41375 grub_cv_prog_nm_defined_only=no
41376 fi
41377 rm "$nm_defined_only_tmp_dir/ef"
41378 rmdir "$nm_defined_only_tmp_dir"
41379
41380 fi
41381
41382 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_prog_nm_defined_only" >&5
41383 printf "%s\n" "$grub_cv_prog_nm_defined_only" >&6; }
41384
41385 if test "x$grub_cv_prog_nm_defined_only" = xyes; then
41386 TARGET_NMFLAGS_DEFINED_ONLY=--defined-only
41387 else
41388 TARGET_NMFLAGS_DEFINED_ONLY=
41389 fi
41390
41391
41392
41393
41394 if test "$platform" != emu; then
41395 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -nostdinc -isystem works" >&5
41396 printf %s "checking whether -nostdinc -isystem works... " >&6; }
41397 if test ${grub_cv_cc_isystem+y}
41398 then :
41399 printf %s "(cached) " >&6
41400 else $as_nop
41401
41402 SAVED_CPPFLAGS="$CPPFLAGS"
41403 CPPFLAGS="$TARGET_CPPFLAGS -nostdlib -nostdinc -isystem `$TARGET_CC -print-file-name=include`"
41404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41405 /* end confdefs.h. */
41406 #include <stdarg.h>
41407 #include <stddef.h>
41408 int va_arg_func (int fixed, va_list args);
41409 int
41410 main (void)
41411 {
41412
41413 ;
41414 return 0;
41415 }
41416 _ACEOF
41417 if ac_fn_c_try_compile "$LINENO"
41418 then :
41419 grub_cv_cc_isystem=yes
41420 else $as_nop
41421 grub_cv_cc_isystem=no
41422 fi
41423 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
41424 CPPFLAGS="$SAVED_CPPFLAGS"
41425
41426 fi
41427 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_cc_isystem" >&5
41428 printf "%s\n" "$grub_cv_cc_isystem" >&6; }
41429
41430 if test x"$grub_cv_cc_isystem" = xyes ; then
41431 TARGET_CPPFLAGS="$TARGET_CPPFLAGS -nostdinc -isystem `$TARGET_CC -print-file-name=include`"
41432 fi
41433 fi
41434
41435 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wtrampolines work" >&5
41436 printf %s "checking whether -Wtrampolines work... " >&6; }
41437 if test ${grub_cv_cc_wtrampolines+y}
41438 then :
41439 printf %s "(cached) " >&6
41440 else $as_nop
41441
41442 CFLAGS="$TARGET_CFLAGS -Wtrampolines -Werror"
41443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41444 /* end confdefs.h. */
41445 #include <stdarg.h>
41446 int va_arg_func (int fixed, va_list args);
41447 int
41448 main (void)
41449 {
41450
41451 ;
41452 return 0;
41453 }
41454 _ACEOF
41455 if ac_fn_c_try_compile "$LINENO"
41456 then :
41457 grub_cv_cc_wtrampolines=yes
41458 else $as_nop
41459 grub_cv_cc_wtrampolines=no
41460 fi
41461 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
41462
41463 fi
41464 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $grub_cv_cc_wtrampolines" >&5
41465 printf "%s\n" "$grub_cv_cc_wtrampolines" >&6; }
41466
41467 if test x"$grub_cv_cc_wtrampolines" = xyes ; then
41468 TARGET_CFLAGS="$TARGET_CFLAGS -Wtrampolines"
41469 fi
41470
41471 # Restore the flags.
41472 CC="$tmp_CC"
41473 CFLAGS="$tmp_CFLAGS"
41474 CPPFLAGS="$tmp_CPPFLAGS"
41475 LDFLAGS="$tmp_LDFLAGS"
41476 LIBS="$tmp_LIBS"
41477
41478 #
41479 # Check for options.
41480 #
41481
41482 # Memory manager debugging.
41483 # Check whether --enable-mm-debug was given.
41484 if test ${enable_mm_debug+y}
41485 then :
41486 enableval=$enable_mm_debug;
41487 fi
41488
41489 if test x$enable_mm_debug = xyes; then
41490 MM_DEBUG=1
41491 else
41492 MM_DEBUG=0
41493 fi
41494
41495 if test x$MM_DEBUG = x1; then
41496 COND_MM_DEBUG_TRUE=
41497 COND_MM_DEBUG_FALSE='#'
41498 else
41499 COND_MM_DEBUG_TRUE='#'
41500 COND_MM_DEBUG_FALSE=
41501 fi
41502
41503
41504 # Check whether --enable-cache-stats was given.
41505 if test ${enable_cache_stats+y}
41506 then :
41507 enableval=$enable_cache_stats;
41508 fi
41509
41510
41511 if test x$enable_cache_stats = xyes; then
41512 DISK_CACHE_STATS=1
41513 else
41514 DISK_CACHE_STATS=0
41515 fi
41516
41517
41518 # Check whether --enable-boot-time was given.
41519 if test ${enable_boot_time+y}
41520 then :
41521 enableval=$enable_boot_time;
41522 fi
41523
41524
41525 if test x$enable_boot_time = xyes; then
41526 BOOT_TIME_STATS=1
41527 else
41528 BOOT_TIME_STATS=0
41529 fi
41530
41531
41532 # Check whether --enable-grub-emu-sdl2 was given.
41533 if test ${enable_grub_emu_sdl2+y}
41534 then :
41535 enableval=$enable_grub_emu_sdl2;
41536 fi
41537
41538
41539 # Check whether --enable-grub-emu-sdl was given.
41540 if test ${enable_grub_emu_sdl+y}
41541 then :
41542 enableval=$enable_grub_emu_sdl;
41543 fi
41544
41545
41546 # Check whether --enable-grub-emu-pci was given.
41547 if test ${enable_grub_emu_pci+y}
41548 then :
41549 enableval=$enable_grub_emu_pci;
41550 fi
41551
41552
41553 if test "$platform" = emu; then
41554 if test x"$enable_grub_emu_sdl2" = xno ; then
41555 grub_emu_sdl2_excuse="explicitly disabled"
41556 fi
41557 if [ x"$grub_emu_sdl2_excuse" = x ]; then
41558 # Check for libSDL libraries.
41559
41560 pkg_failed=no
41561 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sdl2" >&5
41562 printf %s "checking for sdl2... " >&6; }
41563
41564 if test -n "$SDL2_CFLAGS"; then
41565 pkg_cv_SDL2_CFLAGS="$SDL2_CFLAGS"
41566 elif test -n "$PKG_CONFIG"; then
41567 if test -n "$PKG_CONFIG" && \
41568 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sdl2\""; } >&5
41569 ($PKG_CONFIG --exists --print-errors "sdl2") 2>&5
41570 ac_status=$?
41571 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41572 test $ac_status = 0; }; then
41573 pkg_cv_SDL2_CFLAGS=`$PKG_CONFIG --cflags "sdl2" 2>/dev/null`
41574 test "x$?" != "x0" && pkg_failed=yes
41575 else
41576 pkg_failed=yes
41577 fi
41578 else
41579 pkg_failed=untried
41580 fi
41581 if test -n "$SDL2_LIBS"; then
41582 pkg_cv_SDL2_LIBS="$SDL2_LIBS"
41583 elif test -n "$PKG_CONFIG"; then
41584 if test -n "$PKG_CONFIG" && \
41585 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sdl2\""; } >&5
41586 ($PKG_CONFIG --exists --print-errors "sdl2") 2>&5
41587 ac_status=$?
41588 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41589 test $ac_status = 0; }; then
41590 pkg_cv_SDL2_LIBS=`$PKG_CONFIG --libs "sdl2" 2>/dev/null`
41591 test "x$?" != "x0" && pkg_failed=yes
41592 else
41593 pkg_failed=yes
41594 fi
41595 else
41596 pkg_failed=untried
41597 fi
41598
41599
41600
41601 if test $pkg_failed = yes; then
41602 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
41603 printf "%s\n" "no" >&6; }
41604
41605 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
41606 _pkg_short_errors_supported=yes
41607 else
41608 _pkg_short_errors_supported=no
41609 fi
41610 if test $_pkg_short_errors_supported = yes; then
41611 SDL2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "sdl2" 2>&1`
41612 else
41613 SDL2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "sdl2" 2>&1`
41614 fi
41615 # Put the nasty error message in config.log where it belongs
41616 echo "$SDL2_PKG_ERRORS" >&5
41617
41618 grub_emu_sdl2_excuse="libSDL2 libraries are required to build \`grub-emu' with SDL2 support"
41619 elif test $pkg_failed = untried; then
41620 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
41621 printf "%s\n" "no" >&6; }
41622 grub_emu_sdl2_excuse="libSDL2 libraries are required to build \`grub-emu' with SDL2 support"
41623 else
41624 SDL2_CFLAGS=$pkg_cv_SDL2_CFLAGS
41625 SDL2_LIBS=$pkg_cv_SDL2_LIBS
41626 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41627 printf "%s\n" "yes" >&6; }
41628
41629
41630 printf "%s\n" "#define HAVE_SDL2 1" >>confdefs.h
41631
41632
41633 fi
41634 fi
41635 if test x"$enable_grub_emu_sdl2" = xyes && test x"$grub_emu_sdl2_excuse" != x ; then
41636 as_fn_error $? "SDL2 support for grub-emu was explicitly requested but can't be compiled ($grub_emu_sdl2_excuse)" "$LINENO" 5
41637 fi
41638 if test x"$grub_emu_sdl2_excuse" = x ; then
41639 enable_grub_emu_sdl2=yes
41640 else
41641 enable_grub_emu_sdl2=no
41642 fi
41643 if test x"$enable_grub_emu_sdl2" = xyes ; then
41644 grub_emu_sdl_excuse="disabled by sdl2"
41645 fi
41646
41647
41648 if test x"$enable_grub_emu_sdl" = xno ; then
41649 grub_emu_sdl_excuse="explicitly disabled"
41650 fi
41651 if [ x"$grub_emu_sdl_excuse" = x ]; then
41652 # Check for libSDL libraries.
41653 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SDL_Init in -lSDL" >&5
41654 printf %s "checking for SDL_Init in -lSDL... " >&6; }
41655 if test ${ac_cv_lib_SDL_SDL_Init+y}
41656 then :
41657 printf %s "(cached) " >&6
41658 else $as_nop
41659 ac_check_lib_save_LIBS=$LIBS
41660 LIBS="-lSDL $LIBS"
41661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41662 /* end confdefs.h. */
41663
41664 /* Override any GCC internal prototype to avoid an error.
41665 Use char because int might match the return type of a GCC
41666 builtin and then its argument prototype would still apply. */
41667 char SDL_Init ();
41668 int
41669 main (void)
41670 {
41671 return SDL_Init ();
41672 ;
41673 return 0;
41674 }
41675 _ACEOF
41676 if ac_fn_c_try_link "$LINENO"
41677 then :
41678 ac_cv_lib_SDL_SDL_Init=yes
41679 else $as_nop
41680 ac_cv_lib_SDL_SDL_Init=no
41681 fi
41682 rm -f core conftest.err conftest.$ac_objext conftest.beam \
41683 conftest$ac_exeext conftest.$ac_ext
41684 LIBS=$ac_check_lib_save_LIBS
41685 fi
41686 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SDL_SDL_Init" >&5
41687 printf "%s\n" "$ac_cv_lib_SDL_SDL_Init" >&6; }
41688 if test "x$ac_cv_lib_SDL_SDL_Init" = xyes
41689 then :
41690 LIBSDL="-lSDL"
41691 else $as_nop
41692 grub_emu_sdl_excuse="libSDL libraries are required to build \`grub-emu' with SDL support"
41693 fi
41694
41695
41696 fi
41697
41698 if [ x"$grub_emu_sdl_excuse" = x ]; then
41699 # Check for headers.
41700 for ac_header in SDL/SDL.h
41701 do :
41702 ac_fn_c_check_header_compile "$LINENO" "SDL/SDL.h" "ac_cv_header_SDL_SDL_h" "$ac_includes_default"
41703 if test "x$ac_cv_header_SDL_SDL_h" = xyes
41704 then :
41705 printf "%s\n" "#define HAVE_SDL_SDL_H 1" >>confdefs.h
41706
41707 else $as_nop
41708 grub_emu_sdl_excuse="libSDL header file is required to build \`grub-emu' with SDL support"
41709 fi
41710
41711 done
41712 fi
41713
41714 if test x"$enable_grub_emu_sdl" = xyes && test x"$grub_emu_sdl_excuse" != x ; then
41715 as_fn_error $? "SDL support for grub-emu was explicitly requested but can't be compiled ($grub_emu_sdl_excuse)" "$LINENO" 5
41716 fi
41717 if test x"$grub_emu_sdl_excuse" = x ; then
41718 enable_grub_emu_sdl=yes
41719 else
41720 enable_grub_emu_sdl=no
41721 fi
41722
41723 if test x"$enable_grub_emu_pci" != xyes ; then
41724 grub_emu_pci_excuse="not enabled"
41725 fi
41726
41727 if [ x"$grub_emu_pci_excuse" = x ]; then
41728 # Check for libpci libraries.
41729 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pci_system_init in -lpciaccess" >&5
41730 printf %s "checking for pci_system_init in -lpciaccess... " >&6; }
41731 if test ${ac_cv_lib_pciaccess_pci_system_init+y}
41732 then :
41733 printf %s "(cached) " >&6
41734 else $as_nop
41735 ac_check_lib_save_LIBS=$LIBS
41736 LIBS="-lpciaccess $LIBS"
41737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41738 /* end confdefs.h. */
41739
41740 /* Override any GCC internal prototype to avoid an error.
41741 Use char because int might match the return type of a GCC
41742 builtin and then its argument prototype would still apply. */
41743 char pci_system_init ();
41744 int
41745 main (void)
41746 {
41747 return pci_system_init ();
41748 ;
41749 return 0;
41750 }
41751 _ACEOF
41752 if ac_fn_c_try_link "$LINENO"
41753 then :
41754 ac_cv_lib_pciaccess_pci_system_init=yes
41755 else $as_nop
41756 ac_cv_lib_pciaccess_pci_system_init=no
41757 fi
41758 rm -f core conftest.err conftest.$ac_objext conftest.beam \
41759 conftest$ac_exeext conftest.$ac_ext
41760 LIBS=$ac_check_lib_save_LIBS
41761 fi
41762 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pciaccess_pci_system_init" >&5
41763 printf "%s\n" "$ac_cv_lib_pciaccess_pci_system_init" >&6; }
41764 if test "x$ac_cv_lib_pciaccess_pci_system_init" = xyes
41765 then :
41766 LIBPCIACCESS="-lpciaccess"
41767 else $as_nop
41768 grub_emu_pci_excuse="need libpciaccess library"
41769 fi
41770
41771
41772 fi
41773 if [ x"$grub_emu_pci_excuse" = x ]; then
41774 # Check for headers.
41775 for ac_header in pciaccess.h
41776 do :
41777 ac_fn_c_check_header_compile "$LINENO" "pciaccess.h" "ac_cv_header_pciaccess_h" "$ac_includes_default"
41778 if test "x$ac_cv_header_pciaccess_h" = xyes
41779 then :
41780 printf "%s\n" "#define HAVE_PCIACCESS_H 1" >>confdefs.h
41781
41782 else $as_nop
41783 grub_emu_pci_excuse="need libpciaccess headers"
41784 fi
41785
41786 done
41787 fi
41788
41789 if test x"$grub_emu_pci_excuse" = x ; then
41790 enable_grub_emu_pci=yes
41791 else
41792 enable_grub_emu_pci=no
41793 fi
41794
41795
41796
41797
41798
41799 else
41800
41801 # Ignore --enable-emu-* if platform is not emu
41802 enable_grub_emu_sdl2=no
41803 enable_grub_emu_sdl=no
41804 enable_grub_emu_pci=no
41805 fi
41806
41807 # Check whether --enable-grub-mkfont was given.
41808 if test ${enable_grub_mkfont+y}
41809 then :
41810 enableval=$enable_grub_mkfont;
41811 fi
41812
41813 if test x"$enable_grub_mkfont" = xno ; then
41814 grub_mkfont_excuse="explicitly disabled"
41815 fi
41816
41817 unset ac_cv_header_ft2build_h
41818
41819 if test x"$grub_mkfont_excuse" = x ; then
41820 # Check for freetype libraries.
41821
41822 pkg_failed=no
41823 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for freetype2" >&5
41824 printf %s "checking for freetype2... " >&6; }
41825
41826 if test -n "$FREETYPE_CFLAGS"; then
41827 pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
41828 elif test -n "$PKG_CONFIG"; then
41829 if test -n "$PKG_CONFIG" && \
41830 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
41831 ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
41832 ac_status=$?
41833 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41834 test $ac_status = 0; }; then
41835 pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
41836 test "x$?" != "x0" && pkg_failed=yes
41837 else
41838 pkg_failed=yes
41839 fi
41840 else
41841 pkg_failed=untried
41842 fi
41843 if test -n "$FREETYPE_LIBS"; then
41844 pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
41845 elif test -n "$PKG_CONFIG"; then
41846 if test -n "$PKG_CONFIG" && \
41847 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
41848 ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
41849 ac_status=$?
41850 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41851 test $ac_status = 0; }; then
41852 pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
41853 test "x$?" != "x0" && pkg_failed=yes
41854 else
41855 pkg_failed=yes
41856 fi
41857 else
41858 pkg_failed=untried
41859 fi
41860
41861
41862
41863 if test $pkg_failed = yes; then
41864 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
41865 printf "%s\n" "no" >&6; }
41866
41867 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
41868 _pkg_short_errors_supported=yes
41869 else
41870 _pkg_short_errors_supported=no
41871 fi
41872 if test $_pkg_short_errors_supported = yes; then
41873 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "freetype2" 2>&1`
41874 else
41875 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "freetype2" 2>&1`
41876 fi
41877 # Put the nasty error message in config.log where it belongs
41878 echo "$FREETYPE_PKG_ERRORS" >&5
41879
41880 grub_mkfont_excuse="need freetype2 library"
41881 elif test $pkg_failed = untried; then
41882 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
41883 printf "%s\n" "no" >&6; }
41884 grub_mkfont_excuse="need freetype2 library"
41885 else
41886 FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
41887 FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
41888 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41889 printf "%s\n" "yes" >&6; }
41890
41891 SAVED_CPPFLAGS="$CPPFLAGS"
41892 SAVED_LIBS="$LIBS"
41893 CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS"
41894 LIBS="$LIBS $FREETYPE_LIBS"
41895 for ac_header in ft2build.h
41896 do :
41897 ac_fn_c_check_header_compile "$LINENO" "ft2build.h" "ac_cv_header_ft2build_h" "$ac_includes_default"
41898 if test "x$ac_cv_header_ft2build_h" = xyes
41899 then :
41900 printf "%s\n" "#define HAVE_FT2BUILD_H 1" >>confdefs.h
41901
41902 else $as_nop
41903 grub_mkfont_excuse="need freetype2 headers"
41904 fi
41905
41906 done
41907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41908 /* end confdefs.h. */
41909
41910 /* Override any GCC internal prototype to avoid an error.
41911 Use char because int might match the return type of a GCC
41912 builtin and then its argument prototype would still apply. */
41913 char FT_Load_Glyph ();
41914 int
41915 main (void)
41916 {
41917 return FT_Load_Glyph ();
41918 ;
41919 return 0;
41920 }
41921 _ACEOF
41922 if ac_fn_c_try_link "$LINENO"
41923 then :
41924
41925 else $as_nop
41926 grub_mkfont_excuse="freetype2 library unusable"
41927 fi
41928 rm -f core conftest.err conftest.$ac_objext conftest.beam \
41929 conftest$ac_exeext conftest.$ac_ext
41930 CPPFLAGS="$SAVED_CPPFLAGS"
41931 LIBS="$SAVED_LIBS"
41932
41933 fi
41934 if test x"$grub_mkfont_excuse" = x && test x"$host_kernel" = xnetbsd ; then
41935 FREETYPE_LIBS="$FREETYPE_LIBS -Wl,-R,/usr/pkg/lib" ;
41936 fi
41937 fi
41938
41939 if test x"$enable_grub_mkfont" = xyes && test x"$grub_mkfont_excuse" != x ; then
41940 as_fn_error $? "grub-mkfont was explicitly requested but can't be compiled ($grub_mkfont_excuse)" "$LINENO" 5
41941 fi
41942 if test x"$grub_mkfont_excuse" = x ; then
41943 enable_grub_mkfont=yes
41944 else
41945 enable_grub_mkfont=no
41946 fi
41947
41948
41949 SAVED_CC="$CC"
41950 SAVED_CPP="$CPP"
41951 SAVED_CFLAGS="$CFLAGS"
41952 SAVED_CPPFLAGS="$CPPFLAGS"
41953 SAVED_LDFLAGS="$LDFLAGS"
41954 CC="$BUILD_CC"
41955 CPP="$BUILD_CPP"
41956 CFLAGS="$BUILD_CFLAGS"
41957 CPPFLAGS="$BUILD_CPPFLAGS"
41958 LDFLAGS="$BUILD_LDFLAGS"
41959
41960 unset ac_cv_c_bigendian
41961 unset ac_cv_header_ft2build_h
41962
41963 if ac_fn_c_compute_int "$LINENO" "sizeof (void *)" "BUILD_SIZEOF_VOID_P" ""
41964 then :
41965
41966 fi
41967
41968 if ac_fn_c_compute_int "$LINENO" "sizeof (long)" "BUILD_SIZEOF_LONG" ""
41969 then :
41970
41971 fi
41972
41973 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
41974 printf %s "checking whether byte ordering is bigendian... " >&6; }
41975 if test ${ac_cv_c_bigendian+y}
41976 then :
41977 printf %s "(cached) " >&6
41978 else $as_nop
41979 ac_cv_c_bigendian=unknown
41980 # See if we're dealing with a universal compiler.
41981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41982 /* end confdefs.h. */
41983 #ifndef __APPLE_CC__
41984 not a universal capable compiler
41985 #endif
41986 typedef int dummy;
41987
41988 _ACEOF
41989 if ac_fn_c_try_compile "$LINENO"
41990 then :
41991
41992 # Check for potential -arch flags. It is not universal unless
41993 # there are at least two -arch flags with different values.
41994 ac_arch=
41995 ac_prev=
41996 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41997 if test -n "$ac_prev"; then
41998 case $ac_word in
41999 i?86 | x86_64 | ppc | ppc64)
42000 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
42001 ac_arch=$ac_word
42002 else
42003 ac_cv_c_bigendian=universal
42004 break
42005 fi
42006 ;;
42007 esac
42008 ac_prev=
42009 elif test "x$ac_word" = "x-arch"; then
42010 ac_prev=arch
42011 fi
42012 done
42013 fi
42014 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
42015 if test $ac_cv_c_bigendian = unknown; then
42016 # See if sys/param.h defines the BYTE_ORDER macro.
42017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42018 /* end confdefs.h. */
42019 #include <sys/types.h>
42020 #include <sys/param.h>
42021
42022 int
42023 main (void)
42024 {
42025 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
42026 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
42027 && LITTLE_ENDIAN)
42028 bogus endian macros
42029 #endif
42030
42031 ;
42032 return 0;
42033 }
42034 _ACEOF
42035 if ac_fn_c_try_compile "$LINENO"
42036 then :
42037 # It does; now see whether it defined to BIG_ENDIAN or not.
42038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42039 /* end confdefs.h. */
42040 #include <sys/types.h>
42041 #include <sys/param.h>
42042
42043 int
42044 main (void)
42045 {
42046 #if BYTE_ORDER != BIG_ENDIAN
42047 not big endian
42048 #endif
42049
42050 ;
42051 return 0;
42052 }
42053 _ACEOF
42054 if ac_fn_c_try_compile "$LINENO"
42055 then :
42056 ac_cv_c_bigendian=yes
42057 else $as_nop
42058 ac_cv_c_bigendian=no
42059 fi
42060 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
42061 fi
42062 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
42063 fi
42064 if test $ac_cv_c_bigendian = unknown; then
42065 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
42066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42067 /* end confdefs.h. */
42068 #include <limits.h>
42069
42070 int
42071 main (void)
42072 {
42073 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
42074 bogus endian macros
42075 #endif
42076
42077 ;
42078 return 0;
42079 }
42080 _ACEOF
42081 if ac_fn_c_try_compile "$LINENO"
42082 then :
42083 # It does; now see whether it defined to _BIG_ENDIAN or not.
42084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42085 /* end confdefs.h. */
42086 #include <limits.h>
42087
42088 int
42089 main (void)
42090 {
42091 #ifndef _BIG_ENDIAN
42092 not big endian
42093 #endif
42094
42095 ;
42096 return 0;
42097 }
42098 _ACEOF
42099 if ac_fn_c_try_compile "$LINENO"
42100 then :
42101 ac_cv_c_bigendian=yes
42102 else $as_nop
42103 ac_cv_c_bigendian=no
42104 fi
42105 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
42106 fi
42107 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
42108 fi
42109 if test $ac_cv_c_bigendian = unknown; then
42110 # Compile a test program.
42111 if test "$cross_compiling" = yes
42112 then :
42113 # Try to guess by grepping values from an object file.
42114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42115 /* end confdefs.h. */
42116 unsigned short int ascii_mm[] =
42117 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
42118 unsigned short int ascii_ii[] =
42119 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
42120 int use_ascii (int i) {
42121 return ascii_mm[i] + ascii_ii[i];
42122 }
42123 unsigned short int ebcdic_ii[] =
42124 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
42125 unsigned short int ebcdic_mm[] =
42126 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
42127 int use_ebcdic (int i) {
42128 return ebcdic_mm[i] + ebcdic_ii[i];
42129 }
42130 extern int foo;
42131
42132 int
42133 main (void)
42134 {
42135 return use_ascii (foo) == use_ebcdic (foo);
42136 ;
42137 return 0;
42138 }
42139 _ACEOF
42140 if ac_fn_c_try_compile "$LINENO"
42141 then :
42142 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
42143 ac_cv_c_bigendian=yes
42144 fi
42145 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
42146 if test "$ac_cv_c_bigendian" = unknown; then
42147 ac_cv_c_bigendian=no
42148 else
42149 # finding both strings is unlikely to happen, but who knows?
42150 ac_cv_c_bigendian=unknown
42151 fi
42152 fi
42153 fi
42154 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
42155 else $as_nop
42156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42157 /* end confdefs.h. */
42158 $ac_includes_default
42159 int
42160 main (void)
42161 {
42162
42163 /* Are we little or big endian? From Harbison&Steele. */
42164 union
42165 {
42166 long int l;
42167 char c[sizeof (long int)];
42168 } u;
42169 u.l = 1;
42170 return u.c[sizeof (long int) - 1] == 1;
42171
42172 ;
42173 return 0;
42174 }
42175 _ACEOF
42176 if ac_fn_c_try_run "$LINENO"
42177 then :
42178 ac_cv_c_bigendian=no
42179 else $as_nop
42180 ac_cv_c_bigendian=yes
42181 fi
42182 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42183 conftest.$ac_objext conftest.beam conftest.$ac_ext
42184 fi
42185
42186 fi
42187 fi
42188 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
42189 printf "%s\n" "$ac_cv_c_bigendian" >&6; }
42190 case $ac_cv_c_bigendian in #(
42191 yes)
42192 BUILD_WORDS_BIGENDIAN=1;; #(
42193 no)
42194 BUILD_WORDS_BIGENDIAN=0 ;; #(
42195 universal)
42196 BUILD_WORDS_BIGENDIAN=err
42197 ;; #(
42198 *)
42199 BUILD_WORDS_BIGENDIAN=err ;;
42200 esac
42201
42202
42203 if test x$BUILD_WORDS_BIGENDIAN = xerr ; then
42204 as_fn_error $? "couldnt determine build endianness" "$LINENO" 5
42205 fi
42206
42207
42208
42209
42210
42211 if test x"$grub_build_mkfont_excuse" = x ; then
42212 # Check for freetype libraries.
42213 SAVED_PKG_CONFIG="$PKG_CONFIG"
42214 test -z "$BUILD_PKG_CONFIG" || PKG_CONFIG="$BUILD_PKG_CONFIG"
42215
42216 pkg_failed=no
42217 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for freetype2" >&5
42218 printf %s "checking for freetype2... " >&6; }
42219
42220 if test -n "$BUILD_FREETYPE_CFLAGS"; then
42221 pkg_cv_BUILD_FREETYPE_CFLAGS="$BUILD_FREETYPE_CFLAGS"
42222 elif test -n "$PKG_CONFIG"; then
42223 if test -n "$PKG_CONFIG" && \
42224 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
42225 ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
42226 ac_status=$?
42227 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42228 test $ac_status = 0; }; then
42229 pkg_cv_BUILD_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
42230 test "x$?" != "x0" && pkg_failed=yes
42231 else
42232 pkg_failed=yes
42233 fi
42234 else
42235 pkg_failed=untried
42236 fi
42237 if test -n "$BUILD_FREETYPE_LIBS"; then
42238 pkg_cv_BUILD_FREETYPE_LIBS="$BUILD_FREETYPE_LIBS"
42239 elif test -n "$PKG_CONFIG"; then
42240 if test -n "$PKG_CONFIG" && \
42241 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
42242 ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
42243 ac_status=$?
42244 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42245 test $ac_status = 0; }; then
42246 pkg_cv_BUILD_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
42247 test "x$?" != "x0" && pkg_failed=yes
42248 else
42249 pkg_failed=yes
42250 fi
42251 else
42252 pkg_failed=untried
42253 fi
42254
42255
42256
42257 if test $pkg_failed = yes; then
42258 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
42259 printf "%s\n" "no" >&6; }
42260
42261 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
42262 _pkg_short_errors_supported=yes
42263 else
42264 _pkg_short_errors_supported=no
42265 fi
42266 if test $_pkg_short_errors_supported = yes; then
42267 BUILD_FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "freetype2" 2>&1`
42268 else
42269 BUILD_FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "freetype2" 2>&1`
42270 fi
42271 # Put the nasty error message in config.log where it belongs
42272 echo "$BUILD_FREETYPE_PKG_ERRORS" >&5
42273
42274 grub_build_mkfont_excuse="need freetype2 library"
42275 elif test $pkg_failed = untried; then
42276 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
42277 printf "%s\n" "no" >&6; }
42278 grub_build_mkfont_excuse="need freetype2 library"
42279 else
42280 BUILD_FREETYPE_CFLAGS=$pkg_cv_BUILD_FREETYPE_CFLAGS
42281 BUILD_FREETYPE_LIBS=$pkg_cv_BUILD_FREETYPE_LIBS
42282 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42283 printf "%s\n" "yes" >&6; }
42284
42285 SAVED_CPPFLAGS_2="$CPPFLAGS"
42286 SAVED_LIBS="$LIBS"
42287 CPPFLAGS="$CPPFLAGS $BUILD_FREETYPE_CFLAGS"
42288 LIBS="$LIBS $BUILD_FREETYPE_LIBS"
42289 for ac_header in ft2build.h
42290 do :
42291 ac_fn_c_check_header_compile "$LINENO" "ft2build.h" "ac_cv_header_ft2build_h" "$ac_includes_default"
42292 if test "x$ac_cv_header_ft2build_h" = xyes
42293 then :
42294 printf "%s\n" "#define HAVE_FT2BUILD_H 1" >>confdefs.h
42295
42296 else $as_nop
42297 grub_build_mkfont_excuse="need freetype2 headers"
42298 fi
42299
42300 done
42301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42302 /* end confdefs.h. */
42303
42304 /* Override any GCC internal prototype to avoid an error.
42305 Use char because int might match the return type of a GCC
42306 builtin and then its argument prototype would still apply. */
42307 char FT_Load_Glyph ();
42308 int
42309 main (void)
42310 {
42311 return FT_Load_Glyph ();
42312 ;
42313 return 0;
42314 }
42315 _ACEOF
42316 if ac_fn_c_try_link "$LINENO"
42317 then :
42318
42319 else $as_nop
42320 grub_build_mkfont_excuse="freetype2 library unusable"
42321 fi
42322 rm -f core conftest.err conftest.$ac_objext conftest.beam \
42323 conftest$ac_exeext conftest.$ac_ext
42324 LIBS="$SAVED_LIBS"
42325 CPPFLAGS="$SAVED_CPPFLAGS_2"
42326
42327 fi
42328 if test x"$grub_build_mkfont_excuse" = x ; then
42329 case x"$build_os" in
42330 xnetbsd*) BUILD_FREETYPE_LIBS="$BUILD_FREETYPE_LIBS -Wl,-R,/usr/pkg/lib" ;;
42331 esac
42332 fi
42333 PKG_CONFIG="$SAVED_PKG_CONFIG"
42334 fi
42335
42336 if test x"$enable_build_grub_mkfont" = xyes && test x"$grub_build_mkfont_excuse" != x ; then
42337 as_fn_error $? "build-grub-mkfont was explicitly requested but can't be compiled ($grub_build_mkfont_excuse)" "$LINENO" 5
42338 fi
42339 if test x"$grub_build_mkfont_excuse" = x ; then
42340 enable_build_grub_mkfont=yes
42341 else
42342 enable_build_grub_mkfont=no
42343 fi
42344 if test x"$enable_build_grub_mkfont" = xno && ( test "x$platform" = xqemu || test "x$platform" = xloongson || test "x$platform" = xqemu_mips || test "x$platform" = xcoreboot ); then
42345 if test x"$grub_build_mkfont_excuse" = x ; then
42346 as_fn_error $? "qemu, coreboot and loongson ports need build-time grub-mkfont" "$LINENO" 5
42347 else
42348 as_fn_error $? "qemu, coreboot and loongson ports need build-time grub-mkfont ($grub_build_mkfont_excuse)" "$LINENO" 5
42349 fi
42350 fi
42351
42352 CC="$SAVED_CC"
42353 CPP="$SAVED_CPP"
42354 CFLAGS="$SAVED_CFLAGS"
42355 CPPFLAGS="$SAVED_CPPFLAGS"
42356 LDFLAGS="$SAVED_LDFLAGS"
42357
42358
42359 starfield_excuse=
42360
42361 # Check whether --enable-grub-themes was given.
42362 if test ${enable_grub_themes+y}
42363 then :
42364 enableval=$enable_grub_themes;
42365 fi
42366
42367 if test x"$enable_grub_themes" = xno ; then
42368 starfield_excuse="explicitly disabled"
42369 fi
42370
42371 if test x"$starfield_excuse" = x && test x"$enable_build_grub_mkfont" = xno ; then
42372 starfield_excuse="No build-time grub-mkfont"
42373 fi
42374
42375
42376 # Check whether --with-dejavufont was given.
42377 if test ${with_dejavufont+y}
42378 then :
42379 withval=$with_dejavufont;
42380 fi
42381
42382
42383 if test "x$with_dejavufont" = x; then
42384 # search in well-known directories
42385 if test x"$starfield_excuse" = x; then
42386 for ext in pcf pcf.gz bdf bdf.gz ttf ttf.gz; do
42387 for dir in . /usr/src /usr/share/fonts/X11/misc /usr/share/fonts/truetype/ttf-dejavu /usr/share/fonts/dejavu /usr/share/fonts/truetype /usr/pkg/share/fonts/X11/TTF /usr/local/share/fonts/dejavu /usr/X11R6/lib/X11/fonts/TTF /usr/share/fonts/dejavu-sans-fonts /usr/share/fonts/truetype/dejavu; do
42388 if test -f "$dir/DejaVuSans.$ext"; then
42389 DJVU_FONT_SOURCE="$dir/DejaVuSans.$ext"
42390 break 2
42391 fi
42392 done
42393 done
42394
42395 if test "x$DJVU_FONT_SOURCE" = x; then
42396 starfield_excuse="No DejaVu found"
42397 fi
42398 fi
42399 else
42400 DJVU_FONT_SOURCE="$with_dejavufont"
42401 fi
42402
42403 if test x"$enable_grub_themes" = xyes && test x"$starfield_excuse" != x; then
42404 as_fn_error $? "themes were explicitly requested but requirements are not satisfied ($starfield_excuse)" "$LINENO" 5
42405 fi
42406
42407
42408
42409
42410 # Check whether --with-unifont was given.
42411 if test ${with_unifont+y}
42412 then :
42413 withval=$with_unifont;
42414 fi
42415
42416
42417 if test "x$with_unifont" = x; then
42418 # search in well-known directories
42419 for ext in pcf pcf.gz bdf bdf.gz ttf ttf.gz otf otf.gz; do
42420 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 /usr/pkg/share/fonts/X11/misc /usr/local/share/fonts/gnu-unifont /usr/local/share/fonts/unifont; do
42421 if test -f "$dir/unifont.$ext"; then
42422 md5="$(md5sum "$dir/unifont.$ext"|awk '{ print $1; }')"
42423 # PCF and BDF from version 6.3 isn't hanled properly by libfreetype.
42424 if test "$md5" = 0a54834d2788c83886a3e1785a6a1e61 || test "$md5" = 28f2565c7a41d8d407e2551159385edb || test "$md5" = dae5e588461b3b92b87b6ffee734f936 || test "$md5" = 4a3d687aa5bb329ed05f4263a1016791 ; then
42425 continue
42426 fi
42427 FONT_SOURCE="$dir/unifont.$ext"
42428 break 2
42429 fi
42430 done
42431 done
42432 else
42433 FONT_SOURCE="$with_unifont"
42434 fi
42435
42436 if test x"$enable_build_grub_mkfont" = xno ; then
42437 FONT_SOURCE=
42438 fi
42439
42440 if test "x$FONT_SOURCE" = x && ( test "x$platform" = xqemu || test "x$platform" = xloongson || test "x$platform" = xqemu_mips || test "x$platform" = xcoreboot ); then
42441 if test x"$grub_build_mkfont_excuse" = x ; then
42442 as_fn_error $? "qemu, coreboot and loongson ports need unifont" "$LINENO" 5
42443 else
42444 as_fn_error $? "qemu, coreboot and loongson ports need unifont ($grub_build_mkfont_excuse)" "$LINENO" 5
42445 fi
42446 fi
42447
42448
42449
42450 if test x"$FONT_SOURCE" = x && test x"$DJVU_FONT_SOURCE" = x && test x"$grub_build_mkfont_excuse" = x; then
42451 grub_build_mkfont_excuse="no fonts"
42452 fi
42453
42454
42455 # Check whether --enable-grub-mount was given.
42456 if test ${enable_grub_mount+y}
42457 then :
42458 enableval=$enable_grub_mount;
42459 fi
42460
42461 if test x"$enable_grub_mount" = xno ; then
42462 grub_mount_excuse="explicitly disabled"
42463 fi
42464
42465 if test x"$grub_mount_excuse" = x ; then
42466
42467 pkg_failed=no
42468 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fuse3" >&5
42469 printf %s "checking for fuse3... " >&6; }
42470
42471 if test -n "$FUSE_CFLAGS"; then
42472 pkg_cv_FUSE_CFLAGS="$FUSE_CFLAGS"
42473 elif test -n "$PKG_CONFIG"; then
42474 if test -n "$PKG_CONFIG" && \
42475 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fuse3\""; } >&5
42476 ($PKG_CONFIG --exists --print-errors "fuse3") 2>&5
42477 ac_status=$?
42478 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42479 test $ac_status = 0; }; then
42480 pkg_cv_FUSE_CFLAGS=`$PKG_CONFIG --cflags "fuse3" 2>/dev/null`
42481 test "x$?" != "x0" && pkg_failed=yes
42482 else
42483 pkg_failed=yes
42484 fi
42485 else
42486 pkg_failed=untried
42487 fi
42488 if test -n "$FUSE_LIBS"; then
42489 pkg_cv_FUSE_LIBS="$FUSE_LIBS"
42490 elif test -n "$PKG_CONFIG"; then
42491 if test -n "$PKG_CONFIG" && \
42492 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fuse3\""; } >&5
42493 ($PKG_CONFIG --exists --print-errors "fuse3") 2>&5
42494 ac_status=$?
42495 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42496 test $ac_status = 0; }; then
42497 pkg_cv_FUSE_LIBS=`$PKG_CONFIG --libs "fuse3" 2>/dev/null`
42498 test "x$?" != "x0" && pkg_failed=yes
42499 else
42500 pkg_failed=yes
42501 fi
42502 else
42503 pkg_failed=untried
42504 fi
42505
42506
42507
42508 if test $pkg_failed = yes; then
42509 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
42510 printf "%s\n" "no" >&6; }
42511
42512 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
42513 _pkg_short_errors_supported=yes
42514 else
42515 _pkg_short_errors_supported=no
42516 fi
42517 if test $_pkg_short_errors_supported = yes; then
42518 FUSE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "fuse3" 2>&1`
42519 else
42520 FUSE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "fuse3" 2>&1`
42521 fi
42522 # Put the nasty error message in config.log where it belongs
42523 echo "$FUSE_PKG_ERRORS" >&5
42524
42525
42526
42527 pkg_failed=no
42528 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fuse" >&5
42529 printf %s "checking for fuse... " >&6; }
42530
42531 if test -n "$FUSE_CFLAGS"; then
42532 pkg_cv_FUSE_CFLAGS="$FUSE_CFLAGS"
42533 elif test -n "$PKG_CONFIG"; then
42534 if test -n "$PKG_CONFIG" && \
42535 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fuse\""; } >&5
42536 ($PKG_CONFIG --exists --print-errors "fuse") 2>&5
42537 ac_status=$?
42538 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42539 test $ac_status = 0; }; then
42540 pkg_cv_FUSE_CFLAGS=`$PKG_CONFIG --cflags "fuse" 2>/dev/null`
42541 test "x$?" != "x0" && pkg_failed=yes
42542 else
42543 pkg_failed=yes
42544 fi
42545 else
42546 pkg_failed=untried
42547 fi
42548 if test -n "$FUSE_LIBS"; then
42549 pkg_cv_FUSE_LIBS="$FUSE_LIBS"
42550 elif test -n "$PKG_CONFIG"; then
42551 if test -n "$PKG_CONFIG" && \
42552 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fuse\""; } >&5
42553 ($PKG_CONFIG --exists --print-errors "fuse") 2>&5
42554 ac_status=$?
42555 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42556 test $ac_status = 0; }; then
42557 pkg_cv_FUSE_LIBS=`$PKG_CONFIG --libs "fuse" 2>/dev/null`
42558 test "x$?" != "x0" && pkg_failed=yes
42559 else
42560 pkg_failed=yes
42561 fi
42562 else
42563 pkg_failed=untried
42564 fi
42565
42566
42567
42568 if test $pkg_failed = yes; then
42569 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
42570 printf "%s\n" "no" >&6; }
42571
42572 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
42573 _pkg_short_errors_supported=yes
42574 else
42575 _pkg_short_errors_supported=no
42576 fi
42577 if test $_pkg_short_errors_supported = yes; then
42578 FUSE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "fuse" 2>&1`
42579 else
42580 FUSE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "fuse" 2>&1`
42581 fi
42582 # Put the nasty error message in config.log where it belongs
42583 echo "$FUSE_PKG_ERRORS" >&5
42584
42585
42586 grub_mount_excuse="need fuse or fuse3 libraries"
42587
42588 elif test $pkg_failed = untried; then
42589 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
42590 printf "%s\n" "no" >&6; }
42591
42592 grub_mount_excuse="need fuse or fuse3 libraries"
42593
42594 else
42595 FUSE_CFLAGS=$pkg_cv_FUSE_CFLAGS
42596 FUSE_LIBS=$pkg_cv_FUSE_LIBS
42597 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42598 printf "%s\n" "yes" >&6; }
42599 FUSE_CFLAGS="$FUSE_CFLAGS -DFUSE_USE_VERSION=26"
42600 fi
42601
42602 elif test $pkg_failed = untried; then
42603 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
42604 printf "%s\n" "no" >&6; }
42605
42606
42607 pkg_failed=no
42608 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fuse" >&5
42609 printf %s "checking for fuse... " >&6; }
42610
42611 if test -n "$FUSE_CFLAGS"; then
42612 pkg_cv_FUSE_CFLAGS="$FUSE_CFLAGS"
42613 elif test -n "$PKG_CONFIG"; then
42614 if test -n "$PKG_CONFIG" && \
42615 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fuse\""; } >&5
42616 ($PKG_CONFIG --exists --print-errors "fuse") 2>&5
42617 ac_status=$?
42618 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42619 test $ac_status = 0; }; then
42620 pkg_cv_FUSE_CFLAGS=`$PKG_CONFIG --cflags "fuse" 2>/dev/null`
42621 test "x$?" != "x0" && pkg_failed=yes
42622 else
42623 pkg_failed=yes
42624 fi
42625 else
42626 pkg_failed=untried
42627 fi
42628 if test -n "$FUSE_LIBS"; then
42629 pkg_cv_FUSE_LIBS="$FUSE_LIBS"
42630 elif test -n "$PKG_CONFIG"; then
42631 if test -n "$PKG_CONFIG" && \
42632 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fuse\""; } >&5
42633 ($PKG_CONFIG --exists --print-errors "fuse") 2>&5
42634 ac_status=$?
42635 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42636 test $ac_status = 0; }; then
42637 pkg_cv_FUSE_LIBS=`$PKG_CONFIG --libs "fuse" 2>/dev/null`
42638 test "x$?" != "x0" && pkg_failed=yes
42639 else
42640 pkg_failed=yes
42641 fi
42642 else
42643 pkg_failed=untried
42644 fi
42645
42646
42647
42648 if test $pkg_failed = yes; then
42649 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
42650 printf "%s\n" "no" >&6; }
42651
42652 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
42653 _pkg_short_errors_supported=yes
42654 else
42655 _pkg_short_errors_supported=no
42656 fi
42657 if test $_pkg_short_errors_supported = yes; then
42658 FUSE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "fuse" 2>&1`
42659 else
42660 FUSE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "fuse" 2>&1`
42661 fi
42662 # Put the nasty error message in config.log where it belongs
42663 echo "$FUSE_PKG_ERRORS" >&5
42664
42665
42666 grub_mount_excuse="need fuse or fuse3 libraries"
42667
42668 elif test $pkg_failed = untried; then
42669 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
42670 printf "%s\n" "no" >&6; }
42671
42672 grub_mount_excuse="need fuse or fuse3 libraries"
42673
42674 else
42675 FUSE_CFLAGS=$pkg_cv_FUSE_CFLAGS
42676 FUSE_LIBS=$pkg_cv_FUSE_LIBS
42677 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42678 printf "%s\n" "yes" >&6; }
42679 FUSE_CFLAGS="$FUSE_CFLAGS -DFUSE_USE_VERSION=26"
42680 fi
42681
42682 else
42683 FUSE_CFLAGS=$pkg_cv_FUSE_CFLAGS
42684 FUSE_LIBS=$pkg_cv_FUSE_LIBS
42685 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42686 printf "%s\n" "yes" >&6; }
42687 FUSE_CFLAGS="$FUSE_CFLAGS -DFUSE_USE_VERSION=32"
42688 fi
42689 fi
42690
42691 if test x"$enable_grub_mount" = xyes && test x"$grub_mount_excuse" != x ; then
42692 as_fn_error $? "grub-mount was explicitly requested but can't be compiled ($grub_mount_excuse)" "$LINENO" 5
42693 fi
42694 if test x"$grub_mount_excuse" = x ; then
42695 enable_grub_mount=yes
42696 else
42697 enable_grub_mount=no
42698 fi
42699
42700
42701 # Check whether --enable-device-mapper was given.
42702 if test ${enable_device_mapper+y}
42703 then :
42704 enableval=$enable_device_mapper;
42705 fi
42706
42707 if test x"$enable_device_mapper" = xno ; then
42708 device_mapper_excuse="explicitly disabled"
42709 fi
42710
42711 if test x"$device_mapper_excuse" = x ; then
42712 # Check for device-mapper header.
42713 ac_fn_c_check_header_compile "$LINENO" "libdevmapper.h" "ac_cv_header_libdevmapper_h" "$ac_includes_default"
42714 if test "x$ac_cv_header_libdevmapper_h" = xyes
42715 then :
42716
42717 else $as_nop
42718 device_mapper_excuse="need libdevmapper header"
42719 fi
42720
42721 fi
42722
42723 if test x"$device_mapper_excuse" = x ; then
42724 # Check for device-mapper library.
42725 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dm_task_create in -ldevmapper" >&5
42726 printf %s "checking for dm_task_create in -ldevmapper... " >&6; }
42727 if test ${ac_cv_lib_devmapper_dm_task_create+y}
42728 then :
42729 printf %s "(cached) " >&6
42730 else $as_nop
42731 ac_check_lib_save_LIBS=$LIBS
42732 LIBS="-ldevmapper $LIBS"
42733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42734 /* end confdefs.h. */
42735
42736 /* Override any GCC internal prototype to avoid an error.
42737 Use char because int might match the return type of a GCC
42738 builtin and then its argument prototype would still apply. */
42739 char dm_task_create ();
42740 int
42741 main (void)
42742 {
42743 return dm_task_create ();
42744 ;
42745 return 0;
42746 }
42747 _ACEOF
42748 if ac_fn_c_try_link "$LINENO"
42749 then :
42750 ac_cv_lib_devmapper_dm_task_create=yes
42751 else $as_nop
42752 ac_cv_lib_devmapper_dm_task_create=no
42753 fi
42754 rm -f core conftest.err conftest.$ac_objext conftest.beam \
42755 conftest$ac_exeext conftest.$ac_ext
42756 LIBS=$ac_check_lib_save_LIBS
42757 fi
42758 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_devmapper_dm_task_create" >&5
42759 printf "%s\n" "$ac_cv_lib_devmapper_dm_task_create" >&6; }
42760 if test "x$ac_cv_lib_devmapper_dm_task_create" = xyes
42761 then :
42762 printf "%s\n" "#define HAVE_LIBDEVMAPPER 1" >>confdefs.h
42763
42764 LIBS="-ldevmapper $LIBS"
42765
42766 else $as_nop
42767 device_mapper_excuse="need devmapper library"
42768 fi
42769
42770 fi
42771
42772 if test x"$device_mapper_excuse" = x ; then
42773 # Check for device-mapper library.
42774 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dm_log_with_errno_init in -ldevmapper" >&5
42775 printf %s "checking for dm_log_with_errno_init in -ldevmapper... " >&6; }
42776 if test ${ac_cv_lib_devmapper_dm_log_with_errno_init+y}
42777 then :
42778 printf %s "(cached) " >&6
42779 else $as_nop
42780 ac_check_lib_save_LIBS=$LIBS
42781 LIBS="-ldevmapper $LIBS"
42782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42783 /* end confdefs.h. */
42784
42785 /* Override any GCC internal prototype to avoid an error.
42786 Use char because int might match the return type of a GCC
42787 builtin and then its argument prototype would still apply. */
42788 char dm_log_with_errno_init ();
42789 int
42790 main (void)
42791 {
42792 return dm_log_with_errno_init ();
42793 ;
42794 return 0;
42795 }
42796 _ACEOF
42797 if ac_fn_c_try_link "$LINENO"
42798 then :
42799 ac_cv_lib_devmapper_dm_log_with_errno_init=yes
42800 else $as_nop
42801 ac_cv_lib_devmapper_dm_log_with_errno_init=no
42802 fi
42803 rm -f core conftest.err conftest.$ac_objext conftest.beam \
42804 conftest$ac_exeext conftest.$ac_ext
42805 LIBS=$ac_check_lib_save_LIBS
42806 fi
42807 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_devmapper_dm_log_with_errno_init" >&5
42808 printf "%s\n" "$ac_cv_lib_devmapper_dm_log_with_errno_init" >&6; }
42809 if test "x$ac_cv_lib_devmapper_dm_log_with_errno_init" = xyes
42810 then :
42811 printf "%s\n" "#define HAVE_LIBDEVMAPPER 1" >>confdefs.h
42812
42813 LIBS="-ldevmapper $LIBS"
42814
42815 else $as_nop
42816 device_mapper_excuse="need devmapper library"
42817 fi
42818
42819 fi
42820
42821 if test x"$device_mapper_excuse" = x ; then
42822 LIBDEVMAPPER="-ldevmapper"
42823
42824 printf "%s\n" "#define HAVE_DEVICE_MAPPER 1" >>confdefs.h
42825
42826 fi
42827
42828
42829
42830 LIBGEOM=
42831 if test x$host_kernel = xkfreebsd; then
42832 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for geom_gettree in -lgeom" >&5
42833 printf %s "checking for geom_gettree in -lgeom... " >&6; }
42834 if test ${ac_cv_lib_geom_geom_gettree+y}
42835 then :
42836 printf %s "(cached) " >&6
42837 else $as_nop
42838 ac_check_lib_save_LIBS=$LIBS
42839 LIBS="-lgeom $LIBS"
42840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42841 /* end confdefs.h. */
42842
42843 /* Override any GCC internal prototype to avoid an error.
42844 Use char because int might match the return type of a GCC
42845 builtin and then its argument prototype would still apply. */
42846 char geom_gettree ();
42847 int
42848 main (void)
42849 {
42850 return geom_gettree ();
42851 ;
42852 return 0;
42853 }
42854 _ACEOF
42855 if ac_fn_c_try_link "$LINENO"
42856 then :
42857 ac_cv_lib_geom_geom_gettree=yes
42858 else $as_nop
42859 ac_cv_lib_geom_geom_gettree=no
42860 fi
42861 rm -f core conftest.err conftest.$ac_objext conftest.beam \
42862 conftest$ac_exeext conftest.$ac_ext
42863 LIBS=$ac_check_lib_save_LIBS
42864 fi
42865 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_geom_geom_gettree" >&5
42866 printf "%s\n" "$ac_cv_lib_geom_geom_gettree" >&6; }
42867 if test "x$ac_cv_lib_geom_geom_gettree" = xyes
42868 then :
42869 printf "%s\n" "#define HAVE_LIBGEOM 1" >>confdefs.h
42870
42871 LIBS="-lgeom $LIBS"
42872
42873 else $as_nop
42874 as_fn_error $? "Your platform requires libgeom" "$LINENO" 5
42875 fi
42876
42877 LIBGEOM="-lgeom"
42878 fi
42879
42880
42881
42882 # Check whether --enable-liblzma was given.
42883 if test ${enable_liblzma+y}
42884 then :
42885 enableval=$enable_liblzma;
42886 fi
42887
42888 if test x"$enable_liblzma" = xno ; then
42889 liblzma_excuse="explicitly disabled"
42890 fi
42891
42892 if test x"$liblzma_excuse" = x ; then
42893 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lzma_code in -llzma" >&5
42894 printf %s "checking for lzma_code in -llzma... " >&6; }
42895 if test ${ac_cv_lib_lzma_lzma_code+y}
42896 then :
42897 printf %s "(cached) " >&6
42898 else $as_nop
42899 ac_check_lib_save_LIBS=$LIBS
42900 LIBS="-llzma $LIBS"
42901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42902 /* end confdefs.h. */
42903
42904 /* Override any GCC internal prototype to avoid an error.
42905 Use char because int might match the return type of a GCC
42906 builtin and then its argument prototype would still apply. */
42907 char lzma_code ();
42908 int
42909 main (void)
42910 {
42911 return lzma_code ();
42912 ;
42913 return 0;
42914 }
42915 _ACEOF
42916 if ac_fn_c_try_link "$LINENO"
42917 then :
42918 ac_cv_lib_lzma_lzma_code=yes
42919 else $as_nop
42920 ac_cv_lib_lzma_lzma_code=no
42921 fi
42922 rm -f core conftest.err conftest.$ac_objext conftest.beam \
42923 conftest$ac_exeext conftest.$ac_ext
42924 LIBS=$ac_check_lib_save_LIBS
42925 fi
42926 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lzma_lzma_code" >&5
42927 printf "%s\n" "$ac_cv_lib_lzma_lzma_code" >&6; }
42928 if test "x$ac_cv_lib_lzma_lzma_code" = xyes
42929 then :
42930 printf "%s\n" "#define HAVE_LIBLZMA 1" >>confdefs.h
42931
42932 LIBS="-llzma $LIBS"
42933
42934 else $as_nop
42935 liblzma_excuse="need lzma library"
42936 fi
42937
42938 fi
42939 if test x"$liblzma_excuse" = x ; then
42940 ac_fn_c_check_header_compile "$LINENO" "lzma.h" "ac_cv_header_lzma_h" "$ac_includes_default"
42941 if test "x$ac_cv_header_lzma_h" = xyes
42942 then :
42943
42944 else $as_nop
42945 liblzma_excuse="need lzma header"
42946 fi
42947
42948 fi
42949
42950 if test x"$enable_liblzma" = xyes && test x"$liblzma_excuse" != x ; then
42951 as_fn_error $? "liblzma support was explicitly requested but requirements are not satisfied ($liblzma_excuse)" "$LINENO" 5
42952 fi
42953
42954
42955 if test x"$liblzma_excuse" = x ; then
42956 LIBLZMA="-llzma"
42957
42958 printf "%s\n" "#define USE_LIBLZMA 1" >>confdefs.h
42959
42960 fi
42961
42962
42963
42964 # Check whether --enable-libzfs was given.
42965 if test ${enable_libzfs+y}
42966 then :
42967 enableval=$enable_libzfs;
42968 fi
42969
42970 if test x"$enable_libzfs" = xno ; then
42971 libzfs_excuse="explicitly disabled"
42972 fi
42973
42974 if test x"$libzfs_excuse" = x ; then
42975 # Only check for system headers if libzfs support has not been disabled.
42976 ac_fn_c_check_header_compile "$LINENO" "libzfs.h" "ac_cv_header_libzfs_h" "$ac_includes_default"
42977 if test "x$ac_cv_header_libzfs_h" = xyes
42978 then :
42979 printf "%s\n" "#define HAVE_LIBZFS_H 1" >>confdefs.h
42980
42981 fi
42982 ac_fn_c_check_header_compile "$LINENO" "libnvpair.h" "ac_cv_header_libnvpair_h" "$ac_includes_default"
42983 if test "x$ac_cv_header_libnvpair_h" = xyes
42984 then :
42985 printf "%s\n" "#define HAVE_LIBNVPAIR_H 1" >>confdefs.h
42986
42987 fi
42988
42989 fi
42990
42991 if test x"$libzfs_excuse" = x ; then
42992 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libzfs_init in -lzfs" >&5
42993 printf %s "checking for libzfs_init in -lzfs... " >&6; }
42994 if test ${ac_cv_lib_zfs_libzfs_init+y}
42995 then :
42996 printf %s "(cached) " >&6
42997 else $as_nop
42998 ac_check_lib_save_LIBS=$LIBS
42999 LIBS="-lzfs $LIBS"
43000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43001 /* end confdefs.h. */
43002
43003 /* Override any GCC internal prototype to avoid an error.
43004 Use char because int might match the return type of a GCC
43005 builtin and then its argument prototype would still apply. */
43006 char libzfs_init ();
43007 int
43008 main (void)
43009 {
43010 return libzfs_init ();
43011 ;
43012 return 0;
43013 }
43014 _ACEOF
43015 if ac_fn_c_try_link "$LINENO"
43016 then :
43017 ac_cv_lib_zfs_libzfs_init=yes
43018 else $as_nop
43019 ac_cv_lib_zfs_libzfs_init=no
43020 fi
43021 rm -f core conftest.err conftest.$ac_objext conftest.beam \
43022 conftest$ac_exeext conftest.$ac_ext
43023 LIBS=$ac_check_lib_save_LIBS
43024 fi
43025 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_zfs_libzfs_init" >&5
43026 printf "%s\n" "$ac_cv_lib_zfs_libzfs_init" >&6; }
43027 if test "x$ac_cv_lib_zfs_libzfs_init" = xyes
43028 then :
43029 printf "%s\n" "#define HAVE_LIBZFS 1" >>confdefs.h
43030
43031 LIBS="-lzfs $LIBS"
43032
43033 else $as_nop
43034 libzfs_excuse="need zfs library"
43035 fi
43036
43037 fi
43038
43039 if test x"$libzfs_excuse" = x ; then
43040 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nvlist_lookup_string in -lnvpair" >&5
43041 printf %s "checking for nvlist_lookup_string in -lnvpair... " >&6; }
43042 if test ${ac_cv_lib_nvpair_nvlist_lookup_string+y}
43043 then :
43044 printf %s "(cached) " >&6
43045 else $as_nop
43046 ac_check_lib_save_LIBS=$LIBS
43047 LIBS="-lnvpair $LIBS"
43048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43049 /* end confdefs.h. */
43050
43051 /* Override any GCC internal prototype to avoid an error.
43052 Use char because int might match the return type of a GCC
43053 builtin and then its argument prototype would still apply. */
43054 char nvlist_lookup_string ();
43055 int
43056 main (void)
43057 {
43058 return nvlist_lookup_string ();
43059 ;
43060 return 0;
43061 }
43062 _ACEOF
43063 if ac_fn_c_try_link "$LINENO"
43064 then :
43065 ac_cv_lib_nvpair_nvlist_lookup_string=yes
43066 else $as_nop
43067 ac_cv_lib_nvpair_nvlist_lookup_string=no
43068 fi
43069 rm -f core conftest.err conftest.$ac_objext conftest.beam \
43070 conftest$ac_exeext conftest.$ac_ext
43071 LIBS=$ac_check_lib_save_LIBS
43072 fi
43073 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nvpair_nvlist_lookup_string" >&5
43074 printf "%s\n" "$ac_cv_lib_nvpair_nvlist_lookup_string" >&6; }
43075 if test "x$ac_cv_lib_nvpair_nvlist_lookup_string" = xyes
43076 then :
43077 have_normal_nvpair=yes
43078 else $as_nop
43079 have_normal_nvpair=no
43080 fi
43081
43082 if test x"$have_normal_nvpair" = xno ; then
43083 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for opensolaris_nvlist_lookup_string in -lnvpair" >&5
43084 printf %s "checking for opensolaris_nvlist_lookup_string in -lnvpair... " >&6; }
43085 if test ${ac_cv_lib_nvpair_opensolaris_nvlist_lookup_string+y}
43086 then :
43087 printf %s "(cached) " >&6
43088 else $as_nop
43089 ac_check_lib_save_LIBS=$LIBS
43090 LIBS="-lnvpair $LIBS"
43091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43092 /* end confdefs.h. */
43093
43094 /* Override any GCC internal prototype to avoid an error.
43095 Use char because int might match the return type of a GCC
43096 builtin and then its argument prototype would still apply. */
43097 char opensolaris_nvlist_lookup_string ();
43098 int
43099 main (void)
43100 {
43101 return opensolaris_nvlist_lookup_string ();
43102 ;
43103 return 0;
43104 }
43105 _ACEOF
43106 if ac_fn_c_try_link "$LINENO"
43107 then :
43108 ac_cv_lib_nvpair_opensolaris_nvlist_lookup_string=yes
43109 else $as_nop
43110 ac_cv_lib_nvpair_opensolaris_nvlist_lookup_string=no
43111 fi
43112 rm -f core conftest.err conftest.$ac_objext conftest.beam \
43113 conftest$ac_exeext conftest.$ac_ext
43114 LIBS=$ac_check_lib_save_LIBS
43115 fi
43116 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nvpair_opensolaris_nvlist_lookup_string" >&5
43117 printf "%s\n" "$ac_cv_lib_nvpair_opensolaris_nvlist_lookup_string" >&6; }
43118 if test "x$ac_cv_lib_nvpair_opensolaris_nvlist_lookup_string" = xyes
43119 then :
43120 have_prefixed_nvpair=yes
43121 else $as_nop
43122 have_prefixed_nvpair=no
43123 fi
43124
43125 if test x"$have_prefixed_nvpair" = xyes ; then
43126
43127 printf "%s\n" "#define GRUB_UTIL_NVPAIR_IS_PREFIXED 1" >>confdefs.h
43128
43129 else
43130 libzfs_excuse="need nvpair library"
43131 fi
43132 fi
43133 fi
43134
43135 if test x"$enable_libzfs" = xyes && test x"$libzfs_excuse" != x ; then
43136 as_fn_error $? "libzfs support was explicitly requested but requirements are not satisfied ($libzfs_excuse)" "$LINENO" 5
43137 fi
43138
43139 if test x"$libzfs_excuse" = x ; then
43140 # We need both libzfs and libnvpair for a successful build.
43141 LIBZFS="-lzfs"
43142 LIBNVPAIR="-lnvpair"
43143
43144 printf "%s\n" "#define USE_LIBZFS 1" >>confdefs.h
43145
43146 fi
43147
43148
43149
43150
43151 # Check whether --enable-grub-protect was given.
43152 if test ${enable_grub_protect+y}
43153 then :
43154 enableval=$enable_grub_protect;
43155 fi
43156
43157 if test x"$enable_grub_protect" = xno ; then
43158 grub_protect_excuse="explicitly disabled"
43159 fi
43160
43161 LIBTASN1=
43162 if test x"$grub_protect_excuse" = x ; then
43163 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for asn1_write_value in -ltasn1" >&5
43164 printf %s "checking for asn1_write_value in -ltasn1... " >&6; }
43165 if test ${ac_cv_lib_tasn1_asn1_write_value+y}
43166 then :
43167 printf %s "(cached) " >&6
43168 else $as_nop
43169 ac_check_lib_save_LIBS=$LIBS
43170 LIBS="-ltasn1 $LIBS"
43171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43172 /* end confdefs.h. */
43173
43174 /* Override any GCC internal prototype to avoid an error.
43175 Use char because int might match the return type of a GCC
43176 builtin and then its argument prototype would still apply. */
43177 char asn1_write_value ();
43178 int
43179 main (void)
43180 {
43181 return asn1_write_value ();
43182 ;
43183 return 0;
43184 }
43185 _ACEOF
43186 if ac_fn_c_try_link "$LINENO"
43187 then :
43188 ac_cv_lib_tasn1_asn1_write_value=yes
43189 else $as_nop
43190 ac_cv_lib_tasn1_asn1_write_value=no
43191 fi
43192 rm -f core conftest.err conftest.$ac_objext conftest.beam \
43193 conftest$ac_exeext conftest.$ac_ext
43194 LIBS=$ac_check_lib_save_LIBS
43195 fi
43196 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tasn1_asn1_write_value" >&5
43197 printf "%s\n" "$ac_cv_lib_tasn1_asn1_write_value" >&6; }
43198 if test "x$ac_cv_lib_tasn1_asn1_write_value" = xyes
43199 then :
43200 LIBTASN1="-ltasn1"
43201 else $as_nop
43202 grub_protect_excuse="need libtasn1 library"
43203 fi
43204
43205 fi
43206
43207
43208 if test x"$enable_grub_protect" = xyes && test x"$grub_protect_excuse" != x ; then
43209 as_fn_error $? "grub-protect was explicitly requested but can't be compiled ($grub_protect_excuse)" "$LINENO" 5
43210 fi
43211 if test x"$grub_protect_excuse" = x ; then
43212 enable_grub_protect=yes
43213 else
43214 enable_grub_protect=no
43215 fi
43216
43217
43218 LIBS=""
43219
43220
43221 if test x$target_cpu = xi386 -a x$platform = xqemu
43222 then :
43223 GRUB_BOOT_MACHINE_LINK_ADDR=0xffe00
43224
43225 fi
43226
43227
43228
43229
43230
43231
43232
43233 # Check whether --enable-werror was given.
43234 if test ${enable_werror+y}
43235 then :
43236 enableval=$enable_werror;
43237 fi
43238
43239 if test x"$enable_werror" != xno ; then
43240 TARGET_CFLAGS="$TARGET_CFLAGS -Werror"
43241 HOST_CFLAGS="$HOST_CFLAGS -Werror"
43242 if test "x$grub_cv_cc_target_clang" = xyes; then
43243 TARGET_CFLAGS="$TARGET_CFLAGS -Wno-error=vla"
43244 HOST_CFLAGS="$HOST_CFLAGS -Wno-error=vla"
43245 fi
43246 fi
43247
43248 TARGET_CPP="$TARGET_CC -E"
43249 TARGET_CCAS=$TARGET_CC
43250
43251 # Includes which include make-time substitutions. They must come last
43252 # as to avoid executing top_builddir in shell.
43253 HOST_CPPFLAGS="$HOST_CPPFLAGS -I\$(top_builddir)/include"
43254 TARGET_CPPFLAGS="$TARGET_CPPFLAGS -I\$(top_srcdir)/include"
43255 TARGET_CPPFLAGS="$TARGET_CPPFLAGS -I\$(top_builddir)/include"
43256
43257 GRUB_TARGET_CPU="${target_cpu}"
43258 GRUB_PLATFORM="${platform}"
43259
43260
43261
43262
43263
43264
43265
43266
43267
43268
43269
43270
43271
43272
43273
43274
43275
43276
43277
43278
43279
43280
43281
43282
43283
43284
43285
43286
43287 #
43288 # Automake conditionals
43289 #
43290
43291 if test x$platform != xnone; then
43292 COND_real_platform_TRUE=
43293 COND_real_platform_FALSE='#'
43294 else
43295 COND_real_platform_TRUE='#'
43296 COND_real_platform_FALSE=
43297 fi
43298
43299 if test x$platform = xemu; then
43300 COND_emu_TRUE=
43301 COND_emu_FALSE='#'
43302 else
43303 COND_emu_TRUE='#'
43304 COND_emu_FALSE=
43305 fi
43306
43307 if test x$target_cpu = xarm ; then
43308 COND_arm_TRUE=
43309 COND_arm_FALSE='#'
43310 else
43311 COND_arm_TRUE='#'
43312 COND_arm_FALSE=
43313 fi
43314
43315 if test x$target_cpu = xarm -a x$platform = xuboot; then
43316 COND_arm_uboot_TRUE=
43317 COND_arm_uboot_FALSE='#'
43318 else
43319 COND_arm_uboot_TRUE='#'
43320 COND_arm_uboot_FALSE=
43321 fi
43322
43323 if test x$target_cpu = xarm -a x$platform = xcoreboot; then
43324 COND_arm_coreboot_TRUE=
43325 COND_arm_coreboot_FALSE='#'
43326 else
43327 COND_arm_coreboot_TRUE='#'
43328 COND_arm_coreboot_FALSE=
43329 fi
43330
43331 if test x$target_cpu = xarm -a x$platform = xefi; then
43332 COND_arm_efi_TRUE=
43333 COND_arm_efi_FALSE='#'
43334 else
43335 COND_arm_efi_TRUE='#'
43336 COND_arm_efi_FALSE=
43337 fi
43338
43339 if test x$target_cpu = xarm64 ; then
43340 COND_arm64_TRUE=
43341 COND_arm64_FALSE='#'
43342 else
43343 COND_arm64_TRUE='#'
43344 COND_arm64_FALSE=
43345 fi
43346
43347 if test x$target_cpu = xarm64 -a x$platform = xefi; then
43348 COND_arm64_efi_TRUE=
43349 COND_arm64_efi_FALSE='#'
43350 else
43351 COND_arm64_efi_TRUE='#'
43352 COND_arm64_efi_FALSE=
43353 fi
43354
43355 if test x$target_cpu = xia64 -a x$platform = xefi; then
43356 COND_ia64_efi_TRUE=
43357 COND_ia64_efi_FALSE='#'
43358 else
43359 COND_ia64_efi_TRUE='#'
43360 COND_ia64_efi_FALSE=
43361 fi
43362
43363 if test x$target_cpu = xi386 -a x$platform = xpc; then
43364 COND_i386_pc_TRUE=
43365 COND_i386_pc_FALSE='#'
43366 else
43367 COND_i386_pc_TRUE='#'
43368 COND_i386_pc_FALSE=
43369 fi
43370
43371 if test x$target_cpu = xi386 -a x$platform = xefi; then
43372 COND_i386_efi_TRUE=
43373 COND_i386_efi_FALSE='#'
43374 else
43375 COND_i386_efi_TRUE='#'
43376 COND_i386_efi_FALSE=
43377 fi
43378
43379 if test x$target_cpu = xi386 -a x$platform = xqemu; then
43380 COND_i386_qemu_TRUE=
43381 COND_i386_qemu_FALSE='#'
43382 else
43383 COND_i386_qemu_TRUE='#'
43384 COND_i386_qemu_FALSE=
43385 fi
43386
43387 if test x$target_cpu = xi386 -a x$platform = xieee1275; then
43388 COND_i386_ieee1275_TRUE=
43389 COND_i386_ieee1275_FALSE='#'
43390 else
43391 COND_i386_ieee1275_TRUE='#'
43392 COND_i386_ieee1275_FALSE=
43393 fi
43394
43395 if test x$target_cpu = xi386 -a x$platform = xcoreboot; then
43396 COND_i386_coreboot_TRUE=
43397 COND_i386_coreboot_FALSE='#'
43398 else
43399 COND_i386_coreboot_TRUE='#'
43400 COND_i386_coreboot_FALSE=
43401 fi
43402
43403 if test x$target_cpu = xi386 -a x$platform = xmultiboot; then
43404 COND_i386_multiboot_TRUE=
43405 COND_i386_multiboot_FALSE='#'
43406 else
43407 COND_i386_multiboot_TRUE='#'
43408 COND_i386_multiboot_FALSE=
43409 fi
43410
43411 if test x$target_cpu = xi386 -a x$platform = xxen; then
43412 COND_i386_xen_TRUE=
43413 COND_i386_xen_FALSE='#'
43414 else
43415 COND_i386_xen_TRUE='#'
43416 COND_i386_xen_FALSE=
43417 fi
43418
43419 if test x$target_cpu = xi386 -a x$platform = xxen_pvh; then
43420 COND_i386_xen_pvh_TRUE=
43421 COND_i386_xen_pvh_FALSE='#'
43422 else
43423 COND_i386_xen_pvh_TRUE='#'
43424 COND_i386_xen_pvh_FALSE=
43425 fi
43426
43427 if test x$target_cpu = xloongarch64; then
43428 COND_loongarch64_TRUE=
43429 COND_loongarch64_FALSE='#'
43430 else
43431 COND_loongarch64_TRUE='#'
43432 COND_loongarch64_FALSE=
43433 fi
43434
43435 if test x$target_cpu = xloongarch64 -a x$platform = xefi; then
43436 COND_loongarch64_efi_TRUE=
43437 COND_loongarch64_efi_FALSE='#'
43438 else
43439 COND_loongarch64_efi_TRUE='#'
43440 COND_loongarch64_efi_FALSE=
43441 fi
43442
43443 if test x$target_cpu = xmips -o x$target_cpu = xmipsel; then
43444 COND_mips_TRUE=
43445 COND_mips_FALSE='#'
43446 else
43447 COND_mips_TRUE='#'
43448 COND_mips_FALSE=
43449 fi
43450
43451 if test "(" x$target_cpu = xmips -o x$target_cpu = xmipsel ")" -a x$platform = xarc; then
43452 COND_mips_arc_TRUE=
43453 COND_mips_arc_FALSE='#'
43454 else
43455 COND_mips_arc_TRUE='#'
43456 COND_mips_arc_FALSE=
43457 fi
43458
43459 if test x$target_cpu = xmipsel -a x$platform = xloongson; then
43460 COND_mips_loongson_TRUE=
43461 COND_mips_loongson_FALSE='#'
43462 else
43463 COND_mips_loongson_TRUE='#'
43464 COND_mips_loongson_FALSE=
43465 fi
43466
43467 if test "(" x$target_cpu = xmips -o x$target_cpu = xmipsel ")" -a x$platform = xqemu_mips; then
43468 COND_mips_qemu_mips_TRUE=
43469 COND_mips_qemu_mips_FALSE='#'
43470 else
43471 COND_mips_qemu_mips_TRUE='#'
43472 COND_mips_qemu_mips_FALSE=
43473 fi
43474
43475 if test x$target_cpu = xmipsel; then
43476 COND_mipsel_TRUE=
43477 COND_mipsel_FALSE='#'
43478 else
43479 COND_mipsel_TRUE='#'
43480 COND_mipsel_FALSE=
43481 fi
43482
43483 if test x$target_cpu = xmips; then
43484 COND_mipseb_TRUE=
43485 COND_mipseb_FALSE='#'
43486 else
43487 COND_mipseb_TRUE='#'
43488 COND_mipseb_FALSE=
43489 fi
43490
43491 if test x$target_cpu = xpowerpc -a x$platform = xieee1275; then
43492 COND_powerpc_ieee1275_TRUE=
43493 COND_powerpc_ieee1275_FALSE='#'
43494 else
43495 COND_powerpc_ieee1275_TRUE='#'
43496 COND_powerpc_ieee1275_FALSE=
43497 fi
43498
43499 if test x$target_cpu = xriscv32 ; then
43500 COND_riscv32_TRUE=
43501 COND_riscv32_FALSE='#'
43502 else
43503 COND_riscv32_TRUE='#'
43504 COND_riscv32_FALSE=
43505 fi
43506
43507 if test x$target_cpu = xriscv64 ; then
43508 COND_riscv64_TRUE=
43509 COND_riscv64_FALSE='#'
43510 else
43511 COND_riscv64_TRUE='#'
43512 COND_riscv64_FALSE=
43513 fi
43514
43515 if test x$target_cpu = xriscv32 -a x$platform = xefi; then
43516 COND_riscv32_efi_TRUE=
43517 COND_riscv32_efi_FALSE='#'
43518 else
43519 COND_riscv32_efi_TRUE='#'
43520 COND_riscv32_efi_FALSE=
43521 fi
43522
43523 if test x$target_cpu = xriscv64 -a x$platform = xefi; then
43524 COND_riscv64_efi_TRUE=
43525 COND_riscv64_efi_FALSE='#'
43526 else
43527 COND_riscv64_efi_TRUE='#'
43528 COND_riscv64_efi_FALSE=
43529 fi
43530
43531 if test x$target_cpu = xsparc64 -a x$platform = xieee1275; then
43532 COND_sparc64_ieee1275_TRUE=
43533 COND_sparc64_ieee1275_FALSE='#'
43534 else
43535 COND_sparc64_ieee1275_TRUE='#'
43536 COND_sparc64_ieee1275_FALSE=
43537 fi
43538
43539 if test x$target_cpu = xsparc64 -a x$platform = xemu; then
43540 COND_sparc64_emu_TRUE=
43541 COND_sparc64_emu_FALSE='#'
43542 else
43543 COND_sparc64_emu_TRUE='#'
43544 COND_sparc64_emu_FALSE=
43545 fi
43546
43547 if test x$target_cpu = xx86_64 -a x$platform = xefi; then
43548 COND_x86_64_efi_TRUE=
43549 COND_x86_64_efi_FALSE='#'
43550 else
43551 COND_x86_64_efi_TRUE='#'
43552 COND_x86_64_efi_FALSE=
43553 fi
43554
43555 if test x$target_cpu = xx86_64 -a x$platform = xxen; then
43556 COND_x86_64_xen_TRUE=
43557 COND_x86_64_xen_FALSE='#'
43558 else
43559 COND_x86_64_xen_TRUE='#'
43560 COND_x86_64_xen_FALSE=
43561 fi
43562
43563
43564 if test x$host_kernel = xhurd; then
43565 COND_HOST_HURD_TRUE=
43566 COND_HOST_HURD_FALSE='#'
43567 else
43568 COND_HOST_HURD_TRUE='#'
43569 COND_HOST_HURD_FALSE=
43570 fi
43571
43572 if test x$host_kernel = xlinux; then
43573 COND_HOST_LINUX_TRUE=
43574 COND_HOST_LINUX_FALSE='#'
43575 else
43576 COND_HOST_LINUX_TRUE='#'
43577 COND_HOST_LINUX_FALSE=
43578 fi
43579
43580 if test x$host_kernel = xnetbsd; then
43581 COND_HOST_NETBSD_TRUE=
43582 COND_HOST_NETBSD_FALSE='#'
43583 else
43584 COND_HOST_NETBSD_TRUE='#'
43585 COND_HOST_NETBSD_FALSE=
43586 fi
43587
43588 if test x$host_kernel = xwindows; then
43589 COND_HOST_WINDOWS_TRUE=
43590 COND_HOST_WINDOWS_FALSE='#'
43591 else
43592 COND_HOST_WINDOWS_TRUE='#'
43593 COND_HOST_WINDOWS_FALSE=
43594 fi
43595
43596 if test x$host_kernel = xkfreebsd; then
43597 COND_HOST_KFREEBSD_TRUE=
43598 COND_HOST_KFREEBSD_FALSE='#'
43599 else
43600 COND_HOST_KFREEBSD_TRUE='#'
43601 COND_HOST_KFREEBSD_FALSE=
43602 fi
43603
43604 if test x$host_kernel = xxnu; then
43605 COND_HOST_XNU_TRUE=
43606 COND_HOST_XNU_FALSE='#'
43607 else
43608 COND_HOST_XNU_TRUE='#'
43609 COND_HOST_XNU_FALSE=
43610 fi
43611
43612 if test x$host_kernel = xillumos; then
43613 COND_HOST_ILLUMOS_TRUE=
43614 COND_HOST_ILLUMOS_FALSE='#'
43615 else
43616 COND_HOST_ILLUMOS_TRUE='#'
43617 COND_HOST_ILLUMOS_FALSE=
43618 fi
43619
43620
43621 if test x$cross_compiling = xno -a x$HELP2MAN != x; then
43622 COND_MAN_PAGES_TRUE=
43623 COND_MAN_PAGES_FALSE='#'
43624 else
43625 COND_MAN_PAGES_TRUE='#'
43626 COND_MAN_PAGES_FALSE=
43627 fi
43628
43629 if test x$enable_grub_emu_sdl2 = xyes; then
43630 COND_GRUB_EMU_SDL2_TRUE=
43631 COND_GRUB_EMU_SDL2_FALSE='#'
43632 else
43633 COND_GRUB_EMU_SDL2_TRUE='#'
43634 COND_GRUB_EMU_SDL2_FALSE=
43635 fi
43636
43637 if test x$enable_grub_emu_sdl = xyes; then
43638 COND_GRUB_EMU_SDL_TRUE=
43639 COND_GRUB_EMU_SDL_FALSE='#'
43640 else
43641 COND_GRUB_EMU_SDL_TRUE='#'
43642 COND_GRUB_EMU_SDL_FALSE=
43643 fi
43644
43645 if test x$enable_grub_emu_pci = xyes; then
43646 COND_GRUB_EMU_PCI_TRUE=
43647 COND_GRUB_EMU_PCI_FALSE='#'
43648 else
43649 COND_GRUB_EMU_PCI_TRUE='#'
43650 COND_GRUB_EMU_PCI_FALSE=
43651 fi
43652
43653 if test x$enable_grub_mkfont = xyes; then
43654 COND_GRUB_MKFONT_TRUE=
43655 COND_GRUB_MKFONT_FALSE='#'
43656 else
43657 COND_GRUB_MKFONT_TRUE='#'
43658 COND_GRUB_MKFONT_FALSE=
43659 fi
43660
43661 if test x$enable_grub_mount = xyes; then
43662 COND_GRUB_MOUNT_TRUE=
43663 COND_GRUB_MOUNT_FALSE='#'
43664 else
43665 COND_GRUB_MOUNT_TRUE='#'
43666 COND_GRUB_MOUNT_FALSE=
43667 fi
43668
43669 if test x$enable_grub_protect = xyes; then
43670 COND_GRUB_PROTECT_TRUE=
43671 COND_GRUB_PROTECT_FALSE='#'
43672 else
43673 COND_GRUB_PROTECT_TRUE='#'
43674 COND_GRUB_PROTECT_FALSE=
43675 fi
43676
43677 if test x$FONT_SOURCE != x; then
43678 COND_HAVE_FONT_SOURCE_TRUE=
43679 COND_HAVE_FONT_SOURCE_FALSE='#'
43680 else
43681 COND_HAVE_FONT_SOURCE_TRUE='#'
43682 COND_HAVE_FONT_SOURCE_FALSE=
43683 fi
43684
43685 if test x$FONT_SOURCE != x ; then
43686 HAVE_FONT_SOURCE=1
43687 else
43688 HAVE_FONT_SOURCE=0
43689 fi
43690
43691 if test x$TARGET_APPLE_LINKER = x1; then
43692 COND_APPLE_LINKER_TRUE=
43693 COND_APPLE_LINKER_FALSE='#'
43694 else
43695 COND_APPLE_LINKER_TRUE='#'
43696 COND_APPLE_LINKER_FALSE=
43697 fi
43698
43699 if test x$enable_efiemu = xyes; then
43700 COND_ENABLE_EFIEMU_TRUE=
43701 COND_ENABLE_EFIEMU_FALSE='#'
43702 else
43703 COND_ENABLE_EFIEMU_TRUE='#'
43704 COND_ENABLE_EFIEMU_FALSE=
43705 fi
43706
43707 if test x$DISK_CACHE_STATS = x1; then
43708 COND_ENABLE_CACHE_STATS_TRUE=
43709 COND_ENABLE_CACHE_STATS_FALSE='#'
43710 else
43711 COND_ENABLE_CACHE_STATS_TRUE='#'
43712 COND_ENABLE_CACHE_STATS_FALSE=
43713 fi
43714
43715 if test x$BOOT_TIME_STATS = x1; then
43716 COND_ENABLE_BOOT_TIME_STATS_TRUE=
43717 COND_ENABLE_BOOT_TIME_STATS_FALSE='#'
43718 else
43719 COND_ENABLE_BOOT_TIME_STATS_TRUE='#'
43720 COND_ENABLE_BOOT_TIME_STATS_FALSE=
43721 fi
43722
43723
43724 if test x$HAVE_CXX = xyes; then
43725 COND_HAVE_CXX_TRUE=
43726 COND_HAVE_CXX_FALSE='#'
43727 else
43728 COND_HAVE_CXX_TRUE='#'
43729 COND_HAVE_CXX_FALSE=
43730 fi
43731
43732
43733 if test x$HAVE_ASM_USCORE = x1; then
43734 COND_HAVE_ASM_USCORE_TRUE=
43735 COND_HAVE_ASM_USCORE_FALSE='#'
43736 else
43737 COND_HAVE_ASM_USCORE_TRUE='#'
43738 COND_HAVE_ASM_USCORE_FALSE=
43739 fi
43740
43741 if test "x$starfield_excuse" = x; then
43742 COND_STARFIELD_TRUE=
43743 COND_STARFIELD_FALSE='#'
43744 else
43745 COND_STARFIELD_TRUE='#'
43746 COND_STARFIELD_FALSE=
43747 fi
43748
43749 if test "x$have_exec" = xy; then
43750 COND_HAVE_EXEC_TRUE=
43751 COND_HAVE_EXEC_FALSE='#'
43752 else
43753 COND_HAVE_EXEC_TRUE='#'
43754 COND_HAVE_EXEC_FALSE=
43755 fi
43756
43757 if test "x$have_pci" = xy; then
43758 COND_HAVE_PCI_TRUE=
43759 COND_HAVE_PCI_FALSE='#'
43760 else
43761 COND_HAVE_PCI_TRUE='#'
43762 COND_HAVE_PCI_FALSE=
43763 fi
43764
43765
43766 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
43767 test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
43768 datarootdir="$(eval echo "$datarootdir")"
43769 grub_libdir="$(eval echo "$libdir")"
43770 grub_localedir="$(eval echo "$localedir")"
43771 grub_datadir="$(eval echo "$datadir")"
43772 grub_sysconfdir="$(eval echo "$sysconfdir")"
43773
43774 printf "%s\n" "#define LOCALEDIR \"$grub_localedir\"" >>confdefs.h
43775
43776
43777 printf "%s\n" "#define GRUB_LIBDIR \"$grub_libdir\"" >>confdefs.h
43778
43779
43780 printf "%s\n" "#define GRUB_DATADIR \"$grub_datadir\"" >>confdefs.h
43781
43782
43783 printf "%s\n" "#define GRUB_SYSCONFDIR \"$grub_sysconfdir\"" >>confdefs.h
43784
43785
43786
43787 # Output files.
43788 if test "$platform" != none; then
43789 cpudir="${target_cpu}"
43790 if test x${cpudir} = xmipsel; then
43791 cpudir=mips;
43792 fi
43793
43794 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s can handle directories properly" >&5
43795 printf %s "checking whether ln -s can handle directories properly... " >&6; }
43796 mkdir testdir 2>/dev/null
43797 case $srcdir in
43798 [\\/$]* | ?:[\\/]* ) reldir=$srcdir/include/grub/util ;;
43799 *) reldir=../$srcdir/include/grub/util ;;
43800 esac
43801 if ln -s $reldir testdir/util 2>/dev/null && rm -f testdir/util 2>/dev/null ; then
43802 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43803 printf "%s\n" "yes" >&6; }
43804 link_dir=yes
43805 else
43806 link_dir=no
43807 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
43808 printf "%s\n" "no" >&6; }
43809 fi
43810 rm -rf testdir
43811
43812 if test x"$link_dir" = xyes ; then
43813 ac_config_links="$ac_config_links include/grub/cpu:include/grub/$cpudir"
43814
43815 if test "$platform" != emu ; then
43816 ac_config_links="$ac_config_links include/grub/machine:include/grub/$cpudir/$platform"
43817
43818 fi
43819 else
43820 mkdir -p include/grub 2>/dev/null
43821 rm -rf include/grub/cpu
43822 cp -rp $srcdir/include/grub/$cpudir include/grub/cpu 2>/dev/null
43823 if test "$platform" != emu ; then
43824 rm -rf include/grub/machine
43825 cp -rp $srcdir/include/grub/$cpudir/$platform include/grub/machine 2>/dev/null
43826 fi
43827 fi
43828 else
43829 # Just enough to stop the compiler failing with -I$(srcdir)/include.
43830 mkdir -p include 2>/dev/null
43831 rm -rf include/grub/cpu include/grub/machine
43832 fi
43833
43834 ac_config_files="$ac_config_files Makefile"
43835
43836 ac_config_files="$ac_config_files grub-core/Makefile"
43837
43838 ac_config_files="$ac_config_files grub-core/lib/gnulib/Makefile"
43839
43840 ac_config_files="$ac_config_files po/Makefile.in"
43841
43842 ac_config_files="$ac_config_files docs/Makefile"
43843
43844 ac_config_files="$ac_config_files util/bash-completion.d/Makefile"
43845
43846 ac_config_files="$ac_config_files stamp-h"
43847
43848 ac_config_files="$ac_config_files config.h"
43849
43850
43851 cat >confcache <<\_ACEOF
43852 # This file is a shell script that caches the results of configure
43853 # tests run on this system so they can be shared between configure
43854 # scripts and configure runs, see configure's option --config-cache.
43855 # It is not useful on other systems. If it contains results you don't
43856 # want to keep, you may remove or edit it.
43857 #
43858 # config.status only pays attention to the cache file if you give it
43859 # the --recheck option to rerun configure.
43860 #
43861 # `ac_cv_env_foo' variables (set or unset) will be overridden when
43862 # loading this file, other *unset* `ac_cv_foo' will be assigned the
43863 # following values.
43864
43865 _ACEOF
43866
43867 # The following way of writing the cache mishandles newlines in values,
43868 # but we know of no workaround that is simple, portable, and efficient.
43869 # So, we kill variables containing newlines.
43870 # Ultrix sh set writes to stderr and can't be redirected directly,
43871 # and sets the high bit in the cache file unless we assign to the vars.
43872 (
43873 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
43874 eval ac_val=\$$ac_var
43875 case $ac_val in #(
43876 *${as_nl}*)
43877 case $ac_var in #(
43878 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
43879 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
43880 esac
43881 case $ac_var in #(
43882 _ | IFS | as_nl) ;; #(
43883 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
43884 *) { eval $ac_var=; unset $ac_var;} ;;
43885 esac ;;
43886 esac
43887 done
43888
43889 (set) 2>&1 |
43890 case $as_nl`(ac_space=' '; set) 2>&1` in #(
43891 *${as_nl}ac_space=\ *)
43892 # `set' does not quote correctly, so add quotes: double-quote
43893 # substitution turns \\\\ into \\, and sed turns \\ into \.
43894 sed -n \
43895 "s/'/'\\\\''/g;
43896 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
43897 ;; #(
43898 *)
43899 # `set' quotes correctly as required by POSIX, so do not add quotes.
43900 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
43901 ;;
43902 esac |
43903 sort
43904 ) |
43905 sed '
43906 /^ac_cv_env_/b end
43907 t clear
43908 :clear
43909 s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
43910 t end
43911 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
43912 :end' >>confcache
43913 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
43914 if test -w "$cache_file"; then
43915 if test "x$cache_file" != "x/dev/null"; then
43916 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
43917 printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
43918 if test ! -f "$cache_file" || test -h "$cache_file"; then
43919 cat confcache >"$cache_file"
43920 else
43921 case $cache_file in #(
43922 */* | ?:*)
43923 mv -f confcache "$cache_file"$$ &&
43924 mv -f "$cache_file"$$ "$cache_file" ;; #(
43925 *)
43926 mv -f confcache "$cache_file" ;;
43927 esac
43928 fi
43929 fi
43930 else
43931 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
43932 printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
43933 fi
43934 fi
43935 rm -f confcache
43936
43937 test "x$prefix" = xNONE && prefix=$ac_default_prefix
43938 # Let make expand exec_prefix.
43939 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
43940
43941 DEFS=-DHAVE_CONFIG_H
43942
43943 ac_libobjs=
43944 ac_ltlibobjs=
43945 U=
43946 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
43947 # 1. Remove the extension, and $U if already installed.
43948 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
43949 ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
43950 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
43951 # will be set to the directory where LIBOBJS objects are built.
43952 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
43953 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
43954 done
43955 LIBOBJS=$ac_libobjs
43956
43957 LTLIBOBJS=$ac_ltlibobjs
43958
43959
43960 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
43961 printf %s "checking that generated files are newer than configure... " >&6; }
43962 if test -n "$am_sleep_pid"; then
43963 # Hide warnings about reused PIDs.
43964 wait $am_sleep_pid 2>/dev/null
43965 fi
43966 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5
43967 printf "%s\n" "done" >&6; }
43968 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
43969 as_fn_error $? "conditional \"AMDEP\" was never defined.
43970 Usually this means the macro was only invoked conditionally." "$LINENO" 5
43971 fi
43972 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
43973 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
43974 Usually this means the macro was only invoked conditionally." "$LINENO" 5
43975 fi
43976 if test -n "$EXEEXT"; then
43977 am__EXEEXT_TRUE=
43978 am__EXEEXT_FALSE='#'
43979 else
43980 am__EXEEXT_TRUE='#'
43981 am__EXEEXT_FALSE=
43982 fi
43983
43984 if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
43985 as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
43986 Usually this means the macro was only invoked conditionally." "$LINENO" 5
43987 fi
43988 if test -z "${am__fastdepCCAS_TRUE}" && test -z "${am__fastdepCCAS_FALSE}"; then
43989 as_fn_error $? "conditional \"am__fastdepCCAS\" was never defined.
43990 Usually this means the macro was only invoked conditionally." "$LINENO" 5
43991 fi
43992
43993 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
43994 as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
43995 Usually this means the macro was only invoked conditionally." "$LINENO" 5
43996 fi
43997
43998
43999 gl_libobjs=
44000 gl_ltlibobjs=
44001 gl_libobjdeps=
44002 if test -n "$gl_LIBOBJS"; then
44003 # Remove the extension.
44004 sed_drop_objext='s/\.o$//;s/\.obj$//'
44005 sed_dirname1='s,//*,/,g'
44006 sed_dirname2='s,\(.\)/$,\1,'
44007 sed_dirname3='s,^[^/]*$,.,'
44008 sed_dirname4='s,\(.\)/[^/]*$,\1,'
44009 sed_basename1='s,.*/,,'
44010 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
44011 gl_libobjs="$gl_libobjs $i.$ac_objext"
44012 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
44013 i_dir=`echo "$i" | sed -e "$sed_dirname1" -e "$sed_dirname2" -e "$sed_dirname3" -e "$sed_dirname4"`
44014 i_base=`echo "$i" | sed -e "$sed_basename1"`
44015 gl_libobjdeps="$gl_libobjdeps $i_dir/\$(DEPDIR)/$i_base.Po"
44016 done
44017 fi
44018 gl_LIBOBJS=$gl_libobjs
44019
44020 gl_LTLIBOBJS=$gl_ltlibobjs
44021
44022 gl_LIBOBJDEPS=$gl_libobjdeps
44023
44024
44025
44026 gltests_libobjs=
44027 gltests_ltlibobjs=
44028 gltests_libobjdeps=
44029 if test -n "$gltests_LIBOBJS"; then
44030 # Remove the extension.
44031 sed_drop_objext='s/\.o$//;s/\.obj$//'
44032 sed_dirname1='s,//*,/,g'
44033 sed_dirname2='s,\(.\)/$,\1,'
44034 sed_dirname3='s,^[^/]*$,.,'
44035 sed_dirname4='s,\(.\)/[^/]*$,\1,'
44036 sed_basename1='s,.*/,,'
44037 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
44038 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
44039 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
44040 i_dir=`echo "$i" | sed -e "$sed_dirname1" -e "$sed_dirname2" -e "$sed_dirname3" -e "$sed_dirname4"`
44041 i_base=`echo "$i" | sed -e "$sed_basename1"`
44042 gltests_libobjdeps="$gltests_libobjdeps $i_dir/\$(DEPDIR)/$i_base.Po"
44043 done
44044 fi
44045 gltests_LIBOBJS=$gltests_libobjs
44046
44047 gltests_LTLIBOBJS=$gltests_ltlibobjs
44048
44049 gltests_LIBOBJDEPS=$gltests_libobjdeps
44050
44051
44052 if test -z "${COND_MM_DEBUG_TRUE}" && test -z "${COND_MM_DEBUG_FALSE}"; then
44053 as_fn_error $? "conditional \"COND_MM_DEBUG\" was never defined.
44054 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44055 fi
44056 if test -z "${COND_real_platform_TRUE}" && test -z "${COND_real_platform_FALSE}"; then
44057 as_fn_error $? "conditional \"COND_real_platform\" was never defined.
44058 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44059 fi
44060 if test -z "${COND_emu_TRUE}" && test -z "${COND_emu_FALSE}"; then
44061 as_fn_error $? "conditional \"COND_emu\" was never defined.
44062 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44063 fi
44064 if test -z "${COND_arm_TRUE}" && test -z "${COND_arm_FALSE}"; then
44065 as_fn_error $? "conditional \"COND_arm\" was never defined.
44066 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44067 fi
44068 if test -z "${COND_arm_uboot_TRUE}" && test -z "${COND_arm_uboot_FALSE}"; then
44069 as_fn_error $? "conditional \"COND_arm_uboot\" was never defined.
44070 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44071 fi
44072 if test -z "${COND_arm_coreboot_TRUE}" && test -z "${COND_arm_coreboot_FALSE}"; then
44073 as_fn_error $? "conditional \"COND_arm_coreboot\" was never defined.
44074 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44075 fi
44076 if test -z "${COND_arm_efi_TRUE}" && test -z "${COND_arm_efi_FALSE}"; then
44077 as_fn_error $? "conditional \"COND_arm_efi\" was never defined.
44078 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44079 fi
44080 if test -z "${COND_arm64_TRUE}" && test -z "${COND_arm64_FALSE}"; then
44081 as_fn_error $? "conditional \"COND_arm64\" was never defined.
44082 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44083 fi
44084 if test -z "${COND_arm64_efi_TRUE}" && test -z "${COND_arm64_efi_FALSE}"; then
44085 as_fn_error $? "conditional \"COND_arm64_efi\" was never defined.
44086 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44087 fi
44088 if test -z "${COND_ia64_efi_TRUE}" && test -z "${COND_ia64_efi_FALSE}"; then
44089 as_fn_error $? "conditional \"COND_ia64_efi\" was never defined.
44090 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44091 fi
44092 if test -z "${COND_i386_pc_TRUE}" && test -z "${COND_i386_pc_FALSE}"; then
44093 as_fn_error $? "conditional \"COND_i386_pc\" was never defined.
44094 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44095 fi
44096 if test -z "${COND_i386_efi_TRUE}" && test -z "${COND_i386_efi_FALSE}"; then
44097 as_fn_error $? "conditional \"COND_i386_efi\" was never defined.
44098 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44099 fi
44100 if test -z "${COND_i386_qemu_TRUE}" && test -z "${COND_i386_qemu_FALSE}"; then
44101 as_fn_error $? "conditional \"COND_i386_qemu\" was never defined.
44102 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44103 fi
44104 if test -z "${COND_i386_ieee1275_TRUE}" && test -z "${COND_i386_ieee1275_FALSE}"; then
44105 as_fn_error $? "conditional \"COND_i386_ieee1275\" was never defined.
44106 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44107 fi
44108 if test -z "${COND_i386_coreboot_TRUE}" && test -z "${COND_i386_coreboot_FALSE}"; then
44109 as_fn_error $? "conditional \"COND_i386_coreboot\" was never defined.
44110 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44111 fi
44112 if test -z "${COND_i386_multiboot_TRUE}" && test -z "${COND_i386_multiboot_FALSE}"; then
44113 as_fn_error $? "conditional \"COND_i386_multiboot\" was never defined.
44114 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44115 fi
44116 if test -z "${COND_i386_xen_TRUE}" && test -z "${COND_i386_xen_FALSE}"; then
44117 as_fn_error $? "conditional \"COND_i386_xen\" was never defined.
44118 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44119 fi
44120 if test -z "${COND_i386_xen_pvh_TRUE}" && test -z "${COND_i386_xen_pvh_FALSE}"; then
44121 as_fn_error $? "conditional \"COND_i386_xen_pvh\" was never defined.
44122 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44123 fi
44124 if test -z "${COND_loongarch64_TRUE}" && test -z "${COND_loongarch64_FALSE}"; then
44125 as_fn_error $? "conditional \"COND_loongarch64\" was never defined.
44126 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44127 fi
44128 if test -z "${COND_loongarch64_efi_TRUE}" && test -z "${COND_loongarch64_efi_FALSE}"; then
44129 as_fn_error $? "conditional \"COND_loongarch64_efi\" was never defined.
44130 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44131 fi
44132 if test -z "${COND_mips_TRUE}" && test -z "${COND_mips_FALSE}"; then
44133 as_fn_error $? "conditional \"COND_mips\" was never defined.
44134 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44135 fi
44136 if test -z "${COND_mips_arc_TRUE}" && test -z "${COND_mips_arc_FALSE}"; then
44137 as_fn_error $? "conditional \"COND_mips_arc\" was never defined.
44138 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44139 fi
44140 if test -z "${COND_mips_loongson_TRUE}" && test -z "${COND_mips_loongson_FALSE}"; then
44141 as_fn_error $? "conditional \"COND_mips_loongson\" was never defined.
44142 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44143 fi
44144 if test -z "${COND_mips_qemu_mips_TRUE}" && test -z "${COND_mips_qemu_mips_FALSE}"; then
44145 as_fn_error $? "conditional \"COND_mips_qemu_mips\" was never defined.
44146 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44147 fi
44148 if test -z "${COND_mipsel_TRUE}" && test -z "${COND_mipsel_FALSE}"; then
44149 as_fn_error $? "conditional \"COND_mipsel\" was never defined.
44150 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44151 fi
44152 if test -z "${COND_mipseb_TRUE}" && test -z "${COND_mipseb_FALSE}"; then
44153 as_fn_error $? "conditional \"COND_mipseb\" was never defined.
44154 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44155 fi
44156 if test -z "${COND_powerpc_ieee1275_TRUE}" && test -z "${COND_powerpc_ieee1275_FALSE}"; then
44157 as_fn_error $? "conditional \"COND_powerpc_ieee1275\" was never defined.
44158 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44159 fi
44160 if test -z "${COND_riscv32_TRUE}" && test -z "${COND_riscv32_FALSE}"; then
44161 as_fn_error $? "conditional \"COND_riscv32\" was never defined.
44162 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44163 fi
44164 if test -z "${COND_riscv64_TRUE}" && test -z "${COND_riscv64_FALSE}"; then
44165 as_fn_error $? "conditional \"COND_riscv64\" was never defined.
44166 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44167 fi
44168 if test -z "${COND_riscv32_efi_TRUE}" && test -z "${COND_riscv32_efi_FALSE}"; then
44169 as_fn_error $? "conditional \"COND_riscv32_efi\" was never defined.
44170 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44171 fi
44172 if test -z "${COND_riscv64_efi_TRUE}" && test -z "${COND_riscv64_efi_FALSE}"; then
44173 as_fn_error $? "conditional \"COND_riscv64_efi\" was never defined.
44174 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44175 fi
44176 if test -z "${COND_sparc64_ieee1275_TRUE}" && test -z "${COND_sparc64_ieee1275_FALSE}"; then
44177 as_fn_error $? "conditional \"COND_sparc64_ieee1275\" was never defined.
44178 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44179 fi
44180 if test -z "${COND_sparc64_emu_TRUE}" && test -z "${COND_sparc64_emu_FALSE}"; then
44181 as_fn_error $? "conditional \"COND_sparc64_emu\" was never defined.
44182 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44183 fi
44184 if test -z "${COND_x86_64_efi_TRUE}" && test -z "${COND_x86_64_efi_FALSE}"; then
44185 as_fn_error $? "conditional \"COND_x86_64_efi\" was never defined.
44186 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44187 fi
44188 if test -z "${COND_x86_64_xen_TRUE}" && test -z "${COND_x86_64_xen_FALSE}"; then
44189 as_fn_error $? "conditional \"COND_x86_64_xen\" was never defined.
44190 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44191 fi
44192 if test -z "${COND_HOST_HURD_TRUE}" && test -z "${COND_HOST_HURD_FALSE}"; then
44193 as_fn_error $? "conditional \"COND_HOST_HURD\" was never defined.
44194 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44195 fi
44196 if test -z "${COND_HOST_LINUX_TRUE}" && test -z "${COND_HOST_LINUX_FALSE}"; then
44197 as_fn_error $? "conditional \"COND_HOST_LINUX\" was never defined.
44198 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44199 fi
44200 if test -z "${COND_HOST_NETBSD_TRUE}" && test -z "${COND_HOST_NETBSD_FALSE}"; then
44201 as_fn_error $? "conditional \"COND_HOST_NETBSD\" was never defined.
44202 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44203 fi
44204 if test -z "${COND_HOST_WINDOWS_TRUE}" && test -z "${COND_HOST_WINDOWS_FALSE}"; then
44205 as_fn_error $? "conditional \"COND_HOST_WINDOWS\" was never defined.
44206 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44207 fi
44208 if test -z "${COND_HOST_KFREEBSD_TRUE}" && test -z "${COND_HOST_KFREEBSD_FALSE}"; then
44209 as_fn_error $? "conditional \"COND_HOST_KFREEBSD\" was never defined.
44210 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44211 fi
44212 if test -z "${COND_HOST_XNU_TRUE}" && test -z "${COND_HOST_XNU_FALSE}"; then
44213 as_fn_error $? "conditional \"COND_HOST_XNU\" was never defined.
44214 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44215 fi
44216 if test -z "${COND_HOST_ILLUMOS_TRUE}" && test -z "${COND_HOST_ILLUMOS_FALSE}"; then
44217 as_fn_error $? "conditional \"COND_HOST_ILLUMOS\" was never defined.
44218 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44219 fi
44220 if test -z "${COND_MAN_PAGES_TRUE}" && test -z "${COND_MAN_PAGES_FALSE}"; then
44221 as_fn_error $? "conditional \"COND_MAN_PAGES\" was never defined.
44222 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44223 fi
44224 if test -z "${COND_GRUB_EMU_SDL2_TRUE}" && test -z "${COND_GRUB_EMU_SDL2_FALSE}"; then
44225 as_fn_error $? "conditional \"COND_GRUB_EMU_SDL2\" was never defined.
44226 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44227 fi
44228 if test -z "${COND_GRUB_EMU_SDL_TRUE}" && test -z "${COND_GRUB_EMU_SDL_FALSE}"; then
44229 as_fn_error $? "conditional \"COND_GRUB_EMU_SDL\" was never defined.
44230 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44231 fi
44232 if test -z "${COND_GRUB_EMU_PCI_TRUE}" && test -z "${COND_GRUB_EMU_PCI_FALSE}"; then
44233 as_fn_error $? "conditional \"COND_GRUB_EMU_PCI\" was never defined.
44234 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44235 fi
44236 if test -z "${COND_GRUB_MKFONT_TRUE}" && test -z "${COND_GRUB_MKFONT_FALSE}"; then
44237 as_fn_error $? "conditional \"COND_GRUB_MKFONT\" was never defined.
44238 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44239 fi
44240 if test -z "${COND_GRUB_MOUNT_TRUE}" && test -z "${COND_GRUB_MOUNT_FALSE}"; then
44241 as_fn_error $? "conditional \"COND_GRUB_MOUNT\" was never defined.
44242 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44243 fi
44244 if test -z "${COND_GRUB_PROTECT_TRUE}" && test -z "${COND_GRUB_PROTECT_FALSE}"; then
44245 as_fn_error $? "conditional \"COND_GRUB_PROTECT\" was never defined.
44246 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44247 fi
44248 if test -z "${COND_HAVE_FONT_SOURCE_TRUE}" && test -z "${COND_HAVE_FONT_SOURCE_FALSE}"; then
44249 as_fn_error $? "conditional \"COND_HAVE_FONT_SOURCE\" was never defined.
44250 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44251 fi
44252 if test -z "${COND_APPLE_LINKER_TRUE}" && test -z "${COND_APPLE_LINKER_FALSE}"; then
44253 as_fn_error $? "conditional \"COND_APPLE_LINKER\" was never defined.
44254 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44255 fi
44256 if test -z "${COND_ENABLE_EFIEMU_TRUE}" && test -z "${COND_ENABLE_EFIEMU_FALSE}"; then
44257 as_fn_error $? "conditional \"COND_ENABLE_EFIEMU\" was never defined.
44258 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44259 fi
44260 if test -z "${COND_ENABLE_CACHE_STATS_TRUE}" && test -z "${COND_ENABLE_CACHE_STATS_FALSE}"; then
44261 as_fn_error $? "conditional \"COND_ENABLE_CACHE_STATS\" was never defined.
44262 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44263 fi
44264 if test -z "${COND_ENABLE_BOOT_TIME_STATS_TRUE}" && test -z "${COND_ENABLE_BOOT_TIME_STATS_FALSE}"; then
44265 as_fn_error $? "conditional \"COND_ENABLE_BOOT_TIME_STATS\" was never defined.
44266 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44267 fi
44268 if test -z "${COND_HAVE_CXX_TRUE}" && test -z "${COND_HAVE_CXX_FALSE}"; then
44269 as_fn_error $? "conditional \"COND_HAVE_CXX\" was never defined.
44270 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44271 fi
44272 if test -z "${COND_HAVE_ASM_USCORE_TRUE}" && test -z "${COND_HAVE_ASM_USCORE_FALSE}"; then
44273 as_fn_error $? "conditional \"COND_HAVE_ASM_USCORE\" was never defined.
44274 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44275 fi
44276 if test -z "${COND_STARFIELD_TRUE}" && test -z "${COND_STARFIELD_FALSE}"; then
44277 as_fn_error $? "conditional \"COND_STARFIELD\" was never defined.
44278 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44279 fi
44280 if test -z "${COND_HAVE_EXEC_TRUE}" && test -z "${COND_HAVE_EXEC_FALSE}"; then
44281 as_fn_error $? "conditional \"COND_HAVE_EXEC\" was never defined.
44282 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44283 fi
44284 if test -z "${COND_HAVE_PCI_TRUE}" && test -z "${COND_HAVE_PCI_FALSE}"; then
44285 as_fn_error $? "conditional \"COND_HAVE_PCI\" was never defined.
44286 Usually this means the macro was only invoked conditionally." "$LINENO" 5
44287 fi
44288
44289 : "${CONFIG_STATUS=./config.status}"
44290 ac_write_fail=0
44291 ac_clean_files_save=$ac_clean_files
44292 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
44293 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
44294 printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
44295 as_write_fail=0
44296 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
44297 #! $SHELL
44298 # Generated by $as_me.
44299 # Run this file to recreate the current configuration.
44300 # Compiler output produced by configure, useful for debugging
44301 # configure, is in config.log if it exists.
44302
44303 debug=false
44304 ac_cs_recheck=false
44305 ac_cs_silent=false
44306
44307 SHELL=\${CONFIG_SHELL-$SHELL}
44308 export SHELL
44309 _ASEOF
44310 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
44311 ## -------------------- ##
44312 ## M4sh Initialization. ##
44313 ## -------------------- ##
44314
44315 # Be more Bourne compatible
44316 DUALCASE=1; export DUALCASE # for MKS sh
44317 as_nop=:
44318 if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
44319 then :
44320 emulate sh
44321 NULLCMD=:
44322 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
44323 # is contrary to our usage. Disable this feature.
44324 alias -g '${1+"$@"}'='"$@"'
44325 setopt NO_GLOB_SUBST
44326 else $as_nop
44327 case `(set -o) 2>/dev/null` in #(
44328 *posix*) :
44329 set -o posix ;; #(
44330 *) :
44331 ;;
44332 esac
44333 fi
44334
44335
44336
44337 # Reset variables that may have inherited troublesome values from
44338 # the environment.
44339
44340 # IFS needs to be set, to space, tab, and newline, in precisely that order.
44341 # (If _AS_PATH_WALK were called with IFS unset, it would have the
44342 # side effect of setting IFS to empty, thus disabling word splitting.)
44343 # Quoting is to prevent editors from complaining about space-tab.
44344 as_nl='
44345 '
44346 export as_nl
44347 IFS=" "" $as_nl"
44348
44349 PS1='$ '
44350 PS2='> '
44351 PS4='+ '
44352
44353 # Ensure predictable behavior from utilities with locale-dependent output.
44354 LC_ALL=C
44355 export LC_ALL
44356 LANGUAGE=C
44357 export LANGUAGE
44358
44359 # We cannot yet rely on "unset" to work, but we need these variables
44360 # to be unset--not just set to an empty or harmless value--now, to
44361 # avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
44362 # also avoids known problems related to "unset" and subshell syntax
44363 # in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
44364 for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
44365 do eval test \${$as_var+y} \
44366 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
44367 done
44368
44369 # Ensure that fds 0, 1, and 2 are open.
44370 if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
44371 if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
44372 if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
44373
44374 # The user is always right.
44375 if ${PATH_SEPARATOR+false} :; then
44376 PATH_SEPARATOR=:
44377 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
44378 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
44379 PATH_SEPARATOR=';'
44380 }
44381 fi
44382
44383
44384 # Find who we are. Look in the path if we contain no directory separator.
44385 as_myself=
44386 case $0 in #((
44387 *[\\/]* ) as_myself=$0 ;;
44388 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44389 for as_dir in $PATH
44390 do
44391 IFS=$as_save_IFS
44392 case $as_dir in #(((
44393 '') as_dir=./ ;;
44394 */) ;;
44395 *) as_dir=$as_dir/ ;;
44396 esac
44397 test -r "$as_dir$0" && as_myself=$as_dir$0 && break
44398 done
44399 IFS=$as_save_IFS
44400
44401 ;;
44402 esac
44403 # We did not find ourselves, most probably we were run as `sh COMMAND'
44404 # in which case we are not to be found in the path.
44405 if test "x$as_myself" = x; then
44406 as_myself=$0
44407 fi
44408 if test ! -f "$as_myself"; then
44409 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
44410 exit 1
44411 fi
44412
44413
44414
44415 # as_fn_error STATUS ERROR [LINENO LOG_FD]
44416 # ----------------------------------------
44417 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
44418 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
44419 # script with STATUS, using 1 if that was 0.
44420 as_fn_error ()
44421 {
44422 as_status=$1; test $as_status -eq 0 && as_status=1
44423 if test "$4"; then
44424 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
44425 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
44426 fi
44427 printf "%s\n" "$as_me: error: $2" >&2
44428 as_fn_exit $as_status
44429 } # as_fn_error
44430
44431
44432
44433 # as_fn_set_status STATUS
44434 # -----------------------
44435 # Set $? to STATUS, without forking.
44436 as_fn_set_status ()
44437 {
44438 return $1
44439 } # as_fn_set_status
44440
44441 # as_fn_exit STATUS
44442 # -----------------
44443 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
44444 as_fn_exit ()
44445 {
44446 set +e
44447 as_fn_set_status $1
44448 exit $1
44449 } # as_fn_exit
44450
44451 # as_fn_unset VAR
44452 # ---------------
44453 # Portably unset VAR.
44454 as_fn_unset ()
44455 {
44456 { eval $1=; unset $1;}
44457 }
44458 as_unset=as_fn_unset
44459
44460 # as_fn_append VAR VALUE
44461 # ----------------------
44462 # Append the text in VALUE to the end of the definition contained in VAR. Take
44463 # advantage of any shell optimizations that allow amortized linear growth over
44464 # repeated appends, instead of the typical quadratic growth present in naive
44465 # implementations.
44466 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
44467 then :
44468 eval 'as_fn_append ()
44469 {
44470 eval $1+=\$2
44471 }'
44472 else $as_nop
44473 as_fn_append ()
44474 {
44475 eval $1=\$$1\$2
44476 }
44477 fi # as_fn_append
44478
44479 # as_fn_arith ARG...
44480 # ------------------
44481 # Perform arithmetic evaluation on the ARGs, and store the result in the
44482 # global $as_val. Take advantage of shells that can avoid forks. The arguments
44483 # must be portable across $(()) and expr.
44484 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
44485 then :
44486 eval 'as_fn_arith ()
44487 {
44488 as_val=$(( $* ))
44489 }'
44490 else $as_nop
44491 as_fn_arith ()
44492 {
44493 as_val=`expr "$@" || test $? -eq 1`
44494 }
44495 fi # as_fn_arith
44496
44497
44498 if expr a : '\(a\)' >/dev/null 2>&1 &&
44499 test "X`expr 00001 : '.*\(...\)'`" = X001; then
44500 as_expr=expr
44501 else
44502 as_expr=false
44503 fi
44504
44505 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
44506 as_basename=basename
44507 else
44508 as_basename=false
44509 fi
44510
44511 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
44512 as_dirname=dirname
44513 else
44514 as_dirname=false
44515 fi
44516
44517 as_me=`$as_basename -- "$0" ||
44518 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
44519 X"$0" : 'X\(//\)$' \| \
44520 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
44521 printf "%s\n" X/"$0" |
44522 sed '/^.*\/\([^/][^/]*\)\/*$/{
44523 s//\1/
44524 q
44525 }
44526 /^X\/\(\/\/\)$/{
44527 s//\1/
44528 q
44529 }
44530 /^X\/\(\/\).*/{
44531 s//\1/
44532 q
44533 }
44534 s/.*/./; q'`
44535
44536 # Avoid depending upon Character Ranges.
44537 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
44538 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
44539 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
44540 as_cr_digits='0123456789'
44541 as_cr_alnum=$as_cr_Letters$as_cr_digits
44542
44543
44544 # Determine whether it's possible to make 'echo' print without a newline.
44545 # These variables are no longer used directly by Autoconf, but are AC_SUBSTed
44546 # for compatibility with existing Makefiles.
44547 ECHO_C= ECHO_N= ECHO_T=
44548 case `echo -n x` in #(((((
44549 -n*)
44550 case `echo 'xy\c'` in
44551 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
44552 xy) ECHO_C='\c';;
44553 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
44554 ECHO_T=' ';;
44555 esac;;
44556 *)
44557 ECHO_N='-n';;
44558 esac
44559
44560 # For backward compatibility with old third-party macros, we provide
44561 # the shell variables $as_echo and $as_echo_n. New code should use
44562 # AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
44563 as_echo='printf %s\n'
44564 as_echo_n='printf %s'
44565
44566 rm -f conf$$ conf$$.exe conf$$.file
44567 if test -d conf$$.dir; then
44568 rm -f conf$$.dir/conf$$.file
44569 else
44570 rm -f conf$$.dir
44571 mkdir conf$$.dir 2>/dev/null
44572 fi
44573 if (echo >conf$$.file) 2>/dev/null; then
44574 if ln -s conf$$.file conf$$ 2>/dev/null; then
44575 as_ln_s='ln -s'
44576 # ... but there are two gotchas:
44577 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
44578 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
44579 # In both cases, we have to default to `cp -pR'.
44580 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
44581 as_ln_s='cp -pR'
44582 elif ln conf$$.file conf$$ 2>/dev/null; then
44583 as_ln_s=ln
44584 else
44585 as_ln_s='cp -pR'
44586 fi
44587 else
44588 as_ln_s='cp -pR'
44589 fi
44590 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
44591 rmdir conf$$.dir 2>/dev/null
44592
44593
44594 # as_fn_mkdir_p
44595 # -------------
44596 # Create "$as_dir" as a directory, including parents if necessary.
44597 as_fn_mkdir_p ()
44598 {
44599
44600 case $as_dir in #(
44601 -*) as_dir=./$as_dir;;
44602 esac
44603 test -d "$as_dir" || eval $as_mkdir_p || {
44604 as_dirs=
44605 while :; do
44606 case $as_dir in #(
44607 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
44608 *) as_qdir=$as_dir;;
44609 esac
44610 as_dirs="'$as_qdir' $as_dirs"
44611 as_dir=`$as_dirname -- "$as_dir" ||
44612 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
44613 X"$as_dir" : 'X\(//\)[^/]' \| \
44614 X"$as_dir" : 'X\(//\)$' \| \
44615 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
44616 printf "%s\n" X"$as_dir" |
44617 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
44618 s//\1/
44619 q
44620 }
44621 /^X\(\/\/\)[^/].*/{
44622 s//\1/
44623 q
44624 }
44625 /^X\(\/\/\)$/{
44626 s//\1/
44627 q
44628 }
44629 /^X\(\/\).*/{
44630 s//\1/
44631 q
44632 }
44633 s/.*/./; q'`
44634 test -d "$as_dir" && break
44635 done
44636 test -z "$as_dirs" || eval "mkdir $as_dirs"
44637 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
44638
44639
44640 } # as_fn_mkdir_p
44641 if mkdir -p . 2>/dev/null; then
44642 as_mkdir_p='mkdir -p "$as_dir"'
44643 else
44644 test -d ./-p && rmdir ./-p
44645 as_mkdir_p=false
44646 fi
44647
44648
44649 # as_fn_executable_p FILE
44650 # -----------------------
44651 # Test if FILE is an executable regular file.
44652 as_fn_executable_p ()
44653 {
44654 test -f "$1" && test -x "$1"
44655 } # as_fn_executable_p
44656 as_test_x='test -x'
44657 as_executable_p=as_fn_executable_p
44658
44659 # Sed expression to map a string onto a valid CPP name.
44660 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
44661
44662 # Sed expression to map a string onto a valid variable name.
44663 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
44664
44665
44666 exec 6>&1
44667 ## ----------------------------------- ##
44668 ## Main body of $CONFIG_STATUS script. ##
44669 ## ----------------------------------- ##
44670 _ASEOF
44671 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
44672
44673 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
44674 # Save the log message, to keep $0 and so on meaningful, and to
44675 # report actual input values of CONFIG_FILES etc. instead of their
44676 # values after options handling.
44677 ac_log="
44678 This file was extended by GRUB $as_me 2.14, which was
44679 generated by GNU Autoconf 2.71. Invocation command line was
44680
44681 CONFIG_FILES = $CONFIG_FILES
44682 CONFIG_HEADERS = $CONFIG_HEADERS
44683 CONFIG_LINKS = $CONFIG_LINKS
44684 CONFIG_COMMANDS = $CONFIG_COMMANDS
44685 $ $0 $@
44686
44687 on `(hostname || uname -n) 2>/dev/null | sed 1q`
44688 "
44689
44690 _ACEOF
44691
44692 case $ac_config_files in *"
44693 "*) set x $ac_config_files; shift; ac_config_files=$*;;
44694 esac
44695
44696 case $ac_config_headers in *"
44697 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
44698 esac
44699
44700
44701 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
44702 # Files that config.status was made for.
44703 config_files="$ac_config_files"
44704 config_headers="$ac_config_headers"
44705 config_links="$ac_config_links"
44706 config_commands="$ac_config_commands"
44707
44708 _ACEOF
44709
44710 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
44711 ac_cs_usage="\
44712 \`$as_me' instantiates files and other configuration actions
44713 from templates according to the current configuration. Unless the files
44714 and actions are specified as TAGs, all are instantiated by default.
44715
44716 Usage: $0 [OPTION]... [TAG]...
44717
44718 -h, --help print this help, then exit
44719 -V, --version print version number and configuration settings, then exit
44720 --config print configuration, then exit
44721 -q, --quiet, --silent
44722 do not print progress messages
44723 -d, --debug don't remove temporary files
44724 --recheck update $as_me by reconfiguring in the same conditions
44725 --file=FILE[:TEMPLATE]
44726 instantiate the configuration file FILE
44727 --header=FILE[:TEMPLATE]
44728 instantiate the configuration header FILE
44729
44730 Configuration files:
44731 $config_files
44732
44733 Configuration headers:
44734 $config_headers
44735
44736 Configuration links:
44737 $config_links
44738
44739 Configuration commands:
44740 $config_commands
44741
44742 Report bugs to <[email protected]>."
44743
44744 _ACEOF
44745 ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
44746 ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
44747 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
44748 ac_cs_config='$ac_cs_config_escaped'
44749 ac_cs_version="\\
44750 GRUB config.status 2.14
44751 configured by $0, generated by GNU Autoconf 2.71,
44752 with options \\"\$ac_cs_config\\"
44753
44754 Copyright (C) 2021 Free Software Foundation, Inc.
44755 This config.status script is free software; the Free Software Foundation
44756 gives unlimited permission to copy, distribute and modify it."
44757
44758 ac_pwd='$ac_pwd'
44759 srcdir='$srcdir'
44760 INSTALL='$INSTALL'
44761 MKDIR_P='$MKDIR_P'
44762 AWK='$AWK'
44763 test -n "\$AWK" || AWK=awk
44764 _ACEOF
44765
44766 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
44767 # The default lists apply if the user does not specify any file.
44768 ac_need_defaults=:
44769 while test $# != 0
44770 do
44771 case $1 in
44772 --*=?*)
44773 ac_option=`expr "X$1" : 'X\([^=]*\)='`
44774 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
44775 ac_shift=:
44776 ;;
44777 --*=)
44778 ac_option=`expr "X$1" : 'X\([^=]*\)='`
44779 ac_optarg=
44780 ac_shift=:
44781 ;;
44782 *)
44783 ac_option=$1
44784 ac_optarg=$2
44785 ac_shift=shift
44786 ;;
44787 esac
44788
44789 case $ac_option in
44790 # Handling of the options.
44791 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
44792 ac_cs_recheck=: ;;
44793 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
44794 printf "%s\n" "$ac_cs_version"; exit ;;
44795 --config | --confi | --conf | --con | --co | --c )
44796 printf "%s\n" "$ac_cs_config"; exit ;;
44797 --debug | --debu | --deb | --de | --d | -d )
44798 debug=: ;;
44799 --file | --fil | --fi | --f )
44800 $ac_shift
44801 case $ac_optarg in
44802 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
44803 '') as_fn_error $? "missing file argument" ;;
44804 esac
44805 as_fn_append CONFIG_FILES " '$ac_optarg'"
44806 ac_need_defaults=false;;
44807 --header | --heade | --head | --hea )
44808 $ac_shift
44809 case $ac_optarg in
44810 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
44811 esac
44812 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
44813 ac_need_defaults=false;;
44814 --he | --h)
44815 # Conflict between --help and --header
44816 as_fn_error $? "ambiguous option: \`$1'
44817 Try \`$0 --help' for more information.";;
44818 --help | --hel | -h )
44819 printf "%s\n" "$ac_cs_usage"; exit ;;
44820 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
44821 | -silent | --silent | --silen | --sile | --sil | --si | --s)
44822 ac_cs_silent=: ;;
44823
44824 # This is an error.
44825 -*) as_fn_error $? "unrecognized option: \`$1'
44826 Try \`$0 --help' for more information." ;;
44827
44828 *) as_fn_append ac_config_targets " $1"
44829 ac_need_defaults=false ;;
44830
44831 esac
44832 shift
44833 done
44834
44835 ac_configure_extra_args=
44836
44837 if $ac_cs_silent; then
44838 exec 6>/dev/null
44839 ac_configure_extra_args="$ac_configure_extra_args --silent"
44840 fi
44841
44842 _ACEOF
44843 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
44844 if \$ac_cs_recheck; then
44845 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
44846 shift
44847 \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
44848 CONFIG_SHELL='$SHELL'
44849 export CONFIG_SHELL
44850 exec "\$@"
44851 fi
44852
44853 _ACEOF
44854 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
44855 exec 5>>config.log
44856 {
44857 echo
44858 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
44859 ## Running $as_me. ##
44860 _ASBOX
44861 printf "%s\n" "$ac_log"
44862 } >&5
44863
44864 _ACEOF
44865 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
44866 #
44867 # INIT-COMMANDS
44868 #
44869 AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"
44870 # Capture the value of obsolete ALL_LINGUAS because we need it to compute
44871 # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
44872 # from automake < 1.5.
44873 eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
44874 # Capture the value of LINGUAS because we need it to compute CATALOGS.
44875 LINGUAS="${LINGUAS-%UNSET%}"
44876
44877
44878 _ACEOF
44879
44880 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
44881
44882 # Handling of arguments.
44883 for ac_config_target in $ac_config_targets
44884 do
44885 case $ac_config_target in
44886 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
44887 "config-util.h") CONFIG_HEADERS="$CONFIG_HEADERS config-util.h" ;;
44888 "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;;
44889 "include/grub/cpu") CONFIG_LINKS="$CONFIG_LINKS include/grub/cpu:include/grub/$cpudir" ;;
44890 "include/grub/machine") CONFIG_LINKS="$CONFIG_LINKS include/grub/machine:include/grub/$cpudir/$platform" ;;
44891 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
44892 "grub-core/Makefile") CONFIG_FILES="$CONFIG_FILES grub-core/Makefile" ;;
44893 "grub-core/lib/gnulib/Makefile") CONFIG_FILES="$CONFIG_FILES grub-core/lib/gnulib/Makefile" ;;
44894 "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
44895 "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;;
44896 "util/bash-completion.d/Makefile") CONFIG_FILES="$CONFIG_FILES util/bash-completion.d/Makefile" ;;
44897 "stamp-h") CONFIG_FILES="$CONFIG_FILES stamp-h" ;;
44898 "config.h") CONFIG_FILES="$CONFIG_FILES config.h" ;;
44899
44900 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
44901 esac
44902 done
44903
44904
44905 # If the user did not use the arguments to specify the items to instantiate,
44906 # then the envvar interface is used. Set only those that are not.
44907 # We use the long form for the default assignment because of an extremely
44908 # bizarre bug on SunOS 4.1.3.
44909 if $ac_need_defaults; then
44910 test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
44911 test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
44912 test ${CONFIG_LINKS+y} || CONFIG_LINKS=$config_links
44913 test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands
44914 fi
44915
44916 # Have a temporary directory for convenience. Make it in the build tree
44917 # simply because there is no reason against having it here, and in addition,
44918 # creating and moving files from /tmp can sometimes cause problems.
44919 # Hook for its removal unless debugging.
44920 # Note that there is a small window in which the directory will not be cleaned:
44921 # after its creation but before its name has been assigned to `$tmp'.
44922 $debug ||
44923 {
44924 tmp= ac_tmp=
44925 trap 'exit_status=$?
44926 : "${ac_tmp:=$tmp}"
44927 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
44928 ' 0
44929 trap 'as_fn_exit 1' 1 2 13 15
44930 }
44931 # Create a (secure) tmp directory for tmp files.
44932
44933 {
44934 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
44935 test -d "$tmp"
44936 } ||
44937 {
44938 tmp=./conf$$-$RANDOM
44939 (umask 077 && mkdir "$tmp")
44940 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
44941 ac_tmp=$tmp
44942
44943 # Set up the scripts for CONFIG_FILES section.
44944 # No need to generate them if there are no CONFIG_FILES.
44945 # This happens for instance with `./config.status config.h'.
44946 if test -n "$CONFIG_FILES"; then
44947
44948
44949 ac_cr=`echo X | tr X '\015'`
44950 # On cygwin, bash can eat \r inside `` if the user requested igncr.
44951 # But we know of no other shell where ac_cr would be empty at this
44952 # point, so we can use a bashism as a fallback.
44953 if test "x$ac_cr" = x; then
44954 eval ac_cr=\$\'\\r\'
44955 fi
44956 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
44957 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
44958 ac_cs_awk_cr='\\r'
44959 else
44960 ac_cs_awk_cr=$ac_cr
44961 fi
44962
44963 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
44964 _ACEOF
44965
44966
44967 {
44968 echo "cat >conf$$subs.awk <<_ACEOF" &&
44969 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
44970 echo "_ACEOF"
44971 } >conf$$subs.sh ||
44972 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
44973 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
44974 ac_delim='%!_!# '
44975 for ac_last_try in false false false false false :; do
44976 . ./conf$$subs.sh ||
44977 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
44978
44979 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
44980 if test $ac_delim_n = $ac_delim_num; then
44981 break
44982 elif $ac_last_try; then
44983 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
44984 else
44985 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
44986 fi
44987 done
44988 rm -f conf$$subs.sh
44989
44990 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
44991 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
44992 _ACEOF
44993 sed -n '
44994 h
44995 s/^/S["/; s/!.*/"]=/
44996 p
44997 g
44998 s/^[^!]*!//
44999 :repl
45000 t repl
45001 s/'"$ac_delim"'$//
45002 t delim
45003 :nl
45004 h
45005 s/\(.\{148\}\)..*/\1/
45006 t more1
45007 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
45008 p
45009 n
45010 b repl
45011 :more1
45012 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
45013 p
45014 g
45015 s/.\{148\}//
45016 t nl
45017 :delim
45018 h
45019 s/\(.\{148\}\)..*/\1/
45020 t more2
45021 s/["\\]/\\&/g; s/^/"/; s/$/"/
45022 p
45023 b
45024 :more2
45025 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
45026 p
45027 g
45028 s/.\{148\}//
45029 t delim
45030 ' <conf$$subs.awk | sed '
45031 /^[^""]/{
45032 N
45033 s/\n//
45034 }
45035 ' >>$CONFIG_STATUS || ac_write_fail=1
45036 rm -f conf$$subs.awk
45037 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
45038 _ACAWK
45039 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
45040 for (key in S) S_is_set[key] = 1
45041 FS = ""
45042
45043 }
45044 {
45045 line = $ 0
45046 nfields = split(line, field, "@")
45047 substed = 0
45048 len = length(field[1])
45049 for (i = 2; i < nfields; i++) {
45050 key = field[i]
45051 keylen = length(key)
45052 if (S_is_set[key]) {
45053 value = S[key]
45054 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
45055 len += length(value) + length(field[++i])
45056 substed = 1
45057 } else
45058 len += 1 + keylen
45059 }
45060
45061 print line
45062 }
45063
45064 _ACAWK
45065 _ACEOF
45066 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
45067 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
45068 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
45069 else
45070 cat
45071 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
45072 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
45073 _ACEOF
45074
45075 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
45076 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
45077 # trailing colons and then remove the whole line if VPATH becomes empty
45078 # (actually we leave an empty line to preserve line numbers).
45079 if test "x$srcdir" = x.; then
45080 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
45081 h
45082 s///
45083 s/^/:/
45084 s/[ ]*$/:/
45085 s/:\$(srcdir):/:/g
45086 s/:\${srcdir}:/:/g
45087 s/:@srcdir@:/:/g
45088 s/^:*//
45089 s/:*$//
45090 x
45091 s/\(=[ ]*\).*/\1/
45092 G
45093 s/\n//
45094 s/^[^=]*=[ ]*$//
45095 }'
45096 fi
45097
45098 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
45099 fi # test -n "$CONFIG_FILES"
45100
45101 # Set up the scripts for CONFIG_HEADERS section.
45102 # No need to generate them if there are no CONFIG_HEADERS.
45103 # This happens for instance with `./config.status Makefile'.
45104 if test -n "$CONFIG_HEADERS"; then
45105 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
45106 BEGIN {
45107 _ACEOF
45108
45109 # Transform confdefs.h into an awk script `defines.awk', embedded as
45110 # here-document in config.status, that substitutes the proper values into
45111 # config.h.in to produce config.h.
45112
45113 # Create a delimiter string that does not exist in confdefs.h, to ease
45114 # handling of long lines.
45115 ac_delim='%!_!# '
45116 for ac_last_try in false false :; do
45117 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
45118 if test -z "$ac_tt"; then
45119 break
45120 elif $ac_last_try; then
45121 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
45122 else
45123 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
45124 fi
45125 done
45126
45127 # For the awk script, D is an array of macro values keyed by name,
45128 # likewise P contains macro parameters if any. Preserve backslash
45129 # newline sequences.
45130
45131 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
45132 sed -n '
45133 s/.\{148\}/&'"$ac_delim"'/g
45134 t rset
45135 :rset
45136 s/^[ ]*#[ ]*define[ ][ ]*/ /
45137 t def
45138 d
45139 :def
45140 s/\\$//
45141 t bsnl
45142 s/["\\]/\\&/g
45143 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
45144 D["\1"]=" \3"/p
45145 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
45146 d
45147 :bsnl
45148 s/["\\]/\\&/g
45149 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
45150 D["\1"]=" \3\\\\\\n"\\/p
45151 t cont
45152 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
45153 t cont
45154 d
45155 :cont
45156 n
45157 s/.\{148\}/&'"$ac_delim"'/g
45158 t clear
45159 :clear
45160 s/\\$//
45161 t bsnlc
45162 s/["\\]/\\&/g; s/^/"/; s/$/"/p
45163 d
45164 :bsnlc
45165 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
45166 b cont
45167 ' <confdefs.h | sed '
45168 s/'"$ac_delim"'/"\\\
45169 "/g' >>$CONFIG_STATUS || ac_write_fail=1
45170
45171 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
45172 for (key in D) D_is_set[key] = 1
45173 FS = ""
45174 }
45175 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
45176 line = \$ 0
45177 split(line, arg, " ")
45178 if (arg[1] == "#") {
45179 defundef = arg[2]
45180 mac1 = arg[3]
45181 } else {
45182 defundef = substr(arg[1], 2)
45183 mac1 = arg[2]
45184 }
45185 split(mac1, mac2, "(") #)
45186 macro = mac2[1]
45187 prefix = substr(line, 1, index(line, defundef) - 1)
45188 if (D_is_set[macro]) {
45189 # Preserve the white space surrounding the "#".
45190 print prefix "define", macro P[macro] D[macro]
45191 next
45192 } else {
45193 # Replace #undef with comments. This is necessary, for example,
45194 # in the case of _POSIX_SOURCE, which is predefined and required
45195 # on some systems where configure will not decide to define it.
45196 if (defundef == "undef") {
45197 print "/*", prefix defundef, macro, "*/"
45198 next
45199 }
45200 }
45201 }
45202 { print }
45203 _ACAWK
45204 _ACEOF
45205 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
45206 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
45207 fi # test -n "$CONFIG_HEADERS"
45208
45209
45210 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
45211 shift
45212 for ac_tag
45213 do
45214 case $ac_tag in
45215 :[FHLC]) ac_mode=$ac_tag; continue;;
45216 esac
45217 case $ac_mode$ac_tag in
45218 :[FHL]*:*);;
45219 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
45220 :[FH]-) ac_tag=-:-;;
45221 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
45222 esac
45223 ac_save_IFS=$IFS
45224 IFS=:
45225 set x $ac_tag
45226 IFS=$ac_save_IFS
45227 shift
45228 ac_file=$1
45229 shift
45230
45231 case $ac_mode in
45232 :L) ac_source=$1;;
45233 :[FH])
45234 ac_file_inputs=
45235 for ac_f
45236 do
45237 case $ac_f in
45238 -) ac_f="$ac_tmp/stdin";;
45239 *) # Look for the file first in the build tree, then in the source tree
45240 # (if the path is not absolute). The absolute path cannot be DOS-style,
45241 # because $ac_f cannot contain `:'.
45242 test -f "$ac_f" ||
45243 case $ac_f in
45244 [\\/$]*) false;;
45245 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
45246 esac ||
45247 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
45248 esac
45249 case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
45250 as_fn_append ac_file_inputs " '$ac_f'"
45251 done
45252
45253 # Let's still pretend it is `configure' which instantiates (i.e., don't
45254 # use $as_me), people would be surprised to read:
45255 # /* config.h. Generated by config.status. */
45256 configure_input='Generated from '`
45257 printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
45258 `' by configure.'
45259 if test x"$ac_file" != x-; then
45260 configure_input="$ac_file. $configure_input"
45261 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
45262 printf "%s\n" "$as_me: creating $ac_file" >&6;}
45263 fi
45264 # Neutralize special characters interpreted by sed in replacement strings.
45265 case $configure_input in #(
45266 *\&* | *\|* | *\\* )
45267 ac_sed_conf_input=`printf "%s\n" "$configure_input" |
45268 sed 's/[\\\\&|]/\\\\&/g'`;; #(
45269 *) ac_sed_conf_input=$configure_input;;
45270 esac
45271
45272 case $ac_tag in
45273 *:-:* | *:-) cat >"$ac_tmp/stdin" \
45274 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
45275 esac
45276 ;;
45277 esac
45278
45279 ac_dir=`$as_dirname -- "$ac_file" ||
45280 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
45281 X"$ac_file" : 'X\(//\)[^/]' \| \
45282 X"$ac_file" : 'X\(//\)$' \| \
45283 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
45284 printf "%s\n" X"$ac_file" |
45285 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
45286 s//\1/
45287 q
45288 }
45289 /^X\(\/\/\)[^/].*/{
45290 s//\1/
45291 q
45292 }
45293 /^X\(\/\/\)$/{
45294 s//\1/
45295 q
45296 }
45297 /^X\(\/\).*/{
45298 s//\1/
45299 q
45300 }
45301 s/.*/./; q'`
45302 as_dir="$ac_dir"; as_fn_mkdir_p
45303 ac_builddir=.
45304
45305 case "$ac_dir" in
45306 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
45307 *)
45308 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
45309 # A ".." for each directory in $ac_dir_suffix.
45310 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
45311 case $ac_top_builddir_sub in
45312 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
45313 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
45314 esac ;;
45315 esac
45316 ac_abs_top_builddir=$ac_pwd
45317 ac_abs_builddir=$ac_pwd$ac_dir_suffix
45318 # for backward compatibility:
45319 ac_top_builddir=$ac_top_build_prefix
45320
45321 case $srcdir in
45322 .) # We are building in place.
45323 ac_srcdir=.
45324 ac_top_srcdir=$ac_top_builddir_sub
45325 ac_abs_top_srcdir=$ac_pwd ;;
45326 [\\/]* | ?:[\\/]* ) # Absolute name.
45327 ac_srcdir=$srcdir$ac_dir_suffix;
45328 ac_top_srcdir=$srcdir
45329 ac_abs_top_srcdir=$srcdir ;;
45330 *) # Relative name.
45331 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
45332 ac_top_srcdir=$ac_top_build_prefix$srcdir
45333 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
45334 esac
45335 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
45336
45337
45338 case $ac_mode in
45339 :F)
45340 #
45341 # CONFIG_FILE
45342 #
45343
45344 case $INSTALL in
45345 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
45346 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
45347 esac
45348 ac_MKDIR_P=$MKDIR_P
45349 case $MKDIR_P in
45350 [\\/$]* | ?:[\\/]* ) ;;
45351 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
45352 esac
45353 _ACEOF
45354
45355 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
45356 # If the template does not know about datarootdir, expand it.
45357 # FIXME: This hack should be removed a few years after 2.60.
45358 ac_datarootdir_hack=; ac_datarootdir_seen=
45359 ac_sed_dataroot='
45360 /datarootdir/ {
45361 p
45362 q
45363 }
45364 /@datadir@/p
45365 /@docdir@/p
45366 /@infodir@/p
45367 /@localedir@/p
45368 /@mandir@/p'
45369 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
45370 *datarootdir*) ac_datarootdir_seen=yes;;
45371 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
45372 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
45373 printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
45374 _ACEOF
45375 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
45376 ac_datarootdir_hack='
45377 s&@datadir@&$datadir&g
45378 s&@docdir@&$docdir&g
45379 s&@infodir@&$infodir&g
45380 s&@localedir@&$localedir&g
45381 s&@mandir@&$mandir&g
45382 s&\\\${datarootdir}&$datarootdir&g' ;;
45383 esac
45384 _ACEOF
45385
45386 # Neutralize VPATH when `$srcdir' = `.'.
45387 # Shell code in configure.ac might set extrasub.
45388 # FIXME: do we really want to maintain this feature?
45389 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
45390 ac_sed_extra="$ac_vpsub
45391 $extrasub
45392 _ACEOF
45393 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
45394 :t
45395 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
45396 s|@configure_input@|$ac_sed_conf_input|;t t
45397 s&@top_builddir@&$ac_top_builddir_sub&;t t
45398 s&@top_build_prefix@&$ac_top_build_prefix&;t t
45399 s&@srcdir@&$ac_srcdir&;t t
45400 s&@abs_srcdir@&$ac_abs_srcdir&;t t
45401 s&@top_srcdir@&$ac_top_srcdir&;t t
45402 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
45403 s&@builddir@&$ac_builddir&;t t
45404 s&@abs_builddir@&$ac_abs_builddir&;t t
45405 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
45406 s&@INSTALL@&$ac_INSTALL&;t t
45407 s&@MKDIR_P@&$ac_MKDIR_P&;t t
45408 $ac_datarootdir_hack
45409 "
45410 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
45411 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
45412
45413 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
45414 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
45415 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
45416 "$ac_tmp/out"`; test -z "$ac_out"; } &&
45417 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
45418 which seems to be undefined. Please make sure it is defined" >&5
45419 printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
45420 which seems to be undefined. Please make sure it is defined" >&2;}
45421
45422 rm -f "$ac_tmp/stdin"
45423 case $ac_file in
45424 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
45425 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
45426 esac \
45427 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
45428 ;;
45429 :H)
45430 #
45431 # CONFIG_HEADER
45432 #
45433 if test x"$ac_file" != x-; then
45434 {
45435 printf "%s\n" "/* $configure_input */" >&1 \
45436 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
45437 } >"$ac_tmp/config.h" \
45438 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
45439 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
45440 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
45441 printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
45442 else
45443 rm -f "$ac_file"
45444 mv "$ac_tmp/config.h" "$ac_file" \
45445 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
45446 fi
45447 else
45448 printf "%s\n" "/* $configure_input */" >&1 \
45449 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
45450 || as_fn_error $? "could not create -" "$LINENO" 5
45451 fi
45452 # Compute "$ac_file"'s index in $config_headers.
45453 _am_arg="$ac_file"
45454 _am_stamp_count=1
45455 for _am_header in $config_headers :; do
45456 case $_am_header in
45457 $_am_arg | $_am_arg:* )
45458 break ;;
45459 * )
45460 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
45461 esac
45462 done
45463 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
45464 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
45465 X"$_am_arg" : 'X\(//\)[^/]' \| \
45466 X"$_am_arg" : 'X\(//\)$' \| \
45467 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
45468 printf "%s\n" X"$_am_arg" |
45469 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
45470 s//\1/
45471 q
45472 }
45473 /^X\(\/\/\)[^/].*/{
45474 s//\1/
45475 q
45476 }
45477 /^X\(\/\/\)$/{
45478 s//\1/
45479 q
45480 }
45481 /^X\(\/\).*/{
45482 s//\1/
45483 q
45484 }
45485 s/.*/./; q'`/stamp-h$_am_stamp_count
45486 ;;
45487 :L)
45488 #
45489 # CONFIG_LINK
45490 #
45491
45492 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
45493 :
45494 else
45495 # Prefer the file from the source tree if names are identical.
45496 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
45497 ac_source=$srcdir/$ac_source
45498 fi
45499
45500 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
45501 printf "%s\n" "$as_me: linking $ac_source to $ac_file" >&6;}
45502
45503 if test ! -r "$ac_source"; then
45504 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
45505 fi
45506 rm -f "$ac_file"
45507
45508 # Try a relative symlink, then a hard link, then a copy.
45509 case $ac_source in
45510 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
45511 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
45512 esac
45513 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
45514 ln "$ac_source" "$ac_file" 2>/dev/null ||
45515 cp -p "$ac_source" "$ac_file" ||
45516 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
45517 fi
45518 ;;
45519 :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
45520 printf "%s\n" "$as_me: executing $ac_file commands" >&6;}
45521 ;;
45522 esac
45523
45524
45525 case $ac_file$ac_mode in
45526 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
45527 # Older Autoconf quotes --file arguments for eval, but not when files
45528 # are listed without --file. Let's play safe and only enable the eval
45529 # if we detect the quoting.
45530 # TODO: see whether this extra hack can be removed once we start
45531 # requiring Autoconf 2.70 or later.
45532 case $CONFIG_FILES in #(
45533 *\'*) :
45534 eval set x "$CONFIG_FILES" ;; #(
45535 *) :
45536 set x $CONFIG_FILES ;; #(
45537 *) :
45538 ;;
45539 esac
45540 shift
45541 # Used to flag and report bootstrapping failures.
45542 am_rc=0
45543 for am_mf
45544 do
45545 # Strip MF so we end up with the name of the file.
45546 am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'`
45547 # Check whether this is an Automake generated Makefile which includes
45548 # dependency-tracking related rules and includes.
45549 # Grep'ing the whole file directly is not great: AIX grep has a line
45550 # limit of 2048, but all sed's we know have understand at least 4000.
45551 sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
45552 || continue
45553 am_dirpart=`$as_dirname -- "$am_mf" ||
45554 $as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
45555 X"$am_mf" : 'X\(//\)[^/]' \| \
45556 X"$am_mf" : 'X\(//\)$' \| \
45557 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
45558 printf "%s\n" X"$am_mf" |
45559 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
45560 s//\1/
45561 q
45562 }
45563 /^X\(\/\/\)[^/].*/{
45564 s//\1/
45565 q
45566 }
45567 /^X\(\/\/\)$/{
45568 s//\1/
45569 q
45570 }
45571 /^X\(\/\).*/{
45572 s//\1/
45573 q
45574 }
45575 s/.*/./; q'`
45576 am_filepart=`$as_basename -- "$am_mf" ||
45577 $as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \
45578 X"$am_mf" : 'X\(//\)$' \| \
45579 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
45580 printf "%s\n" X/"$am_mf" |
45581 sed '/^.*\/\([^/][^/]*\)\/*$/{
45582 s//\1/
45583 q
45584 }
45585 /^X\/\(\/\/\)$/{
45586 s//\1/
45587 q
45588 }
45589 /^X\/\(\/\).*/{
45590 s//\1/
45591 q
45592 }
45593 s/.*/./; q'`
45594 { echo "$as_me:$LINENO: cd "$am_dirpart" \
45595 && sed -e '/# am--include-marker/d' "$am_filepart" \
45596 | $MAKE -f - am--depfiles" >&5
45597 (cd "$am_dirpart" \
45598 && sed -e '/# am--include-marker/d' "$am_filepart" \
45599 | $MAKE -f - am--depfiles) >&5 2>&5
45600 ac_status=$?
45601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
45602 (exit $ac_status); } || am_rc=$?
45603 done
45604 if test $am_rc -ne 0; then
45605 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
45606 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
45607 as_fn_error $? "Something went wrong bootstrapping makefile fragments
45608 for automatic dependency tracking. If GNU make was not used, consider
45609 re-running the configure script with MAKE=\"gmake\" (or whatever is
45610 necessary). You can also try re-running configure with the
45611 '--disable-dependency-tracking' option to at least be able to build
45612 the package (albeit without support for automatic dependency tracking).
45613 See \`config.log' for more details" "$LINENO" 5; }
45614 fi
45615 { am_dirpart=; unset am_dirpart;}
45616 { am_filepart=; unset am_filepart;}
45617 { am_mf=; unset am_mf;}
45618 { am_rc=; unset am_rc;}
45619 rm -f conftest-deps.mk
45620 }
45621 ;;
45622 "po-directories":C)
45623 for ac_file in $CONFIG_FILES; do
45624 # Support "outfile[:infile[:infile...]]"
45625 case "$ac_file" in
45626 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
45627 esac
45628 # PO directories have a Makefile.in generated from Makefile.in.in.
45629 case "$ac_file" in */Makefile.in)
45630 # Adjust a relative srcdir.
45631 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
45632 ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
45633 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
45634 # In autoconf-2.13 it is called $ac_given_srcdir.
45635 # In autoconf-2.50 it is called $srcdir.
45636 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
45637 case "$ac_given_srcdir" in
45638 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
45639 /*) top_srcdir="$ac_given_srcdir" ;;
45640 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
45641 esac
45642 # Treat a directory as a PO directory if and only if it has a
45643 # POTFILES.in file. This allows packages to have multiple PO
45644 # directories under different names or in different locations.
45645 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
45646 rm -f "$ac_dir/POTFILES"
45647 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
45648 gt_tab=`printf '\t'`
45649 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"
45650 POMAKEFILEDEPS="POTFILES.in"
45651 # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
45652 # on $ac_dir but don't depend on user-specified configuration
45653 # parameters.
45654 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
45655 # The LINGUAS file contains the set of available languages.
45656 if test -n "$OBSOLETE_ALL_LINGUAS"; then
45657 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
45658 fi
45659 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
45660 # Hide the ALL_LINGUAS assignment from automake < 1.5.
45661 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
45662 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
45663 else
45664 # The set of available languages was given in configure.in.
45665 # Hide the ALL_LINGUAS assignment from automake < 1.5.
45666 eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
45667 fi
45668 # Compute POFILES
45669 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
45670 # Compute UPDATEPOFILES
45671 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
45672 # Compute DUMMYPOFILES
45673 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
45674 # Compute GMOFILES
45675 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
45676 case "$ac_given_srcdir" in
45677 .) srcdirpre= ;;
45678 *) srcdirpre='$(srcdir)/' ;;
45679 esac
45680 POFILES=
45681 UPDATEPOFILES=
45682 DUMMYPOFILES=
45683 GMOFILES=
45684 for lang in $ALL_LINGUAS; do
45685 POFILES="$POFILES $srcdirpre$lang.po"
45686 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
45687 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
45688 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
45689 done
45690 # CATALOGS depends on both $ac_dir and the user's LINGUAS
45691 # environment variable.
45692 INST_LINGUAS=
45693 if test -n "$ALL_LINGUAS"; then
45694 for presentlang in $ALL_LINGUAS; do
45695 useit=no
45696 if test "%UNSET%" != "$LINGUAS"; then
45697 desiredlanguages="$LINGUAS"
45698 else
45699 desiredlanguages="$ALL_LINGUAS"
45700 fi
45701 for desiredlang in $desiredlanguages; do
45702 # Use the presentlang catalog if desiredlang is
45703 # a. equal to presentlang, or
45704 # b. a variant of presentlang (because in this case,
45705 # presentlang can be used as a fallback for messages
45706 # which are not translated in the desiredlang catalog).
45707 case "$desiredlang" in
45708 "$presentlang"*) useit=yes;;
45709 esac
45710 done
45711 if test $useit = yes; then
45712 INST_LINGUAS="$INST_LINGUAS $presentlang"
45713 fi
45714 done
45715 fi
45716 CATALOGS=
45717 if test -n "$INST_LINGUAS"; then
45718 for lang in $INST_LINGUAS; do
45719 CATALOGS="$CATALOGS $lang.gmo"
45720 done
45721 fi
45722 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
45723 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"
45724 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
45725 if test -f "$f"; then
45726 case "$f" in
45727 *.orig | *.bak | *~) ;;
45728 *) cat "$f" >> "$ac_dir/Makefile" ;;
45729 esac
45730 fi
45731 done
45732 fi
45733 ;;
45734 esac
45735 done ;;
45736 "stamp-h":F) echo timestamp > stamp-h ;;
45737
45738 esac
45739 done # for ac_tag
45740
45741
45742 as_fn_exit 0
45743 _ACEOF
45744 ac_clean_files=$ac_clean_files_save
45745
45746 test $ac_write_fail = 0 ||
45747 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
45748
45749
45750 # configure is writing to config.log, and then calls config.status.
45751 # config.status does its own redirection, appending to config.log.
45752 # Unfortunately, on DOS this fails, as config.log is still kept open
45753 # by configure, so config.status won't be able to write to it; its
45754 # output is simply discarded. So we exec the FD to /dev/null,
45755 # effectively closing config.log, so it can be properly (re)opened and
45756 # appended to by config.status. When coming back to configure, we
45757 # need to make the FD available again.
45758 if test "$no_create" != yes; then
45759 ac_cs_success=:
45760 ac_config_status_args=
45761 test "$silent" = yes &&
45762 ac_config_status_args="$ac_config_status_args --quiet"
45763 exec 5>/dev/null
45764 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
45765 exec 5>>config.log
45766 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
45767 # would make configure fail if this is the last instruction.
45768 $ac_cs_success || as_fn_exit 1
45769 fi
45770 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
45771 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
45772 printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
45773 fi
45774
45775
45776 echo "*******************************************************"
45777 echo GRUB2 will be compiled with following components:
45778 echo Platform: "$target_cpu"-"$platform"
45779 if [ x"$platform" = xemu ]; then
45780 if [ x"$grub_emu_sdl2_excuse" = x ]; then
45781 echo SDL2 support for grub-emu: Yes
45782 else
45783 echo SDL2 support for grub-emu: No "($grub_emu_sdl2_excuse)"
45784 fi
45785 if [ x"$grub_emu_sdl_excuse" = x ]; then
45786 echo SDL support for grub-emu: Yes
45787 else
45788 echo SDL support for grub-emu: No "($grub_emu_sdl_excuse)"
45789 fi
45790 if [ x"$grub_emu_pci_excuse" = x ]; then
45791 echo PCI support for grub-emu: Yes
45792 else
45793 echo PCI support for grub-emu: No "($grub_emu_pci_excuse)"
45794 fi
45795 fi
45796 if test x"$device_mapper_excuse" = x ; then
45797 echo With devmapper support: Yes
45798 else
45799 echo With devmapper support: No "($device_mapper_excuse)"
45800 fi
45801 if [ x"$enable_mm_debug" = xyes ]; then
45802 echo With memory debugging: Yes
45803 else
45804 echo With memory debugging: No
45805 fi
45806 if [ x"$enable_cache_stats" = xyes ]; then
45807 echo With disk cache statistics: Yes
45808 else
45809 echo With disk cache statistics: No
45810 fi
45811
45812 if [ x"$enable_boot_time" = xyes ]; then
45813 echo With boot time statistics: Yes
45814 else
45815 echo With boot time statistics: No
45816 fi
45817
45818 if [ x"$efiemu_excuse" = x ]; then
45819 echo efiemu runtime: Yes
45820 else
45821 echo efiemu runtime: No "($efiemu_excuse)"
45822 fi
45823 if [ x"$grub_mkfont_excuse" = x ]; then
45824 echo grub-mkfont: Yes
45825 else
45826 echo grub-mkfont: No "($grub_mkfont_excuse)"
45827 fi
45828 if [ x"$grub_mount_excuse" = x ]; then
45829 echo grub-mount: Yes
45830 else
45831 echo grub-mount: No "($grub_mount_excuse)"
45832 fi
45833 if [ x"$grub_protect_excuse" = x ]; then
45834 echo grub-protect: Yes
45835 else
45836 echo grub-protect: No "($grub_protect_excuse)"
45837 fi
45838 if [ x"$starfield_excuse" = x ]; then
45839 echo starfield theme: Yes
45840 echo With DejaVuSans font from $DJVU_FONT_SOURCE
45841 else
45842 echo starfield theme: No "($starfield_excuse)"
45843 fi
45844 if [ x"$libzfs_excuse" = x ]; then
45845 echo With libzfs support: Yes
45846 else
45847 echo With libzfs support: No "($libzfs_excuse)"
45848 fi
45849 if [ x"$grub_build_mkfont_excuse" = x ]; then
45850 echo Build-time grub-mkfont: Yes
45851 if test "x$FONT_SOURCE" = x ; then
45852 echo "Without unifont"
45853 else
45854 echo "With unifont from $FONT_SOURCE"
45855 fi
45856 else
45857 echo Build-time grub-mkfont: No "($grub_build_mkfont_excuse)"
45858 echo "Without unifont (no build-time grub-mkfont)"
45859 fi
45860 if test x"$liblzma_excuse" != x ; then
45861 echo "Without liblzma (no support for XZ-compressed mips images) ($liblzma_excuse)"
45862 else
45863 echo "With liblzma from $LIBLZMA (support for XZ-compressed mips images)"
45864 fi
45865 if test "x$enable_stack_protector" != xno; then
45866 echo "With stack smashing protector: Yes"
45867 else
45868 echo "With stack smashing protector: No"
45869 fi
45870 echo "*******************************************************"
45871
45872