1 #!/bin/bash
2 #
3 # ##########################################################
4 # ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
5 # ##########################################################
6 #
7 #! /bin/sh
8 # Guess values for system-dependent variables and create Makefiles.
9 # Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
10 #
11 # Report bugs to <build-dev@openjdk.java.net>.
12 #
13 #
14 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
15 #
16 #
17 # This configure script is free software; the Free Software Foundation
18 # gives unlimited permission to copy, distribute and modify it.
19 ## -------------------- ##
20 ## M4sh Initialization. ##
21 ## -------------------- ##
22
23 # Be more Bourne compatible
24 DUALCASE=1; export DUALCASE # for MKS sh
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
26 emulate sh
27 NULLCMD=:
28 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29 # is contrary to our usage. Disable this feature.
30 alias -g '${1+"$@"}'='"$@"'
31 setopt NO_GLOB_SUBST
32 else
33 case `(set -o) 2>/dev/null` in #(
34 *posix*) :
35 set -o posix ;; #(
36 *) :
37 ;;
38 esac
39 fi
40
41
42 as_nl='
43 '
44 export as_nl
45 # Printing a long string crashes Solaris 7 /usr/bin/printf.
46 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
47 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49 # Prefer a ksh shell builtin over an external printf program on Solaris,
50 # but without wasting forks for bash or zsh.
51 if test -z "$BASH_VERSION$ZSH_VERSION" \
52 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53 as_echo='print -r --'
54 as_echo_n='print -rn --'
55 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
56 as_echo='printf %s\n'
57 as_echo_n='printf %s'
58 else
59 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
60 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
61 as_echo_n='/usr/ucb/echo -n'
62 else
63 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
64 as_echo_n_body='eval
65 arg=$1;
66 case $arg in #(
67 *"$as_nl"*)
68 expr "X$arg" : "X\\(.*\\)$as_nl";
69 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
70 esac;
71 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
72 '
73 export as_echo_n_body
74 as_echo_n='sh -c $as_echo_n_body as_echo'
75 fi
76 export as_echo_body
77 as_echo='sh -c $as_echo_body as_echo'
78 fi
79
80 # The user is always right.
81 if test "${PATH_SEPARATOR+set}" != set; then
82 PATH_SEPARATOR=:
83 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
84 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
85 PATH_SEPARATOR=';'
86 }
87 fi
88
89
90 # IFS
91 # We need space, tab and new line, in precisely that order. Quoting is
92 # there to prevent editors from complaining about space-tab.
93 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
94 # splitting by setting IFS to empty value.)
95 IFS=" "" $as_nl"
96
97 # Find who we are. Look in the path if we contain no directory separator.
98 as_myself=
99 case $0 in #((
100 *[\\/]* ) as_myself=$0 ;;
101 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
102 for as_dir in $PATH
103 do
104 IFS=$as_save_IFS
105 test -z "$as_dir" && as_dir=.
106 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
107 done
108 IFS=$as_save_IFS
109
110 ;;
111 esac
112 # We did not find ourselves, most probably we were run as `sh COMMAND'
113 # in which case we are not to be found in the path.
114 if test "x$as_myself" = x; then
115 as_myself=$0
116 fi
117 if test ! -f "$as_myself"; then
118 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
119 exit 1
120 fi
121
122 # Unset variables that we do not need and which cause bugs (e.g. in
123 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
124 # suppresses any "Segmentation fault" message there. '((' could
125 # trigger a bug in pdksh 5.2.14.
126 for as_var in BASH_ENV ENV MAIL MAILPATH
127 do eval test x\${$as_var+set} = xset \
128 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
129 done
130 PS1='$ '
131 PS2='> '
132 PS4='+ '
133
134 # NLS nuisances.
135 LC_ALL=C
136 export LC_ALL
137 LANGUAGE=C
138 export LANGUAGE
139
140 # CDPATH.
141 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
142
143 # Use a proper internal environment variable to ensure we don't fall
144 # into an infinite loop, continuously re-executing ourselves.
145 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
146 _as_can_reexec=no; export _as_can_reexec;
147 # We cannot yet assume a decent shell, so we have to provide a
148 # neutralization value for shells without unset; and this also
149 # works around shells that cannot unset nonexistent variables.
150 # Preserve -v and -x to the replacement shell.
151 BASH_ENV=/dev/null
152 ENV=/dev/null
153 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
154 case $- in # ((((
155 *v*x* | *x*v* ) as_opts=-vx ;;
156 *v* ) as_opts=-v ;;
157 *x* ) as_opts=-x ;;
158 * ) as_opts= ;;
159 esac
160 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
161 # Admittedly, this is quite paranoid, since all the known shells bail
162 # out after a failed `exec'.
163 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
164 as_fn_exit 255
165 fi
166 # We don't want this to propagate to other subprocesses.
167 { _as_can_reexec=; unset _as_can_reexec;}
168 if test "x$CONFIG_SHELL" = x; then
169 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
170 emulate sh
171 NULLCMD=:
172 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
173 # is contrary to our usage. Disable this feature.
174 alias -g '\${1+\"\$@\"}'='\"\$@\"'
175 setopt NO_GLOB_SUBST
176 else
177 case \`(set -o) 2>/dev/null\` in #(
178 *posix*) :
179 set -o posix ;; #(
180 *) :
181 ;;
182 esac
183 fi
184 "
185 as_required="as_fn_return () { (exit \$1); }
186 as_fn_success () { as_fn_return 0; }
187 as_fn_failure () { as_fn_return 1; }
188 as_fn_ret_success () { return 0; }
189 as_fn_ret_failure () { return 1; }
190
191 exitcode=0
192 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
193 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
194 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
195 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
196 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
197
198 else
199 exitcode=1; echo positional parameters were not saved.
200 fi
201 test x\$exitcode = x0 || exit 1
202 test -x / || exit 1"
203 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
204 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
205 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
206 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
207 test \$(( 1 + 1 )) = 2 || exit 1"
208 if (eval "$as_required") 2>/dev/null; then :
209 as_have_required=yes
210 else
211 as_have_required=no
212 fi
213 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
214
215 else
216 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
217 as_found=false
218 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
219 do
220 IFS=$as_save_IFS
221 test -z "$as_dir" && as_dir=.
222 as_found=:
223 case $as_dir in #(
224 /*)
225 for as_base in sh bash ksh sh5; do
226 # Try only shells that exist, to save several forks.
227 as_shell=$as_dir/$as_base
228 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
229 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
230 CONFIG_SHELL=$as_shell as_have_required=yes
231 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
232 break 2
233 fi
234 fi
235 done;;
236 esac
237 as_found=false
238 done
239 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
240 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
241 CONFIG_SHELL=$SHELL as_have_required=yes
242 fi; }
243 IFS=$as_save_IFS
244
245
246 if test "x$CONFIG_SHELL" != x; then :
247 export CONFIG_SHELL
248 # We cannot yet assume a decent shell, so we have to provide a
249 # neutralization value for shells without unset; and this also
250 # works around shells that cannot unset nonexistent variables.
251 # Preserve -v and -x to the replacement shell.
252 BASH_ENV=/dev/null
253 ENV=/dev/null
254 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
255 case $- in # ((((
256 *v*x* | *x*v* ) as_opts=-vx ;;
257 *v* ) as_opts=-v ;;
258 *x* ) as_opts=-x ;;
259 * ) as_opts= ;;
260 esac
261 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
262 # Admittedly, this is quite paranoid, since all the known shells bail
263 # out after a failed `exec'.
264 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
265 exit 255
266 fi
267
268 if test x$as_have_required = xno; then :
269 $as_echo "$0: This script requires a shell more modern than all"
270 $as_echo "$0: the shells that I found on your system."
271 if test x${ZSH_VERSION+set} = xset ; then
272 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
273 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
274 else
275 $as_echo "$0: Please tell bug-autoconf@gnu.org and
276 $0: build-dev@openjdk.java.net about your system, including
277 $0: any error possibly output before this message. Then
278 $0: install a modern shell, or manually run the script
279 $0: under such a shell if you do have one."
280 fi
281 exit 1
282 fi
283 fi
284 fi
285 SHELL=${CONFIG_SHELL-/bin/sh}
286 export SHELL
287 # Unset more variables known to interfere with behavior of common tools.
288 CLICOLOR_FORCE= GREP_OPTIONS=
289 unset CLICOLOR_FORCE GREP_OPTIONS
290
291 ## --------------------- ##
292 ## M4sh Shell Functions. ##
293 ## --------------------- ##
294 # as_fn_unset VAR
295 # ---------------
296 # Portably unset VAR.
297 as_fn_unset ()
298 {
299 { eval $1=; unset $1;}
300 }
301 as_unset=as_fn_unset
302
303 # as_fn_set_status STATUS
304 # -----------------------
305 # Set $? to STATUS, without forking.
306 as_fn_set_status ()
307 {
308 return $1
309 } # as_fn_set_status
310
311 # as_fn_exit STATUS
312 # -----------------
313 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
314 as_fn_exit ()
315 {
316 set +e
317 as_fn_set_status $1
318 exit $1
319 } # as_fn_exit
320
321 # as_fn_mkdir_p
322 # -------------
323 # Create "$as_dir" as a directory, including parents if necessary.
324 as_fn_mkdir_p ()
325 {
326
327 case $as_dir in #(
328 -*) as_dir=./$as_dir;;
329 esac
330 test -d "$as_dir" || eval $as_mkdir_p || {
331 as_dirs=
332 while :; do
333 case $as_dir in #(
334 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
335 *) as_qdir=$as_dir;;
336 esac
337 as_dirs="'$as_qdir' $as_dirs"
338 as_dir=`$as_dirname -- "$as_dir" ||
339 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
340 X"$as_dir" : 'X\(//\)[^/]' \| \
341 X"$as_dir" : 'X\(//\)$' \| \
342 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
343 $as_echo X"$as_dir" |
344 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
345 s//\1/
346 q
347 }
348 /^X\(\/\/\)[^/].*/{
349 s//\1/
350 q
351 }
352 /^X\(\/\/\)$/{
353 s//\1/
354 q
355 }
356 /^X\(\/\).*/{
357 s//\1/
358 q
359 }
360 s/.*/./; q'`
361 test -d "$as_dir" && break
362 done
363 test -z "$as_dirs" || eval "mkdir $as_dirs"
364 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
365
366
367 } # as_fn_mkdir_p
368
369 # as_fn_executable_p FILE
370 # -----------------------
371 # Test if FILE is an executable regular file.
372 as_fn_executable_p ()
373 {
374 test -f "$1" && test -x "$1"
375 } # as_fn_executable_p
376 # as_fn_append VAR VALUE
377 # ----------------------
378 # Append the text in VALUE to the end of the definition contained in VAR. Take
379 # advantage of any shell optimizations that allow amortized linear growth over
380 # repeated appends, instead of the typical quadratic growth present in naive
381 # implementations.
382 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
383 eval 'as_fn_append ()
384 {
385 eval $1+=\$2
386 }'
387 else
388 as_fn_append ()
389 {
390 eval $1=\$$1\$2
391 }
392 fi # as_fn_append
393
394 # as_fn_arith ARG...
395 # ------------------
396 # Perform arithmetic evaluation on the ARGs, and store the result in the
397 # global $as_val. Take advantage of shells that can avoid forks. The arguments
398 # must be portable across $(()) and expr.
399 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
400 eval 'as_fn_arith ()
401 {
402 as_val=$(( $* ))
403 }'
404 else
405 as_fn_arith ()
406 {
407 as_val=`expr "$@" || test $? -eq 1`
408 }
409 fi # as_fn_arith
410
411
412 # as_fn_error STATUS ERROR [LINENO LOG_FD]
413 # ----------------------------------------
414 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
415 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
416 # script with STATUS, using 1 if that was 0.
417 as_fn_error ()
418 {
419 as_status=$1; test $as_status -eq 0 && as_status=1
420 if test "$4"; then
421 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
422 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
423 fi
424 $as_echo "$as_me: error: $2" >&2
425 as_fn_exit $as_status
426 } # as_fn_error
427
428 if expr a : '\(a\)' >/dev/null 2>&1 &&
429 test "X`expr 00001 : '.*\(...\)'`" = X001; then
430 as_expr=expr
431 else
432 as_expr=false
433 fi
434
435 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
436 as_basename=basename
437 else
438 as_basename=false
439 fi
440
441 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
442 as_dirname=dirname
443 else
444 as_dirname=false
445 fi
446
447 as_me=`$as_basename -- "$0" ||
448 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
449 X"$0" : 'X\(//\)$' \| \
450 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
451 $as_echo X/"$0" |
452 sed '/^.*\/\([^/][^/]*\)\/*$/{
453 s//\1/
454 q
455 }
456 /^X\/\(\/\/\)$/{
457 s//\1/
458 q
459 }
460 /^X\/\(\/\).*/{
461 s//\1/
462 q
463 }
464 s/.*/./; q'`
465
466 # Avoid depending upon Character Ranges.
467 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
468 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
469 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
470 as_cr_digits='0123456789'
471 as_cr_alnum=$as_cr_Letters$as_cr_digits
472
473
474 as_lineno_1=$LINENO as_lineno_1a=$LINENO
475 as_lineno_2=$LINENO as_lineno_2a=$LINENO
476 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
477 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
478 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
479 sed -n '
480 p
481 /[$]LINENO/=
482 ' <$as_myself |
483 sed '
484 s/[$]LINENO.*/&-/
485 t lineno
486 b
487 :lineno
488 N
489 :loop
490 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
491 t loop
492 s/-\n.*//
493 ' >$as_me.lineno &&
494 chmod +x "$as_me.lineno" ||
495 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
496
497 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
498 # already done that, so ensure we don't try to do so again and fall
499 # in an infinite loop. This has already happened in practice.
500 _as_can_reexec=no; export _as_can_reexec
501 # Don't try to exec as it changes $[0], causing all sort of problems
502 # (the dirname of $[0] is not the place where we might find the
503 # original and so on. Autoconf is especially sensitive to this).
504 . "./$as_me.lineno"
505 # Exit status is that of the last command.
506 exit
507 }
508
509 ECHO_C= ECHO_N= ECHO_T=
510 case `echo -n x` in #(((((
511 -n*)
512 case `echo 'xy\c'` in
513 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
514 xy) ECHO_C='\c';;
515 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
516 ECHO_T=' ';;
517 esac;;
518 *)
519 ECHO_N='-n';;
520 esac
521
522 rm -f conf$$ conf$$.exe conf$$.file
523 if test -d conf$$.dir; then
524 rm -f conf$$.dir/conf$$.file
525 else
526 rm -f conf$$.dir
527 mkdir conf$$.dir 2>/dev/null
528 fi
529 if (echo >conf$$.file) 2>/dev/null; then
530 if ln -s conf$$.file conf$$ 2>/dev/null; then
531 as_ln_s='ln -s'
532 # ... but there are two gotchas:
533 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
534 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
535 # In both cases, we have to default to `cp -pR'.
536 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
537 as_ln_s='cp -pR'
538 elif ln conf$$.file conf$$ 2>/dev/null; then
539 as_ln_s=ln
540 else
541 as_ln_s='cp -pR'
542 fi
543 else
544 as_ln_s='cp -pR'
545 fi
546 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
547 rmdir conf$$.dir 2>/dev/null
548
549 if mkdir -p . 2>/dev/null; then
550 as_mkdir_p='mkdir -p "$as_dir"'
551 else
552 test -d ./-p && rmdir ./-p
553 as_mkdir_p=false
554 fi
555
556 as_test_x='test -x'
557 as_executable_p=as_fn_executable_p
558
559 # Sed expression to map a string onto a valid CPP name.
560 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
561
562 # Sed expression to map a string onto a valid variable name.
563 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
564
565
566 test -n "$DJDIR" || exec 7<&0 </dev/null
567 exec 6>&1
568
569 # Name of the host.
570 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
571 # so uname gets run too.
572 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
573
574 #
575 # Initializations.
576 #
577 ac_default_prefix=/usr/local
578 ac_clean_files=
579 ac_config_libobj_dir=.
580 LIBOBJS=
581 cross_compiling=no
582 subdirs=
583 MFLAGS=
584 MAKEFLAGS=
585
586 # Identity of this package.
587 PACKAGE_NAME='OpenJDK'
588 PACKAGE_TARNAME='openjdk'
589 PACKAGE_VERSION='jdk9'
590 PACKAGE_STRING='OpenJDK jdk9'
591 PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
592 PACKAGE_URL='http://openjdk.java.net'
593
594 # Factoring default headers for most tests.
595 ac_includes_default="\
596 #include <stdio.h>
597 #ifdef HAVE_SYS_TYPES_H
598 # include <sys/types.h>
599 #endif
600 #ifdef HAVE_SYS_STAT_H
601 # include <sys/stat.h>
602 #endif
603 #ifdef STDC_HEADERS
604 # include <stdlib.h>
605 # include <stddef.h>
606 #else
607 # ifdef HAVE_STDLIB_H
608 # include <stdlib.h>
609 # endif
610 #endif
611 #ifdef HAVE_STRING_H
612 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
613 # include <memory.h>
614 # endif
615 # include <string.h>
616 #endif
617 #ifdef HAVE_STRINGS_H
618 # include <strings.h>
619 #endif
620 #ifdef HAVE_INTTYPES_H
621 # include <inttypes.h>
622 #endif
623 #ifdef HAVE_STDINT_H
624 # include <stdint.h>
625 #endif
626 #ifdef HAVE_UNISTD_H
627 # include <unistd.h>
628 #endif"
629
630 ac_subst_vars='LTLIBOBJS
631 LIBOBJS
632 CFLAGS_CCACHE
633 CCACHE
634 USE_PRECOMPILED_HEADER
635 ENABLE_SJAVAC
636 SJAVAC_SERVER_JAVA_FLAGS
637 SJAVAC_SERVER_JAVA
638 JAVA_TOOL_FLAGS_SMALL
639 JAVA_FLAGS_SMALL
640 JAVA_FLAGS_BIG
641 JAVA_FLAGS
642 JOBS
643 MEMORY_SIZE
644 NUM_CORES
645 ENABLE_INTREE_EC
646 SALIB_NAME
647 HOTSPOT_MAKE_ARGS
648 MSVCP_DLL
649 MSVCR_DLL
650 LIBCXX
651 LLVM_LIBS
652 LLVM_LDFLAGS
653 LLVM_CFLAGS
654 LLVM_CONFIG
655 LIBFFI_LIBS
656 LIBFFI_CFLAGS
657 STATIC_CXX_SETTING
658 LIBDL
659 LIBM
660 LIBZIP_CAN_USE_MMAP
661 USE_EXTERNAL_LIBZ
662 USE_EXTERNAL_LIBPNG
663 PNG_LIBS
664 PNG_CFLAGS
665 USE_EXTERNAL_LCMS
666 LCMS_LIBS
667 LCMS_CFLAGS
668 USE_EXTERNAL_LIBGIF
669 USE_EXTERNAL_LIBJPEG
670 ALSA_LIBS
671 ALSA_CFLAGS
672 FREETYPE_BUNDLE_LIB_PATH
673 FREETYPE_LIBS
674 FREETYPE_CFLAGS
675 CUPS_CFLAGS
676 X_EXTRA_LIBS
677 X_LIBS
678 X_PRE_LIBS
679 X_CFLAGS
680 XMKMF
681 FIXPATH
682 GCOV_ENABLED
683 ZIP_DEBUGINFO_FILES
684 ENABLE_DEBUG_SYMBOLS
685 CFLAGS_WARNINGS_ARE_ERRORS
686 DISABLE_WARNING_PREFIX
687 WARNINGS_AS_ERRORS
688 COMPILER_SUPPORTS_TARGET_BITS_FLAG
689 ZERO_ARCHFLAG
690 LDFLAGS_TESTEXE_SUFFIX
691 LDFLAGS_TESTLIB_SUFFIX
692 LDFLAGS_TESTEXE
693 LDFLAGS_TESTLIB
694 LDFLAGS_CXX_JDK
695 LDFLAGS_JDKEXE_SUFFIX
696 LDFLAGS_JDKLIB_SUFFIX
697 LDFLAGS_JDKEXE
698 LDFLAGS_JDKLIB
699 CXXFLAGS_TESTEXE
700 CXXFLAGS_TESTLIB
701 CFLAGS_TESTEXE
702 CFLAGS_TESTLIB
703 CXXFLAGS_JDKEXE
704 CXXFLAGS_JDKLIB
705 CFLAGS_JDKEXE
706 CFLAGS_JDKLIB
707 MACOSX_VERSION_MIN
708 LEGACY_EXTRA_LDFLAGS
709 LEGACY_EXTRA_CXXFLAGS
710 LEGACY_EXTRA_CFLAGS
711 CXX_O_FLAG_NONE
712 CXX_O_FLAG_DEBUG
713 CXX_O_FLAG_NORM
714 CXX_O_FLAG_HI
715 CXX_O_FLAG_HIGHEST
716 C_O_FLAG_NONE
717 C_O_FLAG_DEBUG
718 C_O_FLAG_NORM
719 C_O_FLAG_HI
720 C_O_FLAG_HIGHEST
721 CXXFLAGS_DEBUG_OPTIONS
722 CFLAGS_DEBUG_OPTIONS
723 CXXFLAGS_DEBUG_SYMBOLS
724 CFLAGS_DEBUG_SYMBOLS
725 CXX_FLAG_DEPS
726 C_FLAG_DEPS
727 SET_SHARED_LIBRARY_MAPFILE
728 SET_SHARED_LIBRARY_NAME
729 SET_SHARED_LIBRARY_ORIGIN
730 SET_EXECUTABLE_ORIGIN
731 CXX_FLAG_REORDER
732 C_FLAG_REORDER
733 SYSROOT_LDFLAGS
734 SYSROOT_CFLAGS
735 RC_FLAGS
736 AR_OUT_OPTION
737 LD_OUT_OPTION
738 EXE_OUT_OPTION
739 CC_OUT_OPTION
740 POST_STRIP_CMD
741 ARFLAGS
742 COMPILER_TARGET_BITS_FLAG
743 JT_HOME
744 JTREGEXE
745 USING_BROKEN_SUSE_LD
746 PACKAGE_PATH
747 USE_CLANG
748 HOTSPOT_LD
749 HOTSPOT_CXX
750 HOTSPOT_RC
751 HOTSPOT_MT
752 BUILD_LD
753 BUILD_CXX
754 BUILD_CC
755 ac_ct_OBJDUMP
756 OBJDUMP
757 ac_ct_OBJCOPY
758 OBJCOPY
759 ac_ct_NM
760 ac_ct_STRIP
761 GNM
762 NM
763 STRIP
764 MSBUILD
765 DUMPBIN
766 RC
767 MT
768 LIPO
769 ac_ct_AR
770 AR
771 AS
772 LDCXX
773 LD
774 CXXCPP
775 CPP
776 ac_ct_CXX
777 CXXFLAGS
778 CXX
779 ac_ct_PROPER_COMPILER_CXX
780 PROPER_COMPILER_CXX
781 TOOLCHAIN_PATH_CXX
782 POTENTIAL_CXX
783 OBJEXT
784 EXEEXT
785 ac_ct_CC
786 CPPFLAGS
787 LDFLAGS
788 CFLAGS
789 CC
790 ac_ct_PROPER_COMPILER_CC
791 PROPER_COMPILER_CC
792 TOOLCHAIN_PATH_CC
793 POTENTIAL_CC
794 VS_LIB
795 VS_INCLUDE
796 VS_PATH
797 CYGWIN_LINK
798 EXE_SUFFIX
799 OBJ_SUFFIX
800 STATIC_LIBRARY
801 SHARED_LIBRARY
802 STATIC_LIBRARY_SUFFIX
803 SHARED_LIBRARY_SUFFIX
804 LIBRARY_PREFIX
805 TOOLCHAIN_TYPE
806 BUILD_HOTSPOT
807 HOTSPOT_DIST
808 BUILD_OUTPUT
809 OVERRIDE_SRC_ROOT
810 ADD_SRC_ROOT
811 JDK_TOPDIR
812 NASHORN_TOPDIR
813 HOTSPOT_TOPDIR
814 JAXWS_TOPDIR
815 JAXP_TOPDIR
816 CORBA_TOPDIR
817 LANGTOOLS_TOPDIR
818 JAVAC_FLAGS
819 BOOT_JDK_SOURCETARGET
820 JARSIGNER
821 JAR
822 JAVAH
823 JAVAC
824 JAVA
825 BOOT_JDK
826 JAVA_CHECK
827 JAVAC_CHECK
828 VERSION_SHORT
829 VERSION_STRING
830 VERSION_NUMBER_FOUR_POSITIONS
831 VERSION_NUMBER
832 VERSION_OPT
833 VERSION_BUILD
834 VERSION_PRE
835 VERSION_PATCH
836 VERSION_SECURITY
837 VERSION_MINOR
838 VERSION_MAJOR
839 MACOSX_BUNDLE_ID_BASE
840 MACOSX_BUNDLE_NAME_BASE
841 COMPANY_NAME
842 JDK_RC_PLATFORM_NAME
843 PRODUCT_SUFFIX
844 PRODUCT_NAME
845 LAUNCHER_NAME
846 COPYRIGHT_YEAR
847 COMPRESS_JARS
848 RMICONNECTOR_IIOP
849 UNLIMITED_CRYPTO
850 CACERTS_FILE
851 TEST_IN_BUILD
852 BUILD_HEADLESS
853 SUPPORT_HEADFUL
854 SUPPORT_HEADLESS
855 BDEPS_FTP
856 BDEPS_UNZIP
857 OS_VERSION_MICRO
858 OS_VERSION_MINOR
859 OS_VERSION_MAJOR
860 PKG_CONFIG
861 BASH_ARGS
862 CODESIGN
863 XATTR
864 DSYMUTIL
865 IS_GNU_TIME
866 TIME
867 STAT
868 HG
869 READELF
870 OTOOL
871 LDD
872 ZIP
873 UNZIP
874 FIND_DELETE
875 OUTPUT_SYNC
876 OUTPUT_SYNC_SUPPORTED
877 MAKE
878 CHECK_TOOLSDIR_MAKE
879 CHECK_TOOLSDIR_GMAKE
880 CHECK_MAKE
881 CHECK_GMAKE
882 PKGHANDLER
883 CONFIGURESUPPORT_OUTPUTDIR
884 OUTPUT_ROOT
885 CONF_NAME
886 SPEC
887 SDKROOT
888 XCODEBUILD
889 BUILD_VARIANT_RELEASE
890 DEBUG_CLASSFILES
891 FASTDEBUG
892 VARIANT
893 DEBUG_LEVEL
894 MACOSX_UNIVERSAL
895 INCLUDE_SA
896 JVM_VARIANT_CORE
897 JVM_VARIANT_ZEROSHARK
898 JVM_VARIANT_ZERO
899 JVM_VARIANT_KERNEL
900 JVM_VARIANT_MINIMAL1
901 JVM_VARIANT_CLIENT
902 JVM_VARIANT_SERVER
903 JVM_VARIANTS
904 JVM_INTERPRETER
905 JDK_VARIANT
906 SET_OPENJDK
907 CANONICAL_TOPDIR
908 ORIGINAL_TOPDIR
909 TOPDIR
910 PATH_SEP
911 ZERO_ARCHDEF
912 DEFINE_CROSS_COMPILE_ARCH
913 LP64
914 OPENJDK_TARGET_OS_EXPORT_DIR
915 OPENJDK_TARGET_CPU_JLI_CFLAGS
916 OPENJDK_TARGET_CPU_OSARCH
917 OPENJDK_TARGET_CPU_ISADIR
918 OPENJDK_TARGET_CPU_LIBDIR
919 OPENJDK_TARGET_CPU_LEGACY_LIB
920 OPENJDK_TARGET_CPU_LEGACY
921 REQUIRED_OS_VERSION
922 REQUIRED_OS_NAME
923 COMPILE_TYPE
924 OPENJDK_TARGET_CPU_ENDIAN
925 OPENJDK_TARGET_CPU_BITS
926 OPENJDK_TARGET_CPU_ARCH
927 OPENJDK_TARGET_CPU
928 OPENJDK_TARGET_OS_ENV
929 OPENJDK_TARGET_OS_TYPE
930 OPENJDK_TARGET_OS
931 OPENJDK_BUILD_CPU_ENDIAN
932 OPENJDK_BUILD_CPU_BITS
933 OPENJDK_BUILD_CPU_ARCH
934 OPENJDK_BUILD_CPU
935 OPENJDK_BUILD_OS_ENV
936 OPENJDK_BUILD_OS_TYPE
937 OPENJDK_BUILD_OS
938 OPENJDK_BUILD_AUTOCONF_NAME
939 OPENJDK_TARGET_AUTOCONF_NAME
940 target_os
941 target_vendor
942 target_cpu
943 target
944 host_os
945 host_vendor
946 host_cpu
947 host
948 build_os
949 build_vendor
950 build_cpu
951 build
952 CPIO
953 SETFILE
954 DF
955 READLINK
956 CYGPATH
957 SED
958 FGREP
959 EGREP
960 GREP
961 AWK
962 XARGS
963 WHICH
964 WC
965 UNIQ
966 UNAME
967 TR
968 TOUCH
969 TEE
970 TAR
971 TAIL
972 SORT
973 SH
974 RM
975 PRINTF
976 NAWK
977 MV
978 MKTEMP
979 MKDIR
980 LS
981 LN
982 HEAD
983 FIND
984 FILE
985 EXPR
986 ECHO
987 DIRNAME
988 DIFF
989 DATE
990 CUT
991 CP
992 COMM
993 CMP
994 CHMOD
995 CAT
996 BASH
997 BASENAME
998 DATE_WHEN_CONFIGURED
999 ORIGINAL_PATH
1000 CONFIGURE_COMMAND_LINE
1001 target_alias
1002 host_alias
1003 build_alias
1004 LIBS
1005 ECHO_T
1006 ECHO_N
1007 ECHO_C
1008 DEFS
1009 mandir
1010 localedir
1011 libdir
1012 psdir
1013 pdfdir
1014 dvidir
1015 htmldir
1016 infodir
1017 docdir
1018 oldincludedir
1019 includedir
1020 localstatedir
1021 sharedstatedir
1022 sysconfdir
1023 datadir
1024 datarootdir
1025 libexecdir
1026 sbindir
1027 bindir
1028 program_transform_name
1029 prefix
1030 exec_prefix
1031 PACKAGE_URL
1032 PACKAGE_BUGREPORT
1033 PACKAGE_STRING
1034 PACKAGE_VERSION
1035 PACKAGE_TARNAME
1036 PACKAGE_NAME
1037 PATH_SEPARATOR
1038 SHELL'
1039 ac_subst_files=''
1040 ac_user_opts='
1041 enable_option_checking
1042 with_target_bits
1043 enable_openjdk_only
1044 with_custom_make_dir
1045 with_jdk_variant
1046 with_jvm_interpreter
1047 with_jvm_variants
1048 enable_debug
1049 with_debug_level
1050 with_devkit
1051 with_sys_root
1052 with_sysroot
1053 with_tools_dir
1054 with_toolchain_path
1055 with_extra_path
1056 with_sdk_name
1057 with_conf_name
1058 with_output_sync
1059 with_builddeps_conf
1060 with_builddeps_server
1061 with_builddeps_dir
1062 with_builddeps_group
1063 enable_headful
1064 enable_hotspot_test_in_build
1065 with_cacerts_file
1066 enable_unlimited_crypto
1067 enable_rmiconnector_iiop
1068 with_copyright_year
1069 with_milestone
1070 with_update_version
1071 with_user_release_suffix
1072 with_build_number
1073 with_version_string
1074 with_version_pre_base
1075 with_version_pre_debuglevel
1076 with_version_opt
1077 with_version_build
1078 with_version_major
1079 with_version_minor
1080 with_version_security
1081 with_version_patch
1082 with_boot_jdk
1083 with_add_source_root
1084 with_override_source_root
1085 with_adds_and_overrides
1086 with_override_langtools
1087 with_override_corba
1088 with_override_jaxp
1089 with_override_jaxws
1090 with_override_hotspot
1091 with_override_nashorn
1092 with_override_jdk
1093 with_import_hotspot
1094 with_toolchain_type
1095 with_toolchain_version
1096 with_jtreg
1097 with_extra_cflags
1098 with_extra_cxxflags
1099 with_extra_ldflags
1100 enable_warnings_as_errors
1101 enable_debug_symbols
1102 enable_zip_debug_info
1103 enable_native_coverage
1104 with_x
1105 with_cups
1106 with_cups_include
1107 with_freetype
1108 with_freetype_include
1109 with_freetype_lib
1110 with_freetype_src
1111 enable_freetype_bundling
1112 with_alsa
1113 with_alsa_include
1114 with_alsa_lib
1115 with_libjpeg
1116 with_giflib
1117 with_lcms
1118 with_libpng
1119 with_zlib
1120 with_stdc__lib
1121 with_msvcr_dll
1122 with_msvcp_dll
1123 with_dxsdk
1124 with_dxsdk_lib
1125 with_dxsdk_include
1126 with_num_cores
1127 with_memory_size
1128 with_jobs
1129 with_boot_jdk_jvmargs
1130 with_sjavac_server_java
1131 enable_sjavac
1132 enable_precompiled_headers
1133 enable_ccache
1134 with_ccache_dir
1135 '
1136 ac_precious_vars='build_alias
1137 host_alias
1138 target_alias
1139 BASENAME
1140 BASH
1141 CAT
1142 CHMOD
1143 CMP
1144 COMM
1145 CP
1146 CUT
1147 DATE
1148 DIFF
1149 DIRNAME
1150 ECHO
1151 EXPR
1152 FILE
1153 FIND
1154 HEAD
1155 LN
1156 LS
1157 MKDIR
1158 MKTEMP
1159 MV
1160 NAWK
1161 PRINTF
1162 RM
1163 SH
1164 SORT
1165 TAIL
1166 TAR
1167 TEE
1168 TOUCH
1169 TR
1170 UNAME
1171 UNIQ
1172 WC
1173 WHICH
1174 XARGS
1175 AWK
1176 GREP
1177 EGREP
1178 FGREP
1179 SED
1180 CYGPATH
1181 READLINK
1182 DF
1183 SETFILE
1184 CPIO
1185 UNZIP
1186 ZIP
1187 LDD
1188 OTOOL
1189 READELF
1190 HG
1191 STAT
1192 TIME
1193 DSYMUTIL
1194 XATTR
1195 CODESIGN
1196 PKG_CONFIG
1197 JAVA
1198 JAVAC
1199 JAVAH
1200 JAR
1201 JARSIGNER
1202 CC
1203 CFLAGS
1204 LDFLAGS
1205 LIBS
1206 CPPFLAGS
1207 CXX
1208 CXXFLAGS
1209 CCC
1210 CPP
1211 CXXCPP
1212 AS
1213 AR
1214 LIPO
1215 STRIP
1216 NM
1217 GNM
1218 OBJCOPY
1219 OBJDUMP
1220 BUILD_CC
1221 BUILD_CXX
1222 BUILD_LD
1223 JTREGEXE
1224 XMKMF
1225 FREETYPE_CFLAGS
1226 FREETYPE_LIBS
1227 ALSA_CFLAGS
1228 ALSA_LIBS
1229 LCMS_CFLAGS
1230 LCMS_LIBS
1231 PNG_CFLAGS
1232 PNG_LIBS
1233 LIBFFI_CFLAGS
1234 LIBFFI_LIBS
1235 CCACHE'
1236
1237
1238 # Initialize some variables set by options.
1239 ac_init_help=
1240 ac_init_version=false
1241 ac_unrecognized_opts=
1242 ac_unrecognized_sep=
1243 # The variables have the same names as the options, with
1244 # dashes changed to underlines.
1245 cache_file=/dev/null
1246 exec_prefix=NONE
1247 no_create=
1248 no_recursion=
1249 prefix=NONE
1250 program_prefix=NONE
1251 program_suffix=NONE
1252 program_transform_name=s,x,x,
1253 silent=
1254 site=
1255 srcdir=
1256 verbose=
1257 x_includes=NONE
1258 x_libraries=NONE
1259
1260 # Installation directory options.
1261 # These are left unexpanded so users can "make install exec_prefix=/foo"
1262 # and all the variables that are supposed to be based on exec_prefix
1263 # by default will actually change.
1264 # Use braces instead of parens because sh, perl, etc. also accept them.
1265 # (The list follows the same order as the GNU Coding Standards.)
1266 bindir='${exec_prefix}/bin'
1267 sbindir='${exec_prefix}/sbin'
1268 libexecdir='${exec_prefix}/libexec'
1269 datarootdir='${prefix}/share'
1270 datadir='${datarootdir}'
1271 sysconfdir='${prefix}/etc'
1272 sharedstatedir='${prefix}/com'
1273 localstatedir='${prefix}/var'
1274 includedir='${prefix}/include'
1275 oldincludedir='/usr/include'
1276 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1277 infodir='${datarootdir}/info'
1278 htmldir='${docdir}'
1279 dvidir='${docdir}'
1280 pdfdir='${docdir}'
1281 psdir='${docdir}'
1282 libdir='${exec_prefix}/lib'
1283 localedir='${datarootdir}/locale'
1284 mandir='${datarootdir}/man'
1285
1286 ac_prev=
1287 ac_dashdash=
1288 for ac_option
1289 do
1290 # If the previous option needs an argument, assign it.
1291 if test -n "$ac_prev"; then
1292 eval $ac_prev=\$ac_option
1293 ac_prev=
1294 continue
1295 fi
1296
1297 case $ac_option in
1298 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1299 *=) ac_optarg= ;;
1300 *) ac_optarg=yes ;;
1301 esac
1302
1303 # Accept the important Cygnus configure options, so we can diagnose typos.
1304
1305 case $ac_dashdash$ac_option in
1306 --)
1307 ac_dashdash=yes ;;
1308
1309 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1310 ac_prev=bindir ;;
1311 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1312 bindir=$ac_optarg ;;
1313
1314 -build | --build | --buil | --bui | --bu)
1315 ac_prev=build_alias ;;
1316 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1317 build_alias=$ac_optarg ;;
1318
1319 -cache-file | --cache-file | --cache-fil | --cache-fi \
1320 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1321 ac_prev=cache_file ;;
1322 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1323 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1324 cache_file=$ac_optarg ;;
1325
1326 --config-cache | -C)
1327 cache_file=config.cache ;;
1328
1329 -datadir | --datadir | --datadi | --datad)
1330 ac_prev=datadir ;;
1331 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1332 datadir=$ac_optarg ;;
1333
1334 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1335 | --dataroo | --dataro | --datar)
1336 ac_prev=datarootdir ;;
1337 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1338 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1339 datarootdir=$ac_optarg ;;
1340
1341 -disable-* | --disable-*)
1342 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1343 # Reject names that are not valid shell variable names.
1344 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1345 as_fn_error $? "invalid feature name: $ac_useropt"
1346 ac_useropt_orig=$ac_useropt
1347 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1348 case $ac_user_opts in
1349 *"
1350 "enable_$ac_useropt"
1351 "*) ;;
1352 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1353 ac_unrecognized_sep=', ';;
1354 esac
1355 eval enable_$ac_useropt=no ;;
1356
1357 -docdir | --docdir | --docdi | --doc | --do)
1358 ac_prev=docdir ;;
1359 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1360 docdir=$ac_optarg ;;
1361
1362 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1363 ac_prev=dvidir ;;
1364 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1365 dvidir=$ac_optarg ;;
1366
1367 -enable-* | --enable-*)
1368 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1369 # Reject names that are not valid shell variable names.
1370 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1371 as_fn_error $? "invalid feature name: $ac_useropt"
1372 ac_useropt_orig=$ac_useropt
1373 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1374 case $ac_user_opts in
1375 *"
1376 "enable_$ac_useropt"
1377 "*) ;;
1378 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1379 ac_unrecognized_sep=', ';;
1380 esac
1381 eval enable_$ac_useropt=\$ac_optarg ;;
1382
1383 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1384 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1385 | --exec | --exe | --ex)
1386 ac_prev=exec_prefix ;;
1387 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1388 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1389 | --exec=* | --exe=* | --ex=*)
1390 exec_prefix=$ac_optarg ;;
1391
1392 -gas | --gas | --ga | --g)
1393 # Obsolete; use --with-gas.
1394 with_gas=yes ;;
1395
1396 -help | --help | --hel | --he | -h)
1397 ac_init_help=long ;;
1398 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1399 ac_init_help=recursive ;;
1400 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1401 ac_init_help=short ;;
1402
1403 -host | --host | --hos | --ho)
1404 ac_prev=host_alias ;;
1405 -host=* | --host=* | --hos=* | --ho=*)
1406 host_alias=$ac_optarg ;;
1407
1408 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1409 ac_prev=htmldir ;;
1410 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1411 | --ht=*)
1412 htmldir=$ac_optarg ;;
1413
1414 -includedir | --includedir | --includedi | --included | --include \
1415 | --includ | --inclu | --incl | --inc)
1416 ac_prev=includedir ;;
1417 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1418 | --includ=* | --inclu=* | --incl=* | --inc=*)
1419 includedir=$ac_optarg ;;
1420
1421 -infodir | --infodir | --infodi | --infod | --info | --inf)
1422 ac_prev=infodir ;;
1423 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1424 infodir=$ac_optarg ;;
1425
1426 -libdir | --libdir | --libdi | --libd)
1427 ac_prev=libdir ;;
1428 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1429 libdir=$ac_optarg ;;
1430
1431 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1432 | --libexe | --libex | --libe)
1433 ac_prev=libexecdir ;;
1434 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1435 | --libexe=* | --libex=* | --libe=*)
1436 libexecdir=$ac_optarg ;;
1437
1438 -localedir | --localedir | --localedi | --localed | --locale)
1439 ac_prev=localedir ;;
1440 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1441 localedir=$ac_optarg ;;
1442
1443 -localstatedir | --localstatedir | --localstatedi | --localstated \
1444 | --localstate | --localstat | --localsta | --localst | --locals)
1445 ac_prev=localstatedir ;;
1446 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1447 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1448 localstatedir=$ac_optarg ;;
1449
1450 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1451 ac_prev=mandir ;;
1452 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1453 mandir=$ac_optarg ;;
1454
1455 -nfp | --nfp | --nf)
1456 # Obsolete; use --without-fp.
1457 with_fp=no ;;
1458
1459 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1460 | --no-cr | --no-c | -n)
1461 no_create=yes ;;
1462
1463 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1464 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1465 no_recursion=yes ;;
1466
1467 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1468 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1469 | --oldin | --oldi | --old | --ol | --o)
1470 ac_prev=oldincludedir ;;
1471 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1472 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1473 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1474 oldincludedir=$ac_optarg ;;
1475
1476 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1477 ac_prev=prefix ;;
1478 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1479 prefix=$ac_optarg ;;
1480
1481 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1482 | --program-pre | --program-pr | --program-p)
1483 ac_prev=program_prefix ;;
1484 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1485 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1486 program_prefix=$ac_optarg ;;
1487
1488 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1489 | --program-suf | --program-su | --program-s)
1490 ac_prev=program_suffix ;;
1491 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1492 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1493 program_suffix=$ac_optarg ;;
1494
1495 -program-transform-name | --program-transform-name \
1496 | --program-transform-nam | --program-transform-na \
1497 | --program-transform-n | --program-transform- \
1498 | --program-transform | --program-transfor \
1499 | --program-transfo | --program-transf \
1500 | --program-trans | --program-tran \
1501 | --progr-tra | --program-tr | --program-t)
1502 ac_prev=program_transform_name ;;
1503 -program-transform-name=* | --program-transform-name=* \
1504 | --program-transform-nam=* | --program-transform-na=* \
1505 | --program-transform-n=* | --program-transform-=* \
1506 | --program-transform=* | --program-transfor=* \
1507 | --program-transfo=* | --program-transf=* \
1508 | --program-trans=* | --program-tran=* \
1509 | --progr-tra=* | --program-tr=* | --program-t=*)
1510 program_transform_name=$ac_optarg ;;
1511
1512 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1513 ac_prev=pdfdir ;;
1514 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1515 pdfdir=$ac_optarg ;;
1516
1517 -psdir | --psdir | --psdi | --psd | --ps)
1518 ac_prev=psdir ;;
1519 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1520 psdir=$ac_optarg ;;
1521
1522 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1523 | -silent | --silent | --silen | --sile | --sil)
1524 silent=yes ;;
1525
1526 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1527 ac_prev=sbindir ;;
1528 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1529 | --sbi=* | --sb=*)
1530 sbindir=$ac_optarg ;;
1531
1532 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1533 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1534 | --sharedst | --shareds | --shared | --share | --shar \
1535 | --sha | --sh)
1536 ac_prev=sharedstatedir ;;
1537 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1538 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1539 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1540 | --sha=* | --sh=*)
1541 sharedstatedir=$ac_optarg ;;
1542
1543 -site | --site | --sit)
1544 ac_prev=site ;;
1545 -site=* | --site=* | --sit=*)
1546 site=$ac_optarg ;;
1547
1548 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1549 ac_prev=srcdir ;;
1550 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1551 srcdir=$ac_optarg ;;
1552
1553 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1554 | --syscon | --sysco | --sysc | --sys | --sy)
1555 ac_prev=sysconfdir ;;
1556 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1557 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1558 sysconfdir=$ac_optarg ;;
1559
1560 -target | --target | --targe | --targ | --tar | --ta | --t)
1561 ac_prev=target_alias ;;
1562 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1563 target_alias=$ac_optarg ;;
1564
1565 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1566 verbose=yes ;;
1567
1568 -version | --version | --versio | --versi | --vers | -V)
1569 ac_init_version=: ;;
1570
1571 -with-* | --with-*)
1572 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1573 # Reject names that are not valid shell variable names.
1574 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1575 as_fn_error $? "invalid package name: $ac_useropt"
1576 ac_useropt_orig=$ac_useropt
1577 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1578 case $ac_user_opts in
1579 *"
1580 "with_$ac_useropt"
1581 "*) ;;
1582 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1583 ac_unrecognized_sep=', ';;
1584 esac
1585 eval with_$ac_useropt=\$ac_optarg ;;
1586
1587 -without-* | --without-*)
1588 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1589 # Reject names that are not valid shell variable names.
1590 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1591 as_fn_error $? "invalid package name: $ac_useropt"
1592 ac_useropt_orig=$ac_useropt
1593 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1594 case $ac_user_opts in
1595 *"
1596 "with_$ac_useropt"
1597 "*) ;;
1598 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1599 ac_unrecognized_sep=', ';;
1600 esac
1601 eval with_$ac_useropt=no ;;
1602
1603 --x)
1604 # Obsolete; use --with-x.
1605 with_x=yes ;;
1606
1607 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1608 | --x-incl | --x-inc | --x-in | --x-i)
1609 ac_prev=x_includes ;;
1610 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1611 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1612 x_includes=$ac_optarg ;;
1613
1614 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1615 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1616 ac_prev=x_libraries ;;
1617 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1618 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1619 x_libraries=$ac_optarg ;;
1620
1621 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1622 Try \`$0 --help' for more information"
1623 ;;
1624
1625 *=*)
1626 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1627 # Reject names that are not valid shell variable names.
1628 case $ac_envvar in #(
1629 '' | [0-9]* | *[!_$as_cr_alnum]* )
1630 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1631 esac
1632 eval $ac_envvar=\$ac_optarg
1633 export $ac_envvar ;;
1634
1635 *)
1636 # FIXME: should be removed in autoconf 3.0.
1637 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1638 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1639 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1640 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1641 ;;
1642
1643 esac
1644 done
1645
1646 if test -n "$ac_prev"; then
1647 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1648 as_fn_error $? "missing argument to $ac_option"
1649 fi
1650
1651 if test -n "$ac_unrecognized_opts"; then
1652 case $enable_option_checking in
1653 no) ;;
1654 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1655 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1656 esac
1657 fi
1658
1659 # Check all directory arguments for consistency.
1660 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1661 datadir sysconfdir sharedstatedir localstatedir includedir \
1662 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1663 libdir localedir mandir
1664 do
1665 eval ac_val=\$$ac_var
1666 # Remove trailing slashes.
1667 case $ac_val in
1668 */ )
1669 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1670 eval $ac_var=\$ac_val;;
1671 esac
1672 # Be sure to have absolute directory names.
1673 case $ac_val in
1674 [\\/$]* | ?:[\\/]* ) continue;;
1675 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1676 esac
1677 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1678 done
1679
1680 # There might be people who depend on the old broken behavior: `$host'
1681 # used to hold the argument of --host etc.
1682 # FIXME: To remove some day.
1683 build=$build_alias
1684 host=$host_alias
1685 target=$target_alias
1686
1687 # FIXME: To remove some day.
1688 if test "x$host_alias" != x; then
1689 if test "x$build_alias" = x; then
1690 cross_compiling=maybe
1691 elif test "x$build_alias" != "x$host_alias"; then
1692 cross_compiling=yes
1693 fi
1694 fi
1695
1696 ac_tool_prefix=
1697 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1698
1699 test "$silent" = yes && exec 6>/dev/null
1700
1701
1702 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1703 ac_ls_di=`ls -di .` &&
1704 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1705 as_fn_error $? "working directory cannot be determined"
1706 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1707 as_fn_error $? "pwd does not report name of working directory"
1708
1709
1710 # Find the source files, if location was not specified.
1711 if test -z "$srcdir"; then
1712 ac_srcdir_defaulted=yes
1713 # Try the directory containing this script, then the parent directory.
1714 ac_confdir=`$as_dirname -- "$as_myself" ||
1715 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1716 X"$as_myself" : 'X\(//\)[^/]' \| \
1717 X"$as_myself" : 'X\(//\)$' \| \
1718 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1719 $as_echo X"$as_myself" |
1720 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1721 s//\1/
1722 q
1723 }
1724 /^X\(\/\/\)[^/].*/{
1725 s//\1/
1726 q
1727 }
1728 /^X\(\/\/\)$/{
1729 s//\1/
1730 q
1731 }
1732 /^X\(\/\).*/{
1733 s//\1/
1734 q
1735 }
1736 s/.*/./; q'`
1737 srcdir=$ac_confdir
1738 if test ! -r "$srcdir/$ac_unique_file"; then
1739 srcdir=..
1740 fi
1741 else
1742 ac_srcdir_defaulted=no
1743 fi
1744 if test ! -r "$srcdir/$ac_unique_file"; then
1745 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1746 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1747 fi
1748 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1749 ac_abs_confdir=`(
1750 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1751 pwd)`
1752 # When building in place, set srcdir=.
1753 if test "$ac_abs_confdir" = "$ac_pwd"; then
1754 srcdir=.
1755 fi
1756 # Remove unnecessary trailing slashes from srcdir.
1757 # Double slashes in file names in object file debugging info
1758 # mess up M-x gdb in Emacs.
1759 case $srcdir in
1760 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1761 esac
1762 for ac_var in $ac_precious_vars; do
1763 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1764 eval ac_env_${ac_var}_value=\$${ac_var}
1765 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1766 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1767 done
1768
1769 #
1770 # Report the --help message.
1771 #
1772 if test "$ac_init_help" = "long"; then
1773 # Omit some internal or obsolete options to make the list less imposing.
1774 # This message is too long to be a string in the A/UX 3.1 sh.
1775 cat <<_ACEOF
1776 \`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1777
1778 Usage: $0 [OPTION]... [VAR=VALUE]...
1779
1780 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1781 VAR=VALUE. See below for descriptions of some of the useful variables.
1782
1783 Defaults for the options are specified in brackets.
1784
1785 Configuration:
1786 -h, --help display this help and exit
1787 --help=short display options specific to this package
1788 --help=recursive display the short help of all the included packages
1789 -V, --version display version information and exit
1790 -q, --quiet, --silent do not print \`checking ...' messages
1791 --cache-file=FILE cache test results in FILE [disabled]
1792 -C, --config-cache alias for \`--cache-file=config.cache'
1793 -n, --no-create do not create output files
1794 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1795
1796 Installation directories:
1797 --prefix=PREFIX install architecture-independent files in PREFIX
1798 [$ac_default_prefix]
1799 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1800 [PREFIX]
1801
1802 By default, \`make install' will install all the files in
1803 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1804 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1805 for instance \`--prefix=\$HOME'.
1806
1807 For better control, use the options below.
1808
1809 Fine tuning of the installation directories:
1810 --bindir=DIR user executables [EPREFIX/bin]
1811 --sbindir=DIR system admin executables [EPREFIX/sbin]
1812 --libexecdir=DIR program executables [EPREFIX/libexec]
1813 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1814 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1815 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1816 --libdir=DIR object code libraries [EPREFIX/lib]
1817 --includedir=DIR C header files [PREFIX/include]
1818 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1819 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1820 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1821 --infodir=DIR info documentation [DATAROOTDIR/info]
1822 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1823 --mandir=DIR man documentation [DATAROOTDIR/man]
1824 --docdir=DIR documentation root [DATAROOTDIR/doc/openjdk]
1825 --htmldir=DIR html documentation [DOCDIR]
1826 --dvidir=DIR dvi documentation [DOCDIR]
1827 --pdfdir=DIR pdf documentation [DOCDIR]
1828 --psdir=DIR ps documentation [DOCDIR]
1829 _ACEOF
1830
1831 cat <<\_ACEOF
1832
1833 X features:
1834 --x-includes=DIR X include files are in DIR
1835 --x-libraries=DIR X library files are in DIR
1836
1837 System types:
1838 --build=BUILD configure for building on BUILD [guessed]
1839 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1840 --target=TARGET configure for building compilers for TARGET [HOST]
1841 _ACEOF
1842 fi
1843
1844 if test -n "$ac_init_help"; then
1845 case $ac_init_help in
1846 short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1847 esac
1848 cat <<\_ACEOF
1849
1850 Optional Features:
1851 --disable-option-checking ignore unrecognized --enable/--with options
1852 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1853 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1854 --enable-openjdk-only suppress building custom source even if present
1855 [disabled]
1856 --enable-debug set the debug level to fastdebug (shorthand for
1857 --with-debug-level=fastdebug) [disabled]
1858 --disable-headful disable building headful support (graphical UI
1859 support) [enabled]
1860 --enable-hotspot-test-in-build
1861 run the Queens test after Hotspot build [disabled]
1862 --enable-unlimited-crypto
1863 Enable unlimited crypto policy [disabled]
1864 --enable-rmiconnector-iiop
1865 enable the JMX RMIConnector iiop transport
1866 [disabled]
1867 --disable-warnings-as-errors
1868 do not consider native warnings to be an error
1869 [enabled]
1870 --disable-debug-symbols disable generation of debug symbols [enabled]
1871 --disable-zip-debug-info
1872 disable zipping of debug-info files [enabled]
1873 --enable-native-coverage
1874 enable native compilation with code coverage
1875 data[disabled]
1876 --disable-freetype-bundling
1877 disable bundling of the freetype library with the
1878 build result [enabled on Windows or when using
1879 --with-freetype, disabled otherwise]
1880 --enable-sjavac use sjavac to do fast incremental compiles
1881 [disabled]
1882 --disable-precompiled-headers
1883 disable using precompiled headers when compiling C++
1884 [enabled]
1885 --enable-ccache enable using ccache to speed up recompilations
1886 [disabled]
1887
1888 Optional Packages:
1889 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1890 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1891 --with-target-bits build 32-bit or 64-bit binaries (for platforms that
1892 support it), e.g. --with-target-bits=32 [guessed]
1893 --with-custom-make-dir Deprecated. Option is kept for backwards
1894 compatibility and is ignored
1895 --with-jdk-variant JDK variant to build (normal) [normal]
1896 --with-jvm-interpreter JVM interpreter to build (template, cpp) [template]
1897 --with-jvm-variants JVM variants (separated by commas) to build (server,
1898 client, minimal1, kernel, zero, zeroshark, core)
1899 [server]
1900 --with-debug-level set the debug level (release, fastdebug, slowdebug,
1901 optimized (HotSpot build only)) [release]
1902 --with-devkit use this devkit for compilers, tools and resources
1903 --with-sys-root alias for --with-sysroot for backwards compatability
1904 --with-sysroot use this directory as sysroot
1905 --with-tools-dir alias for --with-toolchain-path for backwards
1906 compatibility
1907 --with-toolchain-path prepend these directories when searching for
1908 toolchain binaries (compilers etc)
1909 --with-extra-path prepend these directories to the default path
1910 --with-sdk-name use the platform SDK of the given name. [macosx]
1911 --with-conf-name use this as the name of the configuration [generated
1912 from important configuration options]
1913 --with-output-sync set make output sync type if supported by make.
1914 [recurse]
1915 --with-builddeps-conf use this configuration file for the builddeps
1916 --with-builddeps-server download and use build dependencies from this server
1917 url
1918 --with-builddeps-dir store downloaded build dependencies here
1919 [/localhome/builddeps]
1920 --with-builddeps-group chgrp the downloaded build dependencies to this
1921 group
1922 --with-cacerts-file specify alternative cacerts file
1923 --with-copyright-year Set copyright year value for build [current year]
1924 --with-milestone Deprecated. Option is kept for backwards
1925 compatibility and is ignored
1926 --with-update-version Deprecated. Option is kept for backwards
1927 compatibility and is ignored
1928 --with-user-release-suffix
1929 Deprecated. Option is kept for backwards
1930 compatibility and is ignored
1931 --with-build-number Deprecated. Option is kept for backwards
1932 compatibility and is ignored
1933 --with-version-string Set version string [calculated]
1934 --with-version-pre-base Set the base part of the version 'PRE' field
1935 (pre-release identifier) ['internal']
1936 --with-version-pre-debuglevel
1937 Set the debug level part of the version 'PRE' field
1938 (pre-release identifier) [current debug level]
1939 --with-version-opt Set version 'OPT' field (build metadata)
1940 [<timestamp>.<user>.<dirname>]
1941 --with-version-build Set version 'BUILD' field (build number) [not
1942 specified]
1943 --with-version-major Set version 'MAJOR' field (first number) [current
1944 source value]
1945 --with-version-minor Set version 'MINOR' field (second number) [current
1946 source value]
1947 --with-version-security Set version 'SECURITY' field (third number) [current
1948 source value]
1949 --with-version-patch Set version 'PATCH' field (fourth number) [not
1950 specified]
1951 --with-boot-jdk path to Boot JDK (used to bootstrap build) [probed]
1952 --with-add-source-root for each and every source directory, look in this
1953 additional source root for the same directory; if it
1954 exists and have files in it, include it in the build
1955 --with-override-source-root
1956 for each and every source directory, look in this
1957 override source root for the same directory; if it
1958 exists, use that directory instead and ignore the
1959 directory in the original source root
1960 --with-adds-and-overrides
1961 use the subdirs 'adds' and 'overrides' in the
1962 specified directory as add-source-root and
1963 override-source-root
1964 --with-override-langtools
1965 use this langtools dir for the build
1966 --with-override-corba use this corba dir for the build
1967 --with-override-jaxp use this jaxp dir for the build
1968 --with-override-jaxws use this jaxws dir for the build
1969 --with-override-hotspot use this hotspot dir for the build
1970 --with-override-nashorn use this nashorn dir for the build
1971 --with-override-jdk use this jdk dir for the build
1972 --with-import-hotspot import hotspot binaries from this jdk image or
1973 hotspot build dist dir instead of building from
1974 source
1975 --with-toolchain-type the toolchain type (or family) to use, use '--help'
1976 to show possible values [platform dependent]
1977 --with-toolchain-version
1978 the version of the toolchain to look for, use
1979 '--help' to show possible values [platform
1980 dependent]
1981 --with-jtreg Regression Test Harness [probed]
1982 --with-extra-cflags extra flags to be used when compiling jdk c-files
1983 --with-extra-cxxflags extra flags to be used when compiling jdk c++-files
1984 --with-extra-ldflags extra flags to be used when linking jdk
1985 --with-x use the X Window System
1986 --with-cups specify prefix directory for the cups package
1987 (expecting the headers under PATH/include)
1988 --with-cups-include specify directory for the cups include files
1989 --with-freetype specify prefix directory for the freetype package
1990 (expecting the libraries under PATH/lib and the
1991 headers under PATH/include)
1992 --with-freetype-include specify directory for the freetype include files
1993 --with-freetype-lib specify directory for the freetype library
1994 --with-freetype-src specify directory with freetype sources to
1995 automatically build the library (experimental,
1996 Windows-only)
1997 --with-alsa specify prefix directory for the alsa package
1998 (expecting the libraries under PATH/lib and the
1999 headers under PATH/include)
2000 --with-alsa-include specify directory for the alsa include files
2001 --with-alsa-lib specify directory for the alsa library
2002 --with-libjpeg use libjpeg from build system or OpenJDK source
2003 (system, bundled) [bundled]
2004 --with-giflib use giflib from build system or OpenJDK source
2005 (system, bundled) [bundled]
2006 --with-lcms use lcms2 from build system or OpenJDK source
2007 (system, bundled) [bundled]
2008 --with-libpng use libpng from build system or OpenJDK source
2009 (system, bundled) [bundled]
2010 --with-zlib use zlib from build system or OpenJDK source
2011 (system, bundled) [bundled]
2012 --with-stdc++lib=<static>,<dynamic>,<default>
2013 force linking of the C++ runtime on Linux to either
2014 static or dynamic, default is static with dynamic as
2015 fallback
2016 --with-msvcr-dll path to microsoft C runtime dll (msvcr*.dll)
2017 (Windows only) [probed]
2018 --with-msvcp-dll path to microsoft C++ runtime dll (msvcp*.dll)
2019 (Windows only) [probed]
2020 --with-dxsdk Deprecated. Option is kept for backwards
2021 compatibility and is ignored
2022 --with-dxsdk-lib Deprecated. Option is kept for backwards
2023 compatibility and is ignored
2024 --with-dxsdk-include Deprecated. Option is kept for backwards
2025 compatibility and is ignored
2026 --with-num-cores number of cores in the build system, e.g.
2027 --with-num-cores=8 [probed]
2028 --with-memory-size memory (in MB) available in the build system, e.g.
2029 --with-memory-size=1024 [probed]
2030 --with-jobs number of parallel jobs to let make run [calculated
2031 based on cores and memory]
2032 --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2033 invocations of boot JDK, overriding the default
2034 values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2035 -enableassertions"
2036 --with-sjavac-server-java
2037 use this java binary for running the sjavac
2038 background server [Boot JDK java]
2039 --with-ccache-dir where to store ccache files [~/.ccache]
2040
2041 Some influential environment variables:
2042 BASENAME Override default value for BASENAME
2043 BASH Override default value for BASH
2044 CAT Override default value for CAT
2045 CHMOD Override default value for CHMOD
2046 CMP Override default value for CMP
2047 COMM Override default value for COMM
2048 CP Override default value for CP
2049 CUT Override default value for CUT
2050 DATE Override default value for DATE
2051 DIFF Override default value for DIFF
2052 DIRNAME Override default value for DIRNAME
2053 ECHO Override default value for ECHO
2054 EXPR Override default value for EXPR
2055 FILE Override default value for FILE
2056 FIND Override default value for FIND
2057 HEAD Override default value for HEAD
2058 LN Override default value for LN
2059 LS Override default value for LS
2060 MKDIR Override default value for MKDIR
2061 MKTEMP Override default value for MKTEMP
2062 MV Override default value for MV
2063 NAWK Override default value for NAWK
2064 PRINTF Override default value for PRINTF
2065 RM Override default value for RM
2066 SH Override default value for SH
2067 SORT Override default value for SORT
2068 TAIL Override default value for TAIL
2069 TAR Override default value for TAR
2070 TEE Override default value for TEE
2071 TOUCH Override default value for TOUCH
2072 TR Override default value for TR
2073 UNAME Override default value for UNAME
2074 UNIQ Override default value for UNIQ
2075 WC Override default value for WC
2076 WHICH Override default value for WHICH
2077 XARGS Override default value for XARGS
2078 AWK Override default value for AWK
2079 GREP Override default value for GREP
2080 EGREP Override default value for EGREP
2081 FGREP Override default value for FGREP
2082 SED Override default value for SED
2083 CYGPATH Override default value for CYGPATH
2084 READLINK Override default value for READLINK
2085 DF Override default value for DF
2086 SETFILE Override default value for SETFILE
2087 CPIO Override default value for CPIO
2088 UNZIP Override default value for UNZIP
2089 ZIP Override default value for ZIP
2090 LDD Override default value for LDD
2091 OTOOL Override default value for OTOOL
2092 READELF Override default value for READELF
2093 HG Override default value for HG
2094 STAT Override default value for STAT
2095 TIME Override default value for TIME
2096 DSYMUTIL Override default value for DSYMUTIL
2097 XATTR Override default value for XATTR
2098 CODESIGN Override default value for CODESIGN
2099 PKG_CONFIG path to pkg-config utility
2100 JAVA Override default value for JAVA
2101 JAVAC Override default value for JAVAC
2102 JAVAH Override default value for JAVAH
2103 JAR Override default value for JAR
2104 JARSIGNER Override default value for JARSIGNER
2105 CC C compiler command
2106 CFLAGS C compiler flags
2107 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2108 nonstandard directory <lib dir>
2109 LIBS libraries to pass to the linker, e.g. -l<library>
2110 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2111 you have headers in a nonstandard directory <include dir>
2112 CXX C++ compiler command
2113 CXXFLAGS C++ compiler flags
2114 CPP C preprocessor
2115 CXXCPP C++ preprocessor
2116 AS Override default value for AS
2117 AR Override default value for AR
2118 LIPO Override default value for LIPO
2119 STRIP Override default value for STRIP
2120 NM Override default value for NM
2121 GNM Override default value for GNM
2122 OBJCOPY Override default value for OBJCOPY
2123 OBJDUMP Override default value for OBJDUMP
2124 BUILD_CC Override default value for BUILD_CC
2125 BUILD_CXX Override default value for BUILD_CXX
2126 BUILD_LD Override default value for BUILD_LD
2127 JTREGEXE Override default value for JTREGEXE
2128 XMKMF Path to xmkmf, Makefile generator for X Window System
2129 FREETYPE_CFLAGS
2130 C compiler flags for FREETYPE, overriding pkg-config
2131 FREETYPE_LIBS
2132 linker flags for FREETYPE, overriding pkg-config
2133 ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2134 ALSA_LIBS linker flags for ALSA, overriding pkg-config
2135 LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2136 LCMS_LIBS linker flags for LCMS, overriding pkg-config
2137 PNG_CFLAGS C compiler flags for PNG, overriding pkg-config
2138 PNG_LIBS linker flags for PNG, overriding pkg-config
2139 LIBFFI_CFLAGS
2140 C compiler flags for LIBFFI, overriding pkg-config
2141 LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2142 CCACHE Override default value for CCACHE
2143
2144 Use these variables to override the choices made by `configure' or to help
2145 it to find libraries and programs with nonstandard names/locations.
2146
2147 Report bugs to <build-dev@openjdk.java.net>.
2148 OpenJDK home page: <http://openjdk.java.net>.
2149 _ACEOF
2150 ac_status=$?
2151 fi
2152
2153 if test "$ac_init_help" = "recursive"; then
2154 # If there are subdirs, report their specific --help.
2155 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2156 test -d "$ac_dir" ||
2157 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2158 continue
2159 ac_builddir=.
2160
2161 case "$ac_dir" in
2162 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2163 *)
2164 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2165 # A ".." for each directory in $ac_dir_suffix.
2166 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2167 case $ac_top_builddir_sub in
2168 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2169 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2170 esac ;;
2171 esac
2172 ac_abs_top_builddir=$ac_pwd
2173 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2174 # for backward compatibility:
2175 ac_top_builddir=$ac_top_build_prefix
2176
2177 case $srcdir in
2178 .) # We are building in place.
2179 ac_srcdir=.
2180 ac_top_srcdir=$ac_top_builddir_sub
2181 ac_abs_top_srcdir=$ac_pwd ;;
2182 [\\/]* | ?:[\\/]* ) # Absolute name.
2183 ac_srcdir=$srcdir$ac_dir_suffix;
2184 ac_top_srcdir=$srcdir
2185 ac_abs_top_srcdir=$srcdir ;;
2186 *) # Relative name.
2187 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2188 ac_top_srcdir=$ac_top_build_prefix$srcdir
2189 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2190 esac
2191 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2192
2193 cd "$ac_dir" || { ac_status=$?; continue; }
2194 # Check for guested configure.
2195 if test -f "$ac_srcdir/configure.gnu"; then
2196 echo &&
2197 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2198 elif test -f "$ac_srcdir/configure"; then
2199 echo &&
2200 $SHELL "$ac_srcdir/configure" --help=recursive
2201 else
2202 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2203 fi || ac_status=$?
2204 cd "$ac_pwd" || { ac_status=$?; break; }
2205 done
2206 fi
2207
2208 test -n "$ac_init_help" && exit $ac_status
2209 if $ac_init_version; then
2210 cat <<\_ACEOF
2211 OpenJDK configure jdk9
2212 generated by GNU Autoconf 2.69
2213
2214 Copyright (C) 2012 Free Software Foundation, Inc.
2215 This configure script is free software; the Free Software Foundation
2216 gives unlimited permission to copy, distribute and modify it.
2217 _ACEOF
2218 exit
2219 fi
2220
2221 ## ------------------------ ##
2222 ## Autoconf initialization. ##
2223 ## ------------------------ ##
2224
2225 # ac_fn_c_try_compile LINENO
2226 # --------------------------
2227 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2228 ac_fn_c_try_compile ()
2229 {
2230 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2231 rm -f conftest.$ac_objext
2232 if { { ac_try="$ac_compile"
2233 case "(($ac_try" in
2234 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2235 *) ac_try_echo=$ac_try;;
2236 esac
2237 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2238 $as_echo "$ac_try_echo"; } >&5
2239 (eval "$ac_compile") 2>conftest.err
2240 ac_status=$?
2241 if test -s conftest.err; then
2242 grep -v '^ *+' conftest.err >conftest.er1
2243 cat conftest.er1 >&5
2244 mv -f conftest.er1 conftest.err
2245 fi
2246 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2247 test $ac_status = 0; } && {
2248 test -z "$ac_c_werror_flag" ||
2249 test ! -s conftest.err
2250 } && test -s conftest.$ac_objext; then :
2251 ac_retval=0
2252 else
2253 $as_echo "$as_me: failed program was:" >&5
2254 sed 's/^/| /' conftest.$ac_ext >&5
2255
2256 ac_retval=1
2257 fi
2258 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2259 as_fn_set_status $ac_retval
2260
2261 } # ac_fn_c_try_compile
2262
2263 # ac_fn_cxx_try_compile LINENO
2264 # ----------------------------
2265 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2266 ac_fn_cxx_try_compile ()
2267 {
2268 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2269 rm -f conftest.$ac_objext
2270 if { { ac_try="$ac_compile"
2271 case "(($ac_try" in
2272 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2273 *) ac_try_echo=$ac_try;;
2274 esac
2275 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2276 $as_echo "$ac_try_echo"; } >&5
2277 (eval "$ac_compile") 2>conftest.err
2278 ac_status=$?
2279 if test -s conftest.err; then
2280 grep -v '^ *+' conftest.err >conftest.er1
2281 cat conftest.er1 >&5
2282 mv -f conftest.er1 conftest.err
2283 fi
2284 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2285 test $ac_status = 0; } && {
2286 test -z "$ac_cxx_werror_flag" ||
2287 test ! -s conftest.err
2288 } && test -s conftest.$ac_objext; then :
2289 ac_retval=0
2290 else
2291 $as_echo "$as_me: failed program was:" >&5
2292 sed 's/^/| /' conftest.$ac_ext >&5
2293
2294 ac_retval=1
2295 fi
2296 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2297 as_fn_set_status $ac_retval
2298
2299 } # ac_fn_cxx_try_compile
2300
2301 # ac_fn_c_try_cpp LINENO
2302 # ----------------------
2303 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2304 ac_fn_c_try_cpp ()
2305 {
2306 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2307 if { { ac_try="$ac_cpp conftest.$ac_ext"
2308 case "(($ac_try" in
2309 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2310 *) ac_try_echo=$ac_try;;
2311 esac
2312 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2313 $as_echo "$ac_try_echo"; } >&5
2314 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2315 ac_status=$?
2316 if test -s conftest.err; then
2317 grep -v '^ *+' conftest.err >conftest.er1
2318 cat conftest.er1 >&5
2319 mv -f conftest.er1 conftest.err
2320 fi
2321 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2322 test $ac_status = 0; } > conftest.i && {
2323 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2324 test ! -s conftest.err
2325 }; then :
2326 ac_retval=0
2327 else
2328 $as_echo "$as_me: failed program was:" >&5
2329 sed 's/^/| /' conftest.$ac_ext >&5
2330
2331 ac_retval=1
2332 fi
2333 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2334 as_fn_set_status $ac_retval
2335
2336 } # ac_fn_c_try_cpp
2337
2338 # ac_fn_cxx_try_cpp LINENO
2339 # ------------------------
2340 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2341 ac_fn_cxx_try_cpp ()
2342 {
2343 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2344 if { { ac_try="$ac_cpp conftest.$ac_ext"
2345 case "(($ac_try" in
2346 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2347 *) ac_try_echo=$ac_try;;
2348 esac
2349 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2350 $as_echo "$ac_try_echo"; } >&5
2351 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2352 ac_status=$?
2353 if test -s conftest.err; then
2354 grep -v '^ *+' conftest.err >conftest.er1
2355 cat conftest.er1 >&5
2356 mv -f conftest.er1 conftest.err
2357 fi
2358 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2359 test $ac_status = 0; } > conftest.i && {
2360 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2361 test ! -s conftest.err
2362 }; then :
2363 ac_retval=0
2364 else
2365 $as_echo "$as_me: failed program was:" >&5
2366 sed 's/^/| /' conftest.$ac_ext >&5
2367
2368 ac_retval=1
2369 fi
2370 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2371 as_fn_set_status $ac_retval
2372
2373 } # ac_fn_cxx_try_cpp
2374
2375 # ac_fn_c_try_link LINENO
2376 # -----------------------
2377 # Try to link conftest.$ac_ext, and return whether this succeeded.
2378 ac_fn_c_try_link ()
2379 {
2380 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2381 rm -f conftest.$ac_objext conftest$ac_exeext
2382 if { { ac_try="$ac_link"
2383 case "(($ac_try" in
2384 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2385 *) ac_try_echo=$ac_try;;
2386 esac
2387 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2388 $as_echo "$ac_try_echo"; } >&5
2389 (eval "$ac_link") 2>conftest.err
2390 ac_status=$?
2391 if test -s conftest.err; then
2392 grep -v '^ *+' conftest.err >conftest.er1
2393 cat conftest.er1 >&5
2394 mv -f conftest.er1 conftest.err
2395 fi
2396 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2397 test $ac_status = 0; } && {
2398 test -z "$ac_c_werror_flag" ||
2399 test ! -s conftest.err
2400 } && test -s conftest$ac_exeext && {
2401 test "$cross_compiling" = yes ||
2402 test -x conftest$ac_exeext
2403 }; then :
2404 ac_retval=0
2405 else
2406 $as_echo "$as_me: failed program was:" >&5
2407 sed 's/^/| /' conftest.$ac_ext >&5
2408
2409 ac_retval=1
2410 fi
2411 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2412 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2413 # interfere with the next link command; also delete a directory that is
2414 # left behind by Apple's compiler. We do this before executing the actions.
2415 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2416 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2417 as_fn_set_status $ac_retval
2418
2419 } # ac_fn_c_try_link
2420
2421 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2422 # ---------------------------------------------------------
2423 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2424 # the include files in INCLUDES and setting the cache variable VAR
2425 # accordingly.
2426 ac_fn_cxx_check_header_mongrel ()
2427 {
2428 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2429 if eval \${$3+:} false; then :
2430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2431 $as_echo_n "checking for $2... " >&6; }
2432 if eval \${$3+:} false; then :
2433 $as_echo_n "(cached) " >&6
2434 fi
2435 eval ac_res=\$$3
2436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2437 $as_echo "$ac_res" >&6; }
2438 else
2439 # Is the header compilable?
2440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2441 $as_echo_n "checking $2 usability... " >&6; }
2442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2443 /* end confdefs.h. */
2444 $4
2445 #include <$2>
2446 _ACEOF
2447 if ac_fn_cxx_try_compile "$LINENO"; then :
2448 ac_header_compiler=yes
2449 else
2450 ac_header_compiler=no
2451 fi
2452 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2454 $as_echo "$ac_header_compiler" >&6; }
2455
2456 # Is the header present?
2457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2458 $as_echo_n "checking $2 presence... " >&6; }
2459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2460 /* end confdefs.h. */
2461 #include <$2>
2462 _ACEOF
2463 if ac_fn_cxx_try_cpp "$LINENO"; then :
2464 ac_header_preproc=yes
2465 else
2466 ac_header_preproc=no
2467 fi
2468 rm -f conftest.err conftest.i conftest.$ac_ext
2469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2470 $as_echo "$ac_header_preproc" >&6; }
2471
2472 # So? What about this header?
2473 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2474 yes:no: )
2475 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2476 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2477 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2478 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2479 ;;
2480 no:yes:* )
2481 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2482 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2483 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2484 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2485 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2486 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2487 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2488 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2489 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2490 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2491 ( $as_echo "## ----------------------------------------- ##
2492 ## Report this to build-dev@openjdk.java.net ##
2493 ## ----------------------------------------- ##"
2494 ) | sed "s/^/$as_me: WARNING: /" >&2
2495 ;;
2496 esac
2497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2498 $as_echo_n "checking for $2... " >&6; }
2499 if eval \${$3+:} false; then :
2500 $as_echo_n "(cached) " >&6
2501 else
2502 eval "$3=\$ac_header_compiler"
2503 fi
2504 eval ac_res=\$$3
2505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2506 $as_echo "$ac_res" >&6; }
2507 fi
2508 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2509
2510 } # ac_fn_cxx_check_header_mongrel
2511
2512 # ac_fn_cxx_try_run LINENO
2513 # ------------------------
2514 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2515 # that executables *can* be run.
2516 ac_fn_cxx_try_run ()
2517 {
2518 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2519 if { { ac_try="$ac_link"
2520 case "(($ac_try" in
2521 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2522 *) ac_try_echo=$ac_try;;
2523 esac
2524 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2525 $as_echo "$ac_try_echo"; } >&5
2526 (eval "$ac_link") 2>&5
2527 ac_status=$?
2528 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2529 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2530 { { case "(($ac_try" in
2531 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2532 *) ac_try_echo=$ac_try;;
2533 esac
2534 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2535 $as_echo "$ac_try_echo"; } >&5
2536 (eval "$ac_try") 2>&5
2537 ac_status=$?
2538 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2539 test $ac_status = 0; }; }; then :
2540 ac_retval=0
2541 else
2542 $as_echo "$as_me: program exited with status $ac_status" >&5
2543 $as_echo "$as_me: failed program was:" >&5
2544 sed 's/^/| /' conftest.$ac_ext >&5
2545
2546 ac_retval=$ac_status
2547 fi
2548 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2549 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2550 as_fn_set_status $ac_retval
2551
2552 } # ac_fn_cxx_try_run
2553
2554 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2555 # ---------------------------------------------------------
2556 # Tests whether HEADER exists and can be compiled using the include files in
2557 # INCLUDES, setting the cache variable VAR accordingly.
2558 ac_fn_cxx_check_header_compile ()
2559 {
2560 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2562 $as_echo_n "checking for $2... " >&6; }
2563 if eval \${$3+:} false; then :
2564 $as_echo_n "(cached) " >&6
2565 else
2566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2567 /* end confdefs.h. */
2568 $4
2569 #include <$2>
2570 _ACEOF
2571 if ac_fn_cxx_try_compile "$LINENO"; then :
2572 eval "$3=yes"
2573 else
2574 eval "$3=no"
2575 fi
2576 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2577 fi
2578 eval ac_res=\$$3
2579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2580 $as_echo "$ac_res" >&6; }
2581 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2582
2583 } # ac_fn_cxx_check_header_compile
2584
2585 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2586 # ----------------------------------------------
2587 # Tries to find the compile-time value of EXPR in a program that includes
2588 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2589 # computed
2590 ac_fn_cxx_compute_int ()
2591 {
2592 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2593 if test "$cross_compiling" = yes; then
2594 # Depending upon the size, compute the lo and hi bounds.
2595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2596 /* end confdefs.h. */
2597 $4
2598 int
2599 main ()
2600 {
2601 static int test_array [1 - 2 * !(($2) >= 0)];
2602 test_array [0] = 0;
2603 return test_array [0];
2604
2605 ;
2606 return 0;
2607 }
2608 _ACEOF
2609 if ac_fn_cxx_try_compile "$LINENO"; then :
2610 ac_lo=0 ac_mid=0
2611 while :; do
2612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2613 /* end confdefs.h. */
2614 $4
2615 int
2616 main ()
2617 {
2618 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2619 test_array [0] = 0;
2620 return test_array [0];
2621
2622 ;
2623 return 0;
2624 }
2625 _ACEOF
2626 if ac_fn_cxx_try_compile "$LINENO"; then :
2627 ac_hi=$ac_mid; break
2628 else
2629 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2630 if test $ac_lo -le $ac_mid; then
2631 ac_lo= ac_hi=
2632 break
2633 fi
2634 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2635 fi
2636 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2637 done
2638 else
2639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2640 /* end confdefs.h. */
2641 $4
2642 int
2643 main ()
2644 {
2645 static int test_array [1 - 2 * !(($2) < 0)];
2646 test_array [0] = 0;
2647 return test_array [0];
2648
2649 ;
2650 return 0;
2651 }
2652 _ACEOF
2653 if ac_fn_cxx_try_compile "$LINENO"; then :
2654 ac_hi=-1 ac_mid=-1
2655 while :; do
2656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2657 /* end confdefs.h. */
2658 $4
2659 int
2660 main ()
2661 {
2662 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2663 test_array [0] = 0;
2664 return test_array [0];
2665
2666 ;
2667 return 0;
2668 }
2669 _ACEOF
2670 if ac_fn_cxx_try_compile "$LINENO"; then :
2671 ac_lo=$ac_mid; break
2672 else
2673 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2674 if test $ac_mid -le $ac_hi; then
2675 ac_lo= ac_hi=
2676 break
2677 fi
2678 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2679 fi
2680 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2681 done
2682 else
2683 ac_lo= ac_hi=
2684 fi
2685 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2686 fi
2687 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2688 # Binary search between lo and hi bounds.
2689 while test "x$ac_lo" != "x$ac_hi"; do
2690 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2692 /* end confdefs.h. */
2693 $4
2694 int
2695 main ()
2696 {
2697 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2698 test_array [0] = 0;
2699 return test_array [0];
2700
2701 ;
2702 return 0;
2703 }
2704 _ACEOF
2705 if ac_fn_cxx_try_compile "$LINENO"; then :
2706 ac_hi=$ac_mid
2707 else
2708 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2709 fi
2710 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2711 done
2712 case $ac_lo in #((
2713 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2714 '') ac_retval=1 ;;
2715 esac
2716 else
2717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2718 /* end confdefs.h. */
2719 $4
2720 static long int longval () { return $2; }
2721 static unsigned long int ulongval () { return $2; }
2722 #include <stdio.h>
2723 #include <stdlib.h>
2724 int
2725 main ()
2726 {
2727
2728 FILE *f = fopen ("conftest.val", "w");
2729 if (! f)
2730 return 1;
2731 if (($2) < 0)
2732 {
2733 long int i = longval ();
2734 if (i != ($2))
2735 return 1;
2736 fprintf (f, "%ld", i);
2737 }
2738 else
2739 {
2740 unsigned long int i = ulongval ();
2741 if (i != ($2))
2742 return 1;
2743 fprintf (f, "%lu", i);
2744 }
2745 /* Do not output a trailing newline, as this causes \r\n confusion
2746 on some platforms. */
2747 return ferror (f) || fclose (f) != 0;
2748
2749 ;
2750 return 0;
2751 }
2752 _ACEOF
2753 if ac_fn_cxx_try_run "$LINENO"; then :
2754 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2755 else
2756 ac_retval=1
2757 fi
2758 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2759 conftest.$ac_objext conftest.beam conftest.$ac_ext
2760 rm -f conftest.val
2761
2762 fi
2763 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2764 as_fn_set_status $ac_retval
2765
2766 } # ac_fn_cxx_compute_int
2767
2768 # ac_fn_cxx_try_link LINENO
2769 # -------------------------
2770 # Try to link conftest.$ac_ext, and return whether this succeeded.
2771 ac_fn_cxx_try_link ()
2772 {
2773 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2774 rm -f conftest.$ac_objext conftest$ac_exeext
2775 if { { ac_try="$ac_link"
2776 case "(($ac_try" in
2777 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2778 *) ac_try_echo=$ac_try;;
2779 esac
2780 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2781 $as_echo "$ac_try_echo"; } >&5
2782 (eval "$ac_link") 2>conftest.err
2783 ac_status=$?
2784 if test -s conftest.err; then
2785 grep -v '^ *+' conftest.err >conftest.er1
2786 cat conftest.er1 >&5
2787 mv -f conftest.er1 conftest.err
2788 fi
2789 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2790 test $ac_status = 0; } && {
2791 test -z "$ac_cxx_werror_flag" ||
2792 test ! -s conftest.err
2793 } && test -s conftest$ac_exeext && {
2794 test "$cross_compiling" = yes ||
2795 test -x conftest$ac_exeext
2796 }; then :
2797 ac_retval=0
2798 else
2799 $as_echo "$as_me: failed program was:" >&5
2800 sed 's/^/| /' conftest.$ac_ext >&5
2801
2802 ac_retval=1
2803 fi
2804 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2805 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2806 # interfere with the next link command; also delete a directory that is
2807 # left behind by Apple's compiler. We do this before executing the actions.
2808 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2809 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2810 as_fn_set_status $ac_retval
2811
2812 } # ac_fn_cxx_try_link
2813
2814 # ac_fn_cxx_check_func LINENO FUNC VAR
2815 # ------------------------------------
2816 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2817 ac_fn_cxx_check_func ()
2818 {
2819 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2821 $as_echo_n "checking for $2... " >&6; }
2822 if eval \${$3+:} false; then :
2823 $as_echo_n "(cached) " >&6
2824 else
2825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2826 /* end confdefs.h. */
2827 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2828 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2829 #define $2 innocuous_$2
2830
2831 /* System header to define __stub macros and hopefully few prototypes,
2832 which can conflict with char $2 (); below.
2833 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2834 <limits.h> exists even on freestanding compilers. */
2835
2836 #ifdef __STDC__
2837 # include <limits.h>
2838 #else
2839 # include <assert.h>
2840 #endif
2841
2842 #undef $2
2843
2844 /* Override any GCC internal prototype to avoid an error.
2845 Use char because int might match the return type of a GCC
2846 builtin and then its argument prototype would still apply. */
2847 #ifdef __cplusplus
2848 extern "C"
2849 #endif
2850 char $2 ();
2851 /* The GNU C library defines this for functions which it implements
2852 to always fail with ENOSYS. Some functions are actually named
2853 something starting with __ and the normal name is an alias. */
2854 #if defined __stub_$2 || defined __stub___$2
2855 choke me
2856 #endif
2857
2858 int
2859 main ()
2860 {
2861 return $2 ();
2862 ;
2863 return 0;
2864 }
2865 _ACEOF
2866 if ac_fn_cxx_try_link "$LINENO"; then :
2867 eval "$3=yes"
2868 else
2869 eval "$3=no"
2870 fi
2871 rm -f core conftest.err conftest.$ac_objext \
2872 conftest$ac_exeext conftest.$ac_ext
2873 fi
2874 eval ac_res=\$$3
2875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2876 $as_echo "$ac_res" >&6; }
2877 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2878
2879 } # ac_fn_cxx_check_func
2880
2881 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2882 # -------------------------------------------------------
2883 # Tests whether HEADER exists and can be compiled using the include files in
2884 # INCLUDES, setting the cache variable VAR accordingly.
2885 ac_fn_c_check_header_compile ()
2886 {
2887 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2889 $as_echo_n "checking for $2... " >&6; }
2890 if eval \${$3+:} false; then :
2891 $as_echo_n "(cached) " >&6
2892 else
2893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2894 /* end confdefs.h. */
2895 $4
2896 #include <$2>
2897 _ACEOF
2898 if ac_fn_c_try_compile "$LINENO"; then :
2899 eval "$3=yes"
2900 else
2901 eval "$3=no"
2902 fi
2903 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2904 fi
2905 eval ac_res=\$$3
2906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2907 $as_echo "$ac_res" >&6; }
2908 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2909
2910 } # ac_fn_c_check_header_compile
2911 cat >config.log <<_ACEOF
2912 This file contains any messages produced by compilers while
2913 running configure, to aid debugging if configure makes a mistake.
2914
2915 It was created by OpenJDK $as_me jdk9, which was
2916 generated by GNU Autoconf 2.69. Invocation command line was
2917
2918 $ $0 $@
2919
2920 _ACEOF
2921 exec 5>>config.log
2922 {
2923 cat <<_ASUNAME
2924 ## --------- ##
2925 ## Platform. ##
2926 ## --------- ##
2927
2928 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2929 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2930 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2931 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2932 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2933
2934 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2935 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2936
2937 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2938 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2939 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2940 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2941 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2942 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2943 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2944
2945 _ASUNAME
2946
2947 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2948 for as_dir in $PATH
2949 do
2950 IFS=$as_save_IFS
2951 test -z "$as_dir" && as_dir=.
2952 $as_echo "PATH: $as_dir"
2953 done
2954 IFS=$as_save_IFS
2955
2956 } >&5
2957
2958 cat >&5 <<_ACEOF
2959
2960
2961 ## ----------- ##
2962 ## Core tests. ##
2963 ## ----------- ##
2964
2965 _ACEOF
2966
2967
2968 # Keep a trace of the command line.
2969 # Strip out --no-create and --no-recursion so they do not pile up.
2970 # Strip out --silent because we don't want to record it for future runs.
2971 # Also quote any args containing shell meta-characters.
2972 # Make two passes to allow for proper duplicate-argument suppression.
2973 ac_configure_args=
2974 ac_configure_args0=
2975 ac_configure_args1=
2976 ac_must_keep_next=false
2977 for ac_pass in 1 2
2978 do
2979 for ac_arg
2980 do
2981 case $ac_arg in
2982 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2983 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2984 | -silent | --silent | --silen | --sile | --sil)
2985 continue ;;
2986 *\'*)
2987 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2988 esac
2989 case $ac_pass in
2990 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2991 2)
2992 as_fn_append ac_configure_args1 " '$ac_arg'"
2993 if test $ac_must_keep_next = true; then
2994 ac_must_keep_next=false # Got value, back to normal.
2995 else
2996 case $ac_arg in
2997 *=* | --config-cache | -C | -disable-* | --disable-* \
2998 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2999 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3000 | -with-* | --with-* | -without-* | --without-* | --x)
3001 case "$ac_configure_args0 " in
3002 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3003 esac
3004 ;;
3005 -* ) ac_must_keep_next=true ;;
3006 esac
3007 fi
3008 as_fn_append ac_configure_args " '$ac_arg'"
3009 ;;
3010 esac
3011 done
3012 done
3013 { ac_configure_args0=; unset ac_configure_args0;}
3014 { ac_configure_args1=; unset ac_configure_args1;}
3015
3016 # When interrupted or exit'd, cleanup temporary files, and complete
3017 # config.log. We remove comments because anyway the quotes in there
3018 # would cause problems or look ugly.
3019 # WARNING: Use '\'' to represent an apostrophe within the trap.
3020 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3021 trap 'exit_status=$?
3022 # Save into config.log some information that might help in debugging.
3023 {
3024 echo
3025
3026 $as_echo "## ---------------- ##
3027 ## Cache variables. ##
3028 ## ---------------- ##"
3029 echo
3030 # The following way of writing the cache mishandles newlines in values,
3031 (
3032 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3033 eval ac_val=\$$ac_var
3034 case $ac_val in #(
3035 *${as_nl}*)
3036 case $ac_var in #(
3037 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3038 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3039 esac
3040 case $ac_var in #(
3041 _ | IFS | as_nl) ;; #(
3042 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3043 *) { eval $ac_var=; unset $ac_var;} ;;
3044 esac ;;
3045 esac
3046 done
3047 (set) 2>&1 |
3048 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3049 *${as_nl}ac_space=\ *)
3050 sed -n \
3051 "s/'\''/'\''\\\\'\'''\''/g;
3052 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3053 ;; #(
3054 *)
3055 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3056 ;;
3057 esac |
3058 sort
3059 )
3060 echo
3061
3062 $as_echo "## ----------------- ##
3063 ## Output variables. ##
3064 ## ----------------- ##"
3065 echo
3066 for ac_var in $ac_subst_vars
3067 do
3068 eval ac_val=\$$ac_var
3069 case $ac_val in
3070 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3071 esac
3072 $as_echo "$ac_var='\''$ac_val'\''"
3073 done | sort
3074 echo
3075
3076 if test -n "$ac_subst_files"; then
3077 $as_echo "## ------------------- ##
3078 ## File substitutions. ##
3079 ## ------------------- ##"
3080 echo
3081 for ac_var in $ac_subst_files
3082 do
3083 eval ac_val=\$$ac_var
3084 case $ac_val in
3085 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3086 esac
3087 $as_echo "$ac_var='\''$ac_val'\''"
3088 done | sort
3089 echo
3090 fi
3091
3092 if test -s confdefs.h; then
3093 $as_echo "## ----------- ##
3094 ## confdefs.h. ##
3095 ## ----------- ##"
3096 echo
3097 cat confdefs.h
3098 echo
3099 fi
3100 test "$ac_signal" != 0 &&
3101 $as_echo "$as_me: caught signal $ac_signal"
3102 $as_echo "$as_me: exit $exit_status"
3103 } >&5
3104 rm -f core *.core core.conftest.* &&
3105 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3106 exit $exit_status
3107 ' 0
3108 for ac_signal in 1 2 13 15; do
3109 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3110 done
3111 ac_signal=0
3112
3113 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3114 rm -f -r conftest* confdefs.h
3115
3116 $as_echo "/* confdefs.h */" > confdefs.h
3117
3118 # Predefined preprocessor variables.
3119
3120 cat >>confdefs.h <<_ACEOF
3121 #define PACKAGE_NAME "$PACKAGE_NAME"
3122 _ACEOF
3123
3124 cat >>confdefs.h <<_ACEOF
3125 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3126 _ACEOF
3127
3128 cat >>confdefs.h <<_ACEOF
3129 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3130 _ACEOF
3131
3132 cat >>confdefs.h <<_ACEOF
3133 #define PACKAGE_STRING "$PACKAGE_STRING"
3134 _ACEOF
3135
3136 cat >>confdefs.h <<_ACEOF
3137 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3138 _ACEOF
3139
3140 cat >>confdefs.h <<_ACEOF
3141 #define PACKAGE_URL "$PACKAGE_URL"
3142 _ACEOF
3143
3144
3145 # Let the site file select an alternate cache file if it wants to.
3146 # Prefer an explicitly selected file to automatically selected ones.
3147 ac_site_file1=NONE
3148 ac_site_file2=NONE
3149 if test -n "$CONFIG_SITE"; then
3150 # We do not want a PATH search for config.site.
3151 case $CONFIG_SITE in #((
3152 -*) ac_site_file1=./$CONFIG_SITE;;
3153 */*) ac_site_file1=$CONFIG_SITE;;
3154 *) ac_site_file1=./$CONFIG_SITE;;
3155 esac
3156 elif test "x$prefix" != xNONE; then
3157 ac_site_file1=$prefix/share/config.site
3158 ac_site_file2=$prefix/etc/config.site
3159 else
3160 ac_site_file1=$ac_default_prefix/share/config.site
3161 ac_site_file2=$ac_default_prefix/etc/config.site
3162 fi
3163 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3164 do
3165 test "x$ac_site_file" = xNONE && continue
3166 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3167 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3168 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3169 sed 's/^/| /' "$ac_site_file" >&5
3170 . "$ac_site_file" \
3171 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3172 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3173 as_fn_error $? "failed to load site script $ac_site_file
3174 See \`config.log' for more details" "$LINENO" 5; }
3175 fi
3176 done
3177
3178 if test -r "$cache_file"; then
3179 # Some versions of bash will fail to source /dev/null (special files
3180 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3181 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3182 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3183 $as_echo "$as_me: loading cache $cache_file" >&6;}
3184 case $cache_file in
3185 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3186 *) . "./$cache_file";;
3187 esac
3188 fi
3189 else
3190 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3191 $as_echo "$as_me: creating cache $cache_file" >&6;}
3192 >$cache_file
3193 fi
3194
3195 # Check that the precious variables saved in the cache have kept the same
3196 # value.
3197 ac_cache_corrupted=false
3198 for ac_var in $ac_precious_vars; do
3199 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3200 eval ac_new_set=\$ac_env_${ac_var}_set
3201 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3202 eval ac_new_val=\$ac_env_${ac_var}_value
3203 case $ac_old_set,$ac_new_set in
3204 set,)
3205 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3206 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3207 ac_cache_corrupted=: ;;
3208 ,set)
3209 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3210 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3211 ac_cache_corrupted=: ;;
3212 ,);;
3213 *)
3214 if test "x$ac_old_val" != "x$ac_new_val"; then
3215 # differences in whitespace do not lead to failure.
3216 ac_old_val_w=`echo x $ac_old_val`
3217 ac_new_val_w=`echo x $ac_new_val`
3218 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3219 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3220 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3221 ac_cache_corrupted=:
3222 else
3223 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3224 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3225 eval $ac_var=\$ac_old_val
3226 fi
3227 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3228 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3229 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3230 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3231 fi;;
3232 esac
3233 # Pass precious variables to config.status.
3234 if test "$ac_new_set" = set; then
3235 case $ac_new_val in
3236 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3237 *) ac_arg=$ac_var=$ac_new_val ;;
3238 esac
3239 case " $ac_configure_args " in
3240 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3241 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3242 esac
3243 fi
3244 done
3245 if $ac_cache_corrupted; then
3246 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3247 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3248 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3249 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3250 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3251 fi
3252 ## -------------------- ##
3253 ## Main body of script. ##
3254 ## -------------------- ##
3255
3256 ac_ext=c
3257 ac_cpp='$CPP $CPPFLAGS'
3258 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3259 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3260 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3261
3262
3263
3264 ac_aux_dir=
3265 for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3266 if test -f "$ac_dir/install-sh"; then
3267 ac_aux_dir=$ac_dir
3268 ac_install_sh="$ac_aux_dir/install-sh -c"
3269 break
3270 elif test -f "$ac_dir/install.sh"; then
3271 ac_aux_dir=$ac_dir
3272 ac_install_sh="$ac_aux_dir/install.sh -c"
3273 break
3274 elif test -f "$ac_dir/shtool"; then
3275 ac_aux_dir=$ac_dir
3276 ac_install_sh="$ac_aux_dir/shtool install -c"
3277 break
3278 fi
3279 done
3280 if test -z "$ac_aux_dir"; then
3281 as_fn_error $? "cannot find install-sh, install.sh, or shtool in $TOPDIR/common/autoconf/build-aux \"$srcdir\"/$TOPDIR/common/autoconf/build-aux" "$LINENO" 5
3282 fi
3283
3284 # These three variables are undocumented and unsupported,
3285 # and are intended to be withdrawn in a future Autoconf release.
3286 # They can cause serious problems if a builder's source tree is in a directory
3287 # whose full name contains unusual characters.
3288 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3289 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3290 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
3291
3292
3293 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
3294
3295 #
3296 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3297 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3298 #
3299 # This code is free software; you can redistribute it and/or modify it
3300 # under the terms of the GNU General Public License version 2 only, as
3301 # published by the Free Software Foundation. Oracle designates this
3302 # particular file as subject to the "Classpath" exception as provided
3303 # by Oracle in the LICENSE file that accompanied this code.
3304 #
3305 # This code is distributed in the hope that it will be useful, but WITHOUT
3306 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3307 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
3308 # version 2 for more details (a copy is included in the LICENSE file that
3309 # accompanied this code).
3310 #
3311 # You should have received a copy of the GNU General Public License version
3312 # 2 along with this work; if not, write to the Free Software Foundation,
3313 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3314 #
3315 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3316 # or visit www.oracle.com if you need additional information or have any
3317 # questions.
3318 #
3319
3320 #
3321 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
3322 #
3323 # This program is free software; you can redistribute it and/or modify
3324 # it under the terms of the GNU General Public License as published by
3325 # the Free Software Foundation; either version 2 of the License, or
3326 # (at your option) any later version.
3327 #
3328 # This program is distributed in the hope that it will be useful, but
3329 # WITHOUT ANY WARRANTY; without even the implied warranty of
3330 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3331 # General Public License for more details.
3332 #
3333 # You should have received a copy of the GNU General Public License
3334 # along with this program; if not, write to the Free Software
3335 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3336 #
3337 # As a special exception to the GNU General Public License, if you
3338 # distribute this file as part of a program that contains a
3339 # configuration script generated by Autoconf, you may include it under
3340 # the same distribution terms that you use for the rest of that program.
3341
3342 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
3343 # ----------------------------------
3344 # PKG_PROG_PKG_CONFIG
3345
3346 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3347 #
3348 # Check to see whether a particular set of modules exists. Similar
3349 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
3350 #
3351 #
3352 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
3353 # this or PKG_CHECK_MODULES is called, or make sure to call
3354 # PKG_CHECK_EXISTS manually
3355 # --------------------------------------------------------------
3356
3357
3358
3359 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3360 # ---------------------------------------------
3361 # _PKG_CONFIG
3362
3363 # _PKG_SHORT_ERRORS_SUPPORTED
3364 # -----------------------------
3365 # _PKG_SHORT_ERRORS_SUPPORTED
3366
3367
3368 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3369 # [ACTION-IF-NOT-FOUND])
3370 #
3371 #
3372 # Note that if there is a possibility the first call to
3373 # PKG_CHECK_MODULES might not happen, you should be sure to include an
3374 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3375 #
3376 #
3377 # --------------------------------------------------------------
3378 # PKG_CHECK_MODULES
3379
3380
3381 # Include these first...
3382 #
3383 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3384 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3385 #
3386 # This code is free software; you can redistribute it and/or modify it
3387 # under the terms of the GNU General Public License version 2 only, as
3388 # published by the Free Software Foundation. Oracle designates this
3389 # particular file as subject to the "Classpath" exception as provided
3390 # by Oracle in the LICENSE file that accompanied this code.
3391 #
3392 # This code is distributed in the hope that it will be useful, but WITHOUT
3393 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3394 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
3395 # version 2 for more details (a copy is included in the LICENSE file that
3396 # accompanied this code).
3397 #
3398 # You should have received a copy of the GNU General Public License version
3399 # 2 along with this work; if not, write to the Free Software Foundation,
3400 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3401 #
3402 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3403 # or visit www.oracle.com if you need additional information or have any
3404 # questions.
3405 #
3406
3407 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3408 # If so, then append $1 to $2 \
3409 # Also set JVM_ARG_OK to true/false depending on outcome.
3410
3411
3412 # Appends a string to a path variable, only adding the : when needed.
3413
3414
3415 # Prepends a string to a path variable, only adding the : when needed.
3416
3417
3418 # This will make sure the given variable points to a full and proper
3419 # path. This means:
3420 # 1) There will be no spaces in the path. On unix platforms,
3421 # spaces in the path will result in an error. On Windows,
3422 # the path will be rewritten using short-style to be space-free.
3423 # 2) The path will be absolute, and it will be in unix-style (on
3424 # cygwin).
3425 # $1: The name of the variable to fix
3426
3427
3428 # This will make sure the given variable points to a executable
3429 # with a full and proper path. This means:
3430 # 1) There will be no spaces in the path. On unix platforms,
3431 # spaces in the path will result in an error. On Windows,
3432 # the path will be rewritten using short-style to be space-free.
3433 # 2) The path will be absolute, and it will be in unix-style (on
3434 # cygwin).
3435 # Any arguments given to the executable is preserved.
3436 # If the input variable does not have a directory specification, then
3437 # it need to be in the PATH.
3438 # $1: The name of the variable to fix
3439
3440
3441
3442
3443 # Register a --with argument but mark it as deprecated
3444 # $1: The name of the with argument to deprecate, not including --with-
3445
3446
3447 # Register a --enable argument but mark it as deprecated
3448 # $1: The name of the with argument to deprecate, not including --enable-
3449 # $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3450
3451
3452
3453
3454 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3455 # $1: variable to check
3456
3457
3458 # Check that there are no unprocessed overridden variables left.
3459 # If so, they are an incorrect argument and we will exit with an error.
3460
3461
3462 # Setup a tool for the given variable. If correctly specified by the user,
3463 # use that value, otherwise search for the tool using the supplied code snippet.
3464 # $1: variable to set
3465 # $2: code snippet to call to look for the tool
3466
3467
3468 # Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3469 # $1: variable to set
3470 # $2: executable name (or list of names) to look for
3471
3472
3473 # Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3474 # $1: variable to set
3475 # $2: executable name (or list of names) to look for
3476
3477
3478 # Like BASIC_PATH_PROGS but fails if no tool was found.
3479 # $1: variable to set
3480 # $2: executable name (or list of names) to look for
3481
3482
3483 # Like BASIC_SETUP_TOOL but fails if no tool was found.
3484 # $1: variable to set
3485 # $2: autoconf macro to call to look for the special tool
3486
3487
3488 # Setup the most fundamental tools that relies on not much else to set up,
3489 # but is used by much of the early bootstrap code.
3490
3491
3492 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3493
3494
3495 # Evaluates platform specific overrides for devkit variables.
3496 # $1: Name of variable
3497
3498
3499
3500
3501
3502
3503 #%%% Simple tools %%%
3504
3505 # Check if we have found a usable version of make
3506 # $1: the path to a potential make binary (or empty)
3507 # $2: the description on how we found this
3508
3509
3510
3511
3512 # Goes looking for a usable version of GNU make.
3513
3514
3515
3516
3517
3518
3519 # Check if build directory is on local disk. If not possible to determine,
3520 # we prefer to claim it's local.
3521 # Argument 1: directory to test
3522 # Argument 2: what to do if it is on local disk
3523 # Argument 3: what to do otherwise (remote disk or failure)
3524
3525
3526 # Check that source files have basic read permissions set. This might
3527 # not be the case in cygwin in certain conditions.
3528
3529
3530
3531
3532 # Check for support for specific options in bash
3533
3534
3535 # Code to run after AC_OUTPUT
3536
3537
3538 #
3539 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3540 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3541 #
3542 # This code is free software; you can redistribute it and/or modify it
3543 # under the terms of the GNU General Public License version 2 only, as
3544 # published by the Free Software Foundation. Oracle designates this
3545 # particular file as subject to the "Classpath" exception as provided
3546 # by Oracle in the LICENSE file that accompanied this code.
3547 #
3548 # This code is distributed in the hope that it will be useful, but WITHOUT
3549 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3550 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
3551 # version 2 for more details (a copy is included in the LICENSE file that
3552 # accompanied this code).
3553 #
3554 # You should have received a copy of the GNU General Public License version
3555 # 2 along with this work; if not, write to the Free Software Foundation,
3556 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3557 #
3558 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3559 # or visit www.oracle.com if you need additional information or have any
3560 # questions.
3561 #
3562
3563
3564
3565
3566
3567 # Helper function which possibly converts a path using DOS-style short mode.
3568 # If so, the updated path is stored in $new_path.
3569 # $1: The path to check
3570
3571
3572 # Helper function which possibly converts a path using DOS-style short mode.
3573 # If so, the updated path is stored in $new_path.
3574 # $1: The path to check
3575
3576
3577 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3578 # and could probably be heavily simplified. However, all changes in this
3579 # area tend to need lot of testing in different scenarios, and in lack of
3580 # proper unit testing, cleaning this up has not been deemed worth the effort
3581 # at the moment.
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3592
3593
3594
3595
3596 #
3597 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3598 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3599 #
3600 # This code is free software; you can redistribute it and/or modify it
3601 # under the terms of the GNU General Public License version 2 only, as
3602 # published by the Free Software Foundation. Oracle designates this
3603 # particular file as subject to the "Classpath" exception as provided
3604 # by Oracle in the LICENSE file that accompanied this code.
3605 #
3606 # This code is distributed in the hope that it will be useful, but WITHOUT
3607 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3608 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
3609 # version 2 for more details (a copy is included in the LICENSE file that
3610 # accompanied this code).
3611 #
3612 # You should have received a copy of the GNU General Public License version
3613 # 2 along with this work; if not, write to the Free Software Foundation,
3614 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3615 #
3616 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3617 # or visit www.oracle.com if you need additional information or have any
3618 # questions.
3619 #
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631 # ... then the rest
3632 #
3633 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3634 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3635 #
3636 # This code is free software; you can redistribute it and/or modify it
3637 # under the terms of the GNU General Public License version 2 only, as
3638 # published by the Free Software Foundation. Oracle designates this
3639 # particular file as subject to the "Classpath" exception as provided
3640 # by Oracle in the LICENSE file that accompanied this code.
3641 #
3642 # This code is distributed in the hope that it will be useful, but WITHOUT
3643 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3644 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
3645 # version 2 for more details (a copy is included in the LICENSE file that
3646 # accompanied this code).
3647 #
3648 # You should have received a copy of the GNU General Public License version
3649 # 2 along with this work; if not, write to the Free Software Foundation,
3650 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3651 #
3652 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3653 # or visit www.oracle.com if you need additional information or have any
3654 # questions.
3655 #
3656
3657 ########################################################################
3658 # This file handles detection of the Boot JDK. The Boot JDK detection
3659 # process has been developed as a response to solve a complex real-world
3660 # problem. Initially, it was simple, but it has grown as platform after
3661 # platform, idiosyncracy after idiosyncracy has been supported.
3662 #
3663 # The basic idea is this:
3664 # 1) You need an acceptable *) JDK to use as a Boot JDK
3665 # 2) There are several ways to locate a JDK, that are mostly platform
3666 # dependent **)
3667 # 3) You can have multiple JDKs installed
3668 # 4) If possible, configure should try to dig out an acceptable JDK
3669 # automatically, without having to resort to command-line options
3670 #
3671 # *) acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3672 # javac) and not a JRE, etc.
3673 #
3674 # **) On Windows we typically use a well-known path.
3675 # On MacOSX we typically use the tool java_home.
3676 # On Linux we typically find javac in the $PATH, and then follow a
3677 # chain of symlinks that often ends up in a real JDK.
3678 #
3679 # This leads to the code where we check in different ways to locate a
3680 # JDK, and if one is found, check if it is acceptable. If not, we print
3681 # our reasons for rejecting it (useful when debugging non-working
3682 # configure situations) and continue checking the next one.
3683 ########################################################################
3684
3685 # Execute the check given as argument, and verify the result
3686 # If the Boot JDK was previously found, do nothing
3687 # $1 A command line (typically autoconf macro) to execute
3688
3689
3690 # Test: Is bootjdk explicitely set by command line arguments?
3691
3692
3693 # Test: Is bootjdk available from builddeps?
3694
3695
3696 # Test: Is $JAVA_HOME set?
3697
3698
3699 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3700
3701
3702 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3703 # $1: Argument to the java_home binary (optional)
3704
3705
3706 # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3707
3708
3709 # Look for a jdk in the given path. If there are multiple, try to select the newest.
3710 # If found, set BOOT_JDK and BOOT_JDK_FOUND.
3711 # $1 = Path to directory containing jdk installations.
3712 # $2 = String to append to the found JDK directory to get the proper JDK home
3713
3714
3715 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3716 # environmental variable as base for where to look.
3717 # $1 Name of an environmal variable, assumed to point to the Program Files directory.
3718
3719
3720 # Test: Is there a JDK installed in default, well-known locations?
3721
3722
3723 # Check that a command-line tool in the Boot JDK is correct
3724 # $1 = name of variable to assign
3725 # $2 = name of binary
3726
3727
3728 ###############################################################################
3729 #
3730 # We need a Boot JDK to bootstrap the build.
3731 #
3732
3733
3734
3735
3736
3737 #
3738 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3739 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3740 #
3741 # This code is free software; you can redistribute it and/or modify it
3742 # under the terms of the GNU General Public License version 2 only, as
3743 # published by the Free Software Foundation. Oracle designates this
3744 # particular file as subject to the "Classpath" exception as provided
3745 # by Oracle in the LICENSE file that accompanied this code.
3746 #
3747 # This code is distributed in the hope that it will be useful, but WITHOUT
3748 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3749 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
3750 # version 2 for more details (a copy is included in the LICENSE file that
3751 # accompanied this code).
3752 #
3753 # You should have received a copy of the GNU General Public License version
3754 # 2 along with this work; if not, write to the Free Software Foundation,
3755 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3756 #
3757 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3758 # or visit www.oracle.com if you need additional information or have any
3759 # questions.
3760 #
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781 #
3782 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3783 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3784 #
3785 # This code is free software; you can redistribute it and/or modify it
3786 # under the terms of the GNU General Public License version 2 only, as
3787 # published by the Free Software Foundation. Oracle designates this
3788 # particular file as subject to the "Classpath" exception as provided
3789 # by Oracle in the LICENSE file that accompanied this code.
3790 #
3791 # This code is distributed in the hope that it will be useful, but WITHOUT
3792 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3793 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
3794 # version 2 for more details (a copy is included in the LICENSE file that
3795 # accompanied this code).
3796 #
3797 # You should have received a copy of the GNU General Public License version
3798 # 2 along with this work; if not, write to the Free Software Foundation,
3799 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3800 #
3801 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3802 # or visit www.oracle.com if you need additional information or have any
3803 # questions.
3804 #
3805
3806
3807
3808
3809
3810 # Documentation on common flags used for solstudio in HIGHEST.
3811 #
3812 # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3813 # done with care, there are some assumptions below that need to
3814 # be understood about the use of pointers, and IEEE behavior.
3815 #
3816 # -fns: Use non-standard floating point mode (not IEEE 754)
3817 # -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3818 # -fsingle: Use single precision floating point with 'float'
3819 # -xalias_level=basic: Assume memory references via basic pointer types do not alias
3820 # (Source with excessing pointer casting and data access with mixed
3821 # pointer types are not recommended)
3822 # -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3823 # (If you expect perfect errno behavior, do not use this)
3824 # -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3825 # -xrestrict: Pointer parameters to functions do not overlap
3826 # (Similar to -xalias_level=basic usage, but less obvious sometimes.
3827 # If you pass in multiple pointers to the same data, do not use this)
3828 # -xlibmil: Inline some library routines
3829 # (If you expect perfect errno behavior, do not use this)
3830 # -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3831 # (If you expect perfect errno behavior, do not use this)
3832 # Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3833
3834 # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3835 # Bug?
3836 #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3837 # CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3838 # CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3839 #fi
3840
3841
3842
3843
3844
3845 # FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3846 # [RUN-IF-FALSE])
3847 # ------------------------------------------------------------
3848 # Check that the c and c++ compilers support an argument
3849
3850
3851 # FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3852 # [RUN-IF-FALSE])
3853 # ------------------------------------------------------------
3854 # Check that the linker support an argument
3855
3856
3857
3858
3859 #
3860 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3861 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3862 #
3863 # This code is free software; you can redistribute it and/or modify it
3864 # under the terms of the GNU General Public License version 2 only, as
3865 # published by the Free Software Foundation. Oracle designates this
3866 # particular file as subject to the "Classpath" exception as provided
3867 # by Oracle in the LICENSE file that accompanied this code.
3868 #
3869 # This code is distributed in the hope that it will be useful, but WITHOUT
3870 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3871 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
3872 # version 2 for more details (a copy is included in the LICENSE file that
3873 # accompanied this code).
3874 #
3875 # You should have received a copy of the GNU General Public License version
3876 # 2 along with this work; if not, write to the Free Software Foundation,
3877 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3878 #
3879 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3880 # or visit www.oracle.com if you need additional information or have any
3881 # questions.
3882 #
3883
3884
3885
3886
3887
3888 cygwin_help() {
3889 case $1 in
3890 unzip)
3891 PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3892 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3893 ;;
3894 zip)
3895 PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3896 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3897 ;;
3898 make)
3899 PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3900 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3901 ;;
3902 freetype)
3903 HELP_MSG="
3904 The freetype library can now be build during the configure process.
3905 Download the freetype sources and unpack them into an arbitrary directory:
3906
3907 wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3908 tar -xzf freetype-2.5.3.tar.gz
3909
3910 Then run configure with '--with-freetype-src=<freetype_src>'. This will
3911 automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3912 builds or into '<freetype_src>/lib32' for 32-bit builds.
3913 Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3914 and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3915 ;;
3916 esac
3917 }
3918
3919 msys_help() {
3920 PKGHANDLER_COMMAND=""
3921 }
3922
3923 apt_help() {
3924 case $1 in
3925 devkit)
3926 PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3927 openjdk)
3928 PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3929 alsa)
3930 PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3931 cups)
3932 PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3933 freetype)
3934 PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3935 pulse)
3936 PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3937 x11)
3938 PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3939 ccache)
3940 PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3941 esac
3942 }
3943
3944 yum_help() {
3945 case $1 in
3946 devkit)
3947 PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3948 openjdk)
3949 PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3950 alsa)
3951 PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3952 cups)
3953 PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3954 freetype)
3955 PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3956 pulse)
3957 PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3958 x11)
3959 PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3960 ccache)
3961 PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3962 esac
3963 }
3964
3965 port_help() {
3966 PKGHANDLER_COMMAND=""
3967 }
3968
3969 pkgutil_help() {
3970 PKGHANDLER_COMMAND=""
3971 }
3972
3973 pkgadd_help() {
3974 PKGHANDLER_COMMAND=""
3975 }
3976
3977 # This function will check if we're called from the "configure" wrapper while
3978 # printing --help. If so, we will print out additional information that can
3979 # only be extracted within the autoconf script, and then exit. This must be
3980 # called at the very beginning in configure.ac.
3981
3982
3983
3984
3985
3986
3987 #
3988 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3989 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3990 #
3991 # This code is free software; you can redistribute it and/or modify it
3992 # under the terms of the GNU General Public License version 2 only, as
3993 # published by the Free Software Foundation. Oracle designates this
3994 # particular file as subject to the "Classpath" exception as provided
3995 # by Oracle in the LICENSE file that accompanied this code.
3996 #
3997 # This code is distributed in the hope that it will be useful, but WITHOUT
3998 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3999 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
4000 # version 2 for more details (a copy is included in the LICENSE file that
4001 # accompanied this code).
4002 #
4003 # You should have received a copy of the GNU General Public License version
4004 # 2 along with this work; if not, write to the Free Software Foundation,
4005 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4006 #
4007 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4008 # or visit www.oracle.com if you need additional information or have any
4009 # questions.
4010 #
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021 ###############################################################################
4022 #
4023 # Should we build only OpenJDK even if closed sources are present?
4024 #
4025
4026
4027
4028
4029
4030
4031 ###############################################################################
4032 #
4033 # Enable or disable the elliptic curve crypto implementation
4034 #
4035
4036
4037
4038
4039
4040 ################################################################################
4041 #
4042 # Gcov coverage data for hotspot
4043 #
4044
4045
4046 #
4047 # Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4048 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4049 #
4050 # This code is free software; you can redistribute it and/or modify it
4051 # under the terms of the GNU General Public License version 2 only, as
4052 # published by the Free Software Foundation. Oracle designates this
4053 # particular file as subject to the "Classpath" exception as provided
4054 # by Oracle in the LICENSE file that accompanied this code.
4055 #
4056 # This code is distributed in the hope that it will be useful, but WITHOUT
4057 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4058 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
4059 # version 2 for more details (a copy is included in the LICENSE file that
4060 # accompanied this code).
4061 #
4062 # You should have received a copy of the GNU General Public License version
4063 # 2 along with this work; if not, write to the Free Software Foundation,
4064 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4065 #
4066 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4067 # or visit www.oracle.com if you need additional information or have any
4068 # questions.
4069 #
4070
4071 ###############################################################################
4072 #
4073 # Setup version numbers
4074 #
4075
4076 # Verify that a given string represents a valid version number, and assign it
4077 # to a variable.
4078
4079 # Argument 1: the variable to assign to
4080 # Argument 2: the value given by the user
4081
4082
4083
4084
4085 #
4086 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4087 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4088 #
4089 # This code is free software; you can redistribute it and/or modify it
4090 # under the terms of the GNU General Public License version 2 only, as
4091 # published by the Free Software Foundation. Oracle designates this
4092 # particular file as subject to the "Classpath" exception as provided
4093 # by Oracle in the LICENSE file that accompanied this code.
4094 #
4095 # This code is distributed in the hope that it will be useful, but WITHOUT
4096 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4097 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
4098 # version 2 for more details (a copy is included in the LICENSE file that
4099 # accompanied this code).
4100 #
4101 # You should have received a copy of the GNU General Public License version
4102 # 2 along with this work; if not, write to the Free Software Foundation,
4103 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4104 #
4105 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4106 # or visit www.oracle.com if you need additional information or have any
4107 # questions.
4108 #
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130 #
4131 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4132 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4133 #
4134 # This code is free software; you can redistribute it and/or modify it
4135 # under the terms of the GNU General Public License version 2 only, as
4136 # published by the Free Software Foundation. Oracle designates this
4137 # particular file as subject to the "Classpath" exception as provided
4138 # by Oracle in the LICENSE file that accompanied this code.
4139 #
4140 # This code is distributed in the hope that it will be useful, but WITHOUT
4141 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4142 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
4143 # version 2 for more details (a copy is included in the LICENSE file that
4144 # accompanied this code).
4145 #
4146 # You should have received a copy of the GNU General Public License version
4147 # 2 along with this work; if not, write to the Free Software Foundation,
4148 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4149 #
4150 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4151 # or visit www.oracle.com if you need additional information or have any
4152 # questions.
4153 #
4154
4155 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4156 # Converts autoconf style CPU name to OpenJDK style, into
4157 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4158
4159
4160 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4161 # Converts autoconf style OS name to OpenJDK style, into
4162 # VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4163
4164
4165 # Expects $host_os $host_cpu $build_os and $build_cpu
4166 # and $with_target_bits to have been setup!
4167 #
4168 # Translate the standard triplet(quadruplet) definition
4169 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4170 # OPENJDK_BUILD_OS, etc.
4171
4172
4173 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4174 # accordingly. Must be done after setting up build and target system, but before
4175 # doing anything else with these values.
4176
4177
4178 # Setup the legacy variables, for controlling the old makefiles.
4179 #
4180
4181
4182
4183
4184 #%%% Build and target systems %%%
4185
4186
4187
4188
4189 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4190 # Add -mX to various FLAGS variables.
4191
4192
4193
4194
4195
4196
4197 #
4198 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4199 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4200 #
4201 # This code is free software; you can redistribute it and/or modify it
4202 # under the terms of the GNU General Public License version 2 only, as
4203 # published by the Free Software Foundation. Oracle designates this
4204 # particular file as subject to the "Classpath" exception as provided
4205 # by Oracle in the LICENSE file that accompanied this code.
4206 #
4207 # This code is distributed in the hope that it will be useful, but WITHOUT
4208 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4209 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
4210 # version 2 for more details (a copy is included in the LICENSE file that
4211 # accompanied this code).
4212 #
4213 # You should have received a copy of the GNU General Public License version
4214 # 2 along with this work; if not, write to the Free Software Foundation,
4215 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4216 #
4217 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4218 # or visit www.oracle.com if you need additional information or have any
4219 # questions.
4220 #
4221
4222
4223
4224
4225
4226
4227
4228
4229 #
4230 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4231 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4232 #
4233 # This code is free software; you can redistribute it and/or modify it
4234 # under the terms of the GNU General Public License version 2 only, as
4235 # published by the Free Software Foundation. Oracle designates this
4236 # particular file as subject to the "Classpath" exception as provided
4237 # by Oracle in the LICENSE file that accompanied this code.
4238 #
4239 # This code is distributed in the hope that it will be useful, but WITHOUT
4240 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4241 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
4242 # version 2 for more details (a copy is included in the LICENSE file that
4243 # accompanied this code).
4244 #
4245 # You should have received a copy of the GNU General Public License version
4246 # 2 along with this work; if not, write to the Free Software Foundation,
4247 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4248 #
4249 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4250 # or visit www.oracle.com if you need additional information or have any
4251 # questions.
4252 #
4253
4254 ########################################################################
4255 # This file is responsible for detecting, verifying and setting up the
4256 # toolchain, i.e. the compiler, linker and related utilities. It will setup
4257 # proper paths to the binaries, but it will not setup any flags.
4258 #
4259 # The binaries used is determined by the toolchain type, which is the family of
4260 # compilers and related tools that are used.
4261 ########################################################################
4262
4263
4264 # All valid toolchains, regardless of platform (used by help.m4)
4265 VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4266
4267 # These toolchains are valid on different platforms
4268 VALID_TOOLCHAINS_linux="gcc clang"
4269 VALID_TOOLCHAINS_solaris="solstudio"
4270 VALID_TOOLCHAINS_macosx="gcc clang"
4271 VALID_TOOLCHAINS_aix="xlc"
4272 VALID_TOOLCHAINS_windows="microsoft"
4273
4274 # Toolchain descriptions
4275 TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4276 TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4277 TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4278 TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4279 TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4280
4281 # Setup a number of variables describing how native output files are
4282 # named on this platform/toolchain.
4283
4284
4285 # Determine which toolchain type to use, and make sure it is valid for this
4286 # platform. Setup various information about the selected toolchain.
4287
4288
4289 # Before we start detecting the toolchain executables, we might need some
4290 # special setup, e.g. additional paths etc.
4291
4292
4293 # Restore path, etc
4294
4295
4296 # Check if a compiler is of the toolchain type we expect, and save the version
4297 # information from it. If the compiler does not match the expected type,
4298 # this function will abort using AC_MSG_ERROR. If it matches, the version will
4299 # be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4300 # the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4301 #
4302 # $1 = compiler to test (CC or CXX)
4303 # $2 = human readable name of compiler (C or C++)
4304
4305
4306 # Try to locate the given C or C++ compiler in the path, or otherwise.
4307 #
4308 # $1 = compiler to test (CC or CXX)
4309 # $2 = human readable name of compiler (C or C++)
4310 # $3 = list of compiler names to search for
4311
4312
4313 # Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4314 # preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4315 # archiver (AR). Verify that the compilers are correct according to the
4316 # toolchain type.
4317
4318
4319 # Setup additional tools that is considered a part of the toolchain, but not the
4320 # core part. Many of these are highly platform-specific and do not exist,
4321 # and/or are not needed on all platforms.
4322
4323
4324 # Setup the build tools (i.e, the compiler and linker used to build programs
4325 # that should be run on the build platform, not the target platform, as a build
4326 # helper). Since the non-cross-compile case uses the normal, target compilers
4327 # for this, we can only do this after these have been setup.
4328
4329
4330 # Setup legacy variables that are still needed as alternative ways to refer to
4331 # parts of the toolchain.
4332
4333
4334 # Do some additional checks on the detected tools.
4335
4336
4337 # Setup the JTReg Regression Test Harness.
4338
4339
4340 #
4341 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4342 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4343 #
4344 # This code is free software; you can redistribute it and/or modify it
4345 # under the terms of the GNU General Public License version 2 only, as
4346 # published by the Free Software Foundation. Oracle designates this
4347 # particular file as subject to the "Classpath" exception as provided
4348 # by Oracle in the LICENSE file that accompanied this code.
4349 #
4350 # This code is distributed in the hope that it will be useful, but WITHOUT
4351 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4352 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
4353 # version 2 for more details (a copy is included in the LICENSE file that
4354 # accompanied this code).
4355 #
4356 # You should have received a copy of the GNU General Public License version
4357 # 2 along with this work; if not, write to the Free Software Foundation,
4358 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4359 #
4360 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4361 # or visit www.oracle.com if you need additional information or have any
4362 # questions.
4363 #
4364
4365 ################################################################################
4366 # The order of these defines the priority by which we try to find them.
4367 VALID_VS_VERSIONS="2013 2012 2010"
4368
4369 VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4370 VS_VERSION_INTERNAL_2010=100
4371 VS_MSVCR_2010=msvcr100.dll
4372 # We don't use msvcp on Visual Studio 2010
4373 #VS_MSVCP_2010=msvcp100.dll
4374 VS_ENVVAR_2010="VS100COMNTOOLS"
4375 VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4376 VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4377 VS_VS_PLATFORM_NAME_2010="v100"
4378 VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4379
4380 VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4381 VS_VERSION_INTERNAL_2012=110
4382 VS_MSVCR_2012=msvcr110.dll
4383 VS_MSVCP_2012=msvcp110.dll
4384 VS_ENVVAR_2012="VS110COMNTOOLS"
4385 VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4386 VS_SDK_INSTALLDIR_2012=
4387 VS_VS_PLATFORM_NAME_2012="v110"
4388 VS_SDK_PLATFORM_NAME_2012=
4389
4390 VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4391 VS_VERSION_INTERNAL_2013=120
4392 VS_MSVCR_2013=msvcr120.dll
4393 VS_MSVCP_2013=msvcp120.dll
4394 VS_ENVVAR_2013="VS120COMNTOOLS"
4395 VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4396 VS_SDK_INSTALLDIR_2013=
4397 VS_VS_PLATFORM_NAME_2013="v120"
4398 VS_SDK_PLATFORM_NAME_2013=
4399
4400 ################################################################################
4401
4402
4403
4404 ################################################################################
4405
4406
4407
4408 ################################################################################
4409 # Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4410 # build environment and assigns it to VS_ENV_CMD
4411
4412
4413 ################################################################################
4414
4415
4416
4417 ################################################################################
4418 # Check if the VS env variables were setup prior to running configure.
4419 # If not, then find vcvarsall.bat and run it automatically, and integrate
4420 # the set env variables into the spec file.
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435 # This line needs to be here, verbatim, after all includes and the dummy hook
4436 # definitions. It is replaced with custom functionality when building
4437 # custom sources.
4438 #CUSTOM_AUTOCONF_INCLUDE
4439
4440 # Do not change or remove the following line, it is needed for consistency checks:
4441 DATE_WHEN_GENERATED=1433857590
4442
4443 ###############################################################################
4444 #
4445 # Initialization / Boot-strapping
4446 #
4447 # The bootstrapping process needs to solve the "chicken or the egg" problem,
4448 # thus it jumps back and forth, each time gaining something needed later on.
4449 #
4450 ###############################################################################
4451
4452 # If we are requested to print additional help, do that and then exit.
4453 # This must be the very first call.
4454
4455 if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4456 $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4457 $PRINTF "Which are valid to use depends on the build platform.\n"
4458 for toolchain in $VALID_TOOLCHAINS_all; do
4459 # Use indirect variable referencing
4460 toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4461 TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4462 $PRINTF " %-10s %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4463 done
4464
4465 # And now exit directly
4466 exit 0
4467 fi
4468
4469
4470 # Basic initialization that must happen first of all in the normal process.
4471
4472 # Save the original command line. This is passed to us by the wrapper configure script.
4473
4474 # Save the path variable before it gets changed
4475 ORIGINAL_PATH="$PATH"
4476
4477 DATE_WHEN_CONFIGURED=`LANG=C date`
4478
4479 { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4480 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4481 { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4482 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4483
4484
4485 # Start with tools that do not need have cross compilation support
4486 # and can be expected to be found in the default PATH. These tools are
4487 # used by configure. Nor are these tools expected to be found in the
4488 # devkit from the builddeps server either, since they are
4489 # needed to download the devkit.
4490
4491 # First are all the simple required tools.
4492
4493
4494
4495 # Publish this variable in the help.
4496
4497
4498 if test "x$BASENAME" = x; then
4499 # The variable is not set by user, try to locate tool using the code snippet
4500 for ac_prog in basename
4501 do
4502 # Extract the first word of "$ac_prog", so it can be a program name with args.
4503 set dummy $ac_prog; ac_word=$2
4504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4505 $as_echo_n "checking for $ac_word... " >&6; }
4506 if ${ac_cv_path_BASENAME+:} false; then :
4507 $as_echo_n "(cached) " >&6
4508 else
4509 case $BASENAME in
4510 [\\/]* | ?:[\\/]*)
4511 ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4512 ;;
4513 *)
4514 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4515 for as_dir in $PATH
4516 do
4517 IFS=$as_save_IFS
4518 test -z "$as_dir" && as_dir=.
4519 for ac_exec_ext in '' $ac_executable_extensions; do
4520 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4521 ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4522 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4523 break 2
4524 fi
4525 done
4526 done
4527 IFS=$as_save_IFS
4528
4529 ;;
4530 esac
4531 fi
4532 BASENAME=$ac_cv_path_BASENAME
4533 if test -n "$BASENAME"; then
4534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4535 $as_echo "$BASENAME" >&6; }
4536 else
4537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4538 $as_echo "no" >&6; }
4539 fi
4540
4541
4542 test -n "$BASENAME" && break
4543 done
4544
4545 else
4546 # The variable is set, but is it from the command line or the environment?
4547
4548 # Try to remove the string !BASENAME! from our list.
4549 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4550 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4551 # If it failed, the variable was not from the command line. Ignore it,
4552 # but warn the user (except for BASH, which is always set by the calling BASH).
4553 if test "xBASENAME" != xBASH; then
4554 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4555 $as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4556 fi
4557 # Try to locate tool using the code snippet
4558 for ac_prog in basename
4559 do
4560 # Extract the first word of "$ac_prog", so it can be a program name with args.
4561 set dummy $ac_prog; ac_word=$2
4562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4563 $as_echo_n "checking for $ac_word... " >&6; }
4564 if ${ac_cv_path_BASENAME+:} false; then :
4565 $as_echo_n "(cached) " >&6
4566 else
4567 case $BASENAME in
4568 [\\/]* | ?:[\\/]*)
4569 ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4570 ;;
4571 *)
4572 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4573 for as_dir in $PATH
4574 do
4575 IFS=$as_save_IFS
4576 test -z "$as_dir" && as_dir=.
4577 for ac_exec_ext in '' $ac_executable_extensions; do
4578 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4579 ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4580 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4581 break 2
4582 fi
4583 done
4584 done
4585 IFS=$as_save_IFS
4586
4587 ;;
4588 esac
4589 fi
4590 BASENAME=$ac_cv_path_BASENAME
4591 if test -n "$BASENAME"; then
4592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4593 $as_echo "$BASENAME" >&6; }
4594 else
4595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4596 $as_echo "no" >&6; }
4597 fi
4598
4599
4600 test -n "$BASENAME" && break
4601 done
4602
4603 else
4604 # If it succeeded, then it was overridden by the user. We will use it
4605 # for the tool.
4606
4607 # First remove it from the list of overridden variables, so we can test
4608 # for unknown variables in the end.
4609 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4610
4611 # Check if the provided tool contains a complete path.
4612 tool_specified="$BASENAME"
4613 tool_basename="${tool_specified##*/}"
4614 if test "x$tool_basename" = "x$tool_specified"; then
4615 # A command without a complete path is provided, search $PATH.
4616 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4617 $as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4618 # Extract the first word of "$tool_basename", so it can be a program name with args.
4619 set dummy $tool_basename; ac_word=$2
4620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4621 $as_echo_n "checking for $ac_word... " >&6; }
4622 if ${ac_cv_path_BASENAME+:} false; then :
4623 $as_echo_n "(cached) " >&6
4624 else
4625 case $BASENAME in
4626 [\\/]* | ?:[\\/]*)
4627 ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4628 ;;
4629 *)
4630 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4631 for as_dir in $PATH
4632 do
4633 IFS=$as_save_IFS
4634 test -z "$as_dir" && as_dir=.
4635 for ac_exec_ext in '' $ac_executable_extensions; do
4636 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4637 ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4638 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4639 break 2
4640 fi
4641 done
4642 done
4643 IFS=$as_save_IFS
4644
4645 ;;
4646 esac
4647 fi
4648 BASENAME=$ac_cv_path_BASENAME
4649 if test -n "$BASENAME"; then
4650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4651 $as_echo "$BASENAME" >&6; }
4652 else
4653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4654 $as_echo "no" >&6; }
4655 fi
4656
4657
4658 if test "x$BASENAME" = x; then
4659 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4660 fi
4661 else
4662 # Otherwise we believe it is a complete path. Use it as it is.
4663 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4664 $as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4666 $as_echo_n "checking for BASENAME... " >&6; }
4667 if test ! -x "$tool_specified"; then
4668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4669 $as_echo "not found" >&6; }
4670 as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4671 fi
4672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4673 $as_echo "$tool_specified" >&6; }
4674 fi
4675 fi
4676 fi
4677
4678
4679
4680 if test "x$BASENAME" = x; then
4681 as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4682 fi
4683
4684
4685
4686
4687
4688 # Publish this variable in the help.
4689
4690
4691 if test "x$BASH" = x; then
4692 # The variable is not set by user, try to locate tool using the code snippet
4693 for ac_prog in bash
4694 do
4695 # Extract the first word of "$ac_prog", so it can be a program name with args.
4696 set dummy $ac_prog; ac_word=$2
4697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4698 $as_echo_n "checking for $ac_word... " >&6; }
4699 if ${ac_cv_path_BASH+:} false; then :
4700 $as_echo_n "(cached) " >&6
4701 else
4702 case $BASH in
4703 [\\/]* | ?:[\\/]*)
4704 ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4705 ;;
4706 *)
4707 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4708 for as_dir in $PATH
4709 do
4710 IFS=$as_save_IFS
4711 test -z "$as_dir" && as_dir=.
4712 for ac_exec_ext in '' $ac_executable_extensions; do
4713 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4714 ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4715 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4716 break 2
4717 fi
4718 done
4719 done
4720 IFS=$as_save_IFS
4721
4722 ;;
4723 esac
4724 fi
4725 BASH=$ac_cv_path_BASH
4726 if test -n "$BASH"; then
4727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4728 $as_echo "$BASH" >&6; }
4729 else
4730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4731 $as_echo "no" >&6; }
4732 fi
4733
4734
4735 test -n "$BASH" && break
4736 done
4737
4738 else
4739 # The variable is set, but is it from the command line or the environment?
4740
4741 # Try to remove the string !BASH! from our list.
4742 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4743 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4744 # If it failed, the variable was not from the command line. Ignore it,
4745 # but warn the user (except for BASH, which is always set by the calling BASH).
4746 if test "xBASH" != xBASH; then
4747 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4748 $as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4749 fi
4750 # Try to locate tool using the code snippet
4751 for ac_prog in bash
4752 do
4753 # Extract the first word of "$ac_prog", so it can be a program name with args.
4754 set dummy $ac_prog; ac_word=$2
4755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4756 $as_echo_n "checking for $ac_word... " >&6; }
4757 if ${ac_cv_path_BASH+:} false; then :
4758 $as_echo_n "(cached) " >&6
4759 else
4760 case $BASH in
4761 [\\/]* | ?:[\\/]*)
4762 ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4763 ;;
4764 *)
4765 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4766 for as_dir in $PATH
4767 do
4768 IFS=$as_save_IFS
4769 test -z "$as_dir" && as_dir=.
4770 for ac_exec_ext in '' $ac_executable_extensions; do
4771 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4772 ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4773 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4774 break 2
4775 fi
4776 done
4777 done
4778 IFS=$as_save_IFS
4779
4780 ;;
4781 esac
4782 fi
4783 BASH=$ac_cv_path_BASH
4784 if test -n "$BASH"; then
4785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4786 $as_echo "$BASH" >&6; }
4787 else
4788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4789 $as_echo "no" >&6; }
4790 fi
4791
4792
4793 test -n "$BASH" && break
4794 done
4795
4796 else
4797 # If it succeeded, then it was overridden by the user. We will use it
4798 # for the tool.
4799
4800 # First remove it from the list of overridden variables, so we can test
4801 # for unknown variables in the end.
4802 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4803
4804 # Check if the provided tool contains a complete path.
4805 tool_specified="$BASH"
4806 tool_basename="${tool_specified##*/}"
4807 if test "x$tool_basename" = "x$tool_specified"; then
4808 # A command without a complete path is provided, search $PATH.
4809 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4810 $as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4811 # Extract the first word of "$tool_basename", so it can be a program name with args.
4812 set dummy $tool_basename; ac_word=$2
4813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4814 $as_echo_n "checking for $ac_word... " >&6; }
4815 if ${ac_cv_path_BASH+:} false; then :
4816 $as_echo_n "(cached) " >&6
4817 else
4818 case $BASH in
4819 [\\/]* | ?:[\\/]*)
4820 ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4821 ;;
4822 *)
4823 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4824 for as_dir in $PATH
4825 do
4826 IFS=$as_save_IFS
4827 test -z "$as_dir" && as_dir=.
4828 for ac_exec_ext in '' $ac_executable_extensions; do
4829 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4830 ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4831 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4832 break 2
4833 fi
4834 done
4835 done
4836 IFS=$as_save_IFS
4837
4838 ;;
4839 esac
4840 fi
4841 BASH=$ac_cv_path_BASH
4842 if test -n "$BASH"; then
4843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4844 $as_echo "$BASH" >&6; }
4845 else
4846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4847 $as_echo "no" >&6; }
4848 fi
4849
4850
4851 if test "x$BASH" = x; then
4852 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4853 fi
4854 else
4855 # Otherwise we believe it is a complete path. Use it as it is.
4856 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4857 $as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4859 $as_echo_n "checking for BASH... " >&6; }
4860 if test ! -x "$tool_specified"; then
4861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4862 $as_echo "not found" >&6; }
4863 as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4864 fi
4865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4866 $as_echo "$tool_specified" >&6; }
4867 fi
4868 fi
4869 fi
4870
4871
4872
4873 if test "x$BASH" = x; then
4874 as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4875 fi
4876
4877
4878
4879
4880
4881 # Publish this variable in the help.
4882
4883
4884 if test "x$CAT" = x; then
4885 # The variable is not set by user, try to locate tool using the code snippet
4886 for ac_prog in cat
4887 do
4888 # Extract the first word of "$ac_prog", so it can be a program name with args.
4889 set dummy $ac_prog; ac_word=$2
4890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4891 $as_echo_n "checking for $ac_word... " >&6; }
4892 if ${ac_cv_path_CAT+:} false; then :
4893 $as_echo_n "(cached) " >&6
4894 else
4895 case $CAT in
4896 [\\/]* | ?:[\\/]*)
4897 ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4898 ;;
4899 *)
4900 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4901 for as_dir in $PATH
4902 do
4903 IFS=$as_save_IFS
4904 test -z "$as_dir" && as_dir=.
4905 for ac_exec_ext in '' $ac_executable_extensions; do
4906 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4907 ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4908 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4909 break 2
4910 fi
4911 done
4912 done
4913 IFS=$as_save_IFS
4914
4915 ;;
4916 esac
4917 fi
4918 CAT=$ac_cv_path_CAT
4919 if test -n "$CAT"; then
4920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4921 $as_echo "$CAT" >&6; }
4922 else
4923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4924 $as_echo "no" >&6; }
4925 fi
4926
4927
4928 test -n "$CAT" && break
4929 done
4930
4931 else
4932 # The variable is set, but is it from the command line or the environment?
4933
4934 # Try to remove the string !CAT! from our list.
4935 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4936 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4937 # If it failed, the variable was not from the command line. Ignore it,
4938 # but warn the user (except for BASH, which is always set by the calling BASH).
4939 if test "xCAT" != xBASH; then
4940 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4941 $as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4942 fi
4943 # Try to locate tool using the code snippet
4944 for ac_prog in cat
4945 do
4946 # Extract the first word of "$ac_prog", so it can be a program name with args.
4947 set dummy $ac_prog; ac_word=$2
4948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4949 $as_echo_n "checking for $ac_word... " >&6; }
4950 if ${ac_cv_path_CAT+:} false; then :
4951 $as_echo_n "(cached) " >&6
4952 else
4953 case $CAT in
4954 [\\/]* | ?:[\\/]*)
4955 ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4956 ;;
4957 *)
4958 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4959 for as_dir in $PATH
4960 do
4961 IFS=$as_save_IFS
4962 test -z "$as_dir" && as_dir=.
4963 for ac_exec_ext in '' $ac_executable_extensions; do
4964 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4965 ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4966 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4967 break 2
4968 fi
4969 done
4970 done
4971 IFS=$as_save_IFS
4972
4973 ;;
4974 esac
4975 fi
4976 CAT=$ac_cv_path_CAT
4977 if test -n "$CAT"; then
4978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4979 $as_echo "$CAT" >&6; }
4980 else
4981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4982 $as_echo "no" >&6; }
4983 fi
4984
4985
4986 test -n "$CAT" && break
4987 done
4988
4989 else
4990 # If it succeeded, then it was overridden by the user. We will use it
4991 # for the tool.
4992
4993 # First remove it from the list of overridden variables, so we can test
4994 # for unknown variables in the end.
4995 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4996
4997 # Check if the provided tool contains a complete path.
4998 tool_specified="$CAT"
4999 tool_basename="${tool_specified##*/}"
5000 if test "x$tool_basename" = "x$tool_specified"; then
5001 # A command without a complete path is provided, search $PATH.
5002 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5003 $as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5004 # Extract the first word of "$tool_basename", so it can be a program name with args.
5005 set dummy $tool_basename; ac_word=$2
5006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5007 $as_echo_n "checking for $ac_word... " >&6; }
5008 if ${ac_cv_path_CAT+:} false; then :
5009 $as_echo_n "(cached) " >&6
5010 else
5011 case $CAT in
5012 [\\/]* | ?:[\\/]*)
5013 ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5014 ;;
5015 *)
5016 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5017 for as_dir in $PATH
5018 do
5019 IFS=$as_save_IFS
5020 test -z "$as_dir" && as_dir=.
5021 for ac_exec_ext in '' $ac_executable_extensions; do
5022 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5023 ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5024 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5025 break 2
5026 fi
5027 done
5028 done
5029 IFS=$as_save_IFS
5030
5031 ;;
5032 esac
5033 fi
5034 CAT=$ac_cv_path_CAT
5035 if test -n "$CAT"; then
5036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5037 $as_echo "$CAT" >&6; }
5038 else
5039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5040 $as_echo "no" >&6; }
5041 fi
5042
5043
5044 if test "x$CAT" = x; then
5045 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5046 fi
5047 else
5048 # Otherwise we believe it is a complete path. Use it as it is.
5049 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5050 $as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5052 $as_echo_n "checking for CAT... " >&6; }
5053 if test ! -x "$tool_specified"; then
5054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5055 $as_echo "not found" >&6; }
5056 as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5057 fi
5058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5059 $as_echo "$tool_specified" >&6; }
5060 fi
5061 fi
5062 fi
5063
5064
5065
5066 if test "x$CAT" = x; then
5067 as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5068 fi
5069
5070
5071
5072
5073
5074 # Publish this variable in the help.
5075
5076
5077 if test "x$CHMOD" = x; then
5078 # The variable is not set by user, try to locate tool using the code snippet
5079 for ac_prog in chmod
5080 do
5081 # Extract the first word of "$ac_prog", so it can be a program name with args.
5082 set dummy $ac_prog; ac_word=$2
5083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5084 $as_echo_n "checking for $ac_word... " >&6; }
5085 if ${ac_cv_path_CHMOD+:} false; then :
5086 $as_echo_n "(cached) " >&6
5087 else
5088 case $CHMOD in
5089 [\\/]* | ?:[\\/]*)
5090 ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5091 ;;
5092 *)
5093 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5094 for as_dir in $PATH
5095 do
5096 IFS=$as_save_IFS
5097 test -z "$as_dir" && as_dir=.
5098 for ac_exec_ext in '' $ac_executable_extensions; do
5099 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5100 ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5101 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5102 break 2
5103 fi
5104 done
5105 done
5106 IFS=$as_save_IFS
5107
5108 ;;
5109 esac
5110 fi
5111 CHMOD=$ac_cv_path_CHMOD
5112 if test -n "$CHMOD"; then
5113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5114 $as_echo "$CHMOD" >&6; }
5115 else
5116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5117 $as_echo "no" >&6; }
5118 fi
5119
5120
5121 test -n "$CHMOD" && break
5122 done
5123
5124 else
5125 # The variable is set, but is it from the command line or the environment?
5126
5127 # Try to remove the string !CHMOD! from our list.
5128 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5129 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5130 # If it failed, the variable was not from the command line. Ignore it,
5131 # but warn the user (except for BASH, which is always set by the calling BASH).
5132 if test "xCHMOD" != xBASH; then
5133 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5134 $as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5135 fi
5136 # Try to locate tool using the code snippet
5137 for ac_prog in chmod
5138 do
5139 # Extract the first word of "$ac_prog", so it can be a program name with args.
5140 set dummy $ac_prog; ac_word=$2
5141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5142 $as_echo_n "checking for $ac_word... " >&6; }
5143 if ${ac_cv_path_CHMOD+:} false; then :
5144 $as_echo_n "(cached) " >&6
5145 else
5146 case $CHMOD in
5147 [\\/]* | ?:[\\/]*)
5148 ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5149 ;;
5150 *)
5151 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5152 for as_dir in $PATH
5153 do
5154 IFS=$as_save_IFS
5155 test -z "$as_dir" && as_dir=.
5156 for ac_exec_ext in '' $ac_executable_extensions; do
5157 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5158 ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5159 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5160 break 2
5161 fi
5162 done
5163 done
5164 IFS=$as_save_IFS
5165
5166 ;;
5167 esac
5168 fi
5169 CHMOD=$ac_cv_path_CHMOD
5170 if test -n "$CHMOD"; then
5171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5172 $as_echo "$CHMOD" >&6; }
5173 else
5174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5175 $as_echo "no" >&6; }
5176 fi
5177
5178
5179 test -n "$CHMOD" && break
5180 done
5181
5182 else
5183 # If it succeeded, then it was overridden by the user. We will use it
5184 # for the tool.
5185
5186 # First remove it from the list of overridden variables, so we can test
5187 # for unknown variables in the end.
5188 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5189
5190 # Check if the provided tool contains a complete path.
5191 tool_specified="$CHMOD"
5192 tool_basename="${tool_specified##*/}"
5193 if test "x$tool_basename" = "x$tool_specified"; then
5194 # A command without a complete path is provided, search $PATH.
5195 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5196 $as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5197 # Extract the first word of "$tool_basename", so it can be a program name with args.
5198 set dummy $tool_basename; ac_word=$2
5199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5200 $as_echo_n "checking for $ac_word... " >&6; }
5201 if ${ac_cv_path_CHMOD+:} false; then :
5202 $as_echo_n "(cached) " >&6
5203 else
5204 case $CHMOD in
5205 [\\/]* | ?:[\\/]*)
5206 ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5207 ;;
5208 *)
5209 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5210 for as_dir in $PATH
5211 do
5212 IFS=$as_save_IFS
5213 test -z "$as_dir" && as_dir=.
5214 for ac_exec_ext in '' $ac_executable_extensions; do
5215 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5216 ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5217 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5218 break 2
5219 fi
5220 done
5221 done
5222 IFS=$as_save_IFS
5223
5224 ;;
5225 esac
5226 fi
5227 CHMOD=$ac_cv_path_CHMOD
5228 if test -n "$CHMOD"; then
5229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5230 $as_echo "$CHMOD" >&6; }
5231 else
5232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5233 $as_echo "no" >&6; }
5234 fi
5235
5236
5237 if test "x$CHMOD" = x; then
5238 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5239 fi
5240 else
5241 # Otherwise we believe it is a complete path. Use it as it is.
5242 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5243 $as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5245 $as_echo_n "checking for CHMOD... " >&6; }
5246 if test ! -x "$tool_specified"; then
5247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5248 $as_echo "not found" >&6; }
5249 as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5250 fi
5251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5252 $as_echo "$tool_specified" >&6; }
5253 fi
5254 fi
5255 fi
5256
5257
5258
5259 if test "x$CHMOD" = x; then
5260 as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5261 fi
5262
5263
5264
5265
5266
5267 # Publish this variable in the help.
5268
5269
5270 if test "x$CMP" = x; then
5271 # The variable is not set by user, try to locate tool using the code snippet
5272 for ac_prog in cmp
5273 do
5274 # Extract the first word of "$ac_prog", so it can be a program name with args.
5275 set dummy $ac_prog; ac_word=$2
5276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5277 $as_echo_n "checking for $ac_word... " >&6; }
5278 if ${ac_cv_path_CMP+:} false; then :
5279 $as_echo_n "(cached) " >&6
5280 else
5281 case $CMP in
5282 [\\/]* | ?:[\\/]*)
5283 ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5284 ;;
5285 *)
5286 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5287 for as_dir in $PATH
5288 do
5289 IFS=$as_save_IFS
5290 test -z "$as_dir" && as_dir=.
5291 for ac_exec_ext in '' $ac_executable_extensions; do
5292 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5293 ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5294 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5295 break 2
5296 fi
5297 done
5298 done
5299 IFS=$as_save_IFS
5300
5301 ;;
5302 esac
5303 fi
5304 CMP=$ac_cv_path_CMP
5305 if test -n "$CMP"; then
5306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5307 $as_echo "$CMP" >&6; }
5308 else
5309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5310 $as_echo "no" >&6; }
5311 fi
5312
5313
5314 test -n "$CMP" && break
5315 done
5316
5317 else
5318 # The variable is set, but is it from the command line or the environment?
5319
5320 # Try to remove the string !CMP! from our list.
5321 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5322 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5323 # If it failed, the variable was not from the command line. Ignore it,
5324 # but warn the user (except for BASH, which is always set by the calling BASH).
5325 if test "xCMP" != xBASH; then
5326 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5327 $as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5328 fi
5329 # Try to locate tool using the code snippet
5330 for ac_prog in cmp
5331 do
5332 # Extract the first word of "$ac_prog", so it can be a program name with args.
5333 set dummy $ac_prog; ac_word=$2
5334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5335 $as_echo_n "checking for $ac_word... " >&6; }
5336 if ${ac_cv_path_CMP+:} false; then :
5337 $as_echo_n "(cached) " >&6
5338 else
5339 case $CMP in
5340 [\\/]* | ?:[\\/]*)
5341 ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5342 ;;
5343 *)
5344 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5345 for as_dir in $PATH
5346 do
5347 IFS=$as_save_IFS
5348 test -z "$as_dir" && as_dir=.
5349 for ac_exec_ext in '' $ac_executable_extensions; do
5350 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5351 ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5352 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5353 break 2
5354 fi
5355 done
5356 done
5357 IFS=$as_save_IFS
5358
5359 ;;
5360 esac
5361 fi
5362 CMP=$ac_cv_path_CMP
5363 if test -n "$CMP"; then
5364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5365 $as_echo "$CMP" >&6; }
5366 else
5367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5368 $as_echo "no" >&6; }
5369 fi
5370
5371
5372 test -n "$CMP" && break
5373 done
5374
5375 else
5376 # If it succeeded, then it was overridden by the user. We will use it
5377 # for the tool.
5378
5379 # First remove it from the list of overridden variables, so we can test
5380 # for unknown variables in the end.
5381 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5382
5383 # Check if the provided tool contains a complete path.
5384 tool_specified="$CMP"
5385 tool_basename="${tool_specified##*/}"
5386 if test "x$tool_basename" = "x$tool_specified"; then
5387 # A command without a complete path is provided, search $PATH.
5388 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5389 $as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5390 # Extract the first word of "$tool_basename", so it can be a program name with args.
5391 set dummy $tool_basename; ac_word=$2
5392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5393 $as_echo_n "checking for $ac_word... " >&6; }
5394 if ${ac_cv_path_CMP+:} false; then :
5395 $as_echo_n "(cached) " >&6
5396 else
5397 case $CMP in
5398 [\\/]* | ?:[\\/]*)
5399 ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5400 ;;
5401 *)
5402 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5403 for as_dir in $PATH
5404 do
5405 IFS=$as_save_IFS
5406 test -z "$as_dir" && as_dir=.
5407 for ac_exec_ext in '' $ac_executable_extensions; do
5408 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5409 ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5410 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5411 break 2
5412 fi
5413 done
5414 done
5415 IFS=$as_save_IFS
5416
5417 ;;
5418 esac
5419 fi
5420 CMP=$ac_cv_path_CMP
5421 if test -n "$CMP"; then
5422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5423 $as_echo "$CMP" >&6; }
5424 else
5425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5426 $as_echo "no" >&6; }
5427 fi
5428
5429
5430 if test "x$CMP" = x; then
5431 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5432 fi
5433 else
5434 # Otherwise we believe it is a complete path. Use it as it is.
5435 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5436 $as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5438 $as_echo_n "checking for CMP... " >&6; }
5439 if test ! -x "$tool_specified"; then
5440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5441 $as_echo "not found" >&6; }
5442 as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5443 fi
5444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5445 $as_echo "$tool_specified" >&6; }
5446 fi
5447 fi
5448 fi
5449
5450
5451
5452 if test "x$CMP" = x; then
5453 as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5454 fi
5455
5456
5457
5458
5459
5460 # Publish this variable in the help.
5461
5462
5463 if test "x$COMM" = x; then
5464 # The variable is not set by user, try to locate tool using the code snippet
5465 for ac_prog in comm
5466 do
5467 # Extract the first word of "$ac_prog", so it can be a program name with args.
5468 set dummy $ac_prog; ac_word=$2
5469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5470 $as_echo_n "checking for $ac_word... " >&6; }
5471 if ${ac_cv_path_COMM+:} false; then :
5472 $as_echo_n "(cached) " >&6
5473 else
5474 case $COMM in
5475 [\\/]* | ?:[\\/]*)
5476 ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5477 ;;
5478 *)
5479 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5480 for as_dir in $PATH
5481 do
5482 IFS=$as_save_IFS
5483 test -z "$as_dir" && as_dir=.
5484 for ac_exec_ext in '' $ac_executable_extensions; do
5485 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5486 ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5487 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5488 break 2
5489 fi
5490 done
5491 done
5492 IFS=$as_save_IFS
5493
5494 ;;
5495 esac
5496 fi
5497 COMM=$ac_cv_path_COMM
5498 if test -n "$COMM"; then
5499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5500 $as_echo "$COMM" >&6; }
5501 else
5502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5503 $as_echo "no" >&6; }
5504 fi
5505
5506
5507 test -n "$COMM" && break
5508 done
5509
5510 else
5511 # The variable is set, but is it from the command line or the environment?
5512
5513 # Try to remove the string !COMM! from our list.
5514 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5515 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5516 # If it failed, the variable was not from the command line. Ignore it,
5517 # but warn the user (except for BASH, which is always set by the calling BASH).
5518 if test "xCOMM" != xBASH; then
5519 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5520 $as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5521 fi
5522 # Try to locate tool using the code snippet
5523 for ac_prog in comm
5524 do
5525 # Extract the first word of "$ac_prog", so it can be a program name with args.
5526 set dummy $ac_prog; ac_word=$2
5527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5528 $as_echo_n "checking for $ac_word... " >&6; }
5529 if ${ac_cv_path_COMM+:} false; then :
5530 $as_echo_n "(cached) " >&6
5531 else
5532 case $COMM in
5533 [\\/]* | ?:[\\/]*)
5534 ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5535 ;;
5536 *)
5537 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5538 for as_dir in $PATH
5539 do
5540 IFS=$as_save_IFS
5541 test -z "$as_dir" && as_dir=.
5542 for ac_exec_ext in '' $ac_executable_extensions; do
5543 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5544 ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5545 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5546 break 2
5547 fi
5548 done
5549 done
5550 IFS=$as_save_IFS
5551
5552 ;;
5553 esac
5554 fi
5555 COMM=$ac_cv_path_COMM
5556 if test -n "$COMM"; then
5557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5558 $as_echo "$COMM" >&6; }
5559 else
5560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5561 $as_echo "no" >&6; }
5562 fi
5563
5564
5565 test -n "$COMM" && break
5566 done
5567
5568 else
5569 # If it succeeded, then it was overridden by the user. We will use it
5570 # for the tool.
5571
5572 # First remove it from the list of overridden variables, so we can test
5573 # for unknown variables in the end.
5574 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5575
5576 # Check if the provided tool contains a complete path.
5577 tool_specified="$COMM"
5578 tool_basename="${tool_specified##*/}"
5579 if test "x$tool_basename" = "x$tool_specified"; then
5580 # A command without a complete path is provided, search $PATH.
5581 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5582 $as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5583 # Extract the first word of "$tool_basename", so it can be a program name with args.
5584 set dummy $tool_basename; ac_word=$2
5585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5586 $as_echo_n "checking for $ac_word... " >&6; }
5587 if ${ac_cv_path_COMM+:} false; then :
5588 $as_echo_n "(cached) " >&6
5589 else
5590 case $COMM in
5591 [\\/]* | ?:[\\/]*)
5592 ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5593 ;;
5594 *)
5595 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5596 for as_dir in $PATH
5597 do
5598 IFS=$as_save_IFS
5599 test -z "$as_dir" && as_dir=.
5600 for ac_exec_ext in '' $ac_executable_extensions; do
5601 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5602 ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5603 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5604 break 2
5605 fi
5606 done
5607 done
5608 IFS=$as_save_IFS
5609
5610 ;;
5611 esac
5612 fi
5613 COMM=$ac_cv_path_COMM
5614 if test -n "$COMM"; then
5615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5616 $as_echo "$COMM" >&6; }
5617 else
5618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5619 $as_echo "no" >&6; }
5620 fi
5621
5622
5623 if test "x$COMM" = x; then
5624 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5625 fi
5626 else
5627 # Otherwise we believe it is a complete path. Use it as it is.
5628 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5629 $as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5631 $as_echo_n "checking for COMM... " >&6; }
5632 if test ! -x "$tool_specified"; then
5633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5634 $as_echo "not found" >&6; }
5635 as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5636 fi
5637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5638 $as_echo "$tool_specified" >&6; }
5639 fi
5640 fi
5641 fi
5642
5643
5644
5645 if test "x$COMM" = x; then
5646 as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5647 fi
5648
5649
5650
5651
5652
5653 # Publish this variable in the help.
5654
5655
5656 if test "x$CP" = x; then
5657 # The variable is not set by user, try to locate tool using the code snippet
5658 for ac_prog in cp
5659 do
5660 # Extract the first word of "$ac_prog", so it can be a program name with args.
5661 set dummy $ac_prog; ac_word=$2
5662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5663 $as_echo_n "checking for $ac_word... " >&6; }
5664 if ${ac_cv_path_CP+:} false; then :
5665 $as_echo_n "(cached) " >&6
5666 else
5667 case $CP in
5668 [\\/]* | ?:[\\/]*)
5669 ac_cv_path_CP="$CP" # Let the user override the test with a path.
5670 ;;
5671 *)
5672 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5673 for as_dir in $PATH
5674 do
5675 IFS=$as_save_IFS
5676 test -z "$as_dir" && as_dir=.
5677 for ac_exec_ext in '' $ac_executable_extensions; do
5678 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5679 ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5680 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5681 break 2
5682 fi
5683 done
5684 done
5685 IFS=$as_save_IFS
5686
5687 ;;
5688 esac
5689 fi
5690 CP=$ac_cv_path_CP
5691 if test -n "$CP"; then
5692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5693 $as_echo "$CP" >&6; }
5694 else
5695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5696 $as_echo "no" >&6; }
5697 fi
5698
5699
5700 test -n "$CP" && break
5701 done
5702
5703 else
5704 # The variable is set, but is it from the command line or the environment?
5705
5706 # Try to remove the string !CP! from our list.
5707 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5708 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5709 # If it failed, the variable was not from the command line. Ignore it,
5710 # but warn the user (except for BASH, which is always set by the calling BASH).
5711 if test "xCP" != xBASH; then
5712 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5713 $as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5714 fi
5715 # Try to locate tool using the code snippet
5716 for ac_prog in cp
5717 do
5718 # Extract the first word of "$ac_prog", so it can be a program name with args.
5719 set dummy $ac_prog; ac_word=$2
5720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5721 $as_echo_n "checking for $ac_word... " >&6; }
5722 if ${ac_cv_path_CP+:} false; then :
5723 $as_echo_n "(cached) " >&6
5724 else
5725 case $CP in
5726 [\\/]* | ?:[\\/]*)
5727 ac_cv_path_CP="$CP" # Let the user override the test with a path.
5728 ;;
5729 *)
5730 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5731 for as_dir in $PATH
5732 do
5733 IFS=$as_save_IFS
5734 test -z "$as_dir" && as_dir=.
5735 for ac_exec_ext in '' $ac_executable_extensions; do
5736 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5737 ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5738 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5739 break 2
5740 fi
5741 done
5742 done
5743 IFS=$as_save_IFS
5744
5745 ;;
5746 esac
5747 fi
5748 CP=$ac_cv_path_CP
5749 if test -n "$CP"; then
5750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5751 $as_echo "$CP" >&6; }
5752 else
5753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5754 $as_echo "no" >&6; }
5755 fi
5756
5757
5758 test -n "$CP" && break
5759 done
5760
5761 else
5762 # If it succeeded, then it was overridden by the user. We will use it
5763 # for the tool.
5764
5765 # First remove it from the list of overridden variables, so we can test
5766 # for unknown variables in the end.
5767 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5768
5769 # Check if the provided tool contains a complete path.
5770 tool_specified="$CP"
5771 tool_basename="${tool_specified##*/}"
5772 if test "x$tool_basename" = "x$tool_specified"; then
5773 # A command without a complete path is provided, search $PATH.
5774 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5775 $as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5776 # Extract the first word of "$tool_basename", so it can be a program name with args.
5777 set dummy $tool_basename; ac_word=$2
5778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5779 $as_echo_n "checking for $ac_word... " >&6; }
5780 if ${ac_cv_path_CP+:} false; then :
5781 $as_echo_n "(cached) " >&6
5782 else
5783 case $CP in
5784 [\\/]* | ?:[\\/]*)
5785 ac_cv_path_CP="$CP" # Let the user override the test with a path.
5786 ;;
5787 *)
5788 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5789 for as_dir in $PATH
5790 do
5791 IFS=$as_save_IFS
5792 test -z "$as_dir" && as_dir=.
5793 for ac_exec_ext in '' $ac_executable_extensions; do
5794 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5795 ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5796 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5797 break 2
5798 fi
5799 done
5800 done
5801 IFS=$as_save_IFS
5802
5803 ;;
5804 esac
5805 fi
5806 CP=$ac_cv_path_CP
5807 if test -n "$CP"; then
5808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5809 $as_echo "$CP" >&6; }
5810 else
5811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5812 $as_echo "no" >&6; }
5813 fi
5814
5815
5816 if test "x$CP" = x; then
5817 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5818 fi
5819 else
5820 # Otherwise we believe it is a complete path. Use it as it is.
5821 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5822 $as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5824 $as_echo_n "checking for CP... " >&6; }
5825 if test ! -x "$tool_specified"; then
5826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5827 $as_echo "not found" >&6; }
5828 as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5829 fi
5830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5831 $as_echo "$tool_specified" >&6; }
5832 fi
5833 fi
5834 fi
5835
5836
5837
5838 if test "x$CP" = x; then
5839 as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5840 fi
5841
5842
5843
5844
5845
5846 # Publish this variable in the help.
5847
5848
5849 if test "x$CUT" = x; then
5850 # The variable is not set by user, try to locate tool using the code snippet
5851 for ac_prog in cut
5852 do
5853 # Extract the first word of "$ac_prog", so it can be a program name with args.
5854 set dummy $ac_prog; ac_word=$2
5855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5856 $as_echo_n "checking for $ac_word... " >&6; }
5857 if ${ac_cv_path_CUT+:} false; then :
5858 $as_echo_n "(cached) " >&6
5859 else
5860 case $CUT in
5861 [\\/]* | ?:[\\/]*)
5862 ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5863 ;;
5864 *)
5865 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5866 for as_dir in $PATH
5867 do
5868 IFS=$as_save_IFS
5869 test -z "$as_dir" && as_dir=.
5870 for ac_exec_ext in '' $ac_executable_extensions; do
5871 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5872 ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5873 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5874 break 2
5875 fi
5876 done
5877 done
5878 IFS=$as_save_IFS
5879
5880 ;;
5881 esac
5882 fi
5883 CUT=$ac_cv_path_CUT
5884 if test -n "$CUT"; then
5885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5886 $as_echo "$CUT" >&6; }
5887 else
5888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5889 $as_echo "no" >&6; }
5890 fi
5891
5892
5893 test -n "$CUT" && break
5894 done
5895
5896 else
5897 # The variable is set, but is it from the command line or the environment?
5898
5899 # Try to remove the string !CUT! from our list.
5900 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5901 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5902 # If it failed, the variable was not from the command line. Ignore it,
5903 # but warn the user (except for BASH, which is always set by the calling BASH).
5904 if test "xCUT" != xBASH; then
5905 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5906 $as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5907 fi
5908 # Try to locate tool using the code snippet
5909 for ac_prog in cut
5910 do
5911 # Extract the first word of "$ac_prog", so it can be a program name with args.
5912 set dummy $ac_prog; ac_word=$2
5913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5914 $as_echo_n "checking for $ac_word... " >&6; }
5915 if ${ac_cv_path_CUT+:} false; then :
5916 $as_echo_n "(cached) " >&6
5917 else
5918 case $CUT in
5919 [\\/]* | ?:[\\/]*)
5920 ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5921 ;;
5922 *)
5923 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5924 for as_dir in $PATH
5925 do
5926 IFS=$as_save_IFS
5927 test -z "$as_dir" && as_dir=.
5928 for ac_exec_ext in '' $ac_executable_extensions; do
5929 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5930 ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5931 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5932 break 2
5933 fi
5934 done
5935 done
5936 IFS=$as_save_IFS
5937
5938 ;;
5939 esac
5940 fi
5941 CUT=$ac_cv_path_CUT
5942 if test -n "$CUT"; then
5943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5944 $as_echo "$CUT" >&6; }
5945 else
5946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5947 $as_echo "no" >&6; }
5948 fi
5949
5950
5951 test -n "$CUT" && break
5952 done
5953
5954 else
5955 # If it succeeded, then it was overridden by the user. We will use it
5956 # for the tool.
5957
5958 # First remove it from the list of overridden variables, so we can test
5959 # for unknown variables in the end.
5960 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5961
5962 # Check if the provided tool contains a complete path.
5963 tool_specified="$CUT"
5964 tool_basename="${tool_specified##*/}"
5965 if test "x$tool_basename" = "x$tool_specified"; then
5966 # A command without a complete path is provided, search $PATH.
5967 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5968 $as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5969 # Extract the first word of "$tool_basename", so it can be a program name with args.
5970 set dummy $tool_basename; ac_word=$2
5971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5972 $as_echo_n "checking for $ac_word... " >&6; }
5973 if ${ac_cv_path_CUT+:} false; then :
5974 $as_echo_n "(cached) " >&6
5975 else
5976 case $CUT in
5977 [\\/]* | ?:[\\/]*)
5978 ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5979 ;;
5980 *)
5981 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5982 for as_dir in $PATH
5983 do
5984 IFS=$as_save_IFS
5985 test -z "$as_dir" && as_dir=.
5986 for ac_exec_ext in '' $ac_executable_extensions; do
5987 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5988 ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5989 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5990 break 2
5991 fi
5992 done
5993 done
5994 IFS=$as_save_IFS
5995
5996 ;;
5997 esac
5998 fi
5999 CUT=$ac_cv_path_CUT
6000 if test -n "$CUT"; then
6001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6002 $as_echo "$CUT" >&6; }
6003 else
6004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6005 $as_echo "no" >&6; }
6006 fi
6007
6008
6009 if test "x$CUT" = x; then
6010 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6011 fi
6012 else
6013 # Otherwise we believe it is a complete path. Use it as it is.
6014 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6015 $as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6017 $as_echo_n "checking for CUT... " >&6; }
6018 if test ! -x "$tool_specified"; then
6019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6020 $as_echo "not found" >&6; }
6021 as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6022 fi
6023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6024 $as_echo "$tool_specified" >&6; }
6025 fi
6026 fi
6027 fi
6028
6029
6030
6031 if test "x$CUT" = x; then
6032 as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6033 fi
6034
6035
6036
6037
6038
6039 # Publish this variable in the help.
6040
6041
6042 if test "x$DATE" = x; then
6043 # The variable is not set by user, try to locate tool using the code snippet
6044 for ac_prog in date
6045 do
6046 # Extract the first word of "$ac_prog", so it can be a program name with args.
6047 set dummy $ac_prog; ac_word=$2
6048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6049 $as_echo_n "checking for $ac_word... " >&6; }
6050 if ${ac_cv_path_DATE+:} false; then :
6051 $as_echo_n "(cached) " >&6
6052 else
6053 case $DATE in
6054 [\\/]* | ?:[\\/]*)
6055 ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6056 ;;
6057 *)
6058 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6059 for as_dir in $PATH
6060 do
6061 IFS=$as_save_IFS
6062 test -z "$as_dir" && as_dir=.
6063 for ac_exec_ext in '' $ac_executable_extensions; do
6064 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6065 ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6066 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6067 break 2
6068 fi
6069 done
6070 done
6071 IFS=$as_save_IFS
6072
6073 ;;
6074 esac
6075 fi
6076 DATE=$ac_cv_path_DATE
6077 if test -n "$DATE"; then
6078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6079 $as_echo "$DATE" >&6; }
6080 else
6081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6082 $as_echo "no" >&6; }
6083 fi
6084
6085
6086 test -n "$DATE" && break
6087 done
6088
6089 else
6090 # The variable is set, but is it from the command line or the environment?
6091
6092 # Try to remove the string !DATE! from our list.
6093 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6094 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6095 # If it failed, the variable was not from the command line. Ignore it,
6096 # but warn the user (except for BASH, which is always set by the calling BASH).
6097 if test "xDATE" != xBASH; then
6098 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6099 $as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6100 fi
6101 # Try to locate tool using the code snippet
6102 for ac_prog in date
6103 do
6104 # Extract the first word of "$ac_prog", so it can be a program name with args.
6105 set dummy $ac_prog; ac_word=$2
6106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6107 $as_echo_n "checking for $ac_word... " >&6; }
6108 if ${ac_cv_path_DATE+:} false; then :
6109 $as_echo_n "(cached) " >&6
6110 else
6111 case $DATE in
6112 [\\/]* | ?:[\\/]*)
6113 ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6114 ;;
6115 *)
6116 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6117 for as_dir in $PATH
6118 do
6119 IFS=$as_save_IFS
6120 test -z "$as_dir" && as_dir=.
6121 for ac_exec_ext in '' $ac_executable_extensions; do
6122 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6123 ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6124 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6125 break 2
6126 fi
6127 done
6128 done
6129 IFS=$as_save_IFS
6130
6131 ;;
6132 esac
6133 fi
6134 DATE=$ac_cv_path_DATE
6135 if test -n "$DATE"; then
6136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6137 $as_echo "$DATE" >&6; }
6138 else
6139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6140 $as_echo "no" >&6; }
6141 fi
6142
6143
6144 test -n "$DATE" && break
6145 done
6146
6147 else
6148 # If it succeeded, then it was overridden by the user. We will use it
6149 # for the tool.
6150
6151 # First remove it from the list of overridden variables, so we can test
6152 # for unknown variables in the end.
6153 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6154
6155 # Check if the provided tool contains a complete path.
6156 tool_specified="$DATE"
6157 tool_basename="${tool_specified##*/}"
6158 if test "x$tool_basename" = "x$tool_specified"; then
6159 # A command without a complete path is provided, search $PATH.
6160 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6161 $as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6162 # Extract the first word of "$tool_basename", so it can be a program name with args.
6163 set dummy $tool_basename; ac_word=$2
6164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6165 $as_echo_n "checking for $ac_word... " >&6; }
6166 if ${ac_cv_path_DATE+:} false; then :
6167 $as_echo_n "(cached) " >&6
6168 else
6169 case $DATE in
6170 [\\/]* | ?:[\\/]*)
6171 ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6172 ;;
6173 *)
6174 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6175 for as_dir in $PATH
6176 do
6177 IFS=$as_save_IFS
6178 test -z "$as_dir" && as_dir=.
6179 for ac_exec_ext in '' $ac_executable_extensions; do
6180 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6181 ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6182 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6183 break 2
6184 fi
6185 done
6186 done
6187 IFS=$as_save_IFS
6188
6189 ;;
6190 esac
6191 fi
6192 DATE=$ac_cv_path_DATE
6193 if test -n "$DATE"; then
6194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6195 $as_echo "$DATE" >&6; }
6196 else
6197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6198 $as_echo "no" >&6; }
6199 fi
6200
6201
6202 if test "x$DATE" = x; then
6203 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6204 fi
6205 else
6206 # Otherwise we believe it is a complete path. Use it as it is.
6207 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6208 $as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6210 $as_echo_n "checking for DATE... " >&6; }
6211 if test ! -x "$tool_specified"; then
6212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6213 $as_echo "not found" >&6; }
6214 as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6215 fi
6216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6217 $as_echo "$tool_specified" >&6; }
6218 fi
6219 fi
6220 fi
6221
6222
6223
6224 if test "x$DATE" = x; then
6225 as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6226 fi
6227
6228
6229
6230
6231
6232 # Publish this variable in the help.
6233
6234
6235 if test "x$DIFF" = x; then
6236 # The variable is not set by user, try to locate tool using the code snippet
6237 for ac_prog in gdiff diff
6238 do
6239 # Extract the first word of "$ac_prog", so it can be a program name with args.
6240 set dummy $ac_prog; ac_word=$2
6241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6242 $as_echo_n "checking for $ac_word... " >&6; }
6243 if ${ac_cv_path_DIFF+:} false; then :
6244 $as_echo_n "(cached) " >&6
6245 else
6246 case $DIFF in
6247 [\\/]* | ?:[\\/]*)
6248 ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6249 ;;
6250 *)
6251 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6252 for as_dir in $PATH
6253 do
6254 IFS=$as_save_IFS
6255 test -z "$as_dir" && as_dir=.
6256 for ac_exec_ext in '' $ac_executable_extensions; do
6257 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6258 ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6259 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6260 break 2
6261 fi
6262 done
6263 done
6264 IFS=$as_save_IFS
6265
6266 ;;
6267 esac
6268 fi
6269 DIFF=$ac_cv_path_DIFF
6270 if test -n "$DIFF"; then
6271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6272 $as_echo "$DIFF" >&6; }
6273 else
6274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6275 $as_echo "no" >&6; }
6276 fi
6277
6278
6279 test -n "$DIFF" && break
6280 done
6281
6282 else
6283 # The variable is set, but is it from the command line or the environment?
6284
6285 # Try to remove the string !DIFF! from our list.
6286 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6287 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6288 # If it failed, the variable was not from the command line. Ignore it,
6289 # but warn the user (except for BASH, which is always set by the calling BASH).
6290 if test "xDIFF" != xBASH; then
6291 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6292 $as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6293 fi
6294 # Try to locate tool using the code snippet
6295 for ac_prog in gdiff diff
6296 do
6297 # Extract the first word of "$ac_prog", so it can be a program name with args.
6298 set dummy $ac_prog; ac_word=$2
6299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6300 $as_echo_n "checking for $ac_word... " >&6; }
6301 if ${ac_cv_path_DIFF+:} false; then :
6302 $as_echo_n "(cached) " >&6
6303 else
6304 case $DIFF in
6305 [\\/]* | ?:[\\/]*)
6306 ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6307 ;;
6308 *)
6309 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6310 for as_dir in $PATH
6311 do
6312 IFS=$as_save_IFS
6313 test -z "$as_dir" && as_dir=.
6314 for ac_exec_ext in '' $ac_executable_extensions; do
6315 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6316 ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6317 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6318 break 2
6319 fi
6320 done
6321 done
6322 IFS=$as_save_IFS
6323
6324 ;;
6325 esac
6326 fi
6327 DIFF=$ac_cv_path_DIFF
6328 if test -n "$DIFF"; then
6329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6330 $as_echo "$DIFF" >&6; }
6331 else
6332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6333 $as_echo "no" >&6; }
6334 fi
6335
6336
6337 test -n "$DIFF" && break
6338 done
6339
6340 else
6341 # If it succeeded, then it was overridden by the user. We will use it
6342 # for the tool.
6343
6344 # First remove it from the list of overridden variables, so we can test
6345 # for unknown variables in the end.
6346 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6347
6348 # Check if the provided tool contains a complete path.
6349 tool_specified="$DIFF"
6350 tool_basename="${tool_specified##*/}"
6351 if test "x$tool_basename" = "x$tool_specified"; then
6352 # A command without a complete path is provided, search $PATH.
6353 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6354 $as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6355 # Extract the first word of "$tool_basename", so it can be a program name with args.
6356 set dummy $tool_basename; ac_word=$2
6357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6358 $as_echo_n "checking for $ac_word... " >&6; }
6359 if ${ac_cv_path_DIFF+:} false; then :
6360 $as_echo_n "(cached) " >&6
6361 else
6362 case $DIFF in
6363 [\\/]* | ?:[\\/]*)
6364 ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6365 ;;
6366 *)
6367 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6368 for as_dir in $PATH
6369 do
6370 IFS=$as_save_IFS
6371 test -z "$as_dir" && as_dir=.
6372 for ac_exec_ext in '' $ac_executable_extensions; do
6373 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6374 ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6375 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6376 break 2
6377 fi
6378 done
6379 done
6380 IFS=$as_save_IFS
6381
6382 ;;
6383 esac
6384 fi
6385 DIFF=$ac_cv_path_DIFF
6386 if test -n "$DIFF"; then
6387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6388 $as_echo "$DIFF" >&6; }
6389 else
6390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6391 $as_echo "no" >&6; }
6392 fi
6393
6394
6395 if test "x$DIFF" = x; then
6396 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6397 fi
6398 else
6399 # Otherwise we believe it is a complete path. Use it as it is.
6400 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6401 $as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6403 $as_echo_n "checking for DIFF... " >&6; }
6404 if test ! -x "$tool_specified"; then
6405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6406 $as_echo "not found" >&6; }
6407 as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6408 fi
6409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6410 $as_echo "$tool_specified" >&6; }
6411 fi
6412 fi
6413 fi
6414
6415
6416
6417 if test "x$DIFF" = x; then
6418 as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6419 fi
6420
6421
6422
6423
6424
6425 # Publish this variable in the help.
6426
6427
6428 if test "x$DIRNAME" = x; then
6429 # The variable is not set by user, try to locate tool using the code snippet
6430 for ac_prog in dirname
6431 do
6432 # Extract the first word of "$ac_prog", so it can be a program name with args.
6433 set dummy $ac_prog; ac_word=$2
6434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6435 $as_echo_n "checking for $ac_word... " >&6; }
6436 if ${ac_cv_path_DIRNAME+:} false; then :
6437 $as_echo_n "(cached) " >&6
6438 else
6439 case $DIRNAME in
6440 [\\/]* | ?:[\\/]*)
6441 ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6442 ;;
6443 *)
6444 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6445 for as_dir in $PATH
6446 do
6447 IFS=$as_save_IFS
6448 test -z "$as_dir" && as_dir=.
6449 for ac_exec_ext in '' $ac_executable_extensions; do
6450 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6451 ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6452 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6453 break 2
6454 fi
6455 done
6456 done
6457 IFS=$as_save_IFS
6458
6459 ;;
6460 esac
6461 fi
6462 DIRNAME=$ac_cv_path_DIRNAME
6463 if test -n "$DIRNAME"; then
6464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6465 $as_echo "$DIRNAME" >&6; }
6466 else
6467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6468 $as_echo "no" >&6; }
6469 fi
6470
6471
6472 test -n "$DIRNAME" && break
6473 done
6474
6475 else
6476 # The variable is set, but is it from the command line or the environment?
6477
6478 # Try to remove the string !DIRNAME! from our list.
6479 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6480 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6481 # If it failed, the variable was not from the command line. Ignore it,
6482 # but warn the user (except for BASH, which is always set by the calling BASH).
6483 if test "xDIRNAME" != xBASH; then
6484 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6485 $as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6486 fi
6487 # Try to locate tool using the code snippet
6488 for ac_prog in dirname
6489 do
6490 # Extract the first word of "$ac_prog", so it can be a program name with args.
6491 set dummy $ac_prog; ac_word=$2
6492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6493 $as_echo_n "checking for $ac_word... " >&6; }
6494 if ${ac_cv_path_DIRNAME+:} false; then :
6495 $as_echo_n "(cached) " >&6
6496 else
6497 case $DIRNAME in
6498 [\\/]* | ?:[\\/]*)
6499 ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6500 ;;
6501 *)
6502 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6503 for as_dir in $PATH
6504 do
6505 IFS=$as_save_IFS
6506 test -z "$as_dir" && as_dir=.
6507 for ac_exec_ext in '' $ac_executable_extensions; do
6508 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6509 ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6510 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6511 break 2
6512 fi
6513 done
6514 done
6515 IFS=$as_save_IFS
6516
6517 ;;
6518 esac
6519 fi
6520 DIRNAME=$ac_cv_path_DIRNAME
6521 if test -n "$DIRNAME"; then
6522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6523 $as_echo "$DIRNAME" >&6; }
6524 else
6525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6526 $as_echo "no" >&6; }
6527 fi
6528
6529
6530 test -n "$DIRNAME" && break
6531 done
6532
6533 else
6534 # If it succeeded, then it was overridden by the user. We will use it
6535 # for the tool.
6536
6537 # First remove it from the list of overridden variables, so we can test
6538 # for unknown variables in the end.
6539 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6540
6541 # Check if the provided tool contains a complete path.
6542 tool_specified="$DIRNAME"
6543 tool_basename="${tool_specified##*/}"
6544 if test "x$tool_basename" = "x$tool_specified"; then
6545 # A command without a complete path is provided, search $PATH.
6546 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6547 $as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6548 # Extract the first word of "$tool_basename", so it can be a program name with args.
6549 set dummy $tool_basename; ac_word=$2
6550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6551 $as_echo_n "checking for $ac_word... " >&6; }
6552 if ${ac_cv_path_DIRNAME+:} false; then :
6553 $as_echo_n "(cached) " >&6
6554 else
6555 case $DIRNAME in
6556 [\\/]* | ?:[\\/]*)
6557 ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6558 ;;
6559 *)
6560 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6561 for as_dir in $PATH
6562 do
6563 IFS=$as_save_IFS
6564 test -z "$as_dir" && as_dir=.
6565 for ac_exec_ext in '' $ac_executable_extensions; do
6566 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6567 ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6568 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6569 break 2
6570 fi
6571 done
6572 done
6573 IFS=$as_save_IFS
6574
6575 ;;
6576 esac
6577 fi
6578 DIRNAME=$ac_cv_path_DIRNAME
6579 if test -n "$DIRNAME"; then
6580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6581 $as_echo "$DIRNAME" >&6; }
6582 else
6583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6584 $as_echo "no" >&6; }
6585 fi
6586
6587
6588 if test "x$DIRNAME" = x; then
6589 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6590 fi
6591 else
6592 # Otherwise we believe it is a complete path. Use it as it is.
6593 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6594 $as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6596 $as_echo_n "checking for DIRNAME... " >&6; }
6597 if test ! -x "$tool_specified"; then
6598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6599 $as_echo "not found" >&6; }
6600 as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6601 fi
6602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6603 $as_echo "$tool_specified" >&6; }
6604 fi
6605 fi
6606 fi
6607
6608
6609
6610 if test "x$DIRNAME" = x; then
6611 as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6612 fi
6613
6614
6615
6616
6617
6618 # Publish this variable in the help.
6619
6620
6621 if test "x$ECHO" = x; then
6622 # The variable is not set by user, try to locate tool using the code snippet
6623 for ac_prog in echo
6624 do
6625 # Extract the first word of "$ac_prog", so it can be a program name with args.
6626 set dummy $ac_prog; ac_word=$2
6627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6628 $as_echo_n "checking for $ac_word... " >&6; }
6629 if ${ac_cv_path_ECHO+:} false; then :
6630 $as_echo_n "(cached) " >&6
6631 else
6632 case $ECHO in
6633 [\\/]* | ?:[\\/]*)
6634 ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6635 ;;
6636 *)
6637 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6638 for as_dir in $PATH
6639 do
6640 IFS=$as_save_IFS
6641 test -z "$as_dir" && as_dir=.
6642 for ac_exec_ext in '' $ac_executable_extensions; do
6643 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6644 ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6645 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6646 break 2
6647 fi
6648 done
6649 done
6650 IFS=$as_save_IFS
6651
6652 ;;
6653 esac
6654 fi
6655 ECHO=$ac_cv_path_ECHO
6656 if test -n "$ECHO"; then
6657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6658 $as_echo "$ECHO" >&6; }
6659 else
6660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6661 $as_echo "no" >&6; }
6662 fi
6663
6664
6665 test -n "$ECHO" && break
6666 done
6667
6668 else
6669 # The variable is set, but is it from the command line or the environment?
6670
6671 # Try to remove the string !ECHO! from our list.
6672 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6673 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6674 # If it failed, the variable was not from the command line. Ignore it,
6675 # but warn the user (except for BASH, which is always set by the calling BASH).
6676 if test "xECHO" != xBASH; then
6677 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6678 $as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6679 fi
6680 # Try to locate tool using the code snippet
6681 for ac_prog in echo
6682 do
6683 # Extract the first word of "$ac_prog", so it can be a program name with args.
6684 set dummy $ac_prog; ac_word=$2
6685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6686 $as_echo_n "checking for $ac_word... " >&6; }
6687 if ${ac_cv_path_ECHO+:} false; then :
6688 $as_echo_n "(cached) " >&6
6689 else
6690 case $ECHO in
6691 [\\/]* | ?:[\\/]*)
6692 ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6693 ;;
6694 *)
6695 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6696 for as_dir in $PATH
6697 do
6698 IFS=$as_save_IFS
6699 test -z "$as_dir" && as_dir=.
6700 for ac_exec_ext in '' $ac_executable_extensions; do
6701 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6702 ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6703 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6704 break 2
6705 fi
6706 done
6707 done
6708 IFS=$as_save_IFS
6709
6710 ;;
6711 esac
6712 fi
6713 ECHO=$ac_cv_path_ECHO
6714 if test -n "$ECHO"; then
6715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6716 $as_echo "$ECHO" >&6; }
6717 else
6718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6719 $as_echo "no" >&6; }
6720 fi
6721
6722
6723 test -n "$ECHO" && break
6724 done
6725
6726 else
6727 # If it succeeded, then it was overridden by the user. We will use it
6728 # for the tool.
6729
6730 # First remove it from the list of overridden variables, so we can test
6731 # for unknown variables in the end.
6732 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6733
6734 # Check if the provided tool contains a complete path.
6735 tool_specified="$ECHO"
6736 tool_basename="${tool_specified##*/}"
6737 if test "x$tool_basename" = "x$tool_specified"; then
6738 # A command without a complete path is provided, search $PATH.
6739 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6740 $as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6741 # Extract the first word of "$tool_basename", so it can be a program name with args.
6742 set dummy $tool_basename; ac_word=$2
6743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6744 $as_echo_n "checking for $ac_word... " >&6; }
6745 if ${ac_cv_path_ECHO+:} false; then :
6746 $as_echo_n "(cached) " >&6
6747 else
6748 case $ECHO in
6749 [\\/]* | ?:[\\/]*)
6750 ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6751 ;;
6752 *)
6753 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6754 for as_dir in $PATH
6755 do
6756 IFS=$as_save_IFS
6757 test -z "$as_dir" && as_dir=.
6758 for ac_exec_ext in '' $ac_executable_extensions; do
6759 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6760 ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6761 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6762 break 2
6763 fi
6764 done
6765 done
6766 IFS=$as_save_IFS
6767
6768 ;;
6769 esac
6770 fi
6771 ECHO=$ac_cv_path_ECHO
6772 if test -n "$ECHO"; then
6773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6774 $as_echo "$ECHO" >&6; }
6775 else
6776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6777 $as_echo "no" >&6; }
6778 fi
6779
6780
6781 if test "x$ECHO" = x; then
6782 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6783 fi
6784 else
6785 # Otherwise we believe it is a complete path. Use it as it is.
6786 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6787 $as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6789 $as_echo_n "checking for ECHO... " >&6; }
6790 if test ! -x "$tool_specified"; then
6791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6792 $as_echo "not found" >&6; }
6793 as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6794 fi
6795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6796 $as_echo "$tool_specified" >&6; }
6797 fi
6798 fi
6799 fi
6800
6801
6802
6803 if test "x$ECHO" = x; then
6804 as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6805 fi
6806
6807
6808
6809
6810
6811 # Publish this variable in the help.
6812
6813
6814 if test "x$EXPR" = x; then
6815 # The variable is not set by user, try to locate tool using the code snippet
6816 for ac_prog in expr
6817 do
6818 # Extract the first word of "$ac_prog", so it can be a program name with args.
6819 set dummy $ac_prog; ac_word=$2
6820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6821 $as_echo_n "checking for $ac_word... " >&6; }
6822 if ${ac_cv_path_EXPR+:} false; then :
6823 $as_echo_n "(cached) " >&6
6824 else
6825 case $EXPR in
6826 [\\/]* | ?:[\\/]*)
6827 ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6828 ;;
6829 *)
6830 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6831 for as_dir in $PATH
6832 do
6833 IFS=$as_save_IFS
6834 test -z "$as_dir" && as_dir=.
6835 for ac_exec_ext in '' $ac_executable_extensions; do
6836 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6837 ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6838 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6839 break 2
6840 fi
6841 done
6842 done
6843 IFS=$as_save_IFS
6844
6845 ;;
6846 esac
6847 fi
6848 EXPR=$ac_cv_path_EXPR
6849 if test -n "$EXPR"; then
6850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6851 $as_echo "$EXPR" >&6; }
6852 else
6853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6854 $as_echo "no" >&6; }
6855 fi
6856
6857
6858 test -n "$EXPR" && break
6859 done
6860
6861 else
6862 # The variable is set, but is it from the command line or the environment?
6863
6864 # Try to remove the string !EXPR! from our list.
6865 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6866 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6867 # If it failed, the variable was not from the command line. Ignore it,
6868 # but warn the user (except for BASH, which is always set by the calling BASH).
6869 if test "xEXPR" != xBASH; then
6870 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6871 $as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6872 fi
6873 # Try to locate tool using the code snippet
6874 for ac_prog in expr
6875 do
6876 # Extract the first word of "$ac_prog", so it can be a program name with args.
6877 set dummy $ac_prog; ac_word=$2
6878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6879 $as_echo_n "checking for $ac_word... " >&6; }
6880 if ${ac_cv_path_EXPR+:} false; then :
6881 $as_echo_n "(cached) " >&6
6882 else
6883 case $EXPR in
6884 [\\/]* | ?:[\\/]*)
6885 ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6886 ;;
6887 *)
6888 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6889 for as_dir in $PATH
6890 do
6891 IFS=$as_save_IFS
6892 test -z "$as_dir" && as_dir=.
6893 for ac_exec_ext in '' $ac_executable_extensions; do
6894 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6895 ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6896 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6897 break 2
6898 fi
6899 done
6900 done
6901 IFS=$as_save_IFS
6902
6903 ;;
6904 esac
6905 fi
6906 EXPR=$ac_cv_path_EXPR
6907 if test -n "$EXPR"; then
6908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6909 $as_echo "$EXPR" >&6; }
6910 else
6911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6912 $as_echo "no" >&6; }
6913 fi
6914
6915
6916 test -n "$EXPR" && break
6917 done
6918
6919 else
6920 # If it succeeded, then it was overridden by the user. We will use it
6921 # for the tool.
6922
6923 # First remove it from the list of overridden variables, so we can test
6924 # for unknown variables in the end.
6925 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6926
6927 # Check if the provided tool contains a complete path.
6928 tool_specified="$EXPR"
6929 tool_basename="${tool_specified##*/}"
6930 if test "x$tool_basename" = "x$tool_specified"; then
6931 # A command without a complete path is provided, search $PATH.
6932 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6933 $as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6934 # Extract the first word of "$tool_basename", so it can be a program name with args.
6935 set dummy $tool_basename; ac_word=$2
6936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6937 $as_echo_n "checking for $ac_word... " >&6; }
6938 if ${ac_cv_path_EXPR+:} false; then :
6939 $as_echo_n "(cached) " >&6
6940 else
6941 case $EXPR in
6942 [\\/]* | ?:[\\/]*)
6943 ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6944 ;;
6945 *)
6946 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6947 for as_dir in $PATH
6948 do
6949 IFS=$as_save_IFS
6950 test -z "$as_dir" && as_dir=.
6951 for ac_exec_ext in '' $ac_executable_extensions; do
6952 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6953 ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6954 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6955 break 2
6956 fi
6957 done
6958 done
6959 IFS=$as_save_IFS
6960
6961 ;;
6962 esac
6963 fi
6964 EXPR=$ac_cv_path_EXPR
6965 if test -n "$EXPR"; then
6966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6967 $as_echo "$EXPR" >&6; }
6968 else
6969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6970 $as_echo "no" >&6; }
6971 fi
6972
6973
6974 if test "x$EXPR" = x; then
6975 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6976 fi
6977 else
6978 # Otherwise we believe it is a complete path. Use it as it is.
6979 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6980 $as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6982 $as_echo_n "checking for EXPR... " >&6; }
6983 if test ! -x "$tool_specified"; then
6984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6985 $as_echo "not found" >&6; }
6986 as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6987 fi
6988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6989 $as_echo "$tool_specified" >&6; }
6990 fi
6991 fi
6992 fi
6993
6994
6995
6996 if test "x$EXPR" = x; then
6997 as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6998 fi
6999
7000
7001
7002
7003
7004 # Publish this variable in the help.
7005
7006
7007 if test "x$FILE" = x; then
7008 # The variable is not set by user, try to locate tool using the code snippet
7009 for ac_prog in file
7010 do
7011 # Extract the first word of "$ac_prog", so it can be a program name with args.
7012 set dummy $ac_prog; ac_word=$2
7013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7014 $as_echo_n "checking for $ac_word... " >&6; }
7015 if ${ac_cv_path_FILE+:} false; then :
7016 $as_echo_n "(cached) " >&6
7017 else
7018 case $FILE in
7019 [\\/]* | ?:[\\/]*)
7020 ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7021 ;;
7022 *)
7023 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7024 for as_dir in $PATH
7025 do
7026 IFS=$as_save_IFS
7027 test -z "$as_dir" && as_dir=.
7028 for ac_exec_ext in '' $ac_executable_extensions; do
7029 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7030 ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7031 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7032 break 2
7033 fi
7034 done
7035 done
7036 IFS=$as_save_IFS
7037
7038 ;;
7039 esac
7040 fi
7041 FILE=$ac_cv_path_FILE
7042 if test -n "$FILE"; then
7043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7044 $as_echo "$FILE" >&6; }
7045 else
7046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7047 $as_echo "no" >&6; }
7048 fi
7049
7050
7051 test -n "$FILE" && break
7052 done
7053
7054 else
7055 # The variable is set, but is it from the command line or the environment?
7056
7057 # Try to remove the string !FILE! from our list.
7058 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7059 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7060 # If it failed, the variable was not from the command line. Ignore it,
7061 # but warn the user (except for BASH, which is always set by the calling BASH).
7062 if test "xFILE" != xBASH; then
7063 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7064 $as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7065 fi
7066 # Try to locate tool using the code snippet
7067 for ac_prog in file
7068 do
7069 # Extract the first word of "$ac_prog", so it can be a program name with args.
7070 set dummy $ac_prog; ac_word=$2
7071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7072 $as_echo_n "checking for $ac_word... " >&6; }
7073 if ${ac_cv_path_FILE+:} false; then :
7074 $as_echo_n "(cached) " >&6
7075 else
7076 case $FILE in
7077 [\\/]* | ?:[\\/]*)
7078 ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7079 ;;
7080 *)
7081 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7082 for as_dir in $PATH
7083 do
7084 IFS=$as_save_IFS
7085 test -z "$as_dir" && as_dir=.
7086 for ac_exec_ext in '' $ac_executable_extensions; do
7087 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7088 ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7089 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7090 break 2
7091 fi
7092 done
7093 done
7094 IFS=$as_save_IFS
7095
7096 ;;
7097 esac
7098 fi
7099 FILE=$ac_cv_path_FILE
7100 if test -n "$FILE"; then
7101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7102 $as_echo "$FILE" >&6; }
7103 else
7104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7105 $as_echo "no" >&6; }
7106 fi
7107
7108
7109 test -n "$FILE" && break
7110 done
7111
7112 else
7113 # If it succeeded, then it was overridden by the user. We will use it
7114 # for the tool.
7115
7116 # First remove it from the list of overridden variables, so we can test
7117 # for unknown variables in the end.
7118 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7119
7120 # Check if the provided tool contains a complete path.
7121 tool_specified="$FILE"
7122 tool_basename="${tool_specified##*/}"
7123 if test "x$tool_basename" = "x$tool_specified"; then
7124 # A command without a complete path is provided, search $PATH.
7125 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7126 $as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7127 # Extract the first word of "$tool_basename", so it can be a program name with args.
7128 set dummy $tool_basename; ac_word=$2
7129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7130 $as_echo_n "checking for $ac_word... " >&6; }
7131 if ${ac_cv_path_FILE+:} false; then :
7132 $as_echo_n "(cached) " >&6
7133 else
7134 case $FILE in
7135 [\\/]* | ?:[\\/]*)
7136 ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7137 ;;
7138 *)
7139 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7140 for as_dir in $PATH
7141 do
7142 IFS=$as_save_IFS
7143 test -z "$as_dir" && as_dir=.
7144 for ac_exec_ext in '' $ac_executable_extensions; do
7145 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7146 ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7147 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7148 break 2
7149 fi
7150 done
7151 done
7152 IFS=$as_save_IFS
7153
7154 ;;
7155 esac
7156 fi
7157 FILE=$ac_cv_path_FILE
7158 if test -n "$FILE"; then
7159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7160 $as_echo "$FILE" >&6; }
7161 else
7162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7163 $as_echo "no" >&6; }
7164 fi
7165
7166
7167 if test "x$FILE" = x; then
7168 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7169 fi
7170 else
7171 # Otherwise we believe it is a complete path. Use it as it is.
7172 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7173 $as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7175 $as_echo_n "checking for FILE... " >&6; }
7176 if test ! -x "$tool_specified"; then
7177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7178 $as_echo "not found" >&6; }
7179 as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7180 fi
7181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7182 $as_echo "$tool_specified" >&6; }
7183 fi
7184 fi
7185 fi
7186
7187
7188
7189 if test "x$FILE" = x; then
7190 as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7191 fi
7192
7193
7194
7195
7196
7197 # Publish this variable in the help.
7198
7199
7200 if test "x$FIND" = x; then
7201 # The variable is not set by user, try to locate tool using the code snippet
7202 for ac_prog in find
7203 do
7204 # Extract the first word of "$ac_prog", so it can be a program name with args.
7205 set dummy $ac_prog; ac_word=$2
7206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7207 $as_echo_n "checking for $ac_word... " >&6; }
7208 if ${ac_cv_path_FIND+:} false; then :
7209 $as_echo_n "(cached) " >&6
7210 else
7211 case $FIND in
7212 [\\/]* | ?:[\\/]*)
7213 ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7214 ;;
7215 *)
7216 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7217 for as_dir in $PATH
7218 do
7219 IFS=$as_save_IFS
7220 test -z "$as_dir" && as_dir=.
7221 for ac_exec_ext in '' $ac_executable_extensions; do
7222 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7223 ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7224 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7225 break 2
7226 fi
7227 done
7228 done
7229 IFS=$as_save_IFS
7230
7231 ;;
7232 esac
7233 fi
7234 FIND=$ac_cv_path_FIND
7235 if test -n "$FIND"; then
7236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7237 $as_echo "$FIND" >&6; }
7238 else
7239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7240 $as_echo "no" >&6; }
7241 fi
7242
7243
7244 test -n "$FIND" && break
7245 done
7246
7247 else
7248 # The variable is set, but is it from the command line or the environment?
7249
7250 # Try to remove the string !FIND! from our list.
7251 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7252 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7253 # If it failed, the variable was not from the command line. Ignore it,
7254 # but warn the user (except for BASH, which is always set by the calling BASH).
7255 if test "xFIND" != xBASH; then
7256 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7257 $as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7258 fi
7259 # Try to locate tool using the code snippet
7260 for ac_prog in find
7261 do
7262 # Extract the first word of "$ac_prog", so it can be a program name with args.
7263 set dummy $ac_prog; ac_word=$2
7264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7265 $as_echo_n "checking for $ac_word... " >&6; }
7266 if ${ac_cv_path_FIND+:} false; then :
7267 $as_echo_n "(cached) " >&6
7268 else
7269 case $FIND in
7270 [\\/]* | ?:[\\/]*)
7271 ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7272 ;;
7273 *)
7274 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7275 for as_dir in $PATH
7276 do
7277 IFS=$as_save_IFS
7278 test -z "$as_dir" && as_dir=.
7279 for ac_exec_ext in '' $ac_executable_extensions; do
7280 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7281 ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7282 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7283 break 2
7284 fi
7285 done
7286 done
7287 IFS=$as_save_IFS
7288
7289 ;;
7290 esac
7291 fi
7292 FIND=$ac_cv_path_FIND
7293 if test -n "$FIND"; then
7294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7295 $as_echo "$FIND" >&6; }
7296 else
7297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7298 $as_echo "no" >&6; }
7299 fi
7300
7301
7302 test -n "$FIND" && break
7303 done
7304
7305 else
7306 # If it succeeded, then it was overridden by the user. We will use it
7307 # for the tool.
7308
7309 # First remove it from the list of overridden variables, so we can test
7310 # for unknown variables in the end.
7311 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7312
7313 # Check if the provided tool contains a complete path.
7314 tool_specified="$FIND"
7315 tool_basename="${tool_specified##*/}"
7316 if test "x$tool_basename" = "x$tool_specified"; then
7317 # A command without a complete path is provided, search $PATH.
7318 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7319 $as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7320 # Extract the first word of "$tool_basename", so it can be a program name with args.
7321 set dummy $tool_basename; ac_word=$2
7322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7323 $as_echo_n "checking for $ac_word... " >&6; }
7324 if ${ac_cv_path_FIND+:} false; then :
7325 $as_echo_n "(cached) " >&6
7326 else
7327 case $FIND in
7328 [\\/]* | ?:[\\/]*)
7329 ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7330 ;;
7331 *)
7332 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7333 for as_dir in $PATH
7334 do
7335 IFS=$as_save_IFS
7336 test -z "$as_dir" && as_dir=.
7337 for ac_exec_ext in '' $ac_executable_extensions; do
7338 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7339 ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7340 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7341 break 2
7342 fi
7343 done
7344 done
7345 IFS=$as_save_IFS
7346
7347 ;;
7348 esac
7349 fi
7350 FIND=$ac_cv_path_FIND
7351 if test -n "$FIND"; then
7352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7353 $as_echo "$FIND" >&6; }
7354 else
7355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7356 $as_echo "no" >&6; }
7357 fi
7358
7359
7360 if test "x$FIND" = x; then
7361 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7362 fi
7363 else
7364 # Otherwise we believe it is a complete path. Use it as it is.
7365 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7366 $as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7368 $as_echo_n "checking for FIND... " >&6; }
7369 if test ! -x "$tool_specified"; then
7370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7371 $as_echo "not found" >&6; }
7372 as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7373 fi
7374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7375 $as_echo "$tool_specified" >&6; }
7376 fi
7377 fi
7378 fi
7379
7380
7381
7382 if test "x$FIND" = x; then
7383 as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7384 fi
7385
7386
7387
7388
7389
7390 # Publish this variable in the help.
7391
7392
7393 if test "x$HEAD" = x; then
7394 # The variable is not set by user, try to locate tool using the code snippet
7395 for ac_prog in head
7396 do
7397 # Extract the first word of "$ac_prog", so it can be a program name with args.
7398 set dummy $ac_prog; ac_word=$2
7399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7400 $as_echo_n "checking for $ac_word... " >&6; }
7401 if ${ac_cv_path_HEAD+:} false; then :
7402 $as_echo_n "(cached) " >&6
7403 else
7404 case $HEAD in
7405 [\\/]* | ?:[\\/]*)
7406 ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7407 ;;
7408 *)
7409 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7410 for as_dir in $PATH
7411 do
7412 IFS=$as_save_IFS
7413 test -z "$as_dir" && as_dir=.
7414 for ac_exec_ext in '' $ac_executable_extensions; do
7415 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7416 ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7417 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7418 break 2
7419 fi
7420 done
7421 done
7422 IFS=$as_save_IFS
7423
7424 ;;
7425 esac
7426 fi
7427 HEAD=$ac_cv_path_HEAD
7428 if test -n "$HEAD"; then
7429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7430 $as_echo "$HEAD" >&6; }
7431 else
7432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7433 $as_echo "no" >&6; }
7434 fi
7435
7436
7437 test -n "$HEAD" && break
7438 done
7439
7440 else
7441 # The variable is set, but is it from the command line or the environment?
7442
7443 # Try to remove the string !HEAD! from our list.
7444 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7445 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7446 # If it failed, the variable was not from the command line. Ignore it,
7447 # but warn the user (except for BASH, which is always set by the calling BASH).
7448 if test "xHEAD" != xBASH; then
7449 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7450 $as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7451 fi
7452 # Try to locate tool using the code snippet
7453 for ac_prog in head
7454 do
7455 # Extract the first word of "$ac_prog", so it can be a program name with args.
7456 set dummy $ac_prog; ac_word=$2
7457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7458 $as_echo_n "checking for $ac_word... " >&6; }
7459 if ${ac_cv_path_HEAD+:} false; then :
7460 $as_echo_n "(cached) " >&6
7461 else
7462 case $HEAD in
7463 [\\/]* | ?:[\\/]*)
7464 ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7465 ;;
7466 *)
7467 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7468 for as_dir in $PATH
7469 do
7470 IFS=$as_save_IFS
7471 test -z "$as_dir" && as_dir=.
7472 for ac_exec_ext in '' $ac_executable_extensions; do
7473 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7474 ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7475 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7476 break 2
7477 fi
7478 done
7479 done
7480 IFS=$as_save_IFS
7481
7482 ;;
7483 esac
7484 fi
7485 HEAD=$ac_cv_path_HEAD
7486 if test -n "$HEAD"; then
7487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7488 $as_echo "$HEAD" >&6; }
7489 else
7490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7491 $as_echo "no" >&6; }
7492 fi
7493
7494
7495 test -n "$HEAD" && break
7496 done
7497
7498 else
7499 # If it succeeded, then it was overridden by the user. We will use it
7500 # for the tool.
7501
7502 # First remove it from the list of overridden variables, so we can test
7503 # for unknown variables in the end.
7504 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7505
7506 # Check if the provided tool contains a complete path.
7507 tool_specified="$HEAD"
7508 tool_basename="${tool_specified##*/}"
7509 if test "x$tool_basename" = "x$tool_specified"; then
7510 # A command without a complete path is provided, search $PATH.
7511 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7512 $as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7513 # Extract the first word of "$tool_basename", so it can be a program name with args.
7514 set dummy $tool_basename; ac_word=$2
7515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7516 $as_echo_n "checking for $ac_word... " >&6; }
7517 if ${ac_cv_path_HEAD+:} false; then :
7518 $as_echo_n "(cached) " >&6
7519 else
7520 case $HEAD in
7521 [\\/]* | ?:[\\/]*)
7522 ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7523 ;;
7524 *)
7525 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7526 for as_dir in $PATH
7527 do
7528 IFS=$as_save_IFS
7529 test -z "$as_dir" && as_dir=.
7530 for ac_exec_ext in '' $ac_executable_extensions; do
7531 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7532 ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7533 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7534 break 2
7535 fi
7536 done
7537 done
7538 IFS=$as_save_IFS
7539
7540 ;;
7541 esac
7542 fi
7543 HEAD=$ac_cv_path_HEAD
7544 if test -n "$HEAD"; then
7545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7546 $as_echo "$HEAD" >&6; }
7547 else
7548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7549 $as_echo "no" >&6; }
7550 fi
7551
7552
7553 if test "x$HEAD" = x; then
7554 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7555 fi
7556 else
7557 # Otherwise we believe it is a complete path. Use it as it is.
7558 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7559 $as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7561 $as_echo_n "checking for HEAD... " >&6; }
7562 if test ! -x "$tool_specified"; then
7563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7564 $as_echo "not found" >&6; }
7565 as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7566 fi
7567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7568 $as_echo "$tool_specified" >&6; }
7569 fi
7570 fi
7571 fi
7572
7573
7574
7575 if test "x$HEAD" = x; then
7576 as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7577 fi
7578
7579
7580
7581
7582
7583 # Publish this variable in the help.
7584
7585
7586 if test "x$LN" = x; then
7587 # The variable is not set by user, try to locate tool using the code snippet
7588 for ac_prog in ln
7589 do
7590 # Extract the first word of "$ac_prog", so it can be a program name with args.
7591 set dummy $ac_prog; ac_word=$2
7592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7593 $as_echo_n "checking for $ac_word... " >&6; }
7594 if ${ac_cv_path_LN+:} false; then :
7595 $as_echo_n "(cached) " >&6
7596 else
7597 case $LN in
7598 [\\/]* | ?:[\\/]*)
7599 ac_cv_path_LN="$LN" # Let the user override the test with a path.
7600 ;;
7601 *)
7602 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7603 for as_dir in $PATH
7604 do
7605 IFS=$as_save_IFS
7606 test -z "$as_dir" && as_dir=.
7607 for ac_exec_ext in '' $ac_executable_extensions; do
7608 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7609 ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7610 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7611 break 2
7612 fi
7613 done
7614 done
7615 IFS=$as_save_IFS
7616
7617 ;;
7618 esac
7619 fi
7620 LN=$ac_cv_path_LN
7621 if test -n "$LN"; then
7622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7623 $as_echo "$LN" >&6; }
7624 else
7625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7626 $as_echo "no" >&6; }
7627 fi
7628
7629
7630 test -n "$LN" && break
7631 done
7632
7633 else
7634 # The variable is set, but is it from the command line or the environment?
7635
7636 # Try to remove the string !LN! from our list.
7637 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7638 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7639 # If it failed, the variable was not from the command line. Ignore it,
7640 # but warn the user (except for BASH, which is always set by the calling BASH).
7641 if test "xLN" != xBASH; then
7642 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7643 $as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7644 fi
7645 # Try to locate tool using the code snippet
7646 for ac_prog in ln
7647 do
7648 # Extract the first word of "$ac_prog", so it can be a program name with args.
7649 set dummy $ac_prog; ac_word=$2
7650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7651 $as_echo_n "checking for $ac_word... " >&6; }
7652 if ${ac_cv_path_LN+:} false; then :
7653 $as_echo_n "(cached) " >&6
7654 else
7655 case $LN in
7656 [\\/]* | ?:[\\/]*)
7657 ac_cv_path_LN="$LN" # Let the user override the test with a path.
7658 ;;
7659 *)
7660 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7661 for as_dir in $PATH
7662 do
7663 IFS=$as_save_IFS
7664 test -z "$as_dir" && as_dir=.
7665 for ac_exec_ext in '' $ac_executable_extensions; do
7666 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7667 ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7668 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7669 break 2
7670 fi
7671 done
7672 done
7673 IFS=$as_save_IFS
7674
7675 ;;
7676 esac
7677 fi
7678 LN=$ac_cv_path_LN
7679 if test -n "$LN"; then
7680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7681 $as_echo "$LN" >&6; }
7682 else
7683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7684 $as_echo "no" >&6; }
7685 fi
7686
7687
7688 test -n "$LN" && break
7689 done
7690
7691 else
7692 # If it succeeded, then it was overridden by the user. We will use it
7693 # for the tool.
7694
7695 # First remove it from the list of overridden variables, so we can test
7696 # for unknown variables in the end.
7697 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7698
7699 # Check if the provided tool contains a complete path.
7700 tool_specified="$LN"
7701 tool_basename="${tool_specified##*/}"
7702 if test "x$tool_basename" = "x$tool_specified"; then
7703 # A command without a complete path is provided, search $PATH.
7704 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7705 $as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7706 # Extract the first word of "$tool_basename", so it can be a program name with args.
7707 set dummy $tool_basename; ac_word=$2
7708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7709 $as_echo_n "checking for $ac_word... " >&6; }
7710 if ${ac_cv_path_LN+:} false; then :
7711 $as_echo_n "(cached) " >&6
7712 else
7713 case $LN in
7714 [\\/]* | ?:[\\/]*)
7715 ac_cv_path_LN="$LN" # Let the user override the test with a path.
7716 ;;
7717 *)
7718 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7719 for as_dir in $PATH
7720 do
7721 IFS=$as_save_IFS
7722 test -z "$as_dir" && as_dir=.
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_path_LN="$as_dir/$ac_word$ac_exec_ext"
7726 $as_echo "$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 ;;
7734 esac
7735 fi
7736 LN=$ac_cv_path_LN
7737 if test -n "$LN"; then
7738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7739 $as_echo "$LN" >&6; }
7740 else
7741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7742 $as_echo "no" >&6; }
7743 fi
7744
7745
7746 if test "x$LN" = x; then
7747 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7748 fi
7749 else
7750 # Otherwise we believe it is a complete path. Use it as it is.
7751 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7752 $as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7754 $as_echo_n "checking for LN... " >&6; }
7755 if test ! -x "$tool_specified"; then
7756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7757 $as_echo "not found" >&6; }
7758 as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7759 fi
7760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7761 $as_echo "$tool_specified" >&6; }
7762 fi
7763 fi
7764 fi
7765
7766
7767
7768 if test "x$LN" = x; then
7769 as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7770 fi
7771
7772
7773
7774
7775
7776 # Publish this variable in the help.
7777
7778
7779 if test "x$LS" = x; then
7780 # The variable is not set by user, try to locate tool using the code snippet
7781 for ac_prog in ls
7782 do
7783 # Extract the first word of "$ac_prog", so it can be a program name with args.
7784 set dummy $ac_prog; ac_word=$2
7785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7786 $as_echo_n "checking for $ac_word... " >&6; }
7787 if ${ac_cv_path_LS+:} false; then :
7788 $as_echo_n "(cached) " >&6
7789 else
7790 case $LS in
7791 [\\/]* | ?:[\\/]*)
7792 ac_cv_path_LS="$LS" # Let the user override the test with a path.
7793 ;;
7794 *)
7795 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7796 for as_dir in $PATH
7797 do
7798 IFS=$as_save_IFS
7799 test -z "$as_dir" && as_dir=.
7800 for ac_exec_ext in '' $ac_executable_extensions; do
7801 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7802 ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7803 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7804 break 2
7805 fi
7806 done
7807 done
7808 IFS=$as_save_IFS
7809
7810 ;;
7811 esac
7812 fi
7813 LS=$ac_cv_path_LS
7814 if test -n "$LS"; then
7815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7816 $as_echo "$LS" >&6; }
7817 else
7818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7819 $as_echo "no" >&6; }
7820 fi
7821
7822
7823 test -n "$LS" && break
7824 done
7825
7826 else
7827 # The variable is set, but is it from the command line or the environment?
7828
7829 # Try to remove the string !LS! from our list.
7830 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7831 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7832 # If it failed, the variable was not from the command line. Ignore it,
7833 # but warn the user (except for BASH, which is always set by the calling BASH).
7834 if test "xLS" != xBASH; then
7835 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7836 $as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7837 fi
7838 # Try to locate tool using the code snippet
7839 for ac_prog in ls
7840 do
7841 # Extract the first word of "$ac_prog", so it can be a program name with args.
7842 set dummy $ac_prog; ac_word=$2
7843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7844 $as_echo_n "checking for $ac_word... " >&6; }
7845 if ${ac_cv_path_LS+:} false; then :
7846 $as_echo_n "(cached) " >&6
7847 else
7848 case $LS in
7849 [\\/]* | ?:[\\/]*)
7850 ac_cv_path_LS="$LS" # Let the user override the test with a path.
7851 ;;
7852 *)
7853 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7854 for as_dir in $PATH
7855 do
7856 IFS=$as_save_IFS
7857 test -z "$as_dir" && as_dir=.
7858 for ac_exec_ext in '' $ac_executable_extensions; do
7859 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7860 ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7861 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7862 break 2
7863 fi
7864 done
7865 done
7866 IFS=$as_save_IFS
7867
7868 ;;
7869 esac
7870 fi
7871 LS=$ac_cv_path_LS
7872 if test -n "$LS"; then
7873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7874 $as_echo "$LS" >&6; }
7875 else
7876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7877 $as_echo "no" >&6; }
7878 fi
7879
7880
7881 test -n "$LS" && break
7882 done
7883
7884 else
7885 # If it succeeded, then it was overridden by the user. We will use it
7886 # for the tool.
7887
7888 # First remove it from the list of overridden variables, so we can test
7889 # for unknown variables in the end.
7890 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7891
7892 # Check if the provided tool contains a complete path.
7893 tool_specified="$LS"
7894 tool_basename="${tool_specified##*/}"
7895 if test "x$tool_basename" = "x$tool_specified"; then
7896 # A command without a complete path is provided, search $PATH.
7897 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7898 $as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7899 # Extract the first word of "$tool_basename", so it can be a program name with args.
7900 set dummy $tool_basename; ac_word=$2
7901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7902 $as_echo_n "checking for $ac_word... " >&6; }
7903 if ${ac_cv_path_LS+:} false; then :
7904 $as_echo_n "(cached) " >&6
7905 else
7906 case $LS in
7907 [\\/]* | ?:[\\/]*)
7908 ac_cv_path_LS="$LS" # Let the user override the test with a path.
7909 ;;
7910 *)
7911 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7912 for as_dir in $PATH
7913 do
7914 IFS=$as_save_IFS
7915 test -z "$as_dir" && as_dir=.
7916 for ac_exec_ext in '' $ac_executable_extensions; do
7917 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7918 ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7919 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7920 break 2
7921 fi
7922 done
7923 done
7924 IFS=$as_save_IFS
7925
7926 ;;
7927 esac
7928 fi
7929 LS=$ac_cv_path_LS
7930 if test -n "$LS"; then
7931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7932 $as_echo "$LS" >&6; }
7933 else
7934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7935 $as_echo "no" >&6; }
7936 fi
7937
7938
7939 if test "x$LS" = x; then
7940 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7941 fi
7942 else
7943 # Otherwise we believe it is a complete path. Use it as it is.
7944 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7945 $as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7947 $as_echo_n "checking for LS... " >&6; }
7948 if test ! -x "$tool_specified"; then
7949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7950 $as_echo "not found" >&6; }
7951 as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7952 fi
7953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7954 $as_echo "$tool_specified" >&6; }
7955 fi
7956 fi
7957 fi
7958
7959
7960
7961 if test "x$LS" = x; then
7962 as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7963 fi
7964
7965
7966
7967
7968
7969 # Publish this variable in the help.
7970
7971
7972 if test "x$MKDIR" = x; then
7973 # The variable is not set by user, try to locate tool using the code snippet
7974 for ac_prog in mkdir
7975 do
7976 # Extract the first word of "$ac_prog", so it can be a program name with args.
7977 set dummy $ac_prog; ac_word=$2
7978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7979 $as_echo_n "checking for $ac_word... " >&6; }
7980 if ${ac_cv_path_MKDIR+:} false; then :
7981 $as_echo_n "(cached) " >&6
7982 else
7983 case $MKDIR in
7984 [\\/]* | ?:[\\/]*)
7985 ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7986 ;;
7987 *)
7988 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7989 for as_dir in $PATH
7990 do
7991 IFS=$as_save_IFS
7992 test -z "$as_dir" && as_dir=.
7993 for ac_exec_ext in '' $ac_executable_extensions; do
7994 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7995 ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7996 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7997 break 2
7998 fi
7999 done
8000 done
8001 IFS=$as_save_IFS
8002
8003 ;;
8004 esac
8005 fi
8006 MKDIR=$ac_cv_path_MKDIR
8007 if test -n "$MKDIR"; then
8008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8009 $as_echo "$MKDIR" >&6; }
8010 else
8011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8012 $as_echo "no" >&6; }
8013 fi
8014
8015
8016 test -n "$MKDIR" && break
8017 done
8018
8019 else
8020 # The variable is set, but is it from the command line or the environment?
8021
8022 # Try to remove the string !MKDIR! from our list.
8023 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8024 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8025 # If it failed, the variable was not from the command line. Ignore it,
8026 # but warn the user (except for BASH, which is always set by the calling BASH).
8027 if test "xMKDIR" != xBASH; then
8028 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8029 $as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8030 fi
8031 # Try to locate tool using the code snippet
8032 for ac_prog in mkdir
8033 do
8034 # Extract the first word of "$ac_prog", so it can be a program name with args.
8035 set dummy $ac_prog; ac_word=$2
8036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8037 $as_echo_n "checking for $ac_word... " >&6; }
8038 if ${ac_cv_path_MKDIR+:} false; then :
8039 $as_echo_n "(cached) " >&6
8040 else
8041 case $MKDIR in
8042 [\\/]* | ?:[\\/]*)
8043 ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8044 ;;
8045 *)
8046 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8047 for as_dir in $PATH
8048 do
8049 IFS=$as_save_IFS
8050 test -z "$as_dir" && as_dir=.
8051 for ac_exec_ext in '' $ac_executable_extensions; do
8052 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8053 ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8054 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8055 break 2
8056 fi
8057 done
8058 done
8059 IFS=$as_save_IFS
8060
8061 ;;
8062 esac
8063 fi
8064 MKDIR=$ac_cv_path_MKDIR
8065 if test -n "$MKDIR"; then
8066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8067 $as_echo "$MKDIR" >&6; }
8068 else
8069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8070 $as_echo "no" >&6; }
8071 fi
8072
8073
8074 test -n "$MKDIR" && break
8075 done
8076
8077 else
8078 # If it succeeded, then it was overridden by the user. We will use it
8079 # for the tool.
8080
8081 # First remove it from the list of overridden variables, so we can test
8082 # for unknown variables in the end.
8083 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8084
8085 # Check if the provided tool contains a complete path.
8086 tool_specified="$MKDIR"
8087 tool_basename="${tool_specified##*/}"
8088 if test "x$tool_basename" = "x$tool_specified"; then
8089 # A command without a complete path is provided, search $PATH.
8090 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8091 $as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8092 # Extract the first word of "$tool_basename", so it can be a program name with args.
8093 set dummy $tool_basename; ac_word=$2
8094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8095 $as_echo_n "checking for $ac_word... " >&6; }
8096 if ${ac_cv_path_MKDIR+:} false; then :
8097 $as_echo_n "(cached) " >&6
8098 else
8099 case $MKDIR in
8100 [\\/]* | ?:[\\/]*)
8101 ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8102 ;;
8103 *)
8104 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8105 for as_dir in $PATH
8106 do
8107 IFS=$as_save_IFS
8108 test -z "$as_dir" && as_dir=.
8109 for ac_exec_ext in '' $ac_executable_extensions; do
8110 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8111 ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8112 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8113 break 2
8114 fi
8115 done
8116 done
8117 IFS=$as_save_IFS
8118
8119 ;;
8120 esac
8121 fi
8122 MKDIR=$ac_cv_path_MKDIR
8123 if test -n "$MKDIR"; then
8124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8125 $as_echo "$MKDIR" >&6; }
8126 else
8127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8128 $as_echo "no" >&6; }
8129 fi
8130
8131
8132 if test "x$MKDIR" = x; then
8133 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8134 fi
8135 else
8136 # Otherwise we believe it is a complete path. Use it as it is.
8137 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8138 $as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8140 $as_echo_n "checking for MKDIR... " >&6; }
8141 if test ! -x "$tool_specified"; then
8142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8143 $as_echo "not found" >&6; }
8144 as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8145 fi
8146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8147 $as_echo "$tool_specified" >&6; }
8148 fi
8149 fi
8150 fi
8151
8152
8153
8154 if test "x$MKDIR" = x; then
8155 as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8156 fi
8157
8158
8159
8160
8161
8162 # Publish this variable in the help.
8163
8164
8165 if test "x$MKTEMP" = x; then
8166 # The variable is not set by user, try to locate tool using the code snippet
8167 for ac_prog in mktemp
8168 do
8169 # Extract the first word of "$ac_prog", so it can be a program name with args.
8170 set dummy $ac_prog; ac_word=$2
8171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8172 $as_echo_n "checking for $ac_word... " >&6; }
8173 if ${ac_cv_path_MKTEMP+:} false; then :
8174 $as_echo_n "(cached) " >&6
8175 else
8176 case $MKTEMP in
8177 [\\/]* | ?:[\\/]*)
8178 ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8179 ;;
8180 *)
8181 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8182 for as_dir in $PATH
8183 do
8184 IFS=$as_save_IFS
8185 test -z "$as_dir" && as_dir=.
8186 for ac_exec_ext in '' $ac_executable_extensions; do
8187 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8188 ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8189 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8190 break 2
8191 fi
8192 done
8193 done
8194 IFS=$as_save_IFS
8195
8196 ;;
8197 esac
8198 fi
8199 MKTEMP=$ac_cv_path_MKTEMP
8200 if test -n "$MKTEMP"; then
8201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8202 $as_echo "$MKTEMP" >&6; }
8203 else
8204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8205 $as_echo "no" >&6; }
8206 fi
8207
8208
8209 test -n "$MKTEMP" && break
8210 done
8211
8212 else
8213 # The variable is set, but is it from the command line or the environment?
8214
8215 # Try to remove the string !MKTEMP! from our list.
8216 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8217 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8218 # If it failed, the variable was not from the command line. Ignore it,
8219 # but warn the user (except for BASH, which is always set by the calling BASH).
8220 if test "xMKTEMP" != xBASH; then
8221 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8222 $as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8223 fi
8224 # Try to locate tool using the code snippet
8225 for ac_prog in mktemp
8226 do
8227 # Extract the first word of "$ac_prog", so it can be a program name with args.
8228 set dummy $ac_prog; ac_word=$2
8229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8230 $as_echo_n "checking for $ac_word... " >&6; }
8231 if ${ac_cv_path_MKTEMP+:} false; then :
8232 $as_echo_n "(cached) " >&6
8233 else
8234 case $MKTEMP in
8235 [\\/]* | ?:[\\/]*)
8236 ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8237 ;;
8238 *)
8239 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8240 for as_dir in $PATH
8241 do
8242 IFS=$as_save_IFS
8243 test -z "$as_dir" && as_dir=.
8244 for ac_exec_ext in '' $ac_executable_extensions; do
8245 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8246 ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8247 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8248 break 2
8249 fi
8250 done
8251 done
8252 IFS=$as_save_IFS
8253
8254 ;;
8255 esac
8256 fi
8257 MKTEMP=$ac_cv_path_MKTEMP
8258 if test -n "$MKTEMP"; then
8259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8260 $as_echo "$MKTEMP" >&6; }
8261 else
8262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8263 $as_echo "no" >&6; }
8264 fi
8265
8266
8267 test -n "$MKTEMP" && break
8268 done
8269
8270 else
8271 # If it succeeded, then it was overridden by the user. We will use it
8272 # for the tool.
8273
8274 # First remove it from the list of overridden variables, so we can test
8275 # for unknown variables in the end.
8276 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8277
8278 # Check if the provided tool contains a complete path.
8279 tool_specified="$MKTEMP"
8280 tool_basename="${tool_specified##*/}"
8281 if test "x$tool_basename" = "x$tool_specified"; then
8282 # A command without a complete path is provided, search $PATH.
8283 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8284 $as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8285 # Extract the first word of "$tool_basename", so it can be a program name with args.
8286 set dummy $tool_basename; ac_word=$2
8287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8288 $as_echo_n "checking for $ac_word... " >&6; }
8289 if ${ac_cv_path_MKTEMP+:} false; then :
8290 $as_echo_n "(cached) " >&6
8291 else
8292 case $MKTEMP in
8293 [\\/]* | ?:[\\/]*)
8294 ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8295 ;;
8296 *)
8297 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8298 for as_dir in $PATH
8299 do
8300 IFS=$as_save_IFS
8301 test -z "$as_dir" && as_dir=.
8302 for ac_exec_ext in '' $ac_executable_extensions; do
8303 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8304 ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8305 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8306 break 2
8307 fi
8308 done
8309 done
8310 IFS=$as_save_IFS
8311
8312 ;;
8313 esac
8314 fi
8315 MKTEMP=$ac_cv_path_MKTEMP
8316 if test -n "$MKTEMP"; then
8317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8318 $as_echo "$MKTEMP" >&6; }
8319 else
8320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8321 $as_echo "no" >&6; }
8322 fi
8323
8324
8325 if test "x$MKTEMP" = x; then
8326 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8327 fi
8328 else
8329 # Otherwise we believe it is a complete path. Use it as it is.
8330 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8331 $as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8333 $as_echo_n "checking for MKTEMP... " >&6; }
8334 if test ! -x "$tool_specified"; then
8335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8336 $as_echo "not found" >&6; }
8337 as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8338 fi
8339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8340 $as_echo "$tool_specified" >&6; }
8341 fi
8342 fi
8343 fi
8344
8345
8346
8347 if test "x$MKTEMP" = x; then
8348 as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8349 fi
8350
8351
8352
8353
8354
8355 # Publish this variable in the help.
8356
8357
8358 if test "x$MV" = x; then
8359 # The variable is not set by user, try to locate tool using the code snippet
8360 for ac_prog in mv
8361 do
8362 # Extract the first word of "$ac_prog", so it can be a program name with args.
8363 set dummy $ac_prog; ac_word=$2
8364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8365 $as_echo_n "checking for $ac_word... " >&6; }
8366 if ${ac_cv_path_MV+:} false; then :
8367 $as_echo_n "(cached) " >&6
8368 else
8369 case $MV in
8370 [\\/]* | ?:[\\/]*)
8371 ac_cv_path_MV="$MV" # Let the user override the test with a path.
8372 ;;
8373 *)
8374 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8375 for as_dir in $PATH
8376 do
8377 IFS=$as_save_IFS
8378 test -z "$as_dir" && as_dir=.
8379 for ac_exec_ext in '' $ac_executable_extensions; do
8380 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8381 ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8382 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8383 break 2
8384 fi
8385 done
8386 done
8387 IFS=$as_save_IFS
8388
8389 ;;
8390 esac
8391 fi
8392 MV=$ac_cv_path_MV
8393 if test -n "$MV"; then
8394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8395 $as_echo "$MV" >&6; }
8396 else
8397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8398 $as_echo "no" >&6; }
8399 fi
8400
8401
8402 test -n "$MV" && break
8403 done
8404
8405 else
8406 # The variable is set, but is it from the command line or the environment?
8407
8408 # Try to remove the string !MV! from our list.
8409 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8410 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8411 # If it failed, the variable was not from the command line. Ignore it,
8412 # but warn the user (except for BASH, which is always set by the calling BASH).
8413 if test "xMV" != xBASH; then
8414 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8415 $as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8416 fi
8417 # Try to locate tool using the code snippet
8418 for ac_prog in mv
8419 do
8420 # Extract the first word of "$ac_prog", so it can be a program name with args.
8421 set dummy $ac_prog; ac_word=$2
8422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8423 $as_echo_n "checking for $ac_word... " >&6; }
8424 if ${ac_cv_path_MV+:} false; then :
8425 $as_echo_n "(cached) " >&6
8426 else
8427 case $MV in
8428 [\\/]* | ?:[\\/]*)
8429 ac_cv_path_MV="$MV" # Let the user override the test with a path.
8430 ;;
8431 *)
8432 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8433 for as_dir in $PATH
8434 do
8435 IFS=$as_save_IFS
8436 test -z "$as_dir" && as_dir=.
8437 for ac_exec_ext in '' $ac_executable_extensions; do
8438 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8439 ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8440 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8441 break 2
8442 fi
8443 done
8444 done
8445 IFS=$as_save_IFS
8446
8447 ;;
8448 esac
8449 fi
8450 MV=$ac_cv_path_MV
8451 if test -n "$MV"; then
8452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8453 $as_echo "$MV" >&6; }
8454 else
8455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8456 $as_echo "no" >&6; }
8457 fi
8458
8459
8460 test -n "$MV" && break
8461 done
8462
8463 else
8464 # If it succeeded, then it was overridden by the user. We will use it
8465 # for the tool.
8466
8467 # First remove it from the list of overridden variables, so we can test
8468 # for unknown variables in the end.
8469 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8470
8471 # Check if the provided tool contains a complete path.
8472 tool_specified="$MV"
8473 tool_basename="${tool_specified##*/}"
8474 if test "x$tool_basename" = "x$tool_specified"; then
8475 # A command without a complete path is provided, search $PATH.
8476 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8477 $as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8478 # Extract the first word of "$tool_basename", so it can be a program name with args.
8479 set dummy $tool_basename; ac_word=$2
8480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8481 $as_echo_n "checking for $ac_word... " >&6; }
8482 if ${ac_cv_path_MV+:} false; then :
8483 $as_echo_n "(cached) " >&6
8484 else
8485 case $MV in
8486 [\\/]* | ?:[\\/]*)
8487 ac_cv_path_MV="$MV" # Let the user override the test with a path.
8488 ;;
8489 *)
8490 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8491 for as_dir in $PATH
8492 do
8493 IFS=$as_save_IFS
8494 test -z "$as_dir" && as_dir=.
8495 for ac_exec_ext in '' $ac_executable_extensions; do
8496 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8497 ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8498 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8499 break 2
8500 fi
8501 done
8502 done
8503 IFS=$as_save_IFS
8504
8505 ;;
8506 esac
8507 fi
8508 MV=$ac_cv_path_MV
8509 if test -n "$MV"; then
8510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8511 $as_echo "$MV" >&6; }
8512 else
8513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8514 $as_echo "no" >&6; }
8515 fi
8516
8517
8518 if test "x$MV" = x; then
8519 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8520 fi
8521 else
8522 # Otherwise we believe it is a complete path. Use it as it is.
8523 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8524 $as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8526 $as_echo_n "checking for MV... " >&6; }
8527 if test ! -x "$tool_specified"; then
8528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8529 $as_echo "not found" >&6; }
8530 as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8531 fi
8532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8533 $as_echo "$tool_specified" >&6; }
8534 fi
8535 fi
8536 fi
8537
8538
8539
8540 if test "x$MV" = x; then
8541 as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8542 fi
8543
8544
8545
8546
8547
8548 # Publish this variable in the help.
8549
8550
8551 if test "x$NAWK" = x; then
8552 # The variable is not set by user, try to locate tool using the code snippet
8553 for ac_prog in nawk gawk awk
8554 do
8555 # Extract the first word of "$ac_prog", so it can be a program name with args.
8556 set dummy $ac_prog; ac_word=$2
8557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8558 $as_echo_n "checking for $ac_word... " >&6; }
8559 if ${ac_cv_path_NAWK+:} false; then :
8560 $as_echo_n "(cached) " >&6
8561 else
8562 case $NAWK in
8563 [\\/]* | ?:[\\/]*)
8564 ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8565 ;;
8566 *)
8567 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8568 for as_dir in $PATH
8569 do
8570 IFS=$as_save_IFS
8571 test -z "$as_dir" && as_dir=.
8572 for ac_exec_ext in '' $ac_executable_extensions; do
8573 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8574 ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8575 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8576 break 2
8577 fi
8578 done
8579 done
8580 IFS=$as_save_IFS
8581
8582 ;;
8583 esac
8584 fi
8585 NAWK=$ac_cv_path_NAWK
8586 if test -n "$NAWK"; then
8587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8588 $as_echo "$NAWK" >&6; }
8589 else
8590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8591 $as_echo "no" >&6; }
8592 fi
8593
8594
8595 test -n "$NAWK" && break
8596 done
8597
8598 else
8599 # The variable is set, but is it from the command line or the environment?
8600
8601 # Try to remove the string !NAWK! from our list.
8602 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8603 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8604 # If it failed, the variable was not from the command line. Ignore it,
8605 # but warn the user (except for BASH, which is always set by the calling BASH).
8606 if test "xNAWK" != xBASH; then
8607 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8608 $as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8609 fi
8610 # Try to locate tool using the code snippet
8611 for ac_prog in nawk gawk awk
8612 do
8613 # Extract the first word of "$ac_prog", so it can be a program name with args.
8614 set dummy $ac_prog; ac_word=$2
8615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8616 $as_echo_n "checking for $ac_word... " >&6; }
8617 if ${ac_cv_path_NAWK+:} false; then :
8618 $as_echo_n "(cached) " >&6
8619 else
8620 case $NAWK in
8621 [\\/]* | ?:[\\/]*)
8622 ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8623 ;;
8624 *)
8625 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8626 for as_dir in $PATH
8627 do
8628 IFS=$as_save_IFS
8629 test -z "$as_dir" && as_dir=.
8630 for ac_exec_ext in '' $ac_executable_extensions; do
8631 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8632 ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8633 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8634 break 2
8635 fi
8636 done
8637 done
8638 IFS=$as_save_IFS
8639
8640 ;;
8641 esac
8642 fi
8643 NAWK=$ac_cv_path_NAWK
8644 if test -n "$NAWK"; then
8645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8646 $as_echo "$NAWK" >&6; }
8647 else
8648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8649 $as_echo "no" >&6; }
8650 fi
8651
8652
8653 test -n "$NAWK" && break
8654 done
8655
8656 else
8657 # If it succeeded, then it was overridden by the user. We will use it
8658 # for the tool.
8659
8660 # First remove it from the list of overridden variables, so we can test
8661 # for unknown variables in the end.
8662 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8663
8664 # Check if the provided tool contains a complete path.
8665 tool_specified="$NAWK"
8666 tool_basename="${tool_specified##*/}"
8667 if test "x$tool_basename" = "x$tool_specified"; then
8668 # A command without a complete path is provided, search $PATH.
8669 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8670 $as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8671 # Extract the first word of "$tool_basename", so it can be a program name with args.
8672 set dummy $tool_basename; ac_word=$2
8673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8674 $as_echo_n "checking for $ac_word... " >&6; }
8675 if ${ac_cv_path_NAWK+:} false; then :
8676 $as_echo_n "(cached) " >&6
8677 else
8678 case $NAWK in
8679 [\\/]* | ?:[\\/]*)
8680 ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8681 ;;
8682 *)
8683 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8684 for as_dir in $PATH
8685 do
8686 IFS=$as_save_IFS
8687 test -z "$as_dir" && as_dir=.
8688 for ac_exec_ext in '' $ac_executable_extensions; do
8689 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8690 ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8691 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8692 break 2
8693 fi
8694 done
8695 done
8696 IFS=$as_save_IFS
8697
8698 ;;
8699 esac
8700 fi
8701 NAWK=$ac_cv_path_NAWK
8702 if test -n "$NAWK"; then
8703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8704 $as_echo "$NAWK" >&6; }
8705 else
8706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8707 $as_echo "no" >&6; }
8708 fi
8709
8710
8711 if test "x$NAWK" = x; then
8712 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8713 fi
8714 else
8715 # Otherwise we believe it is a complete path. Use it as it is.
8716 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8717 $as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8719 $as_echo_n "checking for NAWK... " >&6; }
8720 if test ! -x "$tool_specified"; then
8721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8722 $as_echo "not found" >&6; }
8723 as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8724 fi
8725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8726 $as_echo "$tool_specified" >&6; }
8727 fi
8728 fi
8729 fi
8730
8731
8732
8733 if test "x$NAWK" = x; then
8734 as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8735 fi
8736
8737
8738
8739
8740
8741 # Publish this variable in the help.
8742
8743
8744 if test "x$PRINTF" = x; then
8745 # The variable is not set by user, try to locate tool using the code snippet
8746 for ac_prog in printf
8747 do
8748 # Extract the first word of "$ac_prog", so it can be a program name with args.
8749 set dummy $ac_prog; ac_word=$2
8750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8751 $as_echo_n "checking for $ac_word... " >&6; }
8752 if ${ac_cv_path_PRINTF+:} false; then :
8753 $as_echo_n "(cached) " >&6
8754 else
8755 case $PRINTF in
8756 [\\/]* | ?:[\\/]*)
8757 ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8758 ;;
8759 *)
8760 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8761 for as_dir in $PATH
8762 do
8763 IFS=$as_save_IFS
8764 test -z "$as_dir" && as_dir=.
8765 for ac_exec_ext in '' $ac_executable_extensions; do
8766 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8767 ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8768 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8769 break 2
8770 fi
8771 done
8772 done
8773 IFS=$as_save_IFS
8774
8775 ;;
8776 esac
8777 fi
8778 PRINTF=$ac_cv_path_PRINTF
8779 if test -n "$PRINTF"; then
8780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8781 $as_echo "$PRINTF" >&6; }
8782 else
8783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8784 $as_echo "no" >&6; }
8785 fi
8786
8787
8788 test -n "$PRINTF" && break
8789 done
8790
8791 else
8792 # The variable is set, but is it from the command line or the environment?
8793
8794 # Try to remove the string !PRINTF! from our list.
8795 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8796 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8797 # If it failed, the variable was not from the command line. Ignore it,
8798 # but warn the user (except for BASH, which is always set by the calling BASH).
8799 if test "xPRINTF" != xBASH; then
8800 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8801 $as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8802 fi
8803 # Try to locate tool using the code snippet
8804 for ac_prog in printf
8805 do
8806 # Extract the first word of "$ac_prog", so it can be a program name with args.
8807 set dummy $ac_prog; ac_word=$2
8808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8809 $as_echo_n "checking for $ac_word... " >&6; }
8810 if ${ac_cv_path_PRINTF+:} false; then :
8811 $as_echo_n "(cached) " >&6
8812 else
8813 case $PRINTF in
8814 [\\/]* | ?:[\\/]*)
8815 ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8816 ;;
8817 *)
8818 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8819 for as_dir in $PATH
8820 do
8821 IFS=$as_save_IFS
8822 test -z "$as_dir" && as_dir=.
8823 for ac_exec_ext in '' $ac_executable_extensions; do
8824 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8825 ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8826 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8827 break 2
8828 fi
8829 done
8830 done
8831 IFS=$as_save_IFS
8832
8833 ;;
8834 esac
8835 fi
8836 PRINTF=$ac_cv_path_PRINTF
8837 if test -n "$PRINTF"; then
8838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8839 $as_echo "$PRINTF" >&6; }
8840 else
8841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8842 $as_echo "no" >&6; }
8843 fi
8844
8845
8846 test -n "$PRINTF" && break
8847 done
8848
8849 else
8850 # If it succeeded, then it was overridden by the user. We will use it
8851 # for the tool.
8852
8853 # First remove it from the list of overridden variables, so we can test
8854 # for unknown variables in the end.
8855 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8856
8857 # Check if the provided tool contains a complete path.
8858 tool_specified="$PRINTF"
8859 tool_basename="${tool_specified##*/}"
8860 if test "x$tool_basename" = "x$tool_specified"; then
8861 # A command without a complete path is provided, search $PATH.
8862 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8863 $as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8864 # Extract the first word of "$tool_basename", so it can be a program name with args.
8865 set dummy $tool_basename; ac_word=$2
8866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8867 $as_echo_n "checking for $ac_word... " >&6; }
8868 if ${ac_cv_path_PRINTF+:} false; then :
8869 $as_echo_n "(cached) " >&6
8870 else
8871 case $PRINTF in
8872 [\\/]* | ?:[\\/]*)
8873 ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8874 ;;
8875 *)
8876 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8877 for as_dir in $PATH
8878 do
8879 IFS=$as_save_IFS
8880 test -z "$as_dir" && as_dir=.
8881 for ac_exec_ext in '' $ac_executable_extensions; do
8882 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8883 ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8884 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8885 break 2
8886 fi
8887 done
8888 done
8889 IFS=$as_save_IFS
8890
8891 ;;
8892 esac
8893 fi
8894 PRINTF=$ac_cv_path_PRINTF
8895 if test -n "$PRINTF"; then
8896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8897 $as_echo "$PRINTF" >&6; }
8898 else
8899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8900 $as_echo "no" >&6; }
8901 fi
8902
8903
8904 if test "x$PRINTF" = x; then
8905 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8906 fi
8907 else
8908 # Otherwise we believe it is a complete path. Use it as it is.
8909 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8910 $as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8912 $as_echo_n "checking for PRINTF... " >&6; }
8913 if test ! -x "$tool_specified"; then
8914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8915 $as_echo "not found" >&6; }
8916 as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8917 fi
8918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8919 $as_echo "$tool_specified" >&6; }
8920 fi
8921 fi
8922 fi
8923
8924
8925
8926 if test "x$PRINTF" = x; then
8927 as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8928 fi
8929
8930
8931
8932
8933
8934 # Publish this variable in the help.
8935
8936
8937 if test "x$RM" = x; then
8938 # The variable is not set by user, try to locate tool using the code snippet
8939 for ac_prog in rm
8940 do
8941 # Extract the first word of "$ac_prog", so it can be a program name with args.
8942 set dummy $ac_prog; ac_word=$2
8943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8944 $as_echo_n "checking for $ac_word... " >&6; }
8945 if ${ac_cv_path_RM+:} false; then :
8946 $as_echo_n "(cached) " >&6
8947 else
8948 case $RM in
8949 [\\/]* | ?:[\\/]*)
8950 ac_cv_path_RM="$RM" # Let the user override the test with a path.
8951 ;;
8952 *)
8953 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8954 for as_dir in $PATH
8955 do
8956 IFS=$as_save_IFS
8957 test -z "$as_dir" && as_dir=.
8958 for ac_exec_ext in '' $ac_executable_extensions; do
8959 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8960 ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8961 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8962 break 2
8963 fi
8964 done
8965 done
8966 IFS=$as_save_IFS
8967
8968 ;;
8969 esac
8970 fi
8971 RM=$ac_cv_path_RM
8972 if test -n "$RM"; then
8973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8974 $as_echo "$RM" >&6; }
8975 else
8976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8977 $as_echo "no" >&6; }
8978 fi
8979
8980
8981 test -n "$RM" && break
8982 done
8983
8984 else
8985 # The variable is set, but is it from the command line or the environment?
8986
8987 # Try to remove the string !RM! from our list.
8988 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8989 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8990 # If it failed, the variable was not from the command line. Ignore it,
8991 # but warn the user (except for BASH, which is always set by the calling BASH).
8992 if test "xRM" != xBASH; then
8993 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8994 $as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8995 fi
8996 # Try to locate tool using the code snippet
8997 for ac_prog in rm
8998 do
8999 # Extract the first word of "$ac_prog", so it can be a program name with args.
9000 set dummy $ac_prog; ac_word=$2
9001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9002 $as_echo_n "checking for $ac_word... " >&6; }
9003 if ${ac_cv_path_RM+:} false; then :
9004 $as_echo_n "(cached) " >&6
9005 else
9006 case $RM in
9007 [\\/]* | ?:[\\/]*)
9008 ac_cv_path_RM="$RM" # Let the user override the test with a path.
9009 ;;
9010 *)
9011 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9012 for as_dir in $PATH
9013 do
9014 IFS=$as_save_IFS
9015 test -z "$as_dir" && as_dir=.
9016 for ac_exec_ext in '' $ac_executable_extensions; do
9017 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9018 ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9019 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9020 break 2
9021 fi
9022 done
9023 done
9024 IFS=$as_save_IFS
9025
9026 ;;
9027 esac
9028 fi
9029 RM=$ac_cv_path_RM
9030 if test -n "$RM"; then
9031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9032 $as_echo "$RM" >&6; }
9033 else
9034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9035 $as_echo "no" >&6; }
9036 fi
9037
9038
9039 test -n "$RM" && break
9040 done
9041
9042 else
9043 # If it succeeded, then it was overridden by the user. We will use it
9044 # for the tool.
9045
9046 # First remove it from the list of overridden variables, so we can test
9047 # for unknown variables in the end.
9048 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9049
9050 # Check if the provided tool contains a complete path.
9051 tool_specified="$RM"
9052 tool_basename="${tool_specified##*/}"
9053 if test "x$tool_basename" = "x$tool_specified"; then
9054 # A command without a complete path is provided, search $PATH.
9055 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9056 $as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9057 # Extract the first word of "$tool_basename", so it can be a program name with args.
9058 set dummy $tool_basename; ac_word=$2
9059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9060 $as_echo_n "checking for $ac_word... " >&6; }
9061 if ${ac_cv_path_RM+:} false; then :
9062 $as_echo_n "(cached) " >&6
9063 else
9064 case $RM in
9065 [\\/]* | ?:[\\/]*)
9066 ac_cv_path_RM="$RM" # Let the user override the test with a path.
9067 ;;
9068 *)
9069 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9070 for as_dir in $PATH
9071 do
9072 IFS=$as_save_IFS
9073 test -z "$as_dir" && as_dir=.
9074 for ac_exec_ext in '' $ac_executable_extensions; do
9075 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9076 ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9077 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9078 break 2
9079 fi
9080 done
9081 done
9082 IFS=$as_save_IFS
9083
9084 ;;
9085 esac
9086 fi
9087 RM=$ac_cv_path_RM
9088 if test -n "$RM"; then
9089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9090 $as_echo "$RM" >&6; }
9091 else
9092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9093 $as_echo "no" >&6; }
9094 fi
9095
9096
9097 if test "x$RM" = x; then
9098 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9099 fi
9100 else
9101 # Otherwise we believe it is a complete path. Use it as it is.
9102 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9103 $as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9105 $as_echo_n "checking for RM... " >&6; }
9106 if test ! -x "$tool_specified"; then
9107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9108 $as_echo "not found" >&6; }
9109 as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9110 fi
9111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9112 $as_echo "$tool_specified" >&6; }
9113 fi
9114 fi
9115 fi
9116
9117
9118
9119 if test "x$RM" = x; then
9120 as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9121 fi
9122
9123
9124
9125
9126
9127 # Publish this variable in the help.
9128
9129
9130 if test "x$SH" = x; then
9131 # The variable is not set by user, try to locate tool using the code snippet
9132 for ac_prog in sh
9133 do
9134 # Extract the first word of "$ac_prog", so it can be a program name with args.
9135 set dummy $ac_prog; ac_word=$2
9136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9137 $as_echo_n "checking for $ac_word... " >&6; }
9138 if ${ac_cv_path_SH+:} false; then :
9139 $as_echo_n "(cached) " >&6
9140 else
9141 case $SH in
9142 [\\/]* | ?:[\\/]*)
9143 ac_cv_path_SH="$SH" # Let the user override the test with a path.
9144 ;;
9145 *)
9146 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9147 for as_dir in $PATH
9148 do
9149 IFS=$as_save_IFS
9150 test -z "$as_dir" && as_dir=.
9151 for ac_exec_ext in '' $ac_executable_extensions; do
9152 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9153 ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9154 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9155 break 2
9156 fi
9157 done
9158 done
9159 IFS=$as_save_IFS
9160
9161 ;;
9162 esac
9163 fi
9164 SH=$ac_cv_path_SH
9165 if test -n "$SH"; then
9166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9167 $as_echo "$SH" >&6; }
9168 else
9169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9170 $as_echo "no" >&6; }
9171 fi
9172
9173
9174 test -n "$SH" && break
9175 done
9176
9177 else
9178 # The variable is set, but is it from the command line or the environment?
9179
9180 # Try to remove the string !SH! from our list.
9181 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9182 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9183 # If it failed, the variable was not from the command line. Ignore it,
9184 # but warn the user (except for BASH, which is always set by the calling BASH).
9185 if test "xSH" != xBASH; then
9186 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9187 $as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9188 fi
9189 # Try to locate tool using the code snippet
9190 for ac_prog in sh
9191 do
9192 # Extract the first word of "$ac_prog", so it can be a program name with args.
9193 set dummy $ac_prog; ac_word=$2
9194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9195 $as_echo_n "checking for $ac_word... " >&6; }
9196 if ${ac_cv_path_SH+:} false; then :
9197 $as_echo_n "(cached) " >&6
9198 else
9199 case $SH in
9200 [\\/]* | ?:[\\/]*)
9201 ac_cv_path_SH="$SH" # Let the user override the test with a path.
9202 ;;
9203 *)
9204 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9205 for as_dir in $PATH
9206 do
9207 IFS=$as_save_IFS
9208 test -z "$as_dir" && as_dir=.
9209 for ac_exec_ext in '' $ac_executable_extensions; do
9210 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9211 ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9212 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9213 break 2
9214 fi
9215 done
9216 done
9217 IFS=$as_save_IFS
9218
9219 ;;
9220 esac
9221 fi
9222 SH=$ac_cv_path_SH
9223 if test -n "$SH"; then
9224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9225 $as_echo "$SH" >&6; }
9226 else
9227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9228 $as_echo "no" >&6; }
9229 fi
9230
9231
9232 test -n "$SH" && break
9233 done
9234
9235 else
9236 # If it succeeded, then it was overridden by the user. We will use it
9237 # for the tool.
9238
9239 # First remove it from the list of overridden variables, so we can test
9240 # for unknown variables in the end.
9241 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9242
9243 # Check if the provided tool contains a complete path.
9244 tool_specified="$SH"
9245 tool_basename="${tool_specified##*/}"
9246 if test "x$tool_basename" = "x$tool_specified"; then
9247 # A command without a complete path is provided, search $PATH.
9248 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9249 $as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9250 # Extract the first word of "$tool_basename", so it can be a program name with args.
9251 set dummy $tool_basename; ac_word=$2
9252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9253 $as_echo_n "checking for $ac_word... " >&6; }
9254 if ${ac_cv_path_SH+:} false; then :
9255 $as_echo_n "(cached) " >&6
9256 else
9257 case $SH in
9258 [\\/]* | ?:[\\/]*)
9259 ac_cv_path_SH="$SH" # Let the user override the test with a path.
9260 ;;
9261 *)
9262 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9263 for as_dir in $PATH
9264 do
9265 IFS=$as_save_IFS
9266 test -z "$as_dir" && as_dir=.
9267 for ac_exec_ext in '' $ac_executable_extensions; do
9268 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9269 ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9270 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9271 break 2
9272 fi
9273 done
9274 done
9275 IFS=$as_save_IFS
9276
9277 ;;
9278 esac
9279 fi
9280 SH=$ac_cv_path_SH
9281 if test -n "$SH"; then
9282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9283 $as_echo "$SH" >&6; }
9284 else
9285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9286 $as_echo "no" >&6; }
9287 fi
9288
9289
9290 if test "x$SH" = x; then
9291 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9292 fi
9293 else
9294 # Otherwise we believe it is a complete path. Use it as it is.
9295 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9296 $as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9298 $as_echo_n "checking for SH... " >&6; }
9299 if test ! -x "$tool_specified"; then
9300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9301 $as_echo "not found" >&6; }
9302 as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9303 fi
9304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9305 $as_echo "$tool_specified" >&6; }
9306 fi
9307 fi
9308 fi
9309
9310
9311
9312 if test "x$SH" = x; then
9313 as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9314 fi
9315
9316
9317
9318
9319
9320 # Publish this variable in the help.
9321
9322
9323 if test "x$SORT" = x; then
9324 # The variable is not set by user, try to locate tool using the code snippet
9325 for ac_prog in sort
9326 do
9327 # Extract the first word of "$ac_prog", so it can be a program name with args.
9328 set dummy $ac_prog; ac_word=$2
9329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9330 $as_echo_n "checking for $ac_word... " >&6; }
9331 if ${ac_cv_path_SORT+:} false; then :
9332 $as_echo_n "(cached) " >&6
9333 else
9334 case $SORT in
9335 [\\/]* | ?:[\\/]*)
9336 ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9337 ;;
9338 *)
9339 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9340 for as_dir in $PATH
9341 do
9342 IFS=$as_save_IFS
9343 test -z "$as_dir" && as_dir=.
9344 for ac_exec_ext in '' $ac_executable_extensions; do
9345 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9346 ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9347 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9348 break 2
9349 fi
9350 done
9351 done
9352 IFS=$as_save_IFS
9353
9354 ;;
9355 esac
9356 fi
9357 SORT=$ac_cv_path_SORT
9358 if test -n "$SORT"; then
9359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9360 $as_echo "$SORT" >&6; }
9361 else
9362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9363 $as_echo "no" >&6; }
9364 fi
9365
9366
9367 test -n "$SORT" && break
9368 done
9369
9370 else
9371 # The variable is set, but is it from the command line or the environment?
9372
9373 # Try to remove the string !SORT! from our list.
9374 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9375 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9376 # If it failed, the variable was not from the command line. Ignore it,
9377 # but warn the user (except for BASH, which is always set by the calling BASH).
9378 if test "xSORT" != xBASH; then
9379 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9380 $as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9381 fi
9382 # Try to locate tool using the code snippet
9383 for ac_prog in sort
9384 do
9385 # Extract the first word of "$ac_prog", so it can be a program name with args.
9386 set dummy $ac_prog; ac_word=$2
9387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9388 $as_echo_n "checking for $ac_word... " >&6; }
9389 if ${ac_cv_path_SORT+:} false; then :
9390 $as_echo_n "(cached) " >&6
9391 else
9392 case $SORT in
9393 [\\/]* | ?:[\\/]*)
9394 ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9395 ;;
9396 *)
9397 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9398 for as_dir in $PATH
9399 do
9400 IFS=$as_save_IFS
9401 test -z "$as_dir" && as_dir=.
9402 for ac_exec_ext in '' $ac_executable_extensions; do
9403 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9404 ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9405 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9406 break 2
9407 fi
9408 done
9409 done
9410 IFS=$as_save_IFS
9411
9412 ;;
9413 esac
9414 fi
9415 SORT=$ac_cv_path_SORT
9416 if test -n "$SORT"; then
9417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9418 $as_echo "$SORT" >&6; }
9419 else
9420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9421 $as_echo "no" >&6; }
9422 fi
9423
9424
9425 test -n "$SORT" && break
9426 done
9427
9428 else
9429 # If it succeeded, then it was overridden by the user. We will use it
9430 # for the tool.
9431
9432 # First remove it from the list of overridden variables, so we can test
9433 # for unknown variables in the end.
9434 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9435
9436 # Check if the provided tool contains a complete path.
9437 tool_specified="$SORT"
9438 tool_basename="${tool_specified##*/}"
9439 if test "x$tool_basename" = "x$tool_specified"; then
9440 # A command without a complete path is provided, search $PATH.
9441 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9442 $as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9443 # Extract the first word of "$tool_basename", so it can be a program name with args.
9444 set dummy $tool_basename; ac_word=$2
9445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9446 $as_echo_n "checking for $ac_word... " >&6; }
9447 if ${ac_cv_path_SORT+:} false; then :
9448 $as_echo_n "(cached) " >&6
9449 else
9450 case $SORT in
9451 [\\/]* | ?:[\\/]*)
9452 ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9453 ;;
9454 *)
9455 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9456 for as_dir in $PATH
9457 do
9458 IFS=$as_save_IFS
9459 test -z "$as_dir" && as_dir=.
9460 for ac_exec_ext in '' $ac_executable_extensions; do
9461 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9462 ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9463 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9464 break 2
9465 fi
9466 done
9467 done
9468 IFS=$as_save_IFS
9469
9470 ;;
9471 esac
9472 fi
9473 SORT=$ac_cv_path_SORT
9474 if test -n "$SORT"; then
9475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9476 $as_echo "$SORT" >&6; }
9477 else
9478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9479 $as_echo "no" >&6; }
9480 fi
9481
9482
9483 if test "x$SORT" = x; then
9484 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9485 fi
9486 else
9487 # Otherwise we believe it is a complete path. Use it as it is.
9488 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9489 $as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9491 $as_echo_n "checking for SORT... " >&6; }
9492 if test ! -x "$tool_specified"; then
9493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9494 $as_echo "not found" >&6; }
9495 as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9496 fi
9497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9498 $as_echo "$tool_specified" >&6; }
9499 fi
9500 fi
9501 fi
9502
9503
9504
9505 if test "x$SORT" = x; then
9506 as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9507 fi
9508
9509
9510
9511
9512
9513 # Publish this variable in the help.
9514
9515
9516 if test "x$TAIL" = x; then
9517 # The variable is not set by user, try to locate tool using the code snippet
9518 for ac_prog in tail
9519 do
9520 # Extract the first word of "$ac_prog", so it can be a program name with args.
9521 set dummy $ac_prog; ac_word=$2
9522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9523 $as_echo_n "checking for $ac_word... " >&6; }
9524 if ${ac_cv_path_TAIL+:} false; then :
9525 $as_echo_n "(cached) " >&6
9526 else
9527 case $TAIL in
9528 [\\/]* | ?:[\\/]*)
9529 ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9530 ;;
9531 *)
9532 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9533 for as_dir in $PATH
9534 do
9535 IFS=$as_save_IFS
9536 test -z "$as_dir" && as_dir=.
9537 for ac_exec_ext in '' $ac_executable_extensions; do
9538 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9539 ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9540 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9541 break 2
9542 fi
9543 done
9544 done
9545 IFS=$as_save_IFS
9546
9547 ;;
9548 esac
9549 fi
9550 TAIL=$ac_cv_path_TAIL
9551 if test -n "$TAIL"; then
9552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9553 $as_echo "$TAIL" >&6; }
9554 else
9555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9556 $as_echo "no" >&6; }
9557 fi
9558
9559
9560 test -n "$TAIL" && break
9561 done
9562
9563 else
9564 # The variable is set, but is it from the command line or the environment?
9565
9566 # Try to remove the string !TAIL! from our list.
9567 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9568 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9569 # If it failed, the variable was not from the command line. Ignore it,
9570 # but warn the user (except for BASH, which is always set by the calling BASH).
9571 if test "xTAIL" != xBASH; then
9572 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9573 $as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9574 fi
9575 # Try to locate tool using the code snippet
9576 for ac_prog in tail
9577 do
9578 # Extract the first word of "$ac_prog", so it can be a program name with args.
9579 set dummy $ac_prog; ac_word=$2
9580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9581 $as_echo_n "checking for $ac_word... " >&6; }
9582 if ${ac_cv_path_TAIL+:} false; then :
9583 $as_echo_n "(cached) " >&6
9584 else
9585 case $TAIL in
9586 [\\/]* | ?:[\\/]*)
9587 ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9588 ;;
9589 *)
9590 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9591 for as_dir in $PATH
9592 do
9593 IFS=$as_save_IFS
9594 test -z "$as_dir" && as_dir=.
9595 for ac_exec_ext in '' $ac_executable_extensions; do
9596 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9597 ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9598 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9599 break 2
9600 fi
9601 done
9602 done
9603 IFS=$as_save_IFS
9604
9605 ;;
9606 esac
9607 fi
9608 TAIL=$ac_cv_path_TAIL
9609 if test -n "$TAIL"; then
9610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9611 $as_echo "$TAIL" >&6; }
9612 else
9613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9614 $as_echo "no" >&6; }
9615 fi
9616
9617
9618 test -n "$TAIL" && break
9619 done
9620
9621 else
9622 # If it succeeded, then it was overridden by the user. We will use it
9623 # for the tool.
9624
9625 # First remove it from the list of overridden variables, so we can test
9626 # for unknown variables in the end.
9627 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9628
9629 # Check if the provided tool contains a complete path.
9630 tool_specified="$TAIL"
9631 tool_basename="${tool_specified##*/}"
9632 if test "x$tool_basename" = "x$tool_specified"; then
9633 # A command without a complete path is provided, search $PATH.
9634 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9635 $as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9636 # Extract the first word of "$tool_basename", so it can be a program name with args.
9637 set dummy $tool_basename; ac_word=$2
9638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9639 $as_echo_n "checking for $ac_word... " >&6; }
9640 if ${ac_cv_path_TAIL+:} false; then :
9641 $as_echo_n "(cached) " >&6
9642 else
9643 case $TAIL in
9644 [\\/]* | ?:[\\/]*)
9645 ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9646 ;;
9647 *)
9648 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9649 for as_dir in $PATH
9650 do
9651 IFS=$as_save_IFS
9652 test -z "$as_dir" && as_dir=.
9653 for ac_exec_ext in '' $ac_executable_extensions; do
9654 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9655 ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9656 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9657 break 2
9658 fi
9659 done
9660 done
9661 IFS=$as_save_IFS
9662
9663 ;;
9664 esac
9665 fi
9666 TAIL=$ac_cv_path_TAIL
9667 if test -n "$TAIL"; then
9668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9669 $as_echo "$TAIL" >&6; }
9670 else
9671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9672 $as_echo "no" >&6; }
9673 fi
9674
9675
9676 if test "x$TAIL" = x; then
9677 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9678 fi
9679 else
9680 # Otherwise we believe it is a complete path. Use it as it is.
9681 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9682 $as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9684 $as_echo_n "checking for TAIL... " >&6; }
9685 if test ! -x "$tool_specified"; then
9686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9687 $as_echo "not found" >&6; }
9688 as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9689 fi
9690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9691 $as_echo "$tool_specified" >&6; }
9692 fi
9693 fi
9694 fi
9695
9696
9697
9698 if test "x$TAIL" = x; then
9699 as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9700 fi
9701
9702
9703
9704
9705
9706 # Publish this variable in the help.
9707
9708
9709 if test "x$TAR" = x; then
9710 # The variable is not set by user, try to locate tool using the code snippet
9711 for ac_prog in tar
9712 do
9713 # Extract the first word of "$ac_prog", so it can be a program name with args.
9714 set dummy $ac_prog; ac_word=$2
9715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9716 $as_echo_n "checking for $ac_word... " >&6; }
9717 if ${ac_cv_path_TAR+:} false; then :
9718 $as_echo_n "(cached) " >&6
9719 else
9720 case $TAR in
9721 [\\/]* | ?:[\\/]*)
9722 ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9723 ;;
9724 *)
9725 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9726 for as_dir in $PATH
9727 do
9728 IFS=$as_save_IFS
9729 test -z "$as_dir" && as_dir=.
9730 for ac_exec_ext in '' $ac_executable_extensions; do
9731 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9732 ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9733 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9734 break 2
9735 fi
9736 done
9737 done
9738 IFS=$as_save_IFS
9739
9740 ;;
9741 esac
9742 fi
9743 TAR=$ac_cv_path_TAR
9744 if test -n "$TAR"; then
9745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9746 $as_echo "$TAR" >&6; }
9747 else
9748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9749 $as_echo "no" >&6; }
9750 fi
9751
9752
9753 test -n "$TAR" && break
9754 done
9755
9756 else
9757 # The variable is set, but is it from the command line or the environment?
9758
9759 # Try to remove the string !TAR! from our list.
9760 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9761 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9762 # If it failed, the variable was not from the command line. Ignore it,
9763 # but warn the user (except for BASH, which is always set by the calling BASH).
9764 if test "xTAR" != xBASH; then
9765 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9766 $as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9767 fi
9768 # Try to locate tool using the code snippet
9769 for ac_prog in tar
9770 do
9771 # Extract the first word of "$ac_prog", so it can be a program name with args.
9772 set dummy $ac_prog; ac_word=$2
9773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9774 $as_echo_n "checking for $ac_word... " >&6; }
9775 if ${ac_cv_path_TAR+:} false; then :
9776 $as_echo_n "(cached) " >&6
9777 else
9778 case $TAR in
9779 [\\/]* | ?:[\\/]*)
9780 ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9781 ;;
9782 *)
9783 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9784 for as_dir in $PATH
9785 do
9786 IFS=$as_save_IFS
9787 test -z "$as_dir" && as_dir=.
9788 for ac_exec_ext in '' $ac_executable_extensions; do
9789 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9790 ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9791 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9792 break 2
9793 fi
9794 done
9795 done
9796 IFS=$as_save_IFS
9797
9798 ;;
9799 esac
9800 fi
9801 TAR=$ac_cv_path_TAR
9802 if test -n "$TAR"; then
9803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9804 $as_echo "$TAR" >&6; }
9805 else
9806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9807 $as_echo "no" >&6; }
9808 fi
9809
9810
9811 test -n "$TAR" && break
9812 done
9813
9814 else
9815 # If it succeeded, then it was overridden by the user. We will use it
9816 # for the tool.
9817
9818 # First remove it from the list of overridden variables, so we can test
9819 # for unknown variables in the end.
9820 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9821
9822 # Check if the provided tool contains a complete path.
9823 tool_specified="$TAR"
9824 tool_basename="${tool_specified##*/}"
9825 if test "x$tool_basename" = "x$tool_specified"; then
9826 # A command without a complete path is provided, search $PATH.
9827 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9828 $as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9829 # Extract the first word of "$tool_basename", so it can be a program name with args.
9830 set dummy $tool_basename; ac_word=$2
9831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9832 $as_echo_n "checking for $ac_word... " >&6; }
9833 if ${ac_cv_path_TAR+:} false; then :
9834 $as_echo_n "(cached) " >&6
9835 else
9836 case $TAR in
9837 [\\/]* | ?:[\\/]*)
9838 ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9839 ;;
9840 *)
9841 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9842 for as_dir in $PATH
9843 do
9844 IFS=$as_save_IFS
9845 test -z "$as_dir" && as_dir=.
9846 for ac_exec_ext in '' $ac_executable_extensions; do
9847 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9848 ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9849 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9850 break 2
9851 fi
9852 done
9853 done
9854 IFS=$as_save_IFS
9855
9856 ;;
9857 esac
9858 fi
9859 TAR=$ac_cv_path_TAR
9860 if test -n "$TAR"; then
9861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9862 $as_echo "$TAR" >&6; }
9863 else
9864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9865 $as_echo "no" >&6; }
9866 fi
9867
9868
9869 if test "x$TAR" = x; then
9870 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9871 fi
9872 else
9873 # Otherwise we believe it is a complete path. Use it as it is.
9874 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9875 $as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9877 $as_echo_n "checking for TAR... " >&6; }
9878 if test ! -x "$tool_specified"; then
9879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9880 $as_echo "not found" >&6; }
9881 as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9882 fi
9883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9884 $as_echo "$tool_specified" >&6; }
9885 fi
9886 fi
9887 fi
9888
9889
9890
9891 if test "x$TAR" = x; then
9892 as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9893 fi
9894
9895
9896
9897
9898
9899 # Publish this variable in the help.
9900
9901
9902 if test "x$TEE" = x; then
9903 # The variable is not set by user, try to locate tool using the code snippet
9904 for ac_prog in tee
9905 do
9906 # Extract the first word of "$ac_prog", so it can be a program name with args.
9907 set dummy $ac_prog; ac_word=$2
9908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9909 $as_echo_n "checking for $ac_word... " >&6; }
9910 if ${ac_cv_path_TEE+:} false; then :
9911 $as_echo_n "(cached) " >&6
9912 else
9913 case $TEE in
9914 [\\/]* | ?:[\\/]*)
9915 ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9916 ;;
9917 *)
9918 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9919 for as_dir in $PATH
9920 do
9921 IFS=$as_save_IFS
9922 test -z "$as_dir" && as_dir=.
9923 for ac_exec_ext in '' $ac_executable_extensions; do
9924 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9925 ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9926 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9927 break 2
9928 fi
9929 done
9930 done
9931 IFS=$as_save_IFS
9932
9933 ;;
9934 esac
9935 fi
9936 TEE=$ac_cv_path_TEE
9937 if test -n "$TEE"; then
9938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9939 $as_echo "$TEE" >&6; }
9940 else
9941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9942 $as_echo "no" >&6; }
9943 fi
9944
9945
9946 test -n "$TEE" && break
9947 done
9948
9949 else
9950 # The variable is set, but is it from the command line or the environment?
9951
9952 # Try to remove the string !TEE! from our list.
9953 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9954 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9955 # If it failed, the variable was not from the command line. Ignore it,
9956 # but warn the user (except for BASH, which is always set by the calling BASH).
9957 if test "xTEE" != xBASH; then
9958 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9959 $as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9960 fi
9961 # Try to locate tool using the code snippet
9962 for ac_prog in tee
9963 do
9964 # Extract the first word of "$ac_prog", so it can be a program name with args.
9965 set dummy $ac_prog; ac_word=$2
9966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9967 $as_echo_n "checking for $ac_word... " >&6; }
9968 if ${ac_cv_path_TEE+:} false; then :
9969 $as_echo_n "(cached) " >&6
9970 else
9971 case $TEE in
9972 [\\/]* | ?:[\\/]*)
9973 ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9974 ;;
9975 *)
9976 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9977 for as_dir in $PATH
9978 do
9979 IFS=$as_save_IFS
9980 test -z "$as_dir" && as_dir=.
9981 for ac_exec_ext in '' $ac_executable_extensions; do
9982 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9983 ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9984 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9985 break 2
9986 fi
9987 done
9988 done
9989 IFS=$as_save_IFS
9990
9991 ;;
9992 esac
9993 fi
9994 TEE=$ac_cv_path_TEE
9995 if test -n "$TEE"; then
9996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9997 $as_echo "$TEE" >&6; }
9998 else
9999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10000 $as_echo "no" >&6; }
10001 fi
10002
10003
10004 test -n "$TEE" && break
10005 done
10006
10007 else
10008 # If it succeeded, then it was overridden by the user. We will use it
10009 # for the tool.
10010
10011 # First remove it from the list of overridden variables, so we can test
10012 # for unknown variables in the end.
10013 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10014
10015 # Check if the provided tool contains a complete path.
10016 tool_specified="$TEE"
10017 tool_basename="${tool_specified##*/}"
10018 if test "x$tool_basename" = "x$tool_specified"; then
10019 # A command without a complete path is provided, search $PATH.
10020 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
10021 $as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
10022 # Extract the first word of "$tool_basename", so it can be a program name with args.
10023 set dummy $tool_basename; ac_word=$2
10024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10025 $as_echo_n "checking for $ac_word... " >&6; }
10026 if ${ac_cv_path_TEE+:} false; then :
10027 $as_echo_n "(cached) " >&6
10028 else
10029 case $TEE in
10030 [\\/]* | ?:[\\/]*)
10031 ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10032 ;;
10033 *)
10034 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10035 for as_dir in $PATH
10036 do
10037 IFS=$as_save_IFS
10038 test -z "$as_dir" && as_dir=.
10039 for ac_exec_ext in '' $ac_executable_extensions; do
10040 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10041 ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10042 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10043 break 2
10044 fi
10045 done
10046 done
10047 IFS=$as_save_IFS
10048
10049 ;;
10050 esac
10051 fi
10052 TEE=$ac_cv_path_TEE
10053 if test -n "$TEE"; then
10054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10055 $as_echo "$TEE" >&6; }
10056 else
10057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10058 $as_echo "no" >&6; }
10059 fi
10060
10061
10062 if test "x$TEE" = x; then
10063 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10064 fi
10065 else
10066 # Otherwise we believe it is a complete path. Use it as it is.
10067 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10068 $as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10070 $as_echo_n "checking for TEE... " >&6; }
10071 if test ! -x "$tool_specified"; then
10072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10073 $as_echo "not found" >&6; }
10074 as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10075 fi
10076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10077 $as_echo "$tool_specified" >&6; }
10078 fi
10079 fi
10080 fi
10081
10082
10083
10084 if test "x$TEE" = x; then
10085 as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10086 fi
10087
10088
10089
10090
10091
10092 # Publish this variable in the help.
10093
10094
10095 if test "x$TOUCH" = x; then
10096 # The variable is not set by user, try to locate tool using the code snippet
10097 for ac_prog in touch
10098 do
10099 # Extract the first word of "$ac_prog", so it can be a program name with args.
10100 set dummy $ac_prog; ac_word=$2
10101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10102 $as_echo_n "checking for $ac_word... " >&6; }
10103 if ${ac_cv_path_TOUCH+:} false; then :
10104 $as_echo_n "(cached) " >&6
10105 else
10106 case $TOUCH in
10107 [\\/]* | ?:[\\/]*)
10108 ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10109 ;;
10110 *)
10111 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10112 for as_dir in $PATH
10113 do
10114 IFS=$as_save_IFS
10115 test -z "$as_dir" && as_dir=.
10116 for ac_exec_ext in '' $ac_executable_extensions; do
10117 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10118 ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10119 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10120 break 2
10121 fi
10122 done
10123 done
10124 IFS=$as_save_IFS
10125
10126 ;;
10127 esac
10128 fi
10129 TOUCH=$ac_cv_path_TOUCH
10130 if test -n "$TOUCH"; then
10131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10132 $as_echo "$TOUCH" >&6; }
10133 else
10134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10135 $as_echo "no" >&6; }
10136 fi
10137
10138
10139 test -n "$TOUCH" && break
10140 done
10141
10142 else
10143 # The variable is set, but is it from the command line or the environment?
10144
10145 # Try to remove the string !TOUCH! from our list.
10146 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10147 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10148 # If it failed, the variable was not from the command line. Ignore it,
10149 # but warn the user (except for BASH, which is always set by the calling BASH).
10150 if test "xTOUCH" != xBASH; then
10151 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10152 $as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10153 fi
10154 # Try to locate tool using the code snippet
10155 for ac_prog in touch
10156 do
10157 # Extract the first word of "$ac_prog", so it can be a program name with args.
10158 set dummy $ac_prog; ac_word=$2
10159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10160 $as_echo_n "checking for $ac_word... " >&6; }
10161 if ${ac_cv_path_TOUCH+:} false; then :
10162 $as_echo_n "(cached) " >&6
10163 else
10164 case $TOUCH in
10165 [\\/]* | ?:[\\/]*)
10166 ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10167 ;;
10168 *)
10169 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10170 for as_dir in $PATH
10171 do
10172 IFS=$as_save_IFS
10173 test -z "$as_dir" && as_dir=.
10174 for ac_exec_ext in '' $ac_executable_extensions; do
10175 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10176 ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10177 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10178 break 2
10179 fi
10180 done
10181 done
10182 IFS=$as_save_IFS
10183
10184 ;;
10185 esac
10186 fi
10187 TOUCH=$ac_cv_path_TOUCH
10188 if test -n "$TOUCH"; then
10189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10190 $as_echo "$TOUCH" >&6; }
10191 else
10192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10193 $as_echo "no" >&6; }
10194 fi
10195
10196
10197 test -n "$TOUCH" && break
10198 done
10199
10200 else
10201 # If it succeeded, then it was overridden by the user. We will use it
10202 # for the tool.
10203
10204 # First remove it from the list of overridden variables, so we can test
10205 # for unknown variables in the end.
10206 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10207
10208 # Check if the provided tool contains a complete path.
10209 tool_specified="$TOUCH"
10210 tool_basename="${tool_specified##*/}"
10211 if test "x$tool_basename" = "x$tool_specified"; then
10212 # A command without a complete path is provided, search $PATH.
10213 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10214 $as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10215 # Extract the first word of "$tool_basename", so it can be a program name with args.
10216 set dummy $tool_basename; ac_word=$2
10217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10218 $as_echo_n "checking for $ac_word... " >&6; }
10219 if ${ac_cv_path_TOUCH+:} false; then :
10220 $as_echo_n "(cached) " >&6
10221 else
10222 case $TOUCH in
10223 [\\/]* | ?:[\\/]*)
10224 ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10225 ;;
10226 *)
10227 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10228 for as_dir in $PATH
10229 do
10230 IFS=$as_save_IFS
10231 test -z "$as_dir" && as_dir=.
10232 for ac_exec_ext in '' $ac_executable_extensions; do
10233 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10234 ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10235 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10236 break 2
10237 fi
10238 done
10239 done
10240 IFS=$as_save_IFS
10241
10242 ;;
10243 esac
10244 fi
10245 TOUCH=$ac_cv_path_TOUCH
10246 if test -n "$TOUCH"; then
10247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10248 $as_echo "$TOUCH" >&6; }
10249 else
10250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10251 $as_echo "no" >&6; }
10252 fi
10253
10254
10255 if test "x$TOUCH" = x; then
10256 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10257 fi
10258 else
10259 # Otherwise we believe it is a complete path. Use it as it is.
10260 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10261 $as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10263 $as_echo_n "checking for TOUCH... " >&6; }
10264 if test ! -x "$tool_specified"; then
10265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10266 $as_echo "not found" >&6; }
10267 as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10268 fi
10269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10270 $as_echo "$tool_specified" >&6; }
10271 fi
10272 fi
10273 fi
10274
10275
10276
10277 if test "x$TOUCH" = x; then
10278 as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10279 fi
10280
10281
10282
10283
10284
10285 # Publish this variable in the help.
10286
10287
10288 if test "x$TR" = x; then
10289 # The variable is not set by user, try to locate tool using the code snippet
10290 for ac_prog in tr
10291 do
10292 # Extract the first word of "$ac_prog", so it can be a program name with args.
10293 set dummy $ac_prog; ac_word=$2
10294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10295 $as_echo_n "checking for $ac_word... " >&6; }
10296 if ${ac_cv_path_TR+:} false; then :
10297 $as_echo_n "(cached) " >&6
10298 else
10299 case $TR in
10300 [\\/]* | ?:[\\/]*)
10301 ac_cv_path_TR="$TR" # Let the user override the test with a path.
10302 ;;
10303 *)
10304 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10305 for as_dir in $PATH
10306 do
10307 IFS=$as_save_IFS
10308 test -z "$as_dir" && as_dir=.
10309 for ac_exec_ext in '' $ac_executable_extensions; do
10310 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10311 ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10312 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10313 break 2
10314 fi
10315 done
10316 done
10317 IFS=$as_save_IFS
10318
10319 ;;
10320 esac
10321 fi
10322 TR=$ac_cv_path_TR
10323 if test -n "$TR"; then
10324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10325 $as_echo "$TR" >&6; }
10326 else
10327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10328 $as_echo "no" >&6; }
10329 fi
10330
10331
10332 test -n "$TR" && break
10333 done
10334
10335 else
10336 # The variable is set, but is it from the command line or the environment?
10337
10338 # Try to remove the string !TR! from our list.
10339 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10340 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10341 # If it failed, the variable was not from the command line. Ignore it,
10342 # but warn the user (except for BASH, which is always set by the calling BASH).
10343 if test "xTR" != xBASH; then
10344 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10345 $as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10346 fi
10347 # Try to locate tool using the code snippet
10348 for ac_prog in tr
10349 do
10350 # Extract the first word of "$ac_prog", so it can be a program name with args.
10351 set dummy $ac_prog; ac_word=$2
10352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10353 $as_echo_n "checking for $ac_word... " >&6; }
10354 if ${ac_cv_path_TR+:} false; then :
10355 $as_echo_n "(cached) " >&6
10356 else
10357 case $TR in
10358 [\\/]* | ?:[\\/]*)
10359 ac_cv_path_TR="$TR" # Let the user override the test with a path.
10360 ;;
10361 *)
10362 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10363 for as_dir in $PATH
10364 do
10365 IFS=$as_save_IFS
10366 test -z "$as_dir" && as_dir=.
10367 for ac_exec_ext in '' $ac_executable_extensions; do
10368 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10369 ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10370 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10371 break 2
10372 fi
10373 done
10374 done
10375 IFS=$as_save_IFS
10376
10377 ;;
10378 esac
10379 fi
10380 TR=$ac_cv_path_TR
10381 if test -n "$TR"; then
10382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10383 $as_echo "$TR" >&6; }
10384 else
10385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10386 $as_echo "no" >&6; }
10387 fi
10388
10389
10390 test -n "$TR" && break
10391 done
10392
10393 else
10394 # If it succeeded, then it was overridden by the user. We will use it
10395 # for the tool.
10396
10397 # First remove it from the list of overridden variables, so we can test
10398 # for unknown variables in the end.
10399 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10400
10401 # Check if the provided tool contains a complete path.
10402 tool_specified="$TR"
10403 tool_basename="${tool_specified##*/}"
10404 if test "x$tool_basename" = "x$tool_specified"; then
10405 # A command without a complete path is provided, search $PATH.
10406 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10407 $as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10408 # Extract the first word of "$tool_basename", so it can be a program name with args.
10409 set dummy $tool_basename; ac_word=$2
10410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10411 $as_echo_n "checking for $ac_word... " >&6; }
10412 if ${ac_cv_path_TR+:} false; then :
10413 $as_echo_n "(cached) " >&6
10414 else
10415 case $TR in
10416 [\\/]* | ?:[\\/]*)
10417 ac_cv_path_TR="$TR" # Let the user override the test with a path.
10418 ;;
10419 *)
10420 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10421 for as_dir in $PATH
10422 do
10423 IFS=$as_save_IFS
10424 test -z "$as_dir" && as_dir=.
10425 for ac_exec_ext in '' $ac_executable_extensions; do
10426 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10427 ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10428 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10429 break 2
10430 fi
10431 done
10432 done
10433 IFS=$as_save_IFS
10434
10435 ;;
10436 esac
10437 fi
10438 TR=$ac_cv_path_TR
10439 if test -n "$TR"; then
10440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10441 $as_echo "$TR" >&6; }
10442 else
10443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10444 $as_echo "no" >&6; }
10445 fi
10446
10447
10448 if test "x$TR" = x; then
10449 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10450 fi
10451 else
10452 # Otherwise we believe it is a complete path. Use it as it is.
10453 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10454 $as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10456 $as_echo_n "checking for TR... " >&6; }
10457 if test ! -x "$tool_specified"; then
10458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10459 $as_echo "not found" >&6; }
10460 as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10461 fi
10462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10463 $as_echo "$tool_specified" >&6; }
10464 fi
10465 fi
10466 fi
10467
10468
10469
10470 if test "x$TR" = x; then
10471 as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10472 fi
10473
10474
10475
10476
10477
10478 # Publish this variable in the help.
10479
10480
10481 if test "x$UNAME" = x; then
10482 # The variable is not set by user, try to locate tool using the code snippet
10483 for ac_prog in uname
10484 do
10485 # Extract the first word of "$ac_prog", so it can be a program name with args.
10486 set dummy $ac_prog; ac_word=$2
10487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10488 $as_echo_n "checking for $ac_word... " >&6; }
10489 if ${ac_cv_path_UNAME+:} false; then :
10490 $as_echo_n "(cached) " >&6
10491 else
10492 case $UNAME in
10493 [\\/]* | ?:[\\/]*)
10494 ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10495 ;;
10496 *)
10497 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10498 for as_dir in $PATH
10499 do
10500 IFS=$as_save_IFS
10501 test -z "$as_dir" && as_dir=.
10502 for ac_exec_ext in '' $ac_executable_extensions; do
10503 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10504 ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10505 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10506 break 2
10507 fi
10508 done
10509 done
10510 IFS=$as_save_IFS
10511
10512 ;;
10513 esac
10514 fi
10515 UNAME=$ac_cv_path_UNAME
10516 if test -n "$UNAME"; then
10517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10518 $as_echo "$UNAME" >&6; }
10519 else
10520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10521 $as_echo "no" >&6; }
10522 fi
10523
10524
10525 test -n "$UNAME" && break
10526 done
10527
10528 else
10529 # The variable is set, but is it from the command line or the environment?
10530
10531 # Try to remove the string !UNAME! from our list.
10532 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10533 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10534 # If it failed, the variable was not from the command line. Ignore it,
10535 # but warn the user (except for BASH, which is always set by the calling BASH).
10536 if test "xUNAME" != xBASH; then
10537 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10538 $as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10539 fi
10540 # Try to locate tool using the code snippet
10541 for ac_prog in uname
10542 do
10543 # Extract the first word of "$ac_prog", so it can be a program name with args.
10544 set dummy $ac_prog; ac_word=$2
10545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10546 $as_echo_n "checking for $ac_word... " >&6; }
10547 if ${ac_cv_path_UNAME+:} false; then :
10548 $as_echo_n "(cached) " >&6
10549 else
10550 case $UNAME in
10551 [\\/]* | ?:[\\/]*)
10552 ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10553 ;;
10554 *)
10555 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10556 for as_dir in $PATH
10557 do
10558 IFS=$as_save_IFS
10559 test -z "$as_dir" && as_dir=.
10560 for ac_exec_ext in '' $ac_executable_extensions; do
10561 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10562 ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10563 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10564 break 2
10565 fi
10566 done
10567 done
10568 IFS=$as_save_IFS
10569
10570 ;;
10571 esac
10572 fi
10573 UNAME=$ac_cv_path_UNAME
10574 if test -n "$UNAME"; then
10575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10576 $as_echo "$UNAME" >&6; }
10577 else
10578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10579 $as_echo "no" >&6; }
10580 fi
10581
10582
10583 test -n "$UNAME" && break
10584 done
10585
10586 else
10587 # If it succeeded, then it was overridden by the user. We will use it
10588 # for the tool.
10589
10590 # First remove it from the list of overridden variables, so we can test
10591 # for unknown variables in the end.
10592 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10593
10594 # Check if the provided tool contains a complete path.
10595 tool_specified="$UNAME"
10596 tool_basename="${tool_specified##*/}"
10597 if test "x$tool_basename" = "x$tool_specified"; then
10598 # A command without a complete path is provided, search $PATH.
10599 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10600 $as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10601 # Extract the first word of "$tool_basename", so it can be a program name with args.
10602 set dummy $tool_basename; ac_word=$2
10603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10604 $as_echo_n "checking for $ac_word... " >&6; }
10605 if ${ac_cv_path_UNAME+:} false; then :
10606 $as_echo_n "(cached) " >&6
10607 else
10608 case $UNAME in
10609 [\\/]* | ?:[\\/]*)
10610 ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10611 ;;
10612 *)
10613 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10614 for as_dir in $PATH
10615 do
10616 IFS=$as_save_IFS
10617 test -z "$as_dir" && as_dir=.
10618 for ac_exec_ext in '' $ac_executable_extensions; do
10619 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10620 ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10621 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10622 break 2
10623 fi
10624 done
10625 done
10626 IFS=$as_save_IFS
10627
10628 ;;
10629 esac
10630 fi
10631 UNAME=$ac_cv_path_UNAME
10632 if test -n "$UNAME"; then
10633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10634 $as_echo "$UNAME" >&6; }
10635 else
10636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10637 $as_echo "no" >&6; }
10638 fi
10639
10640
10641 if test "x$UNAME" = x; then
10642 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10643 fi
10644 else
10645 # Otherwise we believe it is a complete path. Use it as it is.
10646 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10647 $as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10649 $as_echo_n "checking for UNAME... " >&6; }
10650 if test ! -x "$tool_specified"; then
10651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10652 $as_echo "not found" >&6; }
10653 as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10654 fi
10655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10656 $as_echo "$tool_specified" >&6; }
10657 fi
10658 fi
10659 fi
10660
10661
10662
10663 if test "x$UNAME" = x; then
10664 as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10665 fi
10666
10667
10668
10669
10670
10671 # Publish this variable in the help.
10672
10673
10674 if test "x$UNIQ" = x; then
10675 # The variable is not set by user, try to locate tool using the code snippet
10676 for ac_prog in uniq
10677 do
10678 # Extract the first word of "$ac_prog", so it can be a program name with args.
10679 set dummy $ac_prog; ac_word=$2
10680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10681 $as_echo_n "checking for $ac_word... " >&6; }
10682 if ${ac_cv_path_UNIQ+:} false; then :
10683 $as_echo_n "(cached) " >&6
10684 else
10685 case $UNIQ in
10686 [\\/]* | ?:[\\/]*)
10687 ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10688 ;;
10689 *)
10690 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10691 for as_dir in $PATH
10692 do
10693 IFS=$as_save_IFS
10694 test -z "$as_dir" && as_dir=.
10695 for ac_exec_ext in '' $ac_executable_extensions; do
10696 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10697 ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10698 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10699 break 2
10700 fi
10701 done
10702 done
10703 IFS=$as_save_IFS
10704
10705 ;;
10706 esac
10707 fi
10708 UNIQ=$ac_cv_path_UNIQ
10709 if test -n "$UNIQ"; then
10710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10711 $as_echo "$UNIQ" >&6; }
10712 else
10713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10714 $as_echo "no" >&6; }
10715 fi
10716
10717
10718 test -n "$UNIQ" && break
10719 done
10720
10721 else
10722 # The variable is set, but is it from the command line or the environment?
10723
10724 # Try to remove the string !UNIQ! from our list.
10725 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10726 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10727 # If it failed, the variable was not from the command line. Ignore it,
10728 # but warn the user (except for BASH, which is always set by the calling BASH).
10729 if test "xUNIQ" != xBASH; then
10730 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10731 $as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10732 fi
10733 # Try to locate tool using the code snippet
10734 for ac_prog in uniq
10735 do
10736 # Extract the first word of "$ac_prog", so it can be a program name with args.
10737 set dummy $ac_prog; ac_word=$2
10738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10739 $as_echo_n "checking for $ac_word... " >&6; }
10740 if ${ac_cv_path_UNIQ+:} false; then :
10741 $as_echo_n "(cached) " >&6
10742 else
10743 case $UNIQ in
10744 [\\/]* | ?:[\\/]*)
10745 ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10746 ;;
10747 *)
10748 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10749 for as_dir in $PATH
10750 do
10751 IFS=$as_save_IFS
10752 test -z "$as_dir" && as_dir=.
10753 for ac_exec_ext in '' $ac_executable_extensions; do
10754 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10755 ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10756 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10757 break 2
10758 fi
10759 done
10760 done
10761 IFS=$as_save_IFS
10762
10763 ;;
10764 esac
10765 fi
10766 UNIQ=$ac_cv_path_UNIQ
10767 if test -n "$UNIQ"; then
10768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10769 $as_echo "$UNIQ" >&6; }
10770 else
10771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10772 $as_echo "no" >&6; }
10773 fi
10774
10775
10776 test -n "$UNIQ" && break
10777 done
10778
10779 else
10780 # If it succeeded, then it was overridden by the user. We will use it
10781 # for the tool.
10782
10783 # First remove it from the list of overridden variables, so we can test
10784 # for unknown variables in the end.
10785 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10786
10787 # Check if the provided tool contains a complete path.
10788 tool_specified="$UNIQ"
10789 tool_basename="${tool_specified##*/}"
10790 if test "x$tool_basename" = "x$tool_specified"; then
10791 # A command without a complete path is provided, search $PATH.
10792 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10793 $as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10794 # Extract the first word of "$tool_basename", so it can be a program name with args.
10795 set dummy $tool_basename; ac_word=$2
10796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10797 $as_echo_n "checking for $ac_word... " >&6; }
10798 if ${ac_cv_path_UNIQ+:} false; then :
10799 $as_echo_n "(cached) " >&6
10800 else
10801 case $UNIQ in
10802 [\\/]* | ?:[\\/]*)
10803 ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10804 ;;
10805 *)
10806 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10807 for as_dir in $PATH
10808 do
10809 IFS=$as_save_IFS
10810 test -z "$as_dir" && as_dir=.
10811 for ac_exec_ext in '' $ac_executable_extensions; do
10812 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10813 ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10814 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10815 break 2
10816 fi
10817 done
10818 done
10819 IFS=$as_save_IFS
10820
10821 ;;
10822 esac
10823 fi
10824 UNIQ=$ac_cv_path_UNIQ
10825 if test -n "$UNIQ"; then
10826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10827 $as_echo "$UNIQ" >&6; }
10828 else
10829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10830 $as_echo "no" >&6; }
10831 fi
10832
10833
10834 if test "x$UNIQ" = x; then
10835 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10836 fi
10837 else
10838 # Otherwise we believe it is a complete path. Use it as it is.
10839 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10840 $as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10842 $as_echo_n "checking for UNIQ... " >&6; }
10843 if test ! -x "$tool_specified"; then
10844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10845 $as_echo "not found" >&6; }
10846 as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10847 fi
10848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10849 $as_echo "$tool_specified" >&6; }
10850 fi
10851 fi
10852 fi
10853
10854
10855
10856 if test "x$UNIQ" = x; then
10857 as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10858 fi
10859
10860
10861
10862
10863
10864 # Publish this variable in the help.
10865
10866
10867 if test "x$WC" = x; then
10868 # The variable is not set by user, try to locate tool using the code snippet
10869 for ac_prog in wc
10870 do
10871 # Extract the first word of "$ac_prog", so it can be a program name with args.
10872 set dummy $ac_prog; ac_word=$2
10873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10874 $as_echo_n "checking for $ac_word... " >&6; }
10875 if ${ac_cv_path_WC+:} false; then :
10876 $as_echo_n "(cached) " >&6
10877 else
10878 case $WC in
10879 [\\/]* | ?:[\\/]*)
10880 ac_cv_path_WC="$WC" # Let the user override the test with a path.
10881 ;;
10882 *)
10883 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10884 for as_dir in $PATH
10885 do
10886 IFS=$as_save_IFS
10887 test -z "$as_dir" && as_dir=.
10888 for ac_exec_ext in '' $ac_executable_extensions; do
10889 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10890 ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10891 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10892 break 2
10893 fi
10894 done
10895 done
10896 IFS=$as_save_IFS
10897
10898 ;;
10899 esac
10900 fi
10901 WC=$ac_cv_path_WC
10902 if test -n "$WC"; then
10903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10904 $as_echo "$WC" >&6; }
10905 else
10906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10907 $as_echo "no" >&6; }
10908 fi
10909
10910
10911 test -n "$WC" && break
10912 done
10913
10914 else
10915 # The variable is set, but is it from the command line or the environment?
10916
10917 # Try to remove the string !WC! from our list.
10918 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10919 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10920 # If it failed, the variable was not from the command line. Ignore it,
10921 # but warn the user (except for BASH, which is always set by the calling BASH).
10922 if test "xWC" != xBASH; then
10923 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10924 $as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10925 fi
10926 # Try to locate tool using the code snippet
10927 for ac_prog in wc
10928 do
10929 # Extract the first word of "$ac_prog", so it can be a program name with args.
10930 set dummy $ac_prog; ac_word=$2
10931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10932 $as_echo_n "checking for $ac_word... " >&6; }
10933 if ${ac_cv_path_WC+:} false; then :
10934 $as_echo_n "(cached) " >&6
10935 else
10936 case $WC in
10937 [\\/]* | ?:[\\/]*)
10938 ac_cv_path_WC="$WC" # Let the user override the test with a path.
10939 ;;
10940 *)
10941 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10942 for as_dir in $PATH
10943 do
10944 IFS=$as_save_IFS
10945 test -z "$as_dir" && as_dir=.
10946 for ac_exec_ext in '' $ac_executable_extensions; do
10947 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10948 ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10949 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10950 break 2
10951 fi
10952 done
10953 done
10954 IFS=$as_save_IFS
10955
10956 ;;
10957 esac
10958 fi
10959 WC=$ac_cv_path_WC
10960 if test -n "$WC"; then
10961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10962 $as_echo "$WC" >&6; }
10963 else
10964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10965 $as_echo "no" >&6; }
10966 fi
10967
10968
10969 test -n "$WC" && break
10970 done
10971
10972 else
10973 # If it succeeded, then it was overridden by the user. We will use it
10974 # for the tool.
10975
10976 # First remove it from the list of overridden variables, so we can test
10977 # for unknown variables in the end.
10978 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10979
10980 # Check if the provided tool contains a complete path.
10981 tool_specified="$WC"
10982 tool_basename="${tool_specified##*/}"
10983 if test "x$tool_basename" = "x$tool_specified"; then
10984 # A command without a complete path is provided, search $PATH.
10985 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10986 $as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10987 # Extract the first word of "$tool_basename", so it can be a program name with args.
10988 set dummy $tool_basename; ac_word=$2
10989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10990 $as_echo_n "checking for $ac_word... " >&6; }
10991 if ${ac_cv_path_WC+:} false; then :
10992 $as_echo_n "(cached) " >&6
10993 else
10994 case $WC in
10995 [\\/]* | ?:[\\/]*)
10996 ac_cv_path_WC="$WC" # Let the user override the test with a path.
10997 ;;
10998 *)
10999 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11000 for as_dir in $PATH
11001 do
11002 IFS=$as_save_IFS
11003 test -z "$as_dir" && as_dir=.
11004 for ac_exec_ext in '' $ac_executable_extensions; do
11005 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11006 ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11007 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11008 break 2
11009 fi
11010 done
11011 done
11012 IFS=$as_save_IFS
11013
11014 ;;
11015 esac
11016 fi
11017 WC=$ac_cv_path_WC
11018 if test -n "$WC"; then
11019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11020 $as_echo "$WC" >&6; }
11021 else
11022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11023 $as_echo "no" >&6; }
11024 fi
11025
11026
11027 if test "x$WC" = x; then
11028 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11029 fi
11030 else
11031 # Otherwise we believe it is a complete path. Use it as it is.
11032 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
11033 $as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
11034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11035 $as_echo_n "checking for WC... " >&6; }
11036 if test ! -x "$tool_specified"; then
11037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11038 $as_echo "not found" >&6; }
11039 as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
11040 fi
11041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11042 $as_echo "$tool_specified" >&6; }
11043 fi
11044 fi
11045 fi
11046
11047
11048
11049 if test "x$WC" = x; then
11050 as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
11051 fi
11052
11053
11054
11055
11056
11057 # Publish this variable in the help.
11058
11059
11060 if test "x$WHICH" = x; then
11061 # The variable is not set by user, try to locate tool using the code snippet
11062 for ac_prog in which
11063 do
11064 # Extract the first word of "$ac_prog", so it can be a program name with args.
11065 set dummy $ac_prog; ac_word=$2
11066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11067 $as_echo_n "checking for $ac_word... " >&6; }
11068 if ${ac_cv_path_WHICH+:} false; then :
11069 $as_echo_n "(cached) " >&6
11070 else
11071 case $WHICH in
11072 [\\/]* | ?:[\\/]*)
11073 ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11074 ;;
11075 *)
11076 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11077 for as_dir in $PATH
11078 do
11079 IFS=$as_save_IFS
11080 test -z "$as_dir" && as_dir=.
11081 for ac_exec_ext in '' $ac_executable_extensions; do
11082 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11083 ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11084 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11085 break 2
11086 fi
11087 done
11088 done
11089 IFS=$as_save_IFS
11090
11091 ;;
11092 esac
11093 fi
11094 WHICH=$ac_cv_path_WHICH
11095 if test -n "$WHICH"; then
11096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11097 $as_echo "$WHICH" >&6; }
11098 else
11099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11100 $as_echo "no" >&6; }
11101 fi
11102
11103
11104 test -n "$WHICH" && break
11105 done
11106
11107 else
11108 # The variable is set, but is it from the command line or the environment?
11109
11110 # Try to remove the string !WHICH! from our list.
11111 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11112 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11113 # If it failed, the variable was not from the command line. Ignore it,
11114 # but warn the user (except for BASH, which is always set by the calling BASH).
11115 if test "xWHICH" != xBASH; then
11116 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11117 $as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11118 fi
11119 # Try to locate tool using the code snippet
11120 for ac_prog in which
11121 do
11122 # Extract the first word of "$ac_prog", so it can be a program name with args.
11123 set dummy $ac_prog; ac_word=$2
11124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11125 $as_echo_n "checking for $ac_word... " >&6; }
11126 if ${ac_cv_path_WHICH+:} false; then :
11127 $as_echo_n "(cached) " >&6
11128 else
11129 case $WHICH in
11130 [\\/]* | ?:[\\/]*)
11131 ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11132 ;;
11133 *)
11134 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11135 for as_dir in $PATH
11136 do
11137 IFS=$as_save_IFS
11138 test -z "$as_dir" && as_dir=.
11139 for ac_exec_ext in '' $ac_executable_extensions; do
11140 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11141 ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11142 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11143 break 2
11144 fi
11145 done
11146 done
11147 IFS=$as_save_IFS
11148
11149 ;;
11150 esac
11151 fi
11152 WHICH=$ac_cv_path_WHICH
11153 if test -n "$WHICH"; then
11154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11155 $as_echo "$WHICH" >&6; }
11156 else
11157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11158 $as_echo "no" >&6; }
11159 fi
11160
11161
11162 test -n "$WHICH" && break
11163 done
11164
11165 else
11166 # If it succeeded, then it was overridden by the user. We will use it
11167 # for the tool.
11168
11169 # First remove it from the list of overridden variables, so we can test
11170 # for unknown variables in the end.
11171 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11172
11173 # Check if the provided tool contains a complete path.
11174 tool_specified="$WHICH"
11175 tool_basename="${tool_specified##*/}"
11176 if test "x$tool_basename" = "x$tool_specified"; then
11177 # A command without a complete path is provided, search $PATH.
11178 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11179 $as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11180 # Extract the first word of "$tool_basename", so it can be a program name with args.
11181 set dummy $tool_basename; ac_word=$2
11182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11183 $as_echo_n "checking for $ac_word... " >&6; }
11184 if ${ac_cv_path_WHICH+:} false; then :
11185 $as_echo_n "(cached) " >&6
11186 else
11187 case $WHICH in
11188 [\\/]* | ?:[\\/]*)
11189 ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11190 ;;
11191 *)
11192 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11193 for as_dir in $PATH
11194 do
11195 IFS=$as_save_IFS
11196 test -z "$as_dir" && as_dir=.
11197 for ac_exec_ext in '' $ac_executable_extensions; do
11198 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11199 ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11200 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11201 break 2
11202 fi
11203 done
11204 done
11205 IFS=$as_save_IFS
11206
11207 ;;
11208 esac
11209 fi
11210 WHICH=$ac_cv_path_WHICH
11211 if test -n "$WHICH"; then
11212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11213 $as_echo "$WHICH" >&6; }
11214 else
11215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11216 $as_echo "no" >&6; }
11217 fi
11218
11219
11220 if test "x$WHICH" = x; then
11221 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11222 fi
11223 else
11224 # Otherwise we believe it is a complete path. Use it as it is.
11225 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11226 $as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11228 $as_echo_n "checking for WHICH... " >&6; }
11229 if test ! -x "$tool_specified"; then
11230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11231 $as_echo "not found" >&6; }
11232 as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11233 fi
11234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11235 $as_echo "$tool_specified" >&6; }
11236 fi
11237 fi
11238 fi
11239
11240
11241
11242 if test "x$WHICH" = x; then
11243 as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11244 fi
11245
11246
11247
11248
11249
11250 # Publish this variable in the help.
11251
11252
11253 if test "x$XARGS" = x; then
11254 # The variable is not set by user, try to locate tool using the code snippet
11255 for ac_prog in xargs
11256 do
11257 # Extract the first word of "$ac_prog", so it can be a program name with args.
11258 set dummy $ac_prog; ac_word=$2
11259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11260 $as_echo_n "checking for $ac_word... " >&6; }
11261 if ${ac_cv_path_XARGS+:} false; then :
11262 $as_echo_n "(cached) " >&6
11263 else
11264 case $XARGS in
11265 [\\/]* | ?:[\\/]*)
11266 ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11267 ;;
11268 *)
11269 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11270 for as_dir in $PATH
11271 do
11272 IFS=$as_save_IFS
11273 test -z "$as_dir" && as_dir=.
11274 for ac_exec_ext in '' $ac_executable_extensions; do
11275 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11276 ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11277 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11278 break 2
11279 fi
11280 done
11281 done
11282 IFS=$as_save_IFS
11283
11284 ;;
11285 esac
11286 fi
11287 XARGS=$ac_cv_path_XARGS
11288 if test -n "$XARGS"; then
11289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11290 $as_echo "$XARGS" >&6; }
11291 else
11292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11293 $as_echo "no" >&6; }
11294 fi
11295
11296
11297 test -n "$XARGS" && break
11298 done
11299
11300 else
11301 # The variable is set, but is it from the command line or the environment?
11302
11303 # Try to remove the string !XARGS! from our list.
11304 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11305 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11306 # If it failed, the variable was not from the command line. Ignore it,
11307 # but warn the user (except for BASH, which is always set by the calling BASH).
11308 if test "xXARGS" != xBASH; then
11309 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11310 $as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11311 fi
11312 # Try to locate tool using the code snippet
11313 for ac_prog in xargs
11314 do
11315 # Extract the first word of "$ac_prog", so it can be a program name with args.
11316 set dummy $ac_prog; ac_word=$2
11317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11318 $as_echo_n "checking for $ac_word... " >&6; }
11319 if ${ac_cv_path_XARGS+:} false; then :
11320 $as_echo_n "(cached) " >&6
11321 else
11322 case $XARGS in
11323 [\\/]* | ?:[\\/]*)
11324 ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11325 ;;
11326 *)
11327 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11328 for as_dir in $PATH
11329 do
11330 IFS=$as_save_IFS
11331 test -z "$as_dir" && as_dir=.
11332 for ac_exec_ext in '' $ac_executable_extensions; do
11333 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11334 ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11335 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11336 break 2
11337 fi
11338 done
11339 done
11340 IFS=$as_save_IFS
11341
11342 ;;
11343 esac
11344 fi
11345 XARGS=$ac_cv_path_XARGS
11346 if test -n "$XARGS"; then
11347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11348 $as_echo "$XARGS" >&6; }
11349 else
11350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11351 $as_echo "no" >&6; }
11352 fi
11353
11354
11355 test -n "$XARGS" && break
11356 done
11357
11358 else
11359 # If it succeeded, then it was overridden by the user. We will use it
11360 # for the tool.
11361
11362 # First remove it from the list of overridden variables, so we can test
11363 # for unknown variables in the end.
11364 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11365
11366 # Check if the provided tool contains a complete path.
11367 tool_specified="$XARGS"
11368 tool_basename="${tool_specified##*/}"
11369 if test "x$tool_basename" = "x$tool_specified"; then
11370 # A command without a complete path is provided, search $PATH.
11371 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11372 $as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11373 # Extract the first word of "$tool_basename", so it can be a program name with args.
11374 set dummy $tool_basename; ac_word=$2
11375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11376 $as_echo_n "checking for $ac_word... " >&6; }
11377 if ${ac_cv_path_XARGS+:} false; then :
11378 $as_echo_n "(cached) " >&6
11379 else
11380 case $XARGS in
11381 [\\/]* | ?:[\\/]*)
11382 ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11383 ;;
11384 *)
11385 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11386 for as_dir in $PATH
11387 do
11388 IFS=$as_save_IFS
11389 test -z "$as_dir" && as_dir=.
11390 for ac_exec_ext in '' $ac_executable_extensions; do
11391 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11392 ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11393 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11394 break 2
11395 fi
11396 done
11397 done
11398 IFS=$as_save_IFS
11399
11400 ;;
11401 esac
11402 fi
11403 XARGS=$ac_cv_path_XARGS
11404 if test -n "$XARGS"; then
11405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11406 $as_echo "$XARGS" >&6; }
11407 else
11408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11409 $as_echo "no" >&6; }
11410 fi
11411
11412
11413 if test "x$XARGS" = x; then
11414 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11415 fi
11416 else
11417 # Otherwise we believe it is a complete path. Use it as it is.
11418 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11419 $as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11421 $as_echo_n "checking for XARGS... " >&6; }
11422 if test ! -x "$tool_specified"; then
11423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11424 $as_echo "not found" >&6; }
11425 as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11426 fi
11427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11428 $as_echo "$tool_specified" >&6; }
11429 fi
11430 fi
11431 fi
11432
11433
11434
11435 if test "x$XARGS" = x; then
11436 as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11437 fi
11438
11439
11440
11441 # Then required tools that require some special treatment.
11442
11443
11444 # Publish this variable in the help.
11445
11446
11447 if test "x$AWK" = x; then
11448 # The variable is not set by user, try to locate tool using the code snippet
11449 for ac_prog in gawk mawk nawk awk
11450 do
11451 # Extract the first word of "$ac_prog", so it can be a program name with args.
11452 set dummy $ac_prog; ac_word=$2
11453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11454 $as_echo_n "checking for $ac_word... " >&6; }
11455 if ${ac_cv_prog_AWK+:} false; then :
11456 $as_echo_n "(cached) " >&6
11457 else
11458 if test -n "$AWK"; then
11459 ac_cv_prog_AWK="$AWK" # Let the user override the test.
11460 else
11461 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11462 for as_dir in $PATH
11463 do
11464 IFS=$as_save_IFS
11465 test -z "$as_dir" && as_dir=.
11466 for ac_exec_ext in '' $ac_executable_extensions; do
11467 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11468 ac_cv_prog_AWK="$ac_prog"
11469 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11470 break 2
11471 fi
11472 done
11473 done
11474 IFS=$as_save_IFS
11475
11476 fi
11477 fi
11478 AWK=$ac_cv_prog_AWK
11479 if test -n "$AWK"; then
11480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11481 $as_echo "$AWK" >&6; }
11482 else
11483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11484 $as_echo "no" >&6; }
11485 fi
11486
11487
11488 test -n "$AWK" && break
11489 done
11490
11491 else
11492 # The variable is set, but is it from the command line or the environment?
11493
11494 # Try to remove the string !AWK! from our list.
11495 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11496 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11497 # If it failed, the variable was not from the command line. Ignore it,
11498 # but warn the user (except for BASH, which is always set by the calling BASH).
11499 if test "xAWK" != xBASH; then
11500 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11501 $as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11502 fi
11503 # Try to locate tool using the code snippet
11504 for ac_prog in gawk mawk nawk awk
11505 do
11506 # Extract the first word of "$ac_prog", so it can be a program name with args.
11507 set dummy $ac_prog; ac_word=$2
11508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11509 $as_echo_n "checking for $ac_word... " >&6; }
11510 if ${ac_cv_prog_AWK+:} false; then :
11511 $as_echo_n "(cached) " >&6
11512 else
11513 if test -n "$AWK"; then
11514 ac_cv_prog_AWK="$AWK" # Let the user override the test.
11515 else
11516 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11517 for as_dir in $PATH
11518 do
11519 IFS=$as_save_IFS
11520 test -z "$as_dir" && as_dir=.
11521 for ac_exec_ext in '' $ac_executable_extensions; do
11522 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11523 ac_cv_prog_AWK="$ac_prog"
11524 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11525 break 2
11526 fi
11527 done
11528 done
11529 IFS=$as_save_IFS
11530
11531 fi
11532 fi
11533 AWK=$ac_cv_prog_AWK
11534 if test -n "$AWK"; then
11535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11536 $as_echo "$AWK" >&6; }
11537 else
11538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11539 $as_echo "no" >&6; }
11540 fi
11541
11542
11543 test -n "$AWK" && break
11544 done
11545
11546 else
11547 # If it succeeded, then it was overridden by the user. We will use it
11548 # for the tool.
11549
11550 # First remove it from the list of overridden variables, so we can test
11551 # for unknown variables in the end.
11552 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11553
11554 # Check if the provided tool contains a complete path.
11555 tool_specified="$AWK"
11556 tool_basename="${tool_specified##*/}"
11557 if test "x$tool_basename" = "x$tool_specified"; then
11558 # A command without a complete path is provided, search $PATH.
11559 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11560 $as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11561 # Extract the first word of "$tool_basename", so it can be a program name with args.
11562 set dummy $tool_basename; ac_word=$2
11563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11564 $as_echo_n "checking for $ac_word... " >&6; }
11565 if ${ac_cv_path_AWK+:} false; then :
11566 $as_echo_n "(cached) " >&6
11567 else
11568 case $AWK in
11569 [\\/]* | ?:[\\/]*)
11570 ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11571 ;;
11572 *)
11573 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11574 for as_dir in $PATH
11575 do
11576 IFS=$as_save_IFS
11577 test -z "$as_dir" && as_dir=.
11578 for ac_exec_ext in '' $ac_executable_extensions; do
11579 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11580 ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11581 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11582 break 2
11583 fi
11584 done
11585 done
11586 IFS=$as_save_IFS
11587
11588 ;;
11589 esac
11590 fi
11591 AWK=$ac_cv_path_AWK
11592 if test -n "$AWK"; then
11593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11594 $as_echo "$AWK" >&6; }
11595 else
11596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11597 $as_echo "no" >&6; }
11598 fi
11599
11600
11601 if test "x$AWK" = x; then
11602 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11603 fi
11604 else
11605 # Otherwise we believe it is a complete path. Use it as it is.
11606 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11607 $as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11609 $as_echo_n "checking for AWK... " >&6; }
11610 if test ! -x "$tool_specified"; then
11611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11612 $as_echo "not found" >&6; }
11613 as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11614 fi
11615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11616 $as_echo "$tool_specified" >&6; }
11617 fi
11618 fi
11619 fi
11620
11621
11622 if test "x$AWK" = x; then
11623 as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11624 fi
11625
11626
11627
11628
11629 # Publish this variable in the help.
11630
11631
11632 if test "x$GREP" = x; then
11633 # The variable is not set by user, try to locate tool using the code snippet
11634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11635 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11636 if ${ac_cv_path_GREP+:} false; then :
11637 $as_echo_n "(cached) " >&6
11638 else
11639 if test -z "$GREP"; then
11640 ac_path_GREP_found=false
11641 # Loop through the user's path and test for each of PROGNAME-LIST
11642 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11643 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11644 do
11645 IFS=$as_save_IFS
11646 test -z "$as_dir" && as_dir=.
11647 for ac_prog in grep ggrep; do
11648 for ac_exec_ext in '' $ac_executable_extensions; do
11649 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11650 as_fn_executable_p "$ac_path_GREP" || continue
11651 # Check for GNU ac_path_GREP and select it if it is found.
11652 # Check for GNU $ac_path_GREP
11653 case `"$ac_path_GREP" --version 2>&1` in
11654 *GNU*)
11655 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11656 *)
11657 ac_count=0
11658 $as_echo_n 0123456789 >"conftest.in"
11659 while :
11660 do
11661 cat "conftest.in" "conftest.in" >"conftest.tmp"
11662 mv "conftest.tmp" "conftest.in"
11663 cp "conftest.in" "conftest.nl"
11664 $as_echo 'GREP' >> "conftest.nl"
11665 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11666 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11667 as_fn_arith $ac_count + 1 && ac_count=$as_val
11668 if test $ac_count -gt ${ac_path_GREP_max-0}; then
11669 # Best one so far, save it but keep looking for a better one
11670 ac_cv_path_GREP="$ac_path_GREP"
11671 ac_path_GREP_max=$ac_count
11672 fi
11673 # 10*(2^10) chars as input seems more than enough
11674 test $ac_count -gt 10 && break
11675 done
11676 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11677 esac
11678
11679 $ac_path_GREP_found && break 3
11680 done
11681 done
11682 done
11683 IFS=$as_save_IFS
11684 if test -z "$ac_cv_path_GREP"; then
11685 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11686 fi
11687 else
11688 ac_cv_path_GREP=$GREP
11689 fi
11690
11691 fi
11692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11693 $as_echo "$ac_cv_path_GREP" >&6; }
11694 GREP="$ac_cv_path_GREP"
11695
11696
11697 else
11698 # The variable is set, but is it from the command line or the environment?
11699
11700 # Try to remove the string !GREP! from our list.
11701 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11702 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11703 # If it failed, the variable was not from the command line. Ignore it,
11704 # but warn the user (except for BASH, which is always set by the calling BASH).
11705 if test "xGREP" != xBASH; then
11706 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11707 $as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11708 fi
11709 # Try to locate tool using the code snippet
11710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11711 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11712 if ${ac_cv_path_GREP+:} false; then :
11713 $as_echo_n "(cached) " >&6
11714 else
11715 if test -z "$GREP"; then
11716 ac_path_GREP_found=false
11717 # Loop through the user's path and test for each of PROGNAME-LIST
11718 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11719 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11720 do
11721 IFS=$as_save_IFS
11722 test -z "$as_dir" && as_dir=.
11723 for ac_prog in grep ggrep; do
11724 for ac_exec_ext in '' $ac_executable_extensions; do
11725 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11726 as_fn_executable_p "$ac_path_GREP" || continue
11727 # Check for GNU ac_path_GREP and select it if it is found.
11728 # Check for GNU $ac_path_GREP
11729 case `"$ac_path_GREP" --version 2>&1` in
11730 *GNU*)
11731 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11732 *)
11733 ac_count=0
11734 $as_echo_n 0123456789 >"conftest.in"
11735 while :
11736 do
11737 cat "conftest.in" "conftest.in" >"conftest.tmp"
11738 mv "conftest.tmp" "conftest.in"
11739 cp "conftest.in" "conftest.nl"
11740 $as_echo 'GREP' >> "conftest.nl"
11741 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11742 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11743 as_fn_arith $ac_count + 1 && ac_count=$as_val
11744 if test $ac_count -gt ${ac_path_GREP_max-0}; then
11745 # Best one so far, save it but keep looking for a better one
11746 ac_cv_path_GREP="$ac_path_GREP"
11747 ac_path_GREP_max=$ac_count
11748 fi
11749 # 10*(2^10) chars as input seems more than enough
11750 test $ac_count -gt 10 && break
11751 done
11752 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11753 esac
11754
11755 $ac_path_GREP_found && break 3
11756 done
11757 done
11758 done
11759 IFS=$as_save_IFS
11760 if test -z "$ac_cv_path_GREP"; then
11761 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11762 fi
11763 else
11764 ac_cv_path_GREP=$GREP
11765 fi
11766
11767 fi
11768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11769 $as_echo "$ac_cv_path_GREP" >&6; }
11770 GREP="$ac_cv_path_GREP"
11771
11772
11773 else
11774 # If it succeeded, then it was overridden by the user. We will use it
11775 # for the tool.
11776
11777 # First remove it from the list of overridden variables, so we can test
11778 # for unknown variables in the end.
11779 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11780
11781 # Check if the provided tool contains a complete path.
11782 tool_specified="$GREP"
11783 tool_basename="${tool_specified##*/}"
11784 if test "x$tool_basename" = "x$tool_specified"; then
11785 # A command without a complete path is provided, search $PATH.
11786 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11787 $as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11788 # Extract the first word of "$tool_basename", so it can be a program name with args.
11789 set dummy $tool_basename; ac_word=$2
11790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11791 $as_echo_n "checking for $ac_word... " >&6; }
11792 if ${ac_cv_path_GREP+:} false; then :
11793 $as_echo_n "(cached) " >&6
11794 else
11795 case $GREP in
11796 [\\/]* | ?:[\\/]*)
11797 ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11798 ;;
11799 *)
11800 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11801 for as_dir in $PATH
11802 do
11803 IFS=$as_save_IFS
11804 test -z "$as_dir" && as_dir=.
11805 for ac_exec_ext in '' $ac_executable_extensions; do
11806 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11807 ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11808 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11809 break 2
11810 fi
11811 done
11812 done
11813 IFS=$as_save_IFS
11814
11815 ;;
11816 esac
11817 fi
11818 GREP=$ac_cv_path_GREP
11819 if test -n "$GREP"; then
11820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11821 $as_echo "$GREP" >&6; }
11822 else
11823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11824 $as_echo "no" >&6; }
11825 fi
11826
11827
11828 if test "x$GREP" = x; then
11829 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11830 fi
11831 else
11832 # Otherwise we believe it is a complete path. Use it as it is.
11833 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11834 $as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11836 $as_echo_n "checking for GREP... " >&6; }
11837 if test ! -x "$tool_specified"; then
11838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11839 $as_echo "not found" >&6; }
11840 as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11841 fi
11842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11843 $as_echo "$tool_specified" >&6; }
11844 fi
11845 fi
11846 fi
11847
11848
11849 if test "x$GREP" = x; then
11850 as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11851 fi
11852
11853
11854
11855
11856 # Publish this variable in the help.
11857
11858
11859 if test "x$EGREP" = x; then
11860 # The variable is not set by user, try to locate tool using the code snippet
11861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11862 $as_echo_n "checking for egrep... " >&6; }
11863 if ${ac_cv_path_EGREP+:} false; then :
11864 $as_echo_n "(cached) " >&6
11865 else
11866 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11867 then ac_cv_path_EGREP="$GREP -E"
11868 else
11869 if test -z "$EGREP"; then
11870 ac_path_EGREP_found=false
11871 # Loop through the user's path and test for each of PROGNAME-LIST
11872 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11873 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11874 do
11875 IFS=$as_save_IFS
11876 test -z "$as_dir" && as_dir=.
11877 for ac_prog in egrep; do
11878 for ac_exec_ext in '' $ac_executable_extensions; do
11879 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11880 as_fn_executable_p "$ac_path_EGREP" || continue
11881 # Check for GNU ac_path_EGREP and select it if it is found.
11882 # Check for GNU $ac_path_EGREP
11883 case `"$ac_path_EGREP" --version 2>&1` in
11884 *GNU*)
11885 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11886 *)
11887 ac_count=0
11888 $as_echo_n 0123456789 >"conftest.in"
11889 while :
11890 do
11891 cat "conftest.in" "conftest.in" >"conftest.tmp"
11892 mv "conftest.tmp" "conftest.in"
11893 cp "conftest.in" "conftest.nl"
11894 $as_echo 'EGREP' >> "conftest.nl"
11895 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11896 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11897 as_fn_arith $ac_count + 1 && ac_count=$as_val
11898 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11899 # Best one so far, save it but keep looking for a better one
11900 ac_cv_path_EGREP="$ac_path_EGREP"
11901 ac_path_EGREP_max=$ac_count
11902 fi
11903 # 10*(2^10) chars as input seems more than enough
11904 test $ac_count -gt 10 && break
11905 done
11906 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11907 esac
11908
11909 $ac_path_EGREP_found && break 3
11910 done
11911 done
11912 done
11913 IFS=$as_save_IFS
11914 if test -z "$ac_cv_path_EGREP"; then
11915 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11916 fi
11917 else
11918 ac_cv_path_EGREP=$EGREP
11919 fi
11920
11921 fi
11922 fi
11923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11924 $as_echo "$ac_cv_path_EGREP" >&6; }
11925 EGREP="$ac_cv_path_EGREP"
11926
11927
11928 else
11929 # The variable is set, but is it from the command line or the environment?
11930
11931 # Try to remove the string !EGREP! from our list.
11932 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11933 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11934 # If it failed, the variable was not from the command line. Ignore it,
11935 # but warn the user (except for BASH, which is always set by the calling BASH).
11936 if test "xEGREP" != xBASH; then
11937 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11938 $as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11939 fi
11940 # Try to locate tool using the code snippet
11941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11942 $as_echo_n "checking for egrep... " >&6; }
11943 if ${ac_cv_path_EGREP+:} false; then :
11944 $as_echo_n "(cached) " >&6
11945 else
11946 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11947 then ac_cv_path_EGREP="$GREP -E"
11948 else
11949 if test -z "$EGREP"; then
11950 ac_path_EGREP_found=false
11951 # Loop through the user's path and test for each of PROGNAME-LIST
11952 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11953 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11954 do
11955 IFS=$as_save_IFS
11956 test -z "$as_dir" && as_dir=.
11957 for ac_prog in egrep; do
11958 for ac_exec_ext in '' $ac_executable_extensions; do
11959 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11960 as_fn_executable_p "$ac_path_EGREP" || continue
11961 # Check for GNU ac_path_EGREP and select it if it is found.
11962 # Check for GNU $ac_path_EGREP
11963 case `"$ac_path_EGREP" --version 2>&1` in
11964 *GNU*)
11965 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11966 *)
11967 ac_count=0
11968 $as_echo_n 0123456789 >"conftest.in"
11969 while :
11970 do
11971 cat "conftest.in" "conftest.in" >"conftest.tmp"
11972 mv "conftest.tmp" "conftest.in"
11973 cp "conftest.in" "conftest.nl"
11974 $as_echo 'EGREP' >> "conftest.nl"
11975 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11976 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11977 as_fn_arith $ac_count + 1 && ac_count=$as_val
11978 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11979 # Best one so far, save it but keep looking for a better one
11980 ac_cv_path_EGREP="$ac_path_EGREP"
11981 ac_path_EGREP_max=$ac_count
11982 fi
11983 # 10*(2^10) chars as input seems more than enough
11984 test $ac_count -gt 10 && break
11985 done
11986 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11987 esac
11988
11989 $ac_path_EGREP_found && break 3
11990 done
11991 done
11992 done
11993 IFS=$as_save_IFS
11994 if test -z "$ac_cv_path_EGREP"; then
11995 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11996 fi
11997 else
11998 ac_cv_path_EGREP=$EGREP
11999 fi
12000
12001 fi
12002 fi
12003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12004 $as_echo "$ac_cv_path_EGREP" >&6; }
12005 EGREP="$ac_cv_path_EGREP"
12006
12007
12008 else
12009 # If it succeeded, then it was overridden by the user. We will use it
12010 # for the tool.
12011
12012 # First remove it from the list of overridden variables, so we can test
12013 # for unknown variables in the end.
12014 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12015
12016 # Check if the provided tool contains a complete path.
12017 tool_specified="$EGREP"
12018 tool_basename="${tool_specified##*/}"
12019 if test "x$tool_basename" = "x$tool_specified"; then
12020 # A command without a complete path is provided, search $PATH.
12021 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
12022 $as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
12023 # Extract the first word of "$tool_basename", so it can be a program name with args.
12024 set dummy $tool_basename; ac_word=$2
12025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12026 $as_echo_n "checking for $ac_word... " >&6; }
12027 if ${ac_cv_path_EGREP+:} false; then :
12028 $as_echo_n "(cached) " >&6
12029 else
12030 case $EGREP in
12031 [\\/]* | ?:[\\/]*)
12032 ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
12033 ;;
12034 *)
12035 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12036 for as_dir in $PATH
12037 do
12038 IFS=$as_save_IFS
12039 test -z "$as_dir" && as_dir=.
12040 for ac_exec_ext in '' $ac_executable_extensions; do
12041 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12042 ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
12043 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12044 break 2
12045 fi
12046 done
12047 done
12048 IFS=$as_save_IFS
12049
12050 ;;
12051 esac
12052 fi
12053 EGREP=$ac_cv_path_EGREP
12054 if test -n "$EGREP"; then
12055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
12056 $as_echo "$EGREP" >&6; }
12057 else
12058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12059 $as_echo "no" >&6; }
12060 fi
12061
12062
12063 if test "x$EGREP" = x; then
12064 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12065 fi
12066 else
12067 # Otherwise we believe it is a complete path. Use it as it is.
12068 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12069 $as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12071 $as_echo_n "checking for EGREP... " >&6; }
12072 if test ! -x "$tool_specified"; then
12073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12074 $as_echo "not found" >&6; }
12075 as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12076 fi
12077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12078 $as_echo "$tool_specified" >&6; }
12079 fi
12080 fi
12081 fi
12082
12083
12084 if test "x$EGREP" = x; then
12085 as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12086 fi
12087
12088
12089
12090
12091 # Publish this variable in the help.
12092
12093
12094 if test "x$FGREP" = x; then
12095 # The variable is not set by user, try to locate tool using the code snippet
12096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12097 $as_echo_n "checking for fgrep... " >&6; }
12098 if ${ac_cv_path_FGREP+:} false; then :
12099 $as_echo_n "(cached) " >&6
12100 else
12101 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12102 then ac_cv_path_FGREP="$GREP -F"
12103 else
12104 if test -z "$FGREP"; then
12105 ac_path_FGREP_found=false
12106 # Loop through the user's path and test for each of PROGNAME-LIST
12107 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12108 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12109 do
12110 IFS=$as_save_IFS
12111 test -z "$as_dir" && as_dir=.
12112 for ac_prog in fgrep; do
12113 for ac_exec_ext in '' $ac_executable_extensions; do
12114 ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12115 as_fn_executable_p "$ac_path_FGREP" || continue
12116 # Check for GNU ac_path_FGREP and select it if it is found.
12117 # Check for GNU $ac_path_FGREP
12118 case `"$ac_path_FGREP" --version 2>&1` in
12119 *GNU*)
12120 ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12121 *)
12122 ac_count=0
12123 $as_echo_n 0123456789 >"conftest.in"
12124 while :
12125 do
12126 cat "conftest.in" "conftest.in" >"conftest.tmp"
12127 mv "conftest.tmp" "conftest.in"
12128 cp "conftest.in" "conftest.nl"
12129 $as_echo 'FGREP' >> "conftest.nl"
12130 "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12131 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12132 as_fn_arith $ac_count + 1 && ac_count=$as_val
12133 if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12134 # Best one so far, save it but keep looking for a better one
12135 ac_cv_path_FGREP="$ac_path_FGREP"
12136 ac_path_FGREP_max=$ac_count
12137 fi
12138 # 10*(2^10) chars as input seems more than enough
12139 test $ac_count -gt 10 && break
12140 done
12141 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12142 esac
12143
12144 $ac_path_FGREP_found && break 3
12145 done
12146 done
12147 done
12148 IFS=$as_save_IFS
12149 if test -z "$ac_cv_path_FGREP"; then
12150 as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12151 fi
12152 else
12153 ac_cv_path_FGREP=$FGREP
12154 fi
12155
12156 fi
12157 fi
12158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12159 $as_echo "$ac_cv_path_FGREP" >&6; }
12160 FGREP="$ac_cv_path_FGREP"
12161
12162
12163 else
12164 # The variable is set, but is it from the command line or the environment?
12165
12166 # Try to remove the string !FGREP! from our list.
12167 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12168 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12169 # If it failed, the variable was not from the command line. Ignore it,
12170 # but warn the user (except for BASH, which is always set by the calling BASH).
12171 if test "xFGREP" != xBASH; then
12172 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12173 $as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12174 fi
12175 # Try to locate tool using the code snippet
12176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12177 $as_echo_n "checking for fgrep... " >&6; }
12178 if ${ac_cv_path_FGREP+:} false; then :
12179 $as_echo_n "(cached) " >&6
12180 else
12181 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12182 then ac_cv_path_FGREP="$GREP -F"
12183 else
12184 if test -z "$FGREP"; then
12185 ac_path_FGREP_found=false
12186 # Loop through the user's path and test for each of PROGNAME-LIST
12187 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12188 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12189 do
12190 IFS=$as_save_IFS
12191 test -z "$as_dir" && as_dir=.
12192 for ac_prog in fgrep; do
12193 for ac_exec_ext in '' $ac_executable_extensions; do
12194 ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12195 as_fn_executable_p "$ac_path_FGREP" || continue
12196 # Check for GNU ac_path_FGREP and select it if it is found.
12197 # Check for GNU $ac_path_FGREP
12198 case `"$ac_path_FGREP" --version 2>&1` in
12199 *GNU*)
12200 ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12201 *)
12202 ac_count=0
12203 $as_echo_n 0123456789 >"conftest.in"
12204 while :
12205 do
12206 cat "conftest.in" "conftest.in" >"conftest.tmp"
12207 mv "conftest.tmp" "conftest.in"
12208 cp "conftest.in" "conftest.nl"
12209 $as_echo 'FGREP' >> "conftest.nl"
12210 "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12211 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12212 as_fn_arith $ac_count + 1 && ac_count=$as_val
12213 if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12214 # Best one so far, save it but keep looking for a better one
12215 ac_cv_path_FGREP="$ac_path_FGREP"
12216 ac_path_FGREP_max=$ac_count
12217 fi
12218 # 10*(2^10) chars as input seems more than enough
12219 test $ac_count -gt 10 && break
12220 done
12221 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12222 esac
12223
12224 $ac_path_FGREP_found && break 3
12225 done
12226 done
12227 done
12228 IFS=$as_save_IFS
12229 if test -z "$ac_cv_path_FGREP"; then
12230 as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12231 fi
12232 else
12233 ac_cv_path_FGREP=$FGREP
12234 fi
12235
12236 fi
12237 fi
12238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12239 $as_echo "$ac_cv_path_FGREP" >&6; }
12240 FGREP="$ac_cv_path_FGREP"
12241
12242
12243 else
12244 # If it succeeded, then it was overridden by the user. We will use it
12245 # for the tool.
12246
12247 # First remove it from the list of overridden variables, so we can test
12248 # for unknown variables in the end.
12249 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12250
12251 # Check if the provided tool contains a complete path.
12252 tool_specified="$FGREP"
12253 tool_basename="${tool_specified##*/}"
12254 if test "x$tool_basename" = "x$tool_specified"; then
12255 # A command without a complete path is provided, search $PATH.
12256 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12257 $as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12258 # Extract the first word of "$tool_basename", so it can be a program name with args.
12259 set dummy $tool_basename; ac_word=$2
12260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12261 $as_echo_n "checking for $ac_word... " >&6; }
12262 if ${ac_cv_path_FGREP+:} false; then :
12263 $as_echo_n "(cached) " >&6
12264 else
12265 case $FGREP in
12266 [\\/]* | ?:[\\/]*)
12267 ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12268 ;;
12269 *)
12270 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12271 for as_dir in $PATH
12272 do
12273 IFS=$as_save_IFS
12274 test -z "$as_dir" && as_dir=.
12275 for ac_exec_ext in '' $ac_executable_extensions; do
12276 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12277 ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12278 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12279 break 2
12280 fi
12281 done
12282 done
12283 IFS=$as_save_IFS
12284
12285 ;;
12286 esac
12287 fi
12288 FGREP=$ac_cv_path_FGREP
12289 if test -n "$FGREP"; then
12290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12291 $as_echo "$FGREP" >&6; }
12292 else
12293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12294 $as_echo "no" >&6; }
12295 fi
12296
12297
12298 if test "x$FGREP" = x; then
12299 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12300 fi
12301 else
12302 # Otherwise we believe it is a complete path. Use it as it is.
12303 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12304 $as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12306 $as_echo_n "checking for FGREP... " >&6; }
12307 if test ! -x "$tool_specified"; then
12308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12309 $as_echo "not found" >&6; }
12310 as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12311 fi
12312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12313 $as_echo "$tool_specified" >&6; }
12314 fi
12315 fi
12316 fi
12317
12318
12319 if test "x$FGREP" = x; then
12320 as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12321 fi
12322
12323
12324
12325
12326 # Publish this variable in the help.
12327
12328
12329 if test "x$SED" = x; then
12330 # The variable is not set by user, try to locate tool using the code snippet
12331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12332 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
12333 if ${ac_cv_path_SED+:} false; then :
12334 $as_echo_n "(cached) " >&6
12335 else
12336 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12337 for ac_i in 1 2 3 4 5 6 7; do
12338 ac_script="$ac_script$as_nl$ac_script"
12339 done
12340 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12341 { ac_script=; unset ac_script;}
12342 if test -z "$SED"; then
12343 ac_path_SED_found=false
12344 # Loop through the user's path and test for each of PROGNAME-LIST
12345 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12346 for as_dir in $PATH
12347 do
12348 IFS=$as_save_IFS
12349 test -z "$as_dir" && as_dir=.
12350 for ac_prog in sed gsed; do
12351 for ac_exec_ext in '' $ac_executable_extensions; do
12352 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12353 as_fn_executable_p "$ac_path_SED" || continue
12354 # Check for GNU ac_path_SED and select it if it is found.
12355 # Check for GNU $ac_path_SED
12356 case `"$ac_path_SED" --version 2>&1` in
12357 *GNU*)
12358 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12359 *)
12360 ac_count=0
12361 $as_echo_n 0123456789 >"conftest.in"
12362 while :
12363 do
12364 cat "conftest.in" "conftest.in" >"conftest.tmp"
12365 mv "conftest.tmp" "conftest.in"
12366 cp "conftest.in" "conftest.nl"
12367 $as_echo '' >> "conftest.nl"
12368 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12369 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12370 as_fn_arith $ac_count + 1 && ac_count=$as_val
12371 if test $ac_count -gt ${ac_path_SED_max-0}; then
12372 # Best one so far, save it but keep looking for a better one
12373 ac_cv_path_SED="$ac_path_SED"
12374 ac_path_SED_max=$ac_count
12375 fi
12376 # 10*(2^10) chars as input seems more than enough
12377 test $ac_count -gt 10 && break
12378 done
12379 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12380 esac
12381
12382 $ac_path_SED_found && break 3
12383 done
12384 done
12385 done
12386 IFS=$as_save_IFS
12387 if test -z "$ac_cv_path_SED"; then
12388 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12389 fi
12390 else
12391 ac_cv_path_SED=$SED
12392 fi
12393
12394 fi
12395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12396 $as_echo "$ac_cv_path_SED" >&6; }
12397 SED="$ac_cv_path_SED"
12398 rm -f conftest.sed
12399
12400 else
12401 # The variable is set, but is it from the command line or the environment?
12402
12403 # Try to remove the string !SED! from our list.
12404 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12405 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12406 # If it failed, the variable was not from the command line. Ignore it,
12407 # but warn the user (except for BASH, which is always set by the calling BASH).
12408 if test "xSED" != xBASH; then
12409 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12410 $as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12411 fi
12412 # Try to locate tool using the code snippet
12413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12414 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
12415 if ${ac_cv_path_SED+:} false; then :
12416 $as_echo_n "(cached) " >&6
12417 else
12418 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12419 for ac_i in 1 2 3 4 5 6 7; do
12420 ac_script="$ac_script$as_nl$ac_script"
12421 done
12422 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12423 { ac_script=; unset ac_script;}
12424 if test -z "$SED"; then
12425 ac_path_SED_found=false
12426 # Loop through the user's path and test for each of PROGNAME-LIST
12427 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12428 for as_dir in $PATH
12429 do
12430 IFS=$as_save_IFS
12431 test -z "$as_dir" && as_dir=.
12432 for ac_prog in sed gsed; do
12433 for ac_exec_ext in '' $ac_executable_extensions; do
12434 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12435 as_fn_executable_p "$ac_path_SED" || continue
12436 # Check for GNU ac_path_SED and select it if it is found.
12437 # Check for GNU $ac_path_SED
12438 case `"$ac_path_SED" --version 2>&1` in
12439 *GNU*)
12440 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12441 *)
12442 ac_count=0
12443 $as_echo_n 0123456789 >"conftest.in"
12444 while :
12445 do
12446 cat "conftest.in" "conftest.in" >"conftest.tmp"
12447 mv "conftest.tmp" "conftest.in"
12448 cp "conftest.in" "conftest.nl"
12449 $as_echo '' >> "conftest.nl"
12450 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12451 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12452 as_fn_arith $ac_count + 1 && ac_count=$as_val
12453 if test $ac_count -gt ${ac_path_SED_max-0}; then
12454 # Best one so far, save it but keep looking for a better one
12455 ac_cv_path_SED="$ac_path_SED"
12456 ac_path_SED_max=$ac_count
12457 fi
12458 # 10*(2^10) chars as input seems more than enough
12459 test $ac_count -gt 10 && break
12460 done
12461 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12462 esac
12463
12464 $ac_path_SED_found && break 3
12465 done
12466 done
12467 done
12468 IFS=$as_save_IFS
12469 if test -z "$ac_cv_path_SED"; then
12470 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12471 fi
12472 else
12473 ac_cv_path_SED=$SED
12474 fi
12475
12476 fi
12477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12478 $as_echo "$ac_cv_path_SED" >&6; }
12479 SED="$ac_cv_path_SED"
12480 rm -f conftest.sed
12481
12482 else
12483 # If it succeeded, then it was overridden by the user. We will use it
12484 # for the tool.
12485
12486 # First remove it from the list of overridden variables, so we can test
12487 # for unknown variables in the end.
12488 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12489
12490 # Check if the provided tool contains a complete path.
12491 tool_specified="$SED"
12492 tool_basename="${tool_specified##*/}"
12493 if test "x$tool_basename" = "x$tool_specified"; then
12494 # A command without a complete path is provided, search $PATH.
12495 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12496 $as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12497 # Extract the first word of "$tool_basename", so it can be a program name with args.
12498 set dummy $tool_basename; ac_word=$2
12499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12500 $as_echo_n "checking for $ac_word... " >&6; }
12501 if ${ac_cv_path_SED+:} false; then :
12502 $as_echo_n "(cached) " >&6
12503 else
12504 case $SED in
12505 [\\/]* | ?:[\\/]*)
12506 ac_cv_path_SED="$SED" # Let the user override the test with a path.
12507 ;;
12508 *)
12509 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12510 for as_dir in $PATH
12511 do
12512 IFS=$as_save_IFS
12513 test -z "$as_dir" && as_dir=.
12514 for ac_exec_ext in '' $ac_executable_extensions; do
12515 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12516 ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12517 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12518 break 2
12519 fi
12520 done
12521 done
12522 IFS=$as_save_IFS
12523
12524 ;;
12525 esac
12526 fi
12527 SED=$ac_cv_path_SED
12528 if test -n "$SED"; then
12529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12530 $as_echo "$SED" >&6; }
12531 else
12532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12533 $as_echo "no" >&6; }
12534 fi
12535
12536
12537 if test "x$SED" = x; then
12538 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12539 fi
12540 else
12541 # Otherwise we believe it is a complete path. Use it as it is.
12542 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12543 $as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12545 $as_echo_n "checking for SED... " >&6; }
12546 if test ! -x "$tool_specified"; then
12547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12548 $as_echo "not found" >&6; }
12549 as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12550 fi
12551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12552 $as_echo "$tool_specified" >&6; }
12553 fi
12554 fi
12555 fi
12556
12557
12558 if test "x$SED" = x; then
12559 as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12560 fi
12561
12562
12563
12564 # Always force rm.
12565 RM="$RM -f"
12566
12567 # pwd behaves differently on various platforms and some don't support the -L flag.
12568 # Always use the bash builtin pwd to get uniform behavior.
12569 THEPWDCMD=pwd
12570
12571 # These are not required on all platforms
12572
12573
12574 # Publish this variable in the help.
12575
12576
12577 if test "x$CYGPATH" = x; then
12578 # The variable is not set by user, try to locate tool using the code snippet
12579 for ac_prog in cygpath
12580 do
12581 # Extract the first word of "$ac_prog", so it can be a program name with args.
12582 set dummy $ac_prog; ac_word=$2
12583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12584 $as_echo_n "checking for $ac_word... " >&6; }
12585 if ${ac_cv_path_CYGPATH+:} false; then :
12586 $as_echo_n "(cached) " >&6
12587 else
12588 case $CYGPATH in
12589 [\\/]* | ?:[\\/]*)
12590 ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12591 ;;
12592 *)
12593 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12594 for as_dir in $PATH
12595 do
12596 IFS=$as_save_IFS
12597 test -z "$as_dir" && as_dir=.
12598 for ac_exec_ext in '' $ac_executable_extensions; do
12599 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12600 ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12601 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12602 break 2
12603 fi
12604 done
12605 done
12606 IFS=$as_save_IFS
12607
12608 ;;
12609 esac
12610 fi
12611 CYGPATH=$ac_cv_path_CYGPATH
12612 if test -n "$CYGPATH"; then
12613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12614 $as_echo "$CYGPATH" >&6; }
12615 else
12616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12617 $as_echo "no" >&6; }
12618 fi
12619
12620
12621 test -n "$CYGPATH" && break
12622 done
12623
12624 else
12625 # The variable is set, but is it from the command line or the environment?
12626
12627 # Try to remove the string !CYGPATH! from our list.
12628 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12629 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12630 # If it failed, the variable was not from the command line. Ignore it,
12631 # but warn the user (except for BASH, which is always set by the calling BASH).
12632 if test "xCYGPATH" != xBASH; then
12633 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12634 $as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12635 fi
12636 # Try to locate tool using the code snippet
12637 for ac_prog in cygpath
12638 do
12639 # Extract the first word of "$ac_prog", so it can be a program name with args.
12640 set dummy $ac_prog; ac_word=$2
12641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12642 $as_echo_n "checking for $ac_word... " >&6; }
12643 if ${ac_cv_path_CYGPATH+:} false; then :
12644 $as_echo_n "(cached) " >&6
12645 else
12646 case $CYGPATH in
12647 [\\/]* | ?:[\\/]*)
12648 ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12649 ;;
12650 *)
12651 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12652 for as_dir in $PATH
12653 do
12654 IFS=$as_save_IFS
12655 test -z "$as_dir" && as_dir=.
12656 for ac_exec_ext in '' $ac_executable_extensions; do
12657 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12658 ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12659 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12660 break 2
12661 fi
12662 done
12663 done
12664 IFS=$as_save_IFS
12665
12666 ;;
12667 esac
12668 fi
12669 CYGPATH=$ac_cv_path_CYGPATH
12670 if test -n "$CYGPATH"; then
12671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12672 $as_echo "$CYGPATH" >&6; }
12673 else
12674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12675 $as_echo "no" >&6; }
12676 fi
12677
12678
12679 test -n "$CYGPATH" && break
12680 done
12681
12682 else
12683 # If it succeeded, then it was overridden by the user. We will use it
12684 # for the tool.
12685
12686 # First remove it from the list of overridden variables, so we can test
12687 # for unknown variables in the end.
12688 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12689
12690 # Check if the provided tool contains a complete path.
12691 tool_specified="$CYGPATH"
12692 tool_basename="${tool_specified##*/}"
12693 if test "x$tool_basename" = "x$tool_specified"; then
12694 # A command without a complete path is provided, search $PATH.
12695 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12696 $as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12697 # Extract the first word of "$tool_basename", so it can be a program name with args.
12698 set dummy $tool_basename; ac_word=$2
12699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12700 $as_echo_n "checking for $ac_word... " >&6; }
12701 if ${ac_cv_path_CYGPATH+:} false; then :
12702 $as_echo_n "(cached) " >&6
12703 else
12704 case $CYGPATH in
12705 [\\/]* | ?:[\\/]*)
12706 ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12707 ;;
12708 *)
12709 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12710 for as_dir in $PATH
12711 do
12712 IFS=$as_save_IFS
12713 test -z "$as_dir" && as_dir=.
12714 for ac_exec_ext in '' $ac_executable_extensions; do
12715 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12716 ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12717 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12718 break 2
12719 fi
12720 done
12721 done
12722 IFS=$as_save_IFS
12723
12724 ;;
12725 esac
12726 fi
12727 CYGPATH=$ac_cv_path_CYGPATH
12728 if test -n "$CYGPATH"; then
12729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12730 $as_echo "$CYGPATH" >&6; }
12731 else
12732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12733 $as_echo "no" >&6; }
12734 fi
12735
12736
12737 if test "x$CYGPATH" = x; then
12738 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12739 fi
12740 else
12741 # Otherwise we believe it is a complete path. Use it as it is.
12742 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12743 $as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12745 $as_echo_n "checking for CYGPATH... " >&6; }
12746 if test ! -x "$tool_specified"; then
12747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12748 $as_echo "not found" >&6; }
12749 as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12750 fi
12751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12752 $as_echo "$tool_specified" >&6; }
12753 fi
12754 fi
12755 fi
12756
12757
12758
12759
12760 # Publish this variable in the help.
12761
12762
12763 if test "x$READLINK" = x; then
12764 # The variable is not set by user, try to locate tool using the code snippet
12765 for ac_prog in greadlink readlink
12766 do
12767 # Extract the first word of "$ac_prog", so it can be a program name with args.
12768 set dummy $ac_prog; ac_word=$2
12769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12770 $as_echo_n "checking for $ac_word... " >&6; }
12771 if ${ac_cv_path_READLINK+:} false; then :
12772 $as_echo_n "(cached) " >&6
12773 else
12774 case $READLINK in
12775 [\\/]* | ?:[\\/]*)
12776 ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12777 ;;
12778 *)
12779 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12780 for as_dir in $PATH
12781 do
12782 IFS=$as_save_IFS
12783 test -z "$as_dir" && as_dir=.
12784 for ac_exec_ext in '' $ac_executable_extensions; do
12785 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12786 ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12787 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12788 break 2
12789 fi
12790 done
12791 done
12792 IFS=$as_save_IFS
12793
12794 ;;
12795 esac
12796 fi
12797 READLINK=$ac_cv_path_READLINK
12798 if test -n "$READLINK"; then
12799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12800 $as_echo "$READLINK" >&6; }
12801 else
12802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12803 $as_echo "no" >&6; }
12804 fi
12805
12806
12807 test -n "$READLINK" && break
12808 done
12809
12810 else
12811 # The variable is set, but is it from the command line or the environment?
12812
12813 # Try to remove the string !READLINK! from our list.
12814 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12815 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12816 # If it failed, the variable was not from the command line. Ignore it,
12817 # but warn the user (except for BASH, which is always set by the calling BASH).
12818 if test "xREADLINK" != xBASH; then
12819 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12820 $as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12821 fi
12822 # Try to locate tool using the code snippet
12823 for ac_prog in greadlink readlink
12824 do
12825 # Extract the first word of "$ac_prog", so it can be a program name with args.
12826 set dummy $ac_prog; ac_word=$2
12827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12828 $as_echo_n "checking for $ac_word... " >&6; }
12829 if ${ac_cv_path_READLINK+:} false; then :
12830 $as_echo_n "(cached) " >&6
12831 else
12832 case $READLINK in
12833 [\\/]* | ?:[\\/]*)
12834 ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12835 ;;
12836 *)
12837 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12838 for as_dir in $PATH
12839 do
12840 IFS=$as_save_IFS
12841 test -z "$as_dir" && as_dir=.
12842 for ac_exec_ext in '' $ac_executable_extensions; do
12843 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12844 ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12845 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12846 break 2
12847 fi
12848 done
12849 done
12850 IFS=$as_save_IFS
12851
12852 ;;
12853 esac
12854 fi
12855 READLINK=$ac_cv_path_READLINK
12856 if test -n "$READLINK"; then
12857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12858 $as_echo "$READLINK" >&6; }
12859 else
12860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12861 $as_echo "no" >&6; }
12862 fi
12863
12864
12865 test -n "$READLINK" && break
12866 done
12867
12868 else
12869 # If it succeeded, then it was overridden by the user. We will use it
12870 # for the tool.
12871
12872 # First remove it from the list of overridden variables, so we can test
12873 # for unknown variables in the end.
12874 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12875
12876 # Check if the provided tool contains a complete path.
12877 tool_specified="$READLINK"
12878 tool_basename="${tool_specified##*/}"
12879 if test "x$tool_basename" = "x$tool_specified"; then
12880 # A command without a complete path is provided, search $PATH.
12881 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12882 $as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12883 # Extract the first word of "$tool_basename", so it can be a program name with args.
12884 set dummy $tool_basename; ac_word=$2
12885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12886 $as_echo_n "checking for $ac_word... " >&6; }
12887 if ${ac_cv_path_READLINK+:} false; then :
12888 $as_echo_n "(cached) " >&6
12889 else
12890 case $READLINK in
12891 [\\/]* | ?:[\\/]*)
12892 ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12893 ;;
12894 *)
12895 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12896 for as_dir in $PATH
12897 do
12898 IFS=$as_save_IFS
12899 test -z "$as_dir" && as_dir=.
12900 for ac_exec_ext in '' $ac_executable_extensions; do
12901 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12902 ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12903 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12904 break 2
12905 fi
12906 done
12907 done
12908 IFS=$as_save_IFS
12909
12910 ;;
12911 esac
12912 fi
12913 READLINK=$ac_cv_path_READLINK
12914 if test -n "$READLINK"; then
12915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12916 $as_echo "$READLINK" >&6; }
12917 else
12918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12919 $as_echo "no" >&6; }
12920 fi
12921
12922
12923 if test "x$READLINK" = x; then
12924 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12925 fi
12926 else
12927 # Otherwise we believe it is a complete path. Use it as it is.
12928 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12929 $as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12931 $as_echo_n "checking for READLINK... " >&6; }
12932 if test ! -x "$tool_specified"; then
12933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12934 $as_echo "not found" >&6; }
12935 as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12936 fi
12937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12938 $as_echo "$tool_specified" >&6; }
12939 fi
12940 fi
12941 fi
12942
12943
12944
12945
12946 # Publish this variable in the help.
12947
12948
12949 if test "x$DF" = x; then
12950 # The variable is not set by user, try to locate tool using the code snippet
12951 for ac_prog in df
12952 do
12953 # Extract the first word of "$ac_prog", so it can be a program name with args.
12954 set dummy $ac_prog; ac_word=$2
12955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12956 $as_echo_n "checking for $ac_word... " >&6; }
12957 if ${ac_cv_path_DF+:} false; then :
12958 $as_echo_n "(cached) " >&6
12959 else
12960 case $DF in
12961 [\\/]* | ?:[\\/]*)
12962 ac_cv_path_DF="$DF" # Let the user override the test with a path.
12963 ;;
12964 *)
12965 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12966 for as_dir in $PATH
12967 do
12968 IFS=$as_save_IFS
12969 test -z "$as_dir" && as_dir=.
12970 for ac_exec_ext in '' $ac_executable_extensions; do
12971 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12972 ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12973 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12974 break 2
12975 fi
12976 done
12977 done
12978 IFS=$as_save_IFS
12979
12980 ;;
12981 esac
12982 fi
12983 DF=$ac_cv_path_DF
12984 if test -n "$DF"; then
12985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12986 $as_echo "$DF" >&6; }
12987 else
12988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12989 $as_echo "no" >&6; }
12990 fi
12991
12992
12993 test -n "$DF" && break
12994 done
12995
12996 else
12997 # The variable is set, but is it from the command line or the environment?
12998
12999 # Try to remove the string !DF! from our list.
13000 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
13001 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13002 # If it failed, the variable was not from the command line. Ignore it,
13003 # but warn the user (except for BASH, which is always set by the calling BASH).
13004 if test "xDF" != xBASH; then
13005 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
13006 $as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
13007 fi
13008 # Try to locate tool using the code snippet
13009 for ac_prog in df
13010 do
13011 # Extract the first word of "$ac_prog", so it can be a program name with args.
13012 set dummy $ac_prog; ac_word=$2
13013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13014 $as_echo_n "checking for $ac_word... " >&6; }
13015 if ${ac_cv_path_DF+:} false; then :
13016 $as_echo_n "(cached) " >&6
13017 else
13018 case $DF in
13019 [\\/]* | ?:[\\/]*)
13020 ac_cv_path_DF="$DF" # Let the user override the test with a path.
13021 ;;
13022 *)
13023 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13024 for as_dir in $PATH
13025 do
13026 IFS=$as_save_IFS
13027 test -z "$as_dir" && as_dir=.
13028 for ac_exec_ext in '' $ac_executable_extensions; do
13029 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13030 ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13031 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13032 break 2
13033 fi
13034 done
13035 done
13036 IFS=$as_save_IFS
13037
13038 ;;
13039 esac
13040 fi
13041 DF=$ac_cv_path_DF
13042 if test -n "$DF"; then
13043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13044 $as_echo "$DF" >&6; }
13045 else
13046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13047 $as_echo "no" >&6; }
13048 fi
13049
13050
13051 test -n "$DF" && break
13052 done
13053
13054 else
13055 # If it succeeded, then it was overridden by the user. We will use it
13056 # for the tool.
13057
13058 # First remove it from the list of overridden variables, so we can test
13059 # for unknown variables in the end.
13060 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13061
13062 # Check if the provided tool contains a complete path.
13063 tool_specified="$DF"
13064 tool_basename="${tool_specified##*/}"
13065 if test "x$tool_basename" = "x$tool_specified"; then
13066 # A command without a complete path is provided, search $PATH.
13067 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
13068 $as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
13069 # Extract the first word of "$tool_basename", so it can be a program name with args.
13070 set dummy $tool_basename; ac_word=$2
13071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13072 $as_echo_n "checking for $ac_word... " >&6; }
13073 if ${ac_cv_path_DF+:} false; then :
13074 $as_echo_n "(cached) " >&6
13075 else
13076 case $DF in
13077 [\\/]* | ?:[\\/]*)
13078 ac_cv_path_DF="$DF" # Let the user override the test with a path.
13079 ;;
13080 *)
13081 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13082 for as_dir in $PATH
13083 do
13084 IFS=$as_save_IFS
13085 test -z "$as_dir" && as_dir=.
13086 for ac_exec_ext in '' $ac_executable_extensions; do
13087 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13088 ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13089 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13090 break 2
13091 fi
13092 done
13093 done
13094 IFS=$as_save_IFS
13095
13096 ;;
13097 esac
13098 fi
13099 DF=$ac_cv_path_DF
13100 if test -n "$DF"; then
13101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13102 $as_echo "$DF" >&6; }
13103 else
13104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13105 $as_echo "no" >&6; }
13106 fi
13107
13108
13109 if test "x$DF" = x; then
13110 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13111 fi
13112 else
13113 # Otherwise we believe it is a complete path. Use it as it is.
13114 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13115 $as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13117 $as_echo_n "checking for DF... " >&6; }
13118 if test ! -x "$tool_specified"; then
13119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13120 $as_echo "not found" >&6; }
13121 as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13122 fi
13123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13124 $as_echo "$tool_specified" >&6; }
13125 fi
13126 fi
13127 fi
13128
13129
13130
13131
13132 # Publish this variable in the help.
13133
13134
13135 if test "x$SETFILE" = x; then
13136 # The variable is not set by user, try to locate tool using the code snippet
13137 for ac_prog in SetFile
13138 do
13139 # Extract the first word of "$ac_prog", so it can be a program name with args.
13140 set dummy $ac_prog; ac_word=$2
13141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13142 $as_echo_n "checking for $ac_word... " >&6; }
13143 if ${ac_cv_path_SETFILE+:} false; then :
13144 $as_echo_n "(cached) " >&6
13145 else
13146 case $SETFILE in
13147 [\\/]* | ?:[\\/]*)
13148 ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13149 ;;
13150 *)
13151 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13152 for as_dir in $PATH
13153 do
13154 IFS=$as_save_IFS
13155 test -z "$as_dir" && as_dir=.
13156 for ac_exec_ext in '' $ac_executable_extensions; do
13157 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13158 ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13159 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13160 break 2
13161 fi
13162 done
13163 done
13164 IFS=$as_save_IFS
13165
13166 ;;
13167 esac
13168 fi
13169 SETFILE=$ac_cv_path_SETFILE
13170 if test -n "$SETFILE"; then
13171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13172 $as_echo "$SETFILE" >&6; }
13173 else
13174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13175 $as_echo "no" >&6; }
13176 fi
13177
13178
13179 test -n "$SETFILE" && break
13180 done
13181
13182 else
13183 # The variable is set, but is it from the command line or the environment?
13184
13185 # Try to remove the string !SETFILE! from our list.
13186 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13187 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13188 # If it failed, the variable was not from the command line. Ignore it,
13189 # but warn the user (except for BASH, which is always set by the calling BASH).
13190 if test "xSETFILE" != xBASH; then
13191 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13192 $as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13193 fi
13194 # Try to locate tool using the code snippet
13195 for ac_prog in SetFile
13196 do
13197 # Extract the first word of "$ac_prog", so it can be a program name with args.
13198 set dummy $ac_prog; ac_word=$2
13199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13200 $as_echo_n "checking for $ac_word... " >&6; }
13201 if ${ac_cv_path_SETFILE+:} false; then :
13202 $as_echo_n "(cached) " >&6
13203 else
13204 case $SETFILE in
13205 [\\/]* | ?:[\\/]*)
13206 ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13207 ;;
13208 *)
13209 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13210 for as_dir in $PATH
13211 do
13212 IFS=$as_save_IFS
13213 test -z "$as_dir" && as_dir=.
13214 for ac_exec_ext in '' $ac_executable_extensions; do
13215 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13216 ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13217 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13218 break 2
13219 fi
13220 done
13221 done
13222 IFS=$as_save_IFS
13223
13224 ;;
13225 esac
13226 fi
13227 SETFILE=$ac_cv_path_SETFILE
13228 if test -n "$SETFILE"; then
13229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13230 $as_echo "$SETFILE" >&6; }
13231 else
13232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13233 $as_echo "no" >&6; }
13234 fi
13235
13236
13237 test -n "$SETFILE" && break
13238 done
13239
13240 else
13241 # If it succeeded, then it was overridden by the user. We will use it
13242 # for the tool.
13243
13244 # First remove it from the list of overridden variables, so we can test
13245 # for unknown variables in the end.
13246 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13247
13248 # Check if the provided tool contains a complete path.
13249 tool_specified="$SETFILE"
13250 tool_basename="${tool_specified##*/}"
13251 if test "x$tool_basename" = "x$tool_specified"; then
13252 # A command without a complete path is provided, search $PATH.
13253 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13254 $as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13255 # Extract the first word of "$tool_basename", so it can be a program name with args.
13256 set dummy $tool_basename; ac_word=$2
13257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13258 $as_echo_n "checking for $ac_word... " >&6; }
13259 if ${ac_cv_path_SETFILE+:} false; then :
13260 $as_echo_n "(cached) " >&6
13261 else
13262 case $SETFILE in
13263 [\\/]* | ?:[\\/]*)
13264 ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13265 ;;
13266 *)
13267 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13268 for as_dir in $PATH
13269 do
13270 IFS=$as_save_IFS
13271 test -z "$as_dir" && as_dir=.
13272 for ac_exec_ext in '' $ac_executable_extensions; do
13273 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13274 ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13275 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13276 break 2
13277 fi
13278 done
13279 done
13280 IFS=$as_save_IFS
13281
13282 ;;
13283 esac
13284 fi
13285 SETFILE=$ac_cv_path_SETFILE
13286 if test -n "$SETFILE"; then
13287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13288 $as_echo "$SETFILE" >&6; }
13289 else
13290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13291 $as_echo "no" >&6; }
13292 fi
13293
13294
13295 if test "x$SETFILE" = x; then
13296 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13297 fi
13298 else
13299 # Otherwise we believe it is a complete path. Use it as it is.
13300 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13301 $as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13303 $as_echo_n "checking for SETFILE... " >&6; }
13304 if test ! -x "$tool_specified"; then
13305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13306 $as_echo "not found" >&6; }
13307 as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13308 fi
13309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13310 $as_echo "$tool_specified" >&6; }
13311 fi
13312 fi
13313 fi
13314
13315
13316
13317
13318 # Publish this variable in the help.
13319
13320
13321 if test "x$CPIO" = x; then
13322 # The variable is not set by user, try to locate tool using the code snippet
13323 for ac_prog in cpio bsdcpio
13324 do
13325 # Extract the first word of "$ac_prog", so it can be a program name with args.
13326 set dummy $ac_prog; ac_word=$2
13327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13328 $as_echo_n "checking for $ac_word... " >&6; }
13329 if ${ac_cv_path_CPIO+:} false; then :
13330 $as_echo_n "(cached) " >&6
13331 else
13332 case $CPIO in
13333 [\\/]* | ?:[\\/]*)
13334 ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13335 ;;
13336 *)
13337 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13338 for as_dir in $PATH
13339 do
13340 IFS=$as_save_IFS
13341 test -z "$as_dir" && as_dir=.
13342 for ac_exec_ext in '' $ac_executable_extensions; do
13343 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13344 ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13345 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13346 break 2
13347 fi
13348 done
13349 done
13350 IFS=$as_save_IFS
13351
13352 ;;
13353 esac
13354 fi
13355 CPIO=$ac_cv_path_CPIO
13356 if test -n "$CPIO"; then
13357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13358 $as_echo "$CPIO" >&6; }
13359 else
13360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13361 $as_echo "no" >&6; }
13362 fi
13363
13364
13365 test -n "$CPIO" && break
13366 done
13367
13368 else
13369 # The variable is set, but is it from the command line or the environment?
13370
13371 # Try to remove the string !CPIO! from our list.
13372 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
13373 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13374 # If it failed, the variable was not from the command line. Ignore it,
13375 # but warn the user (except for BASH, which is always set by the calling BASH).
13376 if test "xCPIO" != xBASH; then
13377 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
13378 $as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
13379 fi
13380 # Try to locate tool using the code snippet
13381 for ac_prog in cpio bsdcpio
13382 do
13383 # Extract the first word of "$ac_prog", so it can be a program name with args.
13384 set dummy $ac_prog; ac_word=$2
13385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13386 $as_echo_n "checking for $ac_word... " >&6; }
13387 if ${ac_cv_path_CPIO+:} false; then :
13388 $as_echo_n "(cached) " >&6
13389 else
13390 case $CPIO in
13391 [\\/]* | ?:[\\/]*)
13392 ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13393 ;;
13394 *)
13395 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13396 for as_dir in $PATH
13397 do
13398 IFS=$as_save_IFS
13399 test -z "$as_dir" && as_dir=.
13400 for ac_exec_ext in '' $ac_executable_extensions; do
13401 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13402 ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13403 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13404 break 2
13405 fi
13406 done
13407 done
13408 IFS=$as_save_IFS
13409
13410 ;;
13411 esac
13412 fi
13413 CPIO=$ac_cv_path_CPIO
13414 if test -n "$CPIO"; then
13415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13416 $as_echo "$CPIO" >&6; }
13417 else
13418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13419 $as_echo "no" >&6; }
13420 fi
13421
13422
13423 test -n "$CPIO" && break
13424 done
13425
13426 else
13427 # If it succeeded, then it was overridden by the user. We will use it
13428 # for the tool.
13429
13430 # First remove it from the list of overridden variables, so we can test
13431 # for unknown variables in the end.
13432 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13433
13434 # Check if the provided tool contains a complete path.
13435 tool_specified="$CPIO"
13436 tool_basename="${tool_specified##*/}"
13437 if test "x$tool_basename" = "x$tool_specified"; then
13438 # A command without a complete path is provided, search $PATH.
13439 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
13440 $as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
13441 # Extract the first word of "$tool_basename", so it can be a program name with args.
13442 set dummy $tool_basename; ac_word=$2
13443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13444 $as_echo_n "checking for $ac_word... " >&6; }
13445 if ${ac_cv_path_CPIO+:} false; then :
13446 $as_echo_n "(cached) " >&6
13447 else
13448 case $CPIO in
13449 [\\/]* | ?:[\\/]*)
13450 ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13451 ;;
13452 *)
13453 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13454 for as_dir in $PATH
13455 do
13456 IFS=$as_save_IFS
13457 test -z "$as_dir" && as_dir=.
13458 for ac_exec_ext in '' $ac_executable_extensions; do
13459 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13460 ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13461 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13462 break 2
13463 fi
13464 done
13465 done
13466 IFS=$as_save_IFS
13467
13468 ;;
13469 esac
13470 fi
13471 CPIO=$ac_cv_path_CPIO
13472 if test -n "$CPIO"; then
13473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13474 $as_echo "$CPIO" >&6; }
13475 else
13476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13477 $as_echo "no" >&6; }
13478 fi
13479
13480
13481 if test "x$CPIO" = x; then
13482 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13483 fi
13484 else
13485 # Otherwise we believe it is a complete path. Use it as it is.
13486 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
13487 $as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
13488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
13489 $as_echo_n "checking for CPIO... " >&6; }
13490 if test ! -x "$tool_specified"; then
13491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13492 $as_echo "not found" >&6; }
13493 as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
13494 fi
13495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13496 $as_echo "$tool_specified" >&6; }
13497 fi
13498 fi
13499 fi
13500
13501
13502
13503
13504 # Now we can determine OpenJDK build and target platforms. This is required to
13505 # have early on.
13506 # Make sure we can run config.sub.
13507 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13508 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13509
13510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13511 $as_echo_n "checking build system type... " >&6; }
13512 if ${ac_cv_build+:} false; then :
13513 $as_echo_n "(cached) " >&6
13514 else
13515 ac_build_alias=$build_alias
13516 test "x$ac_build_alias" = x &&
13517 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13518 test "x$ac_build_alias" = x &&
13519 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13520 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13521 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13522
13523 fi
13524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13525 $as_echo "$ac_cv_build" >&6; }
13526 case $ac_cv_build in
13527 *-*-*) ;;
13528 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13529 esac
13530 build=$ac_cv_build
13531 ac_save_IFS=$IFS; IFS='-'
13532 set x $ac_cv_build
13533 shift
13534 build_cpu=$1
13535 build_vendor=$2
13536 shift; shift
13537 # Remember, the first character of IFS is used to create $*,
13538 # except with old shells:
13539 build_os=$*
13540 IFS=$ac_save_IFS
13541 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13542
13543
13544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13545 $as_echo_n "checking host system type... " >&6; }
13546 if ${ac_cv_host+:} false; then :
13547 $as_echo_n "(cached) " >&6
13548 else
13549 if test "x$host_alias" = x; then
13550 ac_cv_host=$ac_cv_build
13551 else
13552 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13553 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13554 fi
13555
13556 fi
13557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13558 $as_echo "$ac_cv_host" >&6; }
13559 case $ac_cv_host in
13560 *-*-*) ;;
13561 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13562 esac
13563 host=$ac_cv_host
13564 ac_save_IFS=$IFS; IFS='-'
13565 set x $ac_cv_host
13566 shift
13567 host_cpu=$1
13568 host_vendor=$2
13569 shift; shift
13570 # Remember, the first character of IFS is used to create $*,
13571 # except with old shells:
13572 host_os=$*
13573 IFS=$ac_save_IFS
13574 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13575
13576
13577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13578 $as_echo_n "checking target system type... " >&6; }
13579 if ${ac_cv_target+:} false; then :
13580 $as_echo_n "(cached) " >&6
13581 else
13582 if test "x$target_alias" = x; then
13583 ac_cv_target=$ac_cv_host
13584 else
13585 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13586 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13587 fi
13588
13589 fi
13590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13591 $as_echo "$ac_cv_target" >&6; }
13592 case $ac_cv_target in
13593 *-*-*) ;;
13594 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13595 esac
13596 target=$ac_cv_target
13597 ac_save_IFS=$IFS; IFS='-'
13598 set x $ac_cv_target
13599 shift
13600 target_cpu=$1
13601 target_vendor=$2
13602 shift; shift
13603 # Remember, the first character of IFS is used to create $*,
13604 # except with old shells:
13605 target_os=$*
13606 IFS=$ac_save_IFS
13607 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13608
13609
13610 # The aliases save the names the user supplied, while $host etc.
13611 # will get canonicalized.
13612 test -n "$target_alias" &&
13613 test "$program_prefix$program_suffix$program_transform_name" = \
13614 NONENONEs,x,x, &&
13615 program_prefix=${target_alias}-
13616
13617 # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13618 # is confusing; it assumes you are cross-compiling a cross-compiler (!) and "target" is thus the target of the
13619 # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13620 # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13621 # to use the configure naming style.
13622
13623
13624
13625
13626
13627 # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13628 # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13629 # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13630 # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13631 OPENJDK_TARGET_AUTOCONF_NAME="$host"
13632 OPENJDK_BUILD_AUTOCONF_NAME="$build"
13633
13634
13635
13636 # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13637
13638 case "$build_os" in
13639 *linux*)
13640 VAR_OS=linux
13641 VAR_OS_TYPE=unix
13642 ;;
13643 *solaris*)
13644 VAR_OS=solaris
13645 VAR_OS_TYPE=unix
13646 ;;
13647 *darwin*)
13648 VAR_OS=macosx
13649 VAR_OS_TYPE=unix
13650 ;;
13651 *bsd*)
13652 VAR_OS=bsd
13653 VAR_OS_TYPE=unix
13654 ;;
13655 *cygwin*)
13656 VAR_OS=windows
13657 VAR_OS_ENV=windows.cygwin
13658 ;;
13659 *mingw*)
13660 VAR_OS=windows
13661 VAR_OS_ENV=windows.msys
13662 ;;
13663 *aix*)
13664 VAR_OS=aix
13665 VAR_OS_TYPE=unix
13666 ;;
13667 *)
13668 as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13669 ;;
13670 esac
13671
13672
13673 # First argument is the cpu name from the trip/quad
13674 case "$build_cpu" in
13675 x86_64)
13676 VAR_CPU=x86_64
13677 VAR_CPU_ARCH=x86
13678 VAR_CPU_BITS=64
13679 VAR_CPU_ENDIAN=little
13680 ;;
13681 i?86)
13682 VAR_CPU=x86
13683 VAR_CPU_ARCH=x86
13684 VAR_CPU_BITS=32
13685 VAR_CPU_ENDIAN=little
13686 ;;
13687 arm*)
13688 VAR_CPU=arm
13689 VAR_CPU_ARCH=arm
13690 VAR_CPU_BITS=32
13691 VAR_CPU_ENDIAN=little
13692 ;;
13693 aarch64)
13694 VAR_CPU=aarch64
13695 VAR_CPU_ARCH=aarch64
13696 VAR_CPU_BITS=64
13697 VAR_CPU_ENDIAN=little
13698 ;;
13699 powerpc)
13700 VAR_CPU=ppc
13701 VAR_CPU_ARCH=ppc
13702 VAR_CPU_BITS=32
13703 VAR_CPU_ENDIAN=big
13704 ;;
13705 powerpc64)
13706 VAR_CPU=ppc64
13707 VAR_CPU_ARCH=ppc
13708 VAR_CPU_BITS=64
13709 VAR_CPU_ENDIAN=big
13710 ;;
13711 powerpc64le)
13712 VAR_CPU=ppc64
13713 VAR_CPU_ARCH=ppc
13714 VAR_CPU_BITS=64
13715 VAR_CPU_ENDIAN=little
13716 ;;
13717 s390)
13718 VAR_CPU=s390
13719 VAR_CPU_ARCH=s390
13720 VAR_CPU_BITS=32
13721 VAR_CPU_ENDIAN=big
13722 ;;
13723 s390x)
13724 VAR_CPU=s390x
13725 VAR_CPU_ARCH=s390
13726 VAR_CPU_BITS=64
13727 VAR_CPU_ENDIAN=big
13728 ;;
13729 sparc)
13730 VAR_CPU=sparc
13731 VAR_CPU_ARCH=sparc
13732 VAR_CPU_BITS=32
13733 VAR_CPU_ENDIAN=big
13734 ;;
13735 sparcv9|sparc64)
13736 VAR_CPU=sparcv9
13737 VAR_CPU_ARCH=sparc
13738 VAR_CPU_BITS=64
13739 VAR_CPU_ENDIAN=big
13740 ;;
13741 *)
13742 as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13743 ;;
13744 esac
13745
13746 # ..and setup our own variables. (Do this explicitely to facilitate searching)
13747 OPENJDK_BUILD_OS="$VAR_OS"
13748 if test "x$VAR_OS_TYPE" != x; then
13749 OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
13750 else
13751 OPENJDK_BUILD_OS_TYPE="$VAR_OS"
13752 fi
13753 if test "x$VAR_OS_ENV" != x; then
13754 OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13755 else
13756 OPENJDK_BUILD_OS_ENV="$VAR_OS"
13757 fi
13758 OPENJDK_BUILD_CPU="$VAR_CPU"
13759 OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13760 OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13761 OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13762
13763
13764
13765
13766
13767
13768
13769
13770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13771 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
13772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13773 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13774
13775 # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13776
13777 case "$host_os" in
13778 *linux*)
13779 VAR_OS=linux
13780 VAR_OS_TYPE=unix
13781 ;;
13782 *solaris*)
13783 VAR_OS=solaris
13784 VAR_OS_TYPE=unix
13785 ;;
13786 *darwin*)
13787 VAR_OS=macosx
13788 VAR_OS_TYPE=unix
13789 ;;
13790 *bsd*)
13791 VAR_OS=bsd
13792 VAR_OS_TYPE=unix
13793 ;;
13794 *cygwin*)
13795 VAR_OS=windows
13796 VAR_OS_ENV=windows.cygwin
13797 ;;
13798 *mingw*)
13799 VAR_OS=windows
13800 VAR_OS_ENV=windows.msys
13801 ;;
13802 *aix*)
13803 VAR_OS=aix
13804 VAR_OS_TYPE=unix
13805 ;;
13806 *)
13807 as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13808 ;;
13809 esac
13810
13811
13812 # First argument is the cpu name from the trip/quad
13813 case "$host_cpu" in
13814 x86_64)
13815 VAR_CPU=x86_64
13816 VAR_CPU_ARCH=x86
13817 VAR_CPU_BITS=64
13818 VAR_CPU_ENDIAN=little
13819 ;;
13820 i?86)
13821 VAR_CPU=x86
13822 VAR_CPU_ARCH=x86
13823 VAR_CPU_BITS=32
13824 VAR_CPU_ENDIAN=little
13825 ;;
13826 arm*)
13827 VAR_CPU=arm
13828 VAR_CPU_ARCH=arm
13829 VAR_CPU_BITS=32
13830 VAR_CPU_ENDIAN=little
13831 ;;
13832 aarch64)
13833 VAR_CPU=aarch64
13834 VAR_CPU_ARCH=aarch64
13835 VAR_CPU_BITS=64
13836 VAR_CPU_ENDIAN=little
13837 ;;
13838 powerpc)
13839 VAR_CPU=ppc
13840 VAR_CPU_ARCH=ppc
13841 VAR_CPU_BITS=32
13842 VAR_CPU_ENDIAN=big
13843 ;;
13844 powerpc64)
13845 VAR_CPU=ppc64
13846 VAR_CPU_ARCH=ppc
13847 VAR_CPU_BITS=64
13848 VAR_CPU_ENDIAN=big
13849 ;;
13850 powerpc64le)
13851 VAR_CPU=ppc64
13852 VAR_CPU_ARCH=ppc
13853 VAR_CPU_BITS=64
13854 VAR_CPU_ENDIAN=little
13855 ;;
13856 s390)
13857 VAR_CPU=s390
13858 VAR_CPU_ARCH=s390
13859 VAR_CPU_BITS=32
13860 VAR_CPU_ENDIAN=big
13861 ;;
13862 s390x)
13863 VAR_CPU=s390x
13864 VAR_CPU_ARCH=s390
13865 VAR_CPU_BITS=64
13866 VAR_CPU_ENDIAN=big
13867 ;;
13868 sparc)
13869 VAR_CPU=sparc
13870 VAR_CPU_ARCH=sparc
13871 VAR_CPU_BITS=32
13872 VAR_CPU_ENDIAN=big
13873 ;;
13874 sparcv9|sparc64)
13875 VAR_CPU=sparcv9
13876 VAR_CPU_ARCH=sparc
13877 VAR_CPU_BITS=64
13878 VAR_CPU_ENDIAN=big
13879 ;;
13880 *)
13881 as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13882 ;;
13883 esac
13884
13885 # ... and setup our own variables. (Do this explicitely to facilitate searching)
13886 OPENJDK_TARGET_OS="$VAR_OS"
13887 if test "x$VAR_OS_TYPE" != x; then
13888 OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
13889 else
13890 OPENJDK_TARGET_OS_TYPE="$VAR_OS"
13891 fi
13892 if test "x$VAR_OS_ENV" != x; then
13893 OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13894 else
13895 OPENJDK_TARGET_OS_ENV="$VAR_OS"
13896 fi
13897 OPENJDK_TARGET_CPU="$VAR_CPU"
13898 OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13899 OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13900 OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13901
13902
13903
13904
13905
13906
13907
13908
13909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13910 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
13911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13912 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13913
13914
13915
13916 # Check whether --with-target-bits was given.
13917 if test "${with_target_bits+set}" = set; then :
13918 withval=$with_target_bits;
13919 fi
13920
13921
13922 # We have three types of compiles:
13923 # native == normal compilation, target system == build system
13924 # cross == traditional cross compilation, target system != build system; special toolchain needed
13925 # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13926 #
13927 if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13928 # We're doing a proper cross-compilation
13929 COMPILE_TYPE="cross"
13930 else
13931 COMPILE_TYPE="native"
13932 fi
13933
13934 if test "x$with_target_bits" != x; then
13935 if test "x$COMPILE_TYPE" = "xcross"; then
13936 as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13937 fi
13938
13939 if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13940 # A reduced build is requested
13941 COMPILE_TYPE="reduced"
13942 OPENJDK_TARGET_CPU_BITS=32
13943 if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13944 OPENJDK_TARGET_CPU=x86
13945 elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13946 OPENJDK_TARGET_CPU=sparc
13947 else
13948 as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13949 fi
13950 elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13951 as_fn_error $? "It is not possible to use --with-target-bits=64 on a 32 bit system. Use proper cross-compilation instead." "$LINENO" 5
13952 elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13953 { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13954 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13955 else
13956 as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13957 fi
13958 fi
13959
13960
13961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13962 $as_echo_n "checking compilation type... " >&6; }
13963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13964 $as_echo "$COMPILE_TYPE" >&6; }
13965
13966
13967 if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13968 REQUIRED_OS_NAME=SunOS
13969 REQUIRED_OS_VERSION=5.10
13970 fi
13971 if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13972 REQUIRED_OS_NAME=Linux
13973 REQUIRED_OS_VERSION=2.6
13974 fi
13975 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13976 REQUIRED_OS_NAME=Windows
13977 if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13978 REQUIRED_OS_VERSION=5.2
13979 else
13980 REQUIRED_OS_VERSION=5.1
13981 fi
13982 fi
13983 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13984 REQUIRED_OS_NAME=Darwin
13985 REQUIRED_OS_VERSION=11.2
13986 fi
13987
13988
13989
13990
13991
13992 # Also store the legacy naming of the cpu.
13993 # Ie i586 and amd64 instead of x86 and x86_64
13994 OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13995 if test "x$OPENJDK_TARGET_CPU" = xx86; then
13996 OPENJDK_TARGET_CPU_LEGACY="i586"
13997 elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13998 # On all platforms except MacOSX replace x86_64 with amd64.
13999 OPENJDK_TARGET_CPU_LEGACY="amd64"
14000 fi
14001
14002
14003 # And the second legacy naming of the cpu.
14004 # Ie i386 and amd64 instead of x86 and x86_64.
14005 OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
14006 if test "x$OPENJDK_TARGET_CPU" = xx86; then
14007 OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
14008 elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14009 OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
14010 fi
14011
14012
14013 # This is the name of the cpu (but using i386 and amd64 instead of
14014 # x86 and x86_64, respectively), preceeded by a /, to be used when
14015 # locating libraries. On macosx, it's empty, though.
14016 OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
14017 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
14018 OPENJDK_TARGET_CPU_LIBDIR=""
14019 fi
14020
14021
14022 # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
14023 # /amd64 or /sparcv9. This string is appended to some library paths, like this:
14024 # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
14025 OPENJDK_TARGET_CPU_ISADIR=""
14026 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
14027 if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14028 OPENJDK_TARGET_CPU_ISADIR="/amd64"
14029 elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
14030 OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
14031 fi
14032 fi
14033
14034
14035 # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
14036 OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
14037 if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
14038 # On linux only, we replace x86 with i386.
14039 OPENJDK_TARGET_CPU_OSARCH="i386"
14040 elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14041 # On all platforms except macosx, we replace x86_64 with amd64.
14042 OPENJDK_TARGET_CPU_OSARCH="amd64"
14043 fi
14044
14045
14046 OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
14047 if test "x$OPENJDK_TARGET_CPU" = xx86; then
14048 OPENJDK_TARGET_CPU_JLI="i386"
14049 elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14050 # On all platforms except macosx, we replace x86_64 with amd64.
14051 OPENJDK_TARGET_CPU_JLI="amd64"
14052 fi
14053 # Now setup the -D flags for building libjli.
14054 OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
14055 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
14056 if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
14057 OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
14058 elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
14059 OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
14060 fi
14061 fi
14062
14063
14064 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
14065 OPENJDK_TARGET_OS_EXPORT_DIR=macosx
14066 else
14067 OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
14068 fi
14069
14070
14071 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14072 A_LP64="LP64:="
14073 # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
14074 # unpack200.exe
14075 if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
14076 ADD_LP64="-D_LP64=1"
14077 fi
14078 fi
14079 LP64=$A_LP64
14080
14081
14082 if test "x$COMPILE_TYPE" = "xcross"; then
14083 # FIXME: ... or should this include reduced builds..?
14084 DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
14085 else
14086 DEFINE_CROSS_COMPILE_ARCH=""
14087 fi
14088
14089
14090 # ZERO_ARCHDEF is used to enable architecture-specific code
14091 case "${OPENJDK_TARGET_CPU}" in
14092 ppc) ZERO_ARCHDEF=PPC32 ;;
14093 ppc64) ZERO_ARCHDEF=PPC64 ;;
14094 s390*) ZERO_ARCHDEF=S390 ;;
14095 sparc*) ZERO_ARCHDEF=SPARC ;;
14096 x86_64*) ZERO_ARCHDEF=AMD64 ;;
14097 x86) ZERO_ARCHDEF=IA32 ;;
14098 *) ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
14099 esac
14100
14101
14102
14103
14104 # Continue setting up basic stuff. Most remaining code require fundamental tools.
14105
14106 # Save the current directory this script was started from
14107 CURDIR="$PWD"
14108
14109 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
14110 PATH_SEP=";"
14111
14112 SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
14113 if test $SRC_ROOT_LENGTH -gt 100; then
14114 as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
14115 fi
14116
14117 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
14119 $as_echo_n "checking cygwin release... " >&6; }
14120 CYGWIN_VERSION=`$UNAME -r`
14121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
14122 $as_echo "$CYGWIN_VERSION" >&6; }
14123 WINDOWS_ENV_VENDOR='cygwin'
14124 WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
14125
14126 CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
14127 if test "x$CYGWIN_VERSION_OLD" != x; then
14128 { $as_echo "$as_me:${as_lineno-$LINENO}: Your cygwin is too old. You are running $CYGWIN_VERSION, but at least cygwin 1.7 is required. Please upgrade." >&5
14129 $as_echo "$as_me: Your cygwin is too old. You are running $CYGWIN_VERSION, but at least cygwin 1.7 is required. Please upgrade." >&6;}
14130 as_fn_error $? "Cannot continue" "$LINENO" 5
14131 fi
14132 if test "x$CYGPATH" = x; then
14133 as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
14134 fi
14135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
14136 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
14137 # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14138 cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
14139 # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
14140 CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
14141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
14142 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
14143 WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
14144 test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
14145 if test "x$test_cygdrive_prefix" = x; then
14146 as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
14147 fi
14148 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
14150 $as_echo_n "checking msys release... " >&6; }
14151 MSYS_VERSION=`$UNAME -r`
14152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
14153 $as_echo "$MSYS_VERSION" >&6; }
14154
14155 WINDOWS_ENV_VENDOR='msys'
14156 WINDOWS_ENV_VERSION="$MSYS_VERSION"
14157
14158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
14159 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
14160 # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14161 MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
14162
14163 windows_path="$MSYS_ROOT_PATH"
14164 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14165 unix_path=`$CYGPATH -u "$windows_path"`
14166 MSYS_ROOT_PATH="$unix_path"
14167 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14168 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14169 MSYS_ROOT_PATH="$unix_path"
14170 fi
14171
14172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
14173 $as_echo "$MSYS_ROOT_PATH" >&6; }
14174 WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
14175 else
14176 as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
14177 fi
14178
14179 # Test if windows or unix (cygwin/msys) find is first in path.
14180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
14181 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
14182 FIND_BINARY_OUTPUT=`find --version 2>&1`
14183 if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
14184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
14185 $as_echo "unix style" >&6; }
14186 elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
14187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
14188 $as_echo "Windows" >&6; }
14189 { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
14190 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
14191 { $as_echo "$as_me:${as_lineno-$LINENO}: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&5
14192 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
14193 as_fn_error $? "Cannot continue" "$LINENO" 5
14194 else
14195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
14196 $as_echo "unknown" >&6; }
14197 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
14198 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
14199 fi
14200
14201 else
14202 PATH_SEP=":"
14203 fi
14204
14205
14206 # We get the top-level directory from the supporting wrappers.
14207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
14208 $as_echo_n "checking for top-level directory... " >&6; }
14209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
14210 $as_echo "$TOPDIR" >&6; }
14211
14212
14213 # Save the original version of TOPDIR for string comparisons
14214 ORIGINAL_TOPDIR="$TOPDIR"
14215
14216
14217 # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
14218
14219 # Only process if variable expands to non-empty
14220
14221 if test "x$CURDIR" != x; then
14222 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14223
14224 # Input might be given as Windows format, start by converting to
14225 # unix format.
14226 path="$CURDIR"
14227 new_path=`$CYGPATH -u "$path"`
14228
14229 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14230 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14231 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14232 # "foo.exe" is OK but "foo" is an error.
14233 #
14234 # This test is therefore slightly more accurate than "test -f" to check for file precense.
14235 # It is also a way to make sure we got the proper file name for the real test later on.
14236 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14237 if test "x$test_shortpath" = x; then
14238 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14239 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14240 as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14241 fi
14242
14243 # Call helper function which possibly converts this using DOS-style short mode.
14244 # If so, the updated path is stored in $new_path.
14245
14246 input_path="$new_path"
14247 # Check if we need to convert this using DOS-style short mode. If the path
14248 # contains just simple characters, use it. Otherwise (spaces, weird characters),
14249 # take no chances and rewrite it.
14250 # Note: m4 eats our [], so we need to use [ and ] instead.
14251 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14252 if test "x$has_forbidden_chars" != x; then
14253 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14254 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14255 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14256 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14257 # Going to short mode and back again did indeed matter. Since short mode is
14258 # case insensitive, let's make it lowercase to improve readability.
14259 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14260 # Now convert it back to Unix-style (cygpath)
14261 input_path=`$CYGPATH -u "$shortmode_path"`
14262 new_path="$input_path"
14263 fi
14264 fi
14265
14266 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14267 if test "x$test_cygdrive_prefix" = x; then
14268 # As a simple fix, exclude /usr/bin since it's not a real path.
14269 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14270 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14271 # a path prefixed by /cygdrive for fixpath to work.
14272 new_path="$CYGWIN_ROOT_PATH$input_path"
14273 fi
14274 fi
14275
14276
14277 if test "x$path" != "x$new_path"; then
14278 CURDIR="$new_path"
14279 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14280 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14281 fi
14282
14283 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14284
14285 path="$CURDIR"
14286 has_colon=`$ECHO $path | $GREP ^.:`
14287 new_path="$path"
14288 if test "x$has_colon" = x; then
14289 # Not in mixed or Windows style, start by that.
14290 new_path=`cmd //c echo $path`
14291 fi
14292
14293
14294 input_path="$new_path"
14295 # Check if we need to convert this using DOS-style short mode. If the path
14296 # contains just simple characters, use it. Otherwise (spaces, weird characters),
14297 # take no chances and rewrite it.
14298 # Note: m4 eats our [], so we need to use [ and ] instead.
14299 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14300 if test "x$has_forbidden_chars" != x; then
14301 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14302 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14303 fi
14304
14305
14306 windows_path="$new_path"
14307 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14308 unix_path=`$CYGPATH -u "$windows_path"`
14309 new_path="$unix_path"
14310 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14311 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14312 new_path="$unix_path"
14313 fi
14314
14315 if test "x$path" != "x$new_path"; then
14316 CURDIR="$new_path"
14317 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14318 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14319 fi
14320
14321 # Save the first 10 bytes of this path to the storage, so fixpath can work.
14322 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14323
14324 else
14325 # We're on a unix platform. Hooray! :)
14326 path="$CURDIR"
14327 has_space=`$ECHO "$path" | $GREP " "`
14328 if test "x$has_space" != x; then
14329 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14330 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14331 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14332 fi
14333
14334 # Use eval to expand a potential ~
14335 eval path="$path"
14336 if test ! -f "$path" && test ! -d "$path"; then
14337 as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14338 fi
14339
14340 CURDIR="`cd "$path"; $THEPWDCMD -L`"
14341 fi
14342 fi
14343
14344
14345 # Only process if variable expands to non-empty
14346
14347 if test "x$TOPDIR" != x; then
14348 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14349
14350 # Input might be given as Windows format, start by converting to
14351 # unix format.
14352 path="$TOPDIR"
14353 new_path=`$CYGPATH -u "$path"`
14354
14355 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14356 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14357 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14358 # "foo.exe" is OK but "foo" is an error.
14359 #
14360 # This test is therefore slightly more accurate than "test -f" to check for file precense.
14361 # It is also a way to make sure we got the proper file name for the real test later on.
14362 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14363 if test "x$test_shortpath" = x; then
14364 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14365 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14366 as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14367 fi
14368
14369 # Call helper function which possibly converts this using DOS-style short mode.
14370 # If so, the updated path is stored in $new_path.
14371
14372 input_path="$new_path"
14373 # Check if we need to convert this using DOS-style short mode. If the path
14374 # contains just simple characters, use it. Otherwise (spaces, weird characters),
14375 # take no chances and rewrite it.
14376 # Note: m4 eats our [], so we need to use [ and ] instead.
14377 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14378 if test "x$has_forbidden_chars" != x; then
14379 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14380 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14381 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14382 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14383 # Going to short mode and back again did indeed matter. Since short mode is
14384 # case insensitive, let's make it lowercase to improve readability.
14385 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14386 # Now convert it back to Unix-style (cygpath)
14387 input_path=`$CYGPATH -u "$shortmode_path"`
14388 new_path="$input_path"
14389 fi
14390 fi
14391
14392 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14393 if test "x$test_cygdrive_prefix" = x; then
14394 # As a simple fix, exclude /usr/bin since it's not a real path.
14395 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14396 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14397 # a path prefixed by /cygdrive for fixpath to work.
14398 new_path="$CYGWIN_ROOT_PATH$input_path"
14399 fi
14400 fi
14401
14402
14403 if test "x$path" != "x$new_path"; then
14404 TOPDIR="$new_path"
14405 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14406 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14407 fi
14408
14409 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14410
14411 path="$TOPDIR"
14412 has_colon=`$ECHO $path | $GREP ^.:`
14413 new_path="$path"
14414 if test "x$has_colon" = x; then
14415 # Not in mixed or Windows style, start by that.
14416 new_path=`cmd //c echo $path`
14417 fi
14418
14419
14420 input_path="$new_path"
14421 # Check if we need to convert this using DOS-style short mode. If the path
14422 # contains just simple characters, use it. Otherwise (spaces, weird characters),
14423 # take no chances and rewrite it.
14424 # Note: m4 eats our [], so we need to use [ and ] instead.
14425 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14426 if test "x$has_forbidden_chars" != x; then
14427 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14428 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14429 fi
14430
14431
14432 windows_path="$new_path"
14433 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14434 unix_path=`$CYGPATH -u "$windows_path"`
14435 new_path="$unix_path"
14436 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14437 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14438 new_path="$unix_path"
14439 fi
14440
14441 if test "x$path" != "x$new_path"; then
14442 TOPDIR="$new_path"
14443 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14444 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14445 fi
14446
14447 # Save the first 10 bytes of this path to the storage, so fixpath can work.
14448 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14449
14450 else
14451 # We're on a unix platform. Hooray! :)
14452 path="$TOPDIR"
14453 has_space=`$ECHO "$path" | $GREP " "`
14454 if test "x$has_space" != x; then
14455 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14456 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14457 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14458 fi
14459
14460 # Use eval to expand a potential ~
14461 eval path="$path"
14462 if test ! -f "$path" && test ! -d "$path"; then
14463 as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14464 fi
14465
14466 TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14467 fi
14468 fi
14469
14470 # SRC_ROOT is a traditional alias for TOPDIR.
14471 SRC_ROOT=$TOPDIR
14472
14473 # Calculate a canonical version of TOPDIR for string comparisons
14474 CANONICAL_TOPDIR=$TOPDIR
14475
14476 if test "x$OPENJDK_BUILD_OS" != xwindows; then
14477 # Follow a chain of symbolic links. Use readlink
14478 # where it exists, else fall back to horribly
14479 # complicated shell code.
14480 if test "x$READLINK_TESTED" != yes; then
14481 # On MacOSX there is a readlink tool with a different
14482 # purpose than the GNU readlink tool. Check the found readlink.
14483 ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
14484 if test "x$ISGNU" = x; then
14485 # A readlink that we do not know how to use.
14486 # Are there other non-GNU readlinks out there?
14487 READLINK_TESTED=yes
14488 READLINK=
14489 fi
14490 fi
14491
14492 if test "x$READLINK" != x; then
14493 CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
14494 else
14495 # Save the current directory for restoring afterwards
14496 STARTDIR=$PWD
14497 COUNTER=0
14498 sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
14499 sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
14500 cd $sym_link_dir
14501 # Use -P flag to resolve symlinks in directories.
14502 cd `$THEPWDCMD -P`
14503 sym_link_dir=`$THEPWDCMD -P`
14504 # Resolve file symlinks
14505 while test $COUNTER -lt 20; do
14506 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
14507 if test "x$ISLINK" == x; then
14508 # This is not a symbolic link! We are done!
14509 break
14510 fi
14511 # Again resolve directory symlinks since the target of the just found
14512 # link could be in a different directory
14513 cd `$DIRNAME $ISLINK`
14514 sym_link_dir=`$THEPWDCMD -P`
14515 sym_link_file=`$BASENAME $ISLINK`
14516 let COUNTER=COUNTER+1
14517 done
14518 cd $STARTDIR
14519 CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
14520 fi
14521 fi
14522
14523
14524
14525 # Locate the directory of this script.
14526 AUTOCONF_DIR=$TOPDIR/common/autoconf
14527
14528
14529 # Check if it's a pure open build or if custom sources are to be used.
14530
14531 # Check whether --enable-openjdk-only was given.
14532 if test "${enable_openjdk_only+set}" = set; then :
14533 enableval=$enable_openjdk_only;
14534 else
14535 enable_openjdk_only="no"
14536 fi
14537
14538
14539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14540 $as_echo_n "checking for presence of closed sources... " >&6; }
14541 if test -d "$SRC_ROOT/jdk/src/closed"; then
14542 CLOSED_SOURCE_PRESENT=yes
14543 else
14544 CLOSED_SOURCE_PRESENT=no
14545 fi
14546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14547 $as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14548
14549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14550 $as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14551 SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14553 $as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14554
14555 if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14556 OPENJDK=true
14557 if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14558 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14559 $as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14560 fi
14561 else
14562 if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14563 OPENJDK=true
14564 else
14565 OPENJDK=false
14566 fi
14567 fi
14568
14569 if test "x$OPENJDK" = "xtrue"; then
14570 SET_OPENJDK="OPENJDK=true"
14571 fi
14572
14573
14574
14575 # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14576 # the IncludeCustomExtension macro.
14577
14578
14579 # Check whether --with-custom-make-dir was given.
14580 if test "${with_custom_make_dir+set}" = set; then :
14581 withval=$with_custom_make_dir; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&5
14582 $as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14583 fi
14584
14585
14586
14587
14588 # These are needed to be able to create a configuration name (and thus the output directory)
14589
14590 ###############################################################################
14591 #
14592 # Check which variant of the JDK that we want to build.
14593 # Currently we have:
14594 # normal: standard edition
14595 # but the custom make system may add other variants
14596 #
14597 # Effectively the JDK variant gives a name to a specific set of
14598 # modules to compile into the JDK. In the future, these modules
14599 # might even be Jigsaw modules.
14600 #
14601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14602 $as_echo_n "checking which variant of the JDK to build... " >&6; }
14603
14604 # Check whether --with-jdk-variant was given.
14605 if test "${with_jdk_variant+set}" = set; then :
14606 withval=$with_jdk_variant;
14607 fi
14608
14609
14610 if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14611 JDK_VARIANT="normal"
14612 else
14613 as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14614 fi
14615
14616
14617
14618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14619 $as_echo "$JDK_VARIANT" >&6; }
14620
14621
14622 ###############################################################################
14623 #
14624 # Check which interpreter of the JVM we want to build.
14625 # Currently we have:
14626 # template: Template interpreter (the default)
14627 # cpp : C++ interpreter
14628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14629 $as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14630
14631 # Check whether --with-jvm-interpreter was given.
14632 if test "${with_jvm_interpreter+set}" = set; then :
14633 withval=$with_jvm_interpreter;
14634 fi
14635
14636
14637 if test "x$with_jvm_interpreter" = x; then
14638 with_jvm_interpreter="template"
14639 fi
14640
14641 JVM_INTERPRETER="$with_jvm_interpreter"
14642
14643 if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14644 as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14645 fi
14646
14647
14648
14649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14650 $as_echo "$with_jvm_interpreter" >&6; }
14651
14652
14653
14654 ###############################################################################
14655 #
14656 # Check which variants of the JVM that we want to build.
14657 # Currently we have:
14658 # server: normal interpreter and a tiered C1/C2 compiler
14659 # client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14660 # minimal1: reduced form of client with optional VM services and features stripped out
14661 # kernel: kernel footprint JVM that passes the TCK without major performance problems,
14662 # ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14663 # zero: no machine code interpreter, no compiler
14664 # zeroshark: zero interpreter and shark/llvm compiler backend
14665 # core: interpreter only, no compiler (only works on some platforms)
14666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14667 $as_echo_n "checking which variants of the JVM to build... " >&6; }
14668
14669 # Check whether --with-jvm-variants was given.
14670 if test "${with_jvm_variants+set}" = set; then :
14671 withval=$with_jvm_variants;
14672 fi
14673
14674
14675 if test "x$with_jvm_variants" = x; then
14676 with_jvm_variants="server"
14677 fi
14678
14679 JVM_VARIANTS=",$with_jvm_variants,"
14680 TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//' -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//' -e 's/core,//'`
14681
14682 if test "x$TEST_VARIANTS" != "x,"; then
14683 as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14684 fi
14685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14686 $as_echo "$with_jvm_variants" >&6; }
14687
14688 JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14689 JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14690 JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14691 JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14692 JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14693 JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14694 JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14695
14696 if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14697 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14698 as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14699 fi
14700 fi
14701 if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14702 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14703 as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14704 fi
14705 fi
14706 if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14707 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14708 as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14709 fi
14710 fi
14711
14712 # Replace the commas with AND for use in the build directory name.
14713 ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14714 COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/' -e 's/core,/1/'`
14715 if test "x$COUNT_VARIANTS" != "x,1"; then
14716 BUILDING_MULTIPLE_JVM_VARIANTS=yes
14717 else
14718 BUILDING_MULTIPLE_JVM_VARIANTS=no
14719 fi
14720
14721
14722
14723
14724
14725
14726
14727
14728
14729
14730 INCLUDE_SA=true
14731 if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14732 INCLUDE_SA=false
14733 fi
14734 if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14735 INCLUDE_SA=false
14736 fi
14737 if test "x$OPENJDK_TARGET_OS" = xaix ; then
14738 INCLUDE_SA=false
14739 fi
14740 if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
14741 INCLUDE_SA=false
14742 fi
14743
14744
14745 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14746 MACOSX_UNIVERSAL="true"
14747 fi
14748
14749
14750
14751
14752 ###############################################################################
14753 #
14754 # Set the debug level
14755 # release: no debug information, all optimizations, no asserts.
14756 # optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
14757 # fastdebug: debug information (-g), all optimizations, all asserts
14758 # slowdebug: debug information (-g), no optimizations, all asserts
14759 #
14760 DEBUG_LEVEL="release"
14761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14762 $as_echo_n "checking which debug level to use... " >&6; }
14763 # Check whether --enable-debug was given.
14764 if test "${enable_debug+set}" = set; then :
14765 enableval=$enable_debug;
14766 ENABLE_DEBUG="${enableval}"
14767 DEBUG_LEVEL="fastdebug"
14768
14769 else
14770 ENABLE_DEBUG="no"
14771 fi
14772
14773
14774
14775 # Check whether --with-debug-level was given.
14776 if test "${with_debug_level+set}" = set; then :
14777 withval=$with_debug_level;
14778 DEBUG_LEVEL="${withval}"
14779 if test "x$ENABLE_DEBUG" = xyes; then
14780 as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14781 fi
14782
14783 fi
14784
14785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14786 $as_echo "$DEBUG_LEVEL" >&6; }
14787
14788 if test "x$DEBUG_LEVEL" != xrelease && \
14789 test "x$DEBUG_LEVEL" != xoptimized && \
14790 test "x$DEBUG_LEVEL" != xfastdebug && \
14791 test "x$DEBUG_LEVEL" != xslowdebug; then
14792 as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14793 fi
14794
14795
14796 ###############################################################################
14797 #
14798 # Setup legacy vars/targets and new vars to deal with different debug levels.
14799 #
14800
14801 case $DEBUG_LEVEL in
14802 release )
14803 VARIANT="OPT"
14804 FASTDEBUG="false"
14805 DEBUG_CLASSFILES="false"
14806 BUILD_VARIANT_RELEASE=""
14807 HOTSPOT_DEBUG_LEVEL="product"
14808 HOTSPOT_EXPORT="product"
14809 ;;
14810 fastdebug )
14811 VARIANT="DBG"
14812 FASTDEBUG="true"
14813 DEBUG_CLASSFILES="true"
14814 BUILD_VARIANT_RELEASE="-fastdebug"
14815 HOTSPOT_DEBUG_LEVEL="fastdebug"
14816 HOTSPOT_EXPORT="fastdebug"
14817 ;;
14818 slowdebug )
14819 VARIANT="DBG"
14820 FASTDEBUG="false"
14821 DEBUG_CLASSFILES="true"
14822 BUILD_VARIANT_RELEASE="-debug"
14823 HOTSPOT_DEBUG_LEVEL="debug"
14824 HOTSPOT_EXPORT="debug"
14825 ;;
14826 optimized )
14827 VARIANT="OPT"
14828 FASTDEBUG="false"
14829 DEBUG_CLASSFILES="false"
14830 BUILD_VARIANT_RELEASE="-optimized"
14831 HOTSPOT_DEBUG_LEVEL="optimized"
14832 HOTSPOT_EXPORT="optimized"
14833 ;;
14834 esac
14835
14836 # The debug level 'optimized' is a little special because it is currently only
14837 # applicable to the HotSpot build where it means to build a completely
14838 # optimized version of the VM without any debugging code (like for the
14839 # 'release' debug level which is called 'product' in the HotSpot build) but
14840 # with the exception that it can contain additional code which is otherwise
14841 # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
14842 # test new and/or experimental features which are not intended for customer
14843 # shipment. Because these new features need to be tested and benchmarked in
14844 # real world scenarios, we want to build the containing JDK at the 'release'
14845 # debug level.
14846 if test "x$DEBUG_LEVEL" = xoptimized; then
14847 DEBUG_LEVEL="release"
14848 fi
14849
14850 #####
14851 # Generate the legacy makefile targets for hotspot.
14852 # The hotspot api for selecting the build artifacts, really, needs to be improved.
14853 # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14854 # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14855 # But until then ...
14856 HOTSPOT_TARGET=""
14857
14858 if test "x$JVM_VARIANT_SERVER" = xtrue; then
14859 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14860 fi
14861
14862 if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14863 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14864 fi
14865
14866 if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14867 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14868 fi
14869
14870 if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14871 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14872 fi
14873
14874 if test "x$JVM_VARIANT_ZERO" = xtrue; then
14875 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14876 fi
14877
14878 if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14879 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14880 fi
14881
14882 if test "x$JVM_VARIANT_CORE" = xtrue; then
14883 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14884 fi
14885
14886 HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14887
14888 # On Macosx universal binaries are produced, but they only contain
14889 # 64 bit intel. This invalidates control of which jvms are built
14890 # from configure, but only server is valid anyway. Fix this
14891 # when hotspot makefiles are rewritten.
14892 if test "x$MACOSX_UNIVERSAL" = xtrue; then
14893 HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14894 fi
14895
14896 #####
14897
14898
14899
14900
14901
14902
14903
14904
14905 # With basic setup done, call the custom early hook.
14906
14907
14908 # Check if we have devkits, extra paths or sysroot set.
14909
14910
14911 # Check whether --with-devkit was given.
14912 if test "${with_devkit+set}" = set; then :
14913 withval=$with_devkit;
14914
14915 # Only process if variable expands to non-empty
14916
14917 if test "x$with_devkit" != x; then
14918 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14919
14920 # Input might be given as Windows format, start by converting to
14921 # unix format.
14922 path="$with_devkit"
14923 new_path=`$CYGPATH -u "$path"`
14924
14925 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14926 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14927 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14928 # "foo.exe" is OK but "foo" is an error.
14929 #
14930 # This test is therefore slightly more accurate than "test -f" to check for file precense.
14931 # It is also a way to make sure we got the proper file name for the real test later on.
14932 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14933 if test "x$test_shortpath" = x; then
14934 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14935 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14936 as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14937 fi
14938
14939 # Call helper function which possibly converts this using DOS-style short mode.
14940 # If so, the updated path is stored in $new_path.
14941
14942 input_path="$new_path"
14943 # Check if we need to convert this using DOS-style short mode. If the path
14944 # contains just simple characters, use it. Otherwise (spaces, weird characters),
14945 # take no chances and rewrite it.
14946 # Note: m4 eats our [], so we need to use [ and ] instead.
14947 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14948 if test "x$has_forbidden_chars" != x; then
14949 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14950 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14951 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14952 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14953 # Going to short mode and back again did indeed matter. Since short mode is
14954 # case insensitive, let's make it lowercase to improve readability.
14955 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14956 # Now convert it back to Unix-style (cygpath)
14957 input_path=`$CYGPATH -u "$shortmode_path"`
14958 new_path="$input_path"
14959 fi
14960 fi
14961
14962 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14963 if test "x$test_cygdrive_prefix" = x; then
14964 # As a simple fix, exclude /usr/bin since it's not a real path.
14965 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14966 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14967 # a path prefixed by /cygdrive for fixpath to work.
14968 new_path="$CYGWIN_ROOT_PATH$input_path"
14969 fi
14970 fi
14971
14972
14973 if test "x$path" != "x$new_path"; then
14974 with_devkit="$new_path"
14975 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14976 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14977 fi
14978
14979 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14980
14981 path="$with_devkit"
14982 has_colon=`$ECHO $path | $GREP ^.:`
14983 new_path="$path"
14984 if test "x$has_colon" = x; then
14985 # Not in mixed or Windows style, start by that.
14986 new_path=`cmd //c echo $path`
14987 fi
14988
14989
14990 input_path="$new_path"
14991 # Check if we need to convert this using DOS-style short mode. If the path
14992 # contains just simple characters, use it. Otherwise (spaces, weird characters),
14993 # take no chances and rewrite it.
14994 # Note: m4 eats our [], so we need to use [ and ] instead.
14995 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14996 if test "x$has_forbidden_chars" != x; then
14997 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14998 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14999 fi
15000
15001
15002 windows_path="$new_path"
15003 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15004 unix_path=`$CYGPATH -u "$windows_path"`
15005 new_path="$unix_path"
15006 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15007 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15008 new_path="$unix_path"
15009 fi
15010
15011 if test "x$path" != "x$new_path"; then
15012 with_devkit="$new_path"
15013 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
15014 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
15015 fi
15016
15017 # Save the first 10 bytes of this path to the storage, so fixpath can work.
15018 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15019
15020 else
15021 # We're on a unix platform. Hooray! :)
15022 path="$with_devkit"
15023 has_space=`$ECHO "$path" | $GREP " "`
15024 if test "x$has_space" != x; then
15025 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
15026 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
15027 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15028 fi
15029
15030 # Use eval to expand a potential ~
15031 eval path="$path"
15032 if test ! -f "$path" && test ! -d "$path"; then
15033 as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
15034 fi
15035
15036 with_devkit="`cd "$path"; $THEPWDCMD -L`"
15037 fi
15038 fi
15039
15040 DEVKIT_ROOT="$with_devkit"
15041 # Check for a meta data info file in the root of the devkit
15042 if test -f "$DEVKIT_ROOT/devkit.info"; then
15043 . $DEVKIT_ROOT/devkit.info
15044 # This potentially sets the following:
15045 # A descriptive name of the devkit
15046
15047 if test "x$DEVKIT_NAME" = x; then
15048 eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
15049 fi
15050
15051 # Corresponds to --with-extra-path
15052
15053 if test "x$DEVKIT_EXTRA_PATH" = x; then
15054 eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
15055 fi
15056
15057 # Corresponds to --with-toolchain-path
15058
15059 if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
15060 eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
15061 fi
15062
15063 # Corresponds to --with-sysroot
15064
15065 if test "x$DEVKIT_SYSROOT" = x; then
15066 eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
15067 fi
15068
15069
15070 # Identifies the Visual Studio version in the devkit
15071
15072 if test "x$DEVKIT_VS_VERSION" = x; then
15073 eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
15074 fi
15075
15076 # The Visual Studio include environment variable
15077
15078 if test "x$DEVKIT_VS_INCLUDE" = x; then
15079 eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
15080 fi
15081
15082 # The Visual Studio lib environment variable
15083
15084 if test "x$DEVKIT_VS_LIB" = x; then
15085 eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
15086 fi
15087
15088 # Corresponds to --with-msvcr-dll
15089
15090 if test "x$DEVKIT_MSVCR_DLL" = x; then
15091 eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
15092 fi
15093
15094 # Corresponds to --with-msvcp-dll
15095
15096 if test "x$DEVKIT_MSVCP_DLL" = x; then
15097 eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
15098 fi
15099
15100 fi
15101
15102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
15103 $as_echo_n "checking for devkit... " >&6; }
15104 if test "x$DEVKIT_NAME" != x; then
15105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
15106 $as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
15107 else
15108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
15109 $as_echo "$DEVKIT_ROOT" >&6; }
15110 fi
15111
15112
15113 if test "x$DEVKIT_EXTRA_PATH" != x; then
15114 if test "x$EXTRA_PATH" = x; then
15115 EXTRA_PATH="$DEVKIT_EXTRA_PATH"
15116 else
15117 EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
15118 fi
15119 fi
15120
15121
15122 # Fallback default of just /bin if DEVKIT_PATH is not defined
15123 if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
15124 DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
15125 fi
15126
15127 if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
15128 if test "x$TOOLCHAIN_PATH" = x; then
15129 TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
15130 else
15131 TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
15132 fi
15133 fi
15134
15135
15136 # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
15137 # places for backwards compatiblity.
15138 if test "x$DEVKIT_SYSROOT" != x; then
15139 SYSROOT="$DEVKIT_SYSROOT"
15140 elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
15141 SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
15142 elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
15143 SYSROOT="$DEVKIT_ROOT/$host/sys-root"
15144 fi
15145
15146
15147 fi
15148
15149
15150 # You can force the sysroot if the sysroot encoded into the compiler tools
15151 # is not correct.
15152
15153 # Check whether --with-sys-root was given.
15154 if test "${with_sys_root+set}" = set; then :
15155 withval=$with_sys_root; SYSROOT=$with_sys_root
15156
15157 fi
15158
15159
15160
15161 # Check whether --with-sysroot was given.
15162 if test "${with_sysroot+set}" = set; then :
15163 withval=$with_sysroot; SYSROOT=$with_sysroot
15164
15165 fi
15166
15167
15168
15169 # Check whether --with-tools-dir was given.
15170 if test "${with_tools_dir+set}" = set; then :
15171 withval=$with_tools_dir;
15172 if test "x$with_tools_dir" != x; then
15173 if test "x$TOOLCHAIN_PATH" = x; then
15174 TOOLCHAIN_PATH="$with_tools_dir"
15175 else
15176 TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
15177 fi
15178 fi
15179
15180
15181 fi
15182
15183
15184
15185 # Check whether --with-toolchain-path was given.
15186 if test "${with_toolchain_path+set}" = set; then :
15187 withval=$with_toolchain_path;
15188 if test "x$with_toolchain_path" != x; then
15189 if test "x$TOOLCHAIN_PATH" = x; then
15190 TOOLCHAIN_PATH="$with_toolchain_path"
15191 else
15192 TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
15193 fi
15194 fi
15195
15196
15197 fi
15198
15199
15200
15201 # Check whether --with-extra-path was given.
15202 if test "${with_extra_path+set}" = set; then :
15203 withval=$with_extra_path;
15204 if test "x$with_extra_path" != x; then
15205 if test "x$EXTRA_PATH" = x; then
15206 EXTRA_PATH="$with_extra_path"
15207 else
15208 EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
15209 fi
15210 fi
15211
15212
15213 fi
15214
15215
15216 if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
15217 # detect if Xcode is installed by running xcodebuild -version
15218 # if no Xcode installed, xcodebuild exits with 1
15219 # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
15220 if /usr/bin/xcodebuild -version >/dev/null 2>&1; then
15221 # We need to use xcodebuild in the toolchain dir provided by the user, this will
15222 # fall back on the stub binary in /usr/bin/xcodebuild
15223 # Extract the first word of "xcodebuild", so it can be a program name with args.
15224 set dummy xcodebuild; ac_word=$2
15225 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15226 $as_echo_n "checking for $ac_word... " >&6; }
15227 if ${ac_cv_path_XCODEBUILD+:} false; then :
15228 $as_echo_n "(cached) " >&6
15229 else
15230 case $XCODEBUILD in
15231 [\\/]* | ?:[\\/]*)
15232 ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
15233 ;;
15234 *)
15235 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15236 for as_dir in $TOOLCHAIN_PATH
15237 do
15238 IFS=$as_save_IFS
15239 test -z "$as_dir" && as_dir=.
15240 for ac_exec_ext in '' $ac_executable_extensions; do
15241 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15242 ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
15243 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15244 break 2
15245 fi
15246 done
15247 done
15248 IFS=$as_save_IFS
15249
15250 test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
15251 ;;
15252 esac
15253 fi
15254 XCODEBUILD=$ac_cv_path_XCODEBUILD
15255 if test -n "$XCODEBUILD"; then
15256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
15257 $as_echo "$XCODEBUILD" >&6; }
15258 else
15259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15260 $as_echo "no" >&6; }
15261 fi
15262
15263
15264 else
15265 # this should result in SYSROOT being empty, unless --with-sysroot is provided
15266 # when only the command line tools are installed there are no SDKs, so headers
15267 # are copied into the system frameworks
15268 XCODEBUILD=
15269
15270 fi
15271
15272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
15273 $as_echo_n "checking for sdk name... " >&6; }
15274
15275 # Check whether --with-sdk-name was given.
15276 if test "${with_sdk_name+set}" = set; then :
15277 withval=$with_sdk_name; SDKNAME=$with_sdk_name
15278
15279 fi
15280
15281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
15282 $as_echo "$SDKNAME" >&6; }
15283
15284 # if toolchain path is specified then don't rely on system headers, they may not compile
15285 HAVE_SYSTEM_FRAMEWORK_HEADERS=0
15286 test -z "$TOOLCHAIN_PATH" && \
15287 HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
15288
15289 if test -z "$SYSROOT"; then
15290 if test -n "$XCODEBUILD"; then
15291 # if we don't have system headers, use default SDK name (last resort)
15292 if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15293 SDKNAME=${SDKNAME:-macosx}
15294 fi
15295
15296 if test -n "$SDKNAME"; then
15297 # Call xcodebuild to determine SYSROOT
15298 SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
15299 fi
15300 else
15301 if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15302 as_fn_error $? "No xcodebuild tool and no system framework headers found, use --with-sysroot or --with-sdk-name to provide a path to a valid SDK" "$LINENO" 5
15303 fi
15304 fi
15305 else
15306 # warn user if --with-sdk-name was also set
15307 if test -n "$with_sdk_name"; then
15308 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
15309 $as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
15310 fi
15311 fi
15312
15313 if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
15314 # If no system framework headers, then SYSROOT must be set, or we won't build
15315 as_fn_error $? "Unable to determine SYSROOT and no headers found in /System/Library/Frameworks. Check Xcode configuration, --with-sysroot or --with-sdk-name arguments." "$LINENO" 5
15316 fi
15317
15318 # Perform a basic sanity test
15319 if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
15320 if test -z "$SYSROOT"; then
15321 as_fn_error $? "Unable to find required framework headers, provide a path to an SDK via --with-sysroot or --with-sdk-name and be sure Xcode is installed properly" "$LINENO" 5
15322 else
15323 as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
15324 fi
15325 fi
15326
15327 # set SDKROOT too, Xcode tools will pick it up
15328 SDKROOT=$SYSROOT
15329
15330 fi
15331
15332 # Prepend the extra path to the global path
15333
15334 if test "x$EXTRA_PATH" != x; then
15335 if test "x$PATH" = x; then
15336 PATH="$EXTRA_PATH"
15337 else
15338 PATH="$EXTRA_PATH:$PATH"
15339 fi
15340 fi
15341
15342
15343 if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
15344 # Add extra search paths on solaris for utilities like ar and as etc...
15345 PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
15346 fi
15347
15348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
15349 $as_echo_n "checking for sysroot... " >&6; }
15350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
15351 $as_echo "$SYSROOT" >&6; }
15352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
15353 $as_echo_n "checking for toolchain path... " >&6; }
15354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
15355 $as_echo "$TOOLCHAIN_PATH" >&6; }
15356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
15357 $as_echo_n "checking for extra path... " >&6; }
15358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
15359 $as_echo "$EXTRA_PATH" >&6; }
15360
15361
15362 # To properly create a configuration name, we need to have the OpenJDK target
15363 # and options (variants and debug level) parsed.
15364
15365
15366
15367 # Check whether --with-conf-name was given.
15368 if test "${with_conf_name+set}" = set; then :
15369 withval=$with_conf_name; CONF_NAME=${with_conf_name}
15370 fi
15371
15372
15373 # Test from where we are running configure, in or outside of src root.
15374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
15375 $as_echo_n "checking where to store configuration... " >&6; }
15376 if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
15377 || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
15378 || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
15379 # We are running configure from the src root.
15380 # Create a default ./build/target-variant-debuglevel output root.
15381 if test "x${CONF_NAME}" = x; then
15382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
15383 $as_echo "in default location" >&6; }
15384 CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
15385 else
15386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
15387 $as_echo "in build directory with custom name" >&6; }
15388 fi
15389 OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
15390 $MKDIR -p "$OUTPUT_ROOT"
15391 if test ! -d "$OUTPUT_ROOT"; then
15392 as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
15393 fi
15394 else
15395 # We are running configure from outside of the src dir.
15396 # Then use the current directory as output dir!
15397 # If configuration is situated in normal build directory, just use the build
15398 # directory name as configuration name, otherwise use the complete path.
15399 if test "x${CONF_NAME}" = x; then
15400 CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
15401 fi
15402 OUTPUT_ROOT="$CURDIR"
15403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
15404 $as_echo "in current directory" >&6; }
15405
15406 # WARNING: This might be a bad thing to do. You need to be sure you want to
15407 # have a configuration in this directory. Do some sanity checks!
15408
15409 if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
15410 # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
15411 # other files
15412 files_present=`$LS $OUTPUT_ROOT`
15413 # Configure has already touched config.log and confdefs.h in the current dir when this check
15414 # is performed.
15415 filtered_files=`$ECHO "$files_present" \
15416 | $SED -e 's/config.log//g' \
15417 -e 's/configure.log//g' \
15418 -e 's/confdefs.h//g' \
15419 -e 's/ //g' \
15420 | $TR -d '\n'`
15421 if test "x$filtered_files" != x; then
15422 { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
15423 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
15424 { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
15425 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
15426 { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
15427 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
15428 { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
15429 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
15430 { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
15431 $as_echo "$as_me: seriously mess up just about everything." >&6;}
15432 { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
15433 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
15434 { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
15435 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
15436 as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
15437 fi
15438 fi
15439 fi
15440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
15441 $as_echo_n "checking what configuration name to use... " >&6; }
15442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15443 $as_echo "$CONF_NAME" >&6; }
15444
15445
15446 # Only process if variable expands to non-empty
15447
15448 if test "x$OUTPUT_ROOT" != x; then
15449 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15450
15451 # Input might be given as Windows format, start by converting to
15452 # unix format.
15453 path="$OUTPUT_ROOT"
15454 new_path=`$CYGPATH -u "$path"`
15455
15456 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15457 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15458 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15459 # "foo.exe" is OK but "foo" is an error.
15460 #
15461 # This test is therefore slightly more accurate than "test -f" to check for file precense.
15462 # It is also a way to make sure we got the proper file name for the real test later on.
15463 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15464 if test "x$test_shortpath" = x; then
15465 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15466 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15467 as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15468 fi
15469
15470 # Call helper function which possibly converts this using DOS-style short mode.
15471 # If so, the updated path is stored in $new_path.
15472
15473 input_path="$new_path"
15474 # Check if we need to convert this using DOS-style short mode. If the path
15475 # contains just simple characters, use it. Otherwise (spaces, weird characters),
15476 # take no chances and rewrite it.
15477 # Note: m4 eats our [], so we need to use [ and ] instead.
15478 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15479 if test "x$has_forbidden_chars" != x; then
15480 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15481 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15482 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15483 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15484 # Going to short mode and back again did indeed matter. Since short mode is
15485 # case insensitive, let's make it lowercase to improve readability.
15486 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15487 # Now convert it back to Unix-style (cygpath)
15488 input_path=`$CYGPATH -u "$shortmode_path"`
15489 new_path="$input_path"
15490 fi
15491 fi
15492
15493 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15494 if test "x$test_cygdrive_prefix" = x; then
15495 # As a simple fix, exclude /usr/bin since it's not a real path.
15496 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15497 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15498 # a path prefixed by /cygdrive for fixpath to work.
15499 new_path="$CYGWIN_ROOT_PATH$input_path"
15500 fi
15501 fi
15502
15503
15504 if test "x$path" != "x$new_path"; then
15505 OUTPUT_ROOT="$new_path"
15506 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15507 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15508 fi
15509
15510 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15511
15512 path="$OUTPUT_ROOT"
15513 has_colon=`$ECHO $path | $GREP ^.:`
15514 new_path="$path"
15515 if test "x$has_colon" = x; then
15516 # Not in mixed or Windows style, start by that.
15517 new_path=`cmd //c echo $path`
15518 fi
15519
15520
15521 input_path="$new_path"
15522 # Check if we need to convert this using DOS-style short mode. If the path
15523 # contains just simple characters, use it. Otherwise (spaces, weird characters),
15524 # take no chances and rewrite it.
15525 # Note: m4 eats our [], so we need to use [ and ] instead.
15526 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15527 if test "x$has_forbidden_chars" != x; then
15528 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15529 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15530 fi
15531
15532
15533 windows_path="$new_path"
15534 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15535 unix_path=`$CYGPATH -u "$windows_path"`
15536 new_path="$unix_path"
15537 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15538 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15539 new_path="$unix_path"
15540 fi
15541
15542 if test "x$path" != "x$new_path"; then
15543 OUTPUT_ROOT="$new_path"
15544 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15545 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15546 fi
15547
15548 # Save the first 10 bytes of this path to the storage, so fixpath can work.
15549 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15550
15551 else
15552 # We're on a unix platform. Hooray! :)
15553 path="$OUTPUT_ROOT"
15554 has_space=`$ECHO "$path" | $GREP " "`
15555 if test "x$has_space" != x; then
15556 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15557 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15558 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15559 fi
15560
15561 # Use eval to expand a potential ~
15562 eval path="$path"
15563 if test ! -f "$path" && test ! -d "$path"; then
15564 as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15565 fi
15566
15567 OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15568 fi
15569 fi
15570
15571
15572 CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
15573 $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
15574
15575 SPEC=$OUTPUT_ROOT/spec.gmk
15576
15577 CONF_NAME=$CONF_NAME
15578
15579 OUTPUT_ROOT=$OUTPUT_ROOT
15580
15581
15582
15583 # The spec.gmk file contains all variables for the make system.
15584 ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15585
15586 # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15587 ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15588
15589 # The bootcycle-spec.gmk file contains support for boot cycle builds.
15590 ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15591
15592 # The compare.sh is used to compare the build output to other builds.
15593 ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15594
15595 # The generated Makefile knows where the spec.gmk is and where the source is.
15596 # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15597 # which will look for generated configurations
15598 ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15599
15600
15601
15602 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15603
15604 for ac_prog in apt-get yum port pkgutil pkgadd
15605 do
15606 # Extract the first word of "$ac_prog", so it can be a program name with args.
15607 set dummy $ac_prog; ac_word=$2
15608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15609 $as_echo_n "checking for $ac_word... " >&6; }
15610 if ${ac_cv_prog_PKGHANDLER+:} false; then :
15611 $as_echo_n "(cached) " >&6
15612 else
15613 if test -n "$PKGHANDLER"; then
15614 ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15615 else
15616 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15617 for as_dir in $PATH
15618 do
15619 IFS=$as_save_IFS
15620 test -z "$as_dir" && as_dir=.
15621 for ac_exec_ext in '' $ac_executable_extensions; do
15622 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15623 ac_cv_prog_PKGHANDLER="$ac_prog"
15624 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15625 break 2
15626 fi
15627 done
15628 done
15629 IFS=$as_save_IFS
15630
15631 fi
15632 fi
15633 PKGHANDLER=$ac_cv_prog_PKGHANDLER
15634 if test -n "$PKGHANDLER"; then
15635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15636 $as_echo "$PKGHANDLER" >&6; }
15637 else
15638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15639 $as_echo "no" >&6; }
15640 fi
15641
15642
15643 test -n "$PKGHANDLER" && break
15644 done
15645
15646
15647
15648 # Setup tools that requires more complex handling, or that is not needed by the configure script.
15649
15650
15651 # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15652 if test "x$MAKE" != x; then
15653 # User has supplied a make, test it.
15654 if test ! -f "$MAKE"; then
15655 as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15656 fi
15657
15658 MAKE_CANDIDATE=""$MAKE""
15659 DESCRIPTION="user supplied MAKE=$MAKE"
15660
15661 # On Cygwin, we require a newer version of make than on other platforms
15662 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15663 MAKE_VERSION_EXPR="-e 4\."
15664 MAKE_REQUIRED_VERSION="4.0"
15665 else
15666 MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
15667 MAKE_REQUIRED_VERSION="3.81"
15668 fi
15669
15670 if test "x$MAKE_CANDIDATE" != x; then
15671 { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15672 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15673 MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15674 IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15675 if test "x$IS_GNU_MAKE" = x; then
15676 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15677 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15678 else
15679 IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
15680 if test "x$IS_MODERN_MAKE" = x; then
15681 { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
15682 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
15683 else
15684 if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15685 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15686 MAKE_EXPECTED_ENV='cygwin'
15687 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15688 MAKE_EXPECTED_ENV='msys'
15689 else
15690 as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15691 fi
15692 MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15693 IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15694 else
15695 # Not relevant for non-Windows
15696 IS_MAKE_CORRECT_ENV=true
15697 fi
15698 if test "x$IS_MAKE_CORRECT_ENV" = x; then
15699 { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
15700 $as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
15701 else
15702 FOUND_MAKE=$MAKE_CANDIDATE
15703
15704 # Only process if variable expands to non-empty
15705
15706 if test "x$FOUND_MAKE" != x; then
15707 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15708
15709 # First separate the path from the arguments. This will split at the first
15710 # space.
15711 complete="$FOUND_MAKE"
15712 path="${complete%% *}"
15713 tmp="$complete EOL"
15714 arguments="${tmp#* }"
15715
15716 # Input might be given as Windows format, start by converting to
15717 # unix format.
15718 new_path=`$CYGPATH -u "$path"`
15719
15720 # Now try to locate executable using which
15721 new_path=`$WHICH "$new_path" 2> /dev/null`
15722 # bat and cmd files are not always considered executable in cygwin causing which
15723 # to not find them
15724 if test "x$new_path" = x \
15725 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15726 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15727 new_path=`$CYGPATH -u "$path"`
15728 fi
15729 if test "x$new_path" = x; then
15730 # Oops. Which didn't find the executable.
15731 # The splitting of arguments from the executable at a space might have been incorrect,
15732 # since paths with space are more likely in Windows. Give it another try with the whole
15733 # argument.
15734 path="$complete"
15735 arguments="EOL"
15736 new_path=`$CYGPATH -u "$path"`
15737 new_path=`$WHICH "$new_path" 2> /dev/null`
15738 # bat and cmd files are not always considered executable in cygwin causing which
15739 # to not find them
15740 if test "x$new_path" = x \
15741 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15742 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15743 new_path=`$CYGPATH -u "$path"`
15744 fi
15745 if test "x$new_path" = x; then
15746 # It's still not found. Now this is an unrecoverable error.
15747 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15748 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15749 has_space=`$ECHO "$complete" | $GREP " "`
15750 if test "x$has_space" != x; then
15751 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15752 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15753 fi
15754 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15755 fi
15756 fi
15757
15758 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15759 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15760 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15761 # "foo.exe" is OK but "foo" is an error.
15762 #
15763 # This test is therefore slightly more accurate than "test -f" to check for file presence.
15764 # It is also a way to make sure we got the proper file name for the real test later on.
15765 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15766 if test "x$test_shortpath" = x; then
15767 # Short path failed, file does not exist as specified.
15768 # Try adding .exe or .cmd
15769 if test -f "${new_path}.exe"; then
15770 input_to_shortpath="${new_path}.exe"
15771 elif test -f "${new_path}.cmd"; then
15772 input_to_shortpath="${new_path}.cmd"
15773 else
15774 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15775 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15776 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15777 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15778 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15779 fi
15780 else
15781 input_to_shortpath="$new_path"
15782 fi
15783
15784 # Call helper function which possibly converts this using DOS-style short mode.
15785 # If so, the updated path is stored in $new_path.
15786 new_path="$input_to_shortpath"
15787
15788 input_path="$input_to_shortpath"
15789 # Check if we need to convert this using DOS-style short mode. If the path
15790 # contains just simple characters, use it. Otherwise (spaces, weird characters),
15791 # take no chances and rewrite it.
15792 # Note: m4 eats our [], so we need to use [ and ] instead.
15793 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15794 if test "x$has_forbidden_chars" != x; then
15795 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15796 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15797 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15798 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15799 # Going to short mode and back again did indeed matter. Since short mode is
15800 # case insensitive, let's make it lowercase to improve readability.
15801 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15802 # Now convert it back to Unix-style (cygpath)
15803 input_path=`$CYGPATH -u "$shortmode_path"`
15804 new_path="$input_path"
15805 fi
15806 fi
15807
15808 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15809 if test "x$test_cygdrive_prefix" = x; then
15810 # As a simple fix, exclude /usr/bin since it's not a real path.
15811 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15812 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15813 # a path prefixed by /cygdrive for fixpath to work.
15814 new_path="$CYGWIN_ROOT_PATH$input_path"
15815 fi
15816 fi
15817
15818 # remove trailing .exe if any
15819 new_path="${new_path/%.exe/}"
15820
15821 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15822
15823 # First separate the path from the arguments. This will split at the first
15824 # space.
15825 complete="$FOUND_MAKE"
15826 path="${complete%% *}"
15827 tmp="$complete EOL"
15828 arguments="${tmp#* }"
15829
15830 # Input might be given as Windows format, start by converting to
15831 # unix format.
15832 new_path="$path"
15833
15834 windows_path="$new_path"
15835 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15836 unix_path=`$CYGPATH -u "$windows_path"`
15837 new_path="$unix_path"
15838 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15839 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15840 new_path="$unix_path"
15841 fi
15842
15843
15844 # Now try to locate executable using which
15845 new_path=`$WHICH "$new_path" 2> /dev/null`
15846
15847 if test "x$new_path" = x; then
15848 # Oops. Which didn't find the executable.
15849 # The splitting of arguments from the executable at a space might have been incorrect,
15850 # since paths with space are more likely in Windows. Give it another try with the whole
15851 # argument.
15852 path="$complete"
15853 arguments="EOL"
15854 new_path="$path"
15855
15856 windows_path="$new_path"
15857 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15858 unix_path=`$CYGPATH -u "$windows_path"`
15859 new_path="$unix_path"
15860 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15861 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15862 new_path="$unix_path"
15863 fi
15864
15865
15866 new_path=`$WHICH "$new_path" 2> /dev/null`
15867 # bat and cmd files are not always considered executable in MSYS causing which
15868 # to not find them
15869 if test "x$new_path" = x \
15870 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15871 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15872 new_path="$path"
15873
15874 windows_path="$new_path"
15875 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15876 unix_path=`$CYGPATH -u "$windows_path"`
15877 new_path="$unix_path"
15878 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15879 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15880 new_path="$unix_path"
15881 fi
15882
15883 fi
15884
15885 if test "x$new_path" = x; then
15886 # It's still not found. Now this is an unrecoverable error.
15887 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15888 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15889 has_space=`$ECHO "$complete" | $GREP " "`
15890 if test "x$has_space" != x; then
15891 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15892 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15893 fi
15894 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15895 fi
15896 fi
15897
15898 # Now new_path has a complete unix path to the binary
15899 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15900 # Keep paths in /bin as-is, but remove trailing .exe if any
15901 new_path="${new_path/%.exe/}"
15902 # Do not save /bin paths to all_fixpath_prefixes!
15903 else
15904 # Not in mixed or Windows style, start by that.
15905 new_path=`cmd //c echo $new_path`
15906
15907 input_path="$new_path"
15908 # Check if we need to convert this using DOS-style short mode. If the path
15909 # contains just simple characters, use it. Otherwise (spaces, weird characters),
15910 # take no chances and rewrite it.
15911 # Note: m4 eats our [], so we need to use [ and ] instead.
15912 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15913 if test "x$has_forbidden_chars" != x; then
15914 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15915 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15916 fi
15917
15918 # Output is in $new_path
15919
15920 windows_path="$new_path"
15921 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15922 unix_path=`$CYGPATH -u "$windows_path"`
15923 new_path="$unix_path"
15924 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15925 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15926 new_path="$unix_path"
15927 fi
15928
15929 # remove trailing .exe if any
15930 new_path="${new_path/%.exe/}"
15931
15932 # Save the first 10 bytes of this path to the storage, so fixpath can work.
15933 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15934 fi
15935
15936 else
15937 # We're on a unix platform. Hooray! :)
15938 # First separate the path from the arguments. This will split at the first
15939 # space.
15940 complete="$FOUND_MAKE"
15941 path="${complete%% *}"
15942 tmp="$complete EOL"
15943 arguments="${tmp#* }"
15944
15945 # Cannot rely on the command "which" here since it doesn't always work.
15946 is_absolute_path=`$ECHO "$path" | $GREP ^/`
15947 if test -z "$is_absolute_path"; then
15948 # Path to executable is not absolute. Find it.
15949 IFS_save="$IFS"
15950 IFS=:
15951 for p in $PATH; do
15952 if test -f "$p/$path" && test -x "$p/$path"; then
15953 new_path="$p/$path"
15954 break
15955 fi
15956 done
15957 IFS="$IFS_save"
15958 else
15959 # This is an absolute path, we can use it without further modifications.
15960 new_path="$path"
15961 fi
15962
15963 if test "x$new_path" = x; then
15964 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15965 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15966 has_space=`$ECHO "$complete" | $GREP " "`
15967 if test "x$has_space" != x; then
15968 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15969 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15970 fi
15971 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15972 fi
15973 fi
15974
15975 # Now join together the path and the arguments once again
15976 if test "x$arguments" != xEOL; then
15977 new_complete="$new_path ${arguments% *}"
15978 else
15979 new_complete="$new_path"
15980 fi
15981
15982 if test "x$complete" != "x$new_complete"; then
15983 FOUND_MAKE="$new_complete"
15984 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15985 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15986 fi
15987 fi
15988
15989 fi
15990 fi
15991 fi
15992 fi
15993
15994 if test "x$FOUND_MAKE" = x; then
15995 as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
15996 fi
15997 else
15998 # Try our hardest to locate a correct version of GNU make
15999 for ac_prog in gmake
16000 do
16001 # Extract the first word of "$ac_prog", so it can be a program name with args.
16002 set dummy $ac_prog; ac_word=$2
16003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16004 $as_echo_n "checking for $ac_word... " >&6; }
16005 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
16006 $as_echo_n "(cached) " >&6
16007 else
16008 case $CHECK_GMAKE in
16009 [\\/]* | ?:[\\/]*)
16010 ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
16011 ;;
16012 *)
16013 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16014 for as_dir in $PATH
16015 do
16016 IFS=$as_save_IFS
16017 test -z "$as_dir" && as_dir=.
16018 for ac_exec_ext in '' $ac_executable_extensions; do
16019 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16020 ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16021 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16022 break 2
16023 fi
16024 done
16025 done
16026 IFS=$as_save_IFS
16027
16028 ;;
16029 esac
16030 fi
16031 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
16032 if test -n "$CHECK_GMAKE"; then
16033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
16034 $as_echo "$CHECK_GMAKE" >&6; }
16035 else
16036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16037 $as_echo "no" >&6; }
16038 fi
16039
16040
16041 test -n "$CHECK_GMAKE" && break
16042 done
16043
16044
16045 MAKE_CANDIDATE=""$CHECK_GMAKE""
16046 DESCRIPTION="gmake in PATH"
16047
16048 # On Cygwin, we require a newer version of make than on other platforms
16049 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16050 MAKE_VERSION_EXPR="-e 4\."
16051 MAKE_REQUIRED_VERSION="4.0"
16052 else
16053 MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16054 MAKE_REQUIRED_VERSION="3.81"
16055 fi
16056
16057 if test "x$MAKE_CANDIDATE" != x; then
16058 { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16059 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16060 MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16061 IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16062 if test "x$IS_GNU_MAKE" = x; then
16063 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16064 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16065 else
16066 IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16067 if test "x$IS_MODERN_MAKE" = x; then
16068 { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
16069 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
16070 else
16071 if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16072 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16073 MAKE_EXPECTED_ENV='cygwin'
16074 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16075 MAKE_EXPECTED_ENV='msys'
16076 else
16077 as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16078 fi
16079 MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16080 IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16081 else
16082 # Not relevant for non-Windows
16083 IS_MAKE_CORRECT_ENV=true
16084 fi
16085 if test "x$IS_MAKE_CORRECT_ENV" = x; then
16086 { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
16087 $as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
16088 else
16089 FOUND_MAKE=$MAKE_CANDIDATE
16090
16091 # Only process if variable expands to non-empty
16092
16093 if test "x$FOUND_MAKE" != x; then
16094 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16095
16096 # First separate the path from the arguments. This will split at the first
16097 # space.
16098 complete="$FOUND_MAKE"
16099 path="${complete%% *}"
16100 tmp="$complete EOL"
16101 arguments="${tmp#* }"
16102
16103 # Input might be given as Windows format, start by converting to
16104 # unix format.
16105 new_path=`$CYGPATH -u "$path"`
16106
16107 # Now try to locate executable using which
16108 new_path=`$WHICH "$new_path" 2> /dev/null`
16109 # bat and cmd files are not always considered executable in cygwin causing which
16110 # to not find them
16111 if test "x$new_path" = x \
16112 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16113 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16114 new_path=`$CYGPATH -u "$path"`
16115 fi
16116 if test "x$new_path" = x; then
16117 # Oops. Which didn't find the executable.
16118 # The splitting of arguments from the executable at a space might have been incorrect,
16119 # since paths with space are more likely in Windows. Give it another try with the whole
16120 # argument.
16121 path="$complete"
16122 arguments="EOL"
16123 new_path=`$CYGPATH -u "$path"`
16124 new_path=`$WHICH "$new_path" 2> /dev/null`
16125 # bat and cmd files are not always considered executable in cygwin causing which
16126 # to not find them
16127 if test "x$new_path" = x \
16128 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16129 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16130 new_path=`$CYGPATH -u "$path"`
16131 fi
16132 if test "x$new_path" = x; then
16133 # It's still not found. Now this is an unrecoverable error.
16134 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16135 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16136 has_space=`$ECHO "$complete" | $GREP " "`
16137 if test "x$has_space" != x; then
16138 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16139 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16140 fi
16141 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16142 fi
16143 fi
16144
16145 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16146 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16147 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16148 # "foo.exe" is OK but "foo" is an error.
16149 #
16150 # This test is therefore slightly more accurate than "test -f" to check for file presence.
16151 # It is also a way to make sure we got the proper file name for the real test later on.
16152 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16153 if test "x$test_shortpath" = x; then
16154 # Short path failed, file does not exist as specified.
16155 # Try adding .exe or .cmd
16156 if test -f "${new_path}.exe"; then
16157 input_to_shortpath="${new_path}.exe"
16158 elif test -f "${new_path}.cmd"; then
16159 input_to_shortpath="${new_path}.cmd"
16160 else
16161 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16162 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16163 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16164 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16165 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16166 fi
16167 else
16168 input_to_shortpath="$new_path"
16169 fi
16170
16171 # Call helper function which possibly converts this using DOS-style short mode.
16172 # If so, the updated path is stored in $new_path.
16173 new_path="$input_to_shortpath"
16174
16175 input_path="$input_to_shortpath"
16176 # Check if we need to convert this using DOS-style short mode. If the path
16177 # contains just simple characters, use it. Otherwise (spaces, weird characters),
16178 # take no chances and rewrite it.
16179 # Note: m4 eats our [], so we need to use [ and ] instead.
16180 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16181 if test "x$has_forbidden_chars" != x; then
16182 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16183 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16184 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16185 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16186 # Going to short mode and back again did indeed matter. Since short mode is
16187 # case insensitive, let's make it lowercase to improve readability.
16188 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16189 # Now convert it back to Unix-style (cygpath)
16190 input_path=`$CYGPATH -u "$shortmode_path"`
16191 new_path="$input_path"
16192 fi
16193 fi
16194
16195 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16196 if test "x$test_cygdrive_prefix" = x; then
16197 # As a simple fix, exclude /usr/bin since it's not a real path.
16198 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16199 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16200 # a path prefixed by /cygdrive for fixpath to work.
16201 new_path="$CYGWIN_ROOT_PATH$input_path"
16202 fi
16203 fi
16204
16205 # remove trailing .exe if any
16206 new_path="${new_path/%.exe/}"
16207
16208 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16209
16210 # First separate the path from the arguments. This will split at the first
16211 # space.
16212 complete="$FOUND_MAKE"
16213 path="${complete%% *}"
16214 tmp="$complete EOL"
16215 arguments="${tmp#* }"
16216
16217 # Input might be given as Windows format, start by converting to
16218 # unix format.
16219 new_path="$path"
16220
16221 windows_path="$new_path"
16222 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16223 unix_path=`$CYGPATH -u "$windows_path"`
16224 new_path="$unix_path"
16225 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16226 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16227 new_path="$unix_path"
16228 fi
16229
16230
16231 # Now try to locate executable using which
16232 new_path=`$WHICH "$new_path" 2> /dev/null`
16233
16234 if test "x$new_path" = x; then
16235 # Oops. Which didn't find the executable.
16236 # The splitting of arguments from the executable at a space might have been incorrect,
16237 # since paths with space are more likely in Windows. Give it another try with the whole
16238 # argument.
16239 path="$complete"
16240 arguments="EOL"
16241 new_path="$path"
16242
16243 windows_path="$new_path"
16244 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16245 unix_path=`$CYGPATH -u "$windows_path"`
16246 new_path="$unix_path"
16247 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16248 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16249 new_path="$unix_path"
16250 fi
16251
16252
16253 new_path=`$WHICH "$new_path" 2> /dev/null`
16254 # bat and cmd files are not always considered executable in MSYS causing which
16255 # to not find them
16256 if test "x$new_path" = x \
16257 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16258 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16259 new_path="$path"
16260
16261 windows_path="$new_path"
16262 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16263 unix_path=`$CYGPATH -u "$windows_path"`
16264 new_path="$unix_path"
16265 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16266 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16267 new_path="$unix_path"
16268 fi
16269
16270 fi
16271
16272 if test "x$new_path" = x; then
16273 # It's still not found. Now this is an unrecoverable error.
16274 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16275 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16276 has_space=`$ECHO "$complete" | $GREP " "`
16277 if test "x$has_space" != x; then
16278 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16279 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16280 fi
16281 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16282 fi
16283 fi
16284
16285 # Now new_path has a complete unix path to the binary
16286 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16287 # Keep paths in /bin as-is, but remove trailing .exe if any
16288 new_path="${new_path/%.exe/}"
16289 # Do not save /bin paths to all_fixpath_prefixes!
16290 else
16291 # Not in mixed or Windows style, start by that.
16292 new_path=`cmd //c echo $new_path`
16293
16294 input_path="$new_path"
16295 # Check if we need to convert this using DOS-style short mode. If the path
16296 # contains just simple characters, use it. Otherwise (spaces, weird characters),
16297 # take no chances and rewrite it.
16298 # Note: m4 eats our [], so we need to use [ and ] instead.
16299 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16300 if test "x$has_forbidden_chars" != x; then
16301 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16302 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16303 fi
16304
16305 # Output is in $new_path
16306
16307 windows_path="$new_path"
16308 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16309 unix_path=`$CYGPATH -u "$windows_path"`
16310 new_path="$unix_path"
16311 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16312 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16313 new_path="$unix_path"
16314 fi
16315
16316 # remove trailing .exe if any
16317 new_path="${new_path/%.exe/}"
16318
16319 # Save the first 10 bytes of this path to the storage, so fixpath can work.
16320 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16321 fi
16322
16323 else
16324 # We're on a unix platform. Hooray! :)
16325 # First separate the path from the arguments. This will split at the first
16326 # space.
16327 complete="$FOUND_MAKE"
16328 path="${complete%% *}"
16329 tmp="$complete EOL"
16330 arguments="${tmp#* }"
16331
16332 # Cannot rely on the command "which" here since it doesn't always work.
16333 is_absolute_path=`$ECHO "$path" | $GREP ^/`
16334 if test -z "$is_absolute_path"; then
16335 # Path to executable is not absolute. Find it.
16336 IFS_save="$IFS"
16337 IFS=:
16338 for p in $PATH; do
16339 if test -f "$p/$path" && test -x "$p/$path"; then
16340 new_path="$p/$path"
16341 break
16342 fi
16343 done
16344 IFS="$IFS_save"
16345 else
16346 # This is an absolute path, we can use it without further modifications.
16347 new_path="$path"
16348 fi
16349
16350 if test "x$new_path" = x; then
16351 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16352 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16353 has_space=`$ECHO "$complete" | $GREP " "`
16354 if test "x$has_space" != x; then
16355 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16356 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16357 fi
16358 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16359 fi
16360 fi
16361
16362 # Now join together the path and the arguments once again
16363 if test "x$arguments" != xEOL; then
16364 new_complete="$new_path ${arguments% *}"
16365 else
16366 new_complete="$new_path"
16367 fi
16368
16369 if test "x$complete" != "x$new_complete"; then
16370 FOUND_MAKE="$new_complete"
16371 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16372 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16373 fi
16374 fi
16375
16376 fi
16377 fi
16378 fi
16379 fi
16380
16381
16382 if test "x$FOUND_MAKE" = x; then
16383 for ac_prog in make
16384 do
16385 # Extract the first word of "$ac_prog", so it can be a program name with args.
16386 set dummy $ac_prog; ac_word=$2
16387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16388 $as_echo_n "checking for $ac_word... " >&6; }
16389 if ${ac_cv_path_CHECK_MAKE+:} false; then :
16390 $as_echo_n "(cached) " >&6
16391 else
16392 case $CHECK_MAKE in
16393 [\\/]* | ?:[\\/]*)
16394 ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16395 ;;
16396 *)
16397 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16398 for as_dir in $PATH
16399 do
16400 IFS=$as_save_IFS
16401 test -z "$as_dir" && as_dir=.
16402 for ac_exec_ext in '' $ac_executable_extensions; do
16403 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16404 ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16405 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16406 break 2
16407 fi
16408 done
16409 done
16410 IFS=$as_save_IFS
16411
16412 ;;
16413 esac
16414 fi
16415 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16416 if test -n "$CHECK_MAKE"; then
16417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16418 $as_echo "$CHECK_MAKE" >&6; }
16419 else
16420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16421 $as_echo "no" >&6; }
16422 fi
16423
16424
16425 test -n "$CHECK_MAKE" && break
16426 done
16427
16428
16429 MAKE_CANDIDATE=""$CHECK_MAKE""
16430 DESCRIPTION="make in PATH"
16431
16432 # On Cygwin, we require a newer version of make than on other platforms
16433 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16434 MAKE_VERSION_EXPR="-e 4\."
16435 MAKE_REQUIRED_VERSION="4.0"
16436 else
16437 MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16438 MAKE_REQUIRED_VERSION="3.81"
16439 fi
16440
16441 if test "x$MAKE_CANDIDATE" != x; then
16442 { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16443 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16444 MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16445 IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16446 if test "x$IS_GNU_MAKE" = x; then
16447 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16448 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16449 else
16450 IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16451 if test "x$IS_MODERN_MAKE" = x; then
16452 { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
16453 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
16454 else
16455 if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16456 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16457 MAKE_EXPECTED_ENV='cygwin'
16458 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16459 MAKE_EXPECTED_ENV='msys'
16460 else
16461 as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16462 fi
16463 MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16464 IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16465 else
16466 # Not relevant for non-Windows
16467 IS_MAKE_CORRECT_ENV=true
16468 fi
16469 if test "x$IS_MAKE_CORRECT_ENV" = x; then
16470 { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
16471 $as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
16472 else
16473 FOUND_MAKE=$MAKE_CANDIDATE
16474
16475 # Only process if variable expands to non-empty
16476
16477 if test "x$FOUND_MAKE" != x; then
16478 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16479
16480 # First separate the path from the arguments. This will split at the first
16481 # space.
16482 complete="$FOUND_MAKE"
16483 path="${complete%% *}"
16484 tmp="$complete EOL"
16485 arguments="${tmp#* }"
16486
16487 # Input might be given as Windows format, start by converting to
16488 # unix format.
16489 new_path=`$CYGPATH -u "$path"`
16490
16491 # Now try to locate executable using which
16492 new_path=`$WHICH "$new_path" 2> /dev/null`
16493 # bat and cmd files are not always considered executable in cygwin causing which
16494 # to not find them
16495 if test "x$new_path" = x \
16496 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16497 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16498 new_path=`$CYGPATH -u "$path"`
16499 fi
16500 if test "x$new_path" = x; then
16501 # Oops. Which didn't find the executable.
16502 # The splitting of arguments from the executable at a space might have been incorrect,
16503 # since paths with space are more likely in Windows. Give it another try with the whole
16504 # argument.
16505 path="$complete"
16506 arguments="EOL"
16507 new_path=`$CYGPATH -u "$path"`
16508 new_path=`$WHICH "$new_path" 2> /dev/null`
16509 # bat and cmd files are not always considered executable in cygwin causing which
16510 # to not find them
16511 if test "x$new_path" = x \
16512 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16513 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16514 new_path=`$CYGPATH -u "$path"`
16515 fi
16516 if test "x$new_path" = x; then
16517 # It's still not found. Now this is an unrecoverable error.
16518 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16519 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16520 has_space=`$ECHO "$complete" | $GREP " "`
16521 if test "x$has_space" != x; then
16522 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16523 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16524 fi
16525 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16526 fi
16527 fi
16528
16529 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16530 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16531 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16532 # "foo.exe" is OK but "foo" is an error.
16533 #
16534 # This test is therefore slightly more accurate than "test -f" to check for file presence.
16535 # It is also a way to make sure we got the proper file name for the real test later on.
16536 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16537 if test "x$test_shortpath" = x; then
16538 # Short path failed, file does not exist as specified.
16539 # Try adding .exe or .cmd
16540 if test -f "${new_path}.exe"; then
16541 input_to_shortpath="${new_path}.exe"
16542 elif test -f "${new_path}.cmd"; then
16543 input_to_shortpath="${new_path}.cmd"
16544 else
16545 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16546 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16547 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16548 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16549 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16550 fi
16551 else
16552 input_to_shortpath="$new_path"
16553 fi
16554
16555 # Call helper function which possibly converts this using DOS-style short mode.
16556 # If so, the updated path is stored in $new_path.
16557 new_path="$input_to_shortpath"
16558
16559 input_path="$input_to_shortpath"
16560 # Check if we need to convert this using DOS-style short mode. If the path
16561 # contains just simple characters, use it. Otherwise (spaces, weird characters),
16562 # take no chances and rewrite it.
16563 # Note: m4 eats our [], so we need to use [ and ] instead.
16564 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16565 if test "x$has_forbidden_chars" != x; then
16566 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16567 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16568 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16569 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16570 # Going to short mode and back again did indeed matter. Since short mode is
16571 # case insensitive, let's make it lowercase to improve readability.
16572 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16573 # Now convert it back to Unix-style (cygpath)
16574 input_path=`$CYGPATH -u "$shortmode_path"`
16575 new_path="$input_path"
16576 fi
16577 fi
16578
16579 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16580 if test "x$test_cygdrive_prefix" = x; then
16581 # As a simple fix, exclude /usr/bin since it's not a real path.
16582 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16583 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16584 # a path prefixed by /cygdrive for fixpath to work.
16585 new_path="$CYGWIN_ROOT_PATH$input_path"
16586 fi
16587 fi
16588
16589 # remove trailing .exe if any
16590 new_path="${new_path/%.exe/}"
16591
16592 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16593
16594 # First separate the path from the arguments. This will split at the first
16595 # space.
16596 complete="$FOUND_MAKE"
16597 path="${complete%% *}"
16598 tmp="$complete EOL"
16599 arguments="${tmp#* }"
16600
16601 # Input might be given as Windows format, start by converting to
16602 # unix format.
16603 new_path="$path"
16604
16605 windows_path="$new_path"
16606 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16607 unix_path=`$CYGPATH -u "$windows_path"`
16608 new_path="$unix_path"
16609 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16610 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16611 new_path="$unix_path"
16612 fi
16613
16614
16615 # Now try to locate executable using which
16616 new_path=`$WHICH "$new_path" 2> /dev/null`
16617
16618 if test "x$new_path" = x; then
16619 # Oops. Which didn't find the executable.
16620 # The splitting of arguments from the executable at a space might have been incorrect,
16621 # since paths with space are more likely in Windows. Give it another try with the whole
16622 # argument.
16623 path="$complete"
16624 arguments="EOL"
16625 new_path="$path"
16626
16627 windows_path="$new_path"
16628 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16629 unix_path=`$CYGPATH -u "$windows_path"`
16630 new_path="$unix_path"
16631 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16632 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16633 new_path="$unix_path"
16634 fi
16635
16636
16637 new_path=`$WHICH "$new_path" 2> /dev/null`
16638 # bat and cmd files are not always considered executable in MSYS causing which
16639 # to not find them
16640 if test "x$new_path" = x \
16641 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16642 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16643 new_path="$path"
16644
16645 windows_path="$new_path"
16646 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16647 unix_path=`$CYGPATH -u "$windows_path"`
16648 new_path="$unix_path"
16649 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16650 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16651 new_path="$unix_path"
16652 fi
16653
16654 fi
16655
16656 if test "x$new_path" = x; then
16657 # It's still not found. Now this is an unrecoverable error.
16658 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16659 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16660 has_space=`$ECHO "$complete" | $GREP " "`
16661 if test "x$has_space" != x; then
16662 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16663 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16664 fi
16665 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16666 fi
16667 fi
16668
16669 # Now new_path has a complete unix path to the binary
16670 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16671 # Keep paths in /bin as-is, but remove trailing .exe if any
16672 new_path="${new_path/%.exe/}"
16673 # Do not save /bin paths to all_fixpath_prefixes!
16674 else
16675 # Not in mixed or Windows style, start by that.
16676 new_path=`cmd //c echo $new_path`
16677
16678 input_path="$new_path"
16679 # Check if we need to convert this using DOS-style short mode. If the path
16680 # contains just simple characters, use it. Otherwise (spaces, weird characters),
16681 # take no chances and rewrite it.
16682 # Note: m4 eats our [], so we need to use [ and ] instead.
16683 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16684 if test "x$has_forbidden_chars" != x; then
16685 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16686 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16687 fi
16688
16689 # Output is in $new_path
16690
16691 windows_path="$new_path"
16692 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16693 unix_path=`$CYGPATH -u "$windows_path"`
16694 new_path="$unix_path"
16695 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16696 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16697 new_path="$unix_path"
16698 fi
16699
16700 # remove trailing .exe if any
16701 new_path="${new_path/%.exe/}"
16702
16703 # Save the first 10 bytes of this path to the storage, so fixpath can work.
16704 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16705 fi
16706
16707 else
16708 # We're on a unix platform. Hooray! :)
16709 # First separate the path from the arguments. This will split at the first
16710 # space.
16711 complete="$FOUND_MAKE"
16712 path="${complete%% *}"
16713 tmp="$complete EOL"
16714 arguments="${tmp#* }"
16715
16716 # Cannot rely on the command "which" here since it doesn't always work.
16717 is_absolute_path=`$ECHO "$path" | $GREP ^/`
16718 if test -z "$is_absolute_path"; then
16719 # Path to executable is not absolute. Find it.
16720 IFS_save="$IFS"
16721 IFS=:
16722 for p in $PATH; do
16723 if test -f "$p/$path" && test -x "$p/$path"; then
16724 new_path="$p/$path"
16725 break
16726 fi
16727 done
16728 IFS="$IFS_save"
16729 else
16730 # This is an absolute path, we can use it without further modifications.
16731 new_path="$path"
16732 fi
16733
16734 if test "x$new_path" = x; then
16735 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16736 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16737 has_space=`$ECHO "$complete" | $GREP " "`
16738 if test "x$has_space" != x; then
16739 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16740 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16741 fi
16742 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16743 fi
16744 fi
16745
16746 # Now join together the path and the arguments once again
16747 if test "x$arguments" != xEOL; then
16748 new_complete="$new_path ${arguments% *}"
16749 else
16750 new_complete="$new_path"
16751 fi
16752
16753 if test "x$complete" != "x$new_complete"; then
16754 FOUND_MAKE="$new_complete"
16755 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16756 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16757 fi
16758 fi
16759
16760 fi
16761 fi
16762 fi
16763 fi
16764
16765 fi
16766
16767 if test "x$FOUND_MAKE" = x; then
16768 if test "x$TOOLCHAIN_PATH" != x; then
16769 # We have a toolchain path, check that as well before giving up.
16770 OLD_PATH=$PATH
16771 PATH=$TOOLCHAIN_PATH:$PATH
16772 for ac_prog in gmake
16773 do
16774 # Extract the first word of "$ac_prog", so it can be a program name with args.
16775 set dummy $ac_prog; ac_word=$2
16776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16777 $as_echo_n "checking for $ac_word... " >&6; }
16778 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16779 $as_echo_n "(cached) " >&6
16780 else
16781 case $CHECK_TOOLSDIR_GMAKE in
16782 [\\/]* | ?:[\\/]*)
16783 ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16784 ;;
16785 *)
16786 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16787 for as_dir in $PATH
16788 do
16789 IFS=$as_save_IFS
16790 test -z "$as_dir" && as_dir=.
16791 for ac_exec_ext in '' $ac_executable_extensions; do
16792 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16793 ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16794 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16795 break 2
16796 fi
16797 done
16798 done
16799 IFS=$as_save_IFS
16800
16801 ;;
16802 esac
16803 fi
16804 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16805 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16807 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16808 else
16809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16810 $as_echo "no" >&6; }
16811 fi
16812
16813
16814 test -n "$CHECK_TOOLSDIR_GMAKE" && break
16815 done
16816
16817
16818 MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16819 DESCRIPTION="gmake in tools-dir"
16820
16821 # On Cygwin, we require a newer version of make than on other platforms
16822 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16823 MAKE_VERSION_EXPR="-e 4\."
16824 MAKE_REQUIRED_VERSION="4.0"
16825 else
16826 MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16827 MAKE_REQUIRED_VERSION="3.81"
16828 fi
16829
16830 if test "x$MAKE_CANDIDATE" != x; then
16831 { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16832 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16833 MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16834 IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16835 if test "x$IS_GNU_MAKE" = x; then
16836 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16837 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16838 else
16839 IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16840 if test "x$IS_MODERN_MAKE" = x; then
16841 { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
16842 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
16843 else
16844 if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16845 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16846 MAKE_EXPECTED_ENV='cygwin'
16847 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16848 MAKE_EXPECTED_ENV='msys'
16849 else
16850 as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16851 fi
16852 MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16853 IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16854 else
16855 # Not relevant for non-Windows
16856 IS_MAKE_CORRECT_ENV=true
16857 fi
16858 if test "x$IS_MAKE_CORRECT_ENV" = x; then
16859 { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
16860 $as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
16861 else
16862 FOUND_MAKE=$MAKE_CANDIDATE
16863
16864 # Only process if variable expands to non-empty
16865
16866 if test "x$FOUND_MAKE" != x; then
16867 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16868
16869 # First separate the path from the arguments. This will split at the first
16870 # space.
16871 complete="$FOUND_MAKE"
16872 path="${complete%% *}"
16873 tmp="$complete EOL"
16874 arguments="${tmp#* }"
16875
16876 # Input might be given as Windows format, start by converting to
16877 # unix format.
16878 new_path=`$CYGPATH -u "$path"`
16879
16880 # Now try to locate executable using which
16881 new_path=`$WHICH "$new_path" 2> /dev/null`
16882 # bat and cmd files are not always considered executable in cygwin causing which
16883 # to not find them
16884 if test "x$new_path" = x \
16885 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16886 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16887 new_path=`$CYGPATH -u "$path"`
16888 fi
16889 if test "x$new_path" = x; then
16890 # Oops. Which didn't find the executable.
16891 # The splitting of arguments from the executable at a space might have been incorrect,
16892 # since paths with space are more likely in Windows. Give it another try with the whole
16893 # argument.
16894 path="$complete"
16895 arguments="EOL"
16896 new_path=`$CYGPATH -u "$path"`
16897 new_path=`$WHICH "$new_path" 2> /dev/null`
16898 # bat and cmd files are not always considered executable in cygwin causing which
16899 # to not find them
16900 if test "x$new_path" = x \
16901 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16902 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16903 new_path=`$CYGPATH -u "$path"`
16904 fi
16905 if test "x$new_path" = x; then
16906 # It's still not found. Now this is an unrecoverable error.
16907 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16908 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16909 has_space=`$ECHO "$complete" | $GREP " "`
16910 if test "x$has_space" != x; then
16911 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16912 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16913 fi
16914 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16915 fi
16916 fi
16917
16918 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16919 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16920 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16921 # "foo.exe" is OK but "foo" is an error.
16922 #
16923 # This test is therefore slightly more accurate than "test -f" to check for file presence.
16924 # It is also a way to make sure we got the proper file name for the real test later on.
16925 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16926 if test "x$test_shortpath" = x; then
16927 # Short path failed, file does not exist as specified.
16928 # Try adding .exe or .cmd
16929 if test -f "${new_path}.exe"; then
16930 input_to_shortpath="${new_path}.exe"
16931 elif test -f "${new_path}.cmd"; then
16932 input_to_shortpath="${new_path}.cmd"
16933 else
16934 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16935 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16936 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16937 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16938 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16939 fi
16940 else
16941 input_to_shortpath="$new_path"
16942 fi
16943
16944 # Call helper function which possibly converts this using DOS-style short mode.
16945 # If so, the updated path is stored in $new_path.
16946 new_path="$input_to_shortpath"
16947
16948 input_path="$input_to_shortpath"
16949 # Check if we need to convert this using DOS-style short mode. If the path
16950 # contains just simple characters, use it. Otherwise (spaces, weird characters),
16951 # take no chances and rewrite it.
16952 # Note: m4 eats our [], so we need to use [ and ] instead.
16953 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16954 if test "x$has_forbidden_chars" != x; then
16955 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16956 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16957 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16958 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16959 # Going to short mode and back again did indeed matter. Since short mode is
16960 # case insensitive, let's make it lowercase to improve readability.
16961 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16962 # Now convert it back to Unix-style (cygpath)
16963 input_path=`$CYGPATH -u "$shortmode_path"`
16964 new_path="$input_path"
16965 fi
16966 fi
16967
16968 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16969 if test "x$test_cygdrive_prefix" = x; then
16970 # As a simple fix, exclude /usr/bin since it's not a real path.
16971 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16972 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16973 # a path prefixed by /cygdrive for fixpath to work.
16974 new_path="$CYGWIN_ROOT_PATH$input_path"
16975 fi
16976 fi
16977
16978 # remove trailing .exe if any
16979 new_path="${new_path/%.exe/}"
16980
16981 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16982
16983 # First separate the path from the arguments. This will split at the first
16984 # space.
16985 complete="$FOUND_MAKE"
16986 path="${complete%% *}"
16987 tmp="$complete EOL"
16988 arguments="${tmp#* }"
16989
16990 # Input might be given as Windows format, start by converting to
16991 # unix format.
16992 new_path="$path"
16993
16994 windows_path="$new_path"
16995 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16996 unix_path=`$CYGPATH -u "$windows_path"`
16997 new_path="$unix_path"
16998 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16999 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17000 new_path="$unix_path"
17001 fi
17002
17003
17004 # Now try to locate executable using which
17005 new_path=`$WHICH "$new_path" 2> /dev/null`
17006
17007 if test "x$new_path" = x; then
17008 # Oops. Which didn't find the executable.
17009 # The splitting of arguments from the executable at a space might have been incorrect,
17010 # since paths with space are more likely in Windows. Give it another try with the whole
17011 # argument.
17012 path="$complete"
17013 arguments="EOL"
17014 new_path="$path"
17015
17016 windows_path="$new_path"
17017 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17018 unix_path=`$CYGPATH -u "$windows_path"`
17019 new_path="$unix_path"
17020 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17021 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17022 new_path="$unix_path"
17023 fi
17024
17025
17026 new_path=`$WHICH "$new_path" 2> /dev/null`
17027 # bat and cmd files are not always considered executable in MSYS causing which
17028 # to not find them
17029 if test "x$new_path" = x \
17030 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17031 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17032 new_path="$path"
17033
17034 windows_path="$new_path"
17035 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17036 unix_path=`$CYGPATH -u "$windows_path"`
17037 new_path="$unix_path"
17038 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17039 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17040 new_path="$unix_path"
17041 fi
17042
17043 fi
17044
17045 if test "x$new_path" = x; then
17046 # It's still not found. Now this is an unrecoverable error.
17047 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17048 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17049 has_space=`$ECHO "$complete" | $GREP " "`
17050 if test "x$has_space" != x; then
17051 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17052 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17053 fi
17054 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17055 fi
17056 fi
17057
17058 # Now new_path has a complete unix path to the binary
17059 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17060 # Keep paths in /bin as-is, but remove trailing .exe if any
17061 new_path="${new_path/%.exe/}"
17062 # Do not save /bin paths to all_fixpath_prefixes!
17063 else
17064 # Not in mixed or Windows style, start by that.
17065 new_path=`cmd //c echo $new_path`
17066
17067 input_path="$new_path"
17068 # Check if we need to convert this using DOS-style short mode. If the path
17069 # contains just simple characters, use it. Otherwise (spaces, weird characters),
17070 # take no chances and rewrite it.
17071 # Note: m4 eats our [], so we need to use [ and ] instead.
17072 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17073 if test "x$has_forbidden_chars" != x; then
17074 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17075 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17076 fi
17077
17078 # Output is in $new_path
17079
17080 windows_path="$new_path"
17081 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17082 unix_path=`$CYGPATH -u "$windows_path"`
17083 new_path="$unix_path"
17084 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17085 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17086 new_path="$unix_path"
17087 fi
17088
17089 # remove trailing .exe if any
17090 new_path="${new_path/%.exe/}"
17091
17092 # Save the first 10 bytes of this path to the storage, so fixpath can work.
17093 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17094 fi
17095
17096 else
17097 # We're on a unix platform. Hooray! :)
17098 # First separate the path from the arguments. This will split at the first
17099 # space.
17100 complete="$FOUND_MAKE"
17101 path="${complete%% *}"
17102 tmp="$complete EOL"
17103 arguments="${tmp#* }"
17104
17105 # Cannot rely on the command "which" here since it doesn't always work.
17106 is_absolute_path=`$ECHO "$path" | $GREP ^/`
17107 if test -z "$is_absolute_path"; then
17108 # Path to executable is not absolute. Find it.
17109 IFS_save="$IFS"
17110 IFS=:
17111 for p in $PATH; do
17112 if test -f "$p/$path" && test -x "$p/$path"; then
17113 new_path="$p/$path"
17114 break
17115 fi
17116 done
17117 IFS="$IFS_save"
17118 else
17119 # This is an absolute path, we can use it without further modifications.
17120 new_path="$path"
17121 fi
17122
17123 if test "x$new_path" = x; then
17124 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17125 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17126 has_space=`$ECHO "$complete" | $GREP " "`
17127 if test "x$has_space" != x; then
17128 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17129 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17130 fi
17131 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17132 fi
17133 fi
17134
17135 # Now join together the path and the arguments once again
17136 if test "x$arguments" != xEOL; then
17137 new_complete="$new_path ${arguments% *}"
17138 else
17139 new_complete="$new_path"
17140 fi
17141
17142 if test "x$complete" != "x$new_complete"; then
17143 FOUND_MAKE="$new_complete"
17144 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17145 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17146 fi
17147 fi
17148
17149 fi
17150 fi
17151 fi
17152 fi
17153
17154 if test "x$FOUND_MAKE" = x; then
17155 for ac_prog in make
17156 do
17157 # Extract the first word of "$ac_prog", so it can be a program name with args.
17158 set dummy $ac_prog; ac_word=$2
17159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17160 $as_echo_n "checking for $ac_word... " >&6; }
17161 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
17162 $as_echo_n "(cached) " >&6
17163 else
17164 case $CHECK_TOOLSDIR_MAKE in
17165 [\\/]* | ?:[\\/]*)
17166 ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
17167 ;;
17168 *)
17169 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17170 for as_dir in $PATH
17171 do
17172 IFS=$as_save_IFS
17173 test -z "$as_dir" && as_dir=.
17174 for ac_exec_ext in '' $ac_executable_extensions; do
17175 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17176 ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
17177 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17178 break 2
17179 fi
17180 done
17181 done
17182 IFS=$as_save_IFS
17183
17184 ;;
17185 esac
17186 fi
17187 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
17188 if test -n "$CHECK_TOOLSDIR_MAKE"; then
17189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
17190 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
17191 else
17192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17193 $as_echo "no" >&6; }
17194 fi
17195
17196
17197 test -n "$CHECK_TOOLSDIR_MAKE" && break
17198 done
17199
17200
17201 MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
17202 DESCRIPTION="make in tools-dir"
17203
17204 # On Cygwin, we require a newer version of make than on other platforms
17205 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17206 MAKE_VERSION_EXPR="-e 4\."
17207 MAKE_REQUIRED_VERSION="4.0"
17208 else
17209 MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17210 MAKE_REQUIRED_VERSION="3.81"
17211 fi
17212
17213 if test "x$MAKE_CANDIDATE" != x; then
17214 { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17215 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17216 MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17217 IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17218 if test "x$IS_GNU_MAKE" = x; then
17219 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17220 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17221 else
17222 IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17223 if test "x$IS_MODERN_MAKE" = x; then
17224 { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
17225 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
17226 else
17227 if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17228 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17229 MAKE_EXPECTED_ENV='cygwin'
17230 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17231 MAKE_EXPECTED_ENV='msys'
17232 else
17233 as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17234 fi
17235 MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17236 IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17237 else
17238 # Not relevant for non-Windows
17239 IS_MAKE_CORRECT_ENV=true
17240 fi
17241 if test "x$IS_MAKE_CORRECT_ENV" = x; then
17242 { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
17243 $as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
17244 else
17245 FOUND_MAKE=$MAKE_CANDIDATE
17246
17247 # Only process if variable expands to non-empty
17248
17249 if test "x$FOUND_MAKE" != x; then
17250 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17251
17252 # First separate the path from the arguments. This will split at the first
17253 # space.
17254 complete="$FOUND_MAKE"
17255 path="${complete%% *}"
17256 tmp="$complete EOL"
17257 arguments="${tmp#* }"
17258
17259 # Input might be given as Windows format, start by converting to
17260 # unix format.
17261 new_path=`$CYGPATH -u "$path"`
17262
17263 # Now try to locate executable using which
17264 new_path=`$WHICH "$new_path" 2> /dev/null`
17265 # bat and cmd files are not always considered executable in cygwin causing which
17266 # to not find them
17267 if test "x$new_path" = x \
17268 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17269 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17270 new_path=`$CYGPATH -u "$path"`
17271 fi
17272 if test "x$new_path" = x; then
17273 # Oops. Which didn't find the executable.
17274 # The splitting of arguments from the executable at a space might have been incorrect,
17275 # since paths with space are more likely in Windows. Give it another try with the whole
17276 # argument.
17277 path="$complete"
17278 arguments="EOL"
17279 new_path=`$CYGPATH -u "$path"`
17280 new_path=`$WHICH "$new_path" 2> /dev/null`
17281 # bat and cmd files are not always considered executable in cygwin causing which
17282 # to not find them
17283 if test "x$new_path" = x \
17284 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17285 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17286 new_path=`$CYGPATH -u "$path"`
17287 fi
17288 if test "x$new_path" = x; then
17289 # It's still not found. Now this is an unrecoverable error.
17290 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17291 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17292 has_space=`$ECHO "$complete" | $GREP " "`
17293 if test "x$has_space" != x; then
17294 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17295 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17296 fi
17297 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17298 fi
17299 fi
17300
17301 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17302 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17303 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17304 # "foo.exe" is OK but "foo" is an error.
17305 #
17306 # This test is therefore slightly more accurate than "test -f" to check for file presence.
17307 # It is also a way to make sure we got the proper file name for the real test later on.
17308 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17309 if test "x$test_shortpath" = x; then
17310 # Short path failed, file does not exist as specified.
17311 # Try adding .exe or .cmd
17312 if test -f "${new_path}.exe"; then
17313 input_to_shortpath="${new_path}.exe"
17314 elif test -f "${new_path}.cmd"; then
17315 input_to_shortpath="${new_path}.cmd"
17316 else
17317 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17318 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17319 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17320 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17321 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17322 fi
17323 else
17324 input_to_shortpath="$new_path"
17325 fi
17326
17327 # Call helper function which possibly converts this using DOS-style short mode.
17328 # If so, the updated path is stored in $new_path.
17329 new_path="$input_to_shortpath"
17330
17331 input_path="$input_to_shortpath"
17332 # Check if we need to convert this using DOS-style short mode. If the path
17333 # contains just simple characters, use it. Otherwise (spaces, weird characters),
17334 # take no chances and rewrite it.
17335 # Note: m4 eats our [], so we need to use [ and ] instead.
17336 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17337 if test "x$has_forbidden_chars" != x; then
17338 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17339 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17340 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17341 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17342 # Going to short mode and back again did indeed matter. Since short mode is
17343 # case insensitive, let's make it lowercase to improve readability.
17344 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17345 # Now convert it back to Unix-style (cygpath)
17346 input_path=`$CYGPATH -u "$shortmode_path"`
17347 new_path="$input_path"
17348 fi
17349 fi
17350
17351 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17352 if test "x$test_cygdrive_prefix" = x; then
17353 # As a simple fix, exclude /usr/bin since it's not a real path.
17354 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17355 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17356 # a path prefixed by /cygdrive for fixpath to work.
17357 new_path="$CYGWIN_ROOT_PATH$input_path"
17358 fi
17359 fi
17360
17361 # remove trailing .exe if any
17362 new_path="${new_path/%.exe/}"
17363
17364 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17365
17366 # First separate the path from the arguments. This will split at the first
17367 # space.
17368 complete="$FOUND_MAKE"
17369 path="${complete%% *}"
17370 tmp="$complete EOL"
17371 arguments="${tmp#* }"
17372
17373 # Input might be given as Windows format, start by converting to
17374 # unix format.
17375 new_path="$path"
17376
17377 windows_path="$new_path"
17378 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17379 unix_path=`$CYGPATH -u "$windows_path"`
17380 new_path="$unix_path"
17381 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17382 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17383 new_path="$unix_path"
17384 fi
17385
17386
17387 # Now try to locate executable using which
17388 new_path=`$WHICH "$new_path" 2> /dev/null`
17389
17390 if test "x$new_path" = x; then
17391 # Oops. Which didn't find the executable.
17392 # The splitting of arguments from the executable at a space might have been incorrect,
17393 # since paths with space are more likely in Windows. Give it another try with the whole
17394 # argument.
17395 path="$complete"
17396 arguments="EOL"
17397 new_path="$path"
17398
17399 windows_path="$new_path"
17400 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17401 unix_path=`$CYGPATH -u "$windows_path"`
17402 new_path="$unix_path"
17403 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17404 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17405 new_path="$unix_path"
17406 fi
17407
17408
17409 new_path=`$WHICH "$new_path" 2> /dev/null`
17410 # bat and cmd files are not always considered executable in MSYS causing which
17411 # to not find them
17412 if test "x$new_path" = x \
17413 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17414 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17415 new_path="$path"
17416
17417 windows_path="$new_path"
17418 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17419 unix_path=`$CYGPATH -u "$windows_path"`
17420 new_path="$unix_path"
17421 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17422 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17423 new_path="$unix_path"
17424 fi
17425
17426 fi
17427
17428 if test "x$new_path" = x; then
17429 # It's still not found. Now this is an unrecoverable error.
17430 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17431 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17432 has_space=`$ECHO "$complete" | $GREP " "`
17433 if test "x$has_space" != x; then
17434 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17435 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17436 fi
17437 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17438 fi
17439 fi
17440
17441 # Now new_path has a complete unix path to the binary
17442 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17443 # Keep paths in /bin as-is, but remove trailing .exe if any
17444 new_path="${new_path/%.exe/}"
17445 # Do not save /bin paths to all_fixpath_prefixes!
17446 else
17447 # Not in mixed or Windows style, start by that.
17448 new_path=`cmd //c echo $new_path`
17449
17450 input_path="$new_path"
17451 # Check if we need to convert this using DOS-style short mode. If the path
17452 # contains just simple characters, use it. Otherwise (spaces, weird characters),
17453 # take no chances and rewrite it.
17454 # Note: m4 eats our [], so we need to use [ and ] instead.
17455 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17456 if test "x$has_forbidden_chars" != x; then
17457 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17458 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17459 fi
17460
17461 # Output is in $new_path
17462
17463 windows_path="$new_path"
17464 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17465 unix_path=`$CYGPATH -u "$windows_path"`
17466 new_path="$unix_path"
17467 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17468 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17469 new_path="$unix_path"
17470 fi
17471
17472 # remove trailing .exe if any
17473 new_path="${new_path/%.exe/}"
17474
17475 # Save the first 10 bytes of this path to the storage, so fixpath can work.
17476 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17477 fi
17478
17479 else
17480 # We're on a unix platform. Hooray! :)
17481 # First separate the path from the arguments. This will split at the first
17482 # space.
17483 complete="$FOUND_MAKE"
17484 path="${complete%% *}"
17485 tmp="$complete EOL"
17486 arguments="${tmp#* }"
17487
17488 # Cannot rely on the command "which" here since it doesn't always work.
17489 is_absolute_path=`$ECHO "$path" | $GREP ^/`
17490 if test -z "$is_absolute_path"; then
17491 # Path to executable is not absolute. Find it.
17492 IFS_save="$IFS"
17493 IFS=:
17494 for p in $PATH; do
17495 if test -f "$p/$path" && test -x "$p/$path"; then
17496 new_path="$p/$path"
17497 break
17498 fi
17499 done
17500 IFS="$IFS_save"
17501 else
17502 # This is an absolute path, we can use it without further modifications.
17503 new_path="$path"
17504 fi
17505
17506 if test "x$new_path" = x; then
17507 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17508 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17509 has_space=`$ECHO "$complete" | $GREP " "`
17510 if test "x$has_space" != x; then
17511 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17512 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17513 fi
17514 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17515 fi
17516 fi
17517
17518 # Now join together the path and the arguments once again
17519 if test "x$arguments" != xEOL; then
17520 new_complete="$new_path ${arguments% *}"
17521 else
17522 new_complete="$new_path"
17523 fi
17524
17525 if test "x$complete" != "x$new_complete"; then
17526 FOUND_MAKE="$new_complete"
17527 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17528 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17529 fi
17530 fi
17531
17532 fi
17533 fi
17534 fi
17535 fi
17536
17537 fi
17538 PATH=$OLD_PATH
17539 fi
17540 fi
17541
17542 if test "x$FOUND_MAKE" = x; then
17543 as_fn_error $? "Cannot find GNU make $MAKE_REQUIRED_VERSION or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure." "$LINENO" 5
17544 fi
17545 fi
17546
17547 MAKE=$FOUND_MAKE
17548
17549 { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
17550 $as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
17551
17552
17553 # Check if make supports the output sync option and if so, setup using it.
17554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
17555 $as_echo_n "checking if make --output-sync is supported... " >&6; }
17556 if $MAKE --version -O > /dev/null 2>&1; then
17557 OUTPUT_SYNC_SUPPORTED=true
17558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17559 $as_echo "yes" >&6; }
17560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
17561 $as_echo_n "checking for output-sync value... " >&6; }
17562
17563 # Check whether --with-output-sync was given.
17564 if test "${with_output_sync+set}" = set; then :
17565 withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
17566 fi
17567
17568 if test "x$OUTPUT_SYNC" = "x"; then
17569 OUTPUT_SYNC=none
17570 fi
17571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
17572 $as_echo "$OUTPUT_SYNC" >&6; }
17573 if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
17574 as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
17575 fi
17576 else
17577 OUTPUT_SYNC_SUPPORTED=false
17578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17579 $as_echo "no" >&6; }
17580 fi
17581
17582
17583
17584
17585
17586
17587 # Test if find supports -delete
17588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
17589 $as_echo_n "checking if find supports -delete... " >&6; }
17590 FIND_DELETE="-delete"
17591
17592 DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
17593
17594 echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
17595
17596 TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
17597 if test -f $DELETEDIR/TestIfFindSupportsDelete; then
17598 # No, it does not.
17599 rm $DELETEDIR/TestIfFindSupportsDelete
17600 if test "x$OPENJDK_TARGET_OS" = "xaix"; then
17601 # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
17602 FIND_DELETE="-print | xargs rm"
17603 else
17604 FIND_DELETE="-exec rm \{\} \+"
17605 fi
17606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17607 $as_echo "no" >&6; }
17608 else
17609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17610 $as_echo "yes" >&6; }
17611 fi
17612 rmdir $DELETEDIR
17613
17614
17615
17616 # These tools might not be installed by default,
17617 # need hint on how to install them.
17618
17619
17620
17621 # Publish this variable in the help.
17622
17623
17624 if test "x$UNZIP" = x; then
17625 # The variable is not set by user, try to locate tool using the code snippet
17626 for ac_prog in unzip
17627 do
17628 # Extract the first word of "$ac_prog", so it can be a program name with args.
17629 set dummy $ac_prog; ac_word=$2
17630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17631 $as_echo_n "checking for $ac_word... " >&6; }
17632 if ${ac_cv_path_UNZIP+:} false; then :
17633 $as_echo_n "(cached) " >&6
17634 else
17635 case $UNZIP in
17636 [\\/]* | ?:[\\/]*)
17637 ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17638 ;;
17639 *)
17640 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17641 for as_dir in $PATH
17642 do
17643 IFS=$as_save_IFS
17644 test -z "$as_dir" && as_dir=.
17645 for ac_exec_ext in '' $ac_executable_extensions; do
17646 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17647 ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17648 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17649 break 2
17650 fi
17651 done
17652 done
17653 IFS=$as_save_IFS
17654
17655 ;;
17656 esac
17657 fi
17658 UNZIP=$ac_cv_path_UNZIP
17659 if test -n "$UNZIP"; then
17660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17661 $as_echo "$UNZIP" >&6; }
17662 else
17663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17664 $as_echo "no" >&6; }
17665 fi
17666
17667
17668 test -n "$UNZIP" && break
17669 done
17670
17671 else
17672 # The variable is set, but is it from the command line or the environment?
17673
17674 # Try to remove the string !UNZIP! from our list.
17675 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17676 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17677 # If it failed, the variable was not from the command line. Ignore it,
17678 # but warn the user (except for BASH, which is always set by the calling BASH).
17679 if test "xUNZIP" != xBASH; then
17680 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17681 $as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17682 fi
17683 # Try to locate tool using the code snippet
17684 for ac_prog in unzip
17685 do
17686 # Extract the first word of "$ac_prog", so it can be a program name with args.
17687 set dummy $ac_prog; ac_word=$2
17688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17689 $as_echo_n "checking for $ac_word... " >&6; }
17690 if ${ac_cv_path_UNZIP+:} false; then :
17691 $as_echo_n "(cached) " >&6
17692 else
17693 case $UNZIP in
17694 [\\/]* | ?:[\\/]*)
17695 ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17696 ;;
17697 *)
17698 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17699 for as_dir in $PATH
17700 do
17701 IFS=$as_save_IFS
17702 test -z "$as_dir" && as_dir=.
17703 for ac_exec_ext in '' $ac_executable_extensions; do
17704 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17705 ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17706 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17707 break 2
17708 fi
17709 done
17710 done
17711 IFS=$as_save_IFS
17712
17713 ;;
17714 esac
17715 fi
17716 UNZIP=$ac_cv_path_UNZIP
17717 if test -n "$UNZIP"; then
17718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17719 $as_echo "$UNZIP" >&6; }
17720 else
17721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17722 $as_echo "no" >&6; }
17723 fi
17724
17725
17726 test -n "$UNZIP" && break
17727 done
17728
17729 else
17730 # If it succeeded, then it was overridden by the user. We will use it
17731 # for the tool.
17732
17733 # First remove it from the list of overridden variables, so we can test
17734 # for unknown variables in the end.
17735 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17736
17737 # Check if the provided tool contains a complete path.
17738 tool_specified="$UNZIP"
17739 tool_basename="${tool_specified##*/}"
17740 if test "x$tool_basename" = "x$tool_specified"; then
17741 # A command without a complete path is provided, search $PATH.
17742 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17743 $as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17744 # Extract the first word of "$tool_basename", so it can be a program name with args.
17745 set dummy $tool_basename; ac_word=$2
17746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17747 $as_echo_n "checking for $ac_word... " >&6; }
17748 if ${ac_cv_path_UNZIP+:} false; then :
17749 $as_echo_n "(cached) " >&6
17750 else
17751 case $UNZIP in
17752 [\\/]* | ?:[\\/]*)
17753 ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17754 ;;
17755 *)
17756 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17757 for as_dir in $PATH
17758 do
17759 IFS=$as_save_IFS
17760 test -z "$as_dir" && as_dir=.
17761 for ac_exec_ext in '' $ac_executable_extensions; do
17762 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17763 ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17764 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17765 break 2
17766 fi
17767 done
17768 done
17769 IFS=$as_save_IFS
17770
17771 ;;
17772 esac
17773 fi
17774 UNZIP=$ac_cv_path_UNZIP
17775 if test -n "$UNZIP"; then
17776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17777 $as_echo "$UNZIP" >&6; }
17778 else
17779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17780 $as_echo "no" >&6; }
17781 fi
17782
17783
17784 if test "x$UNZIP" = x; then
17785 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17786 fi
17787 else
17788 # Otherwise we believe it is a complete path. Use it as it is.
17789 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17790 $as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17792 $as_echo_n "checking for UNZIP... " >&6; }
17793 if test ! -x "$tool_specified"; then
17794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17795 $as_echo "not found" >&6; }
17796 as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17797 fi
17798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17799 $as_echo "$tool_specified" >&6; }
17800 fi
17801 fi
17802 fi
17803
17804
17805
17806 if test "x$UNZIP" = x; then
17807 as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17808 fi
17809
17810
17811
17812
17813
17814 # Publish this variable in the help.
17815
17816
17817 if test "x$ZIP" = x; then
17818 # The variable is not set by user, try to locate tool using the code snippet
17819 for ac_prog in zip
17820 do
17821 # Extract the first word of "$ac_prog", so it can be a program name with args.
17822 set dummy $ac_prog; ac_word=$2
17823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17824 $as_echo_n "checking for $ac_word... " >&6; }
17825 if ${ac_cv_path_ZIP+:} false; then :
17826 $as_echo_n "(cached) " >&6
17827 else
17828 case $ZIP in
17829 [\\/]* | ?:[\\/]*)
17830 ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17831 ;;
17832 *)
17833 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17834 for as_dir in $PATH
17835 do
17836 IFS=$as_save_IFS
17837 test -z "$as_dir" && as_dir=.
17838 for ac_exec_ext in '' $ac_executable_extensions; do
17839 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17840 ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17841 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17842 break 2
17843 fi
17844 done
17845 done
17846 IFS=$as_save_IFS
17847
17848 ;;
17849 esac
17850 fi
17851 ZIP=$ac_cv_path_ZIP
17852 if test -n "$ZIP"; then
17853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17854 $as_echo "$ZIP" >&6; }
17855 else
17856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17857 $as_echo "no" >&6; }
17858 fi
17859
17860
17861 test -n "$ZIP" && break
17862 done
17863
17864 else
17865 # The variable is set, but is it from the command line or the environment?
17866
17867 # Try to remove the string !ZIP! from our list.
17868 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17869 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17870 # If it failed, the variable was not from the command line. Ignore it,
17871 # but warn the user (except for BASH, which is always set by the calling BASH).
17872 if test "xZIP" != xBASH; then
17873 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17874 $as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17875 fi
17876 # Try to locate tool using the code snippet
17877 for ac_prog in zip
17878 do
17879 # Extract the first word of "$ac_prog", so it can be a program name with args.
17880 set dummy $ac_prog; ac_word=$2
17881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17882 $as_echo_n "checking for $ac_word... " >&6; }
17883 if ${ac_cv_path_ZIP+:} false; then :
17884 $as_echo_n "(cached) " >&6
17885 else
17886 case $ZIP in
17887 [\\/]* | ?:[\\/]*)
17888 ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17889 ;;
17890 *)
17891 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17892 for as_dir in $PATH
17893 do
17894 IFS=$as_save_IFS
17895 test -z "$as_dir" && as_dir=.
17896 for ac_exec_ext in '' $ac_executable_extensions; do
17897 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17898 ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17899 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17900 break 2
17901 fi
17902 done
17903 done
17904 IFS=$as_save_IFS
17905
17906 ;;
17907 esac
17908 fi
17909 ZIP=$ac_cv_path_ZIP
17910 if test -n "$ZIP"; then
17911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17912 $as_echo "$ZIP" >&6; }
17913 else
17914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17915 $as_echo "no" >&6; }
17916 fi
17917
17918
17919 test -n "$ZIP" && break
17920 done
17921
17922 else
17923 # If it succeeded, then it was overridden by the user. We will use it
17924 # for the tool.
17925
17926 # First remove it from the list of overridden variables, so we can test
17927 # for unknown variables in the end.
17928 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17929
17930 # Check if the provided tool contains a complete path.
17931 tool_specified="$ZIP"
17932 tool_basename="${tool_specified##*/}"
17933 if test "x$tool_basename" = "x$tool_specified"; then
17934 # A command without a complete path is provided, search $PATH.
17935 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17936 $as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17937 # Extract the first word of "$tool_basename", so it can be a program name with args.
17938 set dummy $tool_basename; ac_word=$2
17939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17940 $as_echo_n "checking for $ac_word... " >&6; }
17941 if ${ac_cv_path_ZIP+:} false; then :
17942 $as_echo_n "(cached) " >&6
17943 else
17944 case $ZIP in
17945 [\\/]* | ?:[\\/]*)
17946 ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17947 ;;
17948 *)
17949 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17950 for as_dir in $PATH
17951 do
17952 IFS=$as_save_IFS
17953 test -z "$as_dir" && as_dir=.
17954 for ac_exec_ext in '' $ac_executable_extensions; do
17955 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17956 ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17957 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17958 break 2
17959 fi
17960 done
17961 done
17962 IFS=$as_save_IFS
17963
17964 ;;
17965 esac
17966 fi
17967 ZIP=$ac_cv_path_ZIP
17968 if test -n "$ZIP"; then
17969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17970 $as_echo "$ZIP" >&6; }
17971 else
17972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17973 $as_echo "no" >&6; }
17974 fi
17975
17976
17977 if test "x$ZIP" = x; then
17978 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17979 fi
17980 else
17981 # Otherwise we believe it is a complete path. Use it as it is.
17982 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17983 $as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17985 $as_echo_n "checking for ZIP... " >&6; }
17986 if test ! -x "$tool_specified"; then
17987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17988 $as_echo "not found" >&6; }
17989 as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17990 fi
17991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17992 $as_echo "$tool_specified" >&6; }
17993 fi
17994 fi
17995 fi
17996
17997
17998
17999 if test "x$ZIP" = x; then
18000 as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
18001 fi
18002
18003
18004
18005 # Non-required basic tools
18006
18007
18008
18009 # Publish this variable in the help.
18010
18011
18012 if test "x$LDD" = x; then
18013 # The variable is not set by user, try to locate tool using the code snippet
18014 for ac_prog in ldd
18015 do
18016 # Extract the first word of "$ac_prog", so it can be a program name with args.
18017 set dummy $ac_prog; ac_word=$2
18018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18019 $as_echo_n "checking for $ac_word... " >&6; }
18020 if ${ac_cv_path_LDD+:} false; then :
18021 $as_echo_n "(cached) " >&6
18022 else
18023 case $LDD in
18024 [\\/]* | ?:[\\/]*)
18025 ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
18026 ;;
18027 *)
18028 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18029 for as_dir in $PATH
18030 do
18031 IFS=$as_save_IFS
18032 test -z "$as_dir" && as_dir=.
18033 for ac_exec_ext in '' $ac_executable_extensions; do
18034 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18035 ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
18036 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18037 break 2
18038 fi
18039 done
18040 done
18041 IFS=$as_save_IFS
18042
18043 ;;
18044 esac
18045 fi
18046 LDD=$ac_cv_path_LDD
18047 if test -n "$LDD"; then
18048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
18049 $as_echo "$LDD" >&6; }
18050 else
18051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18052 $as_echo "no" >&6; }
18053 fi
18054
18055
18056 test -n "$LDD" && break
18057 done
18058
18059 else
18060 # The variable is set, but is it from the command line or the environment?
18061
18062 # Try to remove the string !LDD! from our list.
18063 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
18064 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18065 # If it failed, the variable was not from the command line. Ignore it,
18066 # but warn the user (except for BASH, which is always set by the calling BASH).
18067 if test "xLDD" != xBASH; then
18068 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
18069 $as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
18070 fi
18071 # Try to locate tool using the code snippet
18072 for ac_prog in ldd
18073 do
18074 # Extract the first word of "$ac_prog", so it can be a program name with args.
18075 set dummy $ac_prog; ac_word=$2
18076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18077 $as_echo_n "checking for $ac_word... " >&6; }
18078 if ${ac_cv_path_LDD+:} false; then :
18079 $as_echo_n "(cached) " >&6
18080 else
18081 case $LDD in
18082 [\\/]* | ?:[\\/]*)
18083 ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
18084 ;;
18085 *)
18086 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18087 for as_dir in $PATH
18088 do
18089 IFS=$as_save_IFS
18090 test -z "$as_dir" && as_dir=.
18091 for ac_exec_ext in '' $ac_executable_extensions; do
18092 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18093 ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
18094 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18095 break 2
18096 fi
18097 done
18098 done
18099 IFS=$as_save_IFS
18100
18101 ;;
18102 esac
18103 fi
18104 LDD=$ac_cv_path_LDD
18105 if test -n "$LDD"; then
18106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
18107 $as_echo "$LDD" >&6; }
18108 else
18109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18110 $as_echo "no" >&6; }
18111 fi
18112
18113
18114 test -n "$LDD" && break
18115 done
18116
18117 else
18118 # If it succeeded, then it was overridden by the user. We will use it
18119 # for the tool.
18120
18121 # First remove it from the list of overridden variables, so we can test
18122 # for unknown variables in the end.
18123 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18124
18125 # Check if the provided tool contains a complete path.
18126 tool_specified="$LDD"
18127 tool_basename="${tool_specified##*/}"
18128 if test "x$tool_basename" = "x$tool_specified"; then
18129 # A command without a complete path is provided, search $PATH.
18130 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
18131 $as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
18132 # Extract the first word of "$tool_basename", so it can be a program name with args.
18133 set dummy $tool_basename; ac_word=$2
18134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18135 $as_echo_n "checking for $ac_word... " >&6; }
18136 if ${ac_cv_path_LDD+:} false; then :
18137 $as_echo_n "(cached) " >&6
18138 else
18139 case $LDD in
18140 [\\/]* | ?:[\\/]*)
18141 ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
18142 ;;
18143 *)
18144 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18145 for as_dir in $PATH
18146 do
18147 IFS=$as_save_IFS
18148 test -z "$as_dir" && as_dir=.
18149 for ac_exec_ext in '' $ac_executable_extensions; do
18150 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18151 ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
18152 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18153 break 2
18154 fi
18155 done
18156 done
18157 IFS=$as_save_IFS
18158
18159 ;;
18160 esac
18161 fi
18162 LDD=$ac_cv_path_LDD
18163 if test -n "$LDD"; then
18164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
18165 $as_echo "$LDD" >&6; }
18166 else
18167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18168 $as_echo "no" >&6; }
18169 fi
18170
18171
18172 if test "x$LDD" = x; then
18173 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18174 fi
18175 else
18176 # Otherwise we believe it is a complete path. Use it as it is.
18177 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
18178 $as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
18179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
18180 $as_echo_n "checking for LDD... " >&6; }
18181 if test ! -x "$tool_specified"; then
18182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18183 $as_echo "not found" >&6; }
18184 as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
18185 fi
18186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18187 $as_echo "$tool_specified" >&6; }
18188 fi
18189 fi
18190 fi
18191
18192
18193 if test "x$LDD" = "x"; then
18194 # List shared lib dependencies is used for
18195 # debug output and checking for forbidden dependencies.
18196 # We can build without it.
18197 LDD="true"
18198 fi
18199
18200
18201 # Publish this variable in the help.
18202
18203
18204 if test "x$OTOOL" = x; then
18205 # The variable is not set by user, try to locate tool using the code snippet
18206 for ac_prog in otool
18207 do
18208 # Extract the first word of "$ac_prog", so it can be a program name with args.
18209 set dummy $ac_prog; ac_word=$2
18210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18211 $as_echo_n "checking for $ac_word... " >&6; }
18212 if ${ac_cv_path_OTOOL+:} false; then :
18213 $as_echo_n "(cached) " >&6
18214 else
18215 case $OTOOL in
18216 [\\/]* | ?:[\\/]*)
18217 ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18218 ;;
18219 *)
18220 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18221 for as_dir in $PATH
18222 do
18223 IFS=$as_save_IFS
18224 test -z "$as_dir" && as_dir=.
18225 for ac_exec_ext in '' $ac_executable_extensions; do
18226 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18227 ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18228 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18229 break 2
18230 fi
18231 done
18232 done
18233 IFS=$as_save_IFS
18234
18235 ;;
18236 esac
18237 fi
18238 OTOOL=$ac_cv_path_OTOOL
18239 if test -n "$OTOOL"; then
18240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18241 $as_echo "$OTOOL" >&6; }
18242 else
18243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18244 $as_echo "no" >&6; }
18245 fi
18246
18247
18248 test -n "$OTOOL" && break
18249 done
18250
18251 else
18252 # The variable is set, but is it from the command line or the environment?
18253
18254 # Try to remove the string !OTOOL! from our list.
18255 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
18256 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18257 # If it failed, the variable was not from the command line. Ignore it,
18258 # but warn the user (except for BASH, which is always set by the calling BASH).
18259 if test "xOTOOL" != xBASH; then
18260 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
18261 $as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
18262 fi
18263 # Try to locate tool using the code snippet
18264 for ac_prog in otool
18265 do
18266 # Extract the first word of "$ac_prog", so it can be a program name with args.
18267 set dummy $ac_prog; ac_word=$2
18268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18269 $as_echo_n "checking for $ac_word... " >&6; }
18270 if ${ac_cv_path_OTOOL+:} false; then :
18271 $as_echo_n "(cached) " >&6
18272 else
18273 case $OTOOL in
18274 [\\/]* | ?:[\\/]*)
18275 ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18276 ;;
18277 *)
18278 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18279 for as_dir in $PATH
18280 do
18281 IFS=$as_save_IFS
18282 test -z "$as_dir" && as_dir=.
18283 for ac_exec_ext in '' $ac_executable_extensions; do
18284 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18285 ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18286 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18287 break 2
18288 fi
18289 done
18290 done
18291 IFS=$as_save_IFS
18292
18293 ;;
18294 esac
18295 fi
18296 OTOOL=$ac_cv_path_OTOOL
18297 if test -n "$OTOOL"; then
18298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18299 $as_echo "$OTOOL" >&6; }
18300 else
18301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18302 $as_echo "no" >&6; }
18303 fi
18304
18305
18306 test -n "$OTOOL" && break
18307 done
18308
18309 else
18310 # If it succeeded, then it was overridden by the user. We will use it
18311 # for the tool.
18312
18313 # First remove it from the list of overridden variables, so we can test
18314 # for unknown variables in the end.
18315 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18316
18317 # Check if the provided tool contains a complete path.
18318 tool_specified="$OTOOL"
18319 tool_basename="${tool_specified##*/}"
18320 if test "x$tool_basename" = "x$tool_specified"; then
18321 # A command without a complete path is provided, search $PATH.
18322 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
18323 $as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
18324 # Extract the first word of "$tool_basename", so it can be a program name with args.
18325 set dummy $tool_basename; ac_word=$2
18326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18327 $as_echo_n "checking for $ac_word... " >&6; }
18328 if ${ac_cv_path_OTOOL+:} false; then :
18329 $as_echo_n "(cached) " >&6
18330 else
18331 case $OTOOL in
18332 [\\/]* | ?:[\\/]*)
18333 ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18334 ;;
18335 *)
18336 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18337 for as_dir in $PATH
18338 do
18339 IFS=$as_save_IFS
18340 test -z "$as_dir" && as_dir=.
18341 for ac_exec_ext in '' $ac_executable_extensions; do
18342 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18343 ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18344 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18345 break 2
18346 fi
18347 done
18348 done
18349 IFS=$as_save_IFS
18350
18351 ;;
18352 esac
18353 fi
18354 OTOOL=$ac_cv_path_OTOOL
18355 if test -n "$OTOOL"; then
18356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18357 $as_echo "$OTOOL" >&6; }
18358 else
18359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18360 $as_echo "no" >&6; }
18361 fi
18362
18363
18364 if test "x$OTOOL" = x; then
18365 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18366 fi
18367 else
18368 # Otherwise we believe it is a complete path. Use it as it is.
18369 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
18370 $as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
18371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
18372 $as_echo_n "checking for OTOOL... " >&6; }
18373 if test ! -x "$tool_specified"; then
18374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18375 $as_echo "not found" >&6; }
18376 as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
18377 fi
18378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18379 $as_echo "$tool_specified" >&6; }
18380 fi
18381 fi
18382 fi
18383
18384
18385 if test "x$OTOOL" = "x"; then
18386 OTOOL="true"
18387 fi
18388
18389
18390 # Publish this variable in the help.
18391
18392
18393 if test "x$READELF" = x; then
18394 # The variable is not set by user, try to locate tool using the code snippet
18395 for ac_prog in greadelf readelf
18396 do
18397 # Extract the first word of "$ac_prog", so it can be a program name with args.
18398 set dummy $ac_prog; ac_word=$2
18399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18400 $as_echo_n "checking for $ac_word... " >&6; }
18401 if ${ac_cv_path_READELF+:} false; then :
18402 $as_echo_n "(cached) " >&6
18403 else
18404 case $READELF in
18405 [\\/]* | ?:[\\/]*)
18406 ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18407 ;;
18408 *)
18409 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18410 for as_dir in $PATH
18411 do
18412 IFS=$as_save_IFS
18413 test -z "$as_dir" && as_dir=.
18414 for ac_exec_ext in '' $ac_executable_extensions; do
18415 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18416 ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18417 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18418 break 2
18419 fi
18420 done
18421 done
18422 IFS=$as_save_IFS
18423
18424 ;;
18425 esac
18426 fi
18427 READELF=$ac_cv_path_READELF
18428 if test -n "$READELF"; then
18429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18430 $as_echo "$READELF" >&6; }
18431 else
18432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18433 $as_echo "no" >&6; }
18434 fi
18435
18436
18437 test -n "$READELF" && break
18438 done
18439
18440 else
18441 # The variable is set, but is it from the command line or the environment?
18442
18443 # Try to remove the string !READELF! from our list.
18444 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
18445 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18446 # If it failed, the variable was not from the command line. Ignore it,
18447 # but warn the user (except for BASH, which is always set by the calling BASH).
18448 if test "xREADELF" != xBASH; then
18449 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
18450 $as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
18451 fi
18452 # Try to locate tool using the code snippet
18453 for ac_prog in greadelf readelf
18454 do
18455 # Extract the first word of "$ac_prog", so it can be a program name with args.
18456 set dummy $ac_prog; ac_word=$2
18457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18458 $as_echo_n "checking for $ac_word... " >&6; }
18459 if ${ac_cv_path_READELF+:} false; then :
18460 $as_echo_n "(cached) " >&6
18461 else
18462 case $READELF in
18463 [\\/]* | ?:[\\/]*)
18464 ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18465 ;;
18466 *)
18467 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18468 for as_dir in $PATH
18469 do
18470 IFS=$as_save_IFS
18471 test -z "$as_dir" && as_dir=.
18472 for ac_exec_ext in '' $ac_executable_extensions; do
18473 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18474 ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18475 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18476 break 2
18477 fi
18478 done
18479 done
18480 IFS=$as_save_IFS
18481
18482 ;;
18483 esac
18484 fi
18485 READELF=$ac_cv_path_READELF
18486 if test -n "$READELF"; then
18487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18488 $as_echo "$READELF" >&6; }
18489 else
18490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18491 $as_echo "no" >&6; }
18492 fi
18493
18494
18495 test -n "$READELF" && break
18496 done
18497
18498 else
18499 # If it succeeded, then it was overridden by the user. We will use it
18500 # for the tool.
18501
18502 # First remove it from the list of overridden variables, so we can test
18503 # for unknown variables in the end.
18504 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18505
18506 # Check if the provided tool contains a complete path.
18507 tool_specified="$READELF"
18508 tool_basename="${tool_specified##*/}"
18509 if test "x$tool_basename" = "x$tool_specified"; then
18510 # A command without a complete path is provided, search $PATH.
18511 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
18512 $as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
18513 # Extract the first word of "$tool_basename", so it can be a program name with args.
18514 set dummy $tool_basename; ac_word=$2
18515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18516 $as_echo_n "checking for $ac_word... " >&6; }
18517 if ${ac_cv_path_READELF+:} false; then :
18518 $as_echo_n "(cached) " >&6
18519 else
18520 case $READELF in
18521 [\\/]* | ?:[\\/]*)
18522 ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18523 ;;
18524 *)
18525 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18526 for as_dir in $PATH
18527 do
18528 IFS=$as_save_IFS
18529 test -z "$as_dir" && as_dir=.
18530 for ac_exec_ext in '' $ac_executable_extensions; do
18531 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18532 ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18533 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18534 break 2
18535 fi
18536 done
18537 done
18538 IFS=$as_save_IFS
18539
18540 ;;
18541 esac
18542 fi
18543 READELF=$ac_cv_path_READELF
18544 if test -n "$READELF"; then
18545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18546 $as_echo "$READELF" >&6; }
18547 else
18548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18549 $as_echo "no" >&6; }
18550 fi
18551
18552
18553 if test "x$READELF" = x; then
18554 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18555 fi
18556 else
18557 # Otherwise we believe it is a complete path. Use it as it is.
18558 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
18559 $as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
18560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
18561 $as_echo_n "checking for READELF... " >&6; }
18562 if test ! -x "$tool_specified"; then
18563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18564 $as_echo "not found" >&6; }
18565 as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
18566 fi
18567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18568 $as_echo "$tool_specified" >&6; }
18569 fi
18570 fi
18571 fi
18572
18573
18574
18575
18576 # Publish this variable in the help.
18577
18578
18579 if test "x$HG" = x; then
18580 # The variable is not set by user, try to locate tool using the code snippet
18581 for ac_prog in hg
18582 do
18583 # Extract the first word of "$ac_prog", so it can be a program name with args.
18584 set dummy $ac_prog; ac_word=$2
18585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18586 $as_echo_n "checking for $ac_word... " >&6; }
18587 if ${ac_cv_path_HG+:} false; then :
18588 $as_echo_n "(cached) " >&6
18589 else
18590 case $HG in
18591 [\\/]* | ?:[\\/]*)
18592 ac_cv_path_HG="$HG" # Let the user override the test with a path.
18593 ;;
18594 *)
18595 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18596 for as_dir in $PATH
18597 do
18598 IFS=$as_save_IFS
18599 test -z "$as_dir" && as_dir=.
18600 for ac_exec_ext in '' $ac_executable_extensions; do
18601 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18602 ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18603 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18604 break 2
18605 fi
18606 done
18607 done
18608 IFS=$as_save_IFS
18609
18610 ;;
18611 esac
18612 fi
18613 HG=$ac_cv_path_HG
18614 if test -n "$HG"; then
18615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18616 $as_echo "$HG" >&6; }
18617 else
18618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18619 $as_echo "no" >&6; }
18620 fi
18621
18622
18623 test -n "$HG" && break
18624 done
18625
18626 else
18627 # The variable is set, but is it from the command line or the environment?
18628
18629 # Try to remove the string !HG! from our list.
18630 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
18631 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18632 # If it failed, the variable was not from the command line. Ignore it,
18633 # but warn the user (except for BASH, which is always set by the calling BASH).
18634 if test "xHG" != xBASH; then
18635 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
18636 $as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
18637 fi
18638 # Try to locate tool using the code snippet
18639 for ac_prog in hg
18640 do
18641 # Extract the first word of "$ac_prog", so it can be a program name with args.
18642 set dummy $ac_prog; ac_word=$2
18643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18644 $as_echo_n "checking for $ac_word... " >&6; }
18645 if ${ac_cv_path_HG+:} false; then :
18646 $as_echo_n "(cached) " >&6
18647 else
18648 case $HG in
18649 [\\/]* | ?:[\\/]*)
18650 ac_cv_path_HG="$HG" # Let the user override the test with a path.
18651 ;;
18652 *)
18653 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18654 for as_dir in $PATH
18655 do
18656 IFS=$as_save_IFS
18657 test -z "$as_dir" && as_dir=.
18658 for ac_exec_ext in '' $ac_executable_extensions; do
18659 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18660 ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18661 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18662 break 2
18663 fi
18664 done
18665 done
18666 IFS=$as_save_IFS
18667
18668 ;;
18669 esac
18670 fi
18671 HG=$ac_cv_path_HG
18672 if test -n "$HG"; then
18673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18674 $as_echo "$HG" >&6; }
18675 else
18676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18677 $as_echo "no" >&6; }
18678 fi
18679
18680
18681 test -n "$HG" && break
18682 done
18683
18684 else
18685 # If it succeeded, then it was overridden by the user. We will use it
18686 # for the tool.
18687
18688 # First remove it from the list of overridden variables, so we can test
18689 # for unknown variables in the end.
18690 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18691
18692 # Check if the provided tool contains a complete path.
18693 tool_specified="$HG"
18694 tool_basename="${tool_specified##*/}"
18695 if test "x$tool_basename" = "x$tool_specified"; then
18696 # A command without a complete path is provided, search $PATH.
18697 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
18698 $as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
18699 # Extract the first word of "$tool_basename", so it can be a program name with args.
18700 set dummy $tool_basename; ac_word=$2
18701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18702 $as_echo_n "checking for $ac_word... " >&6; }
18703 if ${ac_cv_path_HG+:} false; then :
18704 $as_echo_n "(cached) " >&6
18705 else
18706 case $HG in
18707 [\\/]* | ?:[\\/]*)
18708 ac_cv_path_HG="$HG" # Let the user override the test with a path.
18709 ;;
18710 *)
18711 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18712 for as_dir in $PATH
18713 do
18714 IFS=$as_save_IFS
18715 test -z "$as_dir" && as_dir=.
18716 for ac_exec_ext in '' $ac_executable_extensions; do
18717 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18718 ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18719 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18720 break 2
18721 fi
18722 done
18723 done
18724 IFS=$as_save_IFS
18725
18726 ;;
18727 esac
18728 fi
18729 HG=$ac_cv_path_HG
18730 if test -n "$HG"; then
18731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18732 $as_echo "$HG" >&6; }
18733 else
18734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18735 $as_echo "no" >&6; }
18736 fi
18737
18738
18739 if test "x$HG" = x; then
18740 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18741 fi
18742 else
18743 # Otherwise we believe it is a complete path. Use it as it is.
18744 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
18745 $as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18747 $as_echo_n "checking for HG... " >&6; }
18748 if test ! -x "$tool_specified"; then
18749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18750 $as_echo "not found" >&6; }
18751 as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
18752 fi
18753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18754 $as_echo "$tool_specified" >&6; }
18755 fi
18756 fi
18757 fi
18758
18759
18760
18761
18762 # Publish this variable in the help.
18763
18764
18765 if test "x$STAT" = x; then
18766 # The variable is not set by user, try to locate tool using the code snippet
18767 for ac_prog in stat
18768 do
18769 # Extract the first word of "$ac_prog", so it can be a program name with args.
18770 set dummy $ac_prog; ac_word=$2
18771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18772 $as_echo_n "checking for $ac_word... " >&6; }
18773 if ${ac_cv_path_STAT+:} false; then :
18774 $as_echo_n "(cached) " >&6
18775 else
18776 case $STAT in
18777 [\\/]* | ?:[\\/]*)
18778 ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18779 ;;
18780 *)
18781 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18782 for as_dir in $PATH
18783 do
18784 IFS=$as_save_IFS
18785 test -z "$as_dir" && as_dir=.
18786 for ac_exec_ext in '' $ac_executable_extensions; do
18787 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18788 ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18789 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18790 break 2
18791 fi
18792 done
18793 done
18794 IFS=$as_save_IFS
18795
18796 ;;
18797 esac
18798 fi
18799 STAT=$ac_cv_path_STAT
18800 if test -n "$STAT"; then
18801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18802 $as_echo "$STAT" >&6; }
18803 else
18804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18805 $as_echo "no" >&6; }
18806 fi
18807
18808
18809 test -n "$STAT" && break
18810 done
18811
18812 else
18813 # The variable is set, but is it from the command line or the environment?
18814
18815 # Try to remove the string !STAT! from our list.
18816 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18817 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18818 # If it failed, the variable was not from the command line. Ignore it,
18819 # but warn the user (except for BASH, which is always set by the calling BASH).
18820 if test "xSTAT" != xBASH; then
18821 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18822 $as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18823 fi
18824 # Try to locate tool using the code snippet
18825 for ac_prog in stat
18826 do
18827 # Extract the first word of "$ac_prog", so it can be a program name with args.
18828 set dummy $ac_prog; ac_word=$2
18829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18830 $as_echo_n "checking for $ac_word... " >&6; }
18831 if ${ac_cv_path_STAT+:} false; then :
18832 $as_echo_n "(cached) " >&6
18833 else
18834 case $STAT in
18835 [\\/]* | ?:[\\/]*)
18836 ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18837 ;;
18838 *)
18839 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18840 for as_dir in $PATH
18841 do
18842 IFS=$as_save_IFS
18843 test -z "$as_dir" && as_dir=.
18844 for ac_exec_ext in '' $ac_executable_extensions; do
18845 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18846 ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18847 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18848 break 2
18849 fi
18850 done
18851 done
18852 IFS=$as_save_IFS
18853
18854 ;;
18855 esac
18856 fi
18857 STAT=$ac_cv_path_STAT
18858 if test -n "$STAT"; then
18859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18860 $as_echo "$STAT" >&6; }
18861 else
18862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18863 $as_echo "no" >&6; }
18864 fi
18865
18866
18867 test -n "$STAT" && break
18868 done
18869
18870 else
18871 # If it succeeded, then it was overridden by the user. We will use it
18872 # for the tool.
18873
18874 # First remove it from the list of overridden variables, so we can test
18875 # for unknown variables in the end.
18876 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18877
18878 # Check if the provided tool contains a complete path.
18879 tool_specified="$STAT"
18880 tool_basename="${tool_specified##*/}"
18881 if test "x$tool_basename" = "x$tool_specified"; then
18882 # A command without a complete path is provided, search $PATH.
18883 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18884 $as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18885 # Extract the first word of "$tool_basename", so it can be a program name with args.
18886 set dummy $tool_basename; ac_word=$2
18887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18888 $as_echo_n "checking for $ac_word... " >&6; }
18889 if ${ac_cv_path_STAT+:} false; then :
18890 $as_echo_n "(cached) " >&6
18891 else
18892 case $STAT in
18893 [\\/]* | ?:[\\/]*)
18894 ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18895 ;;
18896 *)
18897 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18898 for as_dir in $PATH
18899 do
18900 IFS=$as_save_IFS
18901 test -z "$as_dir" && as_dir=.
18902 for ac_exec_ext in '' $ac_executable_extensions; do
18903 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18904 ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18905 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18906 break 2
18907 fi
18908 done
18909 done
18910 IFS=$as_save_IFS
18911
18912 ;;
18913 esac
18914 fi
18915 STAT=$ac_cv_path_STAT
18916 if test -n "$STAT"; then
18917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18918 $as_echo "$STAT" >&6; }
18919 else
18920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18921 $as_echo "no" >&6; }
18922 fi
18923
18924
18925 if test "x$STAT" = x; then
18926 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18927 fi
18928 else
18929 # Otherwise we believe it is a complete path. Use it as it is.
18930 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18931 $as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18933 $as_echo_n "checking for STAT... " >&6; }
18934 if test ! -x "$tool_specified"; then
18935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18936 $as_echo "not found" >&6; }
18937 as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18938 fi
18939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18940 $as_echo "$tool_specified" >&6; }
18941 fi
18942 fi
18943 fi
18944
18945
18946
18947
18948 # Publish this variable in the help.
18949
18950
18951 if test "x$TIME" = x; then
18952 # The variable is not set by user, try to locate tool using the code snippet
18953 for ac_prog in time
18954 do
18955 # Extract the first word of "$ac_prog", so it can be a program name with args.
18956 set dummy $ac_prog; ac_word=$2
18957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18958 $as_echo_n "checking for $ac_word... " >&6; }
18959 if ${ac_cv_path_TIME+:} false; then :
18960 $as_echo_n "(cached) " >&6
18961 else
18962 case $TIME in
18963 [\\/]* | ?:[\\/]*)
18964 ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18965 ;;
18966 *)
18967 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18968 for as_dir in $PATH
18969 do
18970 IFS=$as_save_IFS
18971 test -z "$as_dir" && as_dir=.
18972 for ac_exec_ext in '' $ac_executable_extensions; do
18973 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18974 ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18975 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18976 break 2
18977 fi
18978 done
18979 done
18980 IFS=$as_save_IFS
18981
18982 ;;
18983 esac
18984 fi
18985 TIME=$ac_cv_path_TIME
18986 if test -n "$TIME"; then
18987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18988 $as_echo "$TIME" >&6; }
18989 else
18990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18991 $as_echo "no" >&6; }
18992 fi
18993
18994
18995 test -n "$TIME" && break
18996 done
18997
18998 else
18999 # The variable is set, but is it from the command line or the environment?
19000
19001 # Try to remove the string !TIME! from our list.
19002 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
19003 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19004 # If it failed, the variable was not from the command line. Ignore it,
19005 # but warn the user (except for BASH, which is always set by the calling BASH).
19006 if test "xTIME" != xBASH; then
19007 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
19008 $as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
19009 fi
19010 # Try to locate tool using the code snippet
19011 for ac_prog in time
19012 do
19013 # Extract the first word of "$ac_prog", so it can be a program name with args.
19014 set dummy $ac_prog; ac_word=$2
19015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19016 $as_echo_n "checking for $ac_word... " >&6; }
19017 if ${ac_cv_path_TIME+:} false; then :
19018 $as_echo_n "(cached) " >&6
19019 else
19020 case $TIME in
19021 [\\/]* | ?:[\\/]*)
19022 ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
19023 ;;
19024 *)
19025 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19026 for as_dir in $PATH
19027 do
19028 IFS=$as_save_IFS
19029 test -z "$as_dir" && as_dir=.
19030 for ac_exec_ext in '' $ac_executable_extensions; do
19031 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19032 ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
19033 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19034 break 2
19035 fi
19036 done
19037 done
19038 IFS=$as_save_IFS
19039
19040 ;;
19041 esac
19042 fi
19043 TIME=$ac_cv_path_TIME
19044 if test -n "$TIME"; then
19045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
19046 $as_echo "$TIME" >&6; }
19047 else
19048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19049 $as_echo "no" >&6; }
19050 fi
19051
19052
19053 test -n "$TIME" && break
19054 done
19055
19056 else
19057 # If it succeeded, then it was overridden by the user. We will use it
19058 # for the tool.
19059
19060 # First remove it from the list of overridden variables, so we can test
19061 # for unknown variables in the end.
19062 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19063
19064 # Check if the provided tool contains a complete path.
19065 tool_specified="$TIME"
19066 tool_basename="${tool_specified##*/}"
19067 if test "x$tool_basename" = "x$tool_specified"; then
19068 # A command without a complete path is provided, search $PATH.
19069 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
19070 $as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
19071 # Extract the first word of "$tool_basename", so it can be a program name with args.
19072 set dummy $tool_basename; ac_word=$2
19073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19074 $as_echo_n "checking for $ac_word... " >&6; }
19075 if ${ac_cv_path_TIME+:} false; then :
19076 $as_echo_n "(cached) " >&6
19077 else
19078 case $TIME in
19079 [\\/]* | ?:[\\/]*)
19080 ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
19081 ;;
19082 *)
19083 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19084 for as_dir in $PATH
19085 do
19086 IFS=$as_save_IFS
19087 test -z "$as_dir" && as_dir=.
19088 for ac_exec_ext in '' $ac_executable_extensions; do
19089 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19090 ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
19091 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19092 break 2
19093 fi
19094 done
19095 done
19096 IFS=$as_save_IFS
19097
19098 ;;
19099 esac
19100 fi
19101 TIME=$ac_cv_path_TIME
19102 if test -n "$TIME"; then
19103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
19104 $as_echo "$TIME" >&6; }
19105 else
19106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19107 $as_echo "no" >&6; }
19108 fi
19109
19110
19111 if test "x$TIME" = x; then
19112 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19113 fi
19114 else
19115 # Otherwise we believe it is a complete path. Use it as it is.
19116 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
19117 $as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
19118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
19119 $as_echo_n "checking for TIME... " >&6; }
19120 if test ! -x "$tool_specified"; then
19121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19122 $as_echo "not found" >&6; }
19123 as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
19124 fi
19125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19126 $as_echo "$tool_specified" >&6; }
19127 fi
19128 fi
19129 fi
19130
19131
19132 # Check if it's GNU time
19133 IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
19134 if test "x$IS_GNU_TIME" != x; then
19135 IS_GNU_TIME=yes
19136 else
19137 IS_GNU_TIME=no
19138 fi
19139
19140
19141 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
19142
19143
19144
19145 # Publish this variable in the help.
19146
19147
19148 if test "x$DSYMUTIL" = x; then
19149 # The variable is not set by user, try to locate tool using the code snippet
19150 for ac_prog in dsymutil
19151 do
19152 # Extract the first word of "$ac_prog", so it can be a program name with args.
19153 set dummy $ac_prog; ac_word=$2
19154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19155 $as_echo_n "checking for $ac_word... " >&6; }
19156 if ${ac_cv_path_DSYMUTIL+:} false; then :
19157 $as_echo_n "(cached) " >&6
19158 else
19159 case $DSYMUTIL in
19160 [\\/]* | ?:[\\/]*)
19161 ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19162 ;;
19163 *)
19164 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19165 for as_dir in $PATH
19166 do
19167 IFS=$as_save_IFS
19168 test -z "$as_dir" && as_dir=.
19169 for ac_exec_ext in '' $ac_executable_extensions; do
19170 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19171 ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19172 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19173 break 2
19174 fi
19175 done
19176 done
19177 IFS=$as_save_IFS
19178
19179 ;;
19180 esac
19181 fi
19182 DSYMUTIL=$ac_cv_path_DSYMUTIL
19183 if test -n "$DSYMUTIL"; then
19184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19185 $as_echo "$DSYMUTIL" >&6; }
19186 else
19187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19188 $as_echo "no" >&6; }
19189 fi
19190
19191
19192 test -n "$DSYMUTIL" && break
19193 done
19194
19195 else
19196 # The variable is set, but is it from the command line or the environment?
19197
19198 # Try to remove the string !DSYMUTIL! from our list.
19199 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
19200 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19201 # If it failed, the variable was not from the command line. Ignore it,
19202 # but warn the user (except for BASH, which is always set by the calling BASH).
19203 if test "xDSYMUTIL" != xBASH; then
19204 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
19205 $as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
19206 fi
19207 # Try to locate tool using the code snippet
19208 for ac_prog in dsymutil
19209 do
19210 # Extract the first word of "$ac_prog", so it can be a program name with args.
19211 set dummy $ac_prog; ac_word=$2
19212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19213 $as_echo_n "checking for $ac_word... " >&6; }
19214 if ${ac_cv_path_DSYMUTIL+:} false; then :
19215 $as_echo_n "(cached) " >&6
19216 else
19217 case $DSYMUTIL in
19218 [\\/]* | ?:[\\/]*)
19219 ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19220 ;;
19221 *)
19222 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19223 for as_dir in $PATH
19224 do
19225 IFS=$as_save_IFS
19226 test -z "$as_dir" && as_dir=.
19227 for ac_exec_ext in '' $ac_executable_extensions; do
19228 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19229 ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19230 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19231 break 2
19232 fi
19233 done
19234 done
19235 IFS=$as_save_IFS
19236
19237 ;;
19238 esac
19239 fi
19240 DSYMUTIL=$ac_cv_path_DSYMUTIL
19241 if test -n "$DSYMUTIL"; then
19242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19243 $as_echo "$DSYMUTIL" >&6; }
19244 else
19245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19246 $as_echo "no" >&6; }
19247 fi
19248
19249
19250 test -n "$DSYMUTIL" && break
19251 done
19252
19253 else
19254 # If it succeeded, then it was overridden by the user. We will use it
19255 # for the tool.
19256
19257 # First remove it from the list of overridden variables, so we can test
19258 # for unknown variables in the end.
19259 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19260
19261 # Check if the provided tool contains a complete path.
19262 tool_specified="$DSYMUTIL"
19263 tool_basename="${tool_specified##*/}"
19264 if test "x$tool_basename" = "x$tool_specified"; then
19265 # A command without a complete path is provided, search $PATH.
19266 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
19267 $as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
19268 # Extract the first word of "$tool_basename", so it can be a program name with args.
19269 set dummy $tool_basename; ac_word=$2
19270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19271 $as_echo_n "checking for $ac_word... " >&6; }
19272 if ${ac_cv_path_DSYMUTIL+:} false; then :
19273 $as_echo_n "(cached) " >&6
19274 else
19275 case $DSYMUTIL in
19276 [\\/]* | ?:[\\/]*)
19277 ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19278 ;;
19279 *)
19280 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19281 for as_dir in $PATH
19282 do
19283 IFS=$as_save_IFS
19284 test -z "$as_dir" && as_dir=.
19285 for ac_exec_ext in '' $ac_executable_extensions; do
19286 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19287 ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19288 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19289 break 2
19290 fi
19291 done
19292 done
19293 IFS=$as_save_IFS
19294
19295 ;;
19296 esac
19297 fi
19298 DSYMUTIL=$ac_cv_path_DSYMUTIL
19299 if test -n "$DSYMUTIL"; then
19300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19301 $as_echo "$DSYMUTIL" >&6; }
19302 else
19303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19304 $as_echo "no" >&6; }
19305 fi
19306
19307
19308 if test "x$DSYMUTIL" = x; then
19309 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19310 fi
19311 else
19312 # Otherwise we believe it is a complete path. Use it as it is.
19313 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
19314 $as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
19315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
19316 $as_echo_n "checking for DSYMUTIL... " >&6; }
19317 if test ! -x "$tool_specified"; then
19318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19319 $as_echo "not found" >&6; }
19320 as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
19321 fi
19322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19323 $as_echo "$tool_specified" >&6; }
19324 fi
19325 fi
19326 fi
19327
19328
19329
19330 if test "x$DSYMUTIL" = x; then
19331 as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
19332 fi
19333
19334
19335
19336
19337
19338 # Publish this variable in the help.
19339
19340
19341 if test "x$XATTR" = x; then
19342 # The variable is not set by user, try to locate tool using the code snippet
19343 for ac_prog in xattr
19344 do
19345 # Extract the first word of "$ac_prog", so it can be a program name with args.
19346 set dummy $ac_prog; ac_word=$2
19347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19348 $as_echo_n "checking for $ac_word... " >&6; }
19349 if ${ac_cv_path_XATTR+:} false; then :
19350 $as_echo_n "(cached) " >&6
19351 else
19352 case $XATTR in
19353 [\\/]* | ?:[\\/]*)
19354 ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19355 ;;
19356 *)
19357 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19358 for as_dir in $PATH
19359 do
19360 IFS=$as_save_IFS
19361 test -z "$as_dir" && as_dir=.
19362 for ac_exec_ext in '' $ac_executable_extensions; do
19363 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19364 ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19365 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19366 break 2
19367 fi
19368 done
19369 done
19370 IFS=$as_save_IFS
19371
19372 ;;
19373 esac
19374 fi
19375 XATTR=$ac_cv_path_XATTR
19376 if test -n "$XATTR"; then
19377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19378 $as_echo "$XATTR" >&6; }
19379 else
19380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19381 $as_echo "no" >&6; }
19382 fi
19383
19384
19385 test -n "$XATTR" && break
19386 done
19387
19388 else
19389 # The variable is set, but is it from the command line or the environment?
19390
19391 # Try to remove the string !XATTR! from our list.
19392 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
19393 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19394 # If it failed, the variable was not from the command line. Ignore it,
19395 # but warn the user (except for BASH, which is always set by the calling BASH).
19396 if test "xXATTR" != xBASH; then
19397 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
19398 $as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
19399 fi
19400 # Try to locate tool using the code snippet
19401 for ac_prog in xattr
19402 do
19403 # Extract the first word of "$ac_prog", so it can be a program name with args.
19404 set dummy $ac_prog; ac_word=$2
19405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19406 $as_echo_n "checking for $ac_word... " >&6; }
19407 if ${ac_cv_path_XATTR+:} false; then :
19408 $as_echo_n "(cached) " >&6
19409 else
19410 case $XATTR in
19411 [\\/]* | ?:[\\/]*)
19412 ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19413 ;;
19414 *)
19415 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19416 for as_dir in $PATH
19417 do
19418 IFS=$as_save_IFS
19419 test -z "$as_dir" && as_dir=.
19420 for ac_exec_ext in '' $ac_executable_extensions; do
19421 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19422 ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19423 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19424 break 2
19425 fi
19426 done
19427 done
19428 IFS=$as_save_IFS
19429
19430 ;;
19431 esac
19432 fi
19433 XATTR=$ac_cv_path_XATTR
19434 if test -n "$XATTR"; then
19435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19436 $as_echo "$XATTR" >&6; }
19437 else
19438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19439 $as_echo "no" >&6; }
19440 fi
19441
19442
19443 test -n "$XATTR" && break
19444 done
19445
19446 else
19447 # If it succeeded, then it was overridden by the user. We will use it
19448 # for the tool.
19449
19450 # First remove it from the list of overridden variables, so we can test
19451 # for unknown variables in the end.
19452 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19453
19454 # Check if the provided tool contains a complete path.
19455 tool_specified="$XATTR"
19456 tool_basename="${tool_specified##*/}"
19457 if test "x$tool_basename" = "x$tool_specified"; then
19458 # A command without a complete path is provided, search $PATH.
19459 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19460 $as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19461 # Extract the first word of "$tool_basename", so it can be a program name with args.
19462 set dummy $tool_basename; ac_word=$2
19463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19464 $as_echo_n "checking for $ac_word... " >&6; }
19465 if ${ac_cv_path_XATTR+:} false; then :
19466 $as_echo_n "(cached) " >&6
19467 else
19468 case $XATTR in
19469 [\\/]* | ?:[\\/]*)
19470 ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19471 ;;
19472 *)
19473 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19474 for as_dir in $PATH
19475 do
19476 IFS=$as_save_IFS
19477 test -z "$as_dir" && as_dir=.
19478 for ac_exec_ext in '' $ac_executable_extensions; do
19479 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19480 ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19481 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19482 break 2
19483 fi
19484 done
19485 done
19486 IFS=$as_save_IFS
19487
19488 ;;
19489 esac
19490 fi
19491 XATTR=$ac_cv_path_XATTR
19492 if test -n "$XATTR"; then
19493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19494 $as_echo "$XATTR" >&6; }
19495 else
19496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19497 $as_echo "no" >&6; }
19498 fi
19499
19500
19501 if test "x$XATTR" = x; then
19502 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19503 fi
19504 else
19505 # Otherwise we believe it is a complete path. Use it as it is.
19506 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19507 $as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19509 $as_echo_n "checking for XATTR... " >&6; }
19510 if test ! -x "$tool_specified"; then
19511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19512 $as_echo "not found" >&6; }
19513 as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19514 fi
19515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19516 $as_echo "$tool_specified" >&6; }
19517 fi
19518 fi
19519 fi
19520
19521
19522
19523 if test "x$XATTR" = x; then
19524 as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19525 fi
19526
19527
19528
19529
19530 # Publish this variable in the help.
19531
19532
19533 if test "x$CODESIGN" = x; then
19534 # The variable is not set by user, try to locate tool using the code snippet
19535 for ac_prog in codesign
19536 do
19537 # Extract the first word of "$ac_prog", so it can be a program name with args.
19538 set dummy $ac_prog; ac_word=$2
19539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19540 $as_echo_n "checking for $ac_word... " >&6; }
19541 if ${ac_cv_path_CODESIGN+:} false; then :
19542 $as_echo_n "(cached) " >&6
19543 else
19544 case $CODESIGN in
19545 [\\/]* | ?:[\\/]*)
19546 ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19547 ;;
19548 *)
19549 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19550 for as_dir in $PATH
19551 do
19552 IFS=$as_save_IFS
19553 test -z "$as_dir" && as_dir=.
19554 for ac_exec_ext in '' $ac_executable_extensions; do
19555 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19556 ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19557 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19558 break 2
19559 fi
19560 done
19561 done
19562 IFS=$as_save_IFS
19563
19564 ;;
19565 esac
19566 fi
19567 CODESIGN=$ac_cv_path_CODESIGN
19568 if test -n "$CODESIGN"; then
19569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19570 $as_echo "$CODESIGN" >&6; }
19571 else
19572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19573 $as_echo "no" >&6; }
19574 fi
19575
19576
19577 test -n "$CODESIGN" && break
19578 done
19579
19580 else
19581 # The variable is set, but is it from the command line or the environment?
19582
19583 # Try to remove the string !CODESIGN! from our list.
19584 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19585 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19586 # If it failed, the variable was not from the command line. Ignore it,
19587 # but warn the user (except for BASH, which is always set by the calling BASH).
19588 if test "xCODESIGN" != xBASH; then
19589 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19590 $as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19591 fi
19592 # Try to locate tool using the code snippet
19593 for ac_prog in codesign
19594 do
19595 # Extract the first word of "$ac_prog", so it can be a program name with args.
19596 set dummy $ac_prog; ac_word=$2
19597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19598 $as_echo_n "checking for $ac_word... " >&6; }
19599 if ${ac_cv_path_CODESIGN+:} false; then :
19600 $as_echo_n "(cached) " >&6
19601 else
19602 case $CODESIGN in
19603 [\\/]* | ?:[\\/]*)
19604 ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19605 ;;
19606 *)
19607 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19608 for as_dir in $PATH
19609 do
19610 IFS=$as_save_IFS
19611 test -z "$as_dir" && as_dir=.
19612 for ac_exec_ext in '' $ac_executable_extensions; do
19613 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19614 ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19615 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19616 break 2
19617 fi
19618 done
19619 done
19620 IFS=$as_save_IFS
19621
19622 ;;
19623 esac
19624 fi
19625 CODESIGN=$ac_cv_path_CODESIGN
19626 if test -n "$CODESIGN"; then
19627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19628 $as_echo "$CODESIGN" >&6; }
19629 else
19630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19631 $as_echo "no" >&6; }
19632 fi
19633
19634
19635 test -n "$CODESIGN" && break
19636 done
19637
19638 else
19639 # If it succeeded, then it was overridden by the user. We will use it
19640 # for the tool.
19641
19642 # First remove it from the list of overridden variables, so we can test
19643 # for unknown variables in the end.
19644 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19645
19646 # Check if the provided tool contains a complete path.
19647 tool_specified="$CODESIGN"
19648 tool_basename="${tool_specified##*/}"
19649 if test "x$tool_basename" = "x$tool_specified"; then
19650 # A command without a complete path is provided, search $PATH.
19651 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19652 $as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19653 # Extract the first word of "$tool_basename", so it can be a program name with args.
19654 set dummy $tool_basename; ac_word=$2
19655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19656 $as_echo_n "checking for $ac_word... " >&6; }
19657 if ${ac_cv_path_CODESIGN+:} false; then :
19658 $as_echo_n "(cached) " >&6
19659 else
19660 case $CODESIGN in
19661 [\\/]* | ?:[\\/]*)
19662 ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19663 ;;
19664 *)
19665 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19666 for as_dir in $PATH
19667 do
19668 IFS=$as_save_IFS
19669 test -z "$as_dir" && as_dir=.
19670 for ac_exec_ext in '' $ac_executable_extensions; do
19671 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19672 ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19673 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19674 break 2
19675 fi
19676 done
19677 done
19678 IFS=$as_save_IFS
19679
19680 ;;
19681 esac
19682 fi
19683 CODESIGN=$ac_cv_path_CODESIGN
19684 if test -n "$CODESIGN"; then
19685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19686 $as_echo "$CODESIGN" >&6; }
19687 else
19688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19689 $as_echo "no" >&6; }
19690 fi
19691
19692
19693 if test "x$CODESIGN" = x; then
19694 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19695 fi
19696 else
19697 # Otherwise we believe it is a complete path. Use it as it is.
19698 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19699 $as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19701 $as_echo_n "checking for CODESIGN... " >&6; }
19702 if test ! -x "$tool_specified"; then
19703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19704 $as_echo "not found" >&6; }
19705 as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19706 fi
19707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19708 $as_echo "$tool_specified" >&6; }
19709 fi
19710 fi
19711 fi
19712
19713
19714 if test "x$CODESIGN" != "x"; then
19715 # Verify that the openjdk_codesign certificate is present
19716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19717 $as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19718 rm -f codesign-testfile
19719 touch codesign-testfile
19720 codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19721 rm -f codesign-testfile
19722 if test "x$CODESIGN" = x; then
19723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19724 $as_echo "no" >&6; }
19725 else
19726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19727 $as_echo "yes" >&6; }
19728 fi
19729 fi
19730 fi
19731
19732
19733 # Test if bash supports pipefail.
19734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
19735 $as_echo_n "checking if bash supports pipefail... " >&6; }
19736 if ${BASH} -c 'set -o pipefail'; then
19737 BASH_ARGS="$BASH_ARGS -o pipefail"
19738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19739 $as_echo "yes" >&6; }
19740 else
19741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19742 $as_echo "no" >&6; }
19743 fi
19744
19745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
19746 $as_echo_n "checking if bash supports errexit (-e)... " >&6; }
19747 if ${BASH} -e -c 'true'; then
19748 BASH_ARGS="$BASH_ARGS -e"
19749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19750 $as_echo "yes" >&6; }
19751 else
19752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19753 $as_echo "no" >&6; }
19754 fi
19755
19756
19757
19758
19759 # Check if pkg-config is available.
19760
19761
19762 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19763 if test -n "$ac_tool_prefix"; then
19764 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19765 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19767 $as_echo_n "checking for $ac_word... " >&6; }
19768 if ${ac_cv_path_PKG_CONFIG+:} false; then :
19769 $as_echo_n "(cached) " >&6
19770 else
19771 case $PKG_CONFIG in
19772 [\\/]* | ?:[\\/]*)
19773 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19774 ;;
19775 *)
19776 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19777 for as_dir in $PATH
19778 do
19779 IFS=$as_save_IFS
19780 test -z "$as_dir" && as_dir=.
19781 for ac_exec_ext in '' $ac_executable_extensions; do
19782 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19783 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19784 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19785 break 2
19786 fi
19787 done
19788 done
19789 IFS=$as_save_IFS
19790
19791 ;;
19792 esac
19793 fi
19794 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19795 if test -n "$PKG_CONFIG"; then
19796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19797 $as_echo "$PKG_CONFIG" >&6; }
19798 else
19799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19800 $as_echo "no" >&6; }
19801 fi
19802
19803
19804 fi
19805 if test -z "$ac_cv_path_PKG_CONFIG"; then
19806 ac_pt_PKG_CONFIG=$PKG_CONFIG
19807 # Extract the first word of "pkg-config", so it can be a program name with args.
19808 set dummy pkg-config; ac_word=$2
19809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19810 $as_echo_n "checking for $ac_word... " >&6; }
19811 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19812 $as_echo_n "(cached) " >&6
19813 else
19814 case $ac_pt_PKG_CONFIG in
19815 [\\/]* | ?:[\\/]*)
19816 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19817 ;;
19818 *)
19819 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19820 for as_dir in $PATH
19821 do
19822 IFS=$as_save_IFS
19823 test -z "$as_dir" && as_dir=.
19824 for ac_exec_ext in '' $ac_executable_extensions; do
19825 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19826 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19827 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19828 break 2
19829 fi
19830 done
19831 done
19832 IFS=$as_save_IFS
19833
19834 ;;
19835 esac
19836 fi
19837 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19838 if test -n "$ac_pt_PKG_CONFIG"; then
19839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19840 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
19841 else
19842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19843 $as_echo "no" >&6; }
19844 fi
19845
19846 if test "x$ac_pt_PKG_CONFIG" = x; then
19847 PKG_CONFIG=""
19848 else
19849 case $cross_compiling:$ac_tool_warned in
19850 yes:)
19851 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19852 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19853 ac_tool_warned=yes ;;
19854 esac
19855 PKG_CONFIG=$ac_pt_PKG_CONFIG
19856 fi
19857 else
19858 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19859 fi
19860
19861 fi
19862 if test -n "$PKG_CONFIG"; then
19863 _pkg_min_version=0.9.0
19864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19865 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19866 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19868 $as_echo "yes" >&6; }
19869 else
19870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19871 $as_echo "no" >&6; }
19872 PKG_CONFIG=""
19873 fi
19874
19875 fi
19876
19877 # After basic tools have been setup, we can check build os specific details.
19878
19879 ###############################################################################
19880
19881 # Note that this is the build platform OS version!
19882
19883 OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19884 OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19885 OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19886 OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19887
19888
19889
19890
19891
19892 # Setup builddeps, for automatic downloading of tools we need.
19893 # This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19894 # boot-jdk setup, but we need to have basic tools setup first.
19895
19896
19897 # Check whether --with-builddeps-conf was given.
19898 if test "${with_builddeps_conf+set}" = set; then :
19899 withval=$with_builddeps_conf;
19900 fi
19901
19902
19903
19904 # Check whether --with-builddeps-server was given.
19905 if test "${with_builddeps_server+set}" = set; then :
19906 withval=$with_builddeps_server;
19907 fi
19908
19909
19910
19911 # Check whether --with-builddeps-dir was given.
19912 if test "${with_builddeps_dir+set}" = set; then :
19913 withval=$with_builddeps_dir;
19914 else
19915 with_builddeps_dir=/localhome/builddeps
19916 fi
19917
19918
19919
19920 # Check whether --with-builddeps-group was given.
19921 if test "${with_builddeps_group+set}" = set; then :
19922 withval=$with_builddeps_group;
19923 fi
19924
19925
19926
19927
19928 if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19929 if test "x$with_builddeps_conf" != x; then
19930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19931 $as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19932 builddepsfile=$with_builddeps_conf
19933 if test -s $builddepsfile; then
19934 . $builddepsfile
19935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19936 $as_echo "loaded!" >&6; }
19937 else
19938 as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19939 fi
19940 else
19941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19942 $as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19943 builddepsfile=`mktemp`
19944 touch $builddepsfile
19945 # Put all found confs into a single file.
19946 find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19947 # Source the file to acquire the variables
19948 if test -s $builddepsfile; then
19949 . $builddepsfile
19950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19951 $as_echo "found at least one!" >&6; }
19952 else
19953 as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19954 fi
19955 fi
19956 # Create build and target names that use _ instead of "-" and ".".
19957 # This is necessary to use them in variable names.
19958 build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19959 target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19960 # Extract rewrite information for build and target
19961 eval rewritten_build=\${REWRITE_${build_var}}
19962 if test "x$rewritten_build" = x; then
19963 rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19964 echo Build stays the same $rewritten_build
19965 else
19966 echo Rewriting build for builddeps into $rewritten_build
19967 fi
19968 eval rewritten_target=\${REWRITE_${target_var}}
19969 if test "x$rewritten_target" = x; then
19970 rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19971 echo Target stays the same $rewritten_target
19972 else
19973 echo Rewriting target for builddeps into $rewritten_target
19974 fi
19975 rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19976 rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19977 fi
19978 for ac_prog in 7z unzip
19979 do
19980 # Extract the first word of "$ac_prog", so it can be a program name with args.
19981 set dummy $ac_prog; ac_word=$2
19982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19983 $as_echo_n "checking for $ac_word... " >&6; }
19984 if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19985 $as_echo_n "(cached) " >&6
19986 else
19987 if test -n "$BDEPS_UNZIP"; then
19988 ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19989 else
19990 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19991 for as_dir in $PATH
19992 do
19993 IFS=$as_save_IFS
19994 test -z "$as_dir" && as_dir=.
19995 for ac_exec_ext in '' $ac_executable_extensions; do
19996 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19997 ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19998 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19999 break 2
20000 fi
20001 done
20002 done
20003 IFS=$as_save_IFS
20004
20005 fi
20006 fi
20007 BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
20008 if test -n "$BDEPS_UNZIP"; then
20009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
20010 $as_echo "$BDEPS_UNZIP" >&6; }
20011 else
20012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20013 $as_echo "no" >&6; }
20014 fi
20015
20016
20017 test -n "$BDEPS_UNZIP" && break
20018 done
20019
20020 if test "x$BDEPS_UNZIP" = x7z; then
20021 BDEPS_UNZIP="7z x"
20022 fi
20023
20024 for ac_prog in wget lftp ftp
20025 do
20026 # Extract the first word of "$ac_prog", so it can be a program name with args.
20027 set dummy $ac_prog; ac_word=$2
20028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20029 $as_echo_n "checking for $ac_word... " >&6; }
20030 if ${ac_cv_prog_BDEPS_FTP+:} false; then :
20031 $as_echo_n "(cached) " >&6
20032 else
20033 if test -n "$BDEPS_FTP"; then
20034 ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
20035 else
20036 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20037 for as_dir in $PATH
20038 do
20039 IFS=$as_save_IFS
20040 test -z "$as_dir" && as_dir=.
20041 for ac_exec_ext in '' $ac_executable_extensions; do
20042 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20043 ac_cv_prog_BDEPS_FTP="$ac_prog"
20044 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20045 break 2
20046 fi
20047 done
20048 done
20049 IFS=$as_save_IFS
20050
20051 fi
20052 fi
20053 BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
20054 if test -n "$BDEPS_FTP"; then
20055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
20056 $as_echo "$BDEPS_FTP" >&6; }
20057 else
20058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20059 $as_echo "no" >&6; }
20060 fi
20061
20062
20063 test -n "$BDEPS_FTP" && break
20064 done
20065
20066
20067
20068 ###############################################################################
20069 #
20070 # Determine OpenJDK variants, options and version numbers.
20071 #
20072 ###############################################################################
20073
20074 # We need build & target for this.
20075
20076
20077 ###############################################################################
20078 #
20079 # Should we build a JDK/JVM with headful support (ie a graphical ui)?
20080 # We always build headless support.
20081 #
20082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
20083 $as_echo_n "checking headful support... " >&6; }
20084 # Check whether --enable-headful was given.
20085 if test "${enable_headful+set}" = set; then :
20086 enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
20087 else
20088 SUPPORT_HEADFUL=yes
20089 fi
20090
20091
20092 SUPPORT_HEADLESS=yes
20093 BUILD_HEADLESS="BUILD_HEADLESS:=true"
20094
20095 if test "x$SUPPORT_HEADFUL" = xyes; then
20096 # We are building both headful and headless.
20097 headful_msg="include support for both headful and headless"
20098 fi
20099
20100 if test "x$SUPPORT_HEADFUL" = xno; then
20101 # Thus we are building headless only.
20102 BUILD_HEADLESS="BUILD_HEADLESS:=true"
20103 headful_msg="headless only"
20104 fi
20105
20106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
20107 $as_echo "$headful_msg" >&6; }
20108
20109
20110
20111
20112
20113 # Control wether Hotspot runs Queens test after build.
20114 # Check whether --enable-hotspot-test-in-build was given.
20115 if test "${enable_hotspot_test_in_build+set}" = set; then :
20116 enableval=$enable_hotspot_test_in_build;
20117 else
20118 enable_hotspot_test_in_build=no
20119 fi
20120
20121 if test "x$enable_hotspot_test_in_build" = "xyes"; then
20122 TEST_IN_BUILD=true
20123 else
20124 TEST_IN_BUILD=false
20125 fi
20126
20127
20128 ###############################################################################
20129 #
20130 # Choose cacerts source file
20131 #
20132
20133 # Check whether --with-cacerts-file was given.
20134 if test "${with_cacerts_file+set}" = set; then :
20135 withval=$with_cacerts_file;
20136 fi
20137
20138 if test "x$with_cacerts_file" != x; then
20139 CACERTS_FILE=$with_cacerts_file
20140 fi
20141
20142
20143 ###############################################################################
20144 #
20145 # Enable or disable unlimited crypto
20146 #
20147 # Check whether --enable-unlimited-crypto was given.
20148 if test "${enable_unlimited_crypto+set}" = set; then :
20149 enableval=$enable_unlimited_crypto;
20150 else
20151 enable_unlimited_crypto=no
20152 fi
20153
20154 if test "x$enable_unlimited_crypto" = "xyes"; then
20155 UNLIMITED_CRYPTO=true
20156 else
20157 UNLIMITED_CRYPTO=false
20158 fi
20159
20160
20161 ###############################################################################
20162 #
20163 # --enable-rmiconnector-iiop
20164 #
20165 # Check whether --enable-rmiconnector-iiop was given.
20166 if test "${enable_rmiconnector_iiop+set}" = set; then :
20167 enableval=$enable_rmiconnector_iiop;
20168 fi
20169
20170 if test "x$enable_rmiconnector_iiop" = "xyes"; then
20171 RMICONNECTOR_IIOP=true
20172 else
20173 RMICONNECTOR_IIOP=false
20174 fi
20175
20176
20177 ###############################################################################
20178 #
20179 # Compress jars
20180 #
20181 COMPRESS_JARS=false
20182
20183
20184
20185 # Setup default copyright year. Mostly overridden when building close to a new year.
20186
20187 # Check whether --with-copyright-year was given.
20188 if test "${with_copyright_year+set}" = set; then :
20189 withval=$with_copyright_year;
20190 fi
20191
20192 if test "x$with_copyright_year" = xyes; then
20193 as_fn_error $? "Copyright year must have a value" "$LINENO" 5
20194 elif test "x$with_copyright_year" != x; then
20195 COPYRIGHT_YEAR="$with_copyright_year"
20196 else
20197 COPYRIGHT_YEAR=`date +'%Y'`
20198 fi
20199
20200
20201
20202 # Warn user that old version arguments are deprecated.
20203
20204
20205 # Check whether --with-milestone was given.
20206 if test "${with_milestone+set}" = set; then :
20207 withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
20208 $as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
20209 fi
20210
20211
20212
20213
20214 # Check whether --with-update-version was given.
20215 if test "${with_update_version+set}" = set; then :
20216 withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
20217 $as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
20218 fi
20219
20220
20221
20222
20223 # Check whether --with-user-release-suffix was given.
20224 if test "${with_user_release_suffix+set}" = set; then :
20225 withval=$with_user_release_suffix; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&5
20226 $as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
20227 fi
20228
20229
20230
20231
20232 # Check whether --with-build-number was given.
20233 if test "${with_build_number+set}" = set; then :
20234 withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
20235 $as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
20236 fi
20237
20238
20239
20240 # Source the version numbers file
20241 . $AUTOCONF_DIR/version-numbers
20242
20243 # Some non-version number information is set in that file
20244
20245
20246
20247
20248
20249
20250
20251
20252 # Override version from arguments
20253
20254 # If --with-version-string is set, process it first. It is possible to
20255 # override parts with more specific flags, since these are processed later.
20256
20257 # Check whether --with-version-string was given.
20258 if test "${with_version_string+set}" = set; then :
20259 withval=$with_version_string;
20260 fi
20261
20262 if test "x$with_version_string" = xyes; then
20263 as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
20264 elif test "x$with_version_string" != x; then
20265 # Additional [] needed to keep m4 from mangling shell constructs.
20266 if [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?(\.([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
20267 VERSION_MAJOR=${BASH_REMATCH[1]}
20268 VERSION_MINOR=${BASH_REMATCH[3]}
20269 VERSION_SECURITY=${BASH_REMATCH[5]}
20270 VERSION_PATCH=${BASH_REMATCH[7]}
20271 VERSION_PRE_BASE=${BASH_REMATCH[9]}
20272 VERSION_PRE_DEBUGLEVEL=${BASH_REMATCH[11]}
20273 version_plus_separator=${BASH_REMATCH[13]}
20274 VERSION_BUILD=${BASH_REMATCH[14]}
20275 VERSION_OPT=${BASH_REMATCH[16]}
20276 # Unspecified numerical fields are interpreted as 0.
20277 if test "x$VERSION_MINOR" = x; then
20278 VERSION_MINOR=0
20279 fi
20280 if test "x$VERSION_SECURITY" = x; then
20281 VERSION_SECURITY=0
20282 fi
20283 if test "x$VERSION_PATCH" = x; then
20284 VERSION_PATCH=0
20285 fi
20286 if test "x$version_plus_separator" != x && test "x$VERSION_BUILD$VERSION_OPT" = x; then
20287 as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
20288 fi
20289 # Stop the version part process from setting default values.
20290 # We still allow them to explicitely override though.
20291 NO_DEFAULT_VERSION_PARTS=true
20292 else
20293 as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
20294 fi
20295 fi
20296
20297
20298 # Check whether --with-version-pre-base was given.
20299 if test "${with_version_pre_base+set}" = set; then :
20300 withval=$with_version_pre_base; with_version_pre_base_present=true
20301 else
20302 with_version_pre_base_present=false
20303 fi
20304
20305
20306 if test "x$with_version_pre_base_present" = xtrue; then
20307 if test "x$with_version_pre_base" = xyes; then
20308 as_fn_error $? "--with-version-pre-base must have a value" "$LINENO" 5
20309 elif test "x$with_version_pre_base" = xno; then
20310 # Interpret --without-* as empty string instead of the literal "no"
20311 VERSION_PRE_BASE=
20312 else
20313 # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
20314 VERSION_PRE_BASE=`$ECHO "$with_version_pre_base" | $TR -c -d '[a-z][A-Z]'`
20315 if test "x$VERSION_PRE_BASE" != "x$with_version_pre_base"; then
20316 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre-base value has been sanitized from '$with_version_pre_base' to '$VERSION_PRE_BASE'" >&5
20317 $as_echo "$as_me: WARNING: --with-version-pre-base value has been sanitized from '$with_version_pre_base' to '$VERSION_PRE_BASE'" >&2;}
20318 fi
20319 fi
20320 else
20321 if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20322 # Default is to use "internal" as pre
20323 VERSION_PRE_BASE="internal"
20324 fi
20325 fi
20326
20327
20328 # Check whether --with-version-pre-debuglevel was given.
20329 if test "${with_version_pre_debuglevel+set}" = set; then :
20330 withval=$with_version_pre_debuglevel; with_version_pre_debuglevel_present=true
20331 else
20332 with_version_pre_debuglevel_present=false
20333 fi
20334
20335
20336 if test "x$with_version_pre_debuglevel_present" = xtrue; then
20337 if test "x$with_version_pre_debuglevel" = xyes; then
20338 as_fn_error $? "--with-version-pre-debuglevel must have a value" "$LINENO" 5
20339 elif test "x$with_version_pre_debuglevel" = xno; then
20340 # Interpret --without-* as empty string instead of the literal "no"
20341 VERSION_PRE_DEBUGLEVEL=
20342 else
20343 # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
20344 VERSION_PRE_DEBUGLEVEL=`$ECHO "$with_version_pre_debuglevel" | $TR -c -d '[a-z][A-Z]'`
20345 if test "x$VERSION_PRE_DEBUGLEVEL" != "x$with_version_pre_debuglevel"; then
20346 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre-debuglevel value has been sanitized from '$with_version_pre_debuglevel' to '$VERSION_PRE_DEBUGLEVEL'" >&5
20347 $as_echo "$as_me: WARNING: --with-version-pre-debuglevel value has been sanitized from '$with_version_pre_debuglevel' to '$VERSION_PRE_DEBUGLEVEL'" >&2;}
20348 fi
20349 fi
20350 else
20351 if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20352 # Default is to use the debug level name, except for release which is empty.
20353 if test "x$DEBUG_LEVEL" != "xrelease"; then
20354 VERSION_PRE_DEBUGLEVEL="$DEBUG_LEVEL"
20355 else
20356 VERSION_PRE_DEBUGLEVEL=""
20357 fi
20358 fi
20359 fi
20360
20361
20362 # Check whether --with-version-opt was given.
20363 if test "${with_version_opt+set}" = set; then :
20364 withval=$with_version_opt; with_version_opt_present=true
20365 else
20366 with_version_opt_present=false
20367 fi
20368
20369
20370 if test "x$with_version_opt_present" = xtrue; then
20371 if test "x$with_version_opt" = xyes; then
20372 as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
20373 elif test "x$with_version_opt" = xno; then
20374 # Interpret --without-* as empty string instead of the literal "no"
20375 VERSION_OPT=
20376 else
20377 # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
20378 VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
20379 if test "x$VERSION_OPT" != "x$with_version_opt"; then
20380 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
20381 $as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
20382 fi
20383 fi
20384 else
20385 if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20386 # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
20387 timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
20388 # Outer [ ] to quote m4.
20389 username=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
20390 basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
20391 VERSION_OPT="$timestamp.$username.$basedirname"
20392 fi
20393 fi
20394
20395
20396 # Check whether --with-version-build was given.
20397 if test "${with_version_build+set}" = set; then :
20398 withval=$with_version_build; with_version_build_present=true
20399 else
20400 with_version_build_present=false
20401 fi
20402
20403
20404 if test "x$with_version_build_present" = xtrue; then
20405 if test "x$with_version_build" = xyes; then
20406 as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
20407 elif test "x$with_version_build" = xno; then
20408 # Interpret --without-* as empty string instead of the literal "no"
20409 VERSION_BUILD=
20410 elif test "x$with_version_build" = x; then
20411 VERSION_BUILD=
20412 else
20413
20414 # Additional [] needed to keep m4 from mangling shell constructs.
20415 if ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]] ; then
20416 as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
20417 fi
20418 # Extract the version number without leading zeros.
20419 cleaned_value=${BASH_REMATCH[1]}
20420 if test "x$cleaned_value" = x; then
20421 # Special case for zero
20422 cleaned_value=${BASH_REMATCH[2]}
20423 fi
20424
20425 if test $cleaned_value -gt 255; then
20426 as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
20427 fi
20428 if test "x$cleaned_value" != "x$with_version_build"; then
20429 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
20430 $as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
20431 fi
20432 VERSION_BUILD=$cleaned_value
20433
20434 fi
20435 else
20436 if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20437 # Default is to not have a build number.
20438 VERSION_BUILD=""
20439 # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
20440 VERSION_BUILD=0
20441 fi
20442 fi
20443
20444
20445 # Check whether --with-version-major was given.
20446 if test "${with_version_major+set}" = set; then :
20447 withval=$with_version_major; with_version_major_present=true
20448 else
20449 with_version_major_present=false
20450 fi
20451
20452
20453 if test "x$with_version_major_present" = xtrue; then
20454 if test "x$with_version_major" = xyes; then
20455 as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
20456 else
20457
20458 # Additional [] needed to keep m4 from mangling shell constructs.
20459 if ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]] ; then
20460 as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
20461 fi
20462 # Extract the version number without leading zeros.
20463 cleaned_value=${BASH_REMATCH[1]}
20464 if test "x$cleaned_value" = x; then
20465 # Special case for zero
20466 cleaned_value=${BASH_REMATCH[2]}
20467 fi
20468
20469 if test $cleaned_value -gt 255; then
20470 as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
20471 fi
20472 if test "x$cleaned_value" != "x$with_version_major"; then
20473 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
20474 $as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
20475 fi
20476 VERSION_MAJOR=$cleaned_value
20477
20478 fi
20479 else
20480 if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20481 # Default is to get value from version-numbers
20482 VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
20483 fi
20484 fi
20485
20486
20487 # Check whether --with-version-minor was given.
20488 if test "${with_version_minor+set}" = set; then :
20489 withval=$with_version_minor; with_version_minor_present=true
20490 else
20491 with_version_minor_present=false
20492 fi
20493
20494
20495 if test "x$with_version_minor_present" = xtrue; then
20496 if test "x$with_version_minor" = xyes; then
20497 as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
20498 elif test "x$with_version_minor" = xno; then
20499 # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
20500 VERSION_MINOR=0
20501 elif test "x$with_version_minor" = x; then
20502 VERSION_MINOR=0
20503 else
20504
20505 # Additional [] needed to keep m4 from mangling shell constructs.
20506 if ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]] ; then
20507 as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
20508 fi
20509 # Extract the version number without leading zeros.
20510 cleaned_value=${BASH_REMATCH[1]}
20511 if test "x$cleaned_value" = x; then
20512 # Special case for zero
20513 cleaned_value=${BASH_REMATCH[2]}
20514 fi
20515
20516 if test $cleaned_value -gt 255; then
20517 as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
20518 fi
20519 if test "x$cleaned_value" != "x$with_version_minor"; then
20520 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
20521 $as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
20522 fi
20523 VERSION_MINOR=$cleaned_value
20524
20525 fi
20526 else
20527 if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20528 # Default is 0, if unspecified
20529 VERSION_MINOR=0
20530 fi
20531 fi
20532
20533
20534 # Check whether --with-version-security was given.
20535 if test "${with_version_security+set}" = set; then :
20536 withval=$with_version_security; with_version_security_present=true
20537 else
20538 with_version_security_present=false
20539 fi
20540
20541
20542 if test "x$with_version_security_present" = xtrue; then
20543 if test "x$with_version_security" = xyes; then
20544 as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
20545 elif test "x$with_version_security" = xno; then
20546 # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
20547 VERSION_SECURITY=0
20548 elif test "x$with_version_security" = x; then
20549 VERSION_SECURITY=0
20550 else
20551
20552 # Additional [] needed to keep m4 from mangling shell constructs.
20553 if ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]] ; then
20554 as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
20555 fi
20556 # Extract the version number without leading zeros.
20557 cleaned_value=${BASH_REMATCH[1]}
20558 if test "x$cleaned_value" = x; then
20559 # Special case for zero
20560 cleaned_value=${BASH_REMATCH[2]}
20561 fi
20562
20563 if test $cleaned_value -gt 255; then
20564 as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
20565 fi
20566 if test "x$cleaned_value" != "x$with_version_security"; then
20567 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
20568 $as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
20569 fi
20570 VERSION_SECURITY=$cleaned_value
20571
20572 fi
20573 else
20574 if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20575 # Default is 0, if unspecified
20576 VERSION_SECURITY=0
20577 fi
20578 fi
20579
20580
20581 # Check whether --with-version-patch was given.
20582 if test "${with_version_patch+set}" = set; then :
20583 withval=$with_version_patch; with_version_patch_present=true
20584 else
20585 with_version_patch_present=false
20586 fi
20587
20588
20589 if test "x$with_version_patch_present" = xtrue; then
20590 if test "x$with_version_patch" = xyes; then
20591 as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
20592 elif test "x$with_version_patch" = xno; then
20593 # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
20594 VERSION_PATCH=0
20595 elif test "x$with_version_patch" = x; then
20596 VERSION_PATCH=0
20597 else
20598
20599 # Additional [] needed to keep m4 from mangling shell constructs.
20600 if ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]] ; then
20601 as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
20602 fi
20603 # Extract the version number without leading zeros.
20604 cleaned_value=${BASH_REMATCH[1]}
20605 if test "x$cleaned_value" = x; then
20606 # Special case for zero
20607 cleaned_value=${BASH_REMATCH[2]}
20608 fi
20609
20610 if test $cleaned_value -gt 255; then
20611 as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
20612 fi
20613 if test "x$cleaned_value" != "x$with_version_patch"; then
20614 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
20615 $as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
20616 fi
20617 VERSION_PATCH=$cleaned_value
20618
20619 fi
20620 else
20621 if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
20622 # Default is 0, if unspecified
20623 VERSION_PATCH=0
20624 fi
20625 fi
20626
20627 # Calculate derived version properties
20628
20629 # Set pre to "pre-base" if debug level is empty (i.e. release), or
20630 # "pre-base.debug-level" otherwise.
20631 if test "x$VERSION_PRE_BASE" = x && test "x$VERSION_PRE_DEBUGLEVEL" != x; then
20632 as_fn_error $? "Cannot set version-pre-debuglevel when version-pre-base is empty" "$LINENO" 5
20633 fi
20634 VERSION_PRE=$VERSION_PRE_BASE${VERSION_PRE_DEBUGLEVEL:+.$VERSION_PRE_DEBUGLEVEL}
20635
20636 # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
20637 VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
20638
20639 stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
20640 # Strip trailing zeroes from stripped_version_number
20641 for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
20642 VERSION_NUMBER=$stripped_version_number
20643
20644 # The complete version string, with additional build information
20645 if test "x$VERSION_BUILD$VERSION_OPT" = x; then
20646 VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
20647 else
20648 # If either build or opt is set, we need a + separator
20649 VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
20650 fi
20651
20652 # The short version string, just VERSION_NUMBER and PRE, if present.
20653 VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
20654
20655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
20656 $as_echo_n "checking for version string... " >&6; }
20657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
20658 $as_echo "$VERSION_STRING" >&6; }
20659
20660
20661
20662
20663
20664
20665
20666
20667
20668
20669
20670
20671
20672
20673 ###############################################################################
20674 #
20675 # Setup BootJDK, used to bootstrap the build.
20676 #
20677 ###############################################################################
20678
20679
20680 BOOT_JDK_FOUND=no
20681
20682 # Check whether --with-boot-jdk was given.
20683 if test "${with_boot_jdk+set}" = set; then :
20684 withval=$with_boot_jdk;
20685 fi
20686
20687
20688 # We look for the Boot JDK through various means, going from more certain to
20689 # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
20690 # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
20691 # must check if this is indeed valid; otherwise we'll continue looking.
20692
20693 # Test: Is bootjdk explicitely set by command line arguments?
20694
20695 if test "x$BOOT_JDK_FOUND" = xno; then
20696 # Now execute the test
20697
20698 if test "x$with_boot_jdk" != x; then
20699 BOOT_JDK=$with_boot_jdk
20700 BOOT_JDK_FOUND=maybe
20701 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
20702 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
20703 fi
20704
20705
20706 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20707 if test "x$BOOT_JDK_FOUND" = xmaybe; then
20708 # Do we have a bin/java?
20709 if test ! -x "$BOOT_JDK/bin/java"; then
20710 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20711 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20712 BOOT_JDK_FOUND=no
20713 else
20714 # Do we have a bin/javac?
20715 if test ! -x "$BOOT_JDK/bin/javac"; then
20716 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20717 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20718 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20719 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20720 BOOT_JDK_FOUND=no
20721 else
20722 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20723 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20724
20725 # Extra M4 quote needed to protect [] in grep expression.
20726 FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[89]\.'`
20727 if test "x$FOUND_CORRECT_VERSION" = x; then
20728 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20729 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20730 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20731 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20732 BOOT_JDK_FOUND=no
20733 else
20734 # We're done! :-)
20735 BOOT_JDK_FOUND=yes
20736
20737 # Only process if variable expands to non-empty
20738
20739 if test "x$BOOT_JDK" != x; then
20740 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20741
20742 # Input might be given as Windows format, start by converting to
20743 # unix format.
20744 path="$BOOT_JDK"
20745 new_path=`$CYGPATH -u "$path"`
20746
20747 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20748 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20749 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20750 # "foo.exe" is OK but "foo" is an error.
20751 #
20752 # This test is therefore slightly more accurate than "test -f" to check for file precense.
20753 # It is also a way to make sure we got the proper file name for the real test later on.
20754 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20755 if test "x$test_shortpath" = x; then
20756 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20757 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20758 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20759 fi
20760
20761 # Call helper function which possibly converts this using DOS-style short mode.
20762 # If so, the updated path is stored in $new_path.
20763
20764 input_path="$new_path"
20765 # Check if we need to convert this using DOS-style short mode. If the path
20766 # contains just simple characters, use it. Otherwise (spaces, weird characters),
20767 # take no chances and rewrite it.
20768 # Note: m4 eats our [], so we need to use [ and ] instead.
20769 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20770 if test "x$has_forbidden_chars" != x; then
20771 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20772 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20773 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20774 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20775 # Going to short mode and back again did indeed matter. Since short mode is
20776 # case insensitive, let's make it lowercase to improve readability.
20777 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20778 # Now convert it back to Unix-style (cygpath)
20779 input_path=`$CYGPATH -u "$shortmode_path"`
20780 new_path="$input_path"
20781 fi
20782 fi
20783
20784 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20785 if test "x$test_cygdrive_prefix" = x; then
20786 # As a simple fix, exclude /usr/bin since it's not a real path.
20787 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20788 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20789 # a path prefixed by /cygdrive for fixpath to work.
20790 new_path="$CYGWIN_ROOT_PATH$input_path"
20791 fi
20792 fi
20793
20794
20795 if test "x$path" != "x$new_path"; then
20796 BOOT_JDK="$new_path"
20797 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20798 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20799 fi
20800
20801 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20802
20803 path="$BOOT_JDK"
20804 has_colon=`$ECHO $path | $GREP ^.:`
20805 new_path="$path"
20806 if test "x$has_colon" = x; then
20807 # Not in mixed or Windows style, start by that.
20808 new_path=`cmd //c echo $path`
20809 fi
20810
20811
20812 input_path="$new_path"
20813 # Check if we need to convert this using DOS-style short mode. If the path
20814 # contains just simple characters, use it. Otherwise (spaces, weird characters),
20815 # take no chances and rewrite it.
20816 # Note: m4 eats our [], so we need to use [ and ] instead.
20817 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20818 if test "x$has_forbidden_chars" != x; then
20819 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20820 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20821 fi
20822
20823
20824 windows_path="$new_path"
20825 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20826 unix_path=`$CYGPATH -u "$windows_path"`
20827 new_path="$unix_path"
20828 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20829 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20830 new_path="$unix_path"
20831 fi
20832
20833 if test "x$path" != "x$new_path"; then
20834 BOOT_JDK="$new_path"
20835 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20836 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20837 fi
20838
20839 # Save the first 10 bytes of this path to the storage, so fixpath can work.
20840 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20841
20842 else
20843 # We're on a unix platform. Hooray! :)
20844 path="$BOOT_JDK"
20845 has_space=`$ECHO "$path" | $GREP " "`
20846 if test "x$has_space" != x; then
20847 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20848 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20849 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20850 fi
20851
20852 # Use eval to expand a potential ~
20853 eval path="$path"
20854 if test ! -f "$path" && test ! -d "$path"; then
20855 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20856 fi
20857
20858 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20859 fi
20860 fi
20861
20862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20863 $as_echo_n "checking for Boot JDK... " >&6; }
20864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20865 $as_echo "$BOOT_JDK" >&6; }
20866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20867 $as_echo_n "checking Boot JDK version... " >&6; }
20868 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
20869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20870 $as_echo "$BOOT_JDK_VERSION" >&6; }
20871 fi # end check jdk version
20872 fi # end check javac
20873 fi # end check java
20874 fi # end check boot jdk found
20875 fi
20876
20877 if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
20878 # Having specified an argument which is incorrect will produce an instant failure;
20879 # we should not go on looking
20880 as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
20881 fi
20882
20883 # Test: Is bootjdk available from builddeps?
20884
20885 if test "x$BOOT_JDK_FOUND" = xno; then
20886 # Now execute the test
20887
20888
20889
20890 if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20891 # Source the builddeps file again, to make sure it uses the latest variables!
20892 . $builddepsfile
20893 # Look for a target and build machine specific resource!
20894 eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
20895 if test "x$resource" = x; then
20896 # Ok, lets instead look for a target specific resource
20897 eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
20898 fi
20899 if test "x$resource" = x; then
20900 # Ok, lets instead look for a build specific resource
20901 eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
20902 fi
20903 if test "x$resource" = x; then
20904 # Ok, lets instead look for a generic resource
20905 # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
20906 resource=${builddep_bootjdk}
20907 fi
20908 if test "x$resource" != x; then
20909 { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
20910 $as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
20911 # If the resource in the builddeps.conf file is an existing directory,
20912 # for example /java/linux/cups
20913 if test -d ${resource}; then
20914 depdir=${resource}
20915 else
20916
20917 # bootjdk is for example mymodule
20918 # $resource is for example libs/general/libmymod_1_2_3.zip
20919 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
20920 # $with_builddeps_dir is for example /localhome/builddeps
20921 # depdir is the name of the variable into which we store the depdir, eg MYMOD
20922 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
20923 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
20924 filename=`basename $resource`
20925 filebase=`echo $filename | sed 's/\.[^\.]*$//'`
20926 filebase=${filename%%.*}
20927 extension=${filename#*.}
20928 installdir=$with_builddeps_dir/$filebase
20929 if test ! -f $installdir/$filename.unpacked; then
20930 { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
20931 $as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
20932 if test ! -d $installdir; then
20933 mkdir -p $installdir
20934 fi
20935 if test ! -d $installdir; then
20936 as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
20937 fi
20938 tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
20939 touch $tmpfile
20940 if test ! -f $tmpfile; then
20941 as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
20942 fi
20943
20944 # $with_builddeps_server/$resource is the ftp://abuilddeps.server.com/libs/cups.zip
20945 # $tmpfile is the local file name for the downloaded file.
20946 VALID_TOOL=no
20947 if test "x$BDEPS_FTP" = xwget; then
20948 VALID_TOOL=yes
20949 wget -O $tmpfile $with_builddeps_server/$resource
20950 fi
20951 if test "x$BDEPS_FTP" = xlftp; then
20952 VALID_TOOL=yes
20953 lftp -c "get $with_builddeps_server/$resource -o $tmpfile"
20954 fi
20955 if test "x$BDEPS_FTP" = xftp; then
20956 VALID_TOOL=yes
20957 FTPSERVER=`echo $with_builddeps_server/$resource | cut -f 3 -d '/'`
20958 FTPPATH=`echo $with_builddeps_server/$resource | cut -f 4- -d '/'`
20959 FTPUSERPWD=${FTPSERVER%%@*}
20960 if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20961 FTPUSER=${userpwd%%:*}
20962 FTPPWD=${userpwd#*@}
20963 FTPSERVER=${FTPSERVER#*@}
20964 else
20965 FTPUSER=ftp
20966 FTPPWD=ftp
20967 fi
20968 # the "pass" command does not work on some
20969 # ftp clients (read ftp.exe) but if it works,
20970 # passive mode is better!
20971 ( \
20972 echo "user $FTPUSER $FTPPWD" ; \
20973 echo "pass" ; \
20974 echo "bin" ; \
20975 echo "get $FTPPATH $tmpfile" ; \
20976 ) | ftp -in $FTPSERVER
20977 fi
20978 if test "x$VALID_TOOL" != xyes; then
20979 as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20980 fi
20981
20982 mv $tmpfile $installdir/$filename
20983 if test ! -s $installdir/$filename; then
20984 as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20985 fi
20986 case "$extension" in
20987 zip) echo "Unzipping $installdir/$filename..."
20988 (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20989 ;;
20990 tar.gz) echo "Untaring $installdir/$filename..."
20991 (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20992 ;;
20993 tgz) echo "Untaring $installdir/$filename..."
20994 (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20995 ;;
20996 *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20997 ;;
20998 esac
20999 fi
21000 if test -f $installdir/$filename.unpacked; then
21001 depdir=$installdir
21002 fi
21003
21004 fi
21005 # Source the builddeps file again, because in the previous command, the depdir
21006 # was updated to point at the current build dependency install directory.
21007 . $builddepsfile
21008 # Now extract variables from the builddeps.conf files.
21009 theroot=${builddep_bootjdk_ROOT}
21010 thecflags=${builddep_bootjdk_CFLAGS}
21011 thelibs=${builddep_bootjdk_LIBS}
21012 if test "x$depdir" = x; then
21013 as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
21014 fi
21015 BOOT_JDK=$depdir
21016 if test "x$theroot" != x; then
21017 BOOT_JDK="$theroot"
21018 fi
21019 if test "x$thecflags" != x; then
21020 BOOT_JDK_CFLAGS="$thecflags"
21021 fi
21022 if test "x$thelibs" != x; then
21023 BOOT_JDK_LIBS="$thelibs"
21024 fi
21025 BOOT_JDK_FOUND=maybe
21026 else BOOT_JDK_FOUND=no
21027
21028 fi
21029 else BOOT_JDK_FOUND=no
21030
21031 fi
21032
21033
21034
21035 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21036 if test "x$BOOT_JDK_FOUND" = xmaybe; then
21037 # Do we have a bin/java?
21038 if test ! -x "$BOOT_JDK/bin/java"; then
21039 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21040 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21041 BOOT_JDK_FOUND=no
21042 else
21043 # Do we have a bin/javac?
21044 if test ! -x "$BOOT_JDK/bin/javac"; then
21045 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21046 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21047 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21048 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21049 BOOT_JDK_FOUND=no
21050 else
21051 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21052 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21053
21054 # Extra M4 quote needed to protect [] in grep expression.
21055 FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[89]\.'`
21056 if test "x$FOUND_CORRECT_VERSION" = x; then
21057 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21058 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21059 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21060 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21061 BOOT_JDK_FOUND=no
21062 else
21063 # We're done! :-)
21064 BOOT_JDK_FOUND=yes
21065
21066 # Only process if variable expands to non-empty
21067
21068 if test "x$BOOT_JDK" != x; then
21069 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21070
21071 # Input might be given as Windows format, start by converting to
21072 # unix format.
21073 path="$BOOT_JDK"
21074 new_path=`$CYGPATH -u "$path"`
21075
21076 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21077 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21078 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21079 # "foo.exe" is OK but "foo" is an error.
21080 #
21081 # This test is therefore slightly more accurate than "test -f" to check for file precense.
21082 # It is also a way to make sure we got the proper file name for the real test later on.
21083 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21084 if test "x$test_shortpath" = x; then
21085 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21086 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21087 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21088 fi
21089
21090 # Call helper function which possibly converts this using DOS-style short mode.
21091 # If so, the updated path is stored in $new_path.
21092
21093 input_path="$new_path"
21094 # Check if we need to convert this using DOS-style short mode. If the path
21095 # contains just simple characters, use it. Otherwise (spaces, weird characters),
21096 # take no chances and rewrite it.
21097 # Note: m4 eats our [], so we need to use [ and ] instead.
21098 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21099 if test "x$has_forbidden_chars" != x; then
21100 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21101 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21102 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21103 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21104 # Going to short mode and back again did indeed matter. Since short mode is
21105 # case insensitive, let's make it lowercase to improve readability.
21106 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21107 # Now convert it back to Unix-style (cygpath)
21108 input_path=`$CYGPATH -u "$shortmode_path"`
21109 new_path="$input_path"
21110 fi
21111 fi
21112
21113 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21114 if test "x$test_cygdrive_prefix" = x; then
21115 # As a simple fix, exclude /usr/bin since it's not a real path.
21116 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21117 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21118 # a path prefixed by /cygdrive for fixpath to work.
21119 new_path="$CYGWIN_ROOT_PATH$input_path"
21120 fi
21121 fi
21122
21123
21124 if test "x$path" != "x$new_path"; then
21125 BOOT_JDK="$new_path"
21126 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21127 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21128 fi
21129
21130 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21131
21132 path="$BOOT_JDK"
21133 has_colon=`$ECHO $path | $GREP ^.:`
21134 new_path="$path"
21135 if test "x$has_colon" = x; then
21136 # Not in mixed or Windows style, start by that.
21137 new_path=`cmd //c echo $path`
21138 fi
21139
21140
21141 input_path="$new_path"
21142 # Check if we need to convert this using DOS-style short mode. If the path
21143 # contains just simple characters, use it. Otherwise (spaces, weird characters),
21144 # take no chances and rewrite it.
21145 # Note: m4 eats our [], so we need to use [ and ] instead.
21146 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21147 if test "x$has_forbidden_chars" != x; then
21148 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21149 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21150 fi
21151
21152
21153 windows_path="$new_path"
21154 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21155 unix_path=`$CYGPATH -u "$windows_path"`
21156 new_path="$unix_path"
21157 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21158 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21159 new_path="$unix_path"
21160 fi
21161
21162 if test "x$path" != "x$new_path"; then
21163 BOOT_JDK="$new_path"
21164 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21165 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21166 fi
21167
21168 # Save the first 10 bytes of this path to the storage, so fixpath can work.
21169 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21170
21171 else
21172 # We're on a unix platform. Hooray! :)
21173 path="$BOOT_JDK"
21174 has_space=`$ECHO "$path" | $GREP " "`
21175 if test "x$has_space" != x; then
21176 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21177 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21178 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21179 fi
21180
21181 # Use eval to expand a potential ~
21182 eval path="$path"
21183 if test ! -f "$path" && test ! -d "$path"; then
21184 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21185 fi
21186
21187 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21188 fi
21189 fi
21190
21191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21192 $as_echo_n "checking for Boot JDK... " >&6; }
21193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21194 $as_echo "$BOOT_JDK" >&6; }
21195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21196 $as_echo_n "checking Boot JDK version... " >&6; }
21197 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
21198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21199 $as_echo "$BOOT_JDK_VERSION" >&6; }
21200 fi # end check jdk version
21201 fi # end check javac
21202 fi # end check java
21203 fi # end check boot jdk found
21204 fi
21205
21206
21207 # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
21208
21209 if test "x$BOOT_JDK_FOUND" = xno; then
21210 # Now execute the test
21211
21212 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21213 # First check at user selected default
21214
21215 if test "x$BOOT_JDK_FOUND" = xno; then
21216 # Now execute the test
21217
21218 if test -x /usr/libexec/java_home; then
21219 BOOT_JDK=`/usr/libexec/java_home `
21220 BOOT_JDK_FOUND=maybe
21221 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
21222 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
21223 fi
21224
21225
21226 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21227 if test "x$BOOT_JDK_FOUND" = xmaybe; then
21228 # Do we have a bin/java?
21229 if test ! -x "$BOOT_JDK/bin/java"; then
21230 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21231 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21232 BOOT_JDK_FOUND=no
21233 else
21234 # Do we have a bin/javac?
21235 if test ! -x "$BOOT_JDK/bin/javac"; then
21236 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21237 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21238 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21239 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21240 BOOT_JDK_FOUND=no
21241 else
21242 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21243 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21244
21245 # Extra M4 quote needed to protect [] in grep expression.
21246 FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[89]\.'`
21247 if test "x$FOUND_CORRECT_VERSION" = x; then
21248 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21249 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21250 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21251 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21252 BOOT_JDK_FOUND=no
21253 else
21254 # We're done! :-)
21255 BOOT_JDK_FOUND=yes
21256
21257 # Only process if variable expands to non-empty
21258
21259 if test "x$BOOT_JDK" != x; then
21260 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21261
21262 # Input might be given as Windows format, start by converting to
21263 # unix format.
21264 path="$BOOT_JDK"
21265 new_path=`$CYGPATH -u "$path"`
21266
21267 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21268 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21269 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21270 # "foo.exe" is OK but "foo" is an error.
21271 #
21272 # This test is therefore slightly more accurate than "test -f" to check for file precense.
21273 # It is also a way to make sure we got the proper file name for the real test later on.
21274 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21275 if test "x$test_shortpath" = x; then
21276 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21277 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21278 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21279 fi
21280
21281 # Call helper function which possibly converts this using DOS-style short mode.
21282 # If so, the updated path is stored in $new_path.
21283
21284 input_path="$new_path"
21285 # Check if we need to convert this using DOS-style short mode. If the path
21286 # contains just simple characters, use it. Otherwise (spaces, weird characters),
21287 # take no chances and rewrite it.
21288 # Note: m4 eats our [], so we need to use [ and ] instead.
21289 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21290 if test "x$has_forbidden_chars" != x; then
21291 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21292 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21293 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21294 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21295 # Going to short mode and back again did indeed matter. Since short mode is
21296 # case insensitive, let's make it lowercase to improve readability.
21297 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21298 # Now convert it back to Unix-style (cygpath)
21299 input_path=`$CYGPATH -u "$shortmode_path"`
21300 new_path="$input_path"
21301 fi
21302 fi
21303
21304 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21305 if test "x$test_cygdrive_prefix" = x; then
21306 # As a simple fix, exclude /usr/bin since it's not a real path.
21307 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21308 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21309 # a path prefixed by /cygdrive for fixpath to work.
21310 new_path="$CYGWIN_ROOT_PATH$input_path"
21311 fi
21312 fi
21313
21314
21315 if test "x$path" != "x$new_path"; then
21316 BOOT_JDK="$new_path"
21317 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21318 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21319 fi
21320
21321 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21322
21323 path="$BOOT_JDK"
21324 has_colon=`$ECHO $path | $GREP ^.:`
21325 new_path="$path"
21326 if test "x$has_colon" = x; then
21327 # Not in mixed or Windows style, start by that.
21328 new_path=`cmd //c echo $path`
21329 fi
21330
21331
21332 input_path="$new_path"
21333 # Check if we need to convert this using DOS-style short mode. If the path
21334 # contains just simple characters, use it. Otherwise (spaces, weird characters),
21335 # take no chances and rewrite it.
21336 # Note: m4 eats our [], so we need to use [ and ] instead.
21337 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21338 if test "x$has_forbidden_chars" != x; then
21339 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21340 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21341 fi
21342
21343
21344 windows_path="$new_path"
21345 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21346 unix_path=`$CYGPATH -u "$windows_path"`
21347 new_path="$unix_path"
21348 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21349 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21350 new_path="$unix_path"
21351 fi
21352
21353 if test "x$path" != "x$new_path"; then
21354 BOOT_JDK="$new_path"
21355 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21356 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21357 fi
21358
21359 # Save the first 10 bytes of this path to the storage, so fixpath can work.
21360 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21361
21362 else
21363 # We're on a unix platform. Hooray! :)
21364 path="$BOOT_JDK"
21365 has_space=`$ECHO "$path" | $GREP " "`
21366 if test "x$has_space" != x; then
21367 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21368 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21369 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21370 fi
21371
21372 # Use eval to expand a potential ~
21373 eval path="$path"
21374 if test ! -f "$path" && test ! -d "$path"; then
21375 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21376 fi
21377
21378 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21379 fi
21380 fi
21381
21382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21383 $as_echo_n "checking for Boot JDK... " >&6; }
21384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21385 $as_echo "$BOOT_JDK" >&6; }
21386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21387 $as_echo_n "checking Boot JDK version... " >&6; }
21388 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
21389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21390 $as_echo "$BOOT_JDK_VERSION" >&6; }
21391 fi # end check jdk version
21392 fi # end check javac
21393 fi # end check java
21394 fi # end check boot jdk found
21395 fi
21396
21397 # If that did not work out (e.g. too old), try explicit versions instead
21398
21399 if test "x$BOOT_JDK_FOUND" = xno; then
21400 # Now execute the test
21401
21402 if test -x /usr/libexec/java_home; then
21403 BOOT_JDK=`/usr/libexec/java_home -v 1.9`
21404 BOOT_JDK_FOUND=maybe
21405 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
21406 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
21407 fi
21408
21409
21410 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21411 if test "x$BOOT_JDK_FOUND" = xmaybe; then
21412 # Do we have a bin/java?
21413 if test ! -x "$BOOT_JDK/bin/java"; then
21414 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21415 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21416 BOOT_JDK_FOUND=no
21417 else
21418 # Do we have a bin/javac?
21419 if test ! -x "$BOOT_JDK/bin/javac"; then
21420 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21421 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21422 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21423 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21424 BOOT_JDK_FOUND=no
21425 else
21426 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21427 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21428
21429 # Extra M4 quote needed to protect [] in grep expression.
21430 FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[89]\.'`
21431 if test "x$FOUND_CORRECT_VERSION" = x; then
21432 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21433 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21434 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21435 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21436 BOOT_JDK_FOUND=no
21437 else
21438 # We're done! :-)
21439 BOOT_JDK_FOUND=yes
21440
21441 # Only process if variable expands to non-empty
21442
21443 if test "x$BOOT_JDK" != x; then
21444 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21445
21446 # Input might be given as Windows format, start by converting to
21447 # unix format.
21448 path="$BOOT_JDK"
21449 new_path=`$CYGPATH -u "$path"`
21450
21451 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21452 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21453 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21454 # "foo.exe" is OK but "foo" is an error.
21455 #
21456 # This test is therefore slightly more accurate than "test -f" to check for file precense.
21457 # It is also a way to make sure we got the proper file name for the real test later on.
21458 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21459 if test "x$test_shortpath" = x; then
21460 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21461 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21462 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21463 fi
21464
21465 # Call helper function which possibly converts this using DOS-style short mode.
21466 # If so, the updated path is stored in $new_path.
21467
21468 input_path="$new_path"
21469 # Check if we need to convert this using DOS-style short mode. If the path
21470 # contains just simple characters, use it. Otherwise (spaces, weird characters),
21471 # take no chances and rewrite it.
21472 # Note: m4 eats our [], so we need to use [ and ] instead.
21473 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21474 if test "x$has_forbidden_chars" != x; then
21475 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21476 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21477 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21478 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21479 # Going to short mode and back again did indeed matter. Since short mode is
21480 # case insensitive, let's make it lowercase to improve readability.
21481 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21482 # Now convert it back to Unix-style (cygpath)
21483 input_path=`$CYGPATH -u "$shortmode_path"`
21484 new_path="$input_path"
21485 fi
21486 fi
21487
21488 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21489 if test "x$test_cygdrive_prefix" = x; then
21490 # As a simple fix, exclude /usr/bin since it's not a real path.
21491 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21492 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21493 # a path prefixed by /cygdrive for fixpath to work.
21494 new_path="$CYGWIN_ROOT_PATH$input_path"
21495 fi
21496 fi
21497
21498
21499 if test "x$path" != "x$new_path"; then
21500 BOOT_JDK="$new_path"
21501 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21502 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21503 fi
21504
21505 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21506
21507 path="$BOOT_JDK"
21508 has_colon=`$ECHO $path | $GREP ^.:`
21509 new_path="$path"
21510 if test "x$has_colon" = x; then
21511 # Not in mixed or Windows style, start by that.
21512 new_path=`cmd //c echo $path`
21513 fi
21514
21515
21516 input_path="$new_path"
21517 # Check if we need to convert this using DOS-style short mode. If the path
21518 # contains just simple characters, use it. Otherwise (spaces, weird characters),
21519 # take no chances and rewrite it.
21520 # Note: m4 eats our [], so we need to use [ and ] instead.
21521 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21522 if test "x$has_forbidden_chars" != x; then
21523 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21524 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21525 fi
21526
21527
21528 windows_path="$new_path"
21529 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21530 unix_path=`$CYGPATH -u "$windows_path"`
21531 new_path="$unix_path"
21532 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21533 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21534 new_path="$unix_path"
21535 fi
21536
21537 if test "x$path" != "x$new_path"; then
21538 BOOT_JDK="$new_path"
21539 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21540 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21541 fi
21542
21543 # Save the first 10 bytes of this path to the storage, so fixpath can work.
21544 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21545
21546 else
21547 # We're on a unix platform. Hooray! :)
21548 path="$BOOT_JDK"
21549 has_space=`$ECHO "$path" | $GREP " "`
21550 if test "x$has_space" != x; then
21551 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21552 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21553 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21554 fi
21555
21556 # Use eval to expand a potential ~
21557 eval path="$path"
21558 if test ! -f "$path" && test ! -d "$path"; then
21559 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21560 fi
21561
21562 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21563 fi
21564 fi
21565
21566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21567 $as_echo_n "checking for Boot JDK... " >&6; }
21568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21569 $as_echo "$BOOT_JDK" >&6; }
21570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21571 $as_echo_n "checking Boot JDK version... " >&6; }
21572 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
21573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21574 $as_echo "$BOOT_JDK_VERSION" >&6; }
21575 fi # end check jdk version
21576 fi # end check javac
21577 fi # end check java
21578 fi # end check boot jdk found
21579 fi
21580
21581
21582 if test "x$BOOT_JDK_FOUND" = xno; then
21583 # Now execute the test
21584
21585 if test -x /usr/libexec/java_home; then
21586 BOOT_JDK=`/usr/libexec/java_home -v 1.8`
21587 BOOT_JDK_FOUND=maybe
21588 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
21589 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
21590 fi
21591
21592
21593 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21594 if test "x$BOOT_JDK_FOUND" = xmaybe; then
21595 # Do we have a bin/java?
21596 if test ! -x "$BOOT_JDK/bin/java"; then
21597 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21598 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21599 BOOT_JDK_FOUND=no
21600 else
21601 # Do we have a bin/javac?
21602 if test ! -x "$BOOT_JDK/bin/javac"; then
21603 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21604 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21605 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21606 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21607 BOOT_JDK_FOUND=no
21608 else
21609 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21610 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21611
21612 # Extra M4 quote needed to protect [] in grep expression.
21613 FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[89]\.'`
21614 if test "x$FOUND_CORRECT_VERSION" = x; then
21615 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21616 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21617 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21618 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21619 BOOT_JDK_FOUND=no
21620 else
21621 # We're done! :-)
21622 BOOT_JDK_FOUND=yes
21623
21624 # Only process if variable expands to non-empty
21625
21626 if test "x$BOOT_JDK" != x; then
21627 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21628
21629 # Input might be given as Windows format, start by converting to
21630 # unix format.
21631 path="$BOOT_JDK"
21632 new_path=`$CYGPATH -u "$path"`
21633
21634 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21635 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21636 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21637 # "foo.exe" is OK but "foo" is an error.
21638 #
21639 # This test is therefore slightly more accurate than "test -f" to check for file precense.
21640 # It is also a way to make sure we got the proper file name for the real test later on.
21641 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21642 if test "x$test_shortpath" = x; then
21643 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21644 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21645 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21646 fi
21647
21648 # Call helper function which possibly converts this using DOS-style short mode.
21649 # If so, the updated path is stored in $new_path.
21650
21651 input_path="$new_path"
21652 # Check if we need to convert this using DOS-style short mode. If the path
21653 # contains just simple characters, use it. Otherwise (spaces, weird characters),
21654 # take no chances and rewrite it.
21655 # Note: m4 eats our [], so we need to use [ and ] instead.
21656 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21657 if test "x$has_forbidden_chars" != x; then
21658 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21659 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21660 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21661 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21662 # Going to short mode and back again did indeed matter. Since short mode is
21663 # case insensitive, let's make it lowercase to improve readability.
21664 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21665 # Now convert it back to Unix-style (cygpath)
21666 input_path=`$CYGPATH -u "$shortmode_path"`
21667 new_path="$input_path"
21668 fi
21669 fi
21670
21671 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21672 if test "x$test_cygdrive_prefix" = x; then
21673 # As a simple fix, exclude /usr/bin since it's not a real path.
21674 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21675 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21676 # a path prefixed by /cygdrive for fixpath to work.
21677 new_path="$CYGWIN_ROOT_PATH$input_path"
21678 fi
21679 fi
21680
21681
21682 if test "x$path" != "x$new_path"; then
21683 BOOT_JDK="$new_path"
21684 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21685 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21686 fi
21687
21688 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21689
21690 path="$BOOT_JDK"
21691 has_colon=`$ECHO $path | $GREP ^.:`
21692 new_path="$path"
21693 if test "x$has_colon" = x; then
21694 # Not in mixed or Windows style, start by that.
21695 new_path=`cmd //c echo $path`
21696 fi
21697
21698
21699 input_path="$new_path"
21700 # Check if we need to convert this using DOS-style short mode. If the path
21701 # contains just simple characters, use it. Otherwise (spaces, weird characters),
21702 # take no chances and rewrite it.
21703 # Note: m4 eats our [], so we need to use [ and ] instead.
21704 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21705 if test "x$has_forbidden_chars" != x; then
21706 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21707 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21708 fi
21709
21710
21711 windows_path="$new_path"
21712 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21713 unix_path=`$CYGPATH -u "$windows_path"`
21714 new_path="$unix_path"
21715 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21716 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21717 new_path="$unix_path"
21718 fi
21719
21720 if test "x$path" != "x$new_path"; then
21721 BOOT_JDK="$new_path"
21722 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21723 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21724 fi
21725
21726 # Save the first 10 bytes of this path to the storage, so fixpath can work.
21727 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21728
21729 else
21730 # We're on a unix platform. Hooray! :)
21731 path="$BOOT_JDK"
21732 has_space=`$ECHO "$path" | $GREP " "`
21733 if test "x$has_space" != x; then
21734 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21735 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21736 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21737 fi
21738
21739 # Use eval to expand a potential ~
21740 eval path="$path"
21741 if test ! -f "$path" && test ! -d "$path"; then
21742 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21743 fi
21744
21745 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21746 fi
21747 fi
21748
21749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21750 $as_echo_n "checking for Boot JDK... " >&6; }
21751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21752 $as_echo "$BOOT_JDK" >&6; }
21753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21754 $as_echo_n "checking Boot JDK version... " >&6; }
21755 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
21756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21757 $as_echo "$BOOT_JDK_VERSION" >&6; }
21758 fi # end check jdk version
21759 fi # end check javac
21760 fi # end check java
21761 fi # end check boot jdk found
21762 fi
21763
21764
21765 if test "x$BOOT_JDK_FOUND" = xno; then
21766 # Now execute the test
21767
21768 if test -x /usr/libexec/java_home; then
21769 BOOT_JDK=`/usr/libexec/java_home -v 1.7`
21770 BOOT_JDK_FOUND=maybe
21771 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
21772 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
21773 fi
21774
21775
21776 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21777 if test "x$BOOT_JDK_FOUND" = xmaybe; then
21778 # Do we have a bin/java?
21779 if test ! -x "$BOOT_JDK/bin/java"; then
21780 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21781 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21782 BOOT_JDK_FOUND=no
21783 else
21784 # Do we have a bin/javac?
21785 if test ! -x "$BOOT_JDK/bin/javac"; then
21786 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21787 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21788 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21789 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21790 BOOT_JDK_FOUND=no
21791 else
21792 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21793 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21794
21795 # Extra M4 quote needed to protect [] in grep expression.
21796 FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[89]\.'`
21797 if test "x$FOUND_CORRECT_VERSION" = x; then
21798 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21799 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21800 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21801 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21802 BOOT_JDK_FOUND=no
21803 else
21804 # We're done! :-)
21805 BOOT_JDK_FOUND=yes
21806
21807 # Only process if variable expands to non-empty
21808
21809 if test "x$BOOT_JDK" != x; then
21810 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21811
21812 # Input might be given as Windows format, start by converting to
21813 # unix format.
21814 path="$BOOT_JDK"
21815 new_path=`$CYGPATH -u "$path"`
21816
21817 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21818 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21819 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21820 # "foo.exe" is OK but "foo" is an error.
21821 #
21822 # This test is therefore slightly more accurate than "test -f" to check for file precense.
21823 # It is also a way to make sure we got the proper file name for the real test later on.
21824 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21825 if test "x$test_shortpath" = x; then
21826 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21827 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21828 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21829 fi
21830
21831 # Call helper function which possibly converts this using DOS-style short mode.
21832 # If so, the updated path is stored in $new_path.
21833
21834 input_path="$new_path"
21835 # Check if we need to convert this using DOS-style short mode. If the path
21836 # contains just simple characters, use it. Otherwise (spaces, weird characters),
21837 # take no chances and rewrite it.
21838 # Note: m4 eats our [], so we need to use [ and ] instead.
21839 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21840 if test "x$has_forbidden_chars" != x; then
21841 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21842 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21843 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21844 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21845 # Going to short mode and back again did indeed matter. Since short mode is
21846 # case insensitive, let's make it lowercase to improve readability.
21847 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21848 # Now convert it back to Unix-style (cygpath)
21849 input_path=`$CYGPATH -u "$shortmode_path"`
21850 new_path="$input_path"
21851 fi
21852 fi
21853
21854 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21855 if test "x$test_cygdrive_prefix" = x; then
21856 # As a simple fix, exclude /usr/bin since it's not a real path.
21857 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21858 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21859 # a path prefixed by /cygdrive for fixpath to work.
21860 new_path="$CYGWIN_ROOT_PATH$input_path"
21861 fi
21862 fi
21863
21864
21865 if test "x$path" != "x$new_path"; then
21866 BOOT_JDK="$new_path"
21867 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21868 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21869 fi
21870
21871 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21872
21873 path="$BOOT_JDK"
21874 has_colon=`$ECHO $path | $GREP ^.:`
21875 new_path="$path"
21876 if test "x$has_colon" = x; then
21877 # Not in mixed or Windows style, start by that.
21878 new_path=`cmd //c echo $path`
21879 fi
21880
21881
21882 input_path="$new_path"
21883 # Check if we need to convert this using DOS-style short mode. If the path
21884 # contains just simple characters, use it. Otherwise (spaces, weird characters),
21885 # take no chances and rewrite it.
21886 # Note: m4 eats our [], so we need to use [ and ] instead.
21887 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21888 if test "x$has_forbidden_chars" != x; then
21889 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21890 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21891 fi
21892
21893
21894 windows_path="$new_path"
21895 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21896 unix_path=`$CYGPATH -u "$windows_path"`
21897 new_path="$unix_path"
21898 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21899 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21900 new_path="$unix_path"
21901 fi
21902
21903 if test "x$path" != "x$new_path"; then
21904 BOOT_JDK="$new_path"
21905 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21906 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21907 fi
21908
21909 # Save the first 10 bytes of this path to the storage, so fixpath can work.
21910 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21911
21912 else
21913 # We're on a unix platform. Hooray! :)
21914 path="$BOOT_JDK"
21915 has_space=`$ECHO "$path" | $GREP " "`
21916 if test "x$has_space" != x; then
21917 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21918 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21919 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21920 fi
21921
21922 # Use eval to expand a potential ~
21923 eval path="$path"
21924 if test ! -f "$path" && test ! -d "$path"; then
21925 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21926 fi
21927
21928 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21929 fi
21930 fi
21931
21932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21933 $as_echo_n "checking for Boot JDK... " >&6; }
21934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21935 $as_echo "$BOOT_JDK" >&6; }
21936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21937 $as_echo_n "checking Boot JDK version... " >&6; }
21938 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
21939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21940 $as_echo "$BOOT_JDK_VERSION" >&6; }
21941 fi # end check jdk version
21942 fi # end check javac
21943 fi # end check java
21944 fi # end check boot jdk found
21945 fi
21946
21947 fi
21948
21949
21950 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21951 if test "x$BOOT_JDK_FOUND" = xmaybe; then
21952 # Do we have a bin/java?
21953 if test ! -x "$BOOT_JDK/bin/java"; then
21954 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21955 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21956 BOOT_JDK_FOUND=no
21957 else
21958 # Do we have a bin/javac?
21959 if test ! -x "$BOOT_JDK/bin/javac"; then
21960 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21961 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21962 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21963 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21964 BOOT_JDK_FOUND=no
21965 else
21966 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21967 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21968
21969 # Extra M4 quote needed to protect [] in grep expression.
21970 FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[89]\.'`
21971 if test "x$FOUND_CORRECT_VERSION" = x; then
21972 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21973 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21974 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21975 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21976 BOOT_JDK_FOUND=no
21977 else
21978 # We're done! :-)
21979 BOOT_JDK_FOUND=yes
21980
21981 # Only process if variable expands to non-empty
21982
21983 if test "x$BOOT_JDK" != x; then
21984 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21985
21986 # Input might be given as Windows format, start by converting to
21987 # unix format.
21988 path="$BOOT_JDK"
21989 new_path=`$CYGPATH -u "$path"`
21990
21991 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21992 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21993 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21994 # "foo.exe" is OK but "foo" is an error.
21995 #
21996 # This test is therefore slightly more accurate than "test -f" to check for file precense.
21997 # It is also a way to make sure we got the proper file name for the real test later on.
21998 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21999 if test "x$test_shortpath" = x; then
22000 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22001 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22002 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22003 fi
22004
22005 # Call helper function which possibly converts this using DOS-style short mode.
22006 # If so, the updated path is stored in $new_path.
22007
22008 input_path="$new_path"
22009 # Check if we need to convert this using DOS-style short mode. If the path
22010 # contains just simple characters, use it. Otherwise (spaces, weird characters),
22011 # take no chances and rewrite it.
22012 # Note: m4 eats our [], so we need to use [ and ] instead.
22013 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22014 if test "x$has_forbidden_chars" != x; then
22015 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22016 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22017 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22018 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22019 # Going to short mode and back again did indeed matter. Since short mode is
22020 # case insensitive, let's make it lowercase to improve readability.
22021 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22022 # Now convert it back to Unix-style (cygpath)
22023 input_path=`$CYGPATH -u "$shortmode_path"`
22024 new_path="$input_path"
22025 fi
22026 fi
22027
22028 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22029 if test "x$test_cygdrive_prefix" = x; then
22030 # As a simple fix, exclude /usr/bin since it's not a real path.
22031 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22032 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22033 # a path prefixed by /cygdrive for fixpath to work.
22034 new_path="$CYGWIN_ROOT_PATH$input_path"
22035 fi
22036 fi
22037
22038
22039 if test "x$path" != "x$new_path"; then
22040 BOOT_JDK="$new_path"
22041 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22042 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22043 fi
22044
22045 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22046
22047 path="$BOOT_JDK"
22048 has_colon=`$ECHO $path | $GREP ^.:`
22049 new_path="$path"
22050 if test "x$has_colon" = x; then
22051 # Not in mixed or Windows style, start by that.
22052 new_path=`cmd //c echo $path`
22053 fi
22054
22055
22056 input_path="$new_path"
22057 # Check if we need to convert this using DOS-style short mode. If the path
22058 # contains just simple characters, use it. Otherwise (spaces, weird characters),
22059 # take no chances and rewrite it.
22060 # Note: m4 eats our [], so we need to use [ and ] instead.
22061 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22062 if test "x$has_forbidden_chars" != x; then
22063 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22064 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22065 fi
22066
22067
22068 windows_path="$new_path"
22069 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22070 unix_path=`$CYGPATH -u "$windows_path"`
22071 new_path="$unix_path"
22072 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22073 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22074 new_path="$unix_path"
22075 fi
22076
22077 if test "x$path" != "x$new_path"; then
22078 BOOT_JDK="$new_path"
22079 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22080 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22081 fi
22082
22083 # Save the first 10 bytes of this path to the storage, so fixpath can work.
22084 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22085
22086 else
22087 # We're on a unix platform. Hooray! :)
22088 path="$BOOT_JDK"
22089 has_space=`$ECHO "$path" | $GREP " "`
22090 if test "x$has_space" != x; then
22091 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22092 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22093 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22094 fi
22095
22096 # Use eval to expand a potential ~
22097 eval path="$path"
22098 if test ! -f "$path" && test ! -d "$path"; then
22099 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22100 fi
22101
22102 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22103 fi
22104 fi
22105
22106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22107 $as_echo_n "checking for Boot JDK... " >&6; }
22108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22109 $as_echo "$BOOT_JDK" >&6; }
22110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22111 $as_echo_n "checking Boot JDK version... " >&6; }
22112 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
22113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22114 $as_echo "$BOOT_JDK_VERSION" >&6; }
22115 fi # end check jdk version
22116 fi # end check javac
22117 fi # end check java
22118 fi # end check boot jdk found
22119 fi
22120
22121
22122 # Test: Is $JAVA_HOME set?
22123
22124 if test "x$BOOT_JDK_FOUND" = xno; then
22125 # Now execute the test
22126
22127 if test "x$JAVA_HOME" != x; then
22128 JAVA_HOME_PROCESSED="$JAVA_HOME"
22129
22130 # Only process if variable expands to non-empty
22131
22132 if test "x$JAVA_HOME_PROCESSED" != x; then
22133 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22134
22135 # Input might be given as Windows format, start by converting to
22136 # unix format.
22137 path="$JAVA_HOME_PROCESSED"
22138 new_path=`$CYGPATH -u "$path"`
22139
22140 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22141 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22142 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22143 # "foo.exe" is OK but "foo" is an error.
22144 #
22145 # This test is therefore slightly more accurate than "test -f" to check for file precense.
22146 # It is also a way to make sure we got the proper file name for the real test later on.
22147 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22148 if test "x$test_shortpath" = x; then
22149 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
22150 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
22151 as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
22152 fi
22153
22154 # Call helper function which possibly converts this using DOS-style short mode.
22155 # If so, the updated path is stored in $new_path.
22156
22157 input_path="$new_path"
22158 # Check if we need to convert this using DOS-style short mode. If the path
22159 # contains just simple characters, use it. Otherwise (spaces, weird characters),
22160 # take no chances and rewrite it.
22161 # Note: m4 eats our [], so we need to use [ and ] instead.
22162 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22163 if test "x$has_forbidden_chars" != x; then
22164 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22165 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22166 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22167 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22168 # Going to short mode and back again did indeed matter. Since short mode is
22169 # case insensitive, let's make it lowercase to improve readability.
22170 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22171 # Now convert it back to Unix-style (cygpath)
22172 input_path=`$CYGPATH -u "$shortmode_path"`
22173 new_path="$input_path"
22174 fi
22175 fi
22176
22177 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22178 if test "x$test_cygdrive_prefix" = x; then
22179 # As a simple fix, exclude /usr/bin since it's not a real path.
22180 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22181 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22182 # a path prefixed by /cygdrive for fixpath to work.
22183 new_path="$CYGWIN_ROOT_PATH$input_path"
22184 fi
22185 fi
22186
22187
22188 if test "x$path" != "x$new_path"; then
22189 JAVA_HOME_PROCESSED="$new_path"
22190 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
22191 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
22192 fi
22193
22194 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22195
22196 path="$JAVA_HOME_PROCESSED"
22197 has_colon=`$ECHO $path | $GREP ^.:`
22198 new_path="$path"
22199 if test "x$has_colon" = x; then
22200 # Not in mixed or Windows style, start by that.
22201 new_path=`cmd //c echo $path`
22202 fi
22203
22204
22205 input_path="$new_path"
22206 # Check if we need to convert this using DOS-style short mode. If the path
22207 # contains just simple characters, use it. Otherwise (spaces, weird characters),
22208 # take no chances and rewrite it.
22209 # Note: m4 eats our [], so we need to use [ and ] instead.
22210 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22211 if test "x$has_forbidden_chars" != x; then
22212 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22213 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22214 fi
22215
22216
22217 windows_path="$new_path"
22218 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22219 unix_path=`$CYGPATH -u "$windows_path"`
22220 new_path="$unix_path"
22221 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22222 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22223 new_path="$unix_path"
22224 fi
22225
22226 if test "x$path" != "x$new_path"; then
22227 JAVA_HOME_PROCESSED="$new_path"
22228 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
22229 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
22230 fi
22231
22232 # Save the first 10 bytes of this path to the storage, so fixpath can work.
22233 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22234
22235 else
22236 # We're on a unix platform. Hooray! :)
22237 path="$JAVA_HOME_PROCESSED"
22238 has_space=`$ECHO "$path" | $GREP " "`
22239 if test "x$has_space" != x; then
22240 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
22241 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
22242 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22243 fi
22244
22245 # Use eval to expand a potential ~
22246 eval path="$path"
22247 if test ! -f "$path" && test ! -d "$path"; then
22248 as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
22249 fi
22250
22251 JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
22252 fi
22253 fi
22254
22255 if test ! -d "$JAVA_HOME_PROCESSED"; then
22256 { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
22257 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
22258 else
22259 # Aha, the user has set a JAVA_HOME
22260 # let us use that as the Boot JDK.
22261 BOOT_JDK="$JAVA_HOME_PROCESSED"
22262 BOOT_JDK_FOUND=maybe
22263 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
22264 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
22265 fi
22266 fi
22267
22268
22269 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22270 if test "x$BOOT_JDK_FOUND" = xmaybe; then
22271 # Do we have a bin/java?
22272 if test ! -x "$BOOT_JDK/bin/java"; then
22273 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22274 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22275 BOOT_JDK_FOUND=no
22276 else
22277 # Do we have a bin/javac?
22278 if test ! -x "$BOOT_JDK/bin/javac"; then
22279 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22280 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22281 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22282 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22283 BOOT_JDK_FOUND=no
22284 else
22285 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22286 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22287
22288 # Extra M4 quote needed to protect [] in grep expression.
22289 FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[89]\.'`
22290 if test "x$FOUND_CORRECT_VERSION" = x; then
22291 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22292 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22293 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22294 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22295 BOOT_JDK_FOUND=no
22296 else
22297 # We're done! :-)
22298 BOOT_JDK_FOUND=yes
22299
22300 # Only process if variable expands to non-empty
22301
22302 if test "x$BOOT_JDK" != x; then
22303 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22304
22305 # Input might be given as Windows format, start by converting to
22306 # unix format.
22307 path="$BOOT_JDK"
22308 new_path=`$CYGPATH -u "$path"`
22309
22310 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22311 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22312 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22313 # "foo.exe" is OK but "foo" is an error.
22314 #
22315 # This test is therefore slightly more accurate than "test -f" to check for file precense.
22316 # It is also a way to make sure we got the proper file name for the real test later on.
22317 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22318 if test "x$test_shortpath" = x; then
22319 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22320 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22321 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22322 fi
22323
22324 # Call helper function which possibly converts this using DOS-style short mode.
22325 # If so, the updated path is stored in $new_path.
22326
22327 input_path="$new_path"
22328 # Check if we need to convert this using DOS-style short mode. If the path
22329 # contains just simple characters, use it. Otherwise (spaces, weird characters),
22330 # take no chances and rewrite it.
22331 # Note: m4 eats our [], so we need to use [ and ] instead.
22332 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22333 if test "x$has_forbidden_chars" != x; then
22334 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22335 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22336 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22337 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22338 # Going to short mode and back again did indeed matter. Since short mode is
22339 # case insensitive, let's make it lowercase to improve readability.
22340 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22341 # Now convert it back to Unix-style (cygpath)
22342 input_path=`$CYGPATH -u "$shortmode_path"`
22343 new_path="$input_path"
22344 fi
22345 fi
22346
22347 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22348 if test "x$test_cygdrive_prefix" = x; then
22349 # As a simple fix, exclude /usr/bin since it's not a real path.
22350 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22351 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22352 # a path prefixed by /cygdrive for fixpath to work.
22353 new_path="$CYGWIN_ROOT_PATH$input_path"
22354 fi
22355 fi
22356
22357
22358 if test "x$path" != "x$new_path"; then
22359 BOOT_JDK="$new_path"
22360 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22361 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22362 fi
22363
22364 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22365
22366 path="$BOOT_JDK"
22367 has_colon=`$ECHO $path | $GREP ^.:`
22368 new_path="$path"
22369 if test "x$has_colon" = x; then
22370 # Not in mixed or Windows style, start by that.
22371 new_path=`cmd //c echo $path`
22372 fi
22373
22374
22375 input_path="$new_path"
22376 # Check if we need to convert this using DOS-style short mode. If the path
22377 # contains just simple characters, use it. Otherwise (spaces, weird characters),
22378 # take no chances and rewrite it.
22379 # Note: m4 eats our [], so we need to use [ and ] instead.
22380 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22381 if test "x$has_forbidden_chars" != x; then
22382 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22383 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22384 fi
22385
22386
22387 windows_path="$new_path"
22388 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22389 unix_path=`$CYGPATH -u "$windows_path"`
22390 new_path="$unix_path"
22391 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22392 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22393 new_path="$unix_path"
22394 fi
22395
22396 if test "x$path" != "x$new_path"; then
22397 BOOT_JDK="$new_path"
22398 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22399 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22400 fi
22401
22402 # Save the first 10 bytes of this path to the storage, so fixpath can work.
22403 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22404
22405 else
22406 # We're on a unix platform. Hooray! :)
22407 path="$BOOT_JDK"
22408 has_space=`$ECHO "$path" | $GREP " "`
22409 if test "x$has_space" != x; then
22410 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22411 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22412 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22413 fi
22414
22415 # Use eval to expand a potential ~
22416 eval path="$path"
22417 if test ! -f "$path" && test ! -d "$path"; then
22418 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22419 fi
22420
22421 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22422 fi
22423 fi
22424
22425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22426 $as_echo_n "checking for Boot JDK... " >&6; }
22427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22428 $as_echo "$BOOT_JDK" >&6; }
22429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22430 $as_echo_n "checking Boot JDK version... " >&6; }
22431 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
22432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22433 $as_echo "$BOOT_JDK_VERSION" >&6; }
22434 fi # end check jdk version
22435 fi # end check javac
22436 fi # end check java
22437 fi # end check boot jdk found
22438 fi
22439
22440
22441 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
22442
22443 if test "x$BOOT_JDK_FOUND" = xno; then
22444 # Now execute the test
22445
22446 # Extract the first word of "javac", so it can be a program name with args.
22447 set dummy javac; ac_word=$2
22448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22449 $as_echo_n "checking for $ac_word... " >&6; }
22450 if ${ac_cv_path_JAVAC_CHECK+:} false; then :
22451 $as_echo_n "(cached) " >&6
22452 else
22453 case $JAVAC_CHECK in
22454 [\\/]* | ?:[\\/]*)
22455 ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
22456 ;;
22457 *)
22458 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22459 for as_dir in $PATH
22460 do
22461 IFS=$as_save_IFS
22462 test -z "$as_dir" && as_dir=.
22463 for ac_exec_ext in '' $ac_executable_extensions; do
22464 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22465 ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
22466 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22467 break 2
22468 fi
22469 done
22470 done
22471 IFS=$as_save_IFS
22472
22473 ;;
22474 esac
22475 fi
22476 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
22477 if test -n "$JAVAC_CHECK"; then
22478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
22479 $as_echo "$JAVAC_CHECK" >&6; }
22480 else
22481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22482 $as_echo "no" >&6; }
22483 fi
22484
22485
22486 # Extract the first word of "java", so it can be a program name with args.
22487 set dummy java; ac_word=$2
22488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22489 $as_echo_n "checking for $ac_word... " >&6; }
22490 if ${ac_cv_path_JAVA_CHECK+:} false; then :
22491 $as_echo_n "(cached) " >&6
22492 else
22493 case $JAVA_CHECK in
22494 [\\/]* | ?:[\\/]*)
22495 ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
22496 ;;
22497 *)
22498 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22499 for as_dir in $PATH
22500 do
22501 IFS=$as_save_IFS
22502 test -z "$as_dir" && as_dir=.
22503 for ac_exec_ext in '' $ac_executable_extensions; do
22504 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22505 ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
22506 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22507 break 2
22508 fi
22509 done
22510 done
22511 IFS=$as_save_IFS
22512
22513 ;;
22514 esac
22515 fi
22516 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
22517 if test -n "$JAVA_CHECK"; then
22518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
22519 $as_echo "$JAVA_CHECK" >&6; }
22520 else
22521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22522 $as_echo "no" >&6; }
22523 fi
22524
22525
22526 BINARY="$JAVAC_CHECK"
22527 if test "x$JAVAC_CHECK" = x; then
22528 BINARY="$JAVA_CHECK"
22529 fi
22530 if test "x$BINARY" != x; then
22531 # So there is a java(c) binary, it might be part of a JDK.
22532 # Lets find the JDK/JRE directory by following symbolic links.
22533 # Linux/GNU systems often have links from /usr/bin/java to
22534 # /etc/alternatives/java to the real JDK binary.
22535
22536 if test "x$OPENJDK_BUILD_OS" != xwindows; then
22537 # Follow a chain of symbolic links. Use readlink
22538 # where it exists, else fall back to horribly
22539 # complicated shell code.
22540 if test "x$READLINK_TESTED" != yes; then
22541 # On MacOSX there is a readlink tool with a different
22542 # purpose than the GNU readlink tool. Check the found readlink.
22543 ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
22544 if test "x$ISGNU" = x; then
22545 # A readlink that we do not know how to use.
22546 # Are there other non-GNU readlinks out there?
22547 READLINK_TESTED=yes
22548 READLINK=
22549 fi
22550 fi
22551
22552 if test "x$READLINK" != x; then
22553 BINARY=`$READLINK -f $BINARY`
22554 else
22555 # Save the current directory for restoring afterwards
22556 STARTDIR=$PWD
22557 COUNTER=0
22558 sym_link_dir=`$DIRNAME $BINARY`
22559 sym_link_file=`$BASENAME $BINARY`
22560 cd $sym_link_dir
22561 # Use -P flag to resolve symlinks in directories.
22562 cd `$THEPWDCMD -P`
22563 sym_link_dir=`$THEPWDCMD -P`
22564 # Resolve file symlinks
22565 while test $COUNTER -lt 20; do
22566 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
22567 if test "x$ISLINK" == x; then
22568 # This is not a symbolic link! We are done!
22569 break
22570 fi
22571 # Again resolve directory symlinks since the target of the just found
22572 # link could be in a different directory
22573 cd `$DIRNAME $ISLINK`
22574 sym_link_dir=`$THEPWDCMD -P`
22575 sym_link_file=`$BASENAME $ISLINK`
22576 let COUNTER=COUNTER+1
22577 done
22578 cd $STARTDIR
22579 BINARY=$sym_link_dir/$sym_link_file
22580 fi
22581 fi
22582
22583 BOOT_JDK=`dirname "$BINARY"`
22584 BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
22585 if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
22586 # Looks like we found ourselves an JDK
22587 BOOT_JDK_FOUND=maybe
22588 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
22589 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
22590 fi
22591 fi
22592
22593
22594 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22595 if test "x$BOOT_JDK_FOUND" = xmaybe; then
22596 # Do we have a bin/java?
22597 if test ! -x "$BOOT_JDK/bin/java"; then
22598 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22599 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22600 BOOT_JDK_FOUND=no
22601 else
22602 # Do we have a bin/javac?
22603 if test ! -x "$BOOT_JDK/bin/javac"; then
22604 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22605 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22606 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22607 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22608 BOOT_JDK_FOUND=no
22609 else
22610 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22611 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22612
22613 # Extra M4 quote needed to protect [] in grep expression.
22614 FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[89]\.'`
22615 if test "x$FOUND_CORRECT_VERSION" = x; then
22616 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22617 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22618 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22619 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22620 BOOT_JDK_FOUND=no
22621 else
22622 # We're done! :-)
22623 BOOT_JDK_FOUND=yes
22624
22625 # Only process if variable expands to non-empty
22626
22627 if test "x$BOOT_JDK" != x; then
22628 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22629
22630 # Input might be given as Windows format, start by converting to
22631 # unix format.
22632 path="$BOOT_JDK"
22633 new_path=`$CYGPATH -u "$path"`
22634
22635 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22636 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22637 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22638 # "foo.exe" is OK but "foo" is an error.
22639 #
22640 # This test is therefore slightly more accurate than "test -f" to check for file precense.
22641 # It is also a way to make sure we got the proper file name for the real test later on.
22642 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22643 if test "x$test_shortpath" = x; then
22644 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22645 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22646 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22647 fi
22648
22649 # Call helper function which possibly converts this using DOS-style short mode.
22650 # If so, the updated path is stored in $new_path.
22651
22652 input_path="$new_path"
22653 # Check if we need to convert this using DOS-style short mode. If the path
22654 # contains just simple characters, use it. Otherwise (spaces, weird characters),
22655 # take no chances and rewrite it.
22656 # Note: m4 eats our [], so we need to use [ and ] instead.
22657 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22658 if test "x$has_forbidden_chars" != x; then
22659 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22660 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22661 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22662 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22663 # Going to short mode and back again did indeed matter. Since short mode is
22664 # case insensitive, let's make it lowercase to improve readability.
22665 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22666 # Now convert it back to Unix-style (cygpath)
22667 input_path=`$CYGPATH -u "$shortmode_path"`
22668 new_path="$input_path"
22669 fi
22670 fi
22671
22672 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22673 if test "x$test_cygdrive_prefix" = x; then
22674 # As a simple fix, exclude /usr/bin since it's not a real path.
22675 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22676 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22677 # a path prefixed by /cygdrive for fixpath to work.
22678 new_path="$CYGWIN_ROOT_PATH$input_path"
22679 fi
22680 fi
22681
22682
22683 if test "x$path" != "x$new_path"; then
22684 BOOT_JDK="$new_path"
22685 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22686 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22687 fi
22688
22689 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22690
22691 path="$BOOT_JDK"
22692 has_colon=`$ECHO $path | $GREP ^.:`
22693 new_path="$path"
22694 if test "x$has_colon" = x; then
22695 # Not in mixed or Windows style, start by that.
22696 new_path=`cmd //c echo $path`
22697 fi
22698
22699
22700 input_path="$new_path"
22701 # Check if we need to convert this using DOS-style short mode. If the path
22702 # contains just simple characters, use it. Otherwise (spaces, weird characters),
22703 # take no chances and rewrite it.
22704 # Note: m4 eats our [], so we need to use [ and ] instead.
22705 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22706 if test "x$has_forbidden_chars" != x; then
22707 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22708 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22709 fi
22710
22711
22712 windows_path="$new_path"
22713 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22714 unix_path=`$CYGPATH -u "$windows_path"`
22715 new_path="$unix_path"
22716 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22717 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22718 new_path="$unix_path"
22719 fi
22720
22721 if test "x$path" != "x$new_path"; then
22722 BOOT_JDK="$new_path"
22723 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22724 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22725 fi
22726
22727 # Save the first 10 bytes of this path to the storage, so fixpath can work.
22728 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22729
22730 else
22731 # We're on a unix platform. Hooray! :)
22732 path="$BOOT_JDK"
22733 has_space=`$ECHO "$path" | $GREP " "`
22734 if test "x$has_space" != x; then
22735 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22736 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22737 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22738 fi
22739
22740 # Use eval to expand a potential ~
22741 eval path="$path"
22742 if test ! -f "$path" && test ! -d "$path"; then
22743 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22744 fi
22745
22746 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22747 fi
22748 fi
22749
22750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22751 $as_echo_n "checking for Boot JDK... " >&6; }
22752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22753 $as_echo "$BOOT_JDK" >&6; }
22754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22755 $as_echo_n "checking Boot JDK version... " >&6; }
22756 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
22757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22758 $as_echo "$BOOT_JDK_VERSION" >&6; }
22759 fi # end check jdk version
22760 fi # end check javac
22761 fi # end check java
22762 fi # end check boot jdk found
22763 fi
22764
22765
22766 # Test: Is there a JDK installed in default, well-known locations?
22767
22768 if test "x$BOOT_JDK_FOUND" = xno; then
22769 # Now execute the test
22770
22771 if test "x$OPENJDK_TARGET_OS" = xwindows; then
22772
22773 if test "x$BOOT_JDK_FOUND" = xno; then
22774 # Now execute the test
22775
22776 if test "x$ProgramW6432" != x; then
22777 VIRTUAL_DIR="$ProgramW6432/Java"
22778
22779 windows_path="$VIRTUAL_DIR"
22780 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22781 unix_path=`$CYGPATH -u "$windows_path"`
22782 VIRTUAL_DIR="$unix_path"
22783 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22784 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22785 VIRTUAL_DIR="$unix_path"
22786 fi
22787
22788
22789 BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22790 BOOT_JDK_SUFFIX=""
22791 ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22792 if test "x$ALL_JDKS_FOUND" != x; then
22793 for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22794
22795 if test "x$BOOT_JDK_FOUND" = xno; then
22796 # Now execute the test
22797
22798 BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22799 if test -d "$BOOT_JDK"; then
22800 BOOT_JDK_FOUND=maybe
22801 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22802 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22803 fi
22804
22805
22806 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22807 if test "x$BOOT_JDK_FOUND" = xmaybe; then
22808 # Do we have a bin/java?
22809 if test ! -x "$BOOT_JDK/bin/java"; then
22810 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22811 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22812 BOOT_JDK_FOUND=no
22813 else
22814 # Do we have a bin/javac?
22815 if test ! -x "$BOOT_JDK/bin/javac"; then
22816 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22817 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22818 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22819 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22820 BOOT_JDK_FOUND=no
22821 else
22822 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22823 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22824
22825 # Extra M4 quote needed to protect [] in grep expression.
22826 FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[89]\.'`
22827 if test "x$FOUND_CORRECT_VERSION" = x; then
22828 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22829 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22830 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22831 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22832 BOOT_JDK_FOUND=no
22833 else
22834 # We're done! :-)
22835 BOOT_JDK_FOUND=yes
22836
22837 # Only process if variable expands to non-empty
22838
22839 if test "x$BOOT_JDK" != x; then
22840 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22841
22842 # Input might be given as Windows format, start by converting to
22843 # unix format.
22844 path="$BOOT_JDK"
22845 new_path=`$CYGPATH -u "$path"`
22846
22847 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22848 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22849 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22850 # "foo.exe" is OK but "foo" is an error.
22851 #
22852 # This test is therefore slightly more accurate than "test -f" to check for file precense.
22853 # It is also a way to make sure we got the proper file name for the real test later on.
22854 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22855 if test "x$test_shortpath" = x; then
22856 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22857 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22858 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22859 fi
22860
22861 # Call helper function which possibly converts this using DOS-style short mode.
22862 # If so, the updated path is stored in $new_path.
22863
22864 input_path="$new_path"
22865 # Check if we need to convert this using DOS-style short mode. If the path
22866 # contains just simple characters, use it. Otherwise (spaces, weird characters),
22867 # take no chances and rewrite it.
22868 # Note: m4 eats our [], so we need to use [ and ] instead.
22869 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22870 if test "x$has_forbidden_chars" != x; then
22871 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22872 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22873 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22874 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22875 # Going to short mode and back again did indeed matter. Since short mode is
22876 # case insensitive, let's make it lowercase to improve readability.
22877 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22878 # Now convert it back to Unix-style (cygpath)
22879 input_path=`$CYGPATH -u "$shortmode_path"`
22880 new_path="$input_path"
22881 fi
22882 fi
22883
22884 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22885 if test "x$test_cygdrive_prefix" = x; then
22886 # As a simple fix, exclude /usr/bin since it's not a real path.
22887 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22888 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22889 # a path prefixed by /cygdrive for fixpath to work.
22890 new_path="$CYGWIN_ROOT_PATH$input_path"
22891 fi
22892 fi
22893
22894
22895 if test "x$path" != "x$new_path"; then
22896 BOOT_JDK="$new_path"
22897 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22898 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22899 fi
22900
22901 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22902
22903 path="$BOOT_JDK"
22904 has_colon=`$ECHO $path | $GREP ^.:`
22905 new_path="$path"
22906 if test "x$has_colon" = x; then
22907 # Not in mixed or Windows style, start by that.
22908 new_path=`cmd //c echo $path`
22909 fi
22910
22911
22912 input_path="$new_path"
22913 # Check if we need to convert this using DOS-style short mode. If the path
22914 # contains just simple characters, use it. Otherwise (spaces, weird characters),
22915 # take no chances and rewrite it.
22916 # Note: m4 eats our [], so we need to use [ and ] instead.
22917 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22918 if test "x$has_forbidden_chars" != x; then
22919 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22920 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22921 fi
22922
22923
22924 windows_path="$new_path"
22925 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22926 unix_path=`$CYGPATH -u "$windows_path"`
22927 new_path="$unix_path"
22928 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22929 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22930 new_path="$unix_path"
22931 fi
22932
22933 if test "x$path" != "x$new_path"; then
22934 BOOT_JDK="$new_path"
22935 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22936 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22937 fi
22938
22939 # Save the first 10 bytes of this path to the storage, so fixpath can work.
22940 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22941
22942 else
22943 # We're on a unix platform. Hooray! :)
22944 path="$BOOT_JDK"
22945 has_space=`$ECHO "$path" | $GREP " "`
22946 if test "x$has_space" != x; then
22947 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22948 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22949 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22950 fi
22951
22952 # Use eval to expand a potential ~
22953 eval path="$path"
22954 if test ! -f "$path" && test ! -d "$path"; then
22955 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22956 fi
22957
22958 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22959 fi
22960 fi
22961
22962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22963 $as_echo_n "checking for Boot JDK... " >&6; }
22964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22965 $as_echo "$BOOT_JDK" >&6; }
22966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22967 $as_echo_n "checking Boot JDK version... " >&6; }
22968 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
22969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22970 $as_echo "$BOOT_JDK_VERSION" >&6; }
22971 fi # end check jdk version
22972 fi # end check javac
22973 fi # end check java
22974 fi # end check boot jdk found
22975 fi
22976
22977 done
22978 fi
22979
22980 fi
22981
22982
22983 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22984 if test "x$BOOT_JDK_FOUND" = xmaybe; then
22985 # Do we have a bin/java?
22986 if test ! -x "$BOOT_JDK/bin/java"; then
22987 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22988 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22989 BOOT_JDK_FOUND=no
22990 else
22991 # Do we have a bin/javac?
22992 if test ! -x "$BOOT_JDK/bin/javac"; then
22993 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22994 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22995 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22996 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22997 BOOT_JDK_FOUND=no
22998 else
22999 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23000 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23001
23002 # Extra M4 quote needed to protect [] in grep expression.
23003 FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[89]\.'`
23004 if test "x$FOUND_CORRECT_VERSION" = x; then
23005 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23006 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23007 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23008 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23009 BOOT_JDK_FOUND=no
23010 else
23011 # We're done! :-)
23012 BOOT_JDK_FOUND=yes
23013
23014 # Only process if variable expands to non-empty
23015
23016 if test "x$BOOT_JDK" != x; then
23017 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23018
23019 # Input might be given as Windows format, start by converting to
23020 # unix format.
23021 path="$BOOT_JDK"
23022 new_path=`$CYGPATH -u "$path"`
23023
23024 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23025 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23026 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23027 # "foo.exe" is OK but "foo" is an error.
23028 #
23029 # This test is therefore slightly more accurate than "test -f" to check for file precense.
23030 # It is also a way to make sure we got the proper file name for the real test later on.
23031 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23032 if test "x$test_shortpath" = x; then
23033 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23034 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23035 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23036 fi
23037
23038 # Call helper function which possibly converts this using DOS-style short mode.
23039 # If so, the updated path is stored in $new_path.
23040
23041 input_path="$new_path"
23042 # Check if we need to convert this using DOS-style short mode. If the path
23043 # contains just simple characters, use it. Otherwise (spaces, weird characters),
23044 # take no chances and rewrite it.
23045 # Note: m4 eats our [], so we need to use [ and ] instead.
23046 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23047 if test "x$has_forbidden_chars" != x; then
23048 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23049 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23050 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23051 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23052 # Going to short mode and back again did indeed matter. Since short mode is
23053 # case insensitive, let's make it lowercase to improve readability.
23054 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23055 # Now convert it back to Unix-style (cygpath)
23056 input_path=`$CYGPATH -u "$shortmode_path"`
23057 new_path="$input_path"
23058 fi
23059 fi
23060
23061 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23062 if test "x$test_cygdrive_prefix" = x; then
23063 # As a simple fix, exclude /usr/bin since it's not a real path.
23064 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23065 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23066 # a path prefixed by /cygdrive for fixpath to work.
23067 new_path="$CYGWIN_ROOT_PATH$input_path"
23068 fi
23069 fi
23070
23071
23072 if test "x$path" != "x$new_path"; then
23073 BOOT_JDK="$new_path"
23074 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23075 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23076 fi
23077
23078 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23079
23080 path="$BOOT_JDK"
23081 has_colon=`$ECHO $path | $GREP ^.:`
23082 new_path="$path"
23083 if test "x$has_colon" = x; then
23084 # Not in mixed or Windows style, start by that.
23085 new_path=`cmd //c echo $path`
23086 fi
23087
23088
23089 input_path="$new_path"
23090 # Check if we need to convert this using DOS-style short mode. If the path
23091 # contains just simple characters, use it. Otherwise (spaces, weird characters),
23092 # take no chances and rewrite it.
23093 # Note: m4 eats our [], so we need to use [ and ] instead.
23094 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23095 if test "x$has_forbidden_chars" != x; then
23096 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23097 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23098 fi
23099
23100
23101 windows_path="$new_path"
23102 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23103 unix_path=`$CYGPATH -u "$windows_path"`
23104 new_path="$unix_path"
23105 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23106 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23107 new_path="$unix_path"
23108 fi
23109
23110 if test "x$path" != "x$new_path"; then
23111 BOOT_JDK="$new_path"
23112 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23113 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23114 fi
23115
23116 # Save the first 10 bytes of this path to the storage, so fixpath can work.
23117 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23118
23119 else
23120 # We're on a unix platform. Hooray! :)
23121 path="$BOOT_JDK"
23122 has_space=`$ECHO "$path" | $GREP " "`
23123 if test "x$has_space" != x; then
23124 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23125 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23126 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23127 fi
23128
23129 # Use eval to expand a potential ~
23130 eval path="$path"
23131 if test ! -f "$path" && test ! -d "$path"; then
23132 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23133 fi
23134
23135 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23136 fi
23137 fi
23138
23139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23140 $as_echo_n "checking for Boot JDK... " >&6; }
23141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23142 $as_echo "$BOOT_JDK" >&6; }
23143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23144 $as_echo_n "checking Boot JDK version... " >&6; }
23145 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
23146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23147 $as_echo "$BOOT_JDK_VERSION" >&6; }
23148 fi # end check jdk version
23149 fi # end check javac
23150 fi # end check java
23151 fi # end check boot jdk found
23152 fi
23153
23154
23155 if test "x$BOOT_JDK_FOUND" = xno; then
23156 # Now execute the test
23157
23158 if test "x$PROGRAMW6432" != x; then
23159 VIRTUAL_DIR="$PROGRAMW6432/Java"
23160
23161 windows_path="$VIRTUAL_DIR"
23162 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23163 unix_path=`$CYGPATH -u "$windows_path"`
23164 VIRTUAL_DIR="$unix_path"
23165 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23166 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23167 VIRTUAL_DIR="$unix_path"
23168 fi
23169
23170
23171 BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23172 BOOT_JDK_SUFFIX=""
23173 ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23174 if test "x$ALL_JDKS_FOUND" != x; then
23175 for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23176
23177 if test "x$BOOT_JDK_FOUND" = xno; then
23178 # Now execute the test
23179
23180 BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23181 if test -d "$BOOT_JDK"; then
23182 BOOT_JDK_FOUND=maybe
23183 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23184 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23185 fi
23186
23187
23188 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23189 if test "x$BOOT_JDK_FOUND" = xmaybe; then
23190 # Do we have a bin/java?
23191 if test ! -x "$BOOT_JDK/bin/java"; then
23192 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23193 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23194 BOOT_JDK_FOUND=no
23195 else
23196 # Do we have a bin/javac?
23197 if test ! -x "$BOOT_JDK/bin/javac"; then
23198 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23199 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23200 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23201 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23202 BOOT_JDK_FOUND=no
23203 else
23204 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23205 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23206
23207 # Extra M4 quote needed to protect [] in grep expression.
23208 FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[89]\.'`
23209 if test "x$FOUND_CORRECT_VERSION" = x; then
23210 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23211 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23212 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23213 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23214 BOOT_JDK_FOUND=no
23215 else
23216 # We're done! :-)
23217 BOOT_JDK_FOUND=yes
23218
23219 # Only process if variable expands to non-empty
23220
23221 if test "x$BOOT_JDK" != x; then
23222 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23223
23224 # Input might be given as Windows format, start by converting to
23225 # unix format.
23226 path="$BOOT_JDK"
23227 new_path=`$CYGPATH -u "$path"`
23228
23229 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23230 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23231 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23232 # "foo.exe" is OK but "foo" is an error.
23233 #
23234 # This test is therefore slightly more accurate than "test -f" to check for file precense.
23235 # It is also a way to make sure we got the proper file name for the real test later on.
23236 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23237 if test "x$test_shortpath" = x; then
23238 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23239 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23240 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23241 fi
23242
23243 # Call helper function which possibly converts this using DOS-style short mode.
23244 # If so, the updated path is stored in $new_path.
23245
23246 input_path="$new_path"
23247 # Check if we need to convert this using DOS-style short mode. If the path
23248 # contains just simple characters, use it. Otherwise (spaces, weird characters),
23249 # take no chances and rewrite it.
23250 # Note: m4 eats our [], so we need to use [ and ] instead.
23251 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23252 if test "x$has_forbidden_chars" != x; then
23253 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23254 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23255 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23256 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23257 # Going to short mode and back again did indeed matter. Since short mode is
23258 # case insensitive, let's make it lowercase to improve readability.
23259 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23260 # Now convert it back to Unix-style (cygpath)
23261 input_path=`$CYGPATH -u "$shortmode_path"`
23262 new_path="$input_path"
23263 fi
23264 fi
23265
23266 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23267 if test "x$test_cygdrive_prefix" = x; then
23268 # As a simple fix, exclude /usr/bin since it's not a real path.
23269 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23270 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23271 # a path prefixed by /cygdrive for fixpath to work.
23272 new_path="$CYGWIN_ROOT_PATH$input_path"
23273 fi
23274 fi
23275
23276
23277 if test "x$path" != "x$new_path"; then
23278 BOOT_JDK="$new_path"
23279 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23280 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23281 fi
23282
23283 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23284
23285 path="$BOOT_JDK"
23286 has_colon=`$ECHO $path | $GREP ^.:`
23287 new_path="$path"
23288 if test "x$has_colon" = x; then
23289 # Not in mixed or Windows style, start by that.
23290 new_path=`cmd //c echo $path`
23291 fi
23292
23293
23294 input_path="$new_path"
23295 # Check if we need to convert this using DOS-style short mode. If the path
23296 # contains just simple characters, use it. Otherwise (spaces, weird characters),
23297 # take no chances and rewrite it.
23298 # Note: m4 eats our [], so we need to use [ and ] instead.
23299 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23300 if test "x$has_forbidden_chars" != x; then
23301 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23302 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23303 fi
23304
23305
23306 windows_path="$new_path"
23307 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23308 unix_path=`$CYGPATH -u "$windows_path"`
23309 new_path="$unix_path"
23310 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23311 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23312 new_path="$unix_path"
23313 fi
23314
23315 if test "x$path" != "x$new_path"; then
23316 BOOT_JDK="$new_path"
23317 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23318 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23319 fi
23320
23321 # Save the first 10 bytes of this path to the storage, so fixpath can work.
23322 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23323
23324 else
23325 # We're on a unix platform. Hooray! :)
23326 path="$BOOT_JDK"
23327 has_space=`$ECHO "$path" | $GREP " "`
23328 if test "x$has_space" != x; then
23329 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23330 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23331 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23332 fi
23333
23334 # Use eval to expand a potential ~
23335 eval path="$path"
23336 if test ! -f "$path" && test ! -d "$path"; then
23337 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23338 fi
23339
23340 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23341 fi
23342 fi
23343
23344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23345 $as_echo_n "checking for Boot JDK... " >&6; }
23346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23347 $as_echo "$BOOT_JDK" >&6; }
23348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23349 $as_echo_n "checking Boot JDK version... " >&6; }
23350 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
23351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23352 $as_echo "$BOOT_JDK_VERSION" >&6; }
23353 fi # end check jdk version
23354 fi # end check javac
23355 fi # end check java
23356 fi # end check boot jdk found
23357 fi
23358
23359 done
23360 fi
23361
23362 fi
23363
23364
23365 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23366 if test "x$BOOT_JDK_FOUND" = xmaybe; then
23367 # Do we have a bin/java?
23368 if test ! -x "$BOOT_JDK/bin/java"; then
23369 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23370 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23371 BOOT_JDK_FOUND=no
23372 else
23373 # Do we have a bin/javac?
23374 if test ! -x "$BOOT_JDK/bin/javac"; then
23375 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23376 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23377 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23378 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23379 BOOT_JDK_FOUND=no
23380 else
23381 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23382 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23383
23384 # Extra M4 quote needed to protect [] in grep expression.
23385 FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[89]\.'`
23386 if test "x$FOUND_CORRECT_VERSION" = x; then
23387 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23388 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23389 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23390 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23391 BOOT_JDK_FOUND=no
23392 else
23393 # We're done! :-)
23394 BOOT_JDK_FOUND=yes
23395
23396 # Only process if variable expands to non-empty
23397
23398 if test "x$BOOT_JDK" != x; then
23399 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23400
23401 # Input might be given as Windows format, start by converting to
23402 # unix format.
23403 path="$BOOT_JDK"
23404 new_path=`$CYGPATH -u "$path"`
23405
23406 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23407 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23408 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23409 # "foo.exe" is OK but "foo" is an error.
23410 #
23411 # This test is therefore slightly more accurate than "test -f" to check for file precense.
23412 # It is also a way to make sure we got the proper file name for the real test later on.
23413 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23414 if test "x$test_shortpath" = x; then
23415 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23416 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23417 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23418 fi
23419
23420 # Call helper function which possibly converts this using DOS-style short mode.
23421 # If so, the updated path is stored in $new_path.
23422
23423 input_path="$new_path"
23424 # Check if we need to convert this using DOS-style short mode. If the path
23425 # contains just simple characters, use it. Otherwise (spaces, weird characters),
23426 # take no chances and rewrite it.
23427 # Note: m4 eats our [], so we need to use [ and ] instead.
23428 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23429 if test "x$has_forbidden_chars" != x; then
23430 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23431 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23432 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23433 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23434 # Going to short mode and back again did indeed matter. Since short mode is
23435 # case insensitive, let's make it lowercase to improve readability.
23436 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23437 # Now convert it back to Unix-style (cygpath)
23438 input_path=`$CYGPATH -u "$shortmode_path"`
23439 new_path="$input_path"
23440 fi
23441 fi
23442
23443 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23444 if test "x$test_cygdrive_prefix" = x; then
23445 # As a simple fix, exclude /usr/bin since it's not a real path.
23446 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23447 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23448 # a path prefixed by /cygdrive for fixpath to work.
23449 new_path="$CYGWIN_ROOT_PATH$input_path"
23450 fi
23451 fi
23452
23453
23454 if test "x$path" != "x$new_path"; then
23455 BOOT_JDK="$new_path"
23456 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23457 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23458 fi
23459
23460 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23461
23462 path="$BOOT_JDK"
23463 has_colon=`$ECHO $path | $GREP ^.:`
23464 new_path="$path"
23465 if test "x$has_colon" = x; then
23466 # Not in mixed or Windows style, start by that.
23467 new_path=`cmd //c echo $path`
23468 fi
23469
23470
23471 input_path="$new_path"
23472 # Check if we need to convert this using DOS-style short mode. If the path
23473 # contains just simple characters, use it. Otherwise (spaces, weird characters),
23474 # take no chances and rewrite it.
23475 # Note: m4 eats our [], so we need to use [ and ] instead.
23476 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23477 if test "x$has_forbidden_chars" != x; then
23478 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23479 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23480 fi
23481
23482
23483 windows_path="$new_path"
23484 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23485 unix_path=`$CYGPATH -u "$windows_path"`
23486 new_path="$unix_path"
23487 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23488 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23489 new_path="$unix_path"
23490 fi
23491
23492 if test "x$path" != "x$new_path"; then
23493 BOOT_JDK="$new_path"
23494 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23495 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23496 fi
23497
23498 # Save the first 10 bytes of this path to the storage, so fixpath can work.
23499 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23500
23501 else
23502 # We're on a unix platform. Hooray! :)
23503 path="$BOOT_JDK"
23504 has_space=`$ECHO "$path" | $GREP " "`
23505 if test "x$has_space" != x; then
23506 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23507 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23508 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23509 fi
23510
23511 # Use eval to expand a potential ~
23512 eval path="$path"
23513 if test ! -f "$path" && test ! -d "$path"; then
23514 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23515 fi
23516
23517 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23518 fi
23519 fi
23520
23521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23522 $as_echo_n "checking for Boot JDK... " >&6; }
23523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23524 $as_echo "$BOOT_JDK" >&6; }
23525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23526 $as_echo_n "checking Boot JDK version... " >&6; }
23527 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
23528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23529 $as_echo "$BOOT_JDK_VERSION" >&6; }
23530 fi # end check jdk version
23531 fi # end check javac
23532 fi # end check java
23533 fi # end check boot jdk found
23534 fi
23535
23536
23537 if test "x$BOOT_JDK_FOUND" = xno; then
23538 # Now execute the test
23539
23540 if test "x$PROGRAMFILES" != x; then
23541 VIRTUAL_DIR="$PROGRAMFILES/Java"
23542
23543 windows_path="$VIRTUAL_DIR"
23544 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23545 unix_path=`$CYGPATH -u "$windows_path"`
23546 VIRTUAL_DIR="$unix_path"
23547 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23548 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23549 VIRTUAL_DIR="$unix_path"
23550 fi
23551
23552
23553 BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23554 BOOT_JDK_SUFFIX=""
23555 ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23556 if test "x$ALL_JDKS_FOUND" != x; then
23557 for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23558
23559 if test "x$BOOT_JDK_FOUND" = xno; then
23560 # Now execute the test
23561
23562 BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23563 if test -d "$BOOT_JDK"; then
23564 BOOT_JDK_FOUND=maybe
23565 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23566 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23567 fi
23568
23569
23570 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23571 if test "x$BOOT_JDK_FOUND" = xmaybe; then
23572 # Do we have a bin/java?
23573 if test ! -x "$BOOT_JDK/bin/java"; then
23574 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23575 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23576 BOOT_JDK_FOUND=no
23577 else
23578 # Do we have a bin/javac?
23579 if test ! -x "$BOOT_JDK/bin/javac"; then
23580 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23581 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23582 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23583 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23584 BOOT_JDK_FOUND=no
23585 else
23586 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23587 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23588
23589 # Extra M4 quote needed to protect [] in grep expression.
23590 FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[89]\.'`
23591 if test "x$FOUND_CORRECT_VERSION" = x; then
23592 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23593 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23594 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23595 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23596 BOOT_JDK_FOUND=no
23597 else
23598 # We're done! :-)
23599 BOOT_JDK_FOUND=yes
23600
23601 # Only process if variable expands to non-empty
23602
23603 if test "x$BOOT_JDK" != x; then
23604 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23605
23606 # Input might be given as Windows format, start by converting to
23607 # unix format.
23608 path="$BOOT_JDK"
23609 new_path=`$CYGPATH -u "$path"`
23610
23611 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23612 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23613 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23614 # "foo.exe" is OK but "foo" is an error.
23615 #
23616 # This test is therefore slightly more accurate than "test -f" to check for file precense.
23617 # It is also a way to make sure we got the proper file name for the real test later on.
23618 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23619 if test "x$test_shortpath" = x; then
23620 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23621 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23622 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23623 fi
23624
23625 # Call helper function which possibly converts this using DOS-style short mode.
23626 # If so, the updated path is stored in $new_path.
23627
23628 input_path="$new_path"
23629 # Check if we need to convert this using DOS-style short mode. If the path
23630 # contains just simple characters, use it. Otherwise (spaces, weird characters),
23631 # take no chances and rewrite it.
23632 # Note: m4 eats our [], so we need to use [ and ] instead.
23633 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23634 if test "x$has_forbidden_chars" != x; then
23635 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23636 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23637 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23638 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23639 # Going to short mode and back again did indeed matter. Since short mode is
23640 # case insensitive, let's make it lowercase to improve readability.
23641 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23642 # Now convert it back to Unix-style (cygpath)
23643 input_path=`$CYGPATH -u "$shortmode_path"`
23644 new_path="$input_path"
23645 fi
23646 fi
23647
23648 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23649 if test "x$test_cygdrive_prefix" = x; then
23650 # As a simple fix, exclude /usr/bin since it's not a real path.
23651 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23652 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23653 # a path prefixed by /cygdrive for fixpath to work.
23654 new_path="$CYGWIN_ROOT_PATH$input_path"
23655 fi
23656 fi
23657
23658
23659 if test "x$path" != "x$new_path"; then
23660 BOOT_JDK="$new_path"
23661 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23662 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23663 fi
23664
23665 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23666
23667 path="$BOOT_JDK"
23668 has_colon=`$ECHO $path | $GREP ^.:`
23669 new_path="$path"
23670 if test "x$has_colon" = x; then
23671 # Not in mixed or Windows style, start by that.
23672 new_path=`cmd //c echo $path`
23673 fi
23674
23675
23676 input_path="$new_path"
23677 # Check if we need to convert this using DOS-style short mode. If the path
23678 # contains just simple characters, use it. Otherwise (spaces, weird characters),
23679 # take no chances and rewrite it.
23680 # Note: m4 eats our [], so we need to use [ and ] instead.
23681 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23682 if test "x$has_forbidden_chars" != x; then
23683 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23684 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23685 fi
23686
23687
23688 windows_path="$new_path"
23689 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23690 unix_path=`$CYGPATH -u "$windows_path"`
23691 new_path="$unix_path"
23692 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23693 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23694 new_path="$unix_path"
23695 fi
23696
23697 if test "x$path" != "x$new_path"; then
23698 BOOT_JDK="$new_path"
23699 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23700 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23701 fi
23702
23703 # Save the first 10 bytes of this path to the storage, so fixpath can work.
23704 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23705
23706 else
23707 # We're on a unix platform. Hooray! :)
23708 path="$BOOT_JDK"
23709 has_space=`$ECHO "$path" | $GREP " "`
23710 if test "x$has_space" != x; then
23711 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23712 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23713 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23714 fi
23715
23716 # Use eval to expand a potential ~
23717 eval path="$path"
23718 if test ! -f "$path" && test ! -d "$path"; then
23719 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23720 fi
23721
23722 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23723 fi
23724 fi
23725
23726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23727 $as_echo_n "checking for Boot JDK... " >&6; }
23728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23729 $as_echo "$BOOT_JDK" >&6; }
23730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23731 $as_echo_n "checking Boot JDK version... " >&6; }
23732 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
23733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23734 $as_echo "$BOOT_JDK_VERSION" >&6; }
23735 fi # end check jdk version
23736 fi # end check javac
23737 fi # end check java
23738 fi # end check boot jdk found
23739 fi
23740
23741 done
23742 fi
23743
23744 fi
23745
23746
23747 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23748 if test "x$BOOT_JDK_FOUND" = xmaybe; then
23749 # Do we have a bin/java?
23750 if test ! -x "$BOOT_JDK/bin/java"; then
23751 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23752 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23753 BOOT_JDK_FOUND=no
23754 else
23755 # Do we have a bin/javac?
23756 if test ! -x "$BOOT_JDK/bin/javac"; then
23757 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23758 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23759 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23760 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23761 BOOT_JDK_FOUND=no
23762 else
23763 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23764 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23765
23766 # Extra M4 quote needed to protect [] in grep expression.
23767 FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[89]\.'`
23768 if test "x$FOUND_CORRECT_VERSION" = x; then
23769 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23770 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23771 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23772 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23773 BOOT_JDK_FOUND=no
23774 else
23775 # We're done! :-)
23776 BOOT_JDK_FOUND=yes
23777
23778 # Only process if variable expands to non-empty
23779
23780 if test "x$BOOT_JDK" != x; then
23781 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23782
23783 # Input might be given as Windows format, start by converting to
23784 # unix format.
23785 path="$BOOT_JDK"
23786 new_path=`$CYGPATH -u "$path"`
23787
23788 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23789 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23790 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23791 # "foo.exe" is OK but "foo" is an error.
23792 #
23793 # This test is therefore slightly more accurate than "test -f" to check for file precense.
23794 # It is also a way to make sure we got the proper file name for the real test later on.
23795 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23796 if test "x$test_shortpath" = x; then
23797 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23798 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23799 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23800 fi
23801
23802 # Call helper function which possibly converts this using DOS-style short mode.
23803 # If so, the updated path is stored in $new_path.
23804
23805 input_path="$new_path"
23806 # Check if we need to convert this using DOS-style short mode. If the path
23807 # contains just simple characters, use it. Otherwise (spaces, weird characters),
23808 # take no chances and rewrite it.
23809 # Note: m4 eats our [], so we need to use [ and ] instead.
23810 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23811 if test "x$has_forbidden_chars" != x; then
23812 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23813 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23814 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23815 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23816 # Going to short mode and back again did indeed matter. Since short mode is
23817 # case insensitive, let's make it lowercase to improve readability.
23818 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23819 # Now convert it back to Unix-style (cygpath)
23820 input_path=`$CYGPATH -u "$shortmode_path"`
23821 new_path="$input_path"
23822 fi
23823 fi
23824
23825 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23826 if test "x$test_cygdrive_prefix" = x; then
23827 # As a simple fix, exclude /usr/bin since it's not a real path.
23828 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23829 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23830 # a path prefixed by /cygdrive for fixpath to work.
23831 new_path="$CYGWIN_ROOT_PATH$input_path"
23832 fi
23833 fi
23834
23835
23836 if test "x$path" != "x$new_path"; then
23837 BOOT_JDK="$new_path"
23838 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23839 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23840 fi
23841
23842 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23843
23844 path="$BOOT_JDK"
23845 has_colon=`$ECHO $path | $GREP ^.:`
23846 new_path="$path"
23847 if test "x$has_colon" = x; then
23848 # Not in mixed or Windows style, start by that.
23849 new_path=`cmd //c echo $path`
23850 fi
23851
23852
23853 input_path="$new_path"
23854 # Check if we need to convert this using DOS-style short mode. If the path
23855 # contains just simple characters, use it. Otherwise (spaces, weird characters),
23856 # take no chances and rewrite it.
23857 # Note: m4 eats our [], so we need to use [ and ] instead.
23858 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23859 if test "x$has_forbidden_chars" != x; then
23860 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23861 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23862 fi
23863
23864
23865 windows_path="$new_path"
23866 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23867 unix_path=`$CYGPATH -u "$windows_path"`
23868 new_path="$unix_path"
23869 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23870 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23871 new_path="$unix_path"
23872 fi
23873
23874 if test "x$path" != "x$new_path"; then
23875 BOOT_JDK="$new_path"
23876 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23877 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23878 fi
23879
23880 # Save the first 10 bytes of this path to the storage, so fixpath can work.
23881 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23882
23883 else
23884 # We're on a unix platform. Hooray! :)
23885 path="$BOOT_JDK"
23886 has_space=`$ECHO "$path" | $GREP " "`
23887 if test "x$has_space" != x; then
23888 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23889 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23890 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23891 fi
23892
23893 # Use eval to expand a potential ~
23894 eval path="$path"
23895 if test ! -f "$path" && test ! -d "$path"; then
23896 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23897 fi
23898
23899 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23900 fi
23901 fi
23902
23903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23904 $as_echo_n "checking for Boot JDK... " >&6; }
23905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23906 $as_echo "$BOOT_JDK" >&6; }
23907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23908 $as_echo_n "checking Boot JDK version... " >&6; }
23909 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
23910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23911 $as_echo "$BOOT_JDK_VERSION" >&6; }
23912 fi # end check jdk version
23913 fi # end check javac
23914 fi # end check java
23915 fi # end check boot jdk found
23916 fi
23917
23918
23919 if test "x$BOOT_JDK_FOUND" = xno; then
23920 # Now execute the test
23921
23922 if test "x$ProgramFiles" != x; then
23923 VIRTUAL_DIR="$ProgramFiles/Java"
23924
23925 windows_path="$VIRTUAL_DIR"
23926 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23927 unix_path=`$CYGPATH -u "$windows_path"`
23928 VIRTUAL_DIR="$unix_path"
23929 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23930 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23931 VIRTUAL_DIR="$unix_path"
23932 fi
23933
23934
23935 BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23936 BOOT_JDK_SUFFIX=""
23937 ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23938 if test "x$ALL_JDKS_FOUND" != x; then
23939 for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23940
23941 if test "x$BOOT_JDK_FOUND" = xno; then
23942 # Now execute the test
23943
23944 BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23945 if test -d "$BOOT_JDK"; then
23946 BOOT_JDK_FOUND=maybe
23947 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23948 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23949 fi
23950
23951
23952 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23953 if test "x$BOOT_JDK_FOUND" = xmaybe; then
23954 # Do we have a bin/java?
23955 if test ! -x "$BOOT_JDK/bin/java"; then
23956 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23957 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23958 BOOT_JDK_FOUND=no
23959 else
23960 # Do we have a bin/javac?
23961 if test ! -x "$BOOT_JDK/bin/javac"; then
23962 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23963 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23964 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23965 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23966 BOOT_JDK_FOUND=no
23967 else
23968 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23969 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23970
23971 # Extra M4 quote needed to protect [] in grep expression.
23972 FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[89]\.'`
23973 if test "x$FOUND_CORRECT_VERSION" = x; then
23974 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23975 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23976 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23977 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23978 BOOT_JDK_FOUND=no
23979 else
23980 # We're done! :-)
23981 BOOT_JDK_FOUND=yes
23982
23983 # Only process if variable expands to non-empty
23984
23985 if test "x$BOOT_JDK" != x; then
23986 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23987
23988 # Input might be given as Windows format, start by converting to
23989 # unix format.
23990 path="$BOOT_JDK"
23991 new_path=`$CYGPATH -u "$path"`
23992
23993 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23994 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23995 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23996 # "foo.exe" is OK but "foo" is an error.
23997 #
23998 # This test is therefore slightly more accurate than "test -f" to check for file precense.
23999 # It is also a way to make sure we got the proper file name for the real test later on.
24000 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24001 if test "x$test_shortpath" = x; then
24002 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24003 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24004 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24005 fi
24006
24007 # Call helper function which possibly converts this using DOS-style short mode.
24008 # If so, the updated path is stored in $new_path.
24009
24010 input_path="$new_path"
24011 # Check if we need to convert this using DOS-style short mode. If the path
24012 # contains just simple characters, use it. Otherwise (spaces, weird characters),
24013 # take no chances and rewrite it.
24014 # Note: m4 eats our [], so we need to use [ and ] instead.
24015 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24016 if test "x$has_forbidden_chars" != x; then
24017 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24018 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24019 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24020 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24021 # Going to short mode and back again did indeed matter. Since short mode is
24022 # case insensitive, let's make it lowercase to improve readability.
24023 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24024 # Now convert it back to Unix-style (cygpath)
24025 input_path=`$CYGPATH -u "$shortmode_path"`
24026 new_path="$input_path"
24027 fi
24028 fi
24029
24030 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24031 if test "x$test_cygdrive_prefix" = x; then
24032 # As a simple fix, exclude /usr/bin since it's not a real path.
24033 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24034 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24035 # a path prefixed by /cygdrive for fixpath to work.
24036 new_path="$CYGWIN_ROOT_PATH$input_path"
24037 fi
24038 fi
24039
24040
24041 if test "x$path" != "x$new_path"; then
24042 BOOT_JDK="$new_path"
24043 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24044 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24045 fi
24046
24047 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24048
24049 path="$BOOT_JDK"
24050 has_colon=`$ECHO $path | $GREP ^.:`
24051 new_path="$path"
24052 if test "x$has_colon" = x; then
24053 # Not in mixed or Windows style, start by that.
24054 new_path=`cmd //c echo $path`
24055 fi
24056
24057
24058 input_path="$new_path"
24059 # Check if we need to convert this using DOS-style short mode. If the path
24060 # contains just simple characters, use it. Otherwise (spaces, weird characters),
24061 # take no chances and rewrite it.
24062 # Note: m4 eats our [], so we need to use [ and ] instead.
24063 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24064 if test "x$has_forbidden_chars" != x; then
24065 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24066 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24067 fi
24068
24069
24070 windows_path="$new_path"
24071 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24072 unix_path=`$CYGPATH -u "$windows_path"`
24073 new_path="$unix_path"
24074 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24075 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24076 new_path="$unix_path"
24077 fi
24078
24079 if test "x$path" != "x$new_path"; then
24080 BOOT_JDK="$new_path"
24081 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24082 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24083 fi
24084
24085 # Save the first 10 bytes of this path to the storage, so fixpath can work.
24086 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24087
24088 else
24089 # We're on a unix platform. Hooray! :)
24090 path="$BOOT_JDK"
24091 has_space=`$ECHO "$path" | $GREP " "`
24092 if test "x$has_space" != x; then
24093 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24094 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24095 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24096 fi
24097
24098 # Use eval to expand a potential ~
24099 eval path="$path"
24100 if test ! -f "$path" && test ! -d "$path"; then
24101 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24102 fi
24103
24104 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24105 fi
24106 fi
24107
24108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24109 $as_echo_n "checking for Boot JDK... " >&6; }
24110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24111 $as_echo "$BOOT_JDK" >&6; }
24112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24113 $as_echo_n "checking Boot JDK version... " >&6; }
24114 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
24115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24116 $as_echo "$BOOT_JDK_VERSION" >&6; }
24117 fi # end check jdk version
24118 fi # end check javac
24119 fi # end check java
24120 fi # end check boot jdk found
24121 fi
24122
24123 done
24124 fi
24125
24126 fi
24127
24128
24129 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24130 if test "x$BOOT_JDK_FOUND" = xmaybe; then
24131 # Do we have a bin/java?
24132 if test ! -x "$BOOT_JDK/bin/java"; then
24133 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24134 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24135 BOOT_JDK_FOUND=no
24136 else
24137 # Do we have a bin/javac?
24138 if test ! -x "$BOOT_JDK/bin/javac"; then
24139 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24140 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24141 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24142 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24143 BOOT_JDK_FOUND=no
24144 else
24145 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24146 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24147
24148 # Extra M4 quote needed to protect [] in grep expression.
24149 FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[89]\.'`
24150 if test "x$FOUND_CORRECT_VERSION" = x; then
24151 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24152 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24153 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24154 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24155 BOOT_JDK_FOUND=no
24156 else
24157 # We're done! :-)
24158 BOOT_JDK_FOUND=yes
24159
24160 # Only process if variable expands to non-empty
24161
24162 if test "x$BOOT_JDK" != x; then
24163 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24164
24165 # Input might be given as Windows format, start by converting to
24166 # unix format.
24167 path="$BOOT_JDK"
24168 new_path=`$CYGPATH -u "$path"`
24169
24170 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24171 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24172 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24173 # "foo.exe" is OK but "foo" is an error.
24174 #
24175 # This test is therefore slightly more accurate than "test -f" to check for file precense.
24176 # It is also a way to make sure we got the proper file name for the real test later on.
24177 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24178 if test "x$test_shortpath" = x; then
24179 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24180 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24181 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24182 fi
24183
24184 # Call helper function which possibly converts this using DOS-style short mode.
24185 # If so, the updated path is stored in $new_path.
24186
24187 input_path="$new_path"
24188 # Check if we need to convert this using DOS-style short mode. If the path
24189 # contains just simple characters, use it. Otherwise (spaces, weird characters),
24190 # take no chances and rewrite it.
24191 # Note: m4 eats our [], so we need to use [ and ] instead.
24192 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24193 if test "x$has_forbidden_chars" != x; then
24194 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24195 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24196 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24197 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24198 # Going to short mode and back again did indeed matter. Since short mode is
24199 # case insensitive, let's make it lowercase to improve readability.
24200 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24201 # Now convert it back to Unix-style (cygpath)
24202 input_path=`$CYGPATH -u "$shortmode_path"`
24203 new_path="$input_path"
24204 fi
24205 fi
24206
24207 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24208 if test "x$test_cygdrive_prefix" = x; then
24209 # As a simple fix, exclude /usr/bin since it's not a real path.
24210 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24211 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24212 # a path prefixed by /cygdrive for fixpath to work.
24213 new_path="$CYGWIN_ROOT_PATH$input_path"
24214 fi
24215 fi
24216
24217
24218 if test "x$path" != "x$new_path"; then
24219 BOOT_JDK="$new_path"
24220 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24221 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24222 fi
24223
24224 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24225
24226 path="$BOOT_JDK"
24227 has_colon=`$ECHO $path | $GREP ^.:`
24228 new_path="$path"
24229 if test "x$has_colon" = x; then
24230 # Not in mixed or Windows style, start by that.
24231 new_path=`cmd //c echo $path`
24232 fi
24233
24234
24235 input_path="$new_path"
24236 # Check if we need to convert this using DOS-style short mode. If the path
24237 # contains just simple characters, use it. Otherwise (spaces, weird characters),
24238 # take no chances and rewrite it.
24239 # Note: m4 eats our [], so we need to use [ and ] instead.
24240 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24241 if test "x$has_forbidden_chars" != x; then
24242 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24243 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24244 fi
24245
24246
24247 windows_path="$new_path"
24248 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24249 unix_path=`$CYGPATH -u "$windows_path"`
24250 new_path="$unix_path"
24251 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24252 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24253 new_path="$unix_path"
24254 fi
24255
24256 if test "x$path" != "x$new_path"; then
24257 BOOT_JDK="$new_path"
24258 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24259 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24260 fi
24261
24262 # Save the first 10 bytes of this path to the storage, so fixpath can work.
24263 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24264
24265 else
24266 # We're on a unix platform. Hooray! :)
24267 path="$BOOT_JDK"
24268 has_space=`$ECHO "$path" | $GREP " "`
24269 if test "x$has_space" != x; then
24270 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24271 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24272 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24273 fi
24274
24275 # Use eval to expand a potential ~
24276 eval path="$path"
24277 if test ! -f "$path" && test ! -d "$path"; then
24278 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24279 fi
24280
24281 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24282 fi
24283 fi
24284
24285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24286 $as_echo_n "checking for Boot JDK... " >&6; }
24287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24288 $as_echo "$BOOT_JDK" >&6; }
24289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24290 $as_echo_n "checking Boot JDK version... " >&6; }
24291 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
24292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24293 $as_echo "$BOOT_JDK_VERSION" >&6; }
24294 fi # end check jdk version
24295 fi # end check javac
24296 fi # end check java
24297 fi # end check boot jdk found
24298 fi
24299
24300
24301 if test "x$BOOT_JDK_FOUND" = xno; then
24302 # Now execute the test
24303
24304 BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
24305 BOOT_JDK_SUFFIX=""
24306 ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24307 if test "x$ALL_JDKS_FOUND" != x; then
24308 for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24309
24310 if test "x$BOOT_JDK_FOUND" = xno; then
24311 # Now execute the test
24312
24313 BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24314 if test -d "$BOOT_JDK"; then
24315 BOOT_JDK_FOUND=maybe
24316 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24317 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24318 fi
24319
24320
24321 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24322 if test "x$BOOT_JDK_FOUND" = xmaybe; then
24323 # Do we have a bin/java?
24324 if test ! -x "$BOOT_JDK/bin/java"; then
24325 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24326 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24327 BOOT_JDK_FOUND=no
24328 else
24329 # Do we have a bin/javac?
24330 if test ! -x "$BOOT_JDK/bin/javac"; then
24331 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24332 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24333 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24334 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24335 BOOT_JDK_FOUND=no
24336 else
24337 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24338 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24339
24340 # Extra M4 quote needed to protect [] in grep expression.
24341 FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[89]\.'`
24342 if test "x$FOUND_CORRECT_VERSION" = x; then
24343 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24344 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24345 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24346 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24347 BOOT_JDK_FOUND=no
24348 else
24349 # We're done! :-)
24350 BOOT_JDK_FOUND=yes
24351
24352 # Only process if variable expands to non-empty
24353
24354 if test "x$BOOT_JDK" != x; then
24355 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24356
24357 # Input might be given as Windows format, start by converting to
24358 # unix format.
24359 path="$BOOT_JDK"
24360 new_path=`$CYGPATH -u "$path"`
24361
24362 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24363 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24364 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24365 # "foo.exe" is OK but "foo" is an error.
24366 #
24367 # This test is therefore slightly more accurate than "test -f" to check for file precense.
24368 # It is also a way to make sure we got the proper file name for the real test later on.
24369 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24370 if test "x$test_shortpath" = x; then
24371 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24372 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24373 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24374 fi
24375
24376 # Call helper function which possibly converts this using DOS-style short mode.
24377 # If so, the updated path is stored in $new_path.
24378
24379 input_path="$new_path"
24380 # Check if we need to convert this using DOS-style short mode. If the path
24381 # contains just simple characters, use it. Otherwise (spaces, weird characters),
24382 # take no chances and rewrite it.
24383 # Note: m4 eats our [], so we need to use [ and ] instead.
24384 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24385 if test "x$has_forbidden_chars" != x; then
24386 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24387 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24388 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24389 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24390 # Going to short mode and back again did indeed matter. Since short mode is
24391 # case insensitive, let's make it lowercase to improve readability.
24392 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24393 # Now convert it back to Unix-style (cygpath)
24394 input_path=`$CYGPATH -u "$shortmode_path"`
24395 new_path="$input_path"
24396 fi
24397 fi
24398
24399 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24400 if test "x$test_cygdrive_prefix" = x; then
24401 # As a simple fix, exclude /usr/bin since it's not a real path.
24402 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24403 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24404 # a path prefixed by /cygdrive for fixpath to work.
24405 new_path="$CYGWIN_ROOT_PATH$input_path"
24406 fi
24407 fi
24408
24409
24410 if test "x$path" != "x$new_path"; then
24411 BOOT_JDK="$new_path"
24412 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24413 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24414 fi
24415
24416 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24417
24418 path="$BOOT_JDK"
24419 has_colon=`$ECHO $path | $GREP ^.:`
24420 new_path="$path"
24421 if test "x$has_colon" = x; then
24422 # Not in mixed or Windows style, start by that.
24423 new_path=`cmd //c echo $path`
24424 fi
24425
24426
24427 input_path="$new_path"
24428 # Check if we need to convert this using DOS-style short mode. If the path
24429 # contains just simple characters, use it. Otherwise (spaces, weird characters),
24430 # take no chances and rewrite it.
24431 # Note: m4 eats our [], so we need to use [ and ] instead.
24432 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24433 if test "x$has_forbidden_chars" != x; then
24434 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24435 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24436 fi
24437
24438
24439 windows_path="$new_path"
24440 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24441 unix_path=`$CYGPATH -u "$windows_path"`
24442 new_path="$unix_path"
24443 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24444 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24445 new_path="$unix_path"
24446 fi
24447
24448 if test "x$path" != "x$new_path"; then
24449 BOOT_JDK="$new_path"
24450 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24451 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24452 fi
24453
24454 # Save the first 10 bytes of this path to the storage, so fixpath can work.
24455 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24456
24457 else
24458 # We're on a unix platform. Hooray! :)
24459 path="$BOOT_JDK"
24460 has_space=`$ECHO "$path" | $GREP " "`
24461 if test "x$has_space" != x; then
24462 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24463 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24464 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24465 fi
24466
24467 # Use eval to expand a potential ~
24468 eval path="$path"
24469 if test ! -f "$path" && test ! -d "$path"; then
24470 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24471 fi
24472
24473 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24474 fi
24475 fi
24476
24477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24478 $as_echo_n "checking for Boot JDK... " >&6; }
24479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24480 $as_echo "$BOOT_JDK" >&6; }
24481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24482 $as_echo_n "checking Boot JDK version... " >&6; }
24483 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
24484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24485 $as_echo "$BOOT_JDK_VERSION" >&6; }
24486 fi # end check jdk version
24487 fi # end check javac
24488 fi # end check java
24489 fi # end check boot jdk found
24490 fi
24491
24492 done
24493 fi
24494
24495
24496 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24497 if test "x$BOOT_JDK_FOUND" = xmaybe; then
24498 # Do we have a bin/java?
24499 if test ! -x "$BOOT_JDK/bin/java"; then
24500 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24501 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24502 BOOT_JDK_FOUND=no
24503 else
24504 # Do we have a bin/javac?
24505 if test ! -x "$BOOT_JDK/bin/javac"; then
24506 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24507 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24508 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24509 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24510 BOOT_JDK_FOUND=no
24511 else
24512 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24513 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24514
24515 # Extra M4 quote needed to protect [] in grep expression.
24516 FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[89]\.'`
24517 if test "x$FOUND_CORRECT_VERSION" = x; then
24518 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24519 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24520 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24521 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24522 BOOT_JDK_FOUND=no
24523 else
24524 # We're done! :-)
24525 BOOT_JDK_FOUND=yes
24526
24527 # Only process if variable expands to non-empty
24528
24529 if test "x$BOOT_JDK" != x; then
24530 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24531
24532 # Input might be given as Windows format, start by converting to
24533 # unix format.
24534 path="$BOOT_JDK"
24535 new_path=`$CYGPATH -u "$path"`
24536
24537 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24538 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24539 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24540 # "foo.exe" is OK but "foo" is an error.
24541 #
24542 # This test is therefore slightly more accurate than "test -f" to check for file precense.
24543 # It is also a way to make sure we got the proper file name for the real test later on.
24544 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24545 if test "x$test_shortpath" = x; then
24546 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24547 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24548 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24549 fi
24550
24551 # Call helper function which possibly converts this using DOS-style short mode.
24552 # If so, the updated path is stored in $new_path.
24553
24554 input_path="$new_path"
24555 # Check if we need to convert this using DOS-style short mode. If the path
24556 # contains just simple characters, use it. Otherwise (spaces, weird characters),
24557 # take no chances and rewrite it.
24558 # Note: m4 eats our [], so we need to use [ and ] instead.
24559 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24560 if test "x$has_forbidden_chars" != x; then
24561 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24562 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24563 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24564 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24565 # Going to short mode and back again did indeed matter. Since short mode is
24566 # case insensitive, let's make it lowercase to improve readability.
24567 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24568 # Now convert it back to Unix-style (cygpath)
24569 input_path=`$CYGPATH -u "$shortmode_path"`
24570 new_path="$input_path"
24571 fi
24572 fi
24573
24574 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24575 if test "x$test_cygdrive_prefix" = x; then
24576 # As a simple fix, exclude /usr/bin since it's not a real path.
24577 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24578 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24579 # a path prefixed by /cygdrive for fixpath to work.
24580 new_path="$CYGWIN_ROOT_PATH$input_path"
24581 fi
24582 fi
24583
24584
24585 if test "x$path" != "x$new_path"; then
24586 BOOT_JDK="$new_path"
24587 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24588 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24589 fi
24590
24591 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24592
24593 path="$BOOT_JDK"
24594 has_colon=`$ECHO $path | $GREP ^.:`
24595 new_path="$path"
24596 if test "x$has_colon" = x; then
24597 # Not in mixed or Windows style, start by that.
24598 new_path=`cmd //c echo $path`
24599 fi
24600
24601
24602 input_path="$new_path"
24603 # Check if we need to convert this using DOS-style short mode. If the path
24604 # contains just simple characters, use it. Otherwise (spaces, weird characters),
24605 # take no chances and rewrite it.
24606 # Note: m4 eats our [], so we need to use [ and ] instead.
24607 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24608 if test "x$has_forbidden_chars" != x; then
24609 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24610 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24611 fi
24612
24613
24614 windows_path="$new_path"
24615 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24616 unix_path=`$CYGPATH -u "$windows_path"`
24617 new_path="$unix_path"
24618 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24619 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24620 new_path="$unix_path"
24621 fi
24622
24623 if test "x$path" != "x$new_path"; then
24624 BOOT_JDK="$new_path"
24625 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24626 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24627 fi
24628
24629 # Save the first 10 bytes of this path to the storage, so fixpath can work.
24630 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24631
24632 else
24633 # We're on a unix platform. Hooray! :)
24634 path="$BOOT_JDK"
24635 has_space=`$ECHO "$path" | $GREP " "`
24636 if test "x$has_space" != x; then
24637 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24638 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24639 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24640 fi
24641
24642 # Use eval to expand a potential ~
24643 eval path="$path"
24644 if test ! -f "$path" && test ! -d "$path"; then
24645 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24646 fi
24647
24648 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24649 fi
24650 fi
24651
24652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24653 $as_echo_n "checking for Boot JDK... " >&6; }
24654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24655 $as_echo "$BOOT_JDK" >&6; }
24656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24657 $as_echo_n "checking Boot JDK version... " >&6; }
24658 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
24659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24660 $as_echo "$BOOT_JDK_VERSION" >&6; }
24661 fi # end check jdk version
24662 fi # end check javac
24663 fi # end check java
24664 fi # end check boot jdk found
24665 fi
24666
24667 elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
24668
24669 if test "x$BOOT_JDK_FOUND" = xno; then
24670 # Now execute the test
24671
24672 BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
24673 BOOT_JDK_SUFFIX="/Contents/Home"
24674 ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24675 if test "x$ALL_JDKS_FOUND" != x; then
24676 for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24677
24678 if test "x$BOOT_JDK_FOUND" = xno; then
24679 # Now execute the test
24680
24681 BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24682 if test -d "$BOOT_JDK"; then
24683 BOOT_JDK_FOUND=maybe
24684 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24685 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24686 fi
24687
24688
24689 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24690 if test "x$BOOT_JDK_FOUND" = xmaybe; then
24691 # Do we have a bin/java?
24692 if test ! -x "$BOOT_JDK/bin/java"; then
24693 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24694 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24695 BOOT_JDK_FOUND=no
24696 else
24697 # Do we have a bin/javac?
24698 if test ! -x "$BOOT_JDK/bin/javac"; then
24699 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24700 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24701 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24702 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24703 BOOT_JDK_FOUND=no
24704 else
24705 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24706 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24707
24708 # Extra M4 quote needed to protect [] in grep expression.
24709 FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[89]\.'`
24710 if test "x$FOUND_CORRECT_VERSION" = x; then
24711 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24712 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24713 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24714 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24715 BOOT_JDK_FOUND=no
24716 else
24717 # We're done! :-)
24718 BOOT_JDK_FOUND=yes
24719
24720 # Only process if variable expands to non-empty
24721
24722 if test "x$BOOT_JDK" != x; then
24723 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24724
24725 # Input might be given as Windows format, start by converting to
24726 # unix format.
24727 path="$BOOT_JDK"
24728 new_path=`$CYGPATH -u "$path"`
24729
24730 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24731 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24732 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24733 # "foo.exe" is OK but "foo" is an error.
24734 #
24735 # This test is therefore slightly more accurate than "test -f" to check for file precense.
24736 # It is also a way to make sure we got the proper file name for the real test later on.
24737 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24738 if test "x$test_shortpath" = x; then
24739 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24740 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24741 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24742 fi
24743
24744 # Call helper function which possibly converts this using DOS-style short mode.
24745 # If so, the updated path is stored in $new_path.
24746
24747 input_path="$new_path"
24748 # Check if we need to convert this using DOS-style short mode. If the path
24749 # contains just simple characters, use it. Otherwise (spaces, weird characters),
24750 # take no chances and rewrite it.
24751 # Note: m4 eats our [], so we need to use [ and ] instead.
24752 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24753 if test "x$has_forbidden_chars" != x; then
24754 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24755 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24756 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24757 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24758 # Going to short mode and back again did indeed matter. Since short mode is
24759 # case insensitive, let's make it lowercase to improve readability.
24760 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24761 # Now convert it back to Unix-style (cygpath)
24762 input_path=`$CYGPATH -u "$shortmode_path"`
24763 new_path="$input_path"
24764 fi
24765 fi
24766
24767 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24768 if test "x$test_cygdrive_prefix" = x; then
24769 # As a simple fix, exclude /usr/bin since it's not a real path.
24770 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24771 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24772 # a path prefixed by /cygdrive for fixpath to work.
24773 new_path="$CYGWIN_ROOT_PATH$input_path"
24774 fi
24775 fi
24776
24777
24778 if test "x$path" != "x$new_path"; then
24779 BOOT_JDK="$new_path"
24780 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24781 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24782 fi
24783
24784 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24785
24786 path="$BOOT_JDK"
24787 has_colon=`$ECHO $path | $GREP ^.:`
24788 new_path="$path"
24789 if test "x$has_colon" = x; then
24790 # Not in mixed or Windows style, start by that.
24791 new_path=`cmd //c echo $path`
24792 fi
24793
24794
24795 input_path="$new_path"
24796 # Check if we need to convert this using DOS-style short mode. If the path
24797 # contains just simple characters, use it. Otherwise (spaces, weird characters),
24798 # take no chances and rewrite it.
24799 # Note: m4 eats our [], so we need to use [ and ] instead.
24800 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24801 if test "x$has_forbidden_chars" != x; then
24802 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24803 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24804 fi
24805
24806
24807 windows_path="$new_path"
24808 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24809 unix_path=`$CYGPATH -u "$windows_path"`
24810 new_path="$unix_path"
24811 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24812 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24813 new_path="$unix_path"
24814 fi
24815
24816 if test "x$path" != "x$new_path"; then
24817 BOOT_JDK="$new_path"
24818 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24819 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24820 fi
24821
24822 # Save the first 10 bytes of this path to the storage, so fixpath can work.
24823 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24824
24825 else
24826 # We're on a unix platform. Hooray! :)
24827 path="$BOOT_JDK"
24828 has_space=`$ECHO "$path" | $GREP " "`
24829 if test "x$has_space" != x; then
24830 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24831 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24832 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24833 fi
24834
24835 # Use eval to expand a potential ~
24836 eval path="$path"
24837 if test ! -f "$path" && test ! -d "$path"; then
24838 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24839 fi
24840
24841 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24842 fi
24843 fi
24844
24845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24846 $as_echo_n "checking for Boot JDK... " >&6; }
24847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24848 $as_echo "$BOOT_JDK" >&6; }
24849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24850 $as_echo_n "checking Boot JDK version... " >&6; }
24851 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
24852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24853 $as_echo "$BOOT_JDK_VERSION" >&6; }
24854 fi # end check jdk version
24855 fi # end check javac
24856 fi # end check java
24857 fi # end check boot jdk found
24858 fi
24859
24860 done
24861 fi
24862
24863
24864 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24865 if test "x$BOOT_JDK_FOUND" = xmaybe; then
24866 # Do we have a bin/java?
24867 if test ! -x "$BOOT_JDK/bin/java"; then
24868 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24869 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24870 BOOT_JDK_FOUND=no
24871 else
24872 # Do we have a bin/javac?
24873 if test ! -x "$BOOT_JDK/bin/javac"; then
24874 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24875 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24876 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24877 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24878 BOOT_JDK_FOUND=no
24879 else
24880 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24881 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24882
24883 # Extra M4 quote needed to protect [] in grep expression.
24884 FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[89]\.'`
24885 if test "x$FOUND_CORRECT_VERSION" = x; then
24886 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24887 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24888 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24889 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24890 BOOT_JDK_FOUND=no
24891 else
24892 # We're done! :-)
24893 BOOT_JDK_FOUND=yes
24894
24895 # Only process if variable expands to non-empty
24896
24897 if test "x$BOOT_JDK" != x; then
24898 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24899
24900 # Input might be given as Windows format, start by converting to
24901 # unix format.
24902 path="$BOOT_JDK"
24903 new_path=`$CYGPATH -u "$path"`
24904
24905 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24906 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24907 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24908 # "foo.exe" is OK but "foo" is an error.
24909 #
24910 # This test is therefore slightly more accurate than "test -f" to check for file precense.
24911 # It is also a way to make sure we got the proper file name for the real test later on.
24912 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24913 if test "x$test_shortpath" = x; then
24914 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24915 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24916 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24917 fi
24918
24919 # Call helper function which possibly converts this using DOS-style short mode.
24920 # If so, the updated path is stored in $new_path.
24921
24922 input_path="$new_path"
24923 # Check if we need to convert this using DOS-style short mode. If the path
24924 # contains just simple characters, use it. Otherwise (spaces, weird characters),
24925 # take no chances and rewrite it.
24926 # Note: m4 eats our [], so we need to use [ and ] instead.
24927 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24928 if test "x$has_forbidden_chars" != x; then
24929 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24930 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24931 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24932 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24933 # Going to short mode and back again did indeed matter. Since short mode is
24934 # case insensitive, let's make it lowercase to improve readability.
24935 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24936 # Now convert it back to Unix-style (cygpath)
24937 input_path=`$CYGPATH -u "$shortmode_path"`
24938 new_path="$input_path"
24939 fi
24940 fi
24941
24942 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24943 if test "x$test_cygdrive_prefix" = x; then
24944 # As a simple fix, exclude /usr/bin since it's not a real path.
24945 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24946 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24947 # a path prefixed by /cygdrive for fixpath to work.
24948 new_path="$CYGWIN_ROOT_PATH$input_path"
24949 fi
24950 fi
24951
24952
24953 if test "x$path" != "x$new_path"; then
24954 BOOT_JDK="$new_path"
24955 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24956 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24957 fi
24958
24959 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24960
24961 path="$BOOT_JDK"
24962 has_colon=`$ECHO $path | $GREP ^.:`
24963 new_path="$path"
24964 if test "x$has_colon" = x; then
24965 # Not in mixed or Windows style, start by that.
24966 new_path=`cmd //c echo $path`
24967 fi
24968
24969
24970 input_path="$new_path"
24971 # Check if we need to convert this using DOS-style short mode. If the path
24972 # contains just simple characters, use it. Otherwise (spaces, weird characters),
24973 # take no chances and rewrite it.
24974 # Note: m4 eats our [], so we need to use [ and ] instead.
24975 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24976 if test "x$has_forbidden_chars" != x; then
24977 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24978 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24979 fi
24980
24981
24982 windows_path="$new_path"
24983 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24984 unix_path=`$CYGPATH -u "$windows_path"`
24985 new_path="$unix_path"
24986 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24987 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24988 new_path="$unix_path"
24989 fi
24990
24991 if test "x$path" != "x$new_path"; then
24992 BOOT_JDK="$new_path"
24993 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24994 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24995 fi
24996
24997 # Save the first 10 bytes of this path to the storage, so fixpath can work.
24998 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24999
25000 else
25001 # We're on a unix platform. Hooray! :)
25002 path="$BOOT_JDK"
25003 has_space=`$ECHO "$path" | $GREP " "`
25004 if test "x$has_space" != x; then
25005 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25006 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25007 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25008 fi
25009
25010 # Use eval to expand a potential ~
25011 eval path="$path"
25012 if test ! -f "$path" && test ! -d "$path"; then
25013 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25014 fi
25015
25016 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25017 fi
25018 fi
25019
25020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25021 $as_echo_n "checking for Boot JDK... " >&6; }
25022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25023 $as_echo "$BOOT_JDK" >&6; }
25024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25025 $as_echo_n "checking Boot JDK version... " >&6; }
25026 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
25027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25028 $as_echo "$BOOT_JDK_VERSION" >&6; }
25029 fi # end check jdk version
25030 fi # end check javac
25031 fi # end check java
25032 fi # end check boot jdk found
25033 fi
25034
25035
25036 if test "x$BOOT_JDK_FOUND" = xno; then
25037 # Now execute the test
25038
25039 BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
25040 BOOT_JDK_SUFFIX="/Contents/Home"
25041 ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25042 if test "x$ALL_JDKS_FOUND" != x; then
25043 for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25044
25045 if test "x$BOOT_JDK_FOUND" = xno; then
25046 # Now execute the test
25047
25048 BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25049 if test -d "$BOOT_JDK"; then
25050 BOOT_JDK_FOUND=maybe
25051 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25052 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25053 fi
25054
25055
25056 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25057 if test "x$BOOT_JDK_FOUND" = xmaybe; then
25058 # Do we have a bin/java?
25059 if test ! -x "$BOOT_JDK/bin/java"; then
25060 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25061 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25062 BOOT_JDK_FOUND=no
25063 else
25064 # Do we have a bin/javac?
25065 if test ! -x "$BOOT_JDK/bin/javac"; then
25066 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25067 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25068 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25069 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25070 BOOT_JDK_FOUND=no
25071 else
25072 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25073 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25074
25075 # Extra M4 quote needed to protect [] in grep expression.
25076 FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[89]\.'`
25077 if test "x$FOUND_CORRECT_VERSION" = x; then
25078 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25079 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25080 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25081 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25082 BOOT_JDK_FOUND=no
25083 else
25084 # We're done! :-)
25085 BOOT_JDK_FOUND=yes
25086
25087 # Only process if variable expands to non-empty
25088
25089 if test "x$BOOT_JDK" != x; then
25090 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25091
25092 # Input might be given as Windows format, start by converting to
25093 # unix format.
25094 path="$BOOT_JDK"
25095 new_path=`$CYGPATH -u "$path"`
25096
25097 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25098 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25099 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25100 # "foo.exe" is OK but "foo" is an error.
25101 #
25102 # This test is therefore slightly more accurate than "test -f" to check for file precense.
25103 # It is also a way to make sure we got the proper file name for the real test later on.
25104 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25105 if test "x$test_shortpath" = x; then
25106 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25107 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25108 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25109 fi
25110
25111 # Call helper function which possibly converts this using DOS-style short mode.
25112 # If so, the updated path is stored in $new_path.
25113
25114 input_path="$new_path"
25115 # Check if we need to convert this using DOS-style short mode. If the path
25116 # contains just simple characters, use it. Otherwise (spaces, weird characters),
25117 # take no chances and rewrite it.
25118 # Note: m4 eats our [], so we need to use [ and ] instead.
25119 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25120 if test "x$has_forbidden_chars" != x; then
25121 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25122 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25123 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25124 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25125 # Going to short mode and back again did indeed matter. Since short mode is
25126 # case insensitive, let's make it lowercase to improve readability.
25127 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25128 # Now convert it back to Unix-style (cygpath)
25129 input_path=`$CYGPATH -u "$shortmode_path"`
25130 new_path="$input_path"
25131 fi
25132 fi
25133
25134 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25135 if test "x$test_cygdrive_prefix" = x; then
25136 # As a simple fix, exclude /usr/bin since it's not a real path.
25137 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25138 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25139 # a path prefixed by /cygdrive for fixpath to work.
25140 new_path="$CYGWIN_ROOT_PATH$input_path"
25141 fi
25142 fi
25143
25144
25145 if test "x$path" != "x$new_path"; then
25146 BOOT_JDK="$new_path"
25147 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25148 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25149 fi
25150
25151 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25152
25153 path="$BOOT_JDK"
25154 has_colon=`$ECHO $path | $GREP ^.:`
25155 new_path="$path"
25156 if test "x$has_colon" = x; then
25157 # Not in mixed or Windows style, start by that.
25158 new_path=`cmd //c echo $path`
25159 fi
25160
25161
25162 input_path="$new_path"
25163 # Check if we need to convert this using DOS-style short mode. If the path
25164 # contains just simple characters, use it. Otherwise (spaces, weird characters),
25165 # take no chances and rewrite it.
25166 # Note: m4 eats our [], so we need to use [ and ] instead.
25167 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25168 if test "x$has_forbidden_chars" != x; then
25169 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25170 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25171 fi
25172
25173
25174 windows_path="$new_path"
25175 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25176 unix_path=`$CYGPATH -u "$windows_path"`
25177 new_path="$unix_path"
25178 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25179 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25180 new_path="$unix_path"
25181 fi
25182
25183 if test "x$path" != "x$new_path"; then
25184 BOOT_JDK="$new_path"
25185 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25186 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25187 fi
25188
25189 # Save the first 10 bytes of this path to the storage, so fixpath can work.
25190 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25191
25192 else
25193 # We're on a unix platform. Hooray! :)
25194 path="$BOOT_JDK"
25195 has_space=`$ECHO "$path" | $GREP " "`
25196 if test "x$has_space" != x; then
25197 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25198 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25199 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25200 fi
25201
25202 # Use eval to expand a potential ~
25203 eval path="$path"
25204 if test ! -f "$path" && test ! -d "$path"; then
25205 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25206 fi
25207
25208 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25209 fi
25210 fi
25211
25212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25213 $as_echo_n "checking for Boot JDK... " >&6; }
25214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25215 $as_echo "$BOOT_JDK" >&6; }
25216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25217 $as_echo_n "checking Boot JDK version... " >&6; }
25218 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
25219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25220 $as_echo "$BOOT_JDK_VERSION" >&6; }
25221 fi # end check jdk version
25222 fi # end check javac
25223 fi # end check java
25224 fi # end check boot jdk found
25225 fi
25226
25227 done
25228 fi
25229
25230
25231 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25232 if test "x$BOOT_JDK_FOUND" = xmaybe; then
25233 # Do we have a bin/java?
25234 if test ! -x "$BOOT_JDK/bin/java"; then
25235 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25236 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25237 BOOT_JDK_FOUND=no
25238 else
25239 # Do we have a bin/javac?
25240 if test ! -x "$BOOT_JDK/bin/javac"; then
25241 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25242 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25243 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25244 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25245 BOOT_JDK_FOUND=no
25246 else
25247 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25248 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25249
25250 # Extra M4 quote needed to protect [] in grep expression.
25251 FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[89]\.'`
25252 if test "x$FOUND_CORRECT_VERSION" = x; then
25253 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25254 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25255 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25256 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25257 BOOT_JDK_FOUND=no
25258 else
25259 # We're done! :-)
25260 BOOT_JDK_FOUND=yes
25261
25262 # Only process if variable expands to non-empty
25263
25264 if test "x$BOOT_JDK" != x; then
25265 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25266
25267 # Input might be given as Windows format, start by converting to
25268 # unix format.
25269 path="$BOOT_JDK"
25270 new_path=`$CYGPATH -u "$path"`
25271
25272 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25273 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25274 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25275 # "foo.exe" is OK but "foo" is an error.
25276 #
25277 # This test is therefore slightly more accurate than "test -f" to check for file precense.
25278 # It is also a way to make sure we got the proper file name for the real test later on.
25279 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25280 if test "x$test_shortpath" = x; then
25281 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25282 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25283 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25284 fi
25285
25286 # Call helper function which possibly converts this using DOS-style short mode.
25287 # If so, the updated path is stored in $new_path.
25288
25289 input_path="$new_path"
25290 # Check if we need to convert this using DOS-style short mode. If the path
25291 # contains just simple characters, use it. Otherwise (spaces, weird characters),
25292 # take no chances and rewrite it.
25293 # Note: m4 eats our [], so we need to use [ and ] instead.
25294 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25295 if test "x$has_forbidden_chars" != x; then
25296 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25297 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25298 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25299 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25300 # Going to short mode and back again did indeed matter. Since short mode is
25301 # case insensitive, let's make it lowercase to improve readability.
25302 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25303 # Now convert it back to Unix-style (cygpath)
25304 input_path=`$CYGPATH -u "$shortmode_path"`
25305 new_path="$input_path"
25306 fi
25307 fi
25308
25309 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25310 if test "x$test_cygdrive_prefix" = x; then
25311 # As a simple fix, exclude /usr/bin since it's not a real path.
25312 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25313 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25314 # a path prefixed by /cygdrive for fixpath to work.
25315 new_path="$CYGWIN_ROOT_PATH$input_path"
25316 fi
25317 fi
25318
25319
25320 if test "x$path" != "x$new_path"; then
25321 BOOT_JDK="$new_path"
25322 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25323 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25324 fi
25325
25326 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25327
25328 path="$BOOT_JDK"
25329 has_colon=`$ECHO $path | $GREP ^.:`
25330 new_path="$path"
25331 if test "x$has_colon" = x; then
25332 # Not in mixed or Windows style, start by that.
25333 new_path=`cmd //c echo $path`
25334 fi
25335
25336
25337 input_path="$new_path"
25338 # Check if we need to convert this using DOS-style short mode. If the path
25339 # contains just simple characters, use it. Otherwise (spaces, weird characters),
25340 # take no chances and rewrite it.
25341 # Note: m4 eats our [], so we need to use [ and ] instead.
25342 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25343 if test "x$has_forbidden_chars" != x; then
25344 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25345 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25346 fi
25347
25348
25349 windows_path="$new_path"
25350 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25351 unix_path=`$CYGPATH -u "$windows_path"`
25352 new_path="$unix_path"
25353 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25354 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25355 new_path="$unix_path"
25356 fi
25357
25358 if test "x$path" != "x$new_path"; then
25359 BOOT_JDK="$new_path"
25360 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25361 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25362 fi
25363
25364 # Save the first 10 bytes of this path to the storage, so fixpath can work.
25365 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25366
25367 else
25368 # We're on a unix platform. Hooray! :)
25369 path="$BOOT_JDK"
25370 has_space=`$ECHO "$path" | $GREP " "`
25371 if test "x$has_space" != x; then
25372 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25373 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25374 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25375 fi
25376
25377 # Use eval to expand a potential ~
25378 eval path="$path"
25379 if test ! -f "$path" && test ! -d "$path"; then
25380 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25381 fi
25382
25383 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25384 fi
25385 fi
25386
25387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25388 $as_echo_n "checking for Boot JDK... " >&6; }
25389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25390 $as_echo "$BOOT_JDK" >&6; }
25391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25392 $as_echo_n "checking Boot JDK version... " >&6; }
25393 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
25394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25395 $as_echo "$BOOT_JDK_VERSION" >&6; }
25396 fi # end check jdk version
25397 fi # end check javac
25398 fi # end check java
25399 fi # end check boot jdk found
25400 fi
25401
25402 elif test "x$OPENJDK_TARGET_OS" = xlinux; then
25403
25404 if test "x$BOOT_JDK_FOUND" = xno; then
25405 # Now execute the test
25406
25407 BOOT_JDK_PREFIX="/usr/lib/jvm"
25408 BOOT_JDK_SUFFIX=""
25409 ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25410 if test "x$ALL_JDKS_FOUND" != x; then
25411 for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25412
25413 if test "x$BOOT_JDK_FOUND" = xno; then
25414 # Now execute the test
25415
25416 BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25417 if test -d "$BOOT_JDK"; then
25418 BOOT_JDK_FOUND=maybe
25419 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25420 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25421 fi
25422
25423
25424 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25425 if test "x$BOOT_JDK_FOUND" = xmaybe; then
25426 # Do we have a bin/java?
25427 if test ! -x "$BOOT_JDK/bin/java"; then
25428 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25429 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25430 BOOT_JDK_FOUND=no
25431 else
25432 # Do we have a bin/javac?
25433 if test ! -x "$BOOT_JDK/bin/javac"; then
25434 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25435 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25436 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25437 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25438 BOOT_JDK_FOUND=no
25439 else
25440 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25441 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25442
25443 # Extra M4 quote needed to protect [] in grep expression.
25444 FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[89]\.'`
25445 if test "x$FOUND_CORRECT_VERSION" = x; then
25446 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25447 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25448 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25449 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25450 BOOT_JDK_FOUND=no
25451 else
25452 # We're done! :-)
25453 BOOT_JDK_FOUND=yes
25454
25455 # Only process if variable expands to non-empty
25456
25457 if test "x$BOOT_JDK" != x; then
25458 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25459
25460 # Input might be given as Windows format, start by converting to
25461 # unix format.
25462 path="$BOOT_JDK"
25463 new_path=`$CYGPATH -u "$path"`
25464
25465 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25466 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25467 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25468 # "foo.exe" is OK but "foo" is an error.
25469 #
25470 # This test is therefore slightly more accurate than "test -f" to check for file precense.
25471 # It is also a way to make sure we got the proper file name for the real test later on.
25472 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25473 if test "x$test_shortpath" = x; then
25474 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25475 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25476 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25477 fi
25478
25479 # Call helper function which possibly converts this using DOS-style short mode.
25480 # If so, the updated path is stored in $new_path.
25481
25482 input_path="$new_path"
25483 # Check if we need to convert this using DOS-style short mode. If the path
25484 # contains just simple characters, use it. Otherwise (spaces, weird characters),
25485 # take no chances and rewrite it.
25486 # Note: m4 eats our [], so we need to use [ and ] instead.
25487 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25488 if test "x$has_forbidden_chars" != x; then
25489 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25490 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25491 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25492 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25493 # Going to short mode and back again did indeed matter. Since short mode is
25494 # case insensitive, let's make it lowercase to improve readability.
25495 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25496 # Now convert it back to Unix-style (cygpath)
25497 input_path=`$CYGPATH -u "$shortmode_path"`
25498 new_path="$input_path"
25499 fi
25500 fi
25501
25502 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25503 if test "x$test_cygdrive_prefix" = x; then
25504 # As a simple fix, exclude /usr/bin since it's not a real path.
25505 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25506 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25507 # a path prefixed by /cygdrive for fixpath to work.
25508 new_path="$CYGWIN_ROOT_PATH$input_path"
25509 fi
25510 fi
25511
25512
25513 if test "x$path" != "x$new_path"; then
25514 BOOT_JDK="$new_path"
25515 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25516 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25517 fi
25518
25519 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25520
25521 path="$BOOT_JDK"
25522 has_colon=`$ECHO $path | $GREP ^.:`
25523 new_path="$path"
25524 if test "x$has_colon" = x; then
25525 # Not in mixed or Windows style, start by that.
25526 new_path=`cmd //c echo $path`
25527 fi
25528
25529
25530 input_path="$new_path"
25531 # Check if we need to convert this using DOS-style short mode. If the path
25532 # contains just simple characters, use it. Otherwise (spaces, weird characters),
25533 # take no chances and rewrite it.
25534 # Note: m4 eats our [], so we need to use [ and ] instead.
25535 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25536 if test "x$has_forbidden_chars" != x; then
25537 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25538 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25539 fi
25540
25541
25542 windows_path="$new_path"
25543 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25544 unix_path=`$CYGPATH -u "$windows_path"`
25545 new_path="$unix_path"
25546 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25547 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25548 new_path="$unix_path"
25549 fi
25550
25551 if test "x$path" != "x$new_path"; then
25552 BOOT_JDK="$new_path"
25553 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25554 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25555 fi
25556
25557 # Save the first 10 bytes of this path to the storage, so fixpath can work.
25558 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25559
25560 else
25561 # We're on a unix platform. Hooray! :)
25562 path="$BOOT_JDK"
25563 has_space=`$ECHO "$path" | $GREP " "`
25564 if test "x$has_space" != x; then
25565 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25566 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25567 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25568 fi
25569
25570 # Use eval to expand a potential ~
25571 eval path="$path"
25572 if test ! -f "$path" && test ! -d "$path"; then
25573 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25574 fi
25575
25576 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25577 fi
25578 fi
25579
25580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25581 $as_echo_n "checking for Boot JDK... " >&6; }
25582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25583 $as_echo "$BOOT_JDK" >&6; }
25584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25585 $as_echo_n "checking Boot JDK version... " >&6; }
25586 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
25587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25588 $as_echo "$BOOT_JDK_VERSION" >&6; }
25589 fi # end check jdk version
25590 fi # end check javac
25591 fi # end check java
25592 fi # end check boot jdk found
25593 fi
25594
25595 done
25596 fi
25597
25598
25599 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25600 if test "x$BOOT_JDK_FOUND" = xmaybe; then
25601 # Do we have a bin/java?
25602 if test ! -x "$BOOT_JDK/bin/java"; then
25603 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25604 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25605 BOOT_JDK_FOUND=no
25606 else
25607 # Do we have a bin/javac?
25608 if test ! -x "$BOOT_JDK/bin/javac"; then
25609 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25610 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25611 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25612 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25613 BOOT_JDK_FOUND=no
25614 else
25615 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25616 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25617
25618 # Extra M4 quote needed to protect [] in grep expression.
25619 FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[89]\.'`
25620 if test "x$FOUND_CORRECT_VERSION" = x; then
25621 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25622 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25623 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25624 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25625 BOOT_JDK_FOUND=no
25626 else
25627 # We're done! :-)
25628 BOOT_JDK_FOUND=yes
25629
25630 # Only process if variable expands to non-empty
25631
25632 if test "x$BOOT_JDK" != x; then
25633 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25634
25635 # Input might be given as Windows format, start by converting to
25636 # unix format.
25637 path="$BOOT_JDK"
25638 new_path=`$CYGPATH -u "$path"`
25639
25640 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25641 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25642 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25643 # "foo.exe" is OK but "foo" is an error.
25644 #
25645 # This test is therefore slightly more accurate than "test -f" to check for file precense.
25646 # It is also a way to make sure we got the proper file name for the real test later on.
25647 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25648 if test "x$test_shortpath" = x; then
25649 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25650 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25651 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25652 fi
25653
25654 # Call helper function which possibly converts this using DOS-style short mode.
25655 # If so, the updated path is stored in $new_path.
25656
25657 input_path="$new_path"
25658 # Check if we need to convert this using DOS-style short mode. If the path
25659 # contains just simple characters, use it. Otherwise (spaces, weird characters),
25660 # take no chances and rewrite it.
25661 # Note: m4 eats our [], so we need to use [ and ] instead.
25662 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25663 if test "x$has_forbidden_chars" != x; then
25664 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25665 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25666 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25667 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25668 # Going to short mode and back again did indeed matter. Since short mode is
25669 # case insensitive, let's make it lowercase to improve readability.
25670 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25671 # Now convert it back to Unix-style (cygpath)
25672 input_path=`$CYGPATH -u "$shortmode_path"`
25673 new_path="$input_path"
25674 fi
25675 fi
25676
25677 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25678 if test "x$test_cygdrive_prefix" = x; then
25679 # As a simple fix, exclude /usr/bin since it's not a real path.
25680 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25681 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25682 # a path prefixed by /cygdrive for fixpath to work.
25683 new_path="$CYGWIN_ROOT_PATH$input_path"
25684 fi
25685 fi
25686
25687
25688 if test "x$path" != "x$new_path"; then
25689 BOOT_JDK="$new_path"
25690 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25691 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25692 fi
25693
25694 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25695
25696 path="$BOOT_JDK"
25697 has_colon=`$ECHO $path | $GREP ^.:`
25698 new_path="$path"
25699 if test "x$has_colon" = x; then
25700 # Not in mixed or Windows style, start by that.
25701 new_path=`cmd //c echo $path`
25702 fi
25703
25704
25705 input_path="$new_path"
25706 # Check if we need to convert this using DOS-style short mode. If the path
25707 # contains just simple characters, use it. Otherwise (spaces, weird characters),
25708 # take no chances and rewrite it.
25709 # Note: m4 eats our [], so we need to use [ and ] instead.
25710 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25711 if test "x$has_forbidden_chars" != x; then
25712 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25713 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25714 fi
25715
25716
25717 windows_path="$new_path"
25718 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25719 unix_path=`$CYGPATH -u "$windows_path"`
25720 new_path="$unix_path"
25721 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25722 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25723 new_path="$unix_path"
25724 fi
25725
25726 if test "x$path" != "x$new_path"; then
25727 BOOT_JDK="$new_path"
25728 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25729 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25730 fi
25731
25732 # Save the first 10 bytes of this path to the storage, so fixpath can work.
25733 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25734
25735 else
25736 # We're on a unix platform. Hooray! :)
25737 path="$BOOT_JDK"
25738 has_space=`$ECHO "$path" | $GREP " "`
25739 if test "x$has_space" != x; then
25740 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25741 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25742 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25743 fi
25744
25745 # Use eval to expand a potential ~
25746 eval path="$path"
25747 if test ! -f "$path" && test ! -d "$path"; then
25748 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25749 fi
25750
25751 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25752 fi
25753 fi
25754
25755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25756 $as_echo_n "checking for Boot JDK... " >&6; }
25757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25758 $as_echo "$BOOT_JDK" >&6; }
25759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25760 $as_echo_n "checking Boot JDK version... " >&6; }
25761 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
25762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25763 $as_echo "$BOOT_JDK_VERSION" >&6; }
25764 fi # end check jdk version
25765 fi # end check javac
25766 fi # end check java
25767 fi # end check boot jdk found
25768 fi
25769
25770 fi
25771
25772
25773 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25774 if test "x$BOOT_JDK_FOUND" = xmaybe; then
25775 # Do we have a bin/java?
25776 if test ! -x "$BOOT_JDK/bin/java"; then
25777 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25778 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25779 BOOT_JDK_FOUND=no
25780 else
25781 # Do we have a bin/javac?
25782 if test ! -x "$BOOT_JDK/bin/javac"; then
25783 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25784 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25785 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25786 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25787 BOOT_JDK_FOUND=no
25788 else
25789 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25790 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25791
25792 # Extra M4 quote needed to protect [] in grep expression.
25793 FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep '\"1\.[89]\.'`
25794 if test "x$FOUND_CORRECT_VERSION" = x; then
25795 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25796 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25797 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25798 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25799 BOOT_JDK_FOUND=no
25800 else
25801 # We're done! :-)
25802 BOOT_JDK_FOUND=yes
25803
25804 # Only process if variable expands to non-empty
25805
25806 if test "x$BOOT_JDK" != x; then
25807 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25808
25809 # Input might be given as Windows format, start by converting to
25810 # unix format.
25811 path="$BOOT_JDK"
25812 new_path=`$CYGPATH -u "$path"`
25813
25814 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25815 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25816 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25817 # "foo.exe" is OK but "foo" is an error.
25818 #
25819 # This test is therefore slightly more accurate than "test -f" to check for file precense.
25820 # It is also a way to make sure we got the proper file name for the real test later on.
25821 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25822 if test "x$test_shortpath" = x; then
25823 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25824 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25825 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25826 fi
25827
25828 # Call helper function which possibly converts this using DOS-style short mode.
25829 # If so, the updated path is stored in $new_path.
25830
25831 input_path="$new_path"
25832 # Check if we need to convert this using DOS-style short mode. If the path
25833 # contains just simple characters, use it. Otherwise (spaces, weird characters),
25834 # take no chances and rewrite it.
25835 # Note: m4 eats our [], so we need to use [ and ] instead.
25836 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25837 if test "x$has_forbidden_chars" != x; then
25838 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25839 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25840 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25841 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25842 # Going to short mode and back again did indeed matter. Since short mode is
25843 # case insensitive, let's make it lowercase to improve readability.
25844 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25845 # Now convert it back to Unix-style (cygpath)
25846 input_path=`$CYGPATH -u "$shortmode_path"`
25847 new_path="$input_path"
25848 fi
25849 fi
25850
25851 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25852 if test "x$test_cygdrive_prefix" = x; then
25853 # As a simple fix, exclude /usr/bin since it's not a real path.
25854 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25855 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25856 # a path prefixed by /cygdrive for fixpath to work.
25857 new_path="$CYGWIN_ROOT_PATH$input_path"
25858 fi
25859 fi
25860
25861
25862 if test "x$path" != "x$new_path"; then
25863 BOOT_JDK="$new_path"
25864 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25865 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25866 fi
25867
25868 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25869
25870 path="$BOOT_JDK"
25871 has_colon=`$ECHO $path | $GREP ^.:`
25872 new_path="$path"
25873 if test "x$has_colon" = x; then
25874 # Not in mixed or Windows style, start by that.
25875 new_path=`cmd //c echo $path`
25876 fi
25877
25878
25879 input_path="$new_path"
25880 # Check if we need to convert this using DOS-style short mode. If the path
25881 # contains just simple characters, use it. Otherwise (spaces, weird characters),
25882 # take no chances and rewrite it.
25883 # Note: m4 eats our [], so we need to use [ and ] instead.
25884 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25885 if test "x$has_forbidden_chars" != x; then
25886 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25887 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25888 fi
25889
25890
25891 windows_path="$new_path"
25892 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25893 unix_path=`$CYGPATH -u "$windows_path"`
25894 new_path="$unix_path"
25895 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25896 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25897 new_path="$unix_path"
25898 fi
25899
25900 if test "x$path" != "x$new_path"; then
25901 BOOT_JDK="$new_path"
25902 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25903 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25904 fi
25905
25906 # Save the first 10 bytes of this path to the storage, so fixpath can work.
25907 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25908
25909 else
25910 # We're on a unix platform. Hooray! :)
25911 path="$BOOT_JDK"
25912 has_space=`$ECHO "$path" | $GREP " "`
25913 if test "x$has_space" != x; then
25914 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25915 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25916 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25917 fi
25918
25919 # Use eval to expand a potential ~
25920 eval path="$path"
25921 if test ! -f "$path" && test ! -d "$path"; then
25922 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25923 fi
25924
25925 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25926 fi
25927 fi
25928
25929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25930 $as_echo_n "checking for Boot JDK... " >&6; }
25931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25932 $as_echo "$BOOT_JDK" >&6; }
25933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25934 $as_echo_n "checking Boot JDK version... " >&6; }
25935 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
25936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25937 $as_echo "$BOOT_JDK_VERSION" >&6; }
25938 fi # end check jdk version
25939 fi # end check javac
25940 fi # end check java
25941 fi # end check boot jdk found
25942 fi
25943
25944
25945 # If we haven't found anything yet, we've truly lost. Give up.
25946 if test "x$BOOT_JDK_FOUND" = xno; then
25947
25948 # Print a helpful message on how to acquire the necessary build dependency.
25949 # openjdk is the help tag: freetype, cups, pulse, alsa etc
25950 MISSING_DEPENDENCY=openjdk
25951
25952 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25953 cygwin_help $MISSING_DEPENDENCY
25954 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25955 msys_help $MISSING_DEPENDENCY
25956 else
25957 PKGHANDLER_COMMAND=
25958
25959 case $PKGHANDLER in
25960 apt-get)
25961 apt_help $MISSING_DEPENDENCY ;;
25962 yum)
25963 yum_help $MISSING_DEPENDENCY ;;
25964 port)
25965 port_help $MISSING_DEPENDENCY ;;
25966 pkgutil)
25967 pkgutil_help $MISSING_DEPENDENCY ;;
25968 pkgadd)
25969 pkgadd_help $MISSING_DEPENDENCY ;;
25970 esac
25971
25972 if test "x$PKGHANDLER_COMMAND" != x; then
25973 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25974 fi
25975 fi
25976
25977 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25978 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25979 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25980 $as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25981 as_fn_error $? "Cannot continue" "$LINENO" 5
25982 fi
25983
25984
25985
25986 # Setup tools from the Boot JDK.
25987
25988 # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25989
25990 # Publish this variable in the help.
25991
25992
25993 if test "x$JAVA" = x; then
25994 # The variable is not set by user, try to locate tool using the code snippet
25995
25996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25997 $as_echo_n "checking for java in Boot JDK... " >&6; }
25998 JAVA=$BOOT_JDK/bin/java
25999 if test ! -x $JAVA; then
26000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26001 $as_echo "not found" >&6; }
26002 { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26003 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26004 as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
26005 fi
26006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26007 $as_echo "ok" >&6; }
26008
26009
26010 else
26011 # The variable is set, but is it from the command line or the environment?
26012
26013 # Try to remove the string !JAVA! from our list.
26014 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
26015 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26016 # If it failed, the variable was not from the command line. Ignore it,
26017 # but warn the user (except for BASH, which is always set by the calling BASH).
26018 if test "xJAVA" != xBASH; then
26019 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
26020 $as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
26021 fi
26022 # Try to locate tool using the code snippet
26023
26024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
26025 $as_echo_n "checking for java in Boot JDK... " >&6; }
26026 JAVA=$BOOT_JDK/bin/java
26027 if test ! -x $JAVA; then
26028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26029 $as_echo "not found" >&6; }
26030 { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26031 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26032 as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
26033 fi
26034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26035 $as_echo "ok" >&6; }
26036
26037
26038 else
26039 # If it succeeded, then it was overridden by the user. We will use it
26040 # for the tool.
26041
26042 # First remove it from the list of overridden variables, so we can test
26043 # for unknown variables in the end.
26044 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26045
26046 # Check if the provided tool contains a complete path.
26047 tool_specified="$JAVA"
26048 tool_basename="${tool_specified##*/}"
26049 if test "x$tool_basename" = "x$tool_specified"; then
26050 # A command without a complete path is provided, search $PATH.
26051 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
26052 $as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
26053 # Extract the first word of "$tool_basename", so it can be a program name with args.
26054 set dummy $tool_basename; ac_word=$2
26055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26056 $as_echo_n "checking for $ac_word... " >&6; }
26057 if ${ac_cv_path_JAVA+:} false; then :
26058 $as_echo_n "(cached) " >&6
26059 else
26060 case $JAVA in
26061 [\\/]* | ?:[\\/]*)
26062 ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
26063 ;;
26064 *)
26065 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26066 for as_dir in $PATH
26067 do
26068 IFS=$as_save_IFS
26069 test -z "$as_dir" && as_dir=.
26070 for ac_exec_ext in '' $ac_executable_extensions; do
26071 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26072 ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
26073 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26074 break 2
26075 fi
26076 done
26077 done
26078 IFS=$as_save_IFS
26079
26080 ;;
26081 esac
26082 fi
26083 JAVA=$ac_cv_path_JAVA
26084 if test -n "$JAVA"; then
26085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
26086 $as_echo "$JAVA" >&6; }
26087 else
26088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26089 $as_echo "no" >&6; }
26090 fi
26091
26092
26093 if test "x$JAVA" = x; then
26094 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26095 fi
26096 else
26097 # Otherwise we believe it is a complete path. Use it as it is.
26098 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
26099 $as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
26100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
26101 $as_echo_n "checking for JAVA... " >&6; }
26102 if test ! -x "$tool_specified"; then
26103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26104 $as_echo "not found" >&6; }
26105 as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
26106 fi
26107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26108 $as_echo "$tool_specified" >&6; }
26109 fi
26110 fi
26111 fi
26112
26113
26114
26115 # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26116
26117 # Publish this variable in the help.
26118
26119
26120 if test "x$JAVAC" = x; then
26121 # The variable is not set by user, try to locate tool using the code snippet
26122
26123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
26124 $as_echo_n "checking for javac in Boot JDK... " >&6; }
26125 JAVAC=$BOOT_JDK/bin/javac
26126 if test ! -x $JAVAC; then
26127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26128 $as_echo "not found" >&6; }
26129 { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26130 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26131 as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
26132 fi
26133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26134 $as_echo "ok" >&6; }
26135
26136
26137 else
26138 # The variable is set, but is it from the command line or the environment?
26139
26140 # Try to remove the string !JAVAC! from our list.
26141 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
26142 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26143 # If it failed, the variable was not from the command line. Ignore it,
26144 # but warn the user (except for BASH, which is always set by the calling BASH).
26145 if test "xJAVAC" != xBASH; then
26146 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
26147 $as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
26148 fi
26149 # Try to locate tool using the code snippet
26150
26151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
26152 $as_echo_n "checking for javac in Boot JDK... " >&6; }
26153 JAVAC=$BOOT_JDK/bin/javac
26154 if test ! -x $JAVAC; then
26155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26156 $as_echo "not found" >&6; }
26157 { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26158 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26159 as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
26160 fi
26161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26162 $as_echo "ok" >&6; }
26163
26164
26165 else
26166 # If it succeeded, then it was overridden by the user. We will use it
26167 # for the tool.
26168
26169 # First remove it from the list of overridden variables, so we can test
26170 # for unknown variables in the end.
26171 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26172
26173 # Check if the provided tool contains a complete path.
26174 tool_specified="$JAVAC"
26175 tool_basename="${tool_specified##*/}"
26176 if test "x$tool_basename" = "x$tool_specified"; then
26177 # A command without a complete path is provided, search $PATH.
26178 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
26179 $as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
26180 # Extract the first word of "$tool_basename", so it can be a program name with args.
26181 set dummy $tool_basename; ac_word=$2
26182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26183 $as_echo_n "checking for $ac_word... " >&6; }
26184 if ${ac_cv_path_JAVAC+:} false; then :
26185 $as_echo_n "(cached) " >&6
26186 else
26187 case $JAVAC in
26188 [\\/]* | ?:[\\/]*)
26189 ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
26190 ;;
26191 *)
26192 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26193 for as_dir in $PATH
26194 do
26195 IFS=$as_save_IFS
26196 test -z "$as_dir" && as_dir=.
26197 for ac_exec_ext in '' $ac_executable_extensions; do
26198 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26199 ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
26200 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26201 break 2
26202 fi
26203 done
26204 done
26205 IFS=$as_save_IFS
26206
26207 ;;
26208 esac
26209 fi
26210 JAVAC=$ac_cv_path_JAVAC
26211 if test -n "$JAVAC"; then
26212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
26213 $as_echo "$JAVAC" >&6; }
26214 else
26215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26216 $as_echo "no" >&6; }
26217 fi
26218
26219
26220 if test "x$JAVAC" = x; then
26221 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26222 fi
26223 else
26224 # Otherwise we believe it is a complete path. Use it as it is.
26225 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
26226 $as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
26227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
26228 $as_echo_n "checking for JAVAC... " >&6; }
26229 if test ! -x "$tool_specified"; then
26230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26231 $as_echo "not found" >&6; }
26232 as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
26233 fi
26234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26235 $as_echo "$tool_specified" >&6; }
26236 fi
26237 fi
26238 fi
26239
26240
26241
26242 # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26243
26244 # Publish this variable in the help.
26245
26246
26247 if test "x$JAVAH" = x; then
26248 # The variable is not set by user, try to locate tool using the code snippet
26249
26250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
26251 $as_echo_n "checking for javah in Boot JDK... " >&6; }
26252 JAVAH=$BOOT_JDK/bin/javah
26253 if test ! -x $JAVAH; then
26254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26255 $as_echo "not found" >&6; }
26256 { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26257 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26258 as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
26259 fi
26260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26261 $as_echo "ok" >&6; }
26262
26263
26264 else
26265 # The variable is set, but is it from the command line or the environment?
26266
26267 # Try to remove the string !JAVAH! from our list.
26268 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
26269 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26270 # If it failed, the variable was not from the command line. Ignore it,
26271 # but warn the user (except for BASH, which is always set by the calling BASH).
26272 if test "xJAVAH" != xBASH; then
26273 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
26274 $as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
26275 fi
26276 # Try to locate tool using the code snippet
26277
26278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
26279 $as_echo_n "checking for javah in Boot JDK... " >&6; }
26280 JAVAH=$BOOT_JDK/bin/javah
26281 if test ! -x $JAVAH; then
26282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26283 $as_echo "not found" >&6; }
26284 { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26285 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26286 as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
26287 fi
26288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26289 $as_echo "ok" >&6; }
26290
26291
26292 else
26293 # If it succeeded, then it was overridden by the user. We will use it
26294 # for the tool.
26295
26296 # First remove it from the list of overridden variables, so we can test
26297 # for unknown variables in the end.
26298 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26299
26300 # Check if the provided tool contains a complete path.
26301 tool_specified="$JAVAH"
26302 tool_basename="${tool_specified##*/}"
26303 if test "x$tool_basename" = "x$tool_specified"; then
26304 # A command without a complete path is provided, search $PATH.
26305 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
26306 $as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
26307 # Extract the first word of "$tool_basename", so it can be a program name with args.
26308 set dummy $tool_basename; ac_word=$2
26309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26310 $as_echo_n "checking for $ac_word... " >&6; }
26311 if ${ac_cv_path_JAVAH+:} false; then :
26312 $as_echo_n "(cached) " >&6
26313 else
26314 case $JAVAH in
26315 [\\/]* | ?:[\\/]*)
26316 ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
26317 ;;
26318 *)
26319 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26320 for as_dir in $PATH
26321 do
26322 IFS=$as_save_IFS
26323 test -z "$as_dir" && as_dir=.
26324 for ac_exec_ext in '' $ac_executable_extensions; do
26325 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26326 ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
26327 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26328 break 2
26329 fi
26330 done
26331 done
26332 IFS=$as_save_IFS
26333
26334 ;;
26335 esac
26336 fi
26337 JAVAH=$ac_cv_path_JAVAH
26338 if test -n "$JAVAH"; then
26339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
26340 $as_echo "$JAVAH" >&6; }
26341 else
26342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26343 $as_echo "no" >&6; }
26344 fi
26345
26346
26347 if test "x$JAVAH" = x; then
26348 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26349 fi
26350 else
26351 # Otherwise we believe it is a complete path. Use it as it is.
26352 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
26353 $as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
26354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
26355 $as_echo_n "checking for JAVAH... " >&6; }
26356 if test ! -x "$tool_specified"; then
26357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26358 $as_echo "not found" >&6; }
26359 as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
26360 fi
26361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26362 $as_echo "$tool_specified" >&6; }
26363 fi
26364 fi
26365 fi
26366
26367
26368
26369 # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26370
26371 # Publish this variable in the help.
26372
26373
26374 if test "x$JAR" = x; then
26375 # The variable is not set by user, try to locate tool using the code snippet
26376
26377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
26378 $as_echo_n "checking for jar in Boot JDK... " >&6; }
26379 JAR=$BOOT_JDK/bin/jar
26380 if test ! -x $JAR; then
26381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26382 $as_echo "not found" >&6; }
26383 { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26384 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26385 as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
26386 fi
26387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26388 $as_echo "ok" >&6; }
26389
26390
26391 else
26392 # The variable is set, but is it from the command line or the environment?
26393
26394 # Try to remove the string !JAR! from our list.
26395 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
26396 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26397 # If it failed, the variable was not from the command line. Ignore it,
26398 # but warn the user (except for BASH, which is always set by the calling BASH).
26399 if test "xJAR" != xBASH; then
26400 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
26401 $as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
26402 fi
26403 # Try to locate tool using the code snippet
26404
26405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
26406 $as_echo_n "checking for jar in Boot JDK... " >&6; }
26407 JAR=$BOOT_JDK/bin/jar
26408 if test ! -x $JAR; then
26409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26410 $as_echo "not found" >&6; }
26411 { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26412 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26413 as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
26414 fi
26415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26416 $as_echo "ok" >&6; }
26417
26418
26419 else
26420 # If it succeeded, then it was overridden by the user. We will use it
26421 # for the tool.
26422
26423 # First remove it from the list of overridden variables, so we can test
26424 # for unknown variables in the end.
26425 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26426
26427 # Check if the provided tool contains a complete path.
26428 tool_specified="$JAR"
26429 tool_basename="${tool_specified##*/}"
26430 if test "x$tool_basename" = "x$tool_specified"; then
26431 # A command without a complete path is provided, search $PATH.
26432 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
26433 $as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
26434 # Extract the first word of "$tool_basename", so it can be a program name with args.
26435 set dummy $tool_basename; ac_word=$2
26436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26437 $as_echo_n "checking for $ac_word... " >&6; }
26438 if ${ac_cv_path_JAR+:} false; then :
26439 $as_echo_n "(cached) " >&6
26440 else
26441 case $JAR in
26442 [\\/]* | ?:[\\/]*)
26443 ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
26444 ;;
26445 *)
26446 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26447 for as_dir in $PATH
26448 do
26449 IFS=$as_save_IFS
26450 test -z "$as_dir" && as_dir=.
26451 for ac_exec_ext in '' $ac_executable_extensions; do
26452 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26453 ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
26454 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26455 break 2
26456 fi
26457 done
26458 done
26459 IFS=$as_save_IFS
26460
26461 ;;
26462 esac
26463 fi
26464 JAR=$ac_cv_path_JAR
26465 if test -n "$JAR"; then
26466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
26467 $as_echo "$JAR" >&6; }
26468 else
26469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26470 $as_echo "no" >&6; }
26471 fi
26472
26473
26474 if test "x$JAR" = x; then
26475 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26476 fi
26477 else
26478 # Otherwise we believe it is a complete path. Use it as it is.
26479 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
26480 $as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
26481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
26482 $as_echo_n "checking for JAR... " >&6; }
26483 if test ! -x "$tool_specified"; then
26484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26485 $as_echo "not found" >&6; }
26486 as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
26487 fi
26488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26489 $as_echo "$tool_specified" >&6; }
26490 fi
26491 fi
26492 fi
26493
26494
26495
26496 # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26497
26498 # Publish this variable in the help.
26499
26500
26501 if test "x$JARSIGNER" = x; then
26502 # The variable is not set by user, try to locate tool using the code snippet
26503
26504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26505 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26506 JARSIGNER=$BOOT_JDK/bin/jarsigner
26507 if test ! -x $JARSIGNER; then
26508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26509 $as_echo "not found" >&6; }
26510 { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26511 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26512 as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26513 fi
26514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26515 $as_echo "ok" >&6; }
26516
26517
26518 else
26519 # The variable is set, but is it from the command line or the environment?
26520
26521 # Try to remove the string !JARSIGNER! from our list.
26522 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
26523 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26524 # If it failed, the variable was not from the command line. Ignore it,
26525 # but warn the user (except for BASH, which is always set by the calling BASH).
26526 if test "xJARSIGNER" != xBASH; then
26527 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
26528 $as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
26529 fi
26530 # Try to locate tool using the code snippet
26531
26532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26533 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26534 JARSIGNER=$BOOT_JDK/bin/jarsigner
26535 if test ! -x $JARSIGNER; then
26536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26537 $as_echo "not found" >&6; }
26538 { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26539 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26540 as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26541 fi
26542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26543 $as_echo "ok" >&6; }
26544
26545
26546 else
26547 # If it succeeded, then it was overridden by the user. We will use it
26548 # for the tool.
26549
26550 # First remove it from the list of overridden variables, so we can test
26551 # for unknown variables in the end.
26552 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26553
26554 # Check if the provided tool contains a complete path.
26555 tool_specified="$JARSIGNER"
26556 tool_basename="${tool_specified##*/}"
26557 if test "x$tool_basename" = "x$tool_specified"; then
26558 # A command without a complete path is provided, search $PATH.
26559 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
26560 $as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
26561 # Extract the first word of "$tool_basename", so it can be a program name with args.
26562 set dummy $tool_basename; ac_word=$2
26563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26564 $as_echo_n "checking for $ac_word... " >&6; }
26565 if ${ac_cv_path_JARSIGNER+:} false; then :
26566 $as_echo_n "(cached) " >&6
26567 else
26568 case $JARSIGNER in
26569 [\\/]* | ?:[\\/]*)
26570 ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
26571 ;;
26572 *)
26573 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26574 for as_dir in $PATH
26575 do
26576 IFS=$as_save_IFS
26577 test -z "$as_dir" && as_dir=.
26578 for ac_exec_ext in '' $ac_executable_extensions; do
26579 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26580 ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
26581 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26582 break 2
26583 fi
26584 done
26585 done
26586 IFS=$as_save_IFS
26587
26588 ;;
26589 esac
26590 fi
26591 JARSIGNER=$ac_cv_path_JARSIGNER
26592 if test -n "$JARSIGNER"; then
26593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
26594 $as_echo "$JARSIGNER" >&6; }
26595 else
26596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26597 $as_echo "no" >&6; }
26598 fi
26599
26600
26601 if test "x$JARSIGNER" = x; then
26602 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26603 fi
26604 else
26605 # Otherwise we believe it is a complete path. Use it as it is.
26606 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
26607 $as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
26608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
26609 $as_echo_n "checking for JARSIGNER... " >&6; }
26610 if test ! -x "$tool_specified"; then
26611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26612 $as_echo "not found" >&6; }
26613 as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
26614 fi
26615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26616 $as_echo "$tool_specified" >&6; }
26617 fi
26618 fi
26619 fi
26620
26621
26622
26623 # Finally, set some other options...
26624
26625 # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
26626 BOOT_JDK_SOURCETARGET="-source 8 -target 8"
26627
26628
26629
26630
26631 ###############################################################################
26632 #
26633 # Configure the sources to use. We can add or override individual directories.
26634 #
26635 ###############################################################################
26636
26637
26638 # Where are the sources. Any of these can be overridden
26639 # using --with-override-corba and the likes.
26640 LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26641 CORBA_TOPDIR="$SRC_ROOT/corba"
26642 JAXP_TOPDIR="$SRC_ROOT/jaxp"
26643 JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26644 HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26645 NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26646 JDK_TOPDIR="$SRC_ROOT/jdk"
26647
26648
26649
26650
26651
26652
26653
26654
26655
26656
26657 ###############################################################################
26658 #
26659 # Pickup additional source for a component from outside of the source root
26660 # or override source for a component.
26661 #
26662
26663 # Check whether --with-add-source-root was given.
26664 if test "${with_add_source_root+set}" = set; then :
26665 withval=$with_add_source_root;
26666 fi
26667
26668
26669
26670 # Check whether --with-override-source-root was given.
26671 if test "${with_override_source_root+set}" = set; then :
26672 withval=$with_override_source_root;
26673 fi
26674
26675
26676
26677 # Check whether --with-adds-and-overrides was given.
26678 if test "${with_adds_and_overrides+set}" = set; then :
26679 withval=$with_adds_and_overrides;
26680 fi
26681
26682
26683 if test "x$with_adds_and_overrides" != x; then
26684 with_add_source_root="$with_adds_and_overrides/adds"
26685 with_override_source_root="$with_adds_and_overrides/overrides"
26686 fi
26687
26688 if test "x$with_add_source_root" != x; then
26689 if ! test -d $with_add_source_root; then
26690 as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26691 fi
26692 CURDIR="$PWD"
26693 cd "$with_add_source_root"
26694 ADD_SRC_ROOT="`pwd`"
26695 cd "$CURDIR"
26696 # Verify that the addon source root does not have any root makefiles.
26697 # If it does, then it is usually an error, prevent this.
26698 if test -f $with_add_source_root/langtools/make/Makefile; then
26699 as_fn_error $? "Your add source root seems to contain a full langtools repo! An add source root should only contain additional sources." "$LINENO" 5
26700 fi
26701 if test -f $with_add_source_root/corba/make/Makefile; then
26702 as_fn_error $? "Your add source root seems to contain a full corba repo! An add source root should only contain additional sources." "$LINENO" 5
26703 fi
26704 if test -f $with_add_source_root/jaxp/make/Makefile; then
26705 as_fn_error $? "Your add source root seems to contain a full jaxp repo! An add source root should only contain additional sources." "$LINENO" 5
26706 fi
26707 if test -f $with_add_source_root/jaxws/make/Makefile; then
26708 as_fn_error $? "Your add source root seems to contain a full jaxws repo! An add source root should only contain additional sources." "$LINENO" 5
26709 fi
26710 if test -f $with_add_source_root/hotspot/make/Makefile; then
26711 as_fn_error $? "Your add source root seems to contain a full hotspot repo! An add source root should only contain additional sources." "$LINENO" 5
26712 fi
26713 if test -f $with_add_source_root/nashorn/make/Makefile; then
26714 as_fn_error $? "Your add source root seems to contain a full nashorn repo! An add source root should only contain additional sources." "$LINENO" 5
26715 fi
26716 if test -f $with_add_source_root/jdk/make/Makefile; then
26717 as_fn_error $? "Your add source root seems to contain a full JDK repo! An add source root should only contain additional sources." "$LINENO" 5
26718 fi
26719 fi
26720
26721
26722 if test "x$with_override_source_root" != x; then
26723 if ! test -d $with_override_source_root; then
26724 as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26725 fi
26726 CURDIR="$PWD"
26727 cd "$with_override_source_root"
26728 OVERRIDE_SRC_ROOT="`pwd`"
26729 cd "$CURDIR"
26730 if test -f $with_override_source_root/langtools/make/Makefile; then
26731 as_fn_error $? "Your override source root seems to contain a full langtools repo! An override source root should only contain sources that override." "$LINENO" 5
26732 fi
26733 if test -f $with_override_source_root/corba/make/Makefile; then
26734 as_fn_error $? "Your override source root seems to contain a full corba repo! An override source root should only contain sources that override." "$LINENO" 5
26735 fi
26736 if test -f $with_override_source_root/jaxp/make/Makefile; then
26737 as_fn_error $? "Your override source root seems to contain a full jaxp repo! An override source root should only contain sources that override." "$LINENO" 5
26738 fi
26739 if test -f $with_override_source_root/jaxws/make/Makefile; then
26740 as_fn_error $? "Your override source root seems to contain a full jaxws repo! An override source root should only contain sources that override." "$LINENO" 5
26741 fi
26742 if test -f $with_override_source_root/hotspot/make/Makefile; then
26743 as_fn_error $? "Your override source root seems to contain a full hotspot repo! An override source root should only contain sources that override." "$LINENO" 5
26744 fi
26745 if test -f $with_override_source_root/nashorn/make/Makefile; then
26746 as_fn_error $? "Your override source root seems to contain a full nashorn repo! An override source root should only contain sources that override." "$LINENO" 5
26747 fi
26748 if test -f $with_override_source_root/jdk/make/Makefile; then
26749 as_fn_error $? "Your override source root seems to contain a full JDK repo! An override source root should only contain sources that override." "$LINENO" 5
26750 fi
26751 fi
26752
26753
26754 ###############################################################################
26755 #
26756 # Override a repo completely, this is used for example when you have 3 small
26757 # development sandboxes of the langtools sources and want to avoid having 3 full
26758 # OpenJDK sources checked out on disk.
26759 #
26760 # Assuming that the 3 langtools sandboxes are located here:
26761 # /home/fredrik/sandbox1/langtools
26762 # /home/fredrik/sandbox2/langtools
26763 # /home/fredrik/sandbox3/langtools
26764 #
26765 # From the source root you create build subdirs manually:
26766 # mkdir -p build1 build2 build3
26767 # in each build directory run:
26768 # (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26769 # (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26770 # (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26771 #
26772
26773
26774 # Check whether --with-override-langtools was given.
26775 if test "${with_override_langtools+set}" = set; then :
26776 withval=$with_override_langtools;
26777 fi
26778
26779
26780
26781 # Check whether --with-override-corba was given.
26782 if test "${with_override_corba+set}" = set; then :
26783 withval=$with_override_corba;
26784 fi
26785
26786
26787
26788 # Check whether --with-override-jaxp was given.
26789 if test "${with_override_jaxp+set}" = set; then :
26790 withval=$with_override_jaxp;
26791 fi
26792
26793
26794
26795 # Check whether --with-override-jaxws was given.
26796 if test "${with_override_jaxws+set}" = set; then :
26797 withval=$with_override_jaxws;
26798 fi
26799
26800
26801
26802 # Check whether --with-override-hotspot was given.
26803 if test "${with_override_hotspot+set}" = set; then :
26804 withval=$with_override_hotspot;
26805 fi
26806
26807
26808
26809 # Check whether --with-override-nashorn was given.
26810 if test "${with_override_nashorn+set}" = set; then :
26811 withval=$with_override_nashorn;
26812 fi
26813
26814
26815
26816 # Check whether --with-override-jdk was given.
26817 if test "${with_override_jdk+set}" = set; then :
26818 withval=$with_override_jdk;
26819 fi
26820
26821
26822 if test "x$with_override_langtools" != x; then
26823 CURDIR="$PWD"
26824 cd "$with_override_langtools"
26825 LANGTOOLS_TOPDIR="`pwd`"
26826 cd "$CURDIR"
26827 if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26828 as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26829 fi
26830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26831 $as_echo_n "checking if langtools should be overridden... " >&6; }
26832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26833 $as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26834 fi
26835 if test "x$with_override_corba" != x; then
26836 CURDIR="$PWD"
26837 cd "$with_override_corba"
26838 CORBA_TOPDIR="`pwd`"
26839 cd "$CURDIR"
26840 if ! test -f $CORBA_TOPDIR/make/Makefile; then
26841 as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26842 fi
26843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26844 $as_echo_n "checking if corba should be overridden... " >&6; }
26845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26846 $as_echo "yes with $CORBA_TOPDIR" >&6; }
26847 fi
26848 if test "x$with_override_jaxp" != x; then
26849 CURDIR="$PWD"
26850 cd "$with_override_jaxp"
26851 JAXP_TOPDIR="`pwd`"
26852 cd "$CURDIR"
26853 if ! test -f $JAXP_TOPDIR/make/Makefile; then
26854 as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26855 fi
26856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26857 $as_echo_n "checking if jaxp should be overridden... " >&6; }
26858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26859 $as_echo "yes with $JAXP_TOPDIR" >&6; }
26860 fi
26861 if test "x$with_override_jaxws" != x; then
26862 CURDIR="$PWD"
26863 cd "$with_override_jaxws"
26864 JAXWS_TOPDIR="`pwd`"
26865 cd "$CURDIR"
26866 if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26867 as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26868 fi
26869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26870 $as_echo_n "checking if jaxws should be overridden... " >&6; }
26871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26872 $as_echo "yes with $JAXWS_TOPDIR" >&6; }
26873 fi
26874 if test "x$with_override_hotspot" != x; then
26875 CURDIR="$PWD"
26876 cd "$with_override_hotspot"
26877 HOTSPOT_TOPDIR="`pwd`"
26878 cd "$CURDIR"
26879 if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26880 as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26881 fi
26882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26883 $as_echo_n "checking if hotspot should be overridden... " >&6; }
26884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26885 $as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26886 fi
26887 if test "x$with_override_nashorn" != x; then
26888 CURDIR="$PWD"
26889 cd "$with_override_nashorn"
26890 NASHORN_TOPDIR="`pwd`"
26891 cd "$CURDIR"
26892 if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26893 as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26894 fi
26895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26896 $as_echo_n "checking if nashorn should be overridden... " >&6; }
26897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26898 $as_echo "yes with $NASHORN_TOPDIR" >&6; }
26899 fi
26900 if test "x$with_override_jdk" != x; then
26901 CURDIR="$PWD"
26902 cd "$with_override_jdk"
26903 JDK_TOPDIR="`pwd`"
26904 cd "$CURDIR"
26905 if ! test -f $JDK_TOPDIR/make/Makefile; then
26906 as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26907 fi
26908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26909 $as_echo_n "checking if JDK should be overridden... " >&6; }
26910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26911 $as_echo "yes with $JDK_TOPDIR" >&6; }
26912 fi
26913
26914
26915 BUILD_OUTPUT="$OUTPUT_ROOT"
26916
26917
26918 HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26919 BUILD_HOTSPOT=true
26920
26921
26922
26923 # Check whether --with-import-hotspot was given.
26924 if test "${with_import_hotspot+set}" = set; then :
26925 withval=$with_import_hotspot;
26926 fi
26927
26928 if test "x$with_import_hotspot" != x; then
26929 CURDIR="$PWD"
26930 cd "$with_import_hotspot"
26931 HOTSPOT_DIST="`pwd`"
26932 cd "$CURDIR"
26933 if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26934 as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26935 fi
26936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26937 $as_echo_n "checking if hotspot should be imported... " >&6; }
26938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26939 $as_echo "yes from $HOTSPOT_DIST" >&6; }
26940 BUILD_HOTSPOT=false
26941 fi
26942
26943 JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26944
26945
26946 ###############################################################################
26947 #
26948 # Setup the toolchain (compilers etc), i.e. tools used to compile and process
26949 # native code.
26950 #
26951 ###############################################################################
26952
26953 # First determine the toolchain type (compiler family)
26954
26955
26956 # Check whether --with-toolchain-type was given.
26957 if test "${with_toolchain_type+set}" = set; then :
26958 withval=$with_toolchain_type;
26959 fi
26960
26961
26962 # Use indirect variable referencing
26963 toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26964 VALID_TOOLCHAINS=${!toolchain_var_name}
26965
26966 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26967 if test -n "$XCODEBUILD"; then
26968 # On Mac OS X, default toolchain to clang after Xcode 5
26969 XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
26970 $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26971 if test $? -ne 0; then
26972 as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26973 fi
26974 XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26975 $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26976 $CUT -f 1 -d .`
26977 { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26978 $as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26979 if test $XCODE_MAJOR_VERSION -ge 5; then
26980 DEFAULT_TOOLCHAIN="clang"
26981 else
26982 DEFAULT_TOOLCHAIN="gcc"
26983 fi
26984 else
26985 # If Xcode is not installed, but the command line tools are
26986 # then we can't run xcodebuild. On these systems we should
26987 # default to clang
26988 DEFAULT_TOOLCHAIN="clang"
26989 fi
26990 else
26991 # First toolchain type in the list is the default
26992 DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26993 fi
26994
26995 if test "x$with_toolchain_type" = xlist; then
26996 # List all toolchains
26997 { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26998 $as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26999 for toolchain in $VALID_TOOLCHAINS; do
27000 toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
27001 TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
27002 $PRINTF " %-10s %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
27003 done
27004
27005 exit 0
27006 elif test "x$with_toolchain_type" != x; then
27007 # User override; check that it is valid
27008 if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
27009 { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
27010 $as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
27011 { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
27012 $as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
27013 as_fn_error $? "Cannot continue." "$LINENO" 5
27014 fi
27015 TOOLCHAIN_TYPE=$with_toolchain_type
27016 else
27017 # No flag given, use default
27018 TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
27019 fi
27020
27021
27022 TOOLCHAIN_CC_BINARY_clang="clang"
27023 TOOLCHAIN_CC_BINARY_gcc="gcc"
27024 TOOLCHAIN_CC_BINARY_microsoft="cl"
27025 TOOLCHAIN_CC_BINARY_solstudio="cc"
27026 TOOLCHAIN_CC_BINARY_xlc="xlc_r"
27027
27028 TOOLCHAIN_CXX_BINARY_clang="clang++"
27029 TOOLCHAIN_CXX_BINARY_gcc="g++"
27030 TOOLCHAIN_CXX_BINARY_microsoft="cl"
27031 TOOLCHAIN_CXX_BINARY_solstudio="CC"
27032 TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
27033
27034 # Use indirect variable referencing
27035 toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
27036 TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
27037 toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
27038 TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
27039 toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
27040 TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
27041
27042
27043 # Define filename patterns
27044 if test "x$OPENJDK_TARGET_OS" = xwindows; then
27045 LIBRARY_PREFIX=
27046 SHARED_LIBRARY_SUFFIX='.dll'
27047 STATIC_LIBRARY_SUFFIX='.lib'
27048 SHARED_LIBRARY='$1.dll'
27049 STATIC_LIBRARY='$1.lib'
27050 OBJ_SUFFIX='.obj'
27051 EXE_SUFFIX='.exe'
27052 else
27053 LIBRARY_PREFIX=lib
27054 SHARED_LIBRARY_SUFFIX='.so'
27055 STATIC_LIBRARY_SUFFIX='.a'
27056 SHARED_LIBRARY='lib$1.so'
27057 STATIC_LIBRARY='lib$1.a'
27058 OBJ_SUFFIX='.o'
27059 EXE_SUFFIX=''
27060 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27061 SHARED_LIBRARY='lib$1.dylib'
27062 SHARED_LIBRARY_SUFFIX='.dylib'
27063 fi
27064 fi
27065
27066
27067
27068
27069
27070
27071
27072
27073
27074
27075 if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
27076 { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
27077 $as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
27078 else
27079 { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
27080 $as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
27081 fi
27082
27083
27084 # Then detect the actual binaries needed
27085
27086 # FIXME: Is this needed?
27087 ac_ext=cpp
27088 ac_cpp='$CXXCPP $CPPFLAGS'
27089 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
27090 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
27091 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
27092
27093
27094 # Store the CFLAGS etc passed to the configure script.
27095 ORG_CFLAGS="$CFLAGS"
27096 ORG_CXXFLAGS="$CXXFLAGS"
27097
27098 # autoconf magic only relies on PATH, so update it if tools dir is specified
27099 OLD_PATH="$PATH"
27100
27101 # On Windows, we need to detect the visual studio installation first.
27102 # This will change the PATH, but we need to keep that new PATH even
27103 # after toolchain detection is done, since the compiler (on x86) uses
27104 # it for DLL resolution in runtime.
27105 if test "x$OPENJDK_BUILD_OS" = "xwindows" \
27106 && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
27107
27108 # Store path to cygwin link.exe to help excluding it when searching for
27109 # VS linker. This must be done before changing the PATH when looking for VS.
27110 # Extract the first word of "link", so it can be a program name with args.
27111 set dummy link; ac_word=$2
27112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27113 $as_echo_n "checking for $ac_word... " >&6; }
27114 if ${ac_cv_path_CYGWIN_LINK+:} false; then :
27115 $as_echo_n "(cached) " >&6
27116 else
27117 case $CYGWIN_LINK in
27118 [\\/]* | ?:[\\/]*)
27119 ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
27120 ;;
27121 *)
27122 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27123 for as_dir in $PATH
27124 do
27125 IFS=$as_save_IFS
27126 test -z "$as_dir" && as_dir=.
27127 for ac_exec_ext in '' $ac_executable_extensions; do
27128 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27129 ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
27130 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27131 break 2
27132 fi
27133 done
27134 done
27135 IFS=$as_save_IFS
27136
27137 ;;
27138 esac
27139 fi
27140 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
27141 if test -n "$CYGWIN_LINK"; then
27142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
27143 $as_echo "$CYGWIN_LINK" >&6; }
27144 else
27145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27146 $as_echo "no" >&6; }
27147 fi
27148
27149
27150 if test "x$CYGWIN_LINK" != x; then
27151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
27152 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
27153 "$CYGWIN_LINK" --version > /dev/null
27154 if test $? -eq 0 ; then
27155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27156 $as_echo "yes" >&6; }
27157 else
27158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27159 $as_echo "no" >&6; }
27160 # This might be the VS linker. Don't exclude it later on.
27161 CYGWIN_LINK=""
27162 fi
27163 fi
27164
27165 # First-hand choice is to locate and run the vsvars bat file.
27166
27167
27168 # Check whether --with-toolchain-version was given.
27169 if test "${with_toolchain_version+set}" = set; then :
27170 withval=$with_toolchain_version;
27171 fi
27172
27173
27174 if test "x$with_toolchain_version" = xlist; then
27175 # List all toolchains
27176 { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
27177 $as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
27178 for version in $VALID_VS_VERSIONS; do
27179 eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
27180 $PRINTF " %-10s %s\n" $version "$VS_DESCRIPTION"
27181 done
27182
27183 exit 0
27184 elif test "x$DEVKIT_VS_VERSION" != x; then
27185 VS_VERSION=$DEVKIT_VS_VERSION
27186 TOOLCHAIN_VERSION=$VS_VERSION
27187 eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
27188 eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
27189 eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
27190 eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
27191 eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27192 VS_PATH="$TOOLCHAIN_PATH:$PATH"
27193
27194 # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
27195 # can still be exported as INCLUDE for compiler invocations without
27196 # SYSROOT_CFLAGS
27197 OLDIFS="$IFS"
27198 IFS=";"
27199 for i in $DEVKIT_VS_INCLUDE; do
27200 ipath=$i
27201
27202 unix_path="$ipath"
27203 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27204 windows_path=`$CYGPATH -m "$unix_path"`
27205 ipath="$windows_path"
27206 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27207 windows_path=`cmd //c echo $unix_path`
27208 ipath="$windows_path"
27209 fi
27210
27211 VS_INCLUDE="$VS_INCLUDE;$ipath"
27212 done
27213 # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
27214 # as LIB for compiler invocations without SYSROOT_LDFLAGS
27215 for i in $DEVKIT_VS_LIB; do
27216 libpath=$i
27217
27218 unix_path="$libpath"
27219 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27220 windows_path=`$CYGPATH -m "$unix_path"`
27221 libpath="$windows_path"
27222 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27223 windows_path=`cmd //c echo $unix_path`
27224 libpath="$windows_path"
27225 fi
27226
27227 VS_LIB="$VS_LIB;$libpath"
27228 done
27229 IFS="$OLDIFS"
27230
27231 { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
27232 $as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
27233
27234 elif test "x$with_toolchain_version" != x; then
27235 # User override; check that it is valid
27236 if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
27237 { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
27238 $as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
27239 { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
27240 $as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
27241 as_fn_error $? "Cannot continue." "$LINENO" 5
27242 fi
27243 VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
27244 else
27245 # No flag given, use default
27246 VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
27247 fi
27248
27249 for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
27250
27251 VS_VERSION="$VS_VERSION"
27252 eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
27253 eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
27254 eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
27255 eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
27256
27257 # When using --with-tools-dir, assume it points to the correct and default
27258 # version of Visual Studio or that --with-toolchain-version was also set.
27259 if test "x$with_tools_dir" != x; then
27260
27261 if test "x$VS_ENV_CMD" = x; then
27262 VS_VERSION="${VS_VERSION}"
27263 VS_BASE="$with_tools_dir/../.."
27264 METHOD="--with-tools-dir"
27265
27266 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27267 VCVARSFILE="vc/bin/vcvars32.bat"
27268 else
27269 VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27270 fi
27271
27272
27273 windows_path="$VS_BASE"
27274 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27275 unix_path=`$CYGPATH -u "$windows_path"`
27276 VS_BASE="$unix_path"
27277 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27278 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27279 VS_BASE="$unix_path"
27280 fi
27281
27282 if test -d "$VS_BASE"; then
27283 if test -f "$VS_BASE/$VCVARSFILE"; then
27284 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27285 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27286 VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27287 # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27288 # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27289 eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27290 else
27291 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27292 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27293 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27294 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27295 fi
27296 fi
27297 fi
27298
27299
27300 if test "x$VS_ENV_CMD" = x; then
27301 VS_VERSION="${VS_VERSION}"
27302 VS_BASE="$with_tools_dir/../../.."
27303 METHOD="--with-tools-dir"
27304
27305 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27306 VCVARSFILE="vc/bin/vcvars32.bat"
27307 else
27308 VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27309 fi
27310
27311
27312 windows_path="$VS_BASE"
27313 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27314 unix_path=`$CYGPATH -u "$windows_path"`
27315 VS_BASE="$unix_path"
27316 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27317 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27318 VS_BASE="$unix_path"
27319 fi
27320
27321 if test -d "$VS_BASE"; then
27322 if test -f "$VS_BASE/$VCVARSFILE"; then
27323 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27324 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27325 VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27326 # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27327 # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27328 eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27329 else
27330 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27331 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27332 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27333 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27334 fi
27335 fi
27336 fi
27337
27338 if test "x$VS_ENV_CMD" = x; then
27339 # Having specified an argument which is incorrect will produce an instant failure;
27340 # we should not go on looking
27341 { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
27342 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
27343 { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
27344 $as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
27345 { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
27346 $as_echo "$as_me: directory within the Visual Studio installation" >&6;}
27347 as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
27348 fi
27349 fi
27350
27351 VS_ENV_CMD=""
27352 VS_ENV_ARGS=""
27353
27354 if test "x$VS_COMNTOOLS" != x; then
27355
27356 if test "x$VS_ENV_CMD" = x; then
27357 VS_VERSION="${VS_VERSION}"
27358 VS_BASE="$VS_COMNTOOLS/../.."
27359 METHOD="$VS_COMNTOOLS_VAR variable"
27360
27361 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27362 VCVARSFILE="vc/bin/vcvars32.bat"
27363 else
27364 VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27365 fi
27366
27367
27368 windows_path="$VS_BASE"
27369 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27370 unix_path=`$CYGPATH -u "$windows_path"`
27371 VS_BASE="$unix_path"
27372 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27373 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27374 VS_BASE="$unix_path"
27375 fi
27376
27377 if test -d "$VS_BASE"; then
27378 if test -f "$VS_BASE/$VCVARSFILE"; then
27379 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27380 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27381 VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27382 # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27383 # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27384 eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27385 else
27386 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27387 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27388 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27389 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27390 fi
27391 fi
27392 fi
27393
27394 fi
27395 if test "x$PROGRAMFILES" != x; then
27396
27397 if test "x$VS_ENV_CMD" = x; then
27398 VS_VERSION="${VS_VERSION}"
27399 VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
27400 METHOD="well-known name"
27401
27402 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27403 VCVARSFILE="vc/bin/vcvars32.bat"
27404 else
27405 VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27406 fi
27407
27408
27409 windows_path="$VS_BASE"
27410 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27411 unix_path=`$CYGPATH -u "$windows_path"`
27412 VS_BASE="$unix_path"
27413 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27414 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27415 VS_BASE="$unix_path"
27416 fi
27417
27418 if test -d "$VS_BASE"; then
27419 if test -f "$VS_BASE/$VCVARSFILE"; then
27420 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27421 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27422 VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27423 # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27424 # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27425 eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27426 else
27427 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27428 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27429 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27430 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27431 fi
27432 fi
27433 fi
27434
27435 fi
27436 # Work around the insanely named ProgramFiles(x86) env variable
27437 PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
27438 if test "x$PROGRAMFILES_X86" != x; then
27439
27440 if test "x$VS_ENV_CMD" = x; then
27441 VS_VERSION="${VS_VERSION}"
27442 VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
27443 METHOD="well-known name"
27444
27445 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27446 VCVARSFILE="vc/bin/vcvars32.bat"
27447 else
27448 VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27449 fi
27450
27451
27452 windows_path="$VS_BASE"
27453 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27454 unix_path=`$CYGPATH -u "$windows_path"`
27455 VS_BASE="$unix_path"
27456 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27457 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27458 VS_BASE="$unix_path"
27459 fi
27460
27461 if test -d "$VS_BASE"; then
27462 if test -f "$VS_BASE/$VCVARSFILE"; then
27463 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27464 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27465 VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27466 # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27467 # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27468 eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27469 else
27470 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27471 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27472 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27473 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27474 fi
27475 fi
27476 fi
27477
27478 fi
27479
27480 if test "x$VS_ENV_CMD" = x; then
27481 VS_VERSION="${VS_VERSION}"
27482 VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
27483 METHOD="well-known name"
27484
27485 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27486 VCVARSFILE="vc/bin/vcvars32.bat"
27487 else
27488 VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27489 fi
27490
27491
27492 windows_path="$VS_BASE"
27493 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27494 unix_path=`$CYGPATH -u "$windows_path"`
27495 VS_BASE="$unix_path"
27496 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27497 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27498 VS_BASE="$unix_path"
27499 fi
27500
27501 if test -d "$VS_BASE"; then
27502 if test -f "$VS_BASE/$VCVARSFILE"; then
27503 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27504 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27505 VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27506 # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27507 # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27508 eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27509 else
27510 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27511 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27512 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27513 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27514 fi
27515 fi
27516 fi
27517
27518
27519 if test "x$VS_ENV_CMD" = x; then
27520 VS_VERSION="${VS_VERSION}"
27521 VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
27522 METHOD="well-known name"
27523
27524 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27525 VCVARSFILE="vc/bin/vcvars32.bat"
27526 else
27527 VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27528 fi
27529
27530
27531 windows_path="$VS_BASE"
27532 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27533 unix_path=`$CYGPATH -u "$windows_path"`
27534 VS_BASE="$unix_path"
27535 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27536 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27537 VS_BASE="$unix_path"
27538 fi
27539
27540 if test -d "$VS_BASE"; then
27541 if test -f "$VS_BASE/$VCVARSFILE"; then
27542 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27543 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27544 VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27545 # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27546 # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27547 eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27548 else
27549 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27550 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27551 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27552 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27553 fi
27554 fi
27555 fi
27556
27557
27558 if test "x$SDK_INSTALL_DIR" != x; then
27559 if test "x$ProgramW6432" != x; then
27560
27561 if test "x$VS_ENV_CMD" = x; then
27562 VS_VERSION="${VS_VERSION}"
27563 WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
27564 METHOD="well-known name"
27565
27566 windows_path="$WIN_SDK_BASE"
27567 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27568 unix_path=`$CYGPATH -u "$windows_path"`
27569 WIN_SDK_BASE="$unix_path"
27570 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27571 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27572 WIN_SDK_BASE="$unix_path"
27573 fi
27574
27575 if test -d "$WIN_SDK_BASE"; then
27576 # There have been cases of partial or broken SDK installations. A missing
27577 # lib dir is not going to work.
27578 if test ! -d "$WIN_SDK_BASE/lib"; then
27579 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27580 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27581 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27582 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27583 elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27584 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27585 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27586 VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27587 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27588 VS_ENV_ARGS="/x86"
27589 else
27590 VS_ENV_ARGS="/x64"
27591 fi
27592 # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27593 # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27594 # TODO: improve detection for other versions of SDK
27595 eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27596 else
27597 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27598 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27599 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27600 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27601 fi
27602 fi
27603 fi
27604
27605 fi
27606 if test "x$PROGRAMW6432" != x; then
27607
27608 if test "x$VS_ENV_CMD" = x; then
27609 VS_VERSION="${VS_VERSION}"
27610 WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
27611 METHOD="well-known name"
27612
27613 windows_path="$WIN_SDK_BASE"
27614 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27615 unix_path=`$CYGPATH -u "$windows_path"`
27616 WIN_SDK_BASE="$unix_path"
27617 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27618 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27619 WIN_SDK_BASE="$unix_path"
27620 fi
27621
27622 if test -d "$WIN_SDK_BASE"; then
27623 # There have been cases of partial or broken SDK installations. A missing
27624 # lib dir is not going to work.
27625 if test ! -d "$WIN_SDK_BASE/lib"; then
27626 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27627 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27628 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27629 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27630 elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27631 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27632 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27633 VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27634 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27635 VS_ENV_ARGS="/x86"
27636 else
27637 VS_ENV_ARGS="/x64"
27638 fi
27639 # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27640 # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27641 # TODO: improve detection for other versions of SDK
27642 eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27643 else
27644 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27645 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27646 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27647 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27648 fi
27649 fi
27650 fi
27651
27652 fi
27653 if test "x$PROGRAMFILES" != x; then
27654
27655 if test "x$VS_ENV_CMD" = x; then
27656 VS_VERSION="${VS_VERSION}"
27657 WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
27658 METHOD="well-known name"
27659
27660 windows_path="$WIN_SDK_BASE"
27661 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27662 unix_path=`$CYGPATH -u "$windows_path"`
27663 WIN_SDK_BASE="$unix_path"
27664 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27665 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27666 WIN_SDK_BASE="$unix_path"
27667 fi
27668
27669 if test -d "$WIN_SDK_BASE"; then
27670 # There have been cases of partial or broken SDK installations. A missing
27671 # lib dir is not going to work.
27672 if test ! -d "$WIN_SDK_BASE/lib"; then
27673 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27674 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27675 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27676 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27677 elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27678 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27679 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27680 VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27681 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27682 VS_ENV_ARGS="/x86"
27683 else
27684 VS_ENV_ARGS="/x64"
27685 fi
27686 # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27687 # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27688 # TODO: improve detection for other versions of SDK
27689 eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27690 else
27691 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27692 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27693 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27694 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27695 fi
27696 fi
27697 fi
27698
27699 fi
27700
27701 if test "x$VS_ENV_CMD" = x; then
27702 VS_VERSION="${VS_VERSION}"
27703 WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
27704 METHOD="well-known name"
27705
27706 windows_path="$WIN_SDK_BASE"
27707 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27708 unix_path=`$CYGPATH -u "$windows_path"`
27709 WIN_SDK_BASE="$unix_path"
27710 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27711 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27712 WIN_SDK_BASE="$unix_path"
27713 fi
27714
27715 if test -d "$WIN_SDK_BASE"; then
27716 # There have been cases of partial or broken SDK installations. A missing
27717 # lib dir is not going to work.
27718 if test ! -d "$WIN_SDK_BASE/lib"; then
27719 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27720 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27721 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27722 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27723 elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27724 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27725 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27726 VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27727 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27728 VS_ENV_ARGS="/x86"
27729 else
27730 VS_ENV_ARGS="/x64"
27731 fi
27732 # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27733 # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27734 # TODO: improve detection for other versions of SDK
27735 eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27736 else
27737 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27738 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27739 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27740 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27741 fi
27742 fi
27743 fi
27744
27745
27746 if test "x$VS_ENV_CMD" = x; then
27747 VS_VERSION="${VS_VERSION}"
27748 WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
27749 METHOD="well-known name"
27750
27751 windows_path="$WIN_SDK_BASE"
27752 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27753 unix_path=`$CYGPATH -u "$windows_path"`
27754 WIN_SDK_BASE="$unix_path"
27755 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27756 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27757 WIN_SDK_BASE="$unix_path"
27758 fi
27759
27760 if test -d "$WIN_SDK_BASE"; then
27761 # There have been cases of partial or broken SDK installations. A missing
27762 # lib dir is not going to work.
27763 if test ! -d "$WIN_SDK_BASE/lib"; then
27764 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27765 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27766 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27767 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27768 elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27769 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27770 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27771 VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27772 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27773 VS_ENV_ARGS="/x86"
27774 else
27775 VS_ENV_ARGS="/x64"
27776 fi
27777 # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27778 # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27779 # TODO: improve detection for other versions of SDK
27780 eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27781 else
27782 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27783 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27784 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27785 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27786 fi
27787 fi
27788 fi
27789
27790 fi
27791
27792 if test "x$VS_ENV_CMD" != x; then
27793 TOOLCHAIN_VERSION=$VS_VERSION
27794 eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
27795 eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
27796 eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
27797 eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
27798 # The rest of the variables are already evaled while probing
27799 { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
27800 $as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
27801 break
27802 fi
27803 done
27804
27805
27806 # If we have a devkit, skip all of the below.
27807 if test "x$DEVKIT_VS_VERSION" = x; then
27808 if test "x$VS_ENV_CMD" != x; then
27809 # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
27810
27811 # Only process if variable expands to non-empty
27812
27813 if test "x$VS_ENV_CMD" != x; then
27814 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27815
27816 # First separate the path from the arguments. This will split at the first
27817 # space.
27818 complete="$VS_ENV_CMD"
27819 path="${complete%% *}"
27820 tmp="$complete EOL"
27821 arguments="${tmp#* }"
27822
27823 # Input might be given as Windows format, start by converting to
27824 # unix format.
27825 new_path=`$CYGPATH -u "$path"`
27826
27827 # Now try to locate executable using which
27828 new_path=`$WHICH "$new_path" 2> /dev/null`
27829 # bat and cmd files are not always considered executable in cygwin causing which
27830 # to not find them
27831 if test "x$new_path" = x \
27832 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27833 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27834 new_path=`$CYGPATH -u "$path"`
27835 fi
27836 if test "x$new_path" = x; then
27837 # Oops. Which didn't find the executable.
27838 # The splitting of arguments from the executable at a space might have been incorrect,
27839 # since paths with space are more likely in Windows. Give it another try with the whole
27840 # argument.
27841 path="$complete"
27842 arguments="EOL"
27843 new_path=`$CYGPATH -u "$path"`
27844 new_path=`$WHICH "$new_path" 2> /dev/null`
27845 # bat and cmd files are not always considered executable in cygwin causing which
27846 # to not find them
27847 if test "x$new_path" = x \
27848 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27849 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27850 new_path=`$CYGPATH -u "$path"`
27851 fi
27852 if test "x$new_path" = x; then
27853 # It's still not found. Now this is an unrecoverable error.
27854 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27855 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27856 has_space=`$ECHO "$complete" | $GREP " "`
27857 if test "x$has_space" != x; then
27858 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27859 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27860 fi
27861 as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27862 fi
27863 fi
27864
27865 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27866 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27867 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27868 # "foo.exe" is OK but "foo" is an error.
27869 #
27870 # This test is therefore slightly more accurate than "test -f" to check for file presence.
27871 # It is also a way to make sure we got the proper file name for the real test later on.
27872 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27873 if test "x$test_shortpath" = x; then
27874 # Short path failed, file does not exist as specified.
27875 # Try adding .exe or .cmd
27876 if test -f "${new_path}.exe"; then
27877 input_to_shortpath="${new_path}.exe"
27878 elif test -f "${new_path}.cmd"; then
27879 input_to_shortpath="${new_path}.cmd"
27880 else
27881 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27882 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27883 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27884 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27885 as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27886 fi
27887 else
27888 input_to_shortpath="$new_path"
27889 fi
27890
27891 # Call helper function which possibly converts this using DOS-style short mode.
27892 # If so, the updated path is stored in $new_path.
27893 new_path="$input_to_shortpath"
27894
27895 input_path="$input_to_shortpath"
27896 # Check if we need to convert this using DOS-style short mode. If the path
27897 # contains just simple characters, use it. Otherwise (spaces, weird characters),
27898 # take no chances and rewrite it.
27899 # Note: m4 eats our [], so we need to use [ and ] instead.
27900 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27901 if test "x$has_forbidden_chars" != x; then
27902 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27903 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27904 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27905 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27906 # Going to short mode and back again did indeed matter. Since short mode is
27907 # case insensitive, let's make it lowercase to improve readability.
27908 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27909 # Now convert it back to Unix-style (cygpath)
27910 input_path=`$CYGPATH -u "$shortmode_path"`
27911 new_path="$input_path"
27912 fi
27913 fi
27914
27915 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27916 if test "x$test_cygdrive_prefix" = x; then
27917 # As a simple fix, exclude /usr/bin since it's not a real path.
27918 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27919 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27920 # a path prefixed by /cygdrive for fixpath to work.
27921 new_path="$CYGWIN_ROOT_PATH$input_path"
27922 fi
27923 fi
27924
27925 # remove trailing .exe if any
27926 new_path="${new_path/%.exe/}"
27927
27928 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27929
27930 # First separate the path from the arguments. This will split at the first
27931 # space.
27932 complete="$VS_ENV_CMD"
27933 path="${complete%% *}"
27934 tmp="$complete EOL"
27935 arguments="${tmp#* }"
27936
27937 # Input might be given as Windows format, start by converting to
27938 # unix format.
27939 new_path="$path"
27940
27941 windows_path="$new_path"
27942 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27943 unix_path=`$CYGPATH -u "$windows_path"`
27944 new_path="$unix_path"
27945 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27946 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27947 new_path="$unix_path"
27948 fi
27949
27950
27951 # Now try to locate executable using which
27952 new_path=`$WHICH "$new_path" 2> /dev/null`
27953
27954 if test "x$new_path" = x; then
27955 # Oops. Which didn't find the executable.
27956 # The splitting of arguments from the executable at a space might have been incorrect,
27957 # since paths with space are more likely in Windows. Give it another try with the whole
27958 # argument.
27959 path="$complete"
27960 arguments="EOL"
27961 new_path="$path"
27962
27963 windows_path="$new_path"
27964 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27965 unix_path=`$CYGPATH -u "$windows_path"`
27966 new_path="$unix_path"
27967 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27968 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27969 new_path="$unix_path"
27970 fi
27971
27972
27973 new_path=`$WHICH "$new_path" 2> /dev/null`
27974 # bat and cmd files are not always considered executable in MSYS causing which
27975 # to not find them
27976 if test "x$new_path" = x \
27977 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27978 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27979 new_path="$path"
27980
27981 windows_path="$new_path"
27982 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27983 unix_path=`$CYGPATH -u "$windows_path"`
27984 new_path="$unix_path"
27985 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27986 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27987 new_path="$unix_path"
27988 fi
27989
27990 fi
27991
27992 if test "x$new_path" = x; then
27993 # It's still not found. Now this is an unrecoverable error.
27994 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27995 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27996 has_space=`$ECHO "$complete" | $GREP " "`
27997 if test "x$has_space" != x; then
27998 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27999 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28000 fi
28001 as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
28002 fi
28003 fi
28004
28005 # Now new_path has a complete unix path to the binary
28006 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28007 # Keep paths in /bin as-is, but remove trailing .exe if any
28008 new_path="${new_path/%.exe/}"
28009 # Do not save /bin paths to all_fixpath_prefixes!
28010 else
28011 # Not in mixed or Windows style, start by that.
28012 new_path=`cmd //c echo $new_path`
28013
28014 input_path="$new_path"
28015 # Check if we need to convert this using DOS-style short mode. If the path
28016 # contains just simple characters, use it. Otherwise (spaces, weird characters),
28017 # take no chances and rewrite it.
28018 # Note: m4 eats our [], so we need to use [ and ] instead.
28019 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28020 if test "x$has_forbidden_chars" != x; then
28021 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28022 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28023 fi
28024
28025 # Output is in $new_path
28026
28027 windows_path="$new_path"
28028 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28029 unix_path=`$CYGPATH -u "$windows_path"`
28030 new_path="$unix_path"
28031 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28032 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28033 new_path="$unix_path"
28034 fi
28035
28036 # remove trailing .exe if any
28037 new_path="${new_path/%.exe/}"
28038
28039 # Save the first 10 bytes of this path to the storage, so fixpath can work.
28040 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28041 fi
28042
28043 else
28044 # We're on a unix platform. Hooray! :)
28045 # First separate the path from the arguments. This will split at the first
28046 # space.
28047 complete="$VS_ENV_CMD"
28048 path="${complete%% *}"
28049 tmp="$complete EOL"
28050 arguments="${tmp#* }"
28051
28052 # Cannot rely on the command "which" here since it doesn't always work.
28053 is_absolute_path=`$ECHO "$path" | $GREP ^/`
28054 if test -z "$is_absolute_path"; then
28055 # Path to executable is not absolute. Find it.
28056 IFS_save="$IFS"
28057 IFS=:
28058 for p in $PATH; do
28059 if test -f "$p/$path" && test -x "$p/$path"; then
28060 new_path="$p/$path"
28061 break
28062 fi
28063 done
28064 IFS="$IFS_save"
28065 else
28066 # This is an absolute path, we can use it without further modifications.
28067 new_path="$path"
28068 fi
28069
28070 if test "x$new_path" = x; then
28071 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
28072 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
28073 has_space=`$ECHO "$complete" | $GREP " "`
28074 if test "x$has_space" != x; then
28075 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28076 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28077 fi
28078 as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
28079 fi
28080 fi
28081
28082 # Now join together the path and the arguments once again
28083 if test "x$arguments" != xEOL; then
28084 new_complete="$new_path ${arguments% *}"
28085 else
28086 new_complete="$new_path"
28087 fi
28088
28089 if test "x$complete" != "x$new_complete"; then
28090 VS_ENV_CMD="$new_complete"
28091 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
28092 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
28093 fi
28094 fi
28095
28096
28097 # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
28098 { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
28099 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
28100
28101 # We need to create a couple of temporary files.
28102 VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
28103 $MKDIR -p $VS_ENV_TMP_DIR
28104
28105 # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
28106 # Instead create a shell script which will set the relevant variables when run.
28107 WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
28108
28109 unix_path="$WINPATH_VS_ENV_CMD"
28110 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28111 windows_path=`$CYGPATH -m "$unix_path"`
28112 WINPATH_VS_ENV_CMD="$windows_path"
28113 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28114 windows_path=`cmd //c echo $unix_path`
28115 WINPATH_VS_ENV_CMD="$windows_path"
28116 fi
28117
28118 WINPATH_BASH="$BASH"
28119
28120 unix_path="$WINPATH_BASH"
28121 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28122 windows_path=`$CYGPATH -m "$unix_path"`
28123 WINPATH_BASH="$windows_path"
28124 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28125 windows_path=`cmd //c echo $unix_path`
28126 WINPATH_BASH="$windows_path"
28127 fi
28128
28129
28130 # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
28131 # script (executable by bash) that will setup the important variables.
28132 EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
28133 $ECHO "@echo off" > $EXTRACT_VC_ENV_BAT_FILE
28134 # This will end up something like:
28135 # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
28136 $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
28137 # These will end up something like:
28138 # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
28139 # The trailing space for everyone except PATH is no typo, but is needed due
28140 # to trailing \ in the Windows paths. These will be stripped later.
28141 $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
28142 >> $EXTRACT_VC_ENV_BAT_FILE
28143 $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
28144 >> $EXTRACT_VC_ENV_BAT_FILE
28145 $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
28146 >> $EXTRACT_VC_ENV_BAT_FILE
28147 $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
28148 >> $EXTRACT_VC_ENV_BAT_FILE
28149 $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
28150 >> $EXTRACT_VC_ENV_BAT_FILE
28151 $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
28152 >> $EXTRACT_VC_ENV_BAT_FILE
28153
28154 # Now execute the newly created bat file.
28155 # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
28156 # Change directory so we don't need to mess with Windows paths in redirects.
28157 cd $VS_ENV_TMP_DIR
28158 cmd /c extract-vs-env.bat | $CAT
28159 cd $CURDIR
28160
28161 if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
28162 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
28163 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
28164 { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
28165 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
28166 { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
28167 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
28168 as_fn_error $? "Cannot continue" "$LINENO" 5
28169 fi
28170
28171 # Now set all paths and other env variables. This will allow the rest of
28172 # the configure script to find and run the compiler in the proper way.
28173 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
28174 $as_echo "$as_me: Setting extracted environment variables" >&6;}
28175 . $VS_ENV_TMP_DIR/set-vs-env.sh
28176 # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
28177 # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
28178 else
28179 # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
28180 { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
28181 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
28182 fi
28183 fi
28184
28185 # At this point, we should have correct variables in the environment, or we can't continue.
28186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
28187 $as_echo_n "checking for Visual Studio variables... " >&6; }
28188
28189 if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
28190 || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
28191 if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
28192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
28193 $as_echo "present but broken" >&6; }
28194 as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
28195 else
28196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28197 $as_echo "ok" >&6; }
28198 # Remove any trailing "\" ";" and " " from the variables.
28199 VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
28200 VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
28201 VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
28202 WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
28203 WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
28204 # Remove any paths containing # (typically F#) as that messes up make. This
28205 # is needed if visual studio was installed with F# support.
28206 VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
28207
28208
28209
28210
28211
28212 # Convert VS_INCLUDE into SYSROOT_CFLAGS
28213 OLDIFS="$IFS"
28214 IFS=";"
28215 for i in $VS_INCLUDE; do
28216 ipath=$i
28217 # Only process non-empty elements
28218 if test "x$ipath" != x; then
28219 IFS="$OLDIFS"
28220 # Check that directory exists before calling fixup_path
28221 testpath=$ipath
28222
28223 windows_path="$testpath"
28224 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28225 unix_path=`$CYGPATH -u "$windows_path"`
28226 testpath="$unix_path"
28227 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28228 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28229 testpath="$unix_path"
28230 fi
28231
28232 if test -d "$testpath"; then
28233
28234 # Only process if variable expands to non-empty
28235
28236 if test "x$ipath" != x; then
28237 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28238
28239 # Input might be given as Windows format, start by converting to
28240 # unix format.
28241 path="$ipath"
28242 new_path=`$CYGPATH -u "$path"`
28243
28244 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28245 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28246 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28247 # "foo.exe" is OK but "foo" is an error.
28248 #
28249 # This test is therefore slightly more accurate than "test -f" to check for file precense.
28250 # It is also a way to make sure we got the proper file name for the real test later on.
28251 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28252 if test "x$test_shortpath" = x; then
28253 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
28254 $as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
28255 as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
28256 fi
28257
28258 # Call helper function which possibly converts this using DOS-style short mode.
28259 # If so, the updated path is stored in $new_path.
28260
28261 input_path="$new_path"
28262 # Check if we need to convert this using DOS-style short mode. If the path
28263 # contains just simple characters, use it. Otherwise (spaces, weird characters),
28264 # take no chances and rewrite it.
28265 # Note: m4 eats our [], so we need to use [ and ] instead.
28266 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28267 if test "x$has_forbidden_chars" != x; then
28268 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28269 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28270 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28271 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28272 # Going to short mode and back again did indeed matter. Since short mode is
28273 # case insensitive, let's make it lowercase to improve readability.
28274 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28275 # Now convert it back to Unix-style (cygpath)
28276 input_path=`$CYGPATH -u "$shortmode_path"`
28277 new_path="$input_path"
28278 fi
28279 fi
28280
28281 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28282 if test "x$test_cygdrive_prefix" = x; then
28283 # As a simple fix, exclude /usr/bin since it's not a real path.
28284 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28285 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28286 # a path prefixed by /cygdrive for fixpath to work.
28287 new_path="$CYGWIN_ROOT_PATH$input_path"
28288 fi
28289 fi
28290
28291
28292 if test "x$path" != "x$new_path"; then
28293 ipath="$new_path"
28294 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
28295 $as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
28296 fi
28297
28298 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28299
28300 path="$ipath"
28301 has_colon=`$ECHO $path | $GREP ^.:`
28302 new_path="$path"
28303 if test "x$has_colon" = x; then
28304 # Not in mixed or Windows style, start by that.
28305 new_path=`cmd //c echo $path`
28306 fi
28307
28308
28309 input_path="$new_path"
28310 # Check if we need to convert this using DOS-style short mode. If the path
28311 # contains just simple characters, use it. Otherwise (spaces, weird characters),
28312 # take no chances and rewrite it.
28313 # Note: m4 eats our [], so we need to use [ and ] instead.
28314 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28315 if test "x$has_forbidden_chars" != x; then
28316 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28317 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28318 fi
28319
28320
28321 windows_path="$new_path"
28322 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28323 unix_path=`$CYGPATH -u "$windows_path"`
28324 new_path="$unix_path"
28325 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28326 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28327 new_path="$unix_path"
28328 fi
28329
28330 if test "x$path" != "x$new_path"; then
28331 ipath="$new_path"
28332 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
28333 $as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
28334 fi
28335
28336 # Save the first 10 bytes of this path to the storage, so fixpath can work.
28337 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28338
28339 else
28340 # We're on a unix platform. Hooray! :)
28341 path="$ipath"
28342 has_space=`$ECHO "$path" | $GREP " "`
28343 if test "x$has_space" != x; then
28344 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
28345 $as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
28346 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28347 fi
28348
28349 # Use eval to expand a potential ~
28350 eval path="$path"
28351 if test ! -f "$path" && test ! -d "$path"; then
28352 as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
28353 fi
28354
28355 ipath="`cd "$path"; $THEPWDCMD -L`"
28356 fi
28357 fi
28358
28359 SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
28360 fi
28361 IFS=";"
28362 fi
28363 done
28364 # Convert VS_LIB into SYSROOT_LDFLAGS
28365 for i in $VS_LIB; do
28366 libpath=$i
28367 # Only process non-empty elements
28368 if test "x$libpath" != x; then
28369 IFS="$OLDIFS"
28370 # Check that directory exists before calling fixup_path
28371 testpath=$libpath
28372
28373 windows_path="$testpath"
28374 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28375 unix_path=`$CYGPATH -u "$windows_path"`
28376 testpath="$unix_path"
28377 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28378 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28379 testpath="$unix_path"
28380 fi
28381
28382 if test -d "$testpath"; then
28383
28384 # Only process if variable expands to non-empty
28385
28386 if test "x$libpath" != x; then
28387 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28388
28389 # Input might be given as Windows format, start by converting to
28390 # unix format.
28391 path="$libpath"
28392 new_path=`$CYGPATH -u "$path"`
28393
28394 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28395 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28396 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28397 # "foo.exe" is OK but "foo" is an error.
28398 #
28399 # This test is therefore slightly more accurate than "test -f" to check for file precense.
28400 # It is also a way to make sure we got the proper file name for the real test later on.
28401 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28402 if test "x$test_shortpath" = x; then
28403 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
28404 $as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
28405 as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
28406 fi
28407
28408 # Call helper function which possibly converts this using DOS-style short mode.
28409 # If so, the updated path is stored in $new_path.
28410
28411 input_path="$new_path"
28412 # Check if we need to convert this using DOS-style short mode. If the path
28413 # contains just simple characters, use it. Otherwise (spaces, weird characters),
28414 # take no chances and rewrite it.
28415 # Note: m4 eats our [], so we need to use [ and ] instead.
28416 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28417 if test "x$has_forbidden_chars" != x; then
28418 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28419 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28420 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28421 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28422 # Going to short mode and back again did indeed matter. Since short mode is
28423 # case insensitive, let's make it lowercase to improve readability.
28424 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28425 # Now convert it back to Unix-style (cygpath)
28426 input_path=`$CYGPATH -u "$shortmode_path"`
28427 new_path="$input_path"
28428 fi
28429 fi
28430
28431 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28432 if test "x$test_cygdrive_prefix" = x; then
28433 # As a simple fix, exclude /usr/bin since it's not a real path.
28434 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28435 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28436 # a path prefixed by /cygdrive for fixpath to work.
28437 new_path="$CYGWIN_ROOT_PATH$input_path"
28438 fi
28439 fi
28440
28441
28442 if test "x$path" != "x$new_path"; then
28443 libpath="$new_path"
28444 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
28445 $as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
28446 fi
28447
28448 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28449
28450 path="$libpath"
28451 has_colon=`$ECHO $path | $GREP ^.:`
28452 new_path="$path"
28453 if test "x$has_colon" = x; then
28454 # Not in mixed or Windows style, start by that.
28455 new_path=`cmd //c echo $path`
28456 fi
28457
28458
28459 input_path="$new_path"
28460 # Check if we need to convert this using DOS-style short mode. If the path
28461 # contains just simple characters, use it. Otherwise (spaces, weird characters),
28462 # take no chances and rewrite it.
28463 # Note: m4 eats our [], so we need to use [ and ] instead.
28464 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28465 if test "x$has_forbidden_chars" != x; then
28466 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28467 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28468 fi
28469
28470
28471 windows_path="$new_path"
28472 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28473 unix_path=`$CYGPATH -u "$windows_path"`
28474 new_path="$unix_path"
28475 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28476 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28477 new_path="$unix_path"
28478 fi
28479
28480 if test "x$path" != "x$new_path"; then
28481 libpath="$new_path"
28482 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
28483 $as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
28484 fi
28485
28486 # Save the first 10 bytes of this path to the storage, so fixpath can work.
28487 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28488
28489 else
28490 # We're on a unix platform. Hooray! :)
28491 path="$libpath"
28492 has_space=`$ECHO "$path" | $GREP " "`
28493 if test "x$has_space" != x; then
28494 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
28495 $as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
28496 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28497 fi
28498
28499 # Use eval to expand a potential ~
28500 eval path="$path"
28501 if test ! -f "$path" && test ! -d "$path"; then
28502 as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
28503 fi
28504
28505 libpath="`cd "$path"; $THEPWDCMD -L`"
28506 fi
28507 fi
28508
28509 SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
28510 fi
28511 IFS=";"
28512 fi
28513 done
28514 IFS="$OLDIFS"
28515 fi
28516 else
28517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28518 $as_echo "not found" >&6; }
28519
28520 if test "x$VS_ENV_CMD" = x; then
28521 { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
28522 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
28523 { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
28524 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
28525 else
28526 { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
28527 $as_echo "$as_me: Running the extraction script failed." >&6;}
28528 fi
28529 { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
28530 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
28531 { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
28532 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
28533 as_fn_error $? "Cannot continue" "$LINENO" 5
28534 fi
28535
28536 # Reset path to VS_PATH. It will include everything that was on PATH at the time we
28537 # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
28538 PATH="$VS_PATH"
28539 # The microsoft toolchain also requires INCLUDE and LIB to be set.
28540 export INCLUDE="$VS_INCLUDE"
28541 export LIB="$VS_LIB"
28542 fi
28543
28544 # For solaris we really need solaris tools, and not the GNU equivalent.
28545 # The build tools on Solaris reside in /usr/ccs (C Compilation System),
28546 # so add that to path before starting to probe.
28547 # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
28548 if test "x$OPENJDK_BUILD_OS" = xsolaris; then
28549 PATH="/usr/ccs/bin:$PATH"
28550 fi
28551
28552 # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
28553 # override all other locations.
28554 if test "x$TOOLCHAIN_PATH" != x; then
28555 PATH=$TOOLCHAIN_PATH:$PATH
28556 fi
28557
28558
28559 #
28560 # Setup the compilers (CC and CXX)
28561 #
28562
28563 COMPILER_NAME=C
28564 SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
28565
28566 if test "x$CC" != x; then
28567 # User has supplied compiler name already, always let that override.
28568 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
28569 $as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
28570 if test "x`basename $CC`" = "x$CC"; then
28571 # A command without a complete path is provided, search $PATH.
28572
28573 for ac_prog in $CC
28574 do
28575 # Extract the first word of "$ac_prog", so it can be a program name with args.
28576 set dummy $ac_prog; ac_word=$2
28577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28578 $as_echo_n "checking for $ac_word... " >&6; }
28579 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28580 $as_echo_n "(cached) " >&6
28581 else
28582 case $POTENTIAL_CC in
28583 [\\/]* | ?:[\\/]*)
28584 ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28585 ;;
28586 *)
28587 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28588 for as_dir in $PATH
28589 do
28590 IFS=$as_save_IFS
28591 test -z "$as_dir" && as_dir=.
28592 for ac_exec_ext in '' $ac_executable_extensions; do
28593 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28594 ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28595 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28596 break 2
28597 fi
28598 done
28599 done
28600 IFS=$as_save_IFS
28601
28602 ;;
28603 esac
28604 fi
28605 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28606 if test -n "$POTENTIAL_CC"; then
28607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28608 $as_echo "$POTENTIAL_CC" >&6; }
28609 else
28610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28611 $as_echo "no" >&6; }
28612 fi
28613
28614
28615 test -n "$POTENTIAL_CC" && break
28616 done
28617
28618 if test "x$POTENTIAL_CC" != x; then
28619 CC=$POTENTIAL_CC
28620 else
28621 as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
28622 fi
28623 else
28624 # Otherwise it might already be a complete path
28625 if test ! -x "$CC"; then
28626 as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
28627 fi
28628 fi
28629 else
28630 # No user supplied value. Locate compiler ourselves.
28631
28632 # If we are cross compiling, assume cross compilation tools follows the
28633 # cross compilation standard where they are prefixed with the autoconf
28634 # standard name for the target. For example the binary
28635 # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
28636 # If we are not cross compiling, then the default compiler name will be
28637 # used.
28638
28639 CC=
28640 # If TOOLCHAIN_PATH is set, check for all compiler names in there first
28641 # before checking the rest of the PATH.
28642 # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
28643 # step, this should not be necessary.
28644 if test -n "$TOOLCHAIN_PATH"; then
28645 PATH_save="$PATH"
28646 PATH="$TOOLCHAIN_PATH"
28647 for ac_prog in $SEARCH_LIST
28648 do
28649 # Extract the first word of "$ac_prog", so it can be a program name with args.
28650 set dummy $ac_prog; ac_word=$2
28651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28652 $as_echo_n "checking for $ac_word... " >&6; }
28653 if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
28654 $as_echo_n "(cached) " >&6
28655 else
28656 case $TOOLCHAIN_PATH_CC in
28657 [\\/]* | ?:[\\/]*)
28658 ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
28659 ;;
28660 *)
28661 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28662 for as_dir in $PATH
28663 do
28664 IFS=$as_save_IFS
28665 test -z "$as_dir" && as_dir=.
28666 for ac_exec_ext in '' $ac_executable_extensions; do
28667 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28668 ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
28669 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28670 break 2
28671 fi
28672 done
28673 done
28674 IFS=$as_save_IFS
28675
28676 ;;
28677 esac
28678 fi
28679 TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
28680 if test -n "$TOOLCHAIN_PATH_CC"; then
28681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
28682 $as_echo "$TOOLCHAIN_PATH_CC" >&6; }
28683 else
28684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28685 $as_echo "no" >&6; }
28686 fi
28687
28688
28689 test -n "$TOOLCHAIN_PATH_CC" && break
28690 done
28691
28692 CC=$TOOLCHAIN_PATH_CC
28693 PATH="$PATH_save"
28694 fi
28695
28696 # AC_PATH_PROGS can't be run multiple times with the same variable,
28697 # so create a new name for this run.
28698 if test "x$CC" = x; then
28699 for ac_prog in $SEARCH_LIST
28700 do
28701 # Extract the first word of "$ac_prog", so it can be a program name with args.
28702 set dummy $ac_prog; ac_word=$2
28703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28704 $as_echo_n "checking for $ac_word... " >&6; }
28705 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28706 $as_echo_n "(cached) " >&6
28707 else
28708 case $POTENTIAL_CC in
28709 [\\/]* | ?:[\\/]*)
28710 ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28711 ;;
28712 *)
28713 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28714 for as_dir in $PATH
28715 do
28716 IFS=$as_save_IFS
28717 test -z "$as_dir" && as_dir=.
28718 for ac_exec_ext in '' $ac_executable_extensions; do
28719 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28720 ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28721 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28722 break 2
28723 fi
28724 done
28725 done
28726 IFS=$as_save_IFS
28727
28728 ;;
28729 esac
28730 fi
28731 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28732 if test -n "$POTENTIAL_CC"; then
28733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28734 $as_echo "$POTENTIAL_CC" >&6; }
28735 else
28736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28737 $as_echo "no" >&6; }
28738 fi
28739
28740
28741 test -n "$POTENTIAL_CC" && break
28742 done
28743
28744 CC=$POTENTIAL_CC
28745 fi
28746
28747 if test "x$CC" = x; then
28748
28749 # Print a helpful message on how to acquire the necessary build dependency.
28750 # devkit is the help tag: freetype, cups, pulse, alsa etc
28751 MISSING_DEPENDENCY=devkit
28752
28753 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28754 cygwin_help $MISSING_DEPENDENCY
28755 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28756 msys_help $MISSING_DEPENDENCY
28757 else
28758 PKGHANDLER_COMMAND=
28759
28760 case $PKGHANDLER in
28761 apt-get)
28762 apt_help $MISSING_DEPENDENCY ;;
28763 yum)
28764 yum_help $MISSING_DEPENDENCY ;;
28765 port)
28766 port_help $MISSING_DEPENDENCY ;;
28767 pkgutil)
28768 pkgutil_help $MISSING_DEPENDENCY ;;
28769 pkgadd)
28770 pkgadd_help $MISSING_DEPENDENCY ;;
28771 esac
28772
28773 if test "x$PKGHANDLER_COMMAND" != x; then
28774 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28775 fi
28776 fi
28777
28778 as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
28779 fi
28780 fi
28781
28782 # Now we have a compiler binary in CC. Make sure it's okay.
28783
28784 # Only process if variable expands to non-empty
28785
28786 if test "x$CC" != x; then
28787 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28788
28789 # First separate the path from the arguments. This will split at the first
28790 # space.
28791 complete="$CC"
28792 path="${complete%% *}"
28793 tmp="$complete EOL"
28794 arguments="${tmp#* }"
28795
28796 # Input might be given as Windows format, start by converting to
28797 # unix format.
28798 new_path=`$CYGPATH -u "$path"`
28799
28800 # Now try to locate executable using which
28801 new_path=`$WHICH "$new_path" 2> /dev/null`
28802 # bat and cmd files are not always considered executable in cygwin causing which
28803 # to not find them
28804 if test "x$new_path" = x \
28805 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28806 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28807 new_path=`$CYGPATH -u "$path"`
28808 fi
28809 if test "x$new_path" = x; then
28810 # Oops. Which didn't find the executable.
28811 # The splitting of arguments from the executable at a space might have been incorrect,
28812 # since paths with space are more likely in Windows. Give it another try with the whole
28813 # argument.
28814 path="$complete"
28815 arguments="EOL"
28816 new_path=`$CYGPATH -u "$path"`
28817 new_path=`$WHICH "$new_path" 2> /dev/null`
28818 # bat and cmd files are not always considered executable in cygwin causing which
28819 # to not find them
28820 if test "x$new_path" = x \
28821 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28822 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28823 new_path=`$CYGPATH -u "$path"`
28824 fi
28825 if test "x$new_path" = x; then
28826 # It's still not found. Now this is an unrecoverable error.
28827 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28828 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28829 has_space=`$ECHO "$complete" | $GREP " "`
28830 if test "x$has_space" != x; then
28831 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28832 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28833 fi
28834 as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28835 fi
28836 fi
28837
28838 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28839 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28840 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28841 # "foo.exe" is OK but "foo" is an error.
28842 #
28843 # This test is therefore slightly more accurate than "test -f" to check for file presence.
28844 # It is also a way to make sure we got the proper file name for the real test later on.
28845 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28846 if test "x$test_shortpath" = x; then
28847 # Short path failed, file does not exist as specified.
28848 # Try adding .exe or .cmd
28849 if test -f "${new_path}.exe"; then
28850 input_to_shortpath="${new_path}.exe"
28851 elif test -f "${new_path}.cmd"; then
28852 input_to_shortpath="${new_path}.cmd"
28853 else
28854 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
28855 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
28856 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28857 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28858 as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28859 fi
28860 else
28861 input_to_shortpath="$new_path"
28862 fi
28863
28864 # Call helper function which possibly converts this using DOS-style short mode.
28865 # If so, the updated path is stored in $new_path.
28866 new_path="$input_to_shortpath"
28867
28868 input_path="$input_to_shortpath"
28869 # Check if we need to convert this using DOS-style short mode. If the path
28870 # contains just simple characters, use it. Otherwise (spaces, weird characters),
28871 # take no chances and rewrite it.
28872 # Note: m4 eats our [], so we need to use [ and ] instead.
28873 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28874 if test "x$has_forbidden_chars" != x; then
28875 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28876 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28877 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28878 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28879 # Going to short mode and back again did indeed matter. Since short mode is
28880 # case insensitive, let's make it lowercase to improve readability.
28881 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28882 # Now convert it back to Unix-style (cygpath)
28883 input_path=`$CYGPATH -u "$shortmode_path"`
28884 new_path="$input_path"
28885 fi
28886 fi
28887
28888 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28889 if test "x$test_cygdrive_prefix" = x; then
28890 # As a simple fix, exclude /usr/bin since it's not a real path.
28891 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28892 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28893 # a path prefixed by /cygdrive for fixpath to work.
28894 new_path="$CYGWIN_ROOT_PATH$input_path"
28895 fi
28896 fi
28897
28898 # remove trailing .exe if any
28899 new_path="${new_path/%.exe/}"
28900
28901 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28902
28903 # First separate the path from the arguments. This will split at the first
28904 # space.
28905 complete="$CC"
28906 path="${complete%% *}"
28907 tmp="$complete EOL"
28908 arguments="${tmp#* }"
28909
28910 # Input might be given as Windows format, start by converting to
28911 # unix format.
28912 new_path="$path"
28913
28914 windows_path="$new_path"
28915 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28916 unix_path=`$CYGPATH -u "$windows_path"`
28917 new_path="$unix_path"
28918 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28919 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28920 new_path="$unix_path"
28921 fi
28922
28923
28924 # Now try to locate executable using which
28925 new_path=`$WHICH "$new_path" 2> /dev/null`
28926
28927 if test "x$new_path" = x; then
28928 # Oops. Which didn't find the executable.
28929 # The splitting of arguments from the executable at a space might have been incorrect,
28930 # since paths with space are more likely in Windows. Give it another try with the whole
28931 # argument.
28932 path="$complete"
28933 arguments="EOL"
28934 new_path="$path"
28935
28936 windows_path="$new_path"
28937 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28938 unix_path=`$CYGPATH -u "$windows_path"`
28939 new_path="$unix_path"
28940 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28941 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28942 new_path="$unix_path"
28943 fi
28944
28945
28946 new_path=`$WHICH "$new_path" 2> /dev/null`
28947 # bat and cmd files are not always considered executable in MSYS causing which
28948 # to not find them
28949 if test "x$new_path" = x \
28950 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28951 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28952 new_path="$path"
28953
28954 windows_path="$new_path"
28955 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28956 unix_path=`$CYGPATH -u "$windows_path"`
28957 new_path="$unix_path"
28958 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28959 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28960 new_path="$unix_path"
28961 fi
28962
28963 fi
28964
28965 if test "x$new_path" = x; then
28966 # It's still not found. Now this is an unrecoverable error.
28967 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28968 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28969 has_space=`$ECHO "$complete" | $GREP " "`
28970 if test "x$has_space" != x; then
28971 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28972 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28973 fi
28974 as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28975 fi
28976 fi
28977
28978 # Now new_path has a complete unix path to the binary
28979 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28980 # Keep paths in /bin as-is, but remove trailing .exe if any
28981 new_path="${new_path/%.exe/}"
28982 # Do not save /bin paths to all_fixpath_prefixes!
28983 else
28984 # Not in mixed or Windows style, start by that.
28985 new_path=`cmd //c echo $new_path`
28986
28987 input_path="$new_path"
28988 # Check if we need to convert this using DOS-style short mode. If the path
28989 # contains just simple characters, use it. Otherwise (spaces, weird characters),
28990 # take no chances and rewrite it.
28991 # Note: m4 eats our [], so we need to use [ and ] instead.
28992 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28993 if test "x$has_forbidden_chars" != x; then
28994 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28995 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28996 fi
28997
28998 # Output is in $new_path
28999
29000 windows_path="$new_path"
29001 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29002 unix_path=`$CYGPATH -u "$windows_path"`
29003 new_path="$unix_path"
29004 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29005 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29006 new_path="$unix_path"
29007 fi
29008
29009 # remove trailing .exe if any
29010 new_path="${new_path/%.exe/}"
29011
29012 # Save the first 10 bytes of this path to the storage, so fixpath can work.
29013 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29014 fi
29015
29016 else
29017 # We're on a unix platform. Hooray! :)
29018 # First separate the path from the arguments. This will split at the first
29019 # space.
29020 complete="$CC"
29021 path="${complete%% *}"
29022 tmp="$complete EOL"
29023 arguments="${tmp#* }"
29024
29025 # Cannot rely on the command "which" here since it doesn't always work.
29026 is_absolute_path=`$ECHO "$path" | $GREP ^/`
29027 if test -z "$is_absolute_path"; then
29028 # Path to executable is not absolute. Find it.
29029 IFS_save="$IFS"
29030 IFS=:
29031 for p in $PATH; do
29032 if test -f "$p/$path" && test -x "$p/$path"; then
29033 new_path="$p/$path"
29034 break
29035 fi
29036 done
29037 IFS="$IFS_save"
29038 else
29039 # This is an absolute path, we can use it without further modifications.
29040 new_path="$path"
29041 fi
29042
29043 if test "x$new_path" = x; then
29044 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
29045 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
29046 has_space=`$ECHO "$complete" | $GREP " "`
29047 if test "x$has_space" != x; then
29048 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29049 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29050 fi
29051 as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
29052 fi
29053 fi
29054
29055 # Now join together the path and the arguments once again
29056 if test "x$arguments" != xEOL; then
29057 new_complete="$new_path ${arguments% *}"
29058 else
29059 new_complete="$new_path"
29060 fi
29061
29062 if test "x$complete" != "x$new_complete"; then
29063 CC="$new_complete"
29064 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
29065 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
29066 fi
29067 fi
29068
29069 TEST_COMPILER="$CC"
29070 # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
29071 # to 'xlc' but it is crucial that we invoke the compiler with the right name!
29072 if test "x$OPENJDK_BUILD_OS" != xaix; then
29073 # FIXME: This test should not be needed anymore; we don't do that for any platform.
29074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
29075 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
29076
29077 if test "x$OPENJDK_BUILD_OS" != xwindows; then
29078 # Follow a chain of symbolic links. Use readlink
29079 # where it exists, else fall back to horribly
29080 # complicated shell code.
29081 if test "x$READLINK_TESTED" != yes; then
29082 # On MacOSX there is a readlink tool with a different
29083 # purpose than the GNU readlink tool. Check the found readlink.
29084 ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29085 if test "x$ISGNU" = x; then
29086 # A readlink that we do not know how to use.
29087 # Are there other non-GNU readlinks out there?
29088 READLINK_TESTED=yes
29089 READLINK=
29090 fi
29091 fi
29092
29093 if test "x$READLINK" != x; then
29094 TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
29095 else
29096 # Save the current directory for restoring afterwards
29097 STARTDIR=$PWD
29098 COUNTER=0
29099 sym_link_dir=`$DIRNAME $TEST_COMPILER`
29100 sym_link_file=`$BASENAME $TEST_COMPILER`
29101 cd $sym_link_dir
29102 # Use -P flag to resolve symlinks in directories.
29103 cd `$THEPWDCMD -P`
29104 sym_link_dir=`$THEPWDCMD -P`
29105 # Resolve file symlinks
29106 while test $COUNTER -lt 20; do
29107 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29108 if test "x$ISLINK" == x; then
29109 # This is not a symbolic link! We are done!
29110 break
29111 fi
29112 # Again resolve directory symlinks since the target of the just found
29113 # link could be in a different directory
29114 cd `$DIRNAME $ISLINK`
29115 sym_link_dir=`$THEPWDCMD -P`
29116 sym_link_file=`$BASENAME $ISLINK`
29117 let COUNTER=COUNTER+1
29118 done
29119 cd $STARTDIR
29120 TEST_COMPILER=$sym_link_dir/$sym_link_file
29121 fi
29122 fi
29123
29124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
29125 $as_echo "$TEST_COMPILER" >&6; }
29126 fi
29127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
29128 $as_echo_n "checking if CC is disguised ccache... " >&6; }
29129
29130 COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
29131 if test "x$COMPILER_BASENAME" = "xccache"; then
29132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
29133 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
29134 # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
29135 # We want to control ccache invocation ourselves, so ignore this cc and try
29136 # searching again.
29137
29138 # Remove the path to the fake ccache cc from the PATH
29139 RETRY_COMPILER_SAVED_PATH="$PATH"
29140 COMPILER_DIRNAME=`$DIRNAME $CC`
29141 PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
29142
29143 # Try again looking for our compiler
29144 if test -n "$ac_tool_prefix"; then
29145 for ac_prog in $TOOLCHAIN_CC_BINARY
29146 do
29147 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29148 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29150 $as_echo_n "checking for $ac_word... " >&6; }
29151 if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
29152 $as_echo_n "(cached) " >&6
29153 else
29154 if test -n "$PROPER_COMPILER_CC"; then
29155 ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
29156 else
29157 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29158 for as_dir in $PATH
29159 do
29160 IFS=$as_save_IFS
29161 test -z "$as_dir" && as_dir=.
29162 for ac_exec_ext in '' $ac_executable_extensions; do
29163 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29164 ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
29165 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29166 break 2
29167 fi
29168 done
29169 done
29170 IFS=$as_save_IFS
29171
29172 fi
29173 fi
29174 PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
29175 if test -n "$PROPER_COMPILER_CC"; then
29176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
29177 $as_echo "$PROPER_COMPILER_CC" >&6; }
29178 else
29179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29180 $as_echo "no" >&6; }
29181 fi
29182
29183
29184 test -n "$PROPER_COMPILER_CC" && break
29185 done
29186 fi
29187 if test -z "$PROPER_COMPILER_CC"; then
29188 ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
29189 for ac_prog in $TOOLCHAIN_CC_BINARY
29190 do
29191 # Extract the first word of "$ac_prog", so it can be a program name with args.
29192 set dummy $ac_prog; ac_word=$2
29193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29194 $as_echo_n "checking for $ac_word... " >&6; }
29195 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
29196 $as_echo_n "(cached) " >&6
29197 else
29198 if test -n "$ac_ct_PROPER_COMPILER_CC"; then
29199 ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
29200 else
29201 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29202 for as_dir in $PATH
29203 do
29204 IFS=$as_save_IFS
29205 test -z "$as_dir" && as_dir=.
29206 for ac_exec_ext in '' $ac_executable_extensions; do
29207 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29208 ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
29209 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29210 break 2
29211 fi
29212 done
29213 done
29214 IFS=$as_save_IFS
29215
29216 fi
29217 fi
29218 ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
29219 if test -n "$ac_ct_PROPER_COMPILER_CC"; then
29220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
29221 $as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
29222 else
29223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29224 $as_echo "no" >&6; }
29225 fi
29226
29227
29228 test -n "$ac_ct_PROPER_COMPILER_CC" && break
29229 done
29230
29231 if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
29232 PROPER_COMPILER_CC=""
29233 else
29234 case $cross_compiling:$ac_tool_warned in
29235 yes:)
29236 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29237 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29238 ac_tool_warned=yes ;;
29239 esac
29240 PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
29241 fi
29242 fi
29243
29244
29245 # Only process if variable expands to non-empty
29246
29247 if test "x$PROPER_COMPILER_CC" != x; then
29248 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29249
29250 # First separate the path from the arguments. This will split at the first
29251 # space.
29252 complete="$PROPER_COMPILER_CC"
29253 path="${complete%% *}"
29254 tmp="$complete EOL"
29255 arguments="${tmp#* }"
29256
29257 # Input might be given as Windows format, start by converting to
29258 # unix format.
29259 new_path=`$CYGPATH -u "$path"`
29260
29261 # Now try to locate executable using which
29262 new_path=`$WHICH "$new_path" 2> /dev/null`
29263 # bat and cmd files are not always considered executable in cygwin causing which
29264 # to not find them
29265 if test "x$new_path" = x \
29266 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29267 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29268 new_path=`$CYGPATH -u "$path"`
29269 fi
29270 if test "x$new_path" = x; then
29271 # Oops. Which didn't find the executable.
29272 # The splitting of arguments from the executable at a space might have been incorrect,
29273 # since paths with space are more likely in Windows. Give it another try with the whole
29274 # argument.
29275 path="$complete"
29276 arguments="EOL"
29277 new_path=`$CYGPATH -u "$path"`
29278 new_path=`$WHICH "$new_path" 2> /dev/null`
29279 # bat and cmd files are not always considered executable in cygwin causing which
29280 # to not find them
29281 if test "x$new_path" = x \
29282 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29283 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29284 new_path=`$CYGPATH -u "$path"`
29285 fi
29286 if test "x$new_path" = x; then
29287 # It's still not found. Now this is an unrecoverable error.
29288 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29289 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29290 has_space=`$ECHO "$complete" | $GREP " "`
29291 if test "x$has_space" != x; then
29292 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29293 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29294 fi
29295 as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29296 fi
29297 fi
29298
29299 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29300 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29301 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29302 # "foo.exe" is OK but "foo" is an error.
29303 #
29304 # This test is therefore slightly more accurate than "test -f" to check for file presence.
29305 # It is also a way to make sure we got the proper file name for the real test later on.
29306 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29307 if test "x$test_shortpath" = x; then
29308 # Short path failed, file does not exist as specified.
29309 # Try adding .exe or .cmd
29310 if test -f "${new_path}.exe"; then
29311 input_to_shortpath="${new_path}.exe"
29312 elif test -f "${new_path}.cmd"; then
29313 input_to_shortpath="${new_path}.cmd"
29314 else
29315 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
29316 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
29317 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29318 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29319 as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29320 fi
29321 else
29322 input_to_shortpath="$new_path"
29323 fi
29324
29325 # Call helper function which possibly converts this using DOS-style short mode.
29326 # If so, the updated path is stored in $new_path.
29327 new_path="$input_to_shortpath"
29328
29329 input_path="$input_to_shortpath"
29330 # Check if we need to convert this using DOS-style short mode. If the path
29331 # contains just simple characters, use it. Otherwise (spaces, weird characters),
29332 # take no chances and rewrite it.
29333 # Note: m4 eats our [], so we need to use [ and ] instead.
29334 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29335 if test "x$has_forbidden_chars" != x; then
29336 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29337 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29338 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29339 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29340 # Going to short mode and back again did indeed matter. Since short mode is
29341 # case insensitive, let's make it lowercase to improve readability.
29342 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29343 # Now convert it back to Unix-style (cygpath)
29344 input_path=`$CYGPATH -u "$shortmode_path"`
29345 new_path="$input_path"
29346 fi
29347 fi
29348
29349 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29350 if test "x$test_cygdrive_prefix" = x; then
29351 # As a simple fix, exclude /usr/bin since it's not a real path.
29352 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29353 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29354 # a path prefixed by /cygdrive for fixpath to work.
29355 new_path="$CYGWIN_ROOT_PATH$input_path"
29356 fi
29357 fi
29358
29359 # remove trailing .exe if any
29360 new_path="${new_path/%.exe/}"
29361
29362 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29363
29364 # First separate the path from the arguments. This will split at the first
29365 # space.
29366 complete="$PROPER_COMPILER_CC"
29367 path="${complete%% *}"
29368 tmp="$complete EOL"
29369 arguments="${tmp#* }"
29370
29371 # Input might be given as Windows format, start by converting to
29372 # unix format.
29373 new_path="$path"
29374
29375 windows_path="$new_path"
29376 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29377 unix_path=`$CYGPATH -u "$windows_path"`
29378 new_path="$unix_path"
29379 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29380 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29381 new_path="$unix_path"
29382 fi
29383
29384
29385 # Now try to locate executable using which
29386 new_path=`$WHICH "$new_path" 2> /dev/null`
29387
29388 if test "x$new_path" = x; then
29389 # Oops. Which didn't find the executable.
29390 # The splitting of arguments from the executable at a space might have been incorrect,
29391 # since paths with space are more likely in Windows. Give it another try with the whole
29392 # argument.
29393 path="$complete"
29394 arguments="EOL"
29395 new_path="$path"
29396
29397 windows_path="$new_path"
29398 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29399 unix_path=`$CYGPATH -u "$windows_path"`
29400 new_path="$unix_path"
29401 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29402 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29403 new_path="$unix_path"
29404 fi
29405
29406
29407 new_path=`$WHICH "$new_path" 2> /dev/null`
29408 # bat and cmd files are not always considered executable in MSYS causing which
29409 # to not find them
29410 if test "x$new_path" = x \
29411 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29412 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29413 new_path="$path"
29414
29415 windows_path="$new_path"
29416 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29417 unix_path=`$CYGPATH -u "$windows_path"`
29418 new_path="$unix_path"
29419 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29420 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29421 new_path="$unix_path"
29422 fi
29423
29424 fi
29425
29426 if test "x$new_path" = x; then
29427 # It's still not found. Now this is an unrecoverable error.
29428 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29429 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29430 has_space=`$ECHO "$complete" | $GREP " "`
29431 if test "x$has_space" != x; then
29432 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29433 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29434 fi
29435 as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29436 fi
29437 fi
29438
29439 # Now new_path has a complete unix path to the binary
29440 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29441 # Keep paths in /bin as-is, but remove trailing .exe if any
29442 new_path="${new_path/%.exe/}"
29443 # Do not save /bin paths to all_fixpath_prefixes!
29444 else
29445 # Not in mixed or Windows style, start by that.
29446 new_path=`cmd //c echo $new_path`
29447
29448 input_path="$new_path"
29449 # Check if we need to convert this using DOS-style short mode. If the path
29450 # contains just simple characters, use it. Otherwise (spaces, weird characters),
29451 # take no chances and rewrite it.
29452 # Note: m4 eats our [], so we need to use [ and ] instead.
29453 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29454 if test "x$has_forbidden_chars" != x; then
29455 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29456 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29457 fi
29458
29459 # Output is in $new_path
29460
29461 windows_path="$new_path"
29462 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29463 unix_path=`$CYGPATH -u "$windows_path"`
29464 new_path="$unix_path"
29465 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29466 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29467 new_path="$unix_path"
29468 fi
29469
29470 # remove trailing .exe if any
29471 new_path="${new_path/%.exe/}"
29472
29473 # Save the first 10 bytes of this path to the storage, so fixpath can work.
29474 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29475 fi
29476
29477 else
29478 # We're on a unix platform. Hooray! :)
29479 # First separate the path from the arguments. This will split at the first
29480 # space.
29481 complete="$PROPER_COMPILER_CC"
29482 path="${complete%% *}"
29483 tmp="$complete EOL"
29484 arguments="${tmp#* }"
29485
29486 # Cannot rely on the command "which" here since it doesn't always work.
29487 is_absolute_path=`$ECHO "$path" | $GREP ^/`
29488 if test -z "$is_absolute_path"; then
29489 # Path to executable is not absolute. Find it.
29490 IFS_save="$IFS"
29491 IFS=:
29492 for p in $PATH; do
29493 if test -f "$p/$path" && test -x "$p/$path"; then
29494 new_path="$p/$path"
29495 break
29496 fi
29497 done
29498 IFS="$IFS_save"
29499 else
29500 # This is an absolute path, we can use it without further modifications.
29501 new_path="$path"
29502 fi
29503
29504 if test "x$new_path" = x; then
29505 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29506 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29507 has_space=`$ECHO "$complete" | $GREP " "`
29508 if test "x$has_space" != x; then
29509 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29510 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29511 fi
29512 as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29513 fi
29514 fi
29515
29516 # Now join together the path and the arguments once again
29517 if test "x$arguments" != xEOL; then
29518 new_complete="$new_path ${arguments% *}"
29519 else
29520 new_complete="$new_path"
29521 fi
29522
29523 if test "x$complete" != "x$new_complete"; then
29524 PROPER_COMPILER_CC="$new_complete"
29525 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
29526 $as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
29527 fi
29528 fi
29529
29530 PATH="$RETRY_COMPILER_SAVED_PATH"
29531
29532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
29533 $as_echo_n "checking for resolved symbolic links for CC... " >&6; }
29534
29535 if test "x$OPENJDK_BUILD_OS" != xwindows; then
29536 # Follow a chain of symbolic links. Use readlink
29537 # where it exists, else fall back to horribly
29538 # complicated shell code.
29539 if test "x$READLINK_TESTED" != yes; then
29540 # On MacOSX there is a readlink tool with a different
29541 # purpose than the GNU readlink tool. Check the found readlink.
29542 ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29543 if test "x$ISGNU" = x; then
29544 # A readlink that we do not know how to use.
29545 # Are there other non-GNU readlinks out there?
29546 READLINK_TESTED=yes
29547 READLINK=
29548 fi
29549 fi
29550
29551 if test "x$READLINK" != x; then
29552 PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
29553 else
29554 # Save the current directory for restoring afterwards
29555 STARTDIR=$PWD
29556 COUNTER=0
29557 sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
29558 sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
29559 cd $sym_link_dir
29560 # Use -P flag to resolve symlinks in directories.
29561 cd `$THEPWDCMD -P`
29562 sym_link_dir=`$THEPWDCMD -P`
29563 # Resolve file symlinks
29564 while test $COUNTER -lt 20; do
29565 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29566 if test "x$ISLINK" == x; then
29567 # This is not a symbolic link! We are done!
29568 break
29569 fi
29570 # Again resolve directory symlinks since the target of the just found
29571 # link could be in a different directory
29572 cd `$DIRNAME $ISLINK`
29573 sym_link_dir=`$THEPWDCMD -P`
29574 sym_link_file=`$BASENAME $ISLINK`
29575 let COUNTER=COUNTER+1
29576 done
29577 cd $STARTDIR
29578 PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
29579 fi
29580 fi
29581
29582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
29583 $as_echo "$PROPER_COMPILER_CC" >&6; }
29584 CC="$PROPER_COMPILER_CC"
29585 else
29586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
29587 $as_echo "no, keeping CC" >&6; }
29588 fi
29589
29590
29591 COMPILER=$CC
29592 COMPILER_NAME=$COMPILER_NAME
29593
29594 if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
29595 # cc -V output typically looks like
29596 # cc: Sun C 5.12 Linux_i386 2011/11/16
29597 COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
29598 # Check that this is likely to be the Solaris Studio cc.
29599 $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
29600 if test $? -ne 0; then
29601 ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29602 { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
29603 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29604 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29605 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29606 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29607 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29608 as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29609 fi
29610 # Remove usage instructions (if present), and
29611 # collapse compiler output into a single line
29612 COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29613 $SED -e 's/ *[Uu]sage:.*//'`
29614 COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29615 $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
29616 elif test "x$TOOLCHAIN_TYPE" = xxlc; then
29617 # xlc -qversion output typically looks like
29618 # IBM XL C/C++ for AIX, V11.1 (5724-X13)
29619 # Version: 11.01.0000.0015
29620 COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
29621 # Check that this is likely to be the IBM XL C compiler.
29622 $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
29623 if test $? -ne 0; then
29624 ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29625 { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
29626 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29627 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29628 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29629 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29630 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29631 as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29632 fi
29633 # Collapse compiler output into a single line
29634 COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29635 COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29636 $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
29637 elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
29638 # There is no specific version flag, but all output starts with a version string.
29639 # First line typically looks something like:
29640 # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
29641 COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
29642 # Check that this is likely to be Microsoft CL.EXE.
29643 $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
29644 if test $? -ne 0; then
29645 { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
29646 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29647 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29648 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29649 as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29650 fi
29651 # Collapse compiler output into a single line
29652 COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29653 COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29654 $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
29655 elif test "x$TOOLCHAIN_TYPE" = xgcc; then
29656 # gcc --version output typically looks like
29657 # gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
29658 # Copyright (C) 2013 Free Software Foundation, Inc.
29659 # This is free software; see the source for copying conditions. There is NO
29660 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
29661 COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29662 # Check that this is likely to be GCC.
29663 $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
29664 if test $? -ne 0; then
29665 { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
29666 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29667 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
29668 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
29669 as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29670 fi
29671 # Remove Copyright and legalese from version string, and
29672 # collapse into a single line
29673 COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29674 $SED -e 's/ *Copyright .*//'`
29675 COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29676 $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
29677 elif test "x$TOOLCHAIN_TYPE" = xclang; then
29678 # clang --version output typically looks like
29679 # Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
29680 # clang version 3.3 (tags/RELEASE_33/final)
29681 # or
29682 # Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
29683 # Target: x86_64-pc-linux-gnu
29684 # Thread model: posix
29685 COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29686 # Check that this is likely to be clang
29687 $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
29688 if test $? -ne 0; then
29689 { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
29690 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29691 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29692 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29693 as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29694 fi
29695 # Collapse compiler output into a single line
29696 COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29697 COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29698 $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
29699 else
29700 as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
29701 fi
29702 # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
29703 CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
29704 # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
29705 CC_VERSION_STRING="$COMPILER_VERSION_STRING"
29706
29707 { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
29708 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
29709
29710
29711 # Now that we have resolved CC ourself, let autoconf have its go at it
29712 ac_ext=c
29713 ac_cpp='$CPP $CPPFLAGS'
29714 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29715 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29716 ac_compiler_gnu=$ac_cv_c_compiler_gnu
29717 if test -n "$ac_tool_prefix"; then
29718 for ac_prog in $CC
29719 do
29720 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29721 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29723 $as_echo_n "checking for $ac_word... " >&6; }
29724 if ${ac_cv_prog_CC+:} false; then :
29725 $as_echo_n "(cached) " >&6
29726 else
29727 if test -n "$CC"; then
29728 ac_cv_prog_CC="$CC" # Let the user override the test.
29729 else
29730 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29731 for as_dir in $PATH
29732 do
29733 IFS=$as_save_IFS
29734 test -z "$as_dir" && as_dir=.
29735 for ac_exec_ext in '' $ac_executable_extensions; do
29736 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29737 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
29738 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29739 break 2
29740 fi
29741 done
29742 done
29743 IFS=$as_save_IFS
29744
29745 fi
29746 fi
29747 CC=$ac_cv_prog_CC
29748 if test -n "$CC"; then
29749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
29750 $as_echo "$CC" >&6; }
29751 else
29752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29753 $as_echo "no" >&6; }
29754 fi
29755
29756
29757 test -n "$CC" && break
29758 done
29759 fi
29760 if test -z "$CC"; then
29761 ac_ct_CC=$CC
29762 for ac_prog in $CC
29763 do
29764 # Extract the first word of "$ac_prog", so it can be a program name with args.
29765 set dummy $ac_prog; ac_word=$2
29766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29767 $as_echo_n "checking for $ac_word... " >&6; }
29768 if ${ac_cv_prog_ac_ct_CC+:} false; then :
29769 $as_echo_n "(cached) " >&6
29770 else
29771 if test -n "$ac_ct_CC"; then
29772 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
29773 else
29774 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29775 for as_dir in $PATH
29776 do
29777 IFS=$as_save_IFS
29778 test -z "$as_dir" && as_dir=.
29779 for ac_exec_ext in '' $ac_executable_extensions; do
29780 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29781 ac_cv_prog_ac_ct_CC="$ac_prog"
29782 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29783 break 2
29784 fi
29785 done
29786 done
29787 IFS=$as_save_IFS
29788
29789 fi
29790 fi
29791 ac_ct_CC=$ac_cv_prog_ac_ct_CC
29792 if test -n "$ac_ct_CC"; then
29793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
29794 $as_echo "$ac_ct_CC" >&6; }
29795 else
29796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29797 $as_echo "no" >&6; }
29798 fi
29799
29800
29801 test -n "$ac_ct_CC" && break
29802 done
29803
29804 if test "x$ac_ct_CC" = x; then
29805 CC=""
29806 else
29807 case $cross_compiling:$ac_tool_warned in
29808 yes:)
29809 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29810 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29811 ac_tool_warned=yes ;;
29812 esac
29813 CC=$ac_ct_CC
29814 fi
29815 fi
29816
29817
29818 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29819 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29820 as_fn_error $? "no acceptable C compiler found in \$PATH
29821 See \`config.log' for more details" "$LINENO" 5; }
29822
29823 # Provide some information about the compiler.
29824 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
29825 set X $ac_compile
29826 ac_compiler=$2
29827 for ac_option in --version -v -V -qversion; do
29828 { { ac_try="$ac_compiler $ac_option >&5"
29829 case "(($ac_try" in
29830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29831 *) ac_try_echo=$ac_try;;
29832 esac
29833 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29834 $as_echo "$ac_try_echo"; } >&5
29835 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
29836 ac_status=$?
29837 if test -s conftest.err; then
29838 sed '10a\
29839 ... rest of stderr output deleted ...
29840 10q' conftest.err >conftest.er1
29841 cat conftest.er1 >&5
29842 fi
29843 rm -f conftest.er1 conftest.err
29844 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29845 test $ac_status = 0; }
29846 done
29847
29848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29849 /* end confdefs.h. */
29850
29851 int
29852 main ()
29853 {
29854
29855 ;
29856 return 0;
29857 }
29858 _ACEOF
29859 ac_clean_files_save=$ac_clean_files
29860 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
29861 # Try to create an executable without -o first, disregard a.out.
29862 # It will help us diagnose broken compilers, and finding out an intuition
29863 # of exeext.
29864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
29865 $as_echo_n "checking whether the C compiler works... " >&6; }
29866 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
29867
29868 # The possible output files:
29869 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
29870
29871 ac_rmfiles=
29872 for ac_file in $ac_files
29873 do
29874 case $ac_file in
29875 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29876 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
29877 esac
29878 done
29879 rm -f $ac_rmfiles
29880
29881 if { { ac_try="$ac_link_default"
29882 case "(($ac_try" in
29883 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29884 *) ac_try_echo=$ac_try;;
29885 esac
29886 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29887 $as_echo "$ac_try_echo"; } >&5
29888 (eval "$ac_link_default") 2>&5
29889 ac_status=$?
29890 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29891 test $ac_status = 0; }; then :
29892 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
29893 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
29894 # in a Makefile. We should not override ac_cv_exeext if it was cached,
29895 # so that the user can short-circuit this test for compilers unknown to
29896 # Autoconf.
29897 for ac_file in $ac_files ''
29898 do
29899 test -f "$ac_file" || continue
29900 case $ac_file in
29901 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
29902 ;;
29903 [ab].out )
29904 # We found the default executable, but exeext='' is most
29905 # certainly right.
29906 break;;
29907 *.* )
29908 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
29909 then :; else
29910 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29911 fi
29912 # We set ac_cv_exeext here because the later test for it is not
29913 # safe: cross compilers may not add the suffix if given an `-o'
29914 # argument, so we may need to know it at that point already.
29915 # Even if this section looks crufty: it has the advantage of
29916 # actually working.
29917 break;;
29918 * )
29919 break;;
29920 esac
29921 done
29922 test "$ac_cv_exeext" = no && ac_cv_exeext=
29923
29924 else
29925 ac_file=''
29926 fi
29927 if test -z "$ac_file"; then :
29928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29929 $as_echo "no" >&6; }
29930 $as_echo "$as_me: failed program was:" >&5
29931 sed 's/^/| /' conftest.$ac_ext >&5
29932
29933 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29934 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29935 as_fn_error 77 "C compiler cannot create executables
29936 See \`config.log' for more details" "$LINENO" 5; }
29937 else
29938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29939 $as_echo "yes" >&6; }
29940 fi
29941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
29942 $as_echo_n "checking for C compiler default output file name... " >&6; }
29943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
29944 $as_echo "$ac_file" >&6; }
29945 ac_exeext=$ac_cv_exeext
29946
29947 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
29948 ac_clean_files=$ac_clean_files_save
29949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
29950 $as_echo_n "checking for suffix of executables... " >&6; }
29951 if { { ac_try="$ac_link"
29952 case "(($ac_try" in
29953 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29954 *) ac_try_echo=$ac_try;;
29955 esac
29956 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29957 $as_echo "$ac_try_echo"; } >&5
29958 (eval "$ac_link") 2>&5
29959 ac_status=$?
29960 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29961 test $ac_status = 0; }; then :
29962 # If both `conftest.exe' and `conftest' are `present' (well, observable)
29963 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
29964 # work properly (i.e., refer to `conftest.exe'), while it won't with
29965 # `rm'.
29966 for ac_file in conftest.exe conftest conftest.*; do
29967 test -f "$ac_file" || continue
29968 case $ac_file in
29969 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29970 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29971 break;;
29972 * ) break;;
29973 esac
29974 done
29975 else
29976 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29977 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29978 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
29979 See \`config.log' for more details" "$LINENO" 5; }
29980 fi
29981 rm -f conftest conftest$ac_cv_exeext
29982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
29983 $as_echo "$ac_cv_exeext" >&6; }
29984
29985 rm -f conftest.$ac_ext
29986 EXEEXT=$ac_cv_exeext
29987 ac_exeext=$EXEEXT
29988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29989 /* end confdefs.h. */
29990 #include <stdio.h>
29991 int
29992 main ()
29993 {
29994 FILE *f = fopen ("conftest.out", "w");
29995 return ferror (f) || fclose (f) != 0;
29996
29997 ;
29998 return 0;
29999 }
30000 _ACEOF
30001 ac_clean_files="$ac_clean_files conftest.out"
30002 # Check that the compiler produces executables we can run. If not, either
30003 # the compiler is broken, or we cross compile.
30004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
30005 $as_echo_n "checking whether we are cross compiling... " >&6; }
30006 if test "$cross_compiling" != yes; then
30007 { { ac_try="$ac_link"
30008 case "(($ac_try" in
30009 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30010 *) ac_try_echo=$ac_try;;
30011 esac
30012 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30013 $as_echo "$ac_try_echo"; } >&5
30014 (eval "$ac_link") 2>&5
30015 ac_status=$?
30016 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30017 test $ac_status = 0; }
30018 if { ac_try='./conftest$ac_cv_exeext'
30019 { { case "(($ac_try" in
30020 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30021 *) ac_try_echo=$ac_try;;
30022 esac
30023 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30024 $as_echo "$ac_try_echo"; } >&5
30025 (eval "$ac_try") 2>&5
30026 ac_status=$?
30027 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30028 test $ac_status = 0; }; }; then
30029 cross_compiling=no
30030 else
30031 if test "$cross_compiling" = maybe; then
30032 cross_compiling=yes
30033 else
30034 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30035 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30036 as_fn_error $? "cannot run C compiled programs.
30037 If you meant to cross compile, use \`--host'.
30038 See \`config.log' for more details" "$LINENO" 5; }
30039 fi
30040 fi
30041 fi
30042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
30043 $as_echo "$cross_compiling" >&6; }
30044
30045 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
30046 ac_clean_files=$ac_clean_files_save
30047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
30048 $as_echo_n "checking for suffix of object files... " >&6; }
30049 if ${ac_cv_objext+:} false; then :
30050 $as_echo_n "(cached) " >&6
30051 else
30052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30053 /* end confdefs.h. */
30054
30055 int
30056 main ()
30057 {
30058
30059 ;
30060 return 0;
30061 }
30062 _ACEOF
30063 rm -f conftest.o conftest.obj
30064 if { { ac_try="$ac_compile"
30065 case "(($ac_try" in
30066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30067 *) ac_try_echo=$ac_try;;
30068 esac
30069 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30070 $as_echo "$ac_try_echo"; } >&5
30071 (eval "$ac_compile") 2>&5
30072 ac_status=$?
30073 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30074 test $ac_status = 0; }; then :
30075 for ac_file in conftest.o conftest.obj conftest.*; do
30076 test -f "$ac_file" || continue;
30077 case $ac_file in
30078 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
30079 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
30080 break;;
30081 esac
30082 done
30083 else
30084 $as_echo "$as_me: failed program was:" >&5
30085 sed 's/^/| /' conftest.$ac_ext >&5
30086
30087 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30088 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30089 as_fn_error $? "cannot compute suffix of object files: cannot compile
30090 See \`config.log' for more details" "$LINENO" 5; }
30091 fi
30092 rm -f conftest.$ac_cv_objext conftest.$ac_ext
30093 fi
30094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
30095 $as_echo "$ac_cv_objext" >&6; }
30096 OBJEXT=$ac_cv_objext
30097 ac_objext=$OBJEXT
30098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
30099 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
30100 if ${ac_cv_c_compiler_gnu+:} false; then :
30101 $as_echo_n "(cached) " >&6
30102 else
30103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30104 /* end confdefs.h. */
30105
30106 int
30107 main ()
30108 {
30109 #ifndef __GNUC__
30110 choke me
30111 #endif
30112
30113 ;
30114 return 0;
30115 }
30116 _ACEOF
30117 if ac_fn_c_try_compile "$LINENO"; then :
30118 ac_compiler_gnu=yes
30119 else
30120 ac_compiler_gnu=no
30121 fi
30122 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30123 ac_cv_c_compiler_gnu=$ac_compiler_gnu
30124
30125 fi
30126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
30127 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
30128 if test $ac_compiler_gnu = yes; then
30129 GCC=yes
30130 else
30131 GCC=
30132 fi
30133 ac_test_CFLAGS=${CFLAGS+set}
30134 ac_save_CFLAGS=$CFLAGS
30135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
30136 $as_echo_n "checking whether $CC accepts -g... " >&6; }
30137 if ${ac_cv_prog_cc_g+:} false; then :
30138 $as_echo_n "(cached) " >&6
30139 else
30140 ac_save_c_werror_flag=$ac_c_werror_flag
30141 ac_c_werror_flag=yes
30142 ac_cv_prog_cc_g=no
30143 CFLAGS="-g"
30144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30145 /* end confdefs.h. */
30146
30147 int
30148 main ()
30149 {
30150
30151 ;
30152 return 0;
30153 }
30154 _ACEOF
30155 if ac_fn_c_try_compile "$LINENO"; then :
30156 ac_cv_prog_cc_g=yes
30157 else
30158 CFLAGS=""
30159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30160 /* end confdefs.h. */
30161
30162 int
30163 main ()
30164 {
30165
30166 ;
30167 return 0;
30168 }
30169 _ACEOF
30170 if ac_fn_c_try_compile "$LINENO"; then :
30171
30172 else
30173 ac_c_werror_flag=$ac_save_c_werror_flag
30174 CFLAGS="-g"
30175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30176 /* end confdefs.h. */
30177
30178 int
30179 main ()
30180 {
30181
30182 ;
30183 return 0;
30184 }
30185 _ACEOF
30186 if ac_fn_c_try_compile "$LINENO"; then :
30187 ac_cv_prog_cc_g=yes
30188 fi
30189 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30190 fi
30191 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30192 fi
30193 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30194 ac_c_werror_flag=$ac_save_c_werror_flag
30195 fi
30196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
30197 $as_echo "$ac_cv_prog_cc_g" >&6; }
30198 if test "$ac_test_CFLAGS" = set; then
30199 CFLAGS=$ac_save_CFLAGS
30200 elif test $ac_cv_prog_cc_g = yes; then
30201 if test "$GCC" = yes; then
30202 CFLAGS="-g -O2"
30203 else
30204 CFLAGS="-g"
30205 fi
30206 else
30207 if test "$GCC" = yes; then
30208 CFLAGS="-O2"
30209 else
30210 CFLAGS=
30211 fi
30212 fi
30213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
30214 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
30215 if ${ac_cv_prog_cc_c89+:} false; then :
30216 $as_echo_n "(cached) " >&6
30217 else
30218 ac_cv_prog_cc_c89=no
30219 ac_save_CC=$CC
30220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30221 /* end confdefs.h. */
30222 #include <stdarg.h>
30223 #include <stdio.h>
30224 struct stat;
30225 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
30226 struct buf { int x; };
30227 FILE * (*rcsopen) (struct buf *, struct stat *, int);
30228 static char *e (p, i)
30229 char **p;
30230 int i;
30231 {
30232 return p[i];
30233 }
30234 static char *f (char * (*g) (char **, int), char **p, ...)
30235 {
30236 char *s;
30237 va_list v;
30238 va_start (v,p);
30239 s = g (p, va_arg (v,int));
30240 va_end (v);
30241 return s;
30242 }
30243
30244 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
30245 function prototypes and stuff, but not '\xHH' hex character constants.
30246 These don't provoke an error unfortunately, instead are silently treated
30247 as 'x'. The following induces an error, until -std is added to get
30248 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
30249 array size at least. It's necessary to write '\x00'==0 to get something
30250 that's true only with -std. */
30251 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
30252
30253 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
30254 inside strings and character constants. */
30255 #define FOO(x) 'x'
30256 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
30257
30258 int test (int i, double x);
30259 struct s1 {int (*f) (int a);};
30260 struct s2 {int (*f) (double a);};
30261 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
30262 int argc;
30263 char **argv;
30264 int
30265 main ()
30266 {
30267 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
30268 ;
30269 return 0;
30270 }
30271 _ACEOF
30272 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
30273 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
30274 do
30275 CC="$ac_save_CC $ac_arg"
30276 if ac_fn_c_try_compile "$LINENO"; then :
30277 ac_cv_prog_cc_c89=$ac_arg
30278 fi
30279 rm -f core conftest.err conftest.$ac_objext
30280 test "x$ac_cv_prog_cc_c89" != "xno" && break
30281 done
30282 rm -f conftest.$ac_ext
30283 CC=$ac_save_CC
30284
30285 fi
30286 # AC_CACHE_VAL
30287 case "x$ac_cv_prog_cc_c89" in
30288 x)
30289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
30290 $as_echo "none needed" >&6; } ;;
30291 xno)
30292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
30293 $as_echo "unsupported" >&6; } ;;
30294 *)
30295 CC="$CC $ac_cv_prog_cc_c89"
30296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
30297 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
30298 esac
30299 if test "x$ac_cv_prog_cc_c89" != xno; then :
30300
30301 fi
30302
30303 ac_ext=cpp
30304 ac_cpp='$CXXCPP $CPPFLAGS'
30305 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30306 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30307 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30308
30309
30310
30311 COMPILER_NAME=C++
30312 SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
30313
30314 if test "x$CXX" != x; then
30315 # User has supplied compiler name already, always let that override.
30316 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
30317 $as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
30318 if test "x`basename $CXX`" = "x$CXX"; then
30319 # A command without a complete path is provided, search $PATH.
30320
30321 for ac_prog in $CXX
30322 do
30323 # Extract the first word of "$ac_prog", so it can be a program name with args.
30324 set dummy $ac_prog; ac_word=$2
30325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30326 $as_echo_n "checking for $ac_word... " >&6; }
30327 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
30328 $as_echo_n "(cached) " >&6
30329 else
30330 case $POTENTIAL_CXX in
30331 [\\/]* | ?:[\\/]*)
30332 ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
30333 ;;
30334 *)
30335 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30336 for as_dir in $PATH
30337 do
30338 IFS=$as_save_IFS
30339 test -z "$as_dir" && as_dir=.
30340 for ac_exec_ext in '' $ac_executable_extensions; do
30341 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30342 ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
30343 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30344 break 2
30345 fi
30346 done
30347 done
30348 IFS=$as_save_IFS
30349
30350 ;;
30351 esac
30352 fi
30353 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
30354 if test -n "$POTENTIAL_CXX"; then
30355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
30356 $as_echo "$POTENTIAL_CXX" >&6; }
30357 else
30358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30359 $as_echo "no" >&6; }
30360 fi
30361
30362
30363 test -n "$POTENTIAL_CXX" && break
30364 done
30365
30366 if test "x$POTENTIAL_CXX" != x; then
30367 CXX=$POTENTIAL_CXX
30368 else
30369 as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
30370 fi
30371 else
30372 # Otherwise it might already be a complete path
30373 if test ! -x "$CXX"; then
30374 as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
30375 fi
30376 fi
30377 else
30378 # No user supplied value. Locate compiler ourselves.
30379
30380 # If we are cross compiling, assume cross compilation tools follows the
30381 # cross compilation standard where they are prefixed with the autoconf
30382 # standard name for the target. For example the binary
30383 # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
30384 # If we are not cross compiling, then the default compiler name will be
30385 # used.
30386
30387 CXX=
30388 # If TOOLCHAIN_PATH is set, check for all compiler names in there first
30389 # before checking the rest of the PATH.
30390 # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
30391 # step, this should not be necessary.
30392 if test -n "$TOOLCHAIN_PATH"; then
30393 PATH_save="$PATH"
30394 PATH="$TOOLCHAIN_PATH"
30395 for ac_prog in $SEARCH_LIST
30396 do
30397 # Extract the first word of "$ac_prog", so it can be a program name with args.
30398 set dummy $ac_prog; ac_word=$2
30399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30400 $as_echo_n "checking for $ac_word... " >&6; }
30401 if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
30402 $as_echo_n "(cached) " >&6
30403 else
30404 case $TOOLCHAIN_PATH_CXX in
30405 [\\/]* | ?:[\\/]*)
30406 ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
30407 ;;
30408 *)
30409 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30410 for as_dir in $PATH
30411 do
30412 IFS=$as_save_IFS
30413 test -z "$as_dir" && as_dir=.
30414 for ac_exec_ext in '' $ac_executable_extensions; do
30415 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30416 ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
30417 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30418 break 2
30419 fi
30420 done
30421 done
30422 IFS=$as_save_IFS
30423
30424 ;;
30425 esac
30426 fi
30427 TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
30428 if test -n "$TOOLCHAIN_PATH_CXX"; then
30429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
30430 $as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
30431 else
30432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30433 $as_echo "no" >&6; }
30434 fi
30435
30436
30437 test -n "$TOOLCHAIN_PATH_CXX" && break
30438 done
30439
30440 CXX=$TOOLCHAIN_PATH_CXX
30441 PATH="$PATH_save"
30442 fi
30443
30444 # AC_PATH_PROGS can't be run multiple times with the same variable,
30445 # so create a new name for this run.
30446 if test "x$CXX" = x; then
30447 for ac_prog in $SEARCH_LIST
30448 do
30449 # Extract the first word of "$ac_prog", so it can be a program name with args.
30450 set dummy $ac_prog; ac_word=$2
30451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30452 $as_echo_n "checking for $ac_word... " >&6; }
30453 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
30454 $as_echo_n "(cached) " >&6
30455 else
30456 case $POTENTIAL_CXX in
30457 [\\/]* | ?:[\\/]*)
30458 ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
30459 ;;
30460 *)
30461 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30462 for as_dir in $PATH
30463 do
30464 IFS=$as_save_IFS
30465 test -z "$as_dir" && as_dir=.
30466 for ac_exec_ext in '' $ac_executable_extensions; do
30467 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30468 ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
30469 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30470 break 2
30471 fi
30472 done
30473 done
30474 IFS=$as_save_IFS
30475
30476 ;;
30477 esac
30478 fi
30479 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
30480 if test -n "$POTENTIAL_CXX"; then
30481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
30482 $as_echo "$POTENTIAL_CXX" >&6; }
30483 else
30484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30485 $as_echo "no" >&6; }
30486 fi
30487
30488
30489 test -n "$POTENTIAL_CXX" && break
30490 done
30491
30492 CXX=$POTENTIAL_CXX
30493 fi
30494
30495 if test "x$CXX" = x; then
30496
30497 # Print a helpful message on how to acquire the necessary build dependency.
30498 # devkit is the help tag: freetype, cups, pulse, alsa etc
30499 MISSING_DEPENDENCY=devkit
30500
30501 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30502 cygwin_help $MISSING_DEPENDENCY
30503 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30504 msys_help $MISSING_DEPENDENCY
30505 else
30506 PKGHANDLER_COMMAND=
30507
30508 case $PKGHANDLER in
30509 apt-get)
30510 apt_help $MISSING_DEPENDENCY ;;
30511 yum)
30512 yum_help $MISSING_DEPENDENCY ;;
30513 port)
30514 port_help $MISSING_DEPENDENCY ;;
30515 pkgutil)
30516 pkgutil_help $MISSING_DEPENDENCY ;;
30517 pkgadd)
30518 pkgadd_help $MISSING_DEPENDENCY ;;
30519 esac
30520
30521 if test "x$PKGHANDLER_COMMAND" != x; then
30522 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30523 fi
30524 fi
30525
30526 as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
30527 fi
30528 fi
30529
30530 # Now we have a compiler binary in CXX. Make sure it's okay.
30531
30532 # Only process if variable expands to non-empty
30533
30534 if test "x$CXX" != x; then
30535 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30536
30537 # First separate the path from the arguments. This will split at the first
30538 # space.
30539 complete="$CXX"
30540 path="${complete%% *}"
30541 tmp="$complete EOL"
30542 arguments="${tmp#* }"
30543
30544 # Input might be given as Windows format, start by converting to
30545 # unix format.
30546 new_path=`$CYGPATH -u "$path"`
30547
30548 # Now try to locate executable using which
30549 new_path=`$WHICH "$new_path" 2> /dev/null`
30550 # bat and cmd files are not always considered executable in cygwin causing which
30551 # to not find them
30552 if test "x$new_path" = x \
30553 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30554 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30555 new_path=`$CYGPATH -u "$path"`
30556 fi
30557 if test "x$new_path" = x; then
30558 # Oops. Which didn't find the executable.
30559 # The splitting of arguments from the executable at a space might have been incorrect,
30560 # since paths with space are more likely in Windows. Give it another try with the whole
30561 # argument.
30562 path="$complete"
30563 arguments="EOL"
30564 new_path=`$CYGPATH -u "$path"`
30565 new_path=`$WHICH "$new_path" 2> /dev/null`
30566 # bat and cmd files are not always considered executable in cygwin causing which
30567 # to not find them
30568 if test "x$new_path" = x \
30569 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30570 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30571 new_path=`$CYGPATH -u "$path"`
30572 fi
30573 if test "x$new_path" = x; then
30574 # It's still not found. Now this is an unrecoverable error.
30575 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30576 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30577 has_space=`$ECHO "$complete" | $GREP " "`
30578 if test "x$has_space" != x; then
30579 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30580 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30581 fi
30582 as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30583 fi
30584 fi
30585
30586 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30587 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30588 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30589 # "foo.exe" is OK but "foo" is an error.
30590 #
30591 # This test is therefore slightly more accurate than "test -f" to check for file presence.
30592 # It is also a way to make sure we got the proper file name for the real test later on.
30593 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30594 if test "x$test_shortpath" = x; then
30595 # Short path failed, file does not exist as specified.
30596 # Try adding .exe or .cmd
30597 if test -f "${new_path}.exe"; then
30598 input_to_shortpath="${new_path}.exe"
30599 elif test -f "${new_path}.cmd"; then
30600 input_to_shortpath="${new_path}.cmd"
30601 else
30602 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
30603 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
30604 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30605 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30606 as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30607 fi
30608 else
30609 input_to_shortpath="$new_path"
30610 fi
30611
30612 # Call helper function which possibly converts this using DOS-style short mode.
30613 # If so, the updated path is stored in $new_path.
30614 new_path="$input_to_shortpath"
30615
30616 input_path="$input_to_shortpath"
30617 # Check if we need to convert this using DOS-style short mode. If the path
30618 # contains just simple characters, use it. Otherwise (spaces, weird characters),
30619 # take no chances and rewrite it.
30620 # Note: m4 eats our [], so we need to use [ and ] instead.
30621 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30622 if test "x$has_forbidden_chars" != x; then
30623 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30624 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30625 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30626 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30627 # Going to short mode and back again did indeed matter. Since short mode is
30628 # case insensitive, let's make it lowercase to improve readability.
30629 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30630 # Now convert it back to Unix-style (cygpath)
30631 input_path=`$CYGPATH -u "$shortmode_path"`
30632 new_path="$input_path"
30633 fi
30634 fi
30635
30636 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30637 if test "x$test_cygdrive_prefix" = x; then
30638 # As a simple fix, exclude /usr/bin since it's not a real path.
30639 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30640 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30641 # a path prefixed by /cygdrive for fixpath to work.
30642 new_path="$CYGWIN_ROOT_PATH$input_path"
30643 fi
30644 fi
30645
30646 # remove trailing .exe if any
30647 new_path="${new_path/%.exe/}"
30648
30649 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30650
30651 # First separate the path from the arguments. This will split at the first
30652 # space.
30653 complete="$CXX"
30654 path="${complete%% *}"
30655 tmp="$complete EOL"
30656 arguments="${tmp#* }"
30657
30658 # Input might be given as Windows format, start by converting to
30659 # unix format.
30660 new_path="$path"
30661
30662 windows_path="$new_path"
30663 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30664 unix_path=`$CYGPATH -u "$windows_path"`
30665 new_path="$unix_path"
30666 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30667 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30668 new_path="$unix_path"
30669 fi
30670
30671
30672 # Now try to locate executable using which
30673 new_path=`$WHICH "$new_path" 2> /dev/null`
30674
30675 if test "x$new_path" = x; then
30676 # Oops. Which didn't find the executable.
30677 # The splitting of arguments from the executable at a space might have been incorrect,
30678 # since paths with space are more likely in Windows. Give it another try with the whole
30679 # argument.
30680 path="$complete"
30681 arguments="EOL"
30682 new_path="$path"
30683
30684 windows_path="$new_path"
30685 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30686 unix_path=`$CYGPATH -u "$windows_path"`
30687 new_path="$unix_path"
30688 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30689 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30690 new_path="$unix_path"
30691 fi
30692
30693
30694 new_path=`$WHICH "$new_path" 2> /dev/null`
30695 # bat and cmd files are not always considered executable in MSYS causing which
30696 # to not find them
30697 if test "x$new_path" = x \
30698 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30699 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30700 new_path="$path"
30701
30702 windows_path="$new_path"
30703 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30704 unix_path=`$CYGPATH -u "$windows_path"`
30705 new_path="$unix_path"
30706 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30707 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30708 new_path="$unix_path"
30709 fi
30710
30711 fi
30712
30713 if test "x$new_path" = x; then
30714 # It's still not found. Now this is an unrecoverable error.
30715 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30716 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30717 has_space=`$ECHO "$complete" | $GREP " "`
30718 if test "x$has_space" != x; then
30719 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30720 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30721 fi
30722 as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30723 fi
30724 fi
30725
30726 # Now new_path has a complete unix path to the binary
30727 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30728 # Keep paths in /bin as-is, but remove trailing .exe if any
30729 new_path="${new_path/%.exe/}"
30730 # Do not save /bin paths to all_fixpath_prefixes!
30731 else
30732 # Not in mixed or Windows style, start by that.
30733 new_path=`cmd //c echo $new_path`
30734
30735 input_path="$new_path"
30736 # Check if we need to convert this using DOS-style short mode. If the path
30737 # contains just simple characters, use it. Otherwise (spaces, weird characters),
30738 # take no chances and rewrite it.
30739 # Note: m4 eats our [], so we need to use [ and ] instead.
30740 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30741 if test "x$has_forbidden_chars" != x; then
30742 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30743 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30744 fi
30745
30746 # Output is in $new_path
30747
30748 windows_path="$new_path"
30749 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30750 unix_path=`$CYGPATH -u "$windows_path"`
30751 new_path="$unix_path"
30752 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30753 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30754 new_path="$unix_path"
30755 fi
30756
30757 # remove trailing .exe if any
30758 new_path="${new_path/%.exe/}"
30759
30760 # Save the first 10 bytes of this path to the storage, so fixpath can work.
30761 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30762 fi
30763
30764 else
30765 # We're on a unix platform. Hooray! :)
30766 # First separate the path from the arguments. This will split at the first
30767 # space.
30768 complete="$CXX"
30769 path="${complete%% *}"
30770 tmp="$complete EOL"
30771 arguments="${tmp#* }"
30772
30773 # Cannot rely on the command "which" here since it doesn't always work.
30774 is_absolute_path=`$ECHO "$path" | $GREP ^/`
30775 if test -z "$is_absolute_path"; then
30776 # Path to executable is not absolute. Find it.
30777 IFS_save="$IFS"
30778 IFS=:
30779 for p in $PATH; do
30780 if test -f "$p/$path" && test -x "$p/$path"; then
30781 new_path="$p/$path"
30782 break
30783 fi
30784 done
30785 IFS="$IFS_save"
30786 else
30787 # This is an absolute path, we can use it without further modifications.
30788 new_path="$path"
30789 fi
30790
30791 if test "x$new_path" = x; then
30792 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30793 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30794 has_space=`$ECHO "$complete" | $GREP " "`
30795 if test "x$has_space" != x; then
30796 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30797 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30798 fi
30799 as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30800 fi
30801 fi
30802
30803 # Now join together the path and the arguments once again
30804 if test "x$arguments" != xEOL; then
30805 new_complete="$new_path ${arguments% *}"
30806 else
30807 new_complete="$new_path"
30808 fi
30809
30810 if test "x$complete" != "x$new_complete"; then
30811 CXX="$new_complete"
30812 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
30813 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
30814 fi
30815 fi
30816
30817 TEST_COMPILER="$CXX"
30818 # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
30819 # to 'xlc' but it is crucial that we invoke the compiler with the right name!
30820 if test "x$OPENJDK_BUILD_OS" != xaix; then
30821 # FIXME: This test should not be needed anymore; we don't do that for any platform.
30822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
30823 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
30824
30825 if test "x$OPENJDK_BUILD_OS" != xwindows; then
30826 # Follow a chain of symbolic links. Use readlink
30827 # where it exists, else fall back to horribly
30828 # complicated shell code.
30829 if test "x$READLINK_TESTED" != yes; then
30830 # On MacOSX there is a readlink tool with a different
30831 # purpose than the GNU readlink tool. Check the found readlink.
30832 ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30833 if test "x$ISGNU" = x; then
30834 # A readlink that we do not know how to use.
30835 # Are there other non-GNU readlinks out there?
30836 READLINK_TESTED=yes
30837 READLINK=
30838 fi
30839 fi
30840
30841 if test "x$READLINK" != x; then
30842 TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
30843 else
30844 # Save the current directory for restoring afterwards
30845 STARTDIR=$PWD
30846 COUNTER=0
30847 sym_link_dir=`$DIRNAME $TEST_COMPILER`
30848 sym_link_file=`$BASENAME $TEST_COMPILER`
30849 cd $sym_link_dir
30850 # Use -P flag to resolve symlinks in directories.
30851 cd `$THEPWDCMD -P`
30852 sym_link_dir=`$THEPWDCMD -P`
30853 # Resolve file symlinks
30854 while test $COUNTER -lt 20; do
30855 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30856 if test "x$ISLINK" == x; then
30857 # This is not a symbolic link! We are done!
30858 break
30859 fi
30860 # Again resolve directory symlinks since the target of the just found
30861 # link could be in a different directory
30862 cd `$DIRNAME $ISLINK`
30863 sym_link_dir=`$THEPWDCMD -P`
30864 sym_link_file=`$BASENAME $ISLINK`
30865 let COUNTER=COUNTER+1
30866 done
30867 cd $STARTDIR
30868 TEST_COMPILER=$sym_link_dir/$sym_link_file
30869 fi
30870 fi
30871
30872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
30873 $as_echo "$TEST_COMPILER" >&6; }
30874 fi
30875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
30876 $as_echo_n "checking if CXX is disguised ccache... " >&6; }
30877
30878 COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
30879 if test "x$COMPILER_BASENAME" = "xccache"; then
30880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
30881 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
30882 # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
30883 # We want to control ccache invocation ourselves, so ignore this cc and try
30884 # searching again.
30885
30886 # Remove the path to the fake ccache cc from the PATH
30887 RETRY_COMPILER_SAVED_PATH="$PATH"
30888 COMPILER_DIRNAME=`$DIRNAME $CXX`
30889 PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
30890
30891 # Try again looking for our compiler
30892 if test -n "$ac_tool_prefix"; then
30893 for ac_prog in $TOOLCHAIN_CXX_BINARY
30894 do
30895 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30896 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30898 $as_echo_n "checking for $ac_word... " >&6; }
30899 if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
30900 $as_echo_n "(cached) " >&6
30901 else
30902 if test -n "$PROPER_COMPILER_CXX"; then
30903 ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
30904 else
30905 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30906 for as_dir in $PATH
30907 do
30908 IFS=$as_save_IFS
30909 test -z "$as_dir" && as_dir=.
30910 for ac_exec_ext in '' $ac_executable_extensions; do
30911 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30912 ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
30913 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30914 break 2
30915 fi
30916 done
30917 done
30918 IFS=$as_save_IFS
30919
30920 fi
30921 fi
30922 PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
30923 if test -n "$PROPER_COMPILER_CXX"; then
30924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30925 $as_echo "$PROPER_COMPILER_CXX" >&6; }
30926 else
30927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30928 $as_echo "no" >&6; }
30929 fi
30930
30931
30932 test -n "$PROPER_COMPILER_CXX" && break
30933 done
30934 fi
30935 if test -z "$PROPER_COMPILER_CXX"; then
30936 ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
30937 for ac_prog in $TOOLCHAIN_CXX_BINARY
30938 do
30939 # Extract the first word of "$ac_prog", so it can be a program name with args.
30940 set dummy $ac_prog; ac_word=$2
30941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30942 $as_echo_n "checking for $ac_word... " >&6; }
30943 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
30944 $as_echo_n "(cached) " >&6
30945 else
30946 if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30947 ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
30948 else
30949 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30950 for as_dir in $PATH
30951 do
30952 IFS=$as_save_IFS
30953 test -z "$as_dir" && as_dir=.
30954 for ac_exec_ext in '' $ac_executable_extensions; do
30955 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30956 ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
30957 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30958 break 2
30959 fi
30960 done
30961 done
30962 IFS=$as_save_IFS
30963
30964 fi
30965 fi
30966 ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
30967 if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
30969 $as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
30970 else
30971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30972 $as_echo "no" >&6; }
30973 fi
30974
30975
30976 test -n "$ac_ct_PROPER_COMPILER_CXX" && break
30977 done
30978
30979 if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
30980 PROPER_COMPILER_CXX=""
30981 else
30982 case $cross_compiling:$ac_tool_warned in
30983 yes:)
30984 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30985 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30986 ac_tool_warned=yes ;;
30987 esac
30988 PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
30989 fi
30990 fi
30991
30992
30993 # Only process if variable expands to non-empty
30994
30995 if test "x$PROPER_COMPILER_CXX" != x; then
30996 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30997
30998 # First separate the path from the arguments. This will split at the first
30999 # space.
31000 complete="$PROPER_COMPILER_CXX"
31001 path="${complete%% *}"
31002 tmp="$complete EOL"
31003 arguments="${tmp#* }"
31004
31005 # Input might be given as Windows format, start by converting to
31006 # unix format.
31007 new_path=`$CYGPATH -u "$path"`
31008
31009 # Now try to locate executable using which
31010 new_path=`$WHICH "$new_path" 2> /dev/null`
31011 # bat and cmd files are not always considered executable in cygwin causing which
31012 # to not find them
31013 if test "x$new_path" = x \
31014 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31015 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31016 new_path=`$CYGPATH -u "$path"`
31017 fi
31018 if test "x$new_path" = x; then
31019 # Oops. Which didn't find the executable.
31020 # The splitting of arguments from the executable at a space might have been incorrect,
31021 # since paths with space are more likely in Windows. Give it another try with the whole
31022 # argument.
31023 path="$complete"
31024 arguments="EOL"
31025 new_path=`$CYGPATH -u "$path"`
31026 new_path=`$WHICH "$new_path" 2> /dev/null`
31027 # bat and cmd files are not always considered executable in cygwin causing which
31028 # to not find them
31029 if test "x$new_path" = x \
31030 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31031 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31032 new_path=`$CYGPATH -u "$path"`
31033 fi
31034 if test "x$new_path" = x; then
31035 # It's still not found. Now this is an unrecoverable error.
31036 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
31037 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
31038 has_space=`$ECHO "$complete" | $GREP " "`
31039 if test "x$has_space" != x; then
31040 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31041 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31042 fi
31043 as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31044 fi
31045 fi
31046
31047 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31048 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31049 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31050 # "foo.exe" is OK but "foo" is an error.
31051 #
31052 # This test is therefore slightly more accurate than "test -f" to check for file presence.
31053 # It is also a way to make sure we got the proper file name for the real test later on.
31054 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31055 if test "x$test_shortpath" = x; then
31056 # Short path failed, file does not exist as specified.
31057 # Try adding .exe or .cmd
31058 if test -f "${new_path}.exe"; then
31059 input_to_shortpath="${new_path}.exe"
31060 elif test -f "${new_path}.cmd"; then
31061 input_to_shortpath="${new_path}.cmd"
31062 else
31063 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
31064 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
31065 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31066 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31067 as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31068 fi
31069 else
31070 input_to_shortpath="$new_path"
31071 fi
31072
31073 # Call helper function which possibly converts this using DOS-style short mode.
31074 # If so, the updated path is stored in $new_path.
31075 new_path="$input_to_shortpath"
31076
31077 input_path="$input_to_shortpath"
31078 # Check if we need to convert this using DOS-style short mode. If the path
31079 # contains just simple characters, use it. Otherwise (spaces, weird characters),
31080 # take no chances and rewrite it.
31081 # Note: m4 eats our [], so we need to use [ and ] instead.
31082 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31083 if test "x$has_forbidden_chars" != x; then
31084 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31085 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31086 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31087 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31088 # Going to short mode and back again did indeed matter. Since short mode is
31089 # case insensitive, let's make it lowercase to improve readability.
31090 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31091 # Now convert it back to Unix-style (cygpath)
31092 input_path=`$CYGPATH -u "$shortmode_path"`
31093 new_path="$input_path"
31094 fi
31095 fi
31096
31097 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31098 if test "x$test_cygdrive_prefix" = x; then
31099 # As a simple fix, exclude /usr/bin since it's not a real path.
31100 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31101 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31102 # a path prefixed by /cygdrive for fixpath to work.
31103 new_path="$CYGWIN_ROOT_PATH$input_path"
31104 fi
31105 fi
31106
31107 # remove trailing .exe if any
31108 new_path="${new_path/%.exe/}"
31109
31110 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31111
31112 # First separate the path from the arguments. This will split at the first
31113 # space.
31114 complete="$PROPER_COMPILER_CXX"
31115 path="${complete%% *}"
31116 tmp="$complete EOL"
31117 arguments="${tmp#* }"
31118
31119 # Input might be given as Windows format, start by converting to
31120 # unix format.
31121 new_path="$path"
31122
31123 windows_path="$new_path"
31124 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31125 unix_path=`$CYGPATH -u "$windows_path"`
31126 new_path="$unix_path"
31127 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31128 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31129 new_path="$unix_path"
31130 fi
31131
31132
31133 # Now try to locate executable using which
31134 new_path=`$WHICH "$new_path" 2> /dev/null`
31135
31136 if test "x$new_path" = x; then
31137 # Oops. Which didn't find the executable.
31138 # The splitting of arguments from the executable at a space might have been incorrect,
31139 # since paths with space are more likely in Windows. Give it another try with the whole
31140 # argument.
31141 path="$complete"
31142 arguments="EOL"
31143 new_path="$path"
31144
31145 windows_path="$new_path"
31146 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31147 unix_path=`$CYGPATH -u "$windows_path"`
31148 new_path="$unix_path"
31149 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31150 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31151 new_path="$unix_path"
31152 fi
31153
31154
31155 new_path=`$WHICH "$new_path" 2> /dev/null`
31156 # bat and cmd files are not always considered executable in MSYS causing which
31157 # to not find them
31158 if test "x$new_path" = x \
31159 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31160 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31161 new_path="$path"
31162
31163 windows_path="$new_path"
31164 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31165 unix_path=`$CYGPATH -u "$windows_path"`
31166 new_path="$unix_path"
31167 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31168 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31169 new_path="$unix_path"
31170 fi
31171
31172 fi
31173
31174 if test "x$new_path" = x; then
31175 # It's still not found. Now this is an unrecoverable error.
31176 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
31177 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
31178 has_space=`$ECHO "$complete" | $GREP " "`
31179 if test "x$has_space" != x; then
31180 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31181 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31182 fi
31183 as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31184 fi
31185 fi
31186
31187 # Now new_path has a complete unix path to the binary
31188 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31189 # Keep paths in /bin as-is, but remove trailing .exe if any
31190 new_path="${new_path/%.exe/}"
31191 # Do not save /bin paths to all_fixpath_prefixes!
31192 else
31193 # Not in mixed or Windows style, start by that.
31194 new_path=`cmd //c echo $new_path`
31195
31196 input_path="$new_path"
31197 # Check if we need to convert this using DOS-style short mode. If the path
31198 # contains just simple characters, use it. Otherwise (spaces, weird characters),
31199 # take no chances and rewrite it.
31200 # Note: m4 eats our [], so we need to use [ and ] instead.
31201 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31202 if test "x$has_forbidden_chars" != x; then
31203 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31204 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31205 fi
31206
31207 # Output is in $new_path
31208
31209 windows_path="$new_path"
31210 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31211 unix_path=`$CYGPATH -u "$windows_path"`
31212 new_path="$unix_path"
31213 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31214 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31215 new_path="$unix_path"
31216 fi
31217
31218 # remove trailing .exe if any
31219 new_path="${new_path/%.exe/}"
31220
31221 # Save the first 10 bytes of this path to the storage, so fixpath can work.
31222 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31223 fi
31224
31225 else
31226 # We're on a unix platform. Hooray! :)
31227 # First separate the path from the arguments. This will split at the first
31228 # space.
31229 complete="$PROPER_COMPILER_CXX"
31230 path="${complete%% *}"
31231 tmp="$complete EOL"
31232 arguments="${tmp#* }"
31233
31234 # Cannot rely on the command "which" here since it doesn't always work.
31235 is_absolute_path=`$ECHO "$path" | $GREP ^/`
31236 if test -z "$is_absolute_path"; then
31237 # Path to executable is not absolute. Find it.
31238 IFS_save="$IFS"
31239 IFS=:
31240 for p in $PATH; do
31241 if test -f "$p/$path" && test -x "$p/$path"; then
31242 new_path="$p/$path"
31243 break
31244 fi
31245 done
31246 IFS="$IFS_save"
31247 else
31248 # This is an absolute path, we can use it without further modifications.
31249 new_path="$path"
31250 fi
31251
31252 if test "x$new_path" = x; then
31253 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
31254 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
31255 has_space=`$ECHO "$complete" | $GREP " "`
31256 if test "x$has_space" != x; then
31257 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31258 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31259 fi
31260 as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31261 fi
31262 fi
31263
31264 # Now join together the path and the arguments once again
31265 if test "x$arguments" != xEOL; then
31266 new_complete="$new_path ${arguments% *}"
31267 else
31268 new_complete="$new_path"
31269 fi
31270
31271 if test "x$complete" != "x$new_complete"; then
31272 PROPER_COMPILER_CXX="$new_complete"
31273 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
31274 $as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
31275 fi
31276 fi
31277
31278 PATH="$RETRY_COMPILER_SAVED_PATH"
31279
31280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
31281 $as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
31282
31283 if test "x$OPENJDK_BUILD_OS" != xwindows; then
31284 # Follow a chain of symbolic links. Use readlink
31285 # where it exists, else fall back to horribly
31286 # complicated shell code.
31287 if test "x$READLINK_TESTED" != yes; then
31288 # On MacOSX there is a readlink tool with a different
31289 # purpose than the GNU readlink tool. Check the found readlink.
31290 ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31291 if test "x$ISGNU" = x; then
31292 # A readlink that we do not know how to use.
31293 # Are there other non-GNU readlinks out there?
31294 READLINK_TESTED=yes
31295 READLINK=
31296 fi
31297 fi
31298
31299 if test "x$READLINK" != x; then
31300 PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
31301 else
31302 # Save the current directory for restoring afterwards
31303 STARTDIR=$PWD
31304 COUNTER=0
31305 sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
31306 sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
31307 cd $sym_link_dir
31308 # Use -P flag to resolve symlinks in directories.
31309 cd `$THEPWDCMD -P`
31310 sym_link_dir=`$THEPWDCMD -P`
31311 # Resolve file symlinks
31312 while test $COUNTER -lt 20; do
31313 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
31314 if test "x$ISLINK" == x; then
31315 # This is not a symbolic link! We are done!
31316 break
31317 fi
31318 # Again resolve directory symlinks since the target of the just found
31319 # link could be in a different directory
31320 cd `$DIRNAME $ISLINK`
31321 sym_link_dir=`$THEPWDCMD -P`
31322 sym_link_file=`$BASENAME $ISLINK`
31323 let COUNTER=COUNTER+1
31324 done
31325 cd $STARTDIR
31326 PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
31327 fi
31328 fi
31329
31330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
31331 $as_echo "$PROPER_COMPILER_CXX" >&6; }
31332 CXX="$PROPER_COMPILER_CXX"
31333 else
31334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
31335 $as_echo "no, keeping CXX" >&6; }
31336 fi
31337
31338
31339 COMPILER=$CXX
31340 COMPILER_NAME=$COMPILER_NAME
31341
31342 if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31343 # cc -V output typically looks like
31344 # cc: Sun C 5.12 Linux_i386 2011/11/16
31345 COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
31346 # Check that this is likely to be the Solaris Studio cc.
31347 $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
31348 if test $? -ne 0; then
31349 ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31350 { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
31351 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31352 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31353 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31354 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
31355 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
31356 as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31357 fi
31358 # Remove usage instructions (if present), and
31359 # collapse compiler output into a single line
31360 COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
31361 $SED -e 's/ *[Uu]sage:.*//'`
31362 COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31363 $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
31364 elif test "x$TOOLCHAIN_TYPE" = xxlc; then
31365 # xlc -qversion output typically looks like
31366 # IBM XL C/C++ for AIX, V11.1 (5724-X13)
31367 # Version: 11.01.0000.0015
31368 COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
31369 # Check that this is likely to be the IBM XL C compiler.
31370 $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
31371 if test $? -ne 0; then
31372 ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31373 { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
31374 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31375 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31376 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31377 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
31378 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
31379 as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31380 fi
31381 # Collapse compiler output into a single line
31382 COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31383 COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31384 $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
31385 elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31386 # There is no specific version flag, but all output starts with a version string.
31387 # First line typically looks something like:
31388 # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
31389 COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
31390 # Check that this is likely to be Microsoft CL.EXE.
31391 $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
31392 if test $? -ne 0; then
31393 { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
31394 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31395 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31396 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31397 as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31398 fi
31399 # Collapse compiler output into a single line
31400 COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31401 COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31402 $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
31403 elif test "x$TOOLCHAIN_TYPE" = xgcc; then
31404 # gcc --version output typically looks like
31405 # gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
31406 # Copyright (C) 2013 Free Software Foundation, Inc.
31407 # This is free software; see the source for copying conditions. There is NO
31408 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
31409 COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31410 # Check that this is likely to be GCC.
31411 $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
31412 if test $? -ne 0; then
31413 { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
31414 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31415 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
31416 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
31417 as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31418 fi
31419 # Remove Copyright and legalese from version string, and
31420 # collapse into a single line
31421 COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
31422 $SED -e 's/ *Copyright .*//'`
31423 COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31424 $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
31425 elif test "x$TOOLCHAIN_TYPE" = xclang; then
31426 # clang --version output typically looks like
31427 # Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
31428 # clang version 3.3 (tags/RELEASE_33/final)
31429 # or
31430 # Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
31431 # Target: x86_64-pc-linux-gnu
31432 # Thread model: posix
31433 COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31434 # Check that this is likely to be clang
31435 $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
31436 if test $? -ne 0; then
31437 { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
31438 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31439 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31440 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31441 as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31442 fi
31443 # Collapse compiler output into a single line
31444 COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31445 COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31446 $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
31447 else
31448 as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
31449 fi
31450 # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
31451 CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
31452 # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
31453 CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
31454
31455 { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
31456 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
31457
31458
31459 # Now that we have resolved CXX ourself, let autoconf have its go at it
31460 ac_ext=cpp
31461 ac_cpp='$CXXCPP $CPPFLAGS'
31462 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31463 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31464 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31465 if test -z "$CXX"; then
31466 if test -n "$CCC"; then
31467 CXX=$CCC
31468 else
31469 if test -n "$ac_tool_prefix"; then
31470 for ac_prog in $CXX
31471 do
31472 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31473 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31475 $as_echo_n "checking for $ac_word... " >&6; }
31476 if ${ac_cv_prog_CXX+:} false; then :
31477 $as_echo_n "(cached) " >&6
31478 else
31479 if test -n "$CXX"; then
31480 ac_cv_prog_CXX="$CXX" # Let the user override the test.
31481 else
31482 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31483 for as_dir in $PATH
31484 do
31485 IFS=$as_save_IFS
31486 test -z "$as_dir" && as_dir=.
31487 for ac_exec_ext in '' $ac_executable_extensions; do
31488 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31489 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
31490 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31491 break 2
31492 fi
31493 done
31494 done
31495 IFS=$as_save_IFS
31496
31497 fi
31498 fi
31499 CXX=$ac_cv_prog_CXX
31500 if test -n "$CXX"; then
31501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
31502 $as_echo "$CXX" >&6; }
31503 else
31504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31505 $as_echo "no" >&6; }
31506 fi
31507
31508
31509 test -n "$CXX" && break
31510 done
31511 fi
31512 if test -z "$CXX"; then
31513 ac_ct_CXX=$CXX
31514 for ac_prog in $CXX
31515 do
31516 # Extract the first word of "$ac_prog", so it can be a program name with args.
31517 set dummy $ac_prog; ac_word=$2
31518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31519 $as_echo_n "checking for $ac_word... " >&6; }
31520 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
31521 $as_echo_n "(cached) " >&6
31522 else
31523 if test -n "$ac_ct_CXX"; then
31524 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
31525 else
31526 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31527 for as_dir in $PATH
31528 do
31529 IFS=$as_save_IFS
31530 test -z "$as_dir" && as_dir=.
31531 for ac_exec_ext in '' $ac_executable_extensions; do
31532 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31533 ac_cv_prog_ac_ct_CXX="$ac_prog"
31534 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31535 break 2
31536 fi
31537 done
31538 done
31539 IFS=$as_save_IFS
31540
31541 fi
31542 fi
31543 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
31544 if test -n "$ac_ct_CXX"; then
31545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
31546 $as_echo "$ac_ct_CXX" >&6; }
31547 else
31548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31549 $as_echo "no" >&6; }
31550 fi
31551
31552
31553 test -n "$ac_ct_CXX" && break
31554 done
31555
31556 if test "x$ac_ct_CXX" = x; then
31557 CXX="g++"
31558 else
31559 case $cross_compiling:$ac_tool_warned in
31560 yes:)
31561 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31562 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31563 ac_tool_warned=yes ;;
31564 esac
31565 CXX=$ac_ct_CXX
31566 fi
31567 fi
31568
31569 fi
31570 fi
31571 # Provide some information about the compiler.
31572 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
31573 set X $ac_compile
31574 ac_compiler=$2
31575 for ac_option in --version -v -V -qversion; do
31576 { { ac_try="$ac_compiler $ac_option >&5"
31577 case "(($ac_try" in
31578 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31579 *) ac_try_echo=$ac_try;;
31580 esac
31581 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
31582 $as_echo "$ac_try_echo"; } >&5
31583 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
31584 ac_status=$?
31585 if test -s conftest.err; then
31586 sed '10a\
31587 ... rest of stderr output deleted ...
31588 10q' conftest.err >conftest.er1
31589 cat conftest.er1 >&5
31590 fi
31591 rm -f conftest.er1 conftest.err
31592 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31593 test $ac_status = 0; }
31594 done
31595
31596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
31597 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
31598 if ${ac_cv_cxx_compiler_gnu+:} false; then :
31599 $as_echo_n "(cached) " >&6
31600 else
31601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31602 /* end confdefs.h. */
31603
31604 int
31605 main ()
31606 {
31607 #ifndef __GNUC__
31608 choke me
31609 #endif
31610
31611 ;
31612 return 0;
31613 }
31614 _ACEOF
31615 if ac_fn_cxx_try_compile "$LINENO"; then :
31616 ac_compiler_gnu=yes
31617 else
31618 ac_compiler_gnu=no
31619 fi
31620 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31621 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
31622
31623 fi
31624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
31625 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
31626 if test $ac_compiler_gnu = yes; then
31627 GXX=yes
31628 else
31629 GXX=
31630 fi
31631 ac_test_CXXFLAGS=${CXXFLAGS+set}
31632 ac_save_CXXFLAGS=$CXXFLAGS
31633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
31634 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
31635 if ${ac_cv_prog_cxx_g+:} false; then :
31636 $as_echo_n "(cached) " >&6
31637 else
31638 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
31639 ac_cxx_werror_flag=yes
31640 ac_cv_prog_cxx_g=no
31641 CXXFLAGS="-g"
31642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31643 /* end confdefs.h. */
31644
31645 int
31646 main ()
31647 {
31648
31649 ;
31650 return 0;
31651 }
31652 _ACEOF
31653 if ac_fn_cxx_try_compile "$LINENO"; then :
31654 ac_cv_prog_cxx_g=yes
31655 else
31656 CXXFLAGS=""
31657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31658 /* end confdefs.h. */
31659
31660 int
31661 main ()
31662 {
31663
31664 ;
31665 return 0;
31666 }
31667 _ACEOF
31668 if ac_fn_cxx_try_compile "$LINENO"; then :
31669
31670 else
31671 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
31672 CXXFLAGS="-g"
31673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31674 /* end confdefs.h. */
31675
31676 int
31677 main ()
31678 {
31679
31680 ;
31681 return 0;
31682 }
31683 _ACEOF
31684 if ac_fn_cxx_try_compile "$LINENO"; then :
31685 ac_cv_prog_cxx_g=yes
31686 fi
31687 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31688 fi
31689 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31690 fi
31691 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31692 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
31693 fi
31694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
31695 $as_echo "$ac_cv_prog_cxx_g" >&6; }
31696 if test "$ac_test_CXXFLAGS" = set; then
31697 CXXFLAGS=$ac_save_CXXFLAGS
31698 elif test $ac_cv_prog_cxx_g = yes; then
31699 if test "$GXX" = yes; then
31700 CXXFLAGS="-g -O2"
31701 else
31702 CXXFLAGS="-g"
31703 fi
31704 else
31705 if test "$GXX" = yes; then
31706 CXXFLAGS="-O2"
31707 else
31708 CXXFLAGS=
31709 fi
31710 fi
31711 ac_ext=cpp
31712 ac_cpp='$CXXCPP $CPPFLAGS'
31713 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31714 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31715 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31716
31717
31718 #
31719 # Setup the preprocessor (CPP and CXXCPP)
31720 #
31721 ac_ext=c
31722 ac_cpp='$CPP $CPPFLAGS'
31723 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31724 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31725 ac_compiler_gnu=$ac_cv_c_compiler_gnu
31726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
31727 $as_echo_n "checking how to run the C preprocessor... " >&6; }
31728 # On Suns, sometimes $CPP names a directory.
31729 if test -n "$CPP" && test -d "$CPP"; then
31730 CPP=
31731 fi
31732 if test -z "$CPP"; then
31733 if ${ac_cv_prog_CPP+:} false; then :
31734 $as_echo_n "(cached) " >&6
31735 else
31736 # Double quotes because CPP needs to be expanded
31737 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
31738 do
31739 ac_preproc_ok=false
31740 for ac_c_preproc_warn_flag in '' yes
31741 do
31742 # Use a header file that comes with gcc, so configuring glibc
31743 # with a fresh cross-compiler works.
31744 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31745 # <limits.h> exists even on freestanding compilers.
31746 # On the NeXT, cc -E runs the code through the compiler's parser,
31747 # not just through cpp. "Syntax error" is here to catch this case.
31748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31749 /* end confdefs.h. */
31750 #ifdef __STDC__
31751 # include <limits.h>
31752 #else
31753 # include <assert.h>
31754 #endif
31755 Syntax error
31756 _ACEOF
31757 if ac_fn_c_try_cpp "$LINENO"; then :
31758
31759 else
31760 # Broken: fails on valid input.
31761 continue
31762 fi
31763 rm -f conftest.err conftest.i conftest.$ac_ext
31764
31765 # OK, works on sane cases. Now check whether nonexistent headers
31766 # can be detected and how.
31767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31768 /* end confdefs.h. */
31769 #include <ac_nonexistent.h>
31770 _ACEOF
31771 if ac_fn_c_try_cpp "$LINENO"; then :
31772 # Broken: success on invalid input.
31773 continue
31774 else
31775 # Passes both tests.
31776 ac_preproc_ok=:
31777 break
31778 fi
31779 rm -f conftest.err conftest.i conftest.$ac_ext
31780
31781 done
31782 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31783 rm -f conftest.i conftest.err conftest.$ac_ext
31784 if $ac_preproc_ok; then :
31785 break
31786 fi
31787
31788 done
31789 ac_cv_prog_CPP=$CPP
31790
31791 fi
31792 CPP=$ac_cv_prog_CPP
31793 else
31794 ac_cv_prog_CPP=$CPP
31795 fi
31796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
31797 $as_echo "$CPP" >&6; }
31798 ac_preproc_ok=false
31799 for ac_c_preproc_warn_flag in '' yes
31800 do
31801 # Use a header file that comes with gcc, so configuring glibc
31802 # with a fresh cross-compiler works.
31803 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31804 # <limits.h> exists even on freestanding compilers.
31805 # On the NeXT, cc -E runs the code through the compiler's parser,
31806 # not just through cpp. "Syntax error" is here to catch this case.
31807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31808 /* end confdefs.h. */
31809 #ifdef __STDC__
31810 # include <limits.h>
31811 #else
31812 # include <assert.h>
31813 #endif
31814 Syntax error
31815 _ACEOF
31816 if ac_fn_c_try_cpp "$LINENO"; then :
31817
31818 else
31819 # Broken: fails on valid input.
31820 continue
31821 fi
31822 rm -f conftest.err conftest.i conftest.$ac_ext
31823
31824 # OK, works on sane cases. Now check whether nonexistent headers
31825 # can be detected and how.
31826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31827 /* end confdefs.h. */
31828 #include <ac_nonexistent.h>
31829 _ACEOF
31830 if ac_fn_c_try_cpp "$LINENO"; then :
31831 # Broken: success on invalid input.
31832 continue
31833 else
31834 # Passes both tests.
31835 ac_preproc_ok=:
31836 break
31837 fi
31838 rm -f conftest.err conftest.i conftest.$ac_ext
31839
31840 done
31841 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31842 rm -f conftest.i conftest.err conftest.$ac_ext
31843 if $ac_preproc_ok; then :
31844
31845 else
31846 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31847 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31848 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
31849 See \`config.log' for more details" "$LINENO" 5; }
31850 fi
31851
31852 ac_ext=cpp
31853 ac_cpp='$CXXCPP $CPPFLAGS'
31854 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31855 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31856 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31857
31858
31859 # Only process if variable expands to non-empty
31860
31861 if test "x$CPP" != x; then
31862 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31863
31864 # First separate the path from the arguments. This will split at the first
31865 # space.
31866 complete="$CPP"
31867 path="${complete%% *}"
31868 tmp="$complete EOL"
31869 arguments="${tmp#* }"
31870
31871 # Input might be given as Windows format, start by converting to
31872 # unix format.
31873 new_path=`$CYGPATH -u "$path"`
31874
31875 # Now try to locate executable using which
31876 new_path=`$WHICH "$new_path" 2> /dev/null`
31877 # bat and cmd files are not always considered executable in cygwin causing which
31878 # to not find them
31879 if test "x$new_path" = x \
31880 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31881 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31882 new_path=`$CYGPATH -u "$path"`
31883 fi
31884 if test "x$new_path" = x; then
31885 # Oops. Which didn't find the executable.
31886 # The splitting of arguments from the executable at a space might have been incorrect,
31887 # since paths with space are more likely in Windows. Give it another try with the whole
31888 # argument.
31889 path="$complete"
31890 arguments="EOL"
31891 new_path=`$CYGPATH -u "$path"`
31892 new_path=`$WHICH "$new_path" 2> /dev/null`
31893 # bat and cmd files are not always considered executable in cygwin causing which
31894 # to not find them
31895 if test "x$new_path" = x \
31896 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31897 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31898 new_path=`$CYGPATH -u "$path"`
31899 fi
31900 if test "x$new_path" = x; then
31901 # It's still not found. Now this is an unrecoverable error.
31902 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31903 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31904 has_space=`$ECHO "$complete" | $GREP " "`
31905 if test "x$has_space" != x; then
31906 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31907 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31908 fi
31909 as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31910 fi
31911 fi
31912
31913 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31914 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31915 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31916 # "foo.exe" is OK but "foo" is an error.
31917 #
31918 # This test is therefore slightly more accurate than "test -f" to check for file presence.
31919 # It is also a way to make sure we got the proper file name for the real test later on.
31920 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31921 if test "x$test_shortpath" = x; then
31922 # Short path failed, file does not exist as specified.
31923 # Try adding .exe or .cmd
31924 if test -f "${new_path}.exe"; then
31925 input_to_shortpath="${new_path}.exe"
31926 elif test -f "${new_path}.cmd"; then
31927 input_to_shortpath="${new_path}.cmd"
31928 else
31929 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
31930 $as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
31931 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31932 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31933 as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31934 fi
31935 else
31936 input_to_shortpath="$new_path"
31937 fi
31938
31939 # Call helper function which possibly converts this using DOS-style short mode.
31940 # If so, the updated path is stored in $new_path.
31941 new_path="$input_to_shortpath"
31942
31943 input_path="$input_to_shortpath"
31944 # Check if we need to convert this using DOS-style short mode. If the path
31945 # contains just simple characters, use it. Otherwise (spaces, weird characters),
31946 # take no chances and rewrite it.
31947 # Note: m4 eats our [], so we need to use [ and ] instead.
31948 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31949 if test "x$has_forbidden_chars" != x; then
31950 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31951 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31952 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31953 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31954 # Going to short mode and back again did indeed matter. Since short mode is
31955 # case insensitive, let's make it lowercase to improve readability.
31956 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31957 # Now convert it back to Unix-style (cygpath)
31958 input_path=`$CYGPATH -u "$shortmode_path"`
31959 new_path="$input_path"
31960 fi
31961 fi
31962
31963 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31964 if test "x$test_cygdrive_prefix" = x; then
31965 # As a simple fix, exclude /usr/bin since it's not a real path.
31966 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31967 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31968 # a path prefixed by /cygdrive for fixpath to work.
31969 new_path="$CYGWIN_ROOT_PATH$input_path"
31970 fi
31971 fi
31972
31973 # remove trailing .exe if any
31974 new_path="${new_path/%.exe/}"
31975
31976 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31977
31978 # First separate the path from the arguments. This will split at the first
31979 # space.
31980 complete="$CPP"
31981 path="${complete%% *}"
31982 tmp="$complete EOL"
31983 arguments="${tmp#* }"
31984
31985 # Input might be given as Windows format, start by converting to
31986 # unix format.
31987 new_path="$path"
31988
31989 windows_path="$new_path"
31990 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31991 unix_path=`$CYGPATH -u "$windows_path"`
31992 new_path="$unix_path"
31993 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31994 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31995 new_path="$unix_path"
31996 fi
31997
31998
31999 # Now try to locate executable using which
32000 new_path=`$WHICH "$new_path" 2> /dev/null`
32001
32002 if test "x$new_path" = x; then
32003 # Oops. Which didn't find the executable.
32004 # The splitting of arguments from the executable at a space might have been incorrect,
32005 # since paths with space are more likely in Windows. Give it another try with the whole
32006 # argument.
32007 path="$complete"
32008 arguments="EOL"
32009 new_path="$path"
32010
32011 windows_path="$new_path"
32012 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32013 unix_path=`$CYGPATH -u "$windows_path"`
32014 new_path="$unix_path"
32015 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32016 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32017 new_path="$unix_path"
32018 fi
32019
32020
32021 new_path=`$WHICH "$new_path" 2> /dev/null`
32022 # bat and cmd files are not always considered executable in MSYS causing which
32023 # to not find them
32024 if test "x$new_path" = x \
32025 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32026 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32027 new_path="$path"
32028
32029 windows_path="$new_path"
32030 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32031 unix_path=`$CYGPATH -u "$windows_path"`
32032 new_path="$unix_path"
32033 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32034 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32035 new_path="$unix_path"
32036 fi
32037
32038 fi
32039
32040 if test "x$new_path" = x; then
32041 # It's still not found. Now this is an unrecoverable error.
32042 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
32043 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
32044 has_space=`$ECHO "$complete" | $GREP " "`
32045 if test "x$has_space" != x; then
32046 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32047 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32048 fi
32049 as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
32050 fi
32051 fi
32052
32053 # Now new_path has a complete unix path to the binary
32054 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32055 # Keep paths in /bin as-is, but remove trailing .exe if any
32056 new_path="${new_path/%.exe/}"
32057 # Do not save /bin paths to all_fixpath_prefixes!
32058 else
32059 # Not in mixed or Windows style, start by that.
32060 new_path=`cmd //c echo $new_path`
32061
32062 input_path="$new_path"
32063 # Check if we need to convert this using DOS-style short mode. If the path
32064 # contains just simple characters, use it. Otherwise (spaces, weird characters),
32065 # take no chances and rewrite it.
32066 # Note: m4 eats our [], so we need to use [ and ] instead.
32067 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32068 if test "x$has_forbidden_chars" != x; then
32069 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32070 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32071 fi
32072
32073 # Output is in $new_path
32074
32075 windows_path="$new_path"
32076 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32077 unix_path=`$CYGPATH -u "$windows_path"`
32078 new_path="$unix_path"
32079 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32080 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32081 new_path="$unix_path"
32082 fi
32083
32084 # remove trailing .exe if any
32085 new_path="${new_path/%.exe/}"
32086
32087 # Save the first 10 bytes of this path to the storage, so fixpath can work.
32088 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32089 fi
32090
32091 else
32092 # We're on a unix platform. Hooray! :)
32093 # First separate the path from the arguments. This will split at the first
32094 # space.
32095 complete="$CPP"
32096 path="${complete%% *}"
32097 tmp="$complete EOL"
32098 arguments="${tmp#* }"
32099
32100 # Cannot rely on the command "which" here since it doesn't always work.
32101 is_absolute_path=`$ECHO "$path" | $GREP ^/`
32102 if test -z "$is_absolute_path"; then
32103 # Path to executable is not absolute. Find it.
32104 IFS_save="$IFS"
32105 IFS=:
32106 for p in $PATH; do
32107 if test -f "$p/$path" && test -x "$p/$path"; then
32108 new_path="$p/$path"
32109 break
32110 fi
32111 done
32112 IFS="$IFS_save"
32113 else
32114 # This is an absolute path, we can use it without further modifications.
32115 new_path="$path"
32116 fi
32117
32118 if test "x$new_path" = x; then
32119 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
32120 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
32121 has_space=`$ECHO "$complete" | $GREP " "`
32122 if test "x$has_space" != x; then
32123 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32124 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32125 fi
32126 as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
32127 fi
32128 fi
32129
32130 # Now join together the path and the arguments once again
32131 if test "x$arguments" != xEOL; then
32132 new_complete="$new_path ${arguments% *}"
32133 else
32134 new_complete="$new_path"
32135 fi
32136
32137 if test "x$complete" != "x$new_complete"; then
32138 CPP="$new_complete"
32139 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
32140 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
32141 fi
32142 fi
32143
32144 ac_ext=cpp
32145 ac_cpp='$CXXCPP $CPPFLAGS'
32146 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32147 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32148 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
32150 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
32151 if test -z "$CXXCPP"; then
32152 if ${ac_cv_prog_CXXCPP+:} false; then :
32153 $as_echo_n "(cached) " >&6
32154 else
32155 # Double quotes because CXXCPP needs to be expanded
32156 for CXXCPP in "$CXX -E" "/lib/cpp"
32157 do
32158 ac_preproc_ok=false
32159 for ac_cxx_preproc_warn_flag in '' yes
32160 do
32161 # Use a header file that comes with gcc, so configuring glibc
32162 # with a fresh cross-compiler works.
32163 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
32164 # <limits.h> exists even on freestanding compilers.
32165 # On the NeXT, cc -E runs the code through the compiler's parser,
32166 # not just through cpp. "Syntax error" is here to catch this case.
32167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32168 /* end confdefs.h. */
32169 #ifdef __STDC__
32170 # include <limits.h>
32171 #else
32172 # include <assert.h>
32173 #endif
32174 Syntax error
32175 _ACEOF
32176 if ac_fn_cxx_try_cpp "$LINENO"; then :
32177
32178 else
32179 # Broken: fails on valid input.
32180 continue
32181 fi
32182 rm -f conftest.err conftest.i conftest.$ac_ext
32183
32184 # OK, works on sane cases. Now check whether nonexistent headers
32185 # can be detected and how.
32186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32187 /* end confdefs.h. */
32188 #include <ac_nonexistent.h>
32189 _ACEOF
32190 if ac_fn_cxx_try_cpp "$LINENO"; then :
32191 # Broken: success on invalid input.
32192 continue
32193 else
32194 # Passes both tests.
32195 ac_preproc_ok=:
32196 break
32197 fi
32198 rm -f conftest.err conftest.i conftest.$ac_ext
32199
32200 done
32201 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
32202 rm -f conftest.i conftest.err conftest.$ac_ext
32203 if $ac_preproc_ok; then :
32204 break
32205 fi
32206
32207 done
32208 ac_cv_prog_CXXCPP=$CXXCPP
32209
32210 fi
32211 CXXCPP=$ac_cv_prog_CXXCPP
32212 else
32213 ac_cv_prog_CXXCPP=$CXXCPP
32214 fi
32215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
32216 $as_echo "$CXXCPP" >&6; }
32217 ac_preproc_ok=false
32218 for ac_cxx_preproc_warn_flag in '' yes
32219 do
32220 # Use a header file that comes with gcc, so configuring glibc
32221 # with a fresh cross-compiler works.
32222 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
32223 # <limits.h> exists even on freestanding compilers.
32224 # On the NeXT, cc -E runs the code through the compiler's parser,
32225 # not just through cpp. "Syntax error" is here to catch this case.
32226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32227 /* end confdefs.h. */
32228 #ifdef __STDC__
32229 # include <limits.h>
32230 #else
32231 # include <assert.h>
32232 #endif
32233 Syntax error
32234 _ACEOF
32235 if ac_fn_cxx_try_cpp "$LINENO"; then :
32236
32237 else
32238 # Broken: fails on valid input.
32239 continue
32240 fi
32241 rm -f conftest.err conftest.i conftest.$ac_ext
32242
32243 # OK, works on sane cases. Now check whether nonexistent headers
32244 # can be detected and how.
32245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32246 /* end confdefs.h. */
32247 #include <ac_nonexistent.h>
32248 _ACEOF
32249 if ac_fn_cxx_try_cpp "$LINENO"; then :
32250 # Broken: success on invalid input.
32251 continue
32252 else
32253 # Passes both tests.
32254 ac_preproc_ok=:
32255 break
32256 fi
32257 rm -f conftest.err conftest.i conftest.$ac_ext
32258
32259 done
32260 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
32261 rm -f conftest.i conftest.err conftest.$ac_ext
32262 if $ac_preproc_ok; then :
32263
32264 else
32265 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32266 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32267 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
32268 See \`config.log' for more details" "$LINENO" 5; }
32269 fi
32270
32271 ac_ext=cpp
32272 ac_cpp='$CXXCPP $CPPFLAGS'
32273 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32274 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32275 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32276
32277
32278 # Only process if variable expands to non-empty
32279
32280 if test "x$CXXCPP" != x; then
32281 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32282
32283 # First separate the path from the arguments. This will split at the first
32284 # space.
32285 complete="$CXXCPP"
32286 path="${complete%% *}"
32287 tmp="$complete EOL"
32288 arguments="${tmp#* }"
32289
32290 # Input might be given as Windows format, start by converting to
32291 # unix format.
32292 new_path=`$CYGPATH -u "$path"`
32293
32294 # Now try to locate executable using which
32295 new_path=`$WHICH "$new_path" 2> /dev/null`
32296 # bat and cmd files are not always considered executable in cygwin causing which
32297 # to not find them
32298 if test "x$new_path" = x \
32299 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32300 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32301 new_path=`$CYGPATH -u "$path"`
32302 fi
32303 if test "x$new_path" = x; then
32304 # Oops. Which didn't find the executable.
32305 # The splitting of arguments from the executable at a space might have been incorrect,
32306 # since paths with space are more likely in Windows. Give it another try with the whole
32307 # argument.
32308 path="$complete"
32309 arguments="EOL"
32310 new_path=`$CYGPATH -u "$path"`
32311 new_path=`$WHICH "$new_path" 2> /dev/null`
32312 # bat and cmd files are not always considered executable in cygwin causing which
32313 # to not find them
32314 if test "x$new_path" = x \
32315 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32316 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32317 new_path=`$CYGPATH -u "$path"`
32318 fi
32319 if test "x$new_path" = x; then
32320 # It's still not found. Now this is an unrecoverable error.
32321 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32322 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32323 has_space=`$ECHO "$complete" | $GREP " "`
32324 if test "x$has_space" != x; then
32325 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32326 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32327 fi
32328 as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32329 fi
32330 fi
32331
32332 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32333 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32334 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32335 # "foo.exe" is OK but "foo" is an error.
32336 #
32337 # This test is therefore slightly more accurate than "test -f" to check for file presence.
32338 # It is also a way to make sure we got the proper file name for the real test later on.
32339 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32340 if test "x$test_shortpath" = x; then
32341 # Short path failed, file does not exist as specified.
32342 # Try adding .exe or .cmd
32343 if test -f "${new_path}.exe"; then
32344 input_to_shortpath="${new_path}.exe"
32345 elif test -f "${new_path}.cmd"; then
32346 input_to_shortpath="${new_path}.cmd"
32347 else
32348 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
32349 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
32350 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32351 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32352 as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32353 fi
32354 else
32355 input_to_shortpath="$new_path"
32356 fi
32357
32358 # Call helper function which possibly converts this using DOS-style short mode.
32359 # If so, the updated path is stored in $new_path.
32360 new_path="$input_to_shortpath"
32361
32362 input_path="$input_to_shortpath"
32363 # Check if we need to convert this using DOS-style short mode. If the path
32364 # contains just simple characters, use it. Otherwise (spaces, weird characters),
32365 # take no chances and rewrite it.
32366 # Note: m4 eats our [], so we need to use [ and ] instead.
32367 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32368 if test "x$has_forbidden_chars" != x; then
32369 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32370 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32371 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32372 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32373 # Going to short mode and back again did indeed matter. Since short mode is
32374 # case insensitive, let's make it lowercase to improve readability.
32375 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32376 # Now convert it back to Unix-style (cygpath)
32377 input_path=`$CYGPATH -u "$shortmode_path"`
32378 new_path="$input_path"
32379 fi
32380 fi
32381
32382 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32383 if test "x$test_cygdrive_prefix" = x; then
32384 # As a simple fix, exclude /usr/bin since it's not a real path.
32385 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32386 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32387 # a path prefixed by /cygdrive for fixpath to work.
32388 new_path="$CYGWIN_ROOT_PATH$input_path"
32389 fi
32390 fi
32391
32392 # remove trailing .exe if any
32393 new_path="${new_path/%.exe/}"
32394
32395 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32396
32397 # First separate the path from the arguments. This will split at the first
32398 # space.
32399 complete="$CXXCPP"
32400 path="${complete%% *}"
32401 tmp="$complete EOL"
32402 arguments="${tmp#* }"
32403
32404 # Input might be given as Windows format, start by converting to
32405 # unix format.
32406 new_path="$path"
32407
32408 windows_path="$new_path"
32409 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32410 unix_path=`$CYGPATH -u "$windows_path"`
32411 new_path="$unix_path"
32412 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32413 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32414 new_path="$unix_path"
32415 fi
32416
32417
32418 # Now try to locate executable using which
32419 new_path=`$WHICH "$new_path" 2> /dev/null`
32420
32421 if test "x$new_path" = x; then
32422 # Oops. Which didn't find the executable.
32423 # The splitting of arguments from the executable at a space might have been incorrect,
32424 # since paths with space are more likely in Windows. Give it another try with the whole
32425 # argument.
32426 path="$complete"
32427 arguments="EOL"
32428 new_path="$path"
32429
32430 windows_path="$new_path"
32431 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32432 unix_path=`$CYGPATH -u "$windows_path"`
32433 new_path="$unix_path"
32434 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32435 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32436 new_path="$unix_path"
32437 fi
32438
32439
32440 new_path=`$WHICH "$new_path" 2> /dev/null`
32441 # bat and cmd files are not always considered executable in MSYS causing which
32442 # to not find them
32443 if test "x$new_path" = x \
32444 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32445 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32446 new_path="$path"
32447
32448 windows_path="$new_path"
32449 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32450 unix_path=`$CYGPATH -u "$windows_path"`
32451 new_path="$unix_path"
32452 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32453 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32454 new_path="$unix_path"
32455 fi
32456
32457 fi
32458
32459 if test "x$new_path" = x; then
32460 # It's still not found. Now this is an unrecoverable error.
32461 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32462 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32463 has_space=`$ECHO "$complete" | $GREP " "`
32464 if test "x$has_space" != x; then
32465 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32466 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32467 fi
32468 as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32469 fi
32470 fi
32471
32472 # Now new_path has a complete unix path to the binary
32473 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32474 # Keep paths in /bin as-is, but remove trailing .exe if any
32475 new_path="${new_path/%.exe/}"
32476 # Do not save /bin paths to all_fixpath_prefixes!
32477 else
32478 # Not in mixed or Windows style, start by that.
32479 new_path=`cmd //c echo $new_path`
32480
32481 input_path="$new_path"
32482 # Check if we need to convert this using DOS-style short mode. If the path
32483 # contains just simple characters, use it. Otherwise (spaces, weird characters),
32484 # take no chances and rewrite it.
32485 # Note: m4 eats our [], so we need to use [ and ] instead.
32486 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32487 if test "x$has_forbidden_chars" != x; then
32488 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32489 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32490 fi
32491
32492 # Output is in $new_path
32493
32494 windows_path="$new_path"
32495 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32496 unix_path=`$CYGPATH -u "$windows_path"`
32497 new_path="$unix_path"
32498 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32499 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32500 new_path="$unix_path"
32501 fi
32502
32503 # remove trailing .exe if any
32504 new_path="${new_path/%.exe/}"
32505
32506 # Save the first 10 bytes of this path to the storage, so fixpath can work.
32507 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32508 fi
32509
32510 else
32511 # We're on a unix platform. Hooray! :)
32512 # First separate the path from the arguments. This will split at the first
32513 # space.
32514 complete="$CXXCPP"
32515 path="${complete%% *}"
32516 tmp="$complete EOL"
32517 arguments="${tmp#* }"
32518
32519 # Cannot rely on the command "which" here since it doesn't always work.
32520 is_absolute_path=`$ECHO "$path" | $GREP ^/`
32521 if test -z "$is_absolute_path"; then
32522 # Path to executable is not absolute. Find it.
32523 IFS_save="$IFS"
32524 IFS=:
32525 for p in $PATH; do
32526 if test -f "$p/$path" && test -x "$p/$path"; then
32527 new_path="$p/$path"
32528 break
32529 fi
32530 done
32531 IFS="$IFS_save"
32532 else
32533 # This is an absolute path, we can use it without further modifications.
32534 new_path="$path"
32535 fi
32536
32537 if test "x$new_path" = x; then
32538 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32539 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32540 has_space=`$ECHO "$complete" | $GREP " "`
32541 if test "x$has_space" != x; then
32542 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32543 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32544 fi
32545 as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32546 fi
32547 fi
32548
32549 # Now join together the path and the arguments once again
32550 if test "x$arguments" != xEOL; then
32551 new_complete="$new_path ${arguments% *}"
32552 else
32553 new_complete="$new_path"
32554 fi
32555
32556 if test "x$complete" != "x$new_complete"; then
32557 CXXCPP="$new_complete"
32558 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
32559 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
32560 fi
32561 fi
32562
32563
32564 #
32565 # Setup the linker (LD)
32566 #
32567 if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32568 # In the Microsoft toolchain we have a separate LD command "link".
32569 # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
32570 # a cygwin program for something completely different.
32571 # Extract the first word of "link", so it can be a program name with args.
32572 set dummy link; ac_word=$2
32573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32574 $as_echo_n "checking for $ac_word... " >&6; }
32575 if ${ac_cv_prog_LD+:} false; then :
32576 $as_echo_n "(cached) " >&6
32577 else
32578 if test -n "$LD"; then
32579 ac_cv_prog_LD="$LD" # Let the user override the test.
32580 else
32581 ac_prog_rejected=no
32582 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32583 for as_dir in $PATH
32584 do
32585 IFS=$as_save_IFS
32586 test -z "$as_dir" && as_dir=.
32587 for ac_exec_ext in '' $ac_executable_extensions; do
32588 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32589 if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
32590 ac_prog_rejected=yes
32591 continue
32592 fi
32593 ac_cv_prog_LD="link"
32594 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32595 break 2
32596 fi
32597 done
32598 done
32599 IFS=$as_save_IFS
32600
32601 if test $ac_prog_rejected = yes; then
32602 # We found a bogon in the path, so make sure we never use it.
32603 set dummy $ac_cv_prog_LD
32604 shift
32605 if test $# != 0; then
32606 # We chose a different compiler from the bogus one.
32607 # However, it has the same basename, so the bogon will be chosen
32608 # first if we set LD to just the basename; use the full file name.
32609 shift
32610 ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
32611 fi
32612 fi
32613 fi
32614 fi
32615 LD=$ac_cv_prog_LD
32616 if test -n "$LD"; then
32617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
32618 $as_echo "$LD" >&6; }
32619 else
32620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32621 $as_echo "no" >&6; }
32622 fi
32623
32624
32625
32626 # Only process if variable expands to non-empty
32627
32628 if test "x$LD" != x; then
32629 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32630
32631 # First separate the path from the arguments. This will split at the first
32632 # space.
32633 complete="$LD"
32634 path="${complete%% *}"
32635 tmp="$complete EOL"
32636 arguments="${tmp#* }"
32637
32638 # Input might be given as Windows format, start by converting to
32639 # unix format.
32640 new_path=`$CYGPATH -u "$path"`
32641
32642 # Now try to locate executable using which
32643 new_path=`$WHICH "$new_path" 2> /dev/null`
32644 # bat and cmd files are not always considered executable in cygwin causing which
32645 # to not find them
32646 if test "x$new_path" = x \
32647 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32648 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32649 new_path=`$CYGPATH -u "$path"`
32650 fi
32651 if test "x$new_path" = x; then
32652 # Oops. Which didn't find the executable.
32653 # The splitting of arguments from the executable at a space might have been incorrect,
32654 # since paths with space are more likely in Windows. Give it another try with the whole
32655 # argument.
32656 path="$complete"
32657 arguments="EOL"
32658 new_path=`$CYGPATH -u "$path"`
32659 new_path=`$WHICH "$new_path" 2> /dev/null`
32660 # bat and cmd files are not always considered executable in cygwin causing which
32661 # to not find them
32662 if test "x$new_path" = x \
32663 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32664 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32665 new_path=`$CYGPATH -u "$path"`
32666 fi
32667 if test "x$new_path" = x; then
32668 # It's still not found. Now this is an unrecoverable error.
32669 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32670 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32671 has_space=`$ECHO "$complete" | $GREP " "`
32672 if test "x$has_space" != x; then
32673 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32674 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32675 fi
32676 as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32677 fi
32678 fi
32679
32680 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32681 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32682 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32683 # "foo.exe" is OK but "foo" is an error.
32684 #
32685 # This test is therefore slightly more accurate than "test -f" to check for file presence.
32686 # It is also a way to make sure we got the proper file name for the real test later on.
32687 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32688 if test "x$test_shortpath" = x; then
32689 # Short path failed, file does not exist as specified.
32690 # Try adding .exe or .cmd
32691 if test -f "${new_path}.exe"; then
32692 input_to_shortpath="${new_path}.exe"
32693 elif test -f "${new_path}.cmd"; then
32694 input_to_shortpath="${new_path}.cmd"
32695 else
32696 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
32697 $as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
32698 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32699 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32700 as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32701 fi
32702 else
32703 input_to_shortpath="$new_path"
32704 fi
32705
32706 # Call helper function which possibly converts this using DOS-style short mode.
32707 # If so, the updated path is stored in $new_path.
32708 new_path="$input_to_shortpath"
32709
32710 input_path="$input_to_shortpath"
32711 # Check if we need to convert this using DOS-style short mode. If the path
32712 # contains just simple characters, use it. Otherwise (spaces, weird characters),
32713 # take no chances and rewrite it.
32714 # Note: m4 eats our [], so we need to use [ and ] instead.
32715 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32716 if test "x$has_forbidden_chars" != x; then
32717 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32718 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32719 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32720 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32721 # Going to short mode and back again did indeed matter. Since short mode is
32722 # case insensitive, let's make it lowercase to improve readability.
32723 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32724 # Now convert it back to Unix-style (cygpath)
32725 input_path=`$CYGPATH -u "$shortmode_path"`
32726 new_path="$input_path"
32727 fi
32728 fi
32729
32730 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32731 if test "x$test_cygdrive_prefix" = x; then
32732 # As a simple fix, exclude /usr/bin since it's not a real path.
32733 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32734 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32735 # a path prefixed by /cygdrive for fixpath to work.
32736 new_path="$CYGWIN_ROOT_PATH$input_path"
32737 fi
32738 fi
32739
32740 # remove trailing .exe if any
32741 new_path="${new_path/%.exe/}"
32742
32743 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32744
32745 # First separate the path from the arguments. This will split at the first
32746 # space.
32747 complete="$LD"
32748 path="${complete%% *}"
32749 tmp="$complete EOL"
32750 arguments="${tmp#* }"
32751
32752 # Input might be given as Windows format, start by converting to
32753 # unix format.
32754 new_path="$path"
32755
32756 windows_path="$new_path"
32757 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32758 unix_path=`$CYGPATH -u "$windows_path"`
32759 new_path="$unix_path"
32760 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32761 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32762 new_path="$unix_path"
32763 fi
32764
32765
32766 # Now try to locate executable using which
32767 new_path=`$WHICH "$new_path" 2> /dev/null`
32768
32769 if test "x$new_path" = x; then
32770 # Oops. Which didn't find the executable.
32771 # The splitting of arguments from the executable at a space might have been incorrect,
32772 # since paths with space are more likely in Windows. Give it another try with the whole
32773 # argument.
32774 path="$complete"
32775 arguments="EOL"
32776 new_path="$path"
32777
32778 windows_path="$new_path"
32779 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32780 unix_path=`$CYGPATH -u "$windows_path"`
32781 new_path="$unix_path"
32782 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32783 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32784 new_path="$unix_path"
32785 fi
32786
32787
32788 new_path=`$WHICH "$new_path" 2> /dev/null`
32789 # bat and cmd files are not always considered executable in MSYS causing which
32790 # to not find them
32791 if test "x$new_path" = x \
32792 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32793 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32794 new_path="$path"
32795
32796 windows_path="$new_path"
32797 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32798 unix_path=`$CYGPATH -u "$windows_path"`
32799 new_path="$unix_path"
32800 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32801 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32802 new_path="$unix_path"
32803 fi
32804
32805 fi
32806
32807 if test "x$new_path" = x; then
32808 # It's still not found. Now this is an unrecoverable error.
32809 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32810 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32811 has_space=`$ECHO "$complete" | $GREP " "`
32812 if test "x$has_space" != x; then
32813 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32814 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32815 fi
32816 as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32817 fi
32818 fi
32819
32820 # Now new_path has a complete unix path to the binary
32821 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32822 # Keep paths in /bin as-is, but remove trailing .exe if any
32823 new_path="${new_path/%.exe/}"
32824 # Do not save /bin paths to all_fixpath_prefixes!
32825 else
32826 # Not in mixed or Windows style, start by that.
32827 new_path=`cmd //c echo $new_path`
32828
32829 input_path="$new_path"
32830 # Check if we need to convert this using DOS-style short mode. If the path
32831 # contains just simple characters, use it. Otherwise (spaces, weird characters),
32832 # take no chances and rewrite it.
32833 # Note: m4 eats our [], so we need to use [ and ] instead.
32834 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32835 if test "x$has_forbidden_chars" != x; then
32836 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32837 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32838 fi
32839
32840 # Output is in $new_path
32841
32842 windows_path="$new_path"
32843 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32844 unix_path=`$CYGPATH -u "$windows_path"`
32845 new_path="$unix_path"
32846 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32847 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32848 new_path="$unix_path"
32849 fi
32850
32851 # remove trailing .exe if any
32852 new_path="${new_path/%.exe/}"
32853
32854 # Save the first 10 bytes of this path to the storage, so fixpath can work.
32855 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32856 fi
32857
32858 else
32859 # We're on a unix platform. Hooray! :)
32860 # First separate the path from the arguments. This will split at the first
32861 # space.
32862 complete="$LD"
32863 path="${complete%% *}"
32864 tmp="$complete EOL"
32865 arguments="${tmp#* }"
32866
32867 # Cannot rely on the command "which" here since it doesn't always work.
32868 is_absolute_path=`$ECHO "$path" | $GREP ^/`
32869 if test -z "$is_absolute_path"; then
32870 # Path to executable is not absolute. Find it.
32871 IFS_save="$IFS"
32872 IFS=:
32873 for p in $PATH; do
32874 if test -f "$p/$path" && test -x "$p/$path"; then
32875 new_path="$p/$path"
32876 break
32877 fi
32878 done
32879 IFS="$IFS_save"
32880 else
32881 # This is an absolute path, we can use it without further modifications.
32882 new_path="$path"
32883 fi
32884
32885 if test "x$new_path" = x; then
32886 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32887 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32888 has_space=`$ECHO "$complete" | $GREP " "`
32889 if test "x$has_space" != x; then
32890 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32891 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32892 fi
32893 as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32894 fi
32895 fi
32896
32897 # Now join together the path and the arguments once again
32898 if test "x$arguments" != xEOL; then
32899 new_complete="$new_path ${arguments% *}"
32900 else
32901 new_complete="$new_path"
32902 fi
32903
32904 if test "x$complete" != "x$new_complete"; then
32905 LD="$new_complete"
32906 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
32907 $as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
32908 fi
32909 fi
32910
32911 # Verify that we indeed succeeded with this trick.
32912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
32913 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
32914 "$LD" --version > /dev/null
32915 if test $? -eq 0 ; then
32916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32917 $as_echo "no" >&6; }
32918 as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
32919 else
32920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32921 $as_echo "yes" >&6; }
32922 fi
32923 LDCXX="$LD"
32924 else
32925 # All other toolchains use the compiler to link.
32926 LD="$CC"
32927 LDCXX="$CXX"
32928 fi
32929
32930 # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
32931
32932
32933 #
32934 # Setup the assembler (AS)
32935 #
32936 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32937 # FIXME: should this really be solaris, or solstudio?
32938
32939
32940 # Publish this variable in the help.
32941
32942
32943 if test "x$AS" = x; then
32944 # The variable is not set by user, try to locate tool using the code snippet
32945 for ac_prog in as
32946 do
32947 # Extract the first word of "$ac_prog", so it can be a program name with args.
32948 set dummy $ac_prog; ac_word=$2
32949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32950 $as_echo_n "checking for $ac_word... " >&6; }
32951 if ${ac_cv_path_AS+:} false; then :
32952 $as_echo_n "(cached) " >&6
32953 else
32954 case $AS in
32955 [\\/]* | ?:[\\/]*)
32956 ac_cv_path_AS="$AS" # Let the user override the test with a path.
32957 ;;
32958 *)
32959 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32960 for as_dir in $PATH
32961 do
32962 IFS=$as_save_IFS
32963 test -z "$as_dir" && as_dir=.
32964 for ac_exec_ext in '' $ac_executable_extensions; do
32965 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32966 ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32967 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32968 break 2
32969 fi
32970 done
32971 done
32972 IFS=$as_save_IFS
32973
32974 ;;
32975 esac
32976 fi
32977 AS=$ac_cv_path_AS
32978 if test -n "$AS"; then
32979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32980 $as_echo "$AS" >&6; }
32981 else
32982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32983 $as_echo "no" >&6; }
32984 fi
32985
32986
32987 test -n "$AS" && break
32988 done
32989
32990 else
32991 # The variable is set, but is it from the command line or the environment?
32992
32993 # Try to remove the string !AS! from our list.
32994 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
32995 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32996 # If it failed, the variable was not from the command line. Ignore it,
32997 # but warn the user (except for BASH, which is always set by the calling BASH).
32998 if test "xAS" != xBASH; then
32999 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
33000 $as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
33001 fi
33002 # Try to locate tool using the code snippet
33003 for ac_prog in as
33004 do
33005 # Extract the first word of "$ac_prog", so it can be a program name with args.
33006 set dummy $ac_prog; ac_word=$2
33007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33008 $as_echo_n "checking for $ac_word... " >&6; }
33009 if ${ac_cv_path_AS+:} false; then :
33010 $as_echo_n "(cached) " >&6
33011 else
33012 case $AS in
33013 [\\/]* | ?:[\\/]*)
33014 ac_cv_path_AS="$AS" # Let the user override the test with a path.
33015 ;;
33016 *)
33017 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33018 for as_dir in $PATH
33019 do
33020 IFS=$as_save_IFS
33021 test -z "$as_dir" && as_dir=.
33022 for ac_exec_ext in '' $ac_executable_extensions; do
33023 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33024 ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
33025 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33026 break 2
33027 fi
33028 done
33029 done
33030 IFS=$as_save_IFS
33031
33032 ;;
33033 esac
33034 fi
33035 AS=$ac_cv_path_AS
33036 if test -n "$AS"; then
33037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
33038 $as_echo "$AS" >&6; }
33039 else
33040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33041 $as_echo "no" >&6; }
33042 fi
33043
33044
33045 test -n "$AS" && break
33046 done
33047
33048 else
33049 # If it succeeded, then it was overridden by the user. We will use it
33050 # for the tool.
33051
33052 # First remove it from the list of overridden variables, so we can test
33053 # for unknown variables in the end.
33054 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33055
33056 # Check if the provided tool contains a complete path.
33057 tool_specified="$AS"
33058 tool_basename="${tool_specified##*/}"
33059 if test "x$tool_basename" = "x$tool_specified"; then
33060 # A command without a complete path is provided, search $PATH.
33061 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
33062 $as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
33063 # Extract the first word of "$tool_basename", so it can be a program name with args.
33064 set dummy $tool_basename; ac_word=$2
33065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33066 $as_echo_n "checking for $ac_word... " >&6; }
33067 if ${ac_cv_path_AS+:} false; then :
33068 $as_echo_n "(cached) " >&6
33069 else
33070 case $AS in
33071 [\\/]* | ?:[\\/]*)
33072 ac_cv_path_AS="$AS" # Let the user override the test with a path.
33073 ;;
33074 *)
33075 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33076 for as_dir in $PATH
33077 do
33078 IFS=$as_save_IFS
33079 test -z "$as_dir" && as_dir=.
33080 for ac_exec_ext in '' $ac_executable_extensions; do
33081 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33082 ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
33083 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33084 break 2
33085 fi
33086 done
33087 done
33088 IFS=$as_save_IFS
33089
33090 ;;
33091 esac
33092 fi
33093 AS=$ac_cv_path_AS
33094 if test -n "$AS"; then
33095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
33096 $as_echo "$AS" >&6; }
33097 else
33098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33099 $as_echo "no" >&6; }
33100 fi
33101
33102
33103 if test "x$AS" = x; then
33104 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33105 fi
33106 else
33107 # Otherwise we believe it is a complete path. Use it as it is.
33108 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
33109 $as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
33110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
33111 $as_echo_n "checking for AS... " >&6; }
33112 if test ! -x "$tool_specified"; then
33113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33114 $as_echo "not found" >&6; }
33115 as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
33116 fi
33117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33118 $as_echo "$tool_specified" >&6; }
33119 fi
33120 fi
33121 fi
33122
33123
33124
33125 # Only process if variable expands to non-empty
33126
33127 if test "x$AS" != x; then
33128 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33129
33130 # First separate the path from the arguments. This will split at the first
33131 # space.
33132 complete="$AS"
33133 path="${complete%% *}"
33134 tmp="$complete EOL"
33135 arguments="${tmp#* }"
33136
33137 # Input might be given as Windows format, start by converting to
33138 # unix format.
33139 new_path=`$CYGPATH -u "$path"`
33140
33141 # Now try to locate executable using which
33142 new_path=`$WHICH "$new_path" 2> /dev/null`
33143 # bat and cmd files are not always considered executable in cygwin causing which
33144 # to not find them
33145 if test "x$new_path" = x \
33146 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33147 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33148 new_path=`$CYGPATH -u "$path"`
33149 fi
33150 if test "x$new_path" = x; then
33151 # Oops. Which didn't find the executable.
33152 # The splitting of arguments from the executable at a space might have been incorrect,
33153 # since paths with space are more likely in Windows. Give it another try with the whole
33154 # argument.
33155 path="$complete"
33156 arguments="EOL"
33157 new_path=`$CYGPATH -u "$path"`
33158 new_path=`$WHICH "$new_path" 2> /dev/null`
33159 # bat and cmd files are not always considered executable in cygwin causing which
33160 # to not find them
33161 if test "x$new_path" = x \
33162 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33163 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33164 new_path=`$CYGPATH -u "$path"`
33165 fi
33166 if test "x$new_path" = x; then
33167 # It's still not found. Now this is an unrecoverable error.
33168 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
33169 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
33170 has_space=`$ECHO "$complete" | $GREP " "`
33171 if test "x$has_space" != x; then
33172 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33173 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33174 fi
33175 as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33176 fi
33177 fi
33178
33179 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33180 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33181 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33182 # "foo.exe" is OK but "foo" is an error.
33183 #
33184 # This test is therefore slightly more accurate than "test -f" to check for file presence.
33185 # It is also a way to make sure we got the proper file name for the real test later on.
33186 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33187 if test "x$test_shortpath" = x; then
33188 # Short path failed, file does not exist as specified.
33189 # Try adding .exe or .cmd
33190 if test -f "${new_path}.exe"; then
33191 input_to_shortpath="${new_path}.exe"
33192 elif test -f "${new_path}.cmd"; then
33193 input_to_shortpath="${new_path}.cmd"
33194 else
33195 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
33196 $as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
33197 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33198 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33199 as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33200 fi
33201 else
33202 input_to_shortpath="$new_path"
33203 fi
33204
33205 # Call helper function which possibly converts this using DOS-style short mode.
33206 # If so, the updated path is stored in $new_path.
33207 new_path="$input_to_shortpath"
33208
33209 input_path="$input_to_shortpath"
33210 # Check if we need to convert this using DOS-style short mode. If the path
33211 # contains just simple characters, use it. Otherwise (spaces, weird characters),
33212 # take no chances and rewrite it.
33213 # Note: m4 eats our [], so we need to use [ and ] instead.
33214 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33215 if test "x$has_forbidden_chars" != x; then
33216 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33217 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33218 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33219 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33220 # Going to short mode and back again did indeed matter. Since short mode is
33221 # case insensitive, let's make it lowercase to improve readability.
33222 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33223 # Now convert it back to Unix-style (cygpath)
33224 input_path=`$CYGPATH -u "$shortmode_path"`
33225 new_path="$input_path"
33226 fi
33227 fi
33228
33229 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33230 if test "x$test_cygdrive_prefix" = x; then
33231 # As a simple fix, exclude /usr/bin since it's not a real path.
33232 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33233 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33234 # a path prefixed by /cygdrive for fixpath to work.
33235 new_path="$CYGWIN_ROOT_PATH$input_path"
33236 fi
33237 fi
33238
33239 # remove trailing .exe if any
33240 new_path="${new_path/%.exe/}"
33241
33242 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33243
33244 # First separate the path from the arguments. This will split at the first
33245 # space.
33246 complete="$AS"
33247 path="${complete%% *}"
33248 tmp="$complete EOL"
33249 arguments="${tmp#* }"
33250
33251 # Input might be given as Windows format, start by converting to
33252 # unix format.
33253 new_path="$path"
33254
33255 windows_path="$new_path"
33256 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33257 unix_path=`$CYGPATH -u "$windows_path"`
33258 new_path="$unix_path"
33259 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33260 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33261 new_path="$unix_path"
33262 fi
33263
33264
33265 # Now try to locate executable using which
33266 new_path=`$WHICH "$new_path" 2> /dev/null`
33267
33268 if test "x$new_path" = x; then
33269 # Oops. Which didn't find the executable.
33270 # The splitting of arguments from the executable at a space might have been incorrect,
33271 # since paths with space are more likely in Windows. Give it another try with the whole
33272 # argument.
33273 path="$complete"
33274 arguments="EOL"
33275 new_path="$path"
33276
33277 windows_path="$new_path"
33278 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33279 unix_path=`$CYGPATH -u "$windows_path"`
33280 new_path="$unix_path"
33281 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33282 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33283 new_path="$unix_path"
33284 fi
33285
33286
33287 new_path=`$WHICH "$new_path" 2> /dev/null`
33288 # bat and cmd files are not always considered executable in MSYS causing which
33289 # to not find them
33290 if test "x$new_path" = x \
33291 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33292 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33293 new_path="$path"
33294
33295 windows_path="$new_path"
33296 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33297 unix_path=`$CYGPATH -u "$windows_path"`
33298 new_path="$unix_path"
33299 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33300 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33301 new_path="$unix_path"
33302 fi
33303
33304 fi
33305
33306 if test "x$new_path" = x; then
33307 # It's still not found. Now this is an unrecoverable error.
33308 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
33309 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
33310 has_space=`$ECHO "$complete" | $GREP " "`
33311 if test "x$has_space" != x; then
33312 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33313 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33314 fi
33315 as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33316 fi
33317 fi
33318
33319 # Now new_path has a complete unix path to the binary
33320 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33321 # Keep paths in /bin as-is, but remove trailing .exe if any
33322 new_path="${new_path/%.exe/}"
33323 # Do not save /bin paths to all_fixpath_prefixes!
33324 else
33325 # Not in mixed or Windows style, start by that.
33326 new_path=`cmd //c echo $new_path`
33327
33328 input_path="$new_path"
33329 # Check if we need to convert this using DOS-style short mode. If the path
33330 # contains just simple characters, use it. Otherwise (spaces, weird characters),
33331 # take no chances and rewrite it.
33332 # Note: m4 eats our [], so we need to use [ and ] instead.
33333 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33334 if test "x$has_forbidden_chars" != x; then
33335 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33336 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33337 fi
33338
33339 # Output is in $new_path
33340
33341 windows_path="$new_path"
33342 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33343 unix_path=`$CYGPATH -u "$windows_path"`
33344 new_path="$unix_path"
33345 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33346 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33347 new_path="$unix_path"
33348 fi
33349
33350 # remove trailing .exe if any
33351 new_path="${new_path/%.exe/}"
33352
33353 # Save the first 10 bytes of this path to the storage, so fixpath can work.
33354 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33355 fi
33356
33357 else
33358 # We're on a unix platform. Hooray! :)
33359 # First separate the path from the arguments. This will split at the first
33360 # space.
33361 complete="$AS"
33362 path="${complete%% *}"
33363 tmp="$complete EOL"
33364 arguments="${tmp#* }"
33365
33366 # Cannot rely on the command "which" here since it doesn't always work.
33367 is_absolute_path=`$ECHO "$path" | $GREP ^/`
33368 if test -z "$is_absolute_path"; then
33369 # Path to executable is not absolute. Find it.
33370 IFS_save="$IFS"
33371 IFS=:
33372 for p in $PATH; do
33373 if test -f "$p/$path" && test -x "$p/$path"; then
33374 new_path="$p/$path"
33375 break
33376 fi
33377 done
33378 IFS="$IFS_save"
33379 else
33380 # This is an absolute path, we can use it without further modifications.
33381 new_path="$path"
33382 fi
33383
33384 if test "x$new_path" = x; then
33385 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
33386 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
33387 has_space=`$ECHO "$complete" | $GREP " "`
33388 if test "x$has_space" != x; then
33389 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33390 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33391 fi
33392 as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33393 fi
33394 fi
33395
33396 # Now join together the path and the arguments once again
33397 if test "x$arguments" != xEOL; then
33398 new_complete="$new_path ${arguments% *}"
33399 else
33400 new_complete="$new_path"
33401 fi
33402
33403 if test "x$complete" != "x$new_complete"; then
33404 AS="$new_complete"
33405 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
33406 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
33407 fi
33408 fi
33409
33410 else
33411 # FIXME: is this correct for microsoft?
33412 AS="$CC -c"
33413 fi
33414
33415
33416 #
33417 # Setup the archiver (AR)
33418 #
33419 if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33420 # The corresponding ar tool is lib.exe (used to create static libraries)
33421 # Extract the first word of "lib", so it can be a program name with args.
33422 set dummy lib; ac_word=$2
33423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33424 $as_echo_n "checking for $ac_word... " >&6; }
33425 if ${ac_cv_prog_AR+:} false; then :
33426 $as_echo_n "(cached) " >&6
33427 else
33428 if test -n "$AR"; then
33429 ac_cv_prog_AR="$AR" # Let the user override the test.
33430 else
33431 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33432 for as_dir in $PATH
33433 do
33434 IFS=$as_save_IFS
33435 test -z "$as_dir" && as_dir=.
33436 for ac_exec_ext in '' $ac_executable_extensions; do
33437 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33438 ac_cv_prog_AR="lib"
33439 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33440 break 2
33441 fi
33442 done
33443 done
33444 IFS=$as_save_IFS
33445
33446 fi
33447 fi
33448 AR=$ac_cv_prog_AR
33449 if test -n "$AR"; then
33450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33451 $as_echo "$AR" >&6; }
33452 else
33453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33454 $as_echo "no" >&6; }
33455 fi
33456
33457
33458 else
33459
33460
33461 # Publish this variable in the help.
33462
33463
33464 if test "x$AR" = x; then
33465 # The variable is not set by user, try to locate tool using the code snippet
33466 if test -n "$ac_tool_prefix"; then
33467 for ac_prog in ar
33468 do
33469 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33470 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33472 $as_echo_n "checking for $ac_word... " >&6; }
33473 if ${ac_cv_prog_AR+:} false; then :
33474 $as_echo_n "(cached) " >&6
33475 else
33476 if test -n "$AR"; then
33477 ac_cv_prog_AR="$AR" # Let the user override the test.
33478 else
33479 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33480 for as_dir in $PATH
33481 do
33482 IFS=$as_save_IFS
33483 test -z "$as_dir" && as_dir=.
33484 for ac_exec_ext in '' $ac_executable_extensions; do
33485 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33486 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
33487 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33488 break 2
33489 fi
33490 done
33491 done
33492 IFS=$as_save_IFS
33493
33494 fi
33495 fi
33496 AR=$ac_cv_prog_AR
33497 if test -n "$AR"; then
33498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33499 $as_echo "$AR" >&6; }
33500 else
33501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33502 $as_echo "no" >&6; }
33503 fi
33504
33505
33506 test -n "$AR" && break
33507 done
33508 fi
33509 if test -z "$AR"; then
33510 ac_ct_AR=$AR
33511 for ac_prog in ar
33512 do
33513 # Extract the first word of "$ac_prog", so it can be a program name with args.
33514 set dummy $ac_prog; ac_word=$2
33515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33516 $as_echo_n "checking for $ac_word... " >&6; }
33517 if ${ac_cv_prog_ac_ct_AR+:} false; then :
33518 $as_echo_n "(cached) " >&6
33519 else
33520 if test -n "$ac_ct_AR"; then
33521 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
33522 else
33523 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33524 for as_dir in $PATH
33525 do
33526 IFS=$as_save_IFS
33527 test -z "$as_dir" && as_dir=.
33528 for ac_exec_ext in '' $ac_executable_extensions; do
33529 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33530 ac_cv_prog_ac_ct_AR="$ac_prog"
33531 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33532 break 2
33533 fi
33534 done
33535 done
33536 IFS=$as_save_IFS
33537
33538 fi
33539 fi
33540 ac_ct_AR=$ac_cv_prog_ac_ct_AR
33541 if test -n "$ac_ct_AR"; then
33542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
33543 $as_echo "$ac_ct_AR" >&6; }
33544 else
33545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33546 $as_echo "no" >&6; }
33547 fi
33548
33549
33550 test -n "$ac_ct_AR" && break
33551 done
33552
33553 if test "x$ac_ct_AR" = x; then
33554 AR=""
33555 else
33556 case $cross_compiling:$ac_tool_warned in
33557 yes:)
33558 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33559 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33560 ac_tool_warned=yes ;;
33561 esac
33562 AR=$ac_ct_AR
33563 fi
33564 fi
33565
33566 else
33567 # The variable is set, but is it from the command line or the environment?
33568
33569 # Try to remove the string !AR! from our list.
33570 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
33571 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33572 # If it failed, the variable was not from the command line. Ignore it,
33573 # but warn the user (except for BASH, which is always set by the calling BASH).
33574 if test "xAR" != xBASH; then
33575 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
33576 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
33577 fi
33578 # Try to locate tool using the code snippet
33579 if test -n "$ac_tool_prefix"; then
33580 for ac_prog in ar
33581 do
33582 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33583 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33585 $as_echo_n "checking for $ac_word... " >&6; }
33586 if ${ac_cv_prog_AR+:} false; then :
33587 $as_echo_n "(cached) " >&6
33588 else
33589 if test -n "$AR"; then
33590 ac_cv_prog_AR="$AR" # Let the user override the test.
33591 else
33592 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33593 for as_dir in $PATH
33594 do
33595 IFS=$as_save_IFS
33596 test -z "$as_dir" && as_dir=.
33597 for ac_exec_ext in '' $ac_executable_extensions; do
33598 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33599 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
33600 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33601 break 2
33602 fi
33603 done
33604 done
33605 IFS=$as_save_IFS
33606
33607 fi
33608 fi
33609 AR=$ac_cv_prog_AR
33610 if test -n "$AR"; then
33611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33612 $as_echo "$AR" >&6; }
33613 else
33614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33615 $as_echo "no" >&6; }
33616 fi
33617
33618
33619 test -n "$AR" && break
33620 done
33621 fi
33622 if test -z "$AR"; then
33623 ac_ct_AR=$AR
33624 for ac_prog in ar
33625 do
33626 # Extract the first word of "$ac_prog", so it can be a program name with args.
33627 set dummy $ac_prog; ac_word=$2
33628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33629 $as_echo_n "checking for $ac_word... " >&6; }
33630 if ${ac_cv_prog_ac_ct_AR+:} false; then :
33631 $as_echo_n "(cached) " >&6
33632 else
33633 if test -n "$ac_ct_AR"; then
33634 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
33635 else
33636 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33637 for as_dir in $PATH
33638 do
33639 IFS=$as_save_IFS
33640 test -z "$as_dir" && as_dir=.
33641 for ac_exec_ext in '' $ac_executable_extensions; do
33642 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33643 ac_cv_prog_ac_ct_AR="$ac_prog"
33644 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33645 break 2
33646 fi
33647 done
33648 done
33649 IFS=$as_save_IFS
33650
33651 fi
33652 fi
33653 ac_ct_AR=$ac_cv_prog_ac_ct_AR
33654 if test -n "$ac_ct_AR"; then
33655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
33656 $as_echo "$ac_ct_AR" >&6; }
33657 else
33658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33659 $as_echo "no" >&6; }
33660 fi
33661
33662
33663 test -n "$ac_ct_AR" && break
33664 done
33665
33666 if test "x$ac_ct_AR" = x; then
33667 AR=""
33668 else
33669 case $cross_compiling:$ac_tool_warned in
33670 yes:)
33671 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33672 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33673 ac_tool_warned=yes ;;
33674 esac
33675 AR=$ac_ct_AR
33676 fi
33677 fi
33678
33679 else
33680 # If it succeeded, then it was overridden by the user. We will use it
33681 # for the tool.
33682
33683 # First remove it from the list of overridden variables, so we can test
33684 # for unknown variables in the end.
33685 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33686
33687 # Check if the provided tool contains a complete path.
33688 tool_specified="$AR"
33689 tool_basename="${tool_specified##*/}"
33690 if test "x$tool_basename" = "x$tool_specified"; then
33691 # A command without a complete path is provided, search $PATH.
33692 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
33693 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
33694 # Extract the first word of "$tool_basename", so it can be a program name with args.
33695 set dummy $tool_basename; ac_word=$2
33696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33697 $as_echo_n "checking for $ac_word... " >&6; }
33698 if ${ac_cv_path_AR+:} false; then :
33699 $as_echo_n "(cached) " >&6
33700 else
33701 case $AR in
33702 [\\/]* | ?:[\\/]*)
33703 ac_cv_path_AR="$AR" # Let the user override the test with a path.
33704 ;;
33705 *)
33706 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33707 for as_dir in $PATH
33708 do
33709 IFS=$as_save_IFS
33710 test -z "$as_dir" && as_dir=.
33711 for ac_exec_ext in '' $ac_executable_extensions; do
33712 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33713 ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
33714 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33715 break 2
33716 fi
33717 done
33718 done
33719 IFS=$as_save_IFS
33720
33721 ;;
33722 esac
33723 fi
33724 AR=$ac_cv_path_AR
33725 if test -n "$AR"; then
33726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33727 $as_echo "$AR" >&6; }
33728 else
33729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33730 $as_echo "no" >&6; }
33731 fi
33732
33733
33734 if test "x$AR" = x; then
33735 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33736 fi
33737 else
33738 # Otherwise we believe it is a complete path. Use it as it is.
33739 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
33740 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
33741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
33742 $as_echo_n "checking for AR... " >&6; }
33743 if test ! -x "$tool_specified"; then
33744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33745 $as_echo "not found" >&6; }
33746 as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
33747 fi
33748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33749 $as_echo "$tool_specified" >&6; }
33750 fi
33751 fi
33752 fi
33753
33754
33755 fi
33756
33757 # Only process if variable expands to non-empty
33758
33759 if test "x$AR" != x; then
33760 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33761
33762 # First separate the path from the arguments. This will split at the first
33763 # space.
33764 complete="$AR"
33765 path="${complete%% *}"
33766 tmp="$complete EOL"
33767 arguments="${tmp#* }"
33768
33769 # Input might be given as Windows format, start by converting to
33770 # unix format.
33771 new_path=`$CYGPATH -u "$path"`
33772
33773 # Now try to locate executable using which
33774 new_path=`$WHICH "$new_path" 2> /dev/null`
33775 # bat and cmd files are not always considered executable in cygwin causing which
33776 # to not find them
33777 if test "x$new_path" = x \
33778 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33779 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33780 new_path=`$CYGPATH -u "$path"`
33781 fi
33782 if test "x$new_path" = x; then
33783 # Oops. Which didn't find the executable.
33784 # The splitting of arguments from the executable at a space might have been incorrect,
33785 # since paths with space are more likely in Windows. Give it another try with the whole
33786 # argument.
33787 path="$complete"
33788 arguments="EOL"
33789 new_path=`$CYGPATH -u "$path"`
33790 new_path=`$WHICH "$new_path" 2> /dev/null`
33791 # bat and cmd files are not always considered executable in cygwin causing which
33792 # to not find them
33793 if test "x$new_path" = x \
33794 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33795 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33796 new_path=`$CYGPATH -u "$path"`
33797 fi
33798 if test "x$new_path" = x; then
33799 # It's still not found. Now this is an unrecoverable error.
33800 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33801 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33802 has_space=`$ECHO "$complete" | $GREP " "`
33803 if test "x$has_space" != x; then
33804 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33805 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33806 fi
33807 as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33808 fi
33809 fi
33810
33811 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33812 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33813 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33814 # "foo.exe" is OK but "foo" is an error.
33815 #
33816 # This test is therefore slightly more accurate than "test -f" to check for file presence.
33817 # It is also a way to make sure we got the proper file name for the real test later on.
33818 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33819 if test "x$test_shortpath" = x; then
33820 # Short path failed, file does not exist as specified.
33821 # Try adding .exe or .cmd
33822 if test -f "${new_path}.exe"; then
33823 input_to_shortpath="${new_path}.exe"
33824 elif test -f "${new_path}.cmd"; then
33825 input_to_shortpath="${new_path}.cmd"
33826 else
33827 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
33828 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
33829 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33830 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33831 as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33832 fi
33833 else
33834 input_to_shortpath="$new_path"
33835 fi
33836
33837 # Call helper function which possibly converts this using DOS-style short mode.
33838 # If so, the updated path is stored in $new_path.
33839 new_path="$input_to_shortpath"
33840
33841 input_path="$input_to_shortpath"
33842 # Check if we need to convert this using DOS-style short mode. If the path
33843 # contains just simple characters, use it. Otherwise (spaces, weird characters),
33844 # take no chances and rewrite it.
33845 # Note: m4 eats our [], so we need to use [ and ] instead.
33846 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33847 if test "x$has_forbidden_chars" != x; then
33848 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33849 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33850 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33851 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33852 # Going to short mode and back again did indeed matter. Since short mode is
33853 # case insensitive, let's make it lowercase to improve readability.
33854 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33855 # Now convert it back to Unix-style (cygpath)
33856 input_path=`$CYGPATH -u "$shortmode_path"`
33857 new_path="$input_path"
33858 fi
33859 fi
33860
33861 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33862 if test "x$test_cygdrive_prefix" = x; then
33863 # As a simple fix, exclude /usr/bin since it's not a real path.
33864 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33865 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33866 # a path prefixed by /cygdrive for fixpath to work.
33867 new_path="$CYGWIN_ROOT_PATH$input_path"
33868 fi
33869 fi
33870
33871 # remove trailing .exe if any
33872 new_path="${new_path/%.exe/}"
33873
33874 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33875
33876 # First separate the path from the arguments. This will split at the first
33877 # space.
33878 complete="$AR"
33879 path="${complete%% *}"
33880 tmp="$complete EOL"
33881 arguments="${tmp#* }"
33882
33883 # Input might be given as Windows format, start by converting to
33884 # unix format.
33885 new_path="$path"
33886
33887 windows_path="$new_path"
33888 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33889 unix_path=`$CYGPATH -u "$windows_path"`
33890 new_path="$unix_path"
33891 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33892 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33893 new_path="$unix_path"
33894 fi
33895
33896
33897 # Now try to locate executable using which
33898 new_path=`$WHICH "$new_path" 2> /dev/null`
33899
33900 if test "x$new_path" = x; then
33901 # Oops. Which didn't find the executable.
33902 # The splitting of arguments from the executable at a space might have been incorrect,
33903 # since paths with space are more likely in Windows. Give it another try with the whole
33904 # argument.
33905 path="$complete"
33906 arguments="EOL"
33907 new_path="$path"
33908
33909 windows_path="$new_path"
33910 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33911 unix_path=`$CYGPATH -u "$windows_path"`
33912 new_path="$unix_path"
33913 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33914 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33915 new_path="$unix_path"
33916 fi
33917
33918
33919 new_path=`$WHICH "$new_path" 2> /dev/null`
33920 # bat and cmd files are not always considered executable in MSYS causing which
33921 # to not find them
33922 if test "x$new_path" = x \
33923 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33924 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33925 new_path="$path"
33926
33927 windows_path="$new_path"
33928 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33929 unix_path=`$CYGPATH -u "$windows_path"`
33930 new_path="$unix_path"
33931 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33932 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33933 new_path="$unix_path"
33934 fi
33935
33936 fi
33937
33938 if test "x$new_path" = x; then
33939 # It's still not found. Now this is an unrecoverable error.
33940 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33941 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33942 has_space=`$ECHO "$complete" | $GREP " "`
33943 if test "x$has_space" != x; then
33944 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33945 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33946 fi
33947 as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33948 fi
33949 fi
33950
33951 # Now new_path has a complete unix path to the binary
33952 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33953 # Keep paths in /bin as-is, but remove trailing .exe if any
33954 new_path="${new_path/%.exe/}"
33955 # Do not save /bin paths to all_fixpath_prefixes!
33956 else
33957 # Not in mixed or Windows style, start by that.
33958 new_path=`cmd //c echo $new_path`
33959
33960 input_path="$new_path"
33961 # Check if we need to convert this using DOS-style short mode. If the path
33962 # contains just simple characters, use it. Otherwise (spaces, weird characters),
33963 # take no chances and rewrite it.
33964 # Note: m4 eats our [], so we need to use [ and ] instead.
33965 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33966 if test "x$has_forbidden_chars" != x; then
33967 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33968 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33969 fi
33970
33971 # Output is in $new_path
33972
33973 windows_path="$new_path"
33974 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33975 unix_path=`$CYGPATH -u "$windows_path"`
33976 new_path="$unix_path"
33977 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33978 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33979 new_path="$unix_path"
33980 fi
33981
33982 # remove trailing .exe if any
33983 new_path="${new_path/%.exe/}"
33984
33985 # Save the first 10 bytes of this path to the storage, so fixpath can work.
33986 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33987 fi
33988
33989 else
33990 # We're on a unix platform. Hooray! :)
33991 # First separate the path from the arguments. This will split at the first
33992 # space.
33993 complete="$AR"
33994 path="${complete%% *}"
33995 tmp="$complete EOL"
33996 arguments="${tmp#* }"
33997
33998 # Cannot rely on the command "which" here since it doesn't always work.
33999 is_absolute_path=`$ECHO "$path" | $GREP ^/`
34000 if test -z "$is_absolute_path"; then
34001 # Path to executable is not absolute. Find it.
34002 IFS_save="$IFS"
34003 IFS=:
34004 for p in $PATH; do
34005 if test -f "$p/$path" && test -x "$p/$path"; then
34006 new_path="$p/$path"
34007 break
34008 fi
34009 done
34010 IFS="$IFS_save"
34011 else
34012 # This is an absolute path, we can use it without further modifications.
34013 new_path="$path"
34014 fi
34015
34016 if test "x$new_path" = x; then
34017 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
34018 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
34019 has_space=`$ECHO "$complete" | $GREP " "`
34020 if test "x$has_space" != x; then
34021 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34022 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34023 fi
34024 as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
34025 fi
34026 fi
34027
34028 # Now join together the path and the arguments once again
34029 if test "x$arguments" != xEOL; then
34030 new_complete="$new_path ${arguments% *}"
34031 else
34032 new_complete="$new_path"
34033 fi
34034
34035 if test "x$complete" != "x$new_complete"; then
34036 AR="$new_complete"
34037 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
34038 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
34039 fi
34040 fi
34041
34042
34043
34044 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
34045
34046
34047 # Publish this variable in the help.
34048
34049
34050 if test "x$LIPO" = x; then
34051 # The variable is not set by user, try to locate tool using the code snippet
34052 for ac_prog in lipo
34053 do
34054 # Extract the first word of "$ac_prog", so it can be a program name with args.
34055 set dummy $ac_prog; ac_word=$2
34056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34057 $as_echo_n "checking for $ac_word... " >&6; }
34058 if ${ac_cv_path_LIPO+:} false; then :
34059 $as_echo_n "(cached) " >&6
34060 else
34061 case $LIPO in
34062 [\\/]* | ?:[\\/]*)
34063 ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
34064 ;;
34065 *)
34066 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34067 for as_dir in $PATH
34068 do
34069 IFS=$as_save_IFS
34070 test -z "$as_dir" && as_dir=.
34071 for ac_exec_ext in '' $ac_executable_extensions; do
34072 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34073 ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
34074 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34075 break 2
34076 fi
34077 done
34078 done
34079 IFS=$as_save_IFS
34080
34081 ;;
34082 esac
34083 fi
34084 LIPO=$ac_cv_path_LIPO
34085 if test -n "$LIPO"; then
34086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
34087 $as_echo "$LIPO" >&6; }
34088 else
34089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34090 $as_echo "no" >&6; }
34091 fi
34092
34093
34094 test -n "$LIPO" && break
34095 done
34096
34097 else
34098 # The variable is set, but is it from the command line or the environment?
34099
34100 # Try to remove the string !LIPO! from our list.
34101 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
34102 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
34103 # If it failed, the variable was not from the command line. Ignore it,
34104 # but warn the user (except for BASH, which is always set by the calling BASH).
34105 if test "xLIPO" != xBASH; then
34106 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
34107 $as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
34108 fi
34109 # Try to locate tool using the code snippet
34110 for ac_prog in lipo
34111 do
34112 # Extract the first word of "$ac_prog", so it can be a program name with args.
34113 set dummy $ac_prog; ac_word=$2
34114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34115 $as_echo_n "checking for $ac_word... " >&6; }
34116 if ${ac_cv_path_LIPO+:} false; then :
34117 $as_echo_n "(cached) " >&6
34118 else
34119 case $LIPO in
34120 [\\/]* | ?:[\\/]*)
34121 ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
34122 ;;
34123 *)
34124 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34125 for as_dir in $PATH
34126 do
34127 IFS=$as_save_IFS
34128 test -z "$as_dir" && as_dir=.
34129 for ac_exec_ext in '' $ac_executable_extensions; do
34130 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34131 ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
34132 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34133 break 2
34134 fi
34135 done
34136 done
34137 IFS=$as_save_IFS
34138
34139 ;;
34140 esac
34141 fi
34142 LIPO=$ac_cv_path_LIPO
34143 if test -n "$LIPO"; then
34144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
34145 $as_echo "$LIPO" >&6; }
34146 else
34147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34148 $as_echo "no" >&6; }
34149 fi
34150
34151
34152 test -n "$LIPO" && break
34153 done
34154
34155 else
34156 # If it succeeded, then it was overridden by the user. We will use it
34157 # for the tool.
34158
34159 # First remove it from the list of overridden variables, so we can test
34160 # for unknown variables in the end.
34161 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
34162
34163 # Check if the provided tool contains a complete path.
34164 tool_specified="$LIPO"
34165 tool_basename="${tool_specified##*/}"
34166 if test "x$tool_basename" = "x$tool_specified"; then
34167 # A command without a complete path is provided, search $PATH.
34168 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
34169 $as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
34170 # Extract the first word of "$tool_basename", so it can be a program name with args.
34171 set dummy $tool_basename; ac_word=$2
34172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34173 $as_echo_n "checking for $ac_word... " >&6; }
34174 if ${ac_cv_path_LIPO+:} false; then :
34175 $as_echo_n "(cached) " >&6
34176 else
34177 case $LIPO in
34178 [\\/]* | ?:[\\/]*)
34179 ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
34180 ;;
34181 *)
34182 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34183 for as_dir in $PATH
34184 do
34185 IFS=$as_save_IFS
34186 test -z "$as_dir" && as_dir=.
34187 for ac_exec_ext in '' $ac_executable_extensions; do
34188 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34189 ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
34190 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34191 break 2
34192 fi
34193 done
34194 done
34195 IFS=$as_save_IFS
34196
34197 ;;
34198 esac
34199 fi
34200 LIPO=$ac_cv_path_LIPO
34201 if test -n "$LIPO"; then
34202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
34203 $as_echo "$LIPO" >&6; }
34204 else
34205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34206 $as_echo "no" >&6; }
34207 fi
34208
34209
34210 if test "x$LIPO" = x; then
34211 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
34212 fi
34213 else
34214 # Otherwise we believe it is a complete path. Use it as it is.
34215 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
34216 $as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
34217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
34218 $as_echo_n "checking for LIPO... " >&6; }
34219 if test ! -x "$tool_specified"; then
34220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
34221 $as_echo "not found" >&6; }
34222 as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
34223 fi
34224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
34225 $as_echo "$tool_specified" >&6; }
34226 fi
34227 fi
34228 fi
34229
34230
34231
34232 # Only process if variable expands to non-empty
34233
34234 if test "x$LIPO" != x; then
34235 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34236
34237 # First separate the path from the arguments. This will split at the first
34238 # space.
34239 complete="$LIPO"
34240 path="${complete%% *}"
34241 tmp="$complete EOL"
34242 arguments="${tmp#* }"
34243
34244 # Input might be given as Windows format, start by converting to
34245 # unix format.
34246 new_path=`$CYGPATH -u "$path"`
34247
34248 # Now try to locate executable using which
34249 new_path=`$WHICH "$new_path" 2> /dev/null`
34250 # bat and cmd files are not always considered executable in cygwin causing which
34251 # to not find them
34252 if test "x$new_path" = x \
34253 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34254 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34255 new_path=`$CYGPATH -u "$path"`
34256 fi
34257 if test "x$new_path" = x; then
34258 # Oops. Which didn't find the executable.
34259 # The splitting of arguments from the executable at a space might have been incorrect,
34260 # since paths with space are more likely in Windows. Give it another try with the whole
34261 # argument.
34262 path="$complete"
34263 arguments="EOL"
34264 new_path=`$CYGPATH -u "$path"`
34265 new_path=`$WHICH "$new_path" 2> /dev/null`
34266 # bat and cmd files are not always considered executable in cygwin causing which
34267 # to not find them
34268 if test "x$new_path" = x \
34269 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34270 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34271 new_path=`$CYGPATH -u "$path"`
34272 fi
34273 if test "x$new_path" = x; then
34274 # It's still not found. Now this is an unrecoverable error.
34275 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34276 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34277 has_space=`$ECHO "$complete" | $GREP " "`
34278 if test "x$has_space" != x; then
34279 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34280 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34281 fi
34282 as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34283 fi
34284 fi
34285
34286 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34287 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34288 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34289 # "foo.exe" is OK but "foo" is an error.
34290 #
34291 # This test is therefore slightly more accurate than "test -f" to check for file presence.
34292 # It is also a way to make sure we got the proper file name for the real test later on.
34293 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34294 if test "x$test_shortpath" = x; then
34295 # Short path failed, file does not exist as specified.
34296 # Try adding .exe or .cmd
34297 if test -f "${new_path}.exe"; then
34298 input_to_shortpath="${new_path}.exe"
34299 elif test -f "${new_path}.cmd"; then
34300 input_to_shortpath="${new_path}.cmd"
34301 else
34302 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
34303 $as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
34304 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34305 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34306 as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34307 fi
34308 else
34309 input_to_shortpath="$new_path"
34310 fi
34311
34312 # Call helper function which possibly converts this using DOS-style short mode.
34313 # If so, the updated path is stored in $new_path.
34314 new_path="$input_to_shortpath"
34315
34316 input_path="$input_to_shortpath"
34317 # Check if we need to convert this using DOS-style short mode. If the path
34318 # contains just simple characters, use it. Otherwise (spaces, weird characters),
34319 # take no chances and rewrite it.
34320 # Note: m4 eats our [], so we need to use [ and ] instead.
34321 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34322 if test "x$has_forbidden_chars" != x; then
34323 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34324 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34325 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34326 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34327 # Going to short mode and back again did indeed matter. Since short mode is
34328 # case insensitive, let's make it lowercase to improve readability.
34329 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34330 # Now convert it back to Unix-style (cygpath)
34331 input_path=`$CYGPATH -u "$shortmode_path"`
34332 new_path="$input_path"
34333 fi
34334 fi
34335
34336 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34337 if test "x$test_cygdrive_prefix" = x; then
34338 # As a simple fix, exclude /usr/bin since it's not a real path.
34339 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34340 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34341 # a path prefixed by /cygdrive for fixpath to work.
34342 new_path="$CYGWIN_ROOT_PATH$input_path"
34343 fi
34344 fi
34345
34346 # remove trailing .exe if any
34347 new_path="${new_path/%.exe/}"
34348
34349 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34350
34351 # First separate the path from the arguments. This will split at the first
34352 # space.
34353 complete="$LIPO"
34354 path="${complete%% *}"
34355 tmp="$complete EOL"
34356 arguments="${tmp#* }"
34357
34358 # Input might be given as Windows format, start by converting to
34359 # unix format.
34360 new_path="$path"
34361
34362 windows_path="$new_path"
34363 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34364 unix_path=`$CYGPATH -u "$windows_path"`
34365 new_path="$unix_path"
34366 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34367 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34368 new_path="$unix_path"
34369 fi
34370
34371
34372 # Now try to locate executable using which
34373 new_path=`$WHICH "$new_path" 2> /dev/null`
34374
34375 if test "x$new_path" = x; then
34376 # Oops. Which didn't find the executable.
34377 # The splitting of arguments from the executable at a space might have been incorrect,
34378 # since paths with space are more likely in Windows. Give it another try with the whole
34379 # argument.
34380 path="$complete"
34381 arguments="EOL"
34382 new_path="$path"
34383
34384 windows_path="$new_path"
34385 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34386 unix_path=`$CYGPATH -u "$windows_path"`
34387 new_path="$unix_path"
34388 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34389 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34390 new_path="$unix_path"
34391 fi
34392
34393
34394 new_path=`$WHICH "$new_path" 2> /dev/null`
34395 # bat and cmd files are not always considered executable in MSYS causing which
34396 # to not find them
34397 if test "x$new_path" = x \
34398 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34399 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34400 new_path="$path"
34401
34402 windows_path="$new_path"
34403 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34404 unix_path=`$CYGPATH -u "$windows_path"`
34405 new_path="$unix_path"
34406 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34407 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34408 new_path="$unix_path"
34409 fi
34410
34411 fi
34412
34413 if test "x$new_path" = x; then
34414 # It's still not found. Now this is an unrecoverable error.
34415 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34416 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34417 has_space=`$ECHO "$complete" | $GREP " "`
34418 if test "x$has_space" != x; then
34419 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34420 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34421 fi
34422 as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34423 fi
34424 fi
34425
34426 # Now new_path has a complete unix path to the binary
34427 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34428 # Keep paths in /bin as-is, but remove trailing .exe if any
34429 new_path="${new_path/%.exe/}"
34430 # Do not save /bin paths to all_fixpath_prefixes!
34431 else
34432 # Not in mixed or Windows style, start by that.
34433 new_path=`cmd //c echo $new_path`
34434
34435 input_path="$new_path"
34436 # Check if we need to convert this using DOS-style short mode. If the path
34437 # contains just simple characters, use it. Otherwise (spaces, weird characters),
34438 # take no chances and rewrite it.
34439 # Note: m4 eats our [], so we need to use [ and ] instead.
34440 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34441 if test "x$has_forbidden_chars" != x; then
34442 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34443 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34444 fi
34445
34446 # Output is in $new_path
34447
34448 windows_path="$new_path"
34449 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34450 unix_path=`$CYGPATH -u "$windows_path"`
34451 new_path="$unix_path"
34452 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34453 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34454 new_path="$unix_path"
34455 fi
34456
34457 # remove trailing .exe if any
34458 new_path="${new_path/%.exe/}"
34459
34460 # Save the first 10 bytes of this path to the storage, so fixpath can work.
34461 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34462 fi
34463
34464 else
34465 # We're on a unix platform. Hooray! :)
34466 # First separate the path from the arguments. This will split at the first
34467 # space.
34468 complete="$LIPO"
34469 path="${complete%% *}"
34470 tmp="$complete EOL"
34471 arguments="${tmp#* }"
34472
34473 # Cannot rely on the command "which" here since it doesn't always work.
34474 is_absolute_path=`$ECHO "$path" | $GREP ^/`
34475 if test -z "$is_absolute_path"; then
34476 # Path to executable is not absolute. Find it.
34477 IFS_save="$IFS"
34478 IFS=:
34479 for p in $PATH; do
34480 if test -f "$p/$path" && test -x "$p/$path"; then
34481 new_path="$p/$path"
34482 break
34483 fi
34484 done
34485 IFS="$IFS_save"
34486 else
34487 # This is an absolute path, we can use it without further modifications.
34488 new_path="$path"
34489 fi
34490
34491 if test "x$new_path" = x; then
34492 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34493 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34494 has_space=`$ECHO "$complete" | $GREP " "`
34495 if test "x$has_space" != x; then
34496 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34497 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34498 fi
34499 as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34500 fi
34501 fi
34502
34503 # Now join together the path and the arguments once again
34504 if test "x$arguments" != xEOL; then
34505 new_complete="$new_path ${arguments% *}"
34506 else
34507 new_complete="$new_path"
34508 fi
34509
34510 if test "x$complete" != "x$new_complete"; then
34511 LIPO="$new_complete"
34512 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
34513 $as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
34514 fi
34515 fi
34516
34517 fi
34518
34519 if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34520 # Extract the first word of "mt", so it can be a program name with args.
34521 set dummy mt; ac_word=$2
34522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34523 $as_echo_n "checking for $ac_word... " >&6; }
34524 if ${ac_cv_prog_MT+:} false; then :
34525 $as_echo_n "(cached) " >&6
34526 else
34527 if test -n "$MT"; then
34528 ac_cv_prog_MT="$MT" # Let the user override the test.
34529 else
34530 ac_prog_rejected=no
34531 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34532 for as_dir in $PATH
34533 do
34534 IFS=$as_save_IFS
34535 test -z "$as_dir" && as_dir=.
34536 for ac_exec_ext in '' $ac_executable_extensions; do
34537 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34538 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
34539 ac_prog_rejected=yes
34540 continue
34541 fi
34542 ac_cv_prog_MT="mt"
34543 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34544 break 2
34545 fi
34546 done
34547 done
34548 IFS=$as_save_IFS
34549
34550 if test $ac_prog_rejected = yes; then
34551 # We found a bogon in the path, so make sure we never use it.
34552 set dummy $ac_cv_prog_MT
34553 shift
34554 if test $# != 0; then
34555 # We chose a different compiler from the bogus one.
34556 # However, it has the same basename, so the bogon will be chosen
34557 # first if we set MT to just the basename; use the full file name.
34558 shift
34559 ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
34560 fi
34561 fi
34562 fi
34563 fi
34564 MT=$ac_cv_prog_MT
34565 if test -n "$MT"; then
34566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
34567 $as_echo "$MT" >&6; }
34568 else
34569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34570 $as_echo "no" >&6; }
34571 fi
34572
34573
34574
34575 # Only process if variable expands to non-empty
34576
34577 if test "x$MT" != x; then
34578 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34579
34580 # First separate the path from the arguments. This will split at the first
34581 # space.
34582 complete="$MT"
34583 path="${complete%% *}"
34584 tmp="$complete EOL"
34585 arguments="${tmp#* }"
34586
34587 # Input might be given as Windows format, start by converting to
34588 # unix format.
34589 new_path=`$CYGPATH -u "$path"`
34590
34591 # Now try to locate executable using which
34592 new_path=`$WHICH "$new_path" 2> /dev/null`
34593 # bat and cmd files are not always considered executable in cygwin causing which
34594 # to not find them
34595 if test "x$new_path" = x \
34596 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34597 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34598 new_path=`$CYGPATH -u "$path"`
34599 fi
34600 if test "x$new_path" = x; then
34601 # Oops. Which didn't find the executable.
34602 # The splitting of arguments from the executable at a space might have been incorrect,
34603 # since paths with space are more likely in Windows. Give it another try with the whole
34604 # argument.
34605 path="$complete"
34606 arguments="EOL"
34607 new_path=`$CYGPATH -u "$path"`
34608 new_path=`$WHICH "$new_path" 2> /dev/null`
34609 # bat and cmd files are not always considered executable in cygwin causing which
34610 # to not find them
34611 if test "x$new_path" = x \
34612 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34613 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34614 new_path=`$CYGPATH -u "$path"`
34615 fi
34616 if test "x$new_path" = x; then
34617 # It's still not found. Now this is an unrecoverable error.
34618 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34619 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34620 has_space=`$ECHO "$complete" | $GREP " "`
34621 if test "x$has_space" != x; then
34622 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34623 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34624 fi
34625 as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34626 fi
34627 fi
34628
34629 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34630 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34631 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34632 # "foo.exe" is OK but "foo" is an error.
34633 #
34634 # This test is therefore slightly more accurate than "test -f" to check for file presence.
34635 # It is also a way to make sure we got the proper file name for the real test later on.
34636 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34637 if test "x$test_shortpath" = x; then
34638 # Short path failed, file does not exist as specified.
34639 # Try adding .exe or .cmd
34640 if test -f "${new_path}.exe"; then
34641 input_to_shortpath="${new_path}.exe"
34642 elif test -f "${new_path}.cmd"; then
34643 input_to_shortpath="${new_path}.cmd"
34644 else
34645 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
34646 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
34647 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34648 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34649 as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34650 fi
34651 else
34652 input_to_shortpath="$new_path"
34653 fi
34654
34655 # Call helper function which possibly converts this using DOS-style short mode.
34656 # If so, the updated path is stored in $new_path.
34657 new_path="$input_to_shortpath"
34658
34659 input_path="$input_to_shortpath"
34660 # Check if we need to convert this using DOS-style short mode. If the path
34661 # contains just simple characters, use it. Otherwise (spaces, weird characters),
34662 # take no chances and rewrite it.
34663 # Note: m4 eats our [], so we need to use [ and ] instead.
34664 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34665 if test "x$has_forbidden_chars" != x; then
34666 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34667 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34668 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34669 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34670 # Going to short mode and back again did indeed matter. Since short mode is
34671 # case insensitive, let's make it lowercase to improve readability.
34672 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34673 # Now convert it back to Unix-style (cygpath)
34674 input_path=`$CYGPATH -u "$shortmode_path"`
34675 new_path="$input_path"
34676 fi
34677 fi
34678
34679 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34680 if test "x$test_cygdrive_prefix" = x; then
34681 # As a simple fix, exclude /usr/bin since it's not a real path.
34682 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34683 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34684 # a path prefixed by /cygdrive for fixpath to work.
34685 new_path="$CYGWIN_ROOT_PATH$input_path"
34686 fi
34687 fi
34688
34689 # remove trailing .exe if any
34690 new_path="${new_path/%.exe/}"
34691
34692 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34693
34694 # First separate the path from the arguments. This will split at the first
34695 # space.
34696 complete="$MT"
34697 path="${complete%% *}"
34698 tmp="$complete EOL"
34699 arguments="${tmp#* }"
34700
34701 # Input might be given as Windows format, start by converting to
34702 # unix format.
34703 new_path="$path"
34704
34705 windows_path="$new_path"
34706 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34707 unix_path=`$CYGPATH -u "$windows_path"`
34708 new_path="$unix_path"
34709 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34710 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34711 new_path="$unix_path"
34712 fi
34713
34714
34715 # Now try to locate executable using which
34716 new_path=`$WHICH "$new_path" 2> /dev/null`
34717
34718 if test "x$new_path" = x; then
34719 # Oops. Which didn't find the executable.
34720 # The splitting of arguments from the executable at a space might have been incorrect,
34721 # since paths with space are more likely in Windows. Give it another try with the whole
34722 # argument.
34723 path="$complete"
34724 arguments="EOL"
34725 new_path="$path"
34726
34727 windows_path="$new_path"
34728 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34729 unix_path=`$CYGPATH -u "$windows_path"`
34730 new_path="$unix_path"
34731 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34732 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34733 new_path="$unix_path"
34734 fi
34735
34736
34737 new_path=`$WHICH "$new_path" 2> /dev/null`
34738 # bat and cmd files are not always considered executable in MSYS causing which
34739 # to not find them
34740 if test "x$new_path" = x \
34741 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34742 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34743 new_path="$path"
34744
34745 windows_path="$new_path"
34746 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34747 unix_path=`$CYGPATH -u "$windows_path"`
34748 new_path="$unix_path"
34749 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34750 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34751 new_path="$unix_path"
34752 fi
34753
34754 fi
34755
34756 if test "x$new_path" = x; then
34757 # It's still not found. Now this is an unrecoverable error.
34758 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34759 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34760 has_space=`$ECHO "$complete" | $GREP " "`
34761 if test "x$has_space" != x; then
34762 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34763 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34764 fi
34765 as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34766 fi
34767 fi
34768
34769 # Now new_path has a complete unix path to the binary
34770 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34771 # Keep paths in /bin as-is, but remove trailing .exe if any
34772 new_path="${new_path/%.exe/}"
34773 # Do not save /bin paths to all_fixpath_prefixes!
34774 else
34775 # Not in mixed or Windows style, start by that.
34776 new_path=`cmd //c echo $new_path`
34777
34778 input_path="$new_path"
34779 # Check if we need to convert this using DOS-style short mode. If the path
34780 # contains just simple characters, use it. Otherwise (spaces, weird characters),
34781 # take no chances and rewrite it.
34782 # Note: m4 eats our [], so we need to use [ and ] instead.
34783 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34784 if test "x$has_forbidden_chars" != x; then
34785 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34786 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34787 fi
34788
34789 # Output is in $new_path
34790
34791 windows_path="$new_path"
34792 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34793 unix_path=`$CYGPATH -u "$windows_path"`
34794 new_path="$unix_path"
34795 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34796 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34797 new_path="$unix_path"
34798 fi
34799
34800 # remove trailing .exe if any
34801 new_path="${new_path/%.exe/}"
34802
34803 # Save the first 10 bytes of this path to the storage, so fixpath can work.
34804 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34805 fi
34806
34807 else
34808 # We're on a unix platform. Hooray! :)
34809 # First separate the path from the arguments. This will split at the first
34810 # space.
34811 complete="$MT"
34812 path="${complete%% *}"
34813 tmp="$complete EOL"
34814 arguments="${tmp#* }"
34815
34816 # Cannot rely on the command "which" here since it doesn't always work.
34817 is_absolute_path=`$ECHO "$path" | $GREP ^/`
34818 if test -z "$is_absolute_path"; then
34819 # Path to executable is not absolute. Find it.
34820 IFS_save="$IFS"
34821 IFS=:
34822 for p in $PATH; do
34823 if test -f "$p/$path" && test -x "$p/$path"; then
34824 new_path="$p/$path"
34825 break
34826 fi
34827 done
34828 IFS="$IFS_save"
34829 else
34830 # This is an absolute path, we can use it without further modifications.
34831 new_path="$path"
34832 fi
34833
34834 if test "x$new_path" = x; then
34835 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34836 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34837 has_space=`$ECHO "$complete" | $GREP " "`
34838 if test "x$has_space" != x; then
34839 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34840 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34841 fi
34842 as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34843 fi
34844 fi
34845
34846 # Now join together the path and the arguments once again
34847 if test "x$arguments" != xEOL; then
34848 new_complete="$new_path ${arguments% *}"
34849 else
34850 new_complete="$new_path"
34851 fi
34852
34853 if test "x$complete" != "x$new_complete"; then
34854 MT="$new_complete"
34855 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34856 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34857 fi
34858 fi
34859
34860 # Setup the resource compiler (RC)
34861 # Extract the first word of "rc", so it can be a program name with args.
34862 set dummy rc; ac_word=$2
34863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34864 $as_echo_n "checking for $ac_word... " >&6; }
34865 if ${ac_cv_prog_RC+:} false; then :
34866 $as_echo_n "(cached) " >&6
34867 else
34868 if test -n "$RC"; then
34869 ac_cv_prog_RC="$RC" # Let the user override the test.
34870 else
34871 ac_prog_rejected=no
34872 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34873 for as_dir in $PATH
34874 do
34875 IFS=$as_save_IFS
34876 test -z "$as_dir" && as_dir=.
34877 for ac_exec_ext in '' $ac_executable_extensions; do
34878 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34879 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34880 ac_prog_rejected=yes
34881 continue
34882 fi
34883 ac_cv_prog_RC="rc"
34884 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34885 break 2
34886 fi
34887 done
34888 done
34889 IFS=$as_save_IFS
34890
34891 if test $ac_prog_rejected = yes; then
34892 # We found a bogon in the path, so make sure we never use it.
34893 set dummy $ac_cv_prog_RC
34894 shift
34895 if test $# != 0; then
34896 # We chose a different compiler from the bogus one.
34897 # However, it has the same basename, so the bogon will be chosen
34898 # first if we set RC to just the basename; use the full file name.
34899 shift
34900 ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34901 fi
34902 fi
34903 fi
34904 fi
34905 RC=$ac_cv_prog_RC
34906 if test -n "$RC"; then
34907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34908 $as_echo "$RC" >&6; }
34909 else
34910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34911 $as_echo "no" >&6; }
34912 fi
34913
34914
34915
34916 # Only process if variable expands to non-empty
34917
34918 if test "x$RC" != x; then
34919 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34920
34921 # First separate the path from the arguments. This will split at the first
34922 # space.
34923 complete="$RC"
34924 path="${complete%% *}"
34925 tmp="$complete EOL"
34926 arguments="${tmp#* }"
34927
34928 # Input might be given as Windows format, start by converting to
34929 # unix format.
34930 new_path=`$CYGPATH -u "$path"`
34931
34932 # Now try to locate executable using which
34933 new_path=`$WHICH "$new_path" 2> /dev/null`
34934 # bat and cmd files are not always considered executable in cygwin causing which
34935 # to not find them
34936 if test "x$new_path" = x \
34937 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34938 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34939 new_path=`$CYGPATH -u "$path"`
34940 fi
34941 if test "x$new_path" = x; then
34942 # Oops. Which didn't find the executable.
34943 # The splitting of arguments from the executable at a space might have been incorrect,
34944 # since paths with space are more likely in Windows. Give it another try with the whole
34945 # argument.
34946 path="$complete"
34947 arguments="EOL"
34948 new_path=`$CYGPATH -u "$path"`
34949 new_path=`$WHICH "$new_path" 2> /dev/null`
34950 # bat and cmd files are not always considered executable in cygwin causing which
34951 # to not find them
34952 if test "x$new_path" = x \
34953 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34954 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34955 new_path=`$CYGPATH -u "$path"`
34956 fi
34957 if test "x$new_path" = x; then
34958 # It's still not found. Now this is an unrecoverable error.
34959 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34960 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34961 has_space=`$ECHO "$complete" | $GREP " "`
34962 if test "x$has_space" != x; then
34963 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34964 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34965 fi
34966 as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34967 fi
34968 fi
34969
34970 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34971 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34972 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34973 # "foo.exe" is OK but "foo" is an error.
34974 #
34975 # This test is therefore slightly more accurate than "test -f" to check for file presence.
34976 # It is also a way to make sure we got the proper file name for the real test later on.
34977 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34978 if test "x$test_shortpath" = x; then
34979 # Short path failed, file does not exist as specified.
34980 # Try adding .exe or .cmd
34981 if test -f "${new_path}.exe"; then
34982 input_to_shortpath="${new_path}.exe"
34983 elif test -f "${new_path}.cmd"; then
34984 input_to_shortpath="${new_path}.cmd"
34985 else
34986 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34987 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34988 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34989 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34990 as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34991 fi
34992 else
34993 input_to_shortpath="$new_path"
34994 fi
34995
34996 # Call helper function which possibly converts this using DOS-style short mode.
34997 # If so, the updated path is stored in $new_path.
34998 new_path="$input_to_shortpath"
34999
35000 input_path="$input_to_shortpath"
35001 # Check if we need to convert this using DOS-style short mode. If the path
35002 # contains just simple characters, use it. Otherwise (spaces, weird characters),
35003 # take no chances and rewrite it.
35004 # Note: m4 eats our [], so we need to use [ and ] instead.
35005 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35006 if test "x$has_forbidden_chars" != x; then
35007 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35008 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35009 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35010 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35011 # Going to short mode and back again did indeed matter. Since short mode is
35012 # case insensitive, let's make it lowercase to improve readability.
35013 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35014 # Now convert it back to Unix-style (cygpath)
35015 input_path=`$CYGPATH -u "$shortmode_path"`
35016 new_path="$input_path"
35017 fi
35018 fi
35019
35020 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35021 if test "x$test_cygdrive_prefix" = x; then
35022 # As a simple fix, exclude /usr/bin since it's not a real path.
35023 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35024 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35025 # a path prefixed by /cygdrive for fixpath to work.
35026 new_path="$CYGWIN_ROOT_PATH$input_path"
35027 fi
35028 fi
35029
35030 # remove trailing .exe if any
35031 new_path="${new_path/%.exe/}"
35032
35033 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35034
35035 # First separate the path from the arguments. This will split at the first
35036 # space.
35037 complete="$RC"
35038 path="${complete%% *}"
35039 tmp="$complete EOL"
35040 arguments="${tmp#* }"
35041
35042 # Input might be given as Windows format, start by converting to
35043 # unix format.
35044 new_path="$path"
35045
35046 windows_path="$new_path"
35047 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35048 unix_path=`$CYGPATH -u "$windows_path"`
35049 new_path="$unix_path"
35050 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35051 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35052 new_path="$unix_path"
35053 fi
35054
35055
35056 # Now try to locate executable using which
35057 new_path=`$WHICH "$new_path" 2> /dev/null`
35058
35059 if test "x$new_path" = x; then
35060 # Oops. Which didn't find the executable.
35061 # The splitting of arguments from the executable at a space might have been incorrect,
35062 # since paths with space are more likely in Windows. Give it another try with the whole
35063 # argument.
35064 path="$complete"
35065 arguments="EOL"
35066 new_path="$path"
35067
35068 windows_path="$new_path"
35069 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35070 unix_path=`$CYGPATH -u "$windows_path"`
35071 new_path="$unix_path"
35072 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35073 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35074 new_path="$unix_path"
35075 fi
35076
35077
35078 new_path=`$WHICH "$new_path" 2> /dev/null`
35079 # bat and cmd files are not always considered executable in MSYS causing which
35080 # to not find them
35081 if test "x$new_path" = x \
35082 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35083 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35084 new_path="$path"
35085
35086 windows_path="$new_path"
35087 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35088 unix_path=`$CYGPATH -u "$windows_path"`
35089 new_path="$unix_path"
35090 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35091 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35092 new_path="$unix_path"
35093 fi
35094
35095 fi
35096
35097 if test "x$new_path" = x; then
35098 # It's still not found. Now this is an unrecoverable error.
35099 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
35100 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
35101 has_space=`$ECHO "$complete" | $GREP " "`
35102 if test "x$has_space" != x; then
35103 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35104 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35105 fi
35106 as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
35107 fi
35108 fi
35109
35110 # Now new_path has a complete unix path to the binary
35111 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35112 # Keep paths in /bin as-is, but remove trailing .exe if any
35113 new_path="${new_path/%.exe/}"
35114 # Do not save /bin paths to all_fixpath_prefixes!
35115 else
35116 # Not in mixed or Windows style, start by that.
35117 new_path=`cmd //c echo $new_path`
35118
35119 input_path="$new_path"
35120 # Check if we need to convert this using DOS-style short mode. If the path
35121 # contains just simple characters, use it. Otherwise (spaces, weird characters),
35122 # take no chances and rewrite it.
35123 # Note: m4 eats our [], so we need to use [ and ] instead.
35124 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35125 if test "x$has_forbidden_chars" != x; then
35126 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35127 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35128 fi
35129
35130 # Output is in $new_path
35131
35132 windows_path="$new_path"
35133 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35134 unix_path=`$CYGPATH -u "$windows_path"`
35135 new_path="$unix_path"
35136 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35137 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35138 new_path="$unix_path"
35139 fi
35140
35141 # remove trailing .exe if any
35142 new_path="${new_path/%.exe/}"
35143
35144 # Save the first 10 bytes of this path to the storage, so fixpath can work.
35145 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35146 fi
35147
35148 else
35149 # We're on a unix platform. Hooray! :)
35150 # First separate the path from the arguments. This will split at the first
35151 # space.
35152 complete="$RC"
35153 path="${complete%% *}"
35154 tmp="$complete EOL"
35155 arguments="${tmp#* }"
35156
35157 # Cannot rely on the command "which" here since it doesn't always work.
35158 is_absolute_path=`$ECHO "$path" | $GREP ^/`
35159 if test -z "$is_absolute_path"; then
35160 # Path to executable is not absolute. Find it.
35161 IFS_save="$IFS"
35162 IFS=:
35163 for p in $PATH; do
35164 if test -f "$p/$path" && test -x "$p/$path"; then
35165 new_path="$p/$path"
35166 break
35167 fi
35168 done
35169 IFS="$IFS_save"
35170 else
35171 # This is an absolute path, we can use it without further modifications.
35172 new_path="$path"
35173 fi
35174
35175 if test "x$new_path" = x; then
35176 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
35177 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
35178 has_space=`$ECHO "$complete" | $GREP " "`
35179 if test "x$has_space" != x; then
35180 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35181 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35182 fi
35183 as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
35184 fi
35185 fi
35186
35187 # Now join together the path and the arguments once again
35188 if test "x$arguments" != xEOL; then
35189 new_complete="$new_path ${arguments% *}"
35190 else
35191 new_complete="$new_path"
35192 fi
35193
35194 if test "x$complete" != "x$new_complete"; then
35195 RC="$new_complete"
35196 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
35197 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
35198 fi
35199 fi
35200
35201 # Extract the first word of "dumpbin", so it can be a program name with args.
35202 set dummy dumpbin; ac_word=$2
35203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35204 $as_echo_n "checking for $ac_word... " >&6; }
35205 if ${ac_cv_prog_DUMPBIN+:} false; then :
35206 $as_echo_n "(cached) " >&6
35207 else
35208 if test -n "$DUMPBIN"; then
35209 ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
35210 else
35211 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35212 for as_dir in $PATH
35213 do
35214 IFS=$as_save_IFS
35215 test -z "$as_dir" && as_dir=.
35216 for ac_exec_ext in '' $ac_executable_extensions; do
35217 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35218 ac_cv_prog_DUMPBIN="dumpbin"
35219 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35220 break 2
35221 fi
35222 done
35223 done
35224 IFS=$as_save_IFS
35225
35226 fi
35227 fi
35228 DUMPBIN=$ac_cv_prog_DUMPBIN
35229 if test -n "$DUMPBIN"; then
35230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
35231 $as_echo "$DUMPBIN" >&6; }
35232 else
35233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35234 $as_echo "no" >&6; }
35235 fi
35236
35237
35238
35239 # Only process if variable expands to non-empty
35240
35241 if test "x$DUMPBIN" != x; then
35242 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35243
35244 # First separate the path from the arguments. This will split at the first
35245 # space.
35246 complete="$DUMPBIN"
35247 path="${complete%% *}"
35248 tmp="$complete EOL"
35249 arguments="${tmp#* }"
35250
35251 # Input might be given as Windows format, start by converting to
35252 # unix format.
35253 new_path=`$CYGPATH -u "$path"`
35254
35255 # Now try to locate executable using which
35256 new_path=`$WHICH "$new_path" 2> /dev/null`
35257 # bat and cmd files are not always considered executable in cygwin causing which
35258 # to not find them
35259 if test "x$new_path" = x \
35260 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35261 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35262 new_path=`$CYGPATH -u "$path"`
35263 fi
35264 if test "x$new_path" = x; then
35265 # Oops. Which didn't find the executable.
35266 # The splitting of arguments from the executable at a space might have been incorrect,
35267 # since paths with space are more likely in Windows. Give it another try with the whole
35268 # argument.
35269 path="$complete"
35270 arguments="EOL"
35271 new_path=`$CYGPATH -u "$path"`
35272 new_path=`$WHICH "$new_path" 2> /dev/null`
35273 # bat and cmd files are not always considered executable in cygwin causing which
35274 # to not find them
35275 if test "x$new_path" = x \
35276 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35277 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35278 new_path=`$CYGPATH -u "$path"`
35279 fi
35280 if test "x$new_path" = x; then
35281 # It's still not found. Now this is an unrecoverable error.
35282 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35283 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35284 has_space=`$ECHO "$complete" | $GREP " "`
35285 if test "x$has_space" != x; then
35286 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35287 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35288 fi
35289 as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35290 fi
35291 fi
35292
35293 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35294 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35295 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35296 # "foo.exe" is OK but "foo" is an error.
35297 #
35298 # This test is therefore slightly more accurate than "test -f" to check for file presence.
35299 # It is also a way to make sure we got the proper file name for the real test later on.
35300 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35301 if test "x$test_shortpath" = x; then
35302 # Short path failed, file does not exist as specified.
35303 # Try adding .exe or .cmd
35304 if test -f "${new_path}.exe"; then
35305 input_to_shortpath="${new_path}.exe"
35306 elif test -f "${new_path}.cmd"; then
35307 input_to_shortpath="${new_path}.cmd"
35308 else
35309 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
35310 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
35311 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35312 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35313 as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35314 fi
35315 else
35316 input_to_shortpath="$new_path"
35317 fi
35318
35319 # Call helper function which possibly converts this using DOS-style short mode.
35320 # If so, the updated path is stored in $new_path.
35321 new_path="$input_to_shortpath"
35322
35323 input_path="$input_to_shortpath"
35324 # Check if we need to convert this using DOS-style short mode. If the path
35325 # contains just simple characters, use it. Otherwise (spaces, weird characters),
35326 # take no chances and rewrite it.
35327 # Note: m4 eats our [], so we need to use [ and ] instead.
35328 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35329 if test "x$has_forbidden_chars" != x; then
35330 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35331 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35332 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35333 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35334 # Going to short mode and back again did indeed matter. Since short mode is
35335 # case insensitive, let's make it lowercase to improve readability.
35336 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35337 # Now convert it back to Unix-style (cygpath)
35338 input_path=`$CYGPATH -u "$shortmode_path"`
35339 new_path="$input_path"
35340 fi
35341 fi
35342
35343 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35344 if test "x$test_cygdrive_prefix" = x; then
35345 # As a simple fix, exclude /usr/bin since it's not a real path.
35346 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35347 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35348 # a path prefixed by /cygdrive for fixpath to work.
35349 new_path="$CYGWIN_ROOT_PATH$input_path"
35350 fi
35351 fi
35352
35353 # remove trailing .exe if any
35354 new_path="${new_path/%.exe/}"
35355
35356 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35357
35358 # First separate the path from the arguments. This will split at the first
35359 # space.
35360 complete="$DUMPBIN"
35361 path="${complete%% *}"
35362 tmp="$complete EOL"
35363 arguments="${tmp#* }"
35364
35365 # Input might be given as Windows format, start by converting to
35366 # unix format.
35367 new_path="$path"
35368
35369 windows_path="$new_path"
35370 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35371 unix_path=`$CYGPATH -u "$windows_path"`
35372 new_path="$unix_path"
35373 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35374 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35375 new_path="$unix_path"
35376 fi
35377
35378
35379 # Now try to locate executable using which
35380 new_path=`$WHICH "$new_path" 2> /dev/null`
35381
35382 if test "x$new_path" = x; then
35383 # Oops. Which didn't find the executable.
35384 # The splitting of arguments from the executable at a space might have been incorrect,
35385 # since paths with space are more likely in Windows. Give it another try with the whole
35386 # argument.
35387 path="$complete"
35388 arguments="EOL"
35389 new_path="$path"
35390
35391 windows_path="$new_path"
35392 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35393 unix_path=`$CYGPATH -u "$windows_path"`
35394 new_path="$unix_path"
35395 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35396 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35397 new_path="$unix_path"
35398 fi
35399
35400
35401 new_path=`$WHICH "$new_path" 2> /dev/null`
35402 # bat and cmd files are not always considered executable in MSYS causing which
35403 # to not find them
35404 if test "x$new_path" = x \
35405 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35406 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35407 new_path="$path"
35408
35409 windows_path="$new_path"
35410 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35411 unix_path=`$CYGPATH -u "$windows_path"`
35412 new_path="$unix_path"
35413 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35414 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35415 new_path="$unix_path"
35416 fi
35417
35418 fi
35419
35420 if test "x$new_path" = x; then
35421 # It's still not found. Now this is an unrecoverable error.
35422 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35423 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35424 has_space=`$ECHO "$complete" | $GREP " "`
35425 if test "x$has_space" != x; then
35426 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35427 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35428 fi
35429 as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35430 fi
35431 fi
35432
35433 # Now new_path has a complete unix path to the binary
35434 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35435 # Keep paths in /bin as-is, but remove trailing .exe if any
35436 new_path="${new_path/%.exe/}"
35437 # Do not save /bin paths to all_fixpath_prefixes!
35438 else
35439 # Not in mixed or Windows style, start by that.
35440 new_path=`cmd //c echo $new_path`
35441
35442 input_path="$new_path"
35443 # Check if we need to convert this using DOS-style short mode. If the path
35444 # contains just simple characters, use it. Otherwise (spaces, weird characters),
35445 # take no chances and rewrite it.
35446 # Note: m4 eats our [], so we need to use [ and ] instead.
35447 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35448 if test "x$has_forbidden_chars" != x; then
35449 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35450 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35451 fi
35452
35453 # Output is in $new_path
35454
35455 windows_path="$new_path"
35456 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35457 unix_path=`$CYGPATH -u "$windows_path"`
35458 new_path="$unix_path"
35459 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35460 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35461 new_path="$unix_path"
35462 fi
35463
35464 # remove trailing .exe if any
35465 new_path="${new_path/%.exe/}"
35466
35467 # Save the first 10 bytes of this path to the storage, so fixpath can work.
35468 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35469 fi
35470
35471 else
35472 # We're on a unix platform. Hooray! :)
35473 # First separate the path from the arguments. This will split at the first
35474 # space.
35475 complete="$DUMPBIN"
35476 path="${complete%% *}"
35477 tmp="$complete EOL"
35478 arguments="${tmp#* }"
35479
35480 # Cannot rely on the command "which" here since it doesn't always work.
35481 is_absolute_path=`$ECHO "$path" | $GREP ^/`
35482 if test -z "$is_absolute_path"; then
35483 # Path to executable is not absolute. Find it.
35484 IFS_save="$IFS"
35485 IFS=:
35486 for p in $PATH; do
35487 if test -f "$p/$path" && test -x "$p/$path"; then
35488 new_path="$p/$path"
35489 break
35490 fi
35491 done
35492 IFS="$IFS_save"
35493 else
35494 # This is an absolute path, we can use it without further modifications.
35495 new_path="$path"
35496 fi
35497
35498 if test "x$new_path" = x; then
35499 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35500 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35501 has_space=`$ECHO "$complete" | $GREP " "`
35502 if test "x$has_space" != x; then
35503 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35504 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35505 fi
35506 as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35507 fi
35508 fi
35509
35510 # Now join together the path and the arguments once again
35511 if test "x$arguments" != xEOL; then
35512 new_complete="$new_path ${arguments% *}"
35513 else
35514 new_complete="$new_path"
35515 fi
35516
35517 if test "x$complete" != "x$new_complete"; then
35518 DUMPBIN="$new_complete"
35519 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
35520 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
35521 fi
35522 fi
35523
35524 # We need to check for 'msbuild.exe' because at the place where we expect to
35525 # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
35526 # won't find the 'msbuild.exe' executable in that case (and the
35527 # 'ac_executable_extensions' is unusable due to performance reasons).
35528 # Notice that we intentionally don't fix up the path to MSBUILD because we
35529 # will call it in a DOS shell during freetype detection on Windows (see
35530 # 'LIB_SETUP_FREETYPE' in "libraries.m4"
35531 # Extract the first word of "msbuild.exe", so it can be a program name with args.
35532 set dummy msbuild.exe; ac_word=$2
35533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35534 $as_echo_n "checking for $ac_word... " >&6; }
35535 if ${ac_cv_prog_MSBUILD+:} false; then :
35536 $as_echo_n "(cached) " >&6
35537 else
35538 if test -n "$MSBUILD"; then
35539 ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
35540 else
35541 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35542 for as_dir in $PATH
35543 do
35544 IFS=$as_save_IFS
35545 test -z "$as_dir" && as_dir=.
35546 for ac_exec_ext in '' $ac_executable_extensions; do
35547 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35548 ac_cv_prog_MSBUILD="msbuild.exe"
35549 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35550 break 2
35551 fi
35552 done
35553 done
35554 IFS=$as_save_IFS
35555
35556 fi
35557 fi
35558 MSBUILD=$ac_cv_prog_MSBUILD
35559 if test -n "$MSBUILD"; then
35560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
35561 $as_echo "$MSBUILD" >&6; }
35562 else
35563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35564 $as_echo "no" >&6; }
35565 fi
35566
35567
35568 fi
35569
35570 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35571
35572
35573 # Publish this variable in the help.
35574
35575
35576 if test "x$STRIP" = x; then
35577 # The variable is not set by user, try to locate tool using the code snippet
35578 for ac_prog in strip
35579 do
35580 # Extract the first word of "$ac_prog", so it can be a program name with args.
35581 set dummy $ac_prog; ac_word=$2
35582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35583 $as_echo_n "checking for $ac_word... " >&6; }
35584 if ${ac_cv_path_STRIP+:} false; then :
35585 $as_echo_n "(cached) " >&6
35586 else
35587 case $STRIP in
35588 [\\/]* | ?:[\\/]*)
35589 ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35590 ;;
35591 *)
35592 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35593 for as_dir in $PATH
35594 do
35595 IFS=$as_save_IFS
35596 test -z "$as_dir" && as_dir=.
35597 for ac_exec_ext in '' $ac_executable_extensions; do
35598 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35599 ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35600 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35601 break 2
35602 fi
35603 done
35604 done
35605 IFS=$as_save_IFS
35606
35607 ;;
35608 esac
35609 fi
35610 STRIP=$ac_cv_path_STRIP
35611 if test -n "$STRIP"; then
35612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35613 $as_echo "$STRIP" >&6; }
35614 else
35615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35616 $as_echo "no" >&6; }
35617 fi
35618
35619
35620 test -n "$STRIP" && break
35621 done
35622
35623 else
35624 # The variable is set, but is it from the command line or the environment?
35625
35626 # Try to remove the string !STRIP! from our list.
35627 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
35628 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35629 # If it failed, the variable was not from the command line. Ignore it,
35630 # but warn the user (except for BASH, which is always set by the calling BASH).
35631 if test "xSTRIP" != xBASH; then
35632 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
35633 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
35634 fi
35635 # Try to locate tool using the code snippet
35636 for ac_prog in strip
35637 do
35638 # Extract the first word of "$ac_prog", so it can be a program name with args.
35639 set dummy $ac_prog; ac_word=$2
35640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35641 $as_echo_n "checking for $ac_word... " >&6; }
35642 if ${ac_cv_path_STRIP+:} false; then :
35643 $as_echo_n "(cached) " >&6
35644 else
35645 case $STRIP in
35646 [\\/]* | ?:[\\/]*)
35647 ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35648 ;;
35649 *)
35650 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35651 for as_dir in $PATH
35652 do
35653 IFS=$as_save_IFS
35654 test -z "$as_dir" && as_dir=.
35655 for ac_exec_ext in '' $ac_executable_extensions; do
35656 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35657 ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35658 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35659 break 2
35660 fi
35661 done
35662 done
35663 IFS=$as_save_IFS
35664
35665 ;;
35666 esac
35667 fi
35668 STRIP=$ac_cv_path_STRIP
35669 if test -n "$STRIP"; then
35670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35671 $as_echo "$STRIP" >&6; }
35672 else
35673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35674 $as_echo "no" >&6; }
35675 fi
35676
35677
35678 test -n "$STRIP" && break
35679 done
35680
35681 else
35682 # If it succeeded, then it was overridden by the user. We will use it
35683 # for the tool.
35684
35685 # First remove it from the list of overridden variables, so we can test
35686 # for unknown variables in the end.
35687 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35688
35689 # Check if the provided tool contains a complete path.
35690 tool_specified="$STRIP"
35691 tool_basename="${tool_specified##*/}"
35692 if test "x$tool_basename" = "x$tool_specified"; then
35693 # A command without a complete path is provided, search $PATH.
35694 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
35695 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
35696 # Extract the first word of "$tool_basename", so it can be a program name with args.
35697 set dummy $tool_basename; ac_word=$2
35698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35699 $as_echo_n "checking for $ac_word... " >&6; }
35700 if ${ac_cv_path_STRIP+:} false; then :
35701 $as_echo_n "(cached) " >&6
35702 else
35703 case $STRIP in
35704 [\\/]* | ?:[\\/]*)
35705 ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35706 ;;
35707 *)
35708 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35709 for as_dir in $PATH
35710 do
35711 IFS=$as_save_IFS
35712 test -z "$as_dir" && as_dir=.
35713 for ac_exec_ext in '' $ac_executable_extensions; do
35714 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35715 ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35716 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35717 break 2
35718 fi
35719 done
35720 done
35721 IFS=$as_save_IFS
35722
35723 ;;
35724 esac
35725 fi
35726 STRIP=$ac_cv_path_STRIP
35727 if test -n "$STRIP"; then
35728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35729 $as_echo "$STRIP" >&6; }
35730 else
35731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35732 $as_echo "no" >&6; }
35733 fi
35734
35735
35736 if test "x$STRIP" = x; then
35737 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35738 fi
35739 else
35740 # Otherwise we believe it is a complete path. Use it as it is.
35741 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
35742 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
35743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
35744 $as_echo_n "checking for STRIP... " >&6; }
35745 if test ! -x "$tool_specified"; then
35746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35747 $as_echo "not found" >&6; }
35748 as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
35749 fi
35750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35751 $as_echo "$tool_specified" >&6; }
35752 fi
35753 fi
35754 fi
35755
35756
35757
35758 # Only process if variable expands to non-empty
35759
35760 if test "x$STRIP" != x; then
35761 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35762
35763 # First separate the path from the arguments. This will split at the first
35764 # space.
35765 complete="$STRIP"
35766 path="${complete%% *}"
35767 tmp="$complete EOL"
35768 arguments="${tmp#* }"
35769
35770 # Input might be given as Windows format, start by converting to
35771 # unix format.
35772 new_path=`$CYGPATH -u "$path"`
35773
35774 # Now try to locate executable using which
35775 new_path=`$WHICH "$new_path" 2> /dev/null`
35776 # bat and cmd files are not always considered executable in cygwin causing which
35777 # to not find them
35778 if test "x$new_path" = x \
35779 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35780 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35781 new_path=`$CYGPATH -u "$path"`
35782 fi
35783 if test "x$new_path" = x; then
35784 # Oops. Which didn't find the executable.
35785 # The splitting of arguments from the executable at a space might have been incorrect,
35786 # since paths with space are more likely in Windows. Give it another try with the whole
35787 # argument.
35788 path="$complete"
35789 arguments="EOL"
35790 new_path=`$CYGPATH -u "$path"`
35791 new_path=`$WHICH "$new_path" 2> /dev/null`
35792 # bat and cmd files are not always considered executable in cygwin causing which
35793 # to not find them
35794 if test "x$new_path" = x \
35795 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35796 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35797 new_path=`$CYGPATH -u "$path"`
35798 fi
35799 if test "x$new_path" = x; then
35800 # It's still not found. Now this is an unrecoverable error.
35801 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35802 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35803 has_space=`$ECHO "$complete" | $GREP " "`
35804 if test "x$has_space" != x; then
35805 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35806 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35807 fi
35808 as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35809 fi
35810 fi
35811
35812 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35813 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35814 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35815 # "foo.exe" is OK but "foo" is an error.
35816 #
35817 # This test is therefore slightly more accurate than "test -f" to check for file presence.
35818 # It is also a way to make sure we got the proper file name for the real test later on.
35819 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35820 if test "x$test_shortpath" = x; then
35821 # Short path failed, file does not exist as specified.
35822 # Try adding .exe or .cmd
35823 if test -f "${new_path}.exe"; then
35824 input_to_shortpath="${new_path}.exe"
35825 elif test -f "${new_path}.cmd"; then
35826 input_to_shortpath="${new_path}.cmd"
35827 else
35828 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
35829 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
35830 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35831 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35832 as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35833 fi
35834 else
35835 input_to_shortpath="$new_path"
35836 fi
35837
35838 # Call helper function which possibly converts this using DOS-style short mode.
35839 # If so, the updated path is stored in $new_path.
35840 new_path="$input_to_shortpath"
35841
35842 input_path="$input_to_shortpath"
35843 # Check if we need to convert this using DOS-style short mode. If the path
35844 # contains just simple characters, use it. Otherwise (spaces, weird characters),
35845 # take no chances and rewrite it.
35846 # Note: m4 eats our [], so we need to use [ and ] instead.
35847 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35848 if test "x$has_forbidden_chars" != x; then
35849 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35850 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35851 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35852 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35853 # Going to short mode and back again did indeed matter. Since short mode is
35854 # case insensitive, let's make it lowercase to improve readability.
35855 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35856 # Now convert it back to Unix-style (cygpath)
35857 input_path=`$CYGPATH -u "$shortmode_path"`
35858 new_path="$input_path"
35859 fi
35860 fi
35861
35862 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35863 if test "x$test_cygdrive_prefix" = x; then
35864 # As a simple fix, exclude /usr/bin since it's not a real path.
35865 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35866 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35867 # a path prefixed by /cygdrive for fixpath to work.
35868 new_path="$CYGWIN_ROOT_PATH$input_path"
35869 fi
35870 fi
35871
35872 # remove trailing .exe if any
35873 new_path="${new_path/%.exe/}"
35874
35875 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35876
35877 # First separate the path from the arguments. This will split at the first
35878 # space.
35879 complete="$STRIP"
35880 path="${complete%% *}"
35881 tmp="$complete EOL"
35882 arguments="${tmp#* }"
35883
35884 # Input might be given as Windows format, start by converting to
35885 # unix format.
35886 new_path="$path"
35887
35888 windows_path="$new_path"
35889 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35890 unix_path=`$CYGPATH -u "$windows_path"`
35891 new_path="$unix_path"
35892 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35893 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35894 new_path="$unix_path"
35895 fi
35896
35897
35898 # Now try to locate executable using which
35899 new_path=`$WHICH "$new_path" 2> /dev/null`
35900
35901 if test "x$new_path" = x; then
35902 # Oops. Which didn't find the executable.
35903 # The splitting of arguments from the executable at a space might have been incorrect,
35904 # since paths with space are more likely in Windows. Give it another try with the whole
35905 # argument.
35906 path="$complete"
35907 arguments="EOL"
35908 new_path="$path"
35909
35910 windows_path="$new_path"
35911 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35912 unix_path=`$CYGPATH -u "$windows_path"`
35913 new_path="$unix_path"
35914 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35915 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35916 new_path="$unix_path"
35917 fi
35918
35919
35920 new_path=`$WHICH "$new_path" 2> /dev/null`
35921 # bat and cmd files are not always considered executable in MSYS causing which
35922 # to not find them
35923 if test "x$new_path" = x \
35924 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35925 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35926 new_path="$path"
35927
35928 windows_path="$new_path"
35929 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35930 unix_path=`$CYGPATH -u "$windows_path"`
35931 new_path="$unix_path"
35932 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35933 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35934 new_path="$unix_path"
35935 fi
35936
35937 fi
35938
35939 if test "x$new_path" = x; then
35940 # It's still not found. Now this is an unrecoverable error.
35941 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35942 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35943 has_space=`$ECHO "$complete" | $GREP " "`
35944 if test "x$has_space" != x; then
35945 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35946 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35947 fi
35948 as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35949 fi
35950 fi
35951
35952 # Now new_path has a complete unix path to the binary
35953 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35954 # Keep paths in /bin as-is, but remove trailing .exe if any
35955 new_path="${new_path/%.exe/}"
35956 # Do not save /bin paths to all_fixpath_prefixes!
35957 else
35958 # Not in mixed or Windows style, start by that.
35959 new_path=`cmd //c echo $new_path`
35960
35961 input_path="$new_path"
35962 # Check if we need to convert this using DOS-style short mode. If the path
35963 # contains just simple characters, use it. Otherwise (spaces, weird characters),
35964 # take no chances and rewrite it.
35965 # Note: m4 eats our [], so we need to use [ and ] instead.
35966 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35967 if test "x$has_forbidden_chars" != x; then
35968 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35969 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35970 fi
35971
35972 # Output is in $new_path
35973
35974 windows_path="$new_path"
35975 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35976 unix_path=`$CYGPATH -u "$windows_path"`
35977 new_path="$unix_path"
35978 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35979 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35980 new_path="$unix_path"
35981 fi
35982
35983 # remove trailing .exe if any
35984 new_path="${new_path/%.exe/}"
35985
35986 # Save the first 10 bytes of this path to the storage, so fixpath can work.
35987 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35988 fi
35989
35990 else
35991 # We're on a unix platform. Hooray! :)
35992 # First separate the path from the arguments. This will split at the first
35993 # space.
35994 complete="$STRIP"
35995 path="${complete%% *}"
35996 tmp="$complete EOL"
35997 arguments="${tmp#* }"
35998
35999 # Cannot rely on the command "which" here since it doesn't always work.
36000 is_absolute_path=`$ECHO "$path" | $GREP ^/`
36001 if test -z "$is_absolute_path"; then
36002 # Path to executable is not absolute. Find it.
36003 IFS_save="$IFS"
36004 IFS=:
36005 for p in $PATH; do
36006 if test -f "$p/$path" && test -x "$p/$path"; then
36007 new_path="$p/$path"
36008 break
36009 fi
36010 done
36011 IFS="$IFS_save"
36012 else
36013 # This is an absolute path, we can use it without further modifications.
36014 new_path="$path"
36015 fi
36016
36017 if test "x$new_path" = x; then
36018 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36019 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36020 has_space=`$ECHO "$complete" | $GREP " "`
36021 if test "x$has_space" != x; then
36022 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36023 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36024 fi
36025 as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36026 fi
36027 fi
36028
36029 # Now join together the path and the arguments once again
36030 if test "x$arguments" != xEOL; then
36031 new_complete="$new_path ${arguments% *}"
36032 else
36033 new_complete="$new_path"
36034 fi
36035
36036 if test "x$complete" != "x$new_complete"; then
36037 STRIP="$new_complete"
36038 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
36039 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
36040 fi
36041 fi
36042
36043
36044
36045 # Publish this variable in the help.
36046
36047
36048 if test "x$NM" = x; then
36049 # The variable is not set by user, try to locate tool using the code snippet
36050 for ac_prog in nm
36051 do
36052 # Extract the first word of "$ac_prog", so it can be a program name with args.
36053 set dummy $ac_prog; ac_word=$2
36054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36055 $as_echo_n "checking for $ac_word... " >&6; }
36056 if ${ac_cv_path_NM+:} false; then :
36057 $as_echo_n "(cached) " >&6
36058 else
36059 case $NM in
36060 [\\/]* | ?:[\\/]*)
36061 ac_cv_path_NM="$NM" # Let the user override the test with a path.
36062 ;;
36063 *)
36064 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36065 for as_dir in $PATH
36066 do
36067 IFS=$as_save_IFS
36068 test -z "$as_dir" && as_dir=.
36069 for ac_exec_ext in '' $ac_executable_extensions; do
36070 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36071 ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36072 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36073 break 2
36074 fi
36075 done
36076 done
36077 IFS=$as_save_IFS
36078
36079 ;;
36080 esac
36081 fi
36082 NM=$ac_cv_path_NM
36083 if test -n "$NM"; then
36084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36085 $as_echo "$NM" >&6; }
36086 else
36087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36088 $as_echo "no" >&6; }
36089 fi
36090
36091
36092 test -n "$NM" && break
36093 done
36094
36095 else
36096 # The variable is set, but is it from the command line or the environment?
36097
36098 # Try to remove the string !NM! from our list.
36099 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
36100 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36101 # If it failed, the variable was not from the command line. Ignore it,
36102 # but warn the user (except for BASH, which is always set by the calling BASH).
36103 if test "xNM" != xBASH; then
36104 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
36105 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
36106 fi
36107 # Try to locate tool using the code snippet
36108 for ac_prog in nm
36109 do
36110 # Extract the first word of "$ac_prog", so it can be a program name with args.
36111 set dummy $ac_prog; ac_word=$2
36112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36113 $as_echo_n "checking for $ac_word... " >&6; }
36114 if ${ac_cv_path_NM+:} false; then :
36115 $as_echo_n "(cached) " >&6
36116 else
36117 case $NM in
36118 [\\/]* | ?:[\\/]*)
36119 ac_cv_path_NM="$NM" # Let the user override the test with a path.
36120 ;;
36121 *)
36122 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36123 for as_dir in $PATH
36124 do
36125 IFS=$as_save_IFS
36126 test -z "$as_dir" && as_dir=.
36127 for ac_exec_ext in '' $ac_executable_extensions; do
36128 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36129 ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36130 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36131 break 2
36132 fi
36133 done
36134 done
36135 IFS=$as_save_IFS
36136
36137 ;;
36138 esac
36139 fi
36140 NM=$ac_cv_path_NM
36141 if test -n "$NM"; then
36142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36143 $as_echo "$NM" >&6; }
36144 else
36145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36146 $as_echo "no" >&6; }
36147 fi
36148
36149
36150 test -n "$NM" && break
36151 done
36152
36153 else
36154 # If it succeeded, then it was overridden by the user. We will use it
36155 # for the tool.
36156
36157 # First remove it from the list of overridden variables, so we can test
36158 # for unknown variables in the end.
36159 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36160
36161 # Check if the provided tool contains a complete path.
36162 tool_specified="$NM"
36163 tool_basename="${tool_specified##*/}"
36164 if test "x$tool_basename" = "x$tool_specified"; then
36165 # A command without a complete path is provided, search $PATH.
36166 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
36167 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
36168 # Extract the first word of "$tool_basename", so it can be a program name with args.
36169 set dummy $tool_basename; ac_word=$2
36170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36171 $as_echo_n "checking for $ac_word... " >&6; }
36172 if ${ac_cv_path_NM+:} false; then :
36173 $as_echo_n "(cached) " >&6
36174 else
36175 case $NM in
36176 [\\/]* | ?:[\\/]*)
36177 ac_cv_path_NM="$NM" # Let the user override the test with a path.
36178 ;;
36179 *)
36180 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36181 for as_dir in $PATH
36182 do
36183 IFS=$as_save_IFS
36184 test -z "$as_dir" && as_dir=.
36185 for ac_exec_ext in '' $ac_executable_extensions; do
36186 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36187 ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36188 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36189 break 2
36190 fi
36191 done
36192 done
36193 IFS=$as_save_IFS
36194
36195 ;;
36196 esac
36197 fi
36198 NM=$ac_cv_path_NM
36199 if test -n "$NM"; then
36200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36201 $as_echo "$NM" >&6; }
36202 else
36203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36204 $as_echo "no" >&6; }
36205 fi
36206
36207
36208 if test "x$NM" = x; then
36209 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36210 fi
36211 else
36212 # Otherwise we believe it is a complete path. Use it as it is.
36213 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
36214 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
36215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
36216 $as_echo_n "checking for NM... " >&6; }
36217 if test ! -x "$tool_specified"; then
36218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36219 $as_echo "not found" >&6; }
36220 as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
36221 fi
36222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36223 $as_echo "$tool_specified" >&6; }
36224 fi
36225 fi
36226 fi
36227
36228
36229
36230 # Only process if variable expands to non-empty
36231
36232 if test "x$NM" != x; then
36233 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36234
36235 # First separate the path from the arguments. This will split at the first
36236 # space.
36237 complete="$NM"
36238 path="${complete%% *}"
36239 tmp="$complete EOL"
36240 arguments="${tmp#* }"
36241
36242 # Input might be given as Windows format, start by converting to
36243 # unix format.
36244 new_path=`$CYGPATH -u "$path"`
36245
36246 # Now try to locate executable using which
36247 new_path=`$WHICH "$new_path" 2> /dev/null`
36248 # bat and cmd files are not always considered executable in cygwin causing which
36249 # to not find them
36250 if test "x$new_path" = x \
36251 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36252 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36253 new_path=`$CYGPATH -u "$path"`
36254 fi
36255 if test "x$new_path" = x; then
36256 # Oops. Which didn't find the executable.
36257 # The splitting of arguments from the executable at a space might have been incorrect,
36258 # since paths with space are more likely in Windows. Give it another try with the whole
36259 # argument.
36260 path="$complete"
36261 arguments="EOL"
36262 new_path=`$CYGPATH -u "$path"`
36263 new_path=`$WHICH "$new_path" 2> /dev/null`
36264 # bat and cmd files are not always considered executable in cygwin causing which
36265 # to not find them
36266 if test "x$new_path" = x \
36267 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36268 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36269 new_path=`$CYGPATH -u "$path"`
36270 fi
36271 if test "x$new_path" = x; then
36272 # It's still not found. Now this is an unrecoverable error.
36273 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36274 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36275 has_space=`$ECHO "$complete" | $GREP " "`
36276 if test "x$has_space" != x; then
36277 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36278 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36279 fi
36280 as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36281 fi
36282 fi
36283
36284 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36285 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36286 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36287 # "foo.exe" is OK but "foo" is an error.
36288 #
36289 # This test is therefore slightly more accurate than "test -f" to check for file presence.
36290 # It is also a way to make sure we got the proper file name for the real test later on.
36291 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36292 if test "x$test_shortpath" = x; then
36293 # Short path failed, file does not exist as specified.
36294 # Try adding .exe or .cmd
36295 if test -f "${new_path}.exe"; then
36296 input_to_shortpath="${new_path}.exe"
36297 elif test -f "${new_path}.cmd"; then
36298 input_to_shortpath="${new_path}.cmd"
36299 else
36300 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
36301 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
36302 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36303 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36304 as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36305 fi
36306 else
36307 input_to_shortpath="$new_path"
36308 fi
36309
36310 # Call helper function which possibly converts this using DOS-style short mode.
36311 # If so, the updated path is stored in $new_path.
36312 new_path="$input_to_shortpath"
36313
36314 input_path="$input_to_shortpath"
36315 # Check if we need to convert this using DOS-style short mode. If the path
36316 # contains just simple characters, use it. Otherwise (spaces, weird characters),
36317 # take no chances and rewrite it.
36318 # Note: m4 eats our [], so we need to use [ and ] instead.
36319 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36320 if test "x$has_forbidden_chars" != x; then
36321 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36322 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36323 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36324 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36325 # Going to short mode and back again did indeed matter. Since short mode is
36326 # case insensitive, let's make it lowercase to improve readability.
36327 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36328 # Now convert it back to Unix-style (cygpath)
36329 input_path=`$CYGPATH -u "$shortmode_path"`
36330 new_path="$input_path"
36331 fi
36332 fi
36333
36334 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36335 if test "x$test_cygdrive_prefix" = x; then
36336 # As a simple fix, exclude /usr/bin since it's not a real path.
36337 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36338 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36339 # a path prefixed by /cygdrive for fixpath to work.
36340 new_path="$CYGWIN_ROOT_PATH$input_path"
36341 fi
36342 fi
36343
36344 # remove trailing .exe if any
36345 new_path="${new_path/%.exe/}"
36346
36347 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36348
36349 # First separate the path from the arguments. This will split at the first
36350 # space.
36351 complete="$NM"
36352 path="${complete%% *}"
36353 tmp="$complete EOL"
36354 arguments="${tmp#* }"
36355
36356 # Input might be given as Windows format, start by converting to
36357 # unix format.
36358 new_path="$path"
36359
36360 windows_path="$new_path"
36361 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36362 unix_path=`$CYGPATH -u "$windows_path"`
36363 new_path="$unix_path"
36364 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36365 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36366 new_path="$unix_path"
36367 fi
36368
36369
36370 # Now try to locate executable using which
36371 new_path=`$WHICH "$new_path" 2> /dev/null`
36372
36373 if test "x$new_path" = x; then
36374 # Oops. Which didn't find the executable.
36375 # The splitting of arguments from the executable at a space might have been incorrect,
36376 # since paths with space are more likely in Windows. Give it another try with the whole
36377 # argument.
36378 path="$complete"
36379 arguments="EOL"
36380 new_path="$path"
36381
36382 windows_path="$new_path"
36383 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36384 unix_path=`$CYGPATH -u "$windows_path"`
36385 new_path="$unix_path"
36386 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36387 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36388 new_path="$unix_path"
36389 fi
36390
36391
36392 new_path=`$WHICH "$new_path" 2> /dev/null`
36393 # bat and cmd files are not always considered executable in MSYS causing which
36394 # to not find them
36395 if test "x$new_path" = x \
36396 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36397 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36398 new_path="$path"
36399
36400 windows_path="$new_path"
36401 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36402 unix_path=`$CYGPATH -u "$windows_path"`
36403 new_path="$unix_path"
36404 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36405 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36406 new_path="$unix_path"
36407 fi
36408
36409 fi
36410
36411 if test "x$new_path" = x; then
36412 # It's still not found. Now this is an unrecoverable error.
36413 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36414 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36415 has_space=`$ECHO "$complete" | $GREP " "`
36416 if test "x$has_space" != x; then
36417 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36418 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36419 fi
36420 as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36421 fi
36422 fi
36423
36424 # Now new_path has a complete unix path to the binary
36425 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36426 # Keep paths in /bin as-is, but remove trailing .exe if any
36427 new_path="${new_path/%.exe/}"
36428 # Do not save /bin paths to all_fixpath_prefixes!
36429 else
36430 # Not in mixed or Windows style, start by that.
36431 new_path=`cmd //c echo $new_path`
36432
36433 input_path="$new_path"
36434 # Check if we need to convert this using DOS-style short mode. If the path
36435 # contains just simple characters, use it. Otherwise (spaces, weird characters),
36436 # take no chances and rewrite it.
36437 # Note: m4 eats our [], so we need to use [ and ] instead.
36438 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36439 if test "x$has_forbidden_chars" != x; then
36440 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36441 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36442 fi
36443
36444 # Output is in $new_path
36445
36446 windows_path="$new_path"
36447 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36448 unix_path=`$CYGPATH -u "$windows_path"`
36449 new_path="$unix_path"
36450 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36451 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36452 new_path="$unix_path"
36453 fi
36454
36455 # remove trailing .exe if any
36456 new_path="${new_path/%.exe/}"
36457
36458 # Save the first 10 bytes of this path to the storage, so fixpath can work.
36459 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36460 fi
36461
36462 else
36463 # We're on a unix platform. Hooray! :)
36464 # First separate the path from the arguments. This will split at the first
36465 # space.
36466 complete="$NM"
36467 path="${complete%% *}"
36468 tmp="$complete EOL"
36469 arguments="${tmp#* }"
36470
36471 # Cannot rely on the command "which" here since it doesn't always work.
36472 is_absolute_path=`$ECHO "$path" | $GREP ^/`
36473 if test -z "$is_absolute_path"; then
36474 # Path to executable is not absolute. Find it.
36475 IFS_save="$IFS"
36476 IFS=:
36477 for p in $PATH; do
36478 if test -f "$p/$path" && test -x "$p/$path"; then
36479 new_path="$p/$path"
36480 break
36481 fi
36482 done
36483 IFS="$IFS_save"
36484 else
36485 # This is an absolute path, we can use it without further modifications.
36486 new_path="$path"
36487 fi
36488
36489 if test "x$new_path" = x; then
36490 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36491 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36492 has_space=`$ECHO "$complete" | $GREP " "`
36493 if test "x$has_space" != x; then
36494 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36495 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36496 fi
36497 as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36498 fi
36499 fi
36500
36501 # Now join together the path and the arguments once again
36502 if test "x$arguments" != xEOL; then
36503 new_complete="$new_path ${arguments% *}"
36504 else
36505 new_complete="$new_path"
36506 fi
36507
36508 if test "x$complete" != "x$new_complete"; then
36509 NM="$new_complete"
36510 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
36511 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
36512 fi
36513 fi
36514
36515
36516
36517 # Publish this variable in the help.
36518
36519
36520 if test "x$GNM" = x; then
36521 # The variable is not set by user, try to locate tool using the code snippet
36522 for ac_prog in gnm
36523 do
36524 # Extract the first word of "$ac_prog", so it can be a program name with args.
36525 set dummy $ac_prog; ac_word=$2
36526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36527 $as_echo_n "checking for $ac_word... " >&6; }
36528 if ${ac_cv_path_GNM+:} false; then :
36529 $as_echo_n "(cached) " >&6
36530 else
36531 case $GNM in
36532 [\\/]* | ?:[\\/]*)
36533 ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36534 ;;
36535 *)
36536 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36537 for as_dir in $PATH
36538 do
36539 IFS=$as_save_IFS
36540 test -z "$as_dir" && as_dir=.
36541 for ac_exec_ext in '' $ac_executable_extensions; do
36542 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36543 ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36544 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36545 break 2
36546 fi
36547 done
36548 done
36549 IFS=$as_save_IFS
36550
36551 ;;
36552 esac
36553 fi
36554 GNM=$ac_cv_path_GNM
36555 if test -n "$GNM"; then
36556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36557 $as_echo "$GNM" >&6; }
36558 else
36559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36560 $as_echo "no" >&6; }
36561 fi
36562
36563
36564 test -n "$GNM" && break
36565 done
36566
36567 else
36568 # The variable is set, but is it from the command line or the environment?
36569
36570 # Try to remove the string !GNM! from our list.
36571 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
36572 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36573 # If it failed, the variable was not from the command line. Ignore it,
36574 # but warn the user (except for BASH, which is always set by the calling BASH).
36575 if test "xGNM" != xBASH; then
36576 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
36577 $as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
36578 fi
36579 # Try to locate tool using the code snippet
36580 for ac_prog in gnm
36581 do
36582 # Extract the first word of "$ac_prog", so it can be a program name with args.
36583 set dummy $ac_prog; ac_word=$2
36584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36585 $as_echo_n "checking for $ac_word... " >&6; }
36586 if ${ac_cv_path_GNM+:} false; then :
36587 $as_echo_n "(cached) " >&6
36588 else
36589 case $GNM in
36590 [\\/]* | ?:[\\/]*)
36591 ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36592 ;;
36593 *)
36594 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36595 for as_dir in $PATH
36596 do
36597 IFS=$as_save_IFS
36598 test -z "$as_dir" && as_dir=.
36599 for ac_exec_ext in '' $ac_executable_extensions; do
36600 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36601 ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36602 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36603 break 2
36604 fi
36605 done
36606 done
36607 IFS=$as_save_IFS
36608
36609 ;;
36610 esac
36611 fi
36612 GNM=$ac_cv_path_GNM
36613 if test -n "$GNM"; then
36614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36615 $as_echo "$GNM" >&6; }
36616 else
36617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36618 $as_echo "no" >&6; }
36619 fi
36620
36621
36622 test -n "$GNM" && break
36623 done
36624
36625 else
36626 # If it succeeded, then it was overridden by the user. We will use it
36627 # for the tool.
36628
36629 # First remove it from the list of overridden variables, so we can test
36630 # for unknown variables in the end.
36631 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36632
36633 # Check if the provided tool contains a complete path.
36634 tool_specified="$GNM"
36635 tool_basename="${tool_specified##*/}"
36636 if test "x$tool_basename" = "x$tool_specified"; then
36637 # A command without a complete path is provided, search $PATH.
36638 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
36639 $as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
36640 # Extract the first word of "$tool_basename", so it can be a program name with args.
36641 set dummy $tool_basename; ac_word=$2
36642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36643 $as_echo_n "checking for $ac_word... " >&6; }
36644 if ${ac_cv_path_GNM+:} false; then :
36645 $as_echo_n "(cached) " >&6
36646 else
36647 case $GNM in
36648 [\\/]* | ?:[\\/]*)
36649 ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36650 ;;
36651 *)
36652 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36653 for as_dir in $PATH
36654 do
36655 IFS=$as_save_IFS
36656 test -z "$as_dir" && as_dir=.
36657 for ac_exec_ext in '' $ac_executable_extensions; do
36658 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36659 ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36660 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36661 break 2
36662 fi
36663 done
36664 done
36665 IFS=$as_save_IFS
36666
36667 ;;
36668 esac
36669 fi
36670 GNM=$ac_cv_path_GNM
36671 if test -n "$GNM"; then
36672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36673 $as_echo "$GNM" >&6; }
36674 else
36675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36676 $as_echo "no" >&6; }
36677 fi
36678
36679
36680 if test "x$GNM" = x; then
36681 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36682 fi
36683 else
36684 # Otherwise we believe it is a complete path. Use it as it is.
36685 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
36686 $as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
36687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
36688 $as_echo_n "checking for GNM... " >&6; }
36689 if test ! -x "$tool_specified"; then
36690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36691 $as_echo "not found" >&6; }
36692 as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
36693 fi
36694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36695 $as_echo "$tool_specified" >&6; }
36696 fi
36697 fi
36698 fi
36699
36700
36701
36702 # Only process if variable expands to non-empty
36703
36704 if test "x$GNM" != x; then
36705 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36706
36707 # First separate the path from the arguments. This will split at the first
36708 # space.
36709 complete="$GNM"
36710 path="${complete%% *}"
36711 tmp="$complete EOL"
36712 arguments="${tmp#* }"
36713
36714 # Input might be given as Windows format, start by converting to
36715 # unix format.
36716 new_path=`$CYGPATH -u "$path"`
36717
36718 # Now try to locate executable using which
36719 new_path=`$WHICH "$new_path" 2> /dev/null`
36720 # bat and cmd files are not always considered executable in cygwin causing which
36721 # to not find them
36722 if test "x$new_path" = x \
36723 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36724 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36725 new_path=`$CYGPATH -u "$path"`
36726 fi
36727 if test "x$new_path" = x; then
36728 # Oops. Which didn't find the executable.
36729 # The splitting of arguments from the executable at a space might have been incorrect,
36730 # since paths with space are more likely in Windows. Give it another try with the whole
36731 # argument.
36732 path="$complete"
36733 arguments="EOL"
36734 new_path=`$CYGPATH -u "$path"`
36735 new_path=`$WHICH "$new_path" 2> /dev/null`
36736 # bat and cmd files are not always considered executable in cygwin causing which
36737 # to not find them
36738 if test "x$new_path" = x \
36739 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36740 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36741 new_path=`$CYGPATH -u "$path"`
36742 fi
36743 if test "x$new_path" = x; then
36744 # It's still not found. Now this is an unrecoverable error.
36745 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36746 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36747 has_space=`$ECHO "$complete" | $GREP " "`
36748 if test "x$has_space" != x; then
36749 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36750 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36751 fi
36752 as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36753 fi
36754 fi
36755
36756 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36757 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36758 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36759 # "foo.exe" is OK but "foo" is an error.
36760 #
36761 # This test is therefore slightly more accurate than "test -f" to check for file presence.
36762 # It is also a way to make sure we got the proper file name for the real test later on.
36763 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36764 if test "x$test_shortpath" = x; then
36765 # Short path failed, file does not exist as specified.
36766 # Try adding .exe or .cmd
36767 if test -f "${new_path}.exe"; then
36768 input_to_shortpath="${new_path}.exe"
36769 elif test -f "${new_path}.cmd"; then
36770 input_to_shortpath="${new_path}.cmd"
36771 else
36772 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
36773 $as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
36774 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36775 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36776 as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36777 fi
36778 else
36779 input_to_shortpath="$new_path"
36780 fi
36781
36782 # Call helper function which possibly converts this using DOS-style short mode.
36783 # If so, the updated path is stored in $new_path.
36784 new_path="$input_to_shortpath"
36785
36786 input_path="$input_to_shortpath"
36787 # Check if we need to convert this using DOS-style short mode. If the path
36788 # contains just simple characters, use it. Otherwise (spaces, weird characters),
36789 # take no chances and rewrite it.
36790 # Note: m4 eats our [], so we need to use [ and ] instead.
36791 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36792 if test "x$has_forbidden_chars" != x; then
36793 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36794 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36795 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36796 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36797 # Going to short mode and back again did indeed matter. Since short mode is
36798 # case insensitive, let's make it lowercase to improve readability.
36799 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36800 # Now convert it back to Unix-style (cygpath)
36801 input_path=`$CYGPATH -u "$shortmode_path"`
36802 new_path="$input_path"
36803 fi
36804 fi
36805
36806 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36807 if test "x$test_cygdrive_prefix" = x; then
36808 # As a simple fix, exclude /usr/bin since it's not a real path.
36809 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36810 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36811 # a path prefixed by /cygdrive for fixpath to work.
36812 new_path="$CYGWIN_ROOT_PATH$input_path"
36813 fi
36814 fi
36815
36816 # remove trailing .exe if any
36817 new_path="${new_path/%.exe/}"
36818
36819 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36820
36821 # First separate the path from the arguments. This will split at the first
36822 # space.
36823 complete="$GNM"
36824 path="${complete%% *}"
36825 tmp="$complete EOL"
36826 arguments="${tmp#* }"
36827
36828 # Input might be given as Windows format, start by converting to
36829 # unix format.
36830 new_path="$path"
36831
36832 windows_path="$new_path"
36833 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36834 unix_path=`$CYGPATH -u "$windows_path"`
36835 new_path="$unix_path"
36836 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36837 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36838 new_path="$unix_path"
36839 fi
36840
36841
36842 # Now try to locate executable using which
36843 new_path=`$WHICH "$new_path" 2> /dev/null`
36844
36845 if test "x$new_path" = x; then
36846 # Oops. Which didn't find the executable.
36847 # The splitting of arguments from the executable at a space might have been incorrect,
36848 # since paths with space are more likely in Windows. Give it another try with the whole
36849 # argument.
36850 path="$complete"
36851 arguments="EOL"
36852 new_path="$path"
36853
36854 windows_path="$new_path"
36855 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36856 unix_path=`$CYGPATH -u "$windows_path"`
36857 new_path="$unix_path"
36858 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36859 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36860 new_path="$unix_path"
36861 fi
36862
36863
36864 new_path=`$WHICH "$new_path" 2> /dev/null`
36865 # bat and cmd files are not always considered executable in MSYS causing which
36866 # to not find them
36867 if test "x$new_path" = x \
36868 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36869 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36870 new_path="$path"
36871
36872 windows_path="$new_path"
36873 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36874 unix_path=`$CYGPATH -u "$windows_path"`
36875 new_path="$unix_path"
36876 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36877 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36878 new_path="$unix_path"
36879 fi
36880
36881 fi
36882
36883 if test "x$new_path" = x; then
36884 # It's still not found. Now this is an unrecoverable error.
36885 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36886 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36887 has_space=`$ECHO "$complete" | $GREP " "`
36888 if test "x$has_space" != x; then
36889 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36890 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36891 fi
36892 as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36893 fi
36894 fi
36895
36896 # Now new_path has a complete unix path to the binary
36897 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36898 # Keep paths in /bin as-is, but remove trailing .exe if any
36899 new_path="${new_path/%.exe/}"
36900 # Do not save /bin paths to all_fixpath_prefixes!
36901 else
36902 # Not in mixed or Windows style, start by that.
36903 new_path=`cmd //c echo $new_path`
36904
36905 input_path="$new_path"
36906 # Check if we need to convert this using DOS-style short mode. If the path
36907 # contains just simple characters, use it. Otherwise (spaces, weird characters),
36908 # take no chances and rewrite it.
36909 # Note: m4 eats our [], so we need to use [ and ] instead.
36910 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36911 if test "x$has_forbidden_chars" != x; then
36912 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36913 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36914 fi
36915
36916 # Output is in $new_path
36917
36918 windows_path="$new_path"
36919 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36920 unix_path=`$CYGPATH -u "$windows_path"`
36921 new_path="$unix_path"
36922 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36923 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36924 new_path="$unix_path"
36925 fi
36926
36927 # remove trailing .exe if any
36928 new_path="${new_path/%.exe/}"
36929
36930 # Save the first 10 bytes of this path to the storage, so fixpath can work.
36931 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36932 fi
36933
36934 else
36935 # We're on a unix platform. Hooray! :)
36936 # First separate the path from the arguments. This will split at the first
36937 # space.
36938 complete="$GNM"
36939 path="${complete%% *}"
36940 tmp="$complete EOL"
36941 arguments="${tmp#* }"
36942
36943 # Cannot rely on the command "which" here since it doesn't always work.
36944 is_absolute_path=`$ECHO "$path" | $GREP ^/`
36945 if test -z "$is_absolute_path"; then
36946 # Path to executable is not absolute. Find it.
36947 IFS_save="$IFS"
36948 IFS=:
36949 for p in $PATH; do
36950 if test -f "$p/$path" && test -x "$p/$path"; then
36951 new_path="$p/$path"
36952 break
36953 fi
36954 done
36955 IFS="$IFS_save"
36956 else
36957 # This is an absolute path, we can use it without further modifications.
36958 new_path="$path"
36959 fi
36960
36961 if test "x$new_path" = x; then
36962 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36963 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36964 has_space=`$ECHO "$complete" | $GREP " "`
36965 if test "x$has_space" != x; then
36966 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36967 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36968 fi
36969 as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36970 fi
36971 fi
36972
36973 # Now join together the path and the arguments once again
36974 if test "x$arguments" != xEOL; then
36975 new_complete="$new_path ${arguments% *}"
36976 else
36977 new_complete="$new_path"
36978 fi
36979
36980 if test "x$complete" != "x$new_complete"; then
36981 GNM="$new_complete"
36982 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
36983 $as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
36984 fi
36985 fi
36986
36987 elif test "x$OPENJDK_TARGET_OS" != xwindows; then
36988 # FIXME: we should unify this with the solaris case above.
36989
36990
36991 # Publish this variable in the help.
36992
36993
36994 if test "x$STRIP" = x; then
36995 # The variable is not set by user, try to locate tool using the code snippet
36996 if test -n "$ac_tool_prefix"; then
36997 for ac_prog in strip
36998 do
36999 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37000 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37002 $as_echo_n "checking for $ac_word... " >&6; }
37003 if ${ac_cv_prog_STRIP+:} false; then :
37004 $as_echo_n "(cached) " >&6
37005 else
37006 if test -n "$STRIP"; then
37007 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37008 else
37009 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37010 for as_dir in $PATH
37011 do
37012 IFS=$as_save_IFS
37013 test -z "$as_dir" && as_dir=.
37014 for ac_exec_ext in '' $ac_executable_extensions; do
37015 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37016 ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37017 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37018 break 2
37019 fi
37020 done
37021 done
37022 IFS=$as_save_IFS
37023
37024 fi
37025 fi
37026 STRIP=$ac_cv_prog_STRIP
37027 if test -n "$STRIP"; then
37028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37029 $as_echo "$STRIP" >&6; }
37030 else
37031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37032 $as_echo "no" >&6; }
37033 fi
37034
37035
37036 test -n "$STRIP" && break
37037 done
37038 fi
37039 if test -z "$STRIP"; then
37040 ac_ct_STRIP=$STRIP
37041 for ac_prog in strip
37042 do
37043 # Extract the first word of "$ac_prog", so it can be a program name with args.
37044 set dummy $ac_prog; ac_word=$2
37045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37046 $as_echo_n "checking for $ac_word... " >&6; }
37047 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37048 $as_echo_n "(cached) " >&6
37049 else
37050 if test -n "$ac_ct_STRIP"; then
37051 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37052 else
37053 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37054 for as_dir in $PATH
37055 do
37056 IFS=$as_save_IFS
37057 test -z "$as_dir" && as_dir=.
37058 for ac_exec_ext in '' $ac_executable_extensions; do
37059 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37060 ac_cv_prog_ac_ct_STRIP="$ac_prog"
37061 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37062 break 2
37063 fi
37064 done
37065 done
37066 IFS=$as_save_IFS
37067
37068 fi
37069 fi
37070 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37071 if test -n "$ac_ct_STRIP"; then
37072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37073 $as_echo "$ac_ct_STRIP" >&6; }
37074 else
37075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37076 $as_echo "no" >&6; }
37077 fi
37078
37079
37080 test -n "$ac_ct_STRIP" && break
37081 done
37082
37083 if test "x$ac_ct_STRIP" = x; then
37084 STRIP=""
37085 else
37086 case $cross_compiling:$ac_tool_warned in
37087 yes:)
37088 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37089 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37090 ac_tool_warned=yes ;;
37091 esac
37092 STRIP=$ac_ct_STRIP
37093 fi
37094 fi
37095
37096 else
37097 # The variable is set, but is it from the command line or the environment?
37098
37099 # Try to remove the string !STRIP! from our list.
37100 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
37101 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37102 # If it failed, the variable was not from the command line. Ignore it,
37103 # but warn the user (except for BASH, which is always set by the calling BASH).
37104 if test "xSTRIP" != xBASH; then
37105 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
37106 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
37107 fi
37108 # Try to locate tool using the code snippet
37109 if test -n "$ac_tool_prefix"; then
37110 for ac_prog in strip
37111 do
37112 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37113 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37115 $as_echo_n "checking for $ac_word... " >&6; }
37116 if ${ac_cv_prog_STRIP+:} false; then :
37117 $as_echo_n "(cached) " >&6
37118 else
37119 if test -n "$STRIP"; then
37120 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37121 else
37122 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37123 for as_dir in $PATH
37124 do
37125 IFS=$as_save_IFS
37126 test -z "$as_dir" && as_dir=.
37127 for ac_exec_ext in '' $ac_executable_extensions; do
37128 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37129 ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37130 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37131 break 2
37132 fi
37133 done
37134 done
37135 IFS=$as_save_IFS
37136
37137 fi
37138 fi
37139 STRIP=$ac_cv_prog_STRIP
37140 if test -n "$STRIP"; then
37141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37142 $as_echo "$STRIP" >&6; }
37143 else
37144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37145 $as_echo "no" >&6; }
37146 fi
37147
37148
37149 test -n "$STRIP" && break
37150 done
37151 fi
37152 if test -z "$STRIP"; then
37153 ac_ct_STRIP=$STRIP
37154 for ac_prog in strip
37155 do
37156 # Extract the first word of "$ac_prog", so it can be a program name with args.
37157 set dummy $ac_prog; ac_word=$2
37158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37159 $as_echo_n "checking for $ac_word... " >&6; }
37160 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37161 $as_echo_n "(cached) " >&6
37162 else
37163 if test -n "$ac_ct_STRIP"; then
37164 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37165 else
37166 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37167 for as_dir in $PATH
37168 do
37169 IFS=$as_save_IFS
37170 test -z "$as_dir" && as_dir=.
37171 for ac_exec_ext in '' $ac_executable_extensions; do
37172 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37173 ac_cv_prog_ac_ct_STRIP="$ac_prog"
37174 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37175 break 2
37176 fi
37177 done
37178 done
37179 IFS=$as_save_IFS
37180
37181 fi
37182 fi
37183 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37184 if test -n "$ac_ct_STRIP"; then
37185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37186 $as_echo "$ac_ct_STRIP" >&6; }
37187 else
37188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37189 $as_echo "no" >&6; }
37190 fi
37191
37192
37193 test -n "$ac_ct_STRIP" && break
37194 done
37195
37196 if test "x$ac_ct_STRIP" = x; then
37197 STRIP=""
37198 else
37199 case $cross_compiling:$ac_tool_warned in
37200 yes:)
37201 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37202 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37203 ac_tool_warned=yes ;;
37204 esac
37205 STRIP=$ac_ct_STRIP
37206 fi
37207 fi
37208
37209 else
37210 # If it succeeded, then it was overridden by the user. We will use it
37211 # for the tool.
37212
37213 # First remove it from the list of overridden variables, so we can test
37214 # for unknown variables in the end.
37215 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37216
37217 # Check if the provided tool contains a complete path.
37218 tool_specified="$STRIP"
37219 tool_basename="${tool_specified##*/}"
37220 if test "x$tool_basename" = "x$tool_specified"; then
37221 # A command without a complete path is provided, search $PATH.
37222 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
37223 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
37224 # Extract the first word of "$tool_basename", so it can be a program name with args.
37225 set dummy $tool_basename; ac_word=$2
37226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37227 $as_echo_n "checking for $ac_word... " >&6; }
37228 if ${ac_cv_path_STRIP+:} false; then :
37229 $as_echo_n "(cached) " >&6
37230 else
37231 case $STRIP in
37232 [\\/]* | ?:[\\/]*)
37233 ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37234 ;;
37235 *)
37236 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37237 for as_dir in $PATH
37238 do
37239 IFS=$as_save_IFS
37240 test -z "$as_dir" && as_dir=.
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_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37244 $as_echo "$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 ;;
37252 esac
37253 fi
37254 STRIP=$ac_cv_path_STRIP
37255 if test -n "$STRIP"; then
37256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37257 $as_echo "$STRIP" >&6; }
37258 else
37259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37260 $as_echo "no" >&6; }
37261 fi
37262
37263
37264 if test "x$STRIP" = x; then
37265 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37266 fi
37267 else
37268 # Otherwise we believe it is a complete path. Use it as it is.
37269 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
37270 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
37271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37272 $as_echo_n "checking for STRIP... " >&6; }
37273 if test ! -x "$tool_specified"; then
37274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37275 $as_echo "not found" >&6; }
37276 as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
37277 fi
37278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37279 $as_echo "$tool_specified" >&6; }
37280 fi
37281 fi
37282 fi
37283
37284
37285
37286 # Only process if variable expands to non-empty
37287
37288 if test "x$STRIP" != x; then
37289 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37290
37291 # First separate the path from the arguments. This will split at the first
37292 # space.
37293 complete="$STRIP"
37294 path="${complete%% *}"
37295 tmp="$complete EOL"
37296 arguments="${tmp#* }"
37297
37298 # Input might be given as Windows format, start by converting to
37299 # unix format.
37300 new_path=`$CYGPATH -u "$path"`
37301
37302 # Now try to locate executable using which
37303 new_path=`$WHICH "$new_path" 2> /dev/null`
37304 # bat and cmd files are not always considered executable in cygwin causing which
37305 # to not find them
37306 if test "x$new_path" = x \
37307 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37308 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37309 new_path=`$CYGPATH -u "$path"`
37310 fi
37311 if test "x$new_path" = x; then
37312 # Oops. Which didn't find the executable.
37313 # The splitting of arguments from the executable at a space might have been incorrect,
37314 # since paths with space are more likely in Windows. Give it another try with the whole
37315 # argument.
37316 path="$complete"
37317 arguments="EOL"
37318 new_path=`$CYGPATH -u "$path"`
37319 new_path=`$WHICH "$new_path" 2> /dev/null`
37320 # bat and cmd files are not always considered executable in cygwin causing which
37321 # to not find them
37322 if test "x$new_path" = x \
37323 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37324 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37325 new_path=`$CYGPATH -u "$path"`
37326 fi
37327 if test "x$new_path" = x; then
37328 # It's still not found. Now this is an unrecoverable error.
37329 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37330 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37331 has_space=`$ECHO "$complete" | $GREP " "`
37332 if test "x$has_space" != x; then
37333 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37334 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37335 fi
37336 as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37337 fi
37338 fi
37339
37340 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37341 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37342 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37343 # "foo.exe" is OK but "foo" is an error.
37344 #
37345 # This test is therefore slightly more accurate than "test -f" to check for file presence.
37346 # It is also a way to make sure we got the proper file name for the real test later on.
37347 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37348 if test "x$test_shortpath" = x; then
37349 # Short path failed, file does not exist as specified.
37350 # Try adding .exe or .cmd
37351 if test -f "${new_path}.exe"; then
37352 input_to_shortpath="${new_path}.exe"
37353 elif test -f "${new_path}.cmd"; then
37354 input_to_shortpath="${new_path}.cmd"
37355 else
37356 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
37357 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
37358 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37359 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37360 as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37361 fi
37362 else
37363 input_to_shortpath="$new_path"
37364 fi
37365
37366 # Call helper function which possibly converts this using DOS-style short mode.
37367 # If so, the updated path is stored in $new_path.
37368 new_path="$input_to_shortpath"
37369
37370 input_path="$input_to_shortpath"
37371 # Check if we need to convert this using DOS-style short mode. If the path
37372 # contains just simple characters, use it. Otherwise (spaces, weird characters),
37373 # take no chances and rewrite it.
37374 # Note: m4 eats our [], so we need to use [ and ] instead.
37375 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37376 if test "x$has_forbidden_chars" != x; then
37377 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37378 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37379 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37380 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37381 # Going to short mode and back again did indeed matter. Since short mode is
37382 # case insensitive, let's make it lowercase to improve readability.
37383 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37384 # Now convert it back to Unix-style (cygpath)
37385 input_path=`$CYGPATH -u "$shortmode_path"`
37386 new_path="$input_path"
37387 fi
37388 fi
37389
37390 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37391 if test "x$test_cygdrive_prefix" = x; then
37392 # As a simple fix, exclude /usr/bin since it's not a real path.
37393 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37394 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37395 # a path prefixed by /cygdrive for fixpath to work.
37396 new_path="$CYGWIN_ROOT_PATH$input_path"
37397 fi
37398 fi
37399
37400 # remove trailing .exe if any
37401 new_path="${new_path/%.exe/}"
37402
37403 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37404
37405 # First separate the path from the arguments. This will split at the first
37406 # space.
37407 complete="$STRIP"
37408 path="${complete%% *}"
37409 tmp="$complete EOL"
37410 arguments="${tmp#* }"
37411
37412 # Input might be given as Windows format, start by converting to
37413 # unix format.
37414 new_path="$path"
37415
37416 windows_path="$new_path"
37417 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37418 unix_path=`$CYGPATH -u "$windows_path"`
37419 new_path="$unix_path"
37420 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37421 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37422 new_path="$unix_path"
37423 fi
37424
37425
37426 # Now try to locate executable using which
37427 new_path=`$WHICH "$new_path" 2> /dev/null`
37428
37429 if test "x$new_path" = x; then
37430 # Oops. Which didn't find the executable.
37431 # The splitting of arguments from the executable at a space might have been incorrect,
37432 # since paths with space are more likely in Windows. Give it another try with the whole
37433 # argument.
37434 path="$complete"
37435 arguments="EOL"
37436 new_path="$path"
37437
37438 windows_path="$new_path"
37439 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37440 unix_path=`$CYGPATH -u "$windows_path"`
37441 new_path="$unix_path"
37442 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37443 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37444 new_path="$unix_path"
37445 fi
37446
37447
37448 new_path=`$WHICH "$new_path" 2> /dev/null`
37449 # bat and cmd files are not always considered executable in MSYS causing which
37450 # to not find them
37451 if test "x$new_path" = x \
37452 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37453 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37454 new_path="$path"
37455
37456 windows_path="$new_path"
37457 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37458 unix_path=`$CYGPATH -u "$windows_path"`
37459 new_path="$unix_path"
37460 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37461 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37462 new_path="$unix_path"
37463 fi
37464
37465 fi
37466
37467 if test "x$new_path" = x; then
37468 # It's still not found. Now this is an unrecoverable error.
37469 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37470 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37471 has_space=`$ECHO "$complete" | $GREP " "`
37472 if test "x$has_space" != x; then
37473 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37474 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37475 fi
37476 as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37477 fi
37478 fi
37479
37480 # Now new_path has a complete unix path to the binary
37481 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37482 # Keep paths in /bin as-is, but remove trailing .exe if any
37483 new_path="${new_path/%.exe/}"
37484 # Do not save /bin paths to all_fixpath_prefixes!
37485 else
37486 # Not in mixed or Windows style, start by that.
37487 new_path=`cmd //c echo $new_path`
37488
37489 input_path="$new_path"
37490 # Check if we need to convert this using DOS-style short mode. If the path
37491 # contains just simple characters, use it. Otherwise (spaces, weird characters),
37492 # take no chances and rewrite it.
37493 # Note: m4 eats our [], so we need to use [ and ] instead.
37494 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37495 if test "x$has_forbidden_chars" != x; then
37496 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37497 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37498 fi
37499
37500 # Output is in $new_path
37501
37502 windows_path="$new_path"
37503 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37504 unix_path=`$CYGPATH -u "$windows_path"`
37505 new_path="$unix_path"
37506 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37507 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37508 new_path="$unix_path"
37509 fi
37510
37511 # remove trailing .exe if any
37512 new_path="${new_path/%.exe/}"
37513
37514 # Save the first 10 bytes of this path to the storage, so fixpath can work.
37515 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37516 fi
37517
37518 else
37519 # We're on a unix platform. Hooray! :)
37520 # First separate the path from the arguments. This will split at the first
37521 # space.
37522 complete="$STRIP"
37523 path="${complete%% *}"
37524 tmp="$complete EOL"
37525 arguments="${tmp#* }"
37526
37527 # Cannot rely on the command "which" here since it doesn't always work.
37528 is_absolute_path=`$ECHO "$path" | $GREP ^/`
37529 if test -z "$is_absolute_path"; then
37530 # Path to executable is not absolute. Find it.
37531 IFS_save="$IFS"
37532 IFS=:
37533 for p in $PATH; do
37534 if test -f "$p/$path" && test -x "$p/$path"; then
37535 new_path="$p/$path"
37536 break
37537 fi
37538 done
37539 IFS="$IFS_save"
37540 else
37541 # This is an absolute path, we can use it without further modifications.
37542 new_path="$path"
37543 fi
37544
37545 if test "x$new_path" = x; then
37546 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37547 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37548 has_space=`$ECHO "$complete" | $GREP " "`
37549 if test "x$has_space" != x; then
37550 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37551 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37552 fi
37553 as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37554 fi
37555 fi
37556
37557 # Now join together the path and the arguments once again
37558 if test "x$arguments" != xEOL; then
37559 new_complete="$new_path ${arguments% *}"
37560 else
37561 new_complete="$new_path"
37562 fi
37563
37564 if test "x$complete" != "x$new_complete"; then
37565 STRIP="$new_complete"
37566 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37567 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37568 fi
37569 fi
37570
37571
37572
37573 # Publish this variable in the help.
37574
37575
37576 if test "x$NM" = x; then
37577 # The variable is not set by user, try to locate tool using the code snippet
37578 if test -n "$ac_tool_prefix"; then
37579 for ac_prog in nm
37580 do
37581 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37582 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37584 $as_echo_n "checking for $ac_word... " >&6; }
37585 if ${ac_cv_prog_NM+:} false; then :
37586 $as_echo_n "(cached) " >&6
37587 else
37588 if test -n "$NM"; then
37589 ac_cv_prog_NM="$NM" # Let the user override the test.
37590 else
37591 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37592 for as_dir in $PATH
37593 do
37594 IFS=$as_save_IFS
37595 test -z "$as_dir" && as_dir=.
37596 for ac_exec_ext in '' $ac_executable_extensions; do
37597 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37598 ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37599 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37600 break 2
37601 fi
37602 done
37603 done
37604 IFS=$as_save_IFS
37605
37606 fi
37607 fi
37608 NM=$ac_cv_prog_NM
37609 if test -n "$NM"; then
37610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37611 $as_echo "$NM" >&6; }
37612 else
37613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37614 $as_echo "no" >&6; }
37615 fi
37616
37617
37618 test -n "$NM" && break
37619 done
37620 fi
37621 if test -z "$NM"; then
37622 ac_ct_NM=$NM
37623 for ac_prog in nm
37624 do
37625 # Extract the first word of "$ac_prog", so it can be a program name with args.
37626 set dummy $ac_prog; ac_word=$2
37627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37628 $as_echo_n "checking for $ac_word... " >&6; }
37629 if ${ac_cv_prog_ac_ct_NM+:} false; then :
37630 $as_echo_n "(cached) " >&6
37631 else
37632 if test -n "$ac_ct_NM"; then
37633 ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37634 else
37635 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37636 for as_dir in $PATH
37637 do
37638 IFS=$as_save_IFS
37639 test -z "$as_dir" && as_dir=.
37640 for ac_exec_ext in '' $ac_executable_extensions; do
37641 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37642 ac_cv_prog_ac_ct_NM="$ac_prog"
37643 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37644 break 2
37645 fi
37646 done
37647 done
37648 IFS=$as_save_IFS
37649
37650 fi
37651 fi
37652 ac_ct_NM=$ac_cv_prog_ac_ct_NM
37653 if test -n "$ac_ct_NM"; then
37654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37655 $as_echo "$ac_ct_NM" >&6; }
37656 else
37657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37658 $as_echo "no" >&6; }
37659 fi
37660
37661
37662 test -n "$ac_ct_NM" && break
37663 done
37664
37665 if test "x$ac_ct_NM" = x; then
37666 NM=""
37667 else
37668 case $cross_compiling:$ac_tool_warned in
37669 yes:)
37670 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37671 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37672 ac_tool_warned=yes ;;
37673 esac
37674 NM=$ac_ct_NM
37675 fi
37676 fi
37677
37678 else
37679 # The variable is set, but is it from the command line or the environment?
37680
37681 # Try to remove the string !NM! from our list.
37682 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37683 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37684 # If it failed, the variable was not from the command line. Ignore it,
37685 # but warn the user (except for BASH, which is always set by the calling BASH).
37686 if test "xNM" != xBASH; then
37687 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37688 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37689 fi
37690 # Try to locate tool using the code snippet
37691 if test -n "$ac_tool_prefix"; then
37692 for ac_prog in nm
37693 do
37694 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37695 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37697 $as_echo_n "checking for $ac_word... " >&6; }
37698 if ${ac_cv_prog_NM+:} false; then :
37699 $as_echo_n "(cached) " >&6
37700 else
37701 if test -n "$NM"; then
37702 ac_cv_prog_NM="$NM" # Let the user override the test.
37703 else
37704 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37705 for as_dir in $PATH
37706 do
37707 IFS=$as_save_IFS
37708 test -z "$as_dir" && as_dir=.
37709 for ac_exec_ext in '' $ac_executable_extensions; do
37710 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37711 ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37712 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37713 break 2
37714 fi
37715 done
37716 done
37717 IFS=$as_save_IFS
37718
37719 fi
37720 fi
37721 NM=$ac_cv_prog_NM
37722 if test -n "$NM"; then
37723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37724 $as_echo "$NM" >&6; }
37725 else
37726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37727 $as_echo "no" >&6; }
37728 fi
37729
37730
37731 test -n "$NM" && break
37732 done
37733 fi
37734 if test -z "$NM"; then
37735 ac_ct_NM=$NM
37736 for ac_prog in nm
37737 do
37738 # Extract the first word of "$ac_prog", so it can be a program name with args.
37739 set dummy $ac_prog; ac_word=$2
37740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37741 $as_echo_n "checking for $ac_word... " >&6; }
37742 if ${ac_cv_prog_ac_ct_NM+:} false; then :
37743 $as_echo_n "(cached) " >&6
37744 else
37745 if test -n "$ac_ct_NM"; then
37746 ac_cv_prog_ac_ct_NM="$ac_ct_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 test -z "$as_dir" && as_dir=.
37753 for ac_exec_ext in '' $ac_executable_extensions; do
37754 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37755 ac_cv_prog_ac_ct_NM="$ac_prog"
37756 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37757 break 2
37758 fi
37759 done
37760 done
37761 IFS=$as_save_IFS
37762
37763 fi
37764 fi
37765 ac_ct_NM=$ac_cv_prog_ac_ct_NM
37766 if test -n "$ac_ct_NM"; then
37767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37768 $as_echo "$ac_ct_NM" >&6; }
37769 else
37770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37771 $as_echo "no" >&6; }
37772 fi
37773
37774
37775 test -n "$ac_ct_NM" && break
37776 done
37777
37778 if test "x$ac_ct_NM" = x; then
37779 NM=""
37780 else
37781 case $cross_compiling:$ac_tool_warned in
37782 yes:)
37783 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37784 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37785 ac_tool_warned=yes ;;
37786 esac
37787 NM=$ac_ct_NM
37788 fi
37789 fi
37790
37791 else
37792 # If it succeeded, then it was overridden by the user. We will use it
37793 # for the tool.
37794
37795 # First remove it from the list of overridden variables, so we can test
37796 # for unknown variables in the end.
37797 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37798
37799 # Check if the provided tool contains a complete path.
37800 tool_specified="$NM"
37801 tool_basename="${tool_specified##*/}"
37802 if test "x$tool_basename" = "x$tool_specified"; then
37803 # A command without a complete path is provided, search $PATH.
37804 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37805 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37806 # Extract the first word of "$tool_basename", so it can be a program name with args.
37807 set dummy $tool_basename; ac_word=$2
37808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37809 $as_echo_n "checking for $ac_word... " >&6; }
37810 if ${ac_cv_path_NM+:} false; then :
37811 $as_echo_n "(cached) " >&6
37812 else
37813 case $NM in
37814 [\\/]* | ?:[\\/]*)
37815 ac_cv_path_NM="$NM" # Let the user override the test with a path.
37816 ;;
37817 *)
37818 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37819 for as_dir in $PATH
37820 do
37821 IFS=$as_save_IFS
37822 test -z "$as_dir" && as_dir=.
37823 for ac_exec_ext in '' $ac_executable_extensions; do
37824 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37825 ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37826 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37827 break 2
37828 fi
37829 done
37830 done
37831 IFS=$as_save_IFS
37832
37833 ;;
37834 esac
37835 fi
37836 NM=$ac_cv_path_NM
37837 if test -n "$NM"; then
37838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37839 $as_echo "$NM" >&6; }
37840 else
37841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37842 $as_echo "no" >&6; }
37843 fi
37844
37845
37846 if test "x$NM" = x; then
37847 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37848 fi
37849 else
37850 # Otherwise we believe it is a complete path. Use it as it is.
37851 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37852 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37854 $as_echo_n "checking for NM... " >&6; }
37855 if test ! -x "$tool_specified"; then
37856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37857 $as_echo "not found" >&6; }
37858 as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37859 fi
37860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37861 $as_echo "$tool_specified" >&6; }
37862 fi
37863 fi
37864 fi
37865
37866
37867
37868 # Only process if variable expands to non-empty
37869
37870 if test "x$NM" != x; then
37871 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37872
37873 # First separate the path from the arguments. This will split at the first
37874 # space.
37875 complete="$NM"
37876 path="${complete%% *}"
37877 tmp="$complete EOL"
37878 arguments="${tmp#* }"
37879
37880 # Input might be given as Windows format, start by converting to
37881 # unix format.
37882 new_path=`$CYGPATH -u "$path"`
37883
37884 # Now try to locate executable using which
37885 new_path=`$WHICH "$new_path" 2> /dev/null`
37886 # bat and cmd files are not always considered executable in cygwin causing which
37887 # to not find them
37888 if test "x$new_path" = x \
37889 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37890 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37891 new_path=`$CYGPATH -u "$path"`
37892 fi
37893 if test "x$new_path" = x; then
37894 # Oops. Which didn't find the executable.
37895 # The splitting of arguments from the executable at a space might have been incorrect,
37896 # since paths with space are more likely in Windows. Give it another try with the whole
37897 # argument.
37898 path="$complete"
37899 arguments="EOL"
37900 new_path=`$CYGPATH -u "$path"`
37901 new_path=`$WHICH "$new_path" 2> /dev/null`
37902 # bat and cmd files are not always considered executable in cygwin causing which
37903 # to not find them
37904 if test "x$new_path" = x \
37905 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37906 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37907 new_path=`$CYGPATH -u "$path"`
37908 fi
37909 if test "x$new_path" = x; then
37910 # It's still not found. Now this is an unrecoverable error.
37911 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37912 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37913 has_space=`$ECHO "$complete" | $GREP " "`
37914 if test "x$has_space" != x; then
37915 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37916 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37917 fi
37918 as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37919 fi
37920 fi
37921
37922 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37923 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37924 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37925 # "foo.exe" is OK but "foo" is an error.
37926 #
37927 # This test is therefore slightly more accurate than "test -f" to check for file presence.
37928 # It is also a way to make sure we got the proper file name for the real test later on.
37929 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37930 if test "x$test_shortpath" = x; then
37931 # Short path failed, file does not exist as specified.
37932 # Try adding .exe or .cmd
37933 if test -f "${new_path}.exe"; then
37934 input_to_shortpath="${new_path}.exe"
37935 elif test -f "${new_path}.cmd"; then
37936 input_to_shortpath="${new_path}.cmd"
37937 else
37938 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
37939 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
37940 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37941 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37942 as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37943 fi
37944 else
37945 input_to_shortpath="$new_path"
37946 fi
37947
37948 # Call helper function which possibly converts this using DOS-style short mode.
37949 # If so, the updated path is stored in $new_path.
37950 new_path="$input_to_shortpath"
37951
37952 input_path="$input_to_shortpath"
37953 # Check if we need to convert this using DOS-style short mode. If the path
37954 # contains just simple characters, use it. Otherwise (spaces, weird characters),
37955 # take no chances and rewrite it.
37956 # Note: m4 eats our [], so we need to use [ and ] instead.
37957 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37958 if test "x$has_forbidden_chars" != x; then
37959 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37960 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37961 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37962 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37963 # Going to short mode and back again did indeed matter. Since short mode is
37964 # case insensitive, let's make it lowercase to improve readability.
37965 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37966 # Now convert it back to Unix-style (cygpath)
37967 input_path=`$CYGPATH -u "$shortmode_path"`
37968 new_path="$input_path"
37969 fi
37970 fi
37971
37972 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37973 if test "x$test_cygdrive_prefix" = x; then
37974 # As a simple fix, exclude /usr/bin since it's not a real path.
37975 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37976 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37977 # a path prefixed by /cygdrive for fixpath to work.
37978 new_path="$CYGWIN_ROOT_PATH$input_path"
37979 fi
37980 fi
37981
37982 # remove trailing .exe if any
37983 new_path="${new_path/%.exe/}"
37984
37985 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37986
37987 # First separate the path from the arguments. This will split at the first
37988 # space.
37989 complete="$NM"
37990 path="${complete%% *}"
37991 tmp="$complete EOL"
37992 arguments="${tmp#* }"
37993
37994 # Input might be given as Windows format, start by converting to
37995 # unix format.
37996 new_path="$path"
37997
37998 windows_path="$new_path"
37999 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38000 unix_path=`$CYGPATH -u "$windows_path"`
38001 new_path="$unix_path"
38002 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38003 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38004 new_path="$unix_path"
38005 fi
38006
38007
38008 # Now try to locate executable using which
38009 new_path=`$WHICH "$new_path" 2> /dev/null`
38010
38011 if test "x$new_path" = x; then
38012 # Oops. Which didn't find the executable.
38013 # The splitting of arguments from the executable at a space might have been incorrect,
38014 # since paths with space are more likely in Windows. Give it another try with the whole
38015 # argument.
38016 path="$complete"
38017 arguments="EOL"
38018 new_path="$path"
38019
38020 windows_path="$new_path"
38021 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38022 unix_path=`$CYGPATH -u "$windows_path"`
38023 new_path="$unix_path"
38024 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38025 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38026 new_path="$unix_path"
38027 fi
38028
38029
38030 new_path=`$WHICH "$new_path" 2> /dev/null`
38031 # bat and cmd files are not always considered executable in MSYS causing which
38032 # to not find them
38033 if test "x$new_path" = x \
38034 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38035 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38036 new_path="$path"
38037
38038 windows_path="$new_path"
38039 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38040 unix_path=`$CYGPATH -u "$windows_path"`
38041 new_path="$unix_path"
38042 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38043 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38044 new_path="$unix_path"
38045 fi
38046
38047 fi
38048
38049 if test "x$new_path" = x; then
38050 # It's still not found. Now this is an unrecoverable error.
38051 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38052 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38053 has_space=`$ECHO "$complete" | $GREP " "`
38054 if test "x$has_space" != x; then
38055 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38056 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38057 fi
38058 as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38059 fi
38060 fi
38061
38062 # Now new_path has a complete unix path to the binary
38063 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38064 # Keep paths in /bin as-is, but remove trailing .exe if any
38065 new_path="${new_path/%.exe/}"
38066 # Do not save /bin paths to all_fixpath_prefixes!
38067 else
38068 # Not in mixed or Windows style, start by that.
38069 new_path=`cmd //c echo $new_path`
38070
38071 input_path="$new_path"
38072 # Check if we need to convert this using DOS-style short mode. If the path
38073 # contains just simple characters, use it. Otherwise (spaces, weird characters),
38074 # take no chances and rewrite it.
38075 # Note: m4 eats our [], so we need to use [ and ] instead.
38076 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38077 if test "x$has_forbidden_chars" != x; then
38078 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38079 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38080 fi
38081
38082 # Output is in $new_path
38083
38084 windows_path="$new_path"
38085 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38086 unix_path=`$CYGPATH -u "$windows_path"`
38087 new_path="$unix_path"
38088 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38089 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38090 new_path="$unix_path"
38091 fi
38092
38093 # remove trailing .exe if any
38094 new_path="${new_path/%.exe/}"
38095
38096 # Save the first 10 bytes of this path to the storage, so fixpath can work.
38097 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38098 fi
38099
38100 else
38101 # We're on a unix platform. Hooray! :)
38102 # First separate the path from the arguments. This will split at the first
38103 # space.
38104 complete="$NM"
38105 path="${complete%% *}"
38106 tmp="$complete EOL"
38107 arguments="${tmp#* }"
38108
38109 # Cannot rely on the command "which" here since it doesn't always work.
38110 is_absolute_path=`$ECHO "$path" | $GREP ^/`
38111 if test -z "$is_absolute_path"; then
38112 # Path to executable is not absolute. Find it.
38113 IFS_save="$IFS"
38114 IFS=:
38115 for p in $PATH; do
38116 if test -f "$p/$path" && test -x "$p/$path"; then
38117 new_path="$p/$path"
38118 break
38119 fi
38120 done
38121 IFS="$IFS_save"
38122 else
38123 # This is an absolute path, we can use it without further modifications.
38124 new_path="$path"
38125 fi
38126
38127 if test "x$new_path" = x; then
38128 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38129 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38130 has_space=`$ECHO "$complete" | $GREP " "`
38131 if test "x$has_space" != x; then
38132 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38133 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38134 fi
38135 as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38136 fi
38137 fi
38138
38139 # Now join together the path and the arguments once again
38140 if test "x$arguments" != xEOL; then
38141 new_complete="$new_path ${arguments% *}"
38142 else
38143 new_complete="$new_path"
38144 fi
38145
38146 if test "x$complete" != "x$new_complete"; then
38147 NM="$new_complete"
38148 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
38149 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
38150 fi
38151 fi
38152
38153 GNM="$NM"
38154
38155 fi
38156
38157 # objcopy is used for moving debug symbols to separate files when
38158 # full debug symbols are enabled.
38159 if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
38160
38161
38162 # Publish this variable in the help.
38163
38164
38165 if test "x$OBJCOPY" = x; then
38166 # The variable is not set by user, try to locate tool using the code snippet
38167 if test -n "$ac_tool_prefix"; then
38168 for ac_prog in gobjcopy objcopy
38169 do
38170 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38171 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38173 $as_echo_n "checking for $ac_word... " >&6; }
38174 if ${ac_cv_prog_OBJCOPY+:} false; then :
38175 $as_echo_n "(cached) " >&6
38176 else
38177 if test -n "$OBJCOPY"; then
38178 ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38179 else
38180 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38181 for as_dir in $PATH
38182 do
38183 IFS=$as_save_IFS
38184 test -z "$as_dir" && as_dir=.
38185 for ac_exec_ext in '' $ac_executable_extensions; do
38186 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38187 ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38188 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38189 break 2
38190 fi
38191 done
38192 done
38193 IFS=$as_save_IFS
38194
38195 fi
38196 fi
38197 OBJCOPY=$ac_cv_prog_OBJCOPY
38198 if test -n "$OBJCOPY"; then
38199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38200 $as_echo "$OBJCOPY" >&6; }
38201 else
38202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38203 $as_echo "no" >&6; }
38204 fi
38205
38206
38207 test -n "$OBJCOPY" && break
38208 done
38209 fi
38210 if test -z "$OBJCOPY"; then
38211 ac_ct_OBJCOPY=$OBJCOPY
38212 for ac_prog in gobjcopy objcopy
38213 do
38214 # Extract the first word of "$ac_prog", so it can be a program name with args.
38215 set dummy $ac_prog; ac_word=$2
38216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38217 $as_echo_n "checking for $ac_word... " >&6; }
38218 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38219 $as_echo_n "(cached) " >&6
38220 else
38221 if test -n "$ac_ct_OBJCOPY"; then
38222 ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38223 else
38224 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38225 for as_dir in $PATH
38226 do
38227 IFS=$as_save_IFS
38228 test -z "$as_dir" && as_dir=.
38229 for ac_exec_ext in '' $ac_executable_extensions; do
38230 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38231 ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38232 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38233 break 2
38234 fi
38235 done
38236 done
38237 IFS=$as_save_IFS
38238
38239 fi
38240 fi
38241 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38242 if test -n "$ac_ct_OBJCOPY"; then
38243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38244 $as_echo "$ac_ct_OBJCOPY" >&6; }
38245 else
38246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38247 $as_echo "no" >&6; }
38248 fi
38249
38250
38251 test -n "$ac_ct_OBJCOPY" && break
38252 done
38253
38254 if test "x$ac_ct_OBJCOPY" = x; then
38255 OBJCOPY=""
38256 else
38257 case $cross_compiling:$ac_tool_warned in
38258 yes:)
38259 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38260 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38261 ac_tool_warned=yes ;;
38262 esac
38263 OBJCOPY=$ac_ct_OBJCOPY
38264 fi
38265 fi
38266
38267 else
38268 # The variable is set, but is it from the command line or the environment?
38269
38270 # Try to remove the string !OBJCOPY! from our list.
38271 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
38272 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38273 # If it failed, the variable was not from the command line. Ignore it,
38274 # but warn the user (except for BASH, which is always set by the calling BASH).
38275 if test "xOBJCOPY" != xBASH; then
38276 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
38277 $as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
38278 fi
38279 # Try to locate tool using the code snippet
38280 if test -n "$ac_tool_prefix"; then
38281 for ac_prog in gobjcopy objcopy
38282 do
38283 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38284 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38286 $as_echo_n "checking for $ac_word... " >&6; }
38287 if ${ac_cv_prog_OBJCOPY+:} false; then :
38288 $as_echo_n "(cached) " >&6
38289 else
38290 if test -n "$OBJCOPY"; then
38291 ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38292 else
38293 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38294 for as_dir in $PATH
38295 do
38296 IFS=$as_save_IFS
38297 test -z "$as_dir" && as_dir=.
38298 for ac_exec_ext in '' $ac_executable_extensions; do
38299 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38300 ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38301 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38302 break 2
38303 fi
38304 done
38305 done
38306 IFS=$as_save_IFS
38307
38308 fi
38309 fi
38310 OBJCOPY=$ac_cv_prog_OBJCOPY
38311 if test -n "$OBJCOPY"; then
38312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38313 $as_echo "$OBJCOPY" >&6; }
38314 else
38315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38316 $as_echo "no" >&6; }
38317 fi
38318
38319
38320 test -n "$OBJCOPY" && break
38321 done
38322 fi
38323 if test -z "$OBJCOPY"; then
38324 ac_ct_OBJCOPY=$OBJCOPY
38325 for ac_prog in gobjcopy objcopy
38326 do
38327 # Extract the first word of "$ac_prog", so it can be a program name with args.
38328 set dummy $ac_prog; ac_word=$2
38329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38330 $as_echo_n "checking for $ac_word... " >&6; }
38331 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38332 $as_echo_n "(cached) " >&6
38333 else
38334 if test -n "$ac_ct_OBJCOPY"; then
38335 ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38336 else
38337 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38338 for as_dir in $PATH
38339 do
38340 IFS=$as_save_IFS
38341 test -z "$as_dir" && as_dir=.
38342 for ac_exec_ext in '' $ac_executable_extensions; do
38343 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38344 ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38345 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38346 break 2
38347 fi
38348 done
38349 done
38350 IFS=$as_save_IFS
38351
38352 fi
38353 fi
38354 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38355 if test -n "$ac_ct_OBJCOPY"; then
38356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38357 $as_echo "$ac_ct_OBJCOPY" >&6; }
38358 else
38359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38360 $as_echo "no" >&6; }
38361 fi
38362
38363
38364 test -n "$ac_ct_OBJCOPY" && break
38365 done
38366
38367 if test "x$ac_ct_OBJCOPY" = x; then
38368 OBJCOPY=""
38369 else
38370 case $cross_compiling:$ac_tool_warned in
38371 yes:)
38372 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38373 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38374 ac_tool_warned=yes ;;
38375 esac
38376 OBJCOPY=$ac_ct_OBJCOPY
38377 fi
38378 fi
38379
38380 else
38381 # If it succeeded, then it was overridden by the user. We will use it
38382 # for the tool.
38383
38384 # First remove it from the list of overridden variables, so we can test
38385 # for unknown variables in the end.
38386 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38387
38388 # Check if the provided tool contains a complete path.
38389 tool_specified="$OBJCOPY"
38390 tool_basename="${tool_specified##*/}"
38391 if test "x$tool_basename" = "x$tool_specified"; then
38392 # A command without a complete path is provided, search $PATH.
38393 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
38394 $as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
38395 # Extract the first word of "$tool_basename", so it can be a program name with args.
38396 set dummy $tool_basename; ac_word=$2
38397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38398 $as_echo_n "checking for $ac_word... " >&6; }
38399 if ${ac_cv_path_OBJCOPY+:} false; then :
38400 $as_echo_n "(cached) " >&6
38401 else
38402 case $OBJCOPY in
38403 [\\/]* | ?:[\\/]*)
38404 ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
38405 ;;
38406 *)
38407 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38408 for as_dir in $PATH
38409 do
38410 IFS=$as_save_IFS
38411 test -z "$as_dir" && as_dir=.
38412 for ac_exec_ext in '' $ac_executable_extensions; do
38413 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38414 ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
38415 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38416 break 2
38417 fi
38418 done
38419 done
38420 IFS=$as_save_IFS
38421
38422 ;;
38423 esac
38424 fi
38425 OBJCOPY=$ac_cv_path_OBJCOPY
38426 if test -n "$OBJCOPY"; then
38427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38428 $as_echo "$OBJCOPY" >&6; }
38429 else
38430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38431 $as_echo "no" >&6; }
38432 fi
38433
38434
38435 if test "x$OBJCOPY" = x; then
38436 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38437 fi
38438 else
38439 # Otherwise we believe it is a complete path. Use it as it is.
38440 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
38441 $as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
38442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
38443 $as_echo_n "checking for OBJCOPY... " >&6; }
38444 if test ! -x "$tool_specified"; then
38445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38446 $as_echo "not found" >&6; }
38447 as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
38448 fi
38449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38450 $as_echo "$tool_specified" >&6; }
38451 fi
38452 fi
38453 fi
38454
38455
38456 # Only call fixup if objcopy was found.
38457 if test -n "$OBJCOPY"; then
38458
38459 # Only process if variable expands to non-empty
38460
38461 if test "x$OBJCOPY" != x; then
38462 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38463
38464 # First separate the path from the arguments. This will split at the first
38465 # space.
38466 complete="$OBJCOPY"
38467 path="${complete%% *}"
38468 tmp="$complete EOL"
38469 arguments="${tmp#* }"
38470
38471 # Input might be given as Windows format, start by converting to
38472 # unix format.
38473 new_path=`$CYGPATH -u "$path"`
38474
38475 # Now try to locate executable using which
38476 new_path=`$WHICH "$new_path" 2> /dev/null`
38477 # bat and cmd files are not always considered executable in cygwin causing which
38478 # to not find them
38479 if test "x$new_path" = x \
38480 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38481 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38482 new_path=`$CYGPATH -u "$path"`
38483 fi
38484 if test "x$new_path" = x; then
38485 # Oops. Which didn't find the executable.
38486 # The splitting of arguments from the executable at a space might have been incorrect,
38487 # since paths with space are more likely in Windows. Give it another try with the whole
38488 # argument.
38489 path="$complete"
38490 arguments="EOL"
38491 new_path=`$CYGPATH -u "$path"`
38492 new_path=`$WHICH "$new_path" 2> /dev/null`
38493 # bat and cmd files are not always considered executable in cygwin causing which
38494 # to not find them
38495 if test "x$new_path" = x \
38496 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38497 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38498 new_path=`$CYGPATH -u "$path"`
38499 fi
38500 if test "x$new_path" = x; then
38501 # It's still not found. Now this is an unrecoverable error.
38502 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38503 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38504 has_space=`$ECHO "$complete" | $GREP " "`
38505 if test "x$has_space" != x; then
38506 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38507 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38508 fi
38509 as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38510 fi
38511 fi
38512
38513 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38514 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38515 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38516 # "foo.exe" is OK but "foo" is an error.
38517 #
38518 # This test is therefore slightly more accurate than "test -f" to check for file presence.
38519 # It is also a way to make sure we got the proper file name for the real test later on.
38520 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38521 if test "x$test_shortpath" = x; then
38522 # Short path failed, file does not exist as specified.
38523 # Try adding .exe or .cmd
38524 if test -f "${new_path}.exe"; then
38525 input_to_shortpath="${new_path}.exe"
38526 elif test -f "${new_path}.cmd"; then
38527 input_to_shortpath="${new_path}.cmd"
38528 else
38529 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38530 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38531 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38532 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38533 as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38534 fi
38535 else
38536 input_to_shortpath="$new_path"
38537 fi
38538
38539 # Call helper function which possibly converts this using DOS-style short mode.
38540 # If so, the updated path is stored in $new_path.
38541 new_path="$input_to_shortpath"
38542
38543 input_path="$input_to_shortpath"
38544 # Check if we need to convert this using DOS-style short mode. If the path
38545 # contains just simple characters, use it. Otherwise (spaces, weird characters),
38546 # take no chances and rewrite it.
38547 # Note: m4 eats our [], so we need to use [ and ] instead.
38548 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38549 if test "x$has_forbidden_chars" != x; then
38550 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38551 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38552 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38553 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38554 # Going to short mode and back again did indeed matter. Since short mode is
38555 # case insensitive, let's make it lowercase to improve readability.
38556 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38557 # Now convert it back to Unix-style (cygpath)
38558 input_path=`$CYGPATH -u "$shortmode_path"`
38559 new_path="$input_path"
38560 fi
38561 fi
38562
38563 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38564 if test "x$test_cygdrive_prefix" = x; then
38565 # As a simple fix, exclude /usr/bin since it's not a real path.
38566 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38567 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38568 # a path prefixed by /cygdrive for fixpath to work.
38569 new_path="$CYGWIN_ROOT_PATH$input_path"
38570 fi
38571 fi
38572
38573 # remove trailing .exe if any
38574 new_path="${new_path/%.exe/}"
38575
38576 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38577
38578 # First separate the path from the arguments. This will split at the first
38579 # space.
38580 complete="$OBJCOPY"
38581 path="${complete%% *}"
38582 tmp="$complete EOL"
38583 arguments="${tmp#* }"
38584
38585 # Input might be given as Windows format, start by converting to
38586 # unix format.
38587 new_path="$path"
38588
38589 windows_path="$new_path"
38590 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38591 unix_path=`$CYGPATH -u "$windows_path"`
38592 new_path="$unix_path"
38593 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38594 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38595 new_path="$unix_path"
38596 fi
38597
38598
38599 # Now try to locate executable using which
38600 new_path=`$WHICH "$new_path" 2> /dev/null`
38601
38602 if test "x$new_path" = x; then
38603 # Oops. Which didn't find the executable.
38604 # The splitting of arguments from the executable at a space might have been incorrect,
38605 # since paths with space are more likely in Windows. Give it another try with the whole
38606 # argument.
38607 path="$complete"
38608 arguments="EOL"
38609 new_path="$path"
38610
38611 windows_path="$new_path"
38612 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38613 unix_path=`$CYGPATH -u "$windows_path"`
38614 new_path="$unix_path"
38615 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38616 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38617 new_path="$unix_path"
38618 fi
38619
38620
38621 new_path=`$WHICH "$new_path" 2> /dev/null`
38622 # bat and cmd files are not always considered executable in MSYS causing which
38623 # to not find them
38624 if test "x$new_path" = x \
38625 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38626 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38627 new_path="$path"
38628
38629 windows_path="$new_path"
38630 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38631 unix_path=`$CYGPATH -u "$windows_path"`
38632 new_path="$unix_path"
38633 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38634 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38635 new_path="$unix_path"
38636 fi
38637
38638 fi
38639
38640 if test "x$new_path" = x; then
38641 # It's still not found. Now this is an unrecoverable error.
38642 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38643 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38644 has_space=`$ECHO "$complete" | $GREP " "`
38645 if test "x$has_space" != x; then
38646 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38647 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38648 fi
38649 as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38650 fi
38651 fi
38652
38653 # Now new_path has a complete unix path to the binary
38654 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38655 # Keep paths in /bin as-is, but remove trailing .exe if any
38656 new_path="${new_path/%.exe/}"
38657 # Do not save /bin paths to all_fixpath_prefixes!
38658 else
38659 # Not in mixed or Windows style, start by that.
38660 new_path=`cmd //c echo $new_path`
38661
38662 input_path="$new_path"
38663 # Check if we need to convert this using DOS-style short mode. If the path
38664 # contains just simple characters, use it. Otherwise (spaces, weird characters),
38665 # take no chances and rewrite it.
38666 # Note: m4 eats our [], so we need to use [ and ] instead.
38667 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38668 if test "x$has_forbidden_chars" != x; then
38669 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38670 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38671 fi
38672
38673 # Output is in $new_path
38674
38675 windows_path="$new_path"
38676 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38677 unix_path=`$CYGPATH -u "$windows_path"`
38678 new_path="$unix_path"
38679 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38680 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38681 new_path="$unix_path"
38682 fi
38683
38684 # remove trailing .exe if any
38685 new_path="${new_path/%.exe/}"
38686
38687 # Save the first 10 bytes of this path to the storage, so fixpath can work.
38688 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38689 fi
38690
38691 else
38692 # We're on a unix platform. Hooray! :)
38693 # First separate the path from the arguments. This will split at the first
38694 # space.
38695 complete="$OBJCOPY"
38696 path="${complete%% *}"
38697 tmp="$complete EOL"
38698 arguments="${tmp#* }"
38699
38700 # Cannot rely on the command "which" here since it doesn't always work.
38701 is_absolute_path=`$ECHO "$path" | $GREP ^/`
38702 if test -z "$is_absolute_path"; then
38703 # Path to executable is not absolute. Find it.
38704 IFS_save="$IFS"
38705 IFS=:
38706 for p in $PATH; do
38707 if test -f "$p/$path" && test -x "$p/$path"; then
38708 new_path="$p/$path"
38709 break
38710 fi
38711 done
38712 IFS="$IFS_save"
38713 else
38714 # This is an absolute path, we can use it without further modifications.
38715 new_path="$path"
38716 fi
38717
38718 if test "x$new_path" = x; then
38719 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38720 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38721 has_space=`$ECHO "$complete" | $GREP " "`
38722 if test "x$has_space" != x; then
38723 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38724 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38725 fi
38726 as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38727 fi
38728 fi
38729
38730 # Now join together the path and the arguments once again
38731 if test "x$arguments" != xEOL; then
38732 new_complete="$new_path ${arguments% *}"
38733 else
38734 new_complete="$new_path"
38735 fi
38736
38737 if test "x$complete" != "x$new_complete"; then
38738 OBJCOPY="$new_complete"
38739 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38740 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38741 fi
38742 fi
38743
38744 fi
38745 fi
38746
38747
38748
38749 # Publish this variable in the help.
38750
38751
38752 if test "x$OBJDUMP" = x; then
38753 # The variable is not set by user, try to locate tool using the code snippet
38754 if test -n "$ac_tool_prefix"; then
38755 for ac_prog in gobjdump objdump
38756 do
38757 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38758 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38760 $as_echo_n "checking for $ac_word... " >&6; }
38761 if ${ac_cv_prog_OBJDUMP+:} false; then :
38762 $as_echo_n "(cached) " >&6
38763 else
38764 if test -n "$OBJDUMP"; then
38765 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38766 else
38767 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38768 for as_dir in $PATH
38769 do
38770 IFS=$as_save_IFS
38771 test -z "$as_dir" && as_dir=.
38772 for ac_exec_ext in '' $ac_executable_extensions; do
38773 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38774 ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38775 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38776 break 2
38777 fi
38778 done
38779 done
38780 IFS=$as_save_IFS
38781
38782 fi
38783 fi
38784 OBJDUMP=$ac_cv_prog_OBJDUMP
38785 if test -n "$OBJDUMP"; then
38786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38787 $as_echo "$OBJDUMP" >&6; }
38788 else
38789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38790 $as_echo "no" >&6; }
38791 fi
38792
38793
38794 test -n "$OBJDUMP" && break
38795 done
38796 fi
38797 if test -z "$OBJDUMP"; then
38798 ac_ct_OBJDUMP=$OBJDUMP
38799 for ac_prog in gobjdump objdump
38800 do
38801 # Extract the first word of "$ac_prog", so it can be a program name with args.
38802 set dummy $ac_prog; ac_word=$2
38803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38804 $as_echo_n "checking for $ac_word... " >&6; }
38805 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38806 $as_echo_n "(cached) " >&6
38807 else
38808 if test -n "$ac_ct_OBJDUMP"; then
38809 ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38810 else
38811 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38812 for as_dir in $PATH
38813 do
38814 IFS=$as_save_IFS
38815 test -z "$as_dir" && as_dir=.
38816 for ac_exec_ext in '' $ac_executable_extensions; do
38817 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38818 ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38819 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38820 break 2
38821 fi
38822 done
38823 done
38824 IFS=$as_save_IFS
38825
38826 fi
38827 fi
38828 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38829 if test -n "$ac_ct_OBJDUMP"; then
38830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38831 $as_echo "$ac_ct_OBJDUMP" >&6; }
38832 else
38833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38834 $as_echo "no" >&6; }
38835 fi
38836
38837
38838 test -n "$ac_ct_OBJDUMP" && break
38839 done
38840
38841 if test "x$ac_ct_OBJDUMP" = x; then
38842 OBJDUMP=""
38843 else
38844 case $cross_compiling:$ac_tool_warned in
38845 yes:)
38846 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38847 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38848 ac_tool_warned=yes ;;
38849 esac
38850 OBJDUMP=$ac_ct_OBJDUMP
38851 fi
38852 fi
38853
38854 else
38855 # The variable is set, but is it from the command line or the environment?
38856
38857 # Try to remove the string !OBJDUMP! from our list.
38858 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38859 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38860 # If it failed, the variable was not from the command line. Ignore it,
38861 # but warn the user (except for BASH, which is always set by the calling BASH).
38862 if test "xOBJDUMP" != xBASH; then
38863 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38864 $as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38865 fi
38866 # Try to locate tool using the code snippet
38867 if test -n "$ac_tool_prefix"; then
38868 for ac_prog in gobjdump objdump
38869 do
38870 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38871 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38873 $as_echo_n "checking for $ac_word... " >&6; }
38874 if ${ac_cv_prog_OBJDUMP+:} false; then :
38875 $as_echo_n "(cached) " >&6
38876 else
38877 if test -n "$OBJDUMP"; then
38878 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38879 else
38880 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38881 for as_dir in $PATH
38882 do
38883 IFS=$as_save_IFS
38884 test -z "$as_dir" && as_dir=.
38885 for ac_exec_ext in '' $ac_executable_extensions; do
38886 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38887 ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38888 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38889 break 2
38890 fi
38891 done
38892 done
38893 IFS=$as_save_IFS
38894
38895 fi
38896 fi
38897 OBJDUMP=$ac_cv_prog_OBJDUMP
38898 if test -n "$OBJDUMP"; then
38899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38900 $as_echo "$OBJDUMP" >&6; }
38901 else
38902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38903 $as_echo "no" >&6; }
38904 fi
38905
38906
38907 test -n "$OBJDUMP" && break
38908 done
38909 fi
38910 if test -z "$OBJDUMP"; then
38911 ac_ct_OBJDUMP=$OBJDUMP
38912 for ac_prog in gobjdump objdump
38913 do
38914 # Extract the first word of "$ac_prog", so it can be a program name with args.
38915 set dummy $ac_prog; ac_word=$2
38916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38917 $as_echo_n "checking for $ac_word... " >&6; }
38918 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38919 $as_echo_n "(cached) " >&6
38920 else
38921 if test -n "$ac_ct_OBJDUMP"; then
38922 ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38923 else
38924 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38925 for as_dir in $PATH
38926 do
38927 IFS=$as_save_IFS
38928 test -z "$as_dir" && as_dir=.
38929 for ac_exec_ext in '' $ac_executable_extensions; do
38930 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38931 ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38932 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38933 break 2
38934 fi
38935 done
38936 done
38937 IFS=$as_save_IFS
38938
38939 fi
38940 fi
38941 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38942 if test -n "$ac_ct_OBJDUMP"; then
38943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38944 $as_echo "$ac_ct_OBJDUMP" >&6; }
38945 else
38946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38947 $as_echo "no" >&6; }
38948 fi
38949
38950
38951 test -n "$ac_ct_OBJDUMP" && break
38952 done
38953
38954 if test "x$ac_ct_OBJDUMP" = x; then
38955 OBJDUMP=""
38956 else
38957 case $cross_compiling:$ac_tool_warned in
38958 yes:)
38959 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38960 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38961 ac_tool_warned=yes ;;
38962 esac
38963 OBJDUMP=$ac_ct_OBJDUMP
38964 fi
38965 fi
38966
38967 else
38968 # If it succeeded, then it was overridden by the user. We will use it
38969 # for the tool.
38970
38971 # First remove it from the list of overridden variables, so we can test
38972 # for unknown variables in the end.
38973 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38974
38975 # Check if the provided tool contains a complete path.
38976 tool_specified="$OBJDUMP"
38977 tool_basename="${tool_specified##*/}"
38978 if test "x$tool_basename" = "x$tool_specified"; then
38979 # A command without a complete path is provided, search $PATH.
38980 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
38981 $as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
38982 # Extract the first word of "$tool_basename", so it can be a program name with args.
38983 set dummy $tool_basename; ac_word=$2
38984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38985 $as_echo_n "checking for $ac_word... " >&6; }
38986 if ${ac_cv_path_OBJDUMP+:} false; then :
38987 $as_echo_n "(cached) " >&6
38988 else
38989 case $OBJDUMP in
38990 [\\/]* | ?:[\\/]*)
38991 ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
38992 ;;
38993 *)
38994 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38995 for as_dir in $PATH
38996 do
38997 IFS=$as_save_IFS
38998 test -z "$as_dir" && as_dir=.
38999 for ac_exec_ext in '' $ac_executable_extensions; do
39000 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39001 ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
39002 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39003 break 2
39004 fi
39005 done
39006 done
39007 IFS=$as_save_IFS
39008
39009 ;;
39010 esac
39011 fi
39012 OBJDUMP=$ac_cv_path_OBJDUMP
39013 if test -n "$OBJDUMP"; then
39014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
39015 $as_echo "$OBJDUMP" >&6; }
39016 else
39017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39018 $as_echo "no" >&6; }
39019 fi
39020
39021
39022 if test "x$OBJDUMP" = x; then
39023 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39024 fi
39025 else
39026 # Otherwise we believe it is a complete path. Use it as it is.
39027 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
39028 $as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
39029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
39030 $as_echo_n "checking for OBJDUMP... " >&6; }
39031 if test ! -x "$tool_specified"; then
39032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39033 $as_echo "not found" >&6; }
39034 as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
39035 fi
39036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39037 $as_echo "$tool_specified" >&6; }
39038 fi
39039 fi
39040 fi
39041
39042
39043 if test "x$OBJDUMP" != x; then
39044 # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
39045 # bails if argument is missing.
39046
39047 # Only process if variable expands to non-empty
39048
39049 if test "x$OBJDUMP" != x; then
39050 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39051
39052 # First separate the path from the arguments. This will split at the first
39053 # space.
39054 complete="$OBJDUMP"
39055 path="${complete%% *}"
39056 tmp="$complete EOL"
39057 arguments="${tmp#* }"
39058
39059 # Input might be given as Windows format, start by converting to
39060 # unix format.
39061 new_path=`$CYGPATH -u "$path"`
39062
39063 # Now try to locate executable using which
39064 new_path=`$WHICH "$new_path" 2> /dev/null`
39065 # bat and cmd files are not always considered executable in cygwin causing which
39066 # to not find them
39067 if test "x$new_path" = x \
39068 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39069 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39070 new_path=`$CYGPATH -u "$path"`
39071 fi
39072 if test "x$new_path" = x; then
39073 # Oops. Which didn't find the executable.
39074 # The splitting of arguments from the executable at a space might have been incorrect,
39075 # since paths with space are more likely in Windows. Give it another try with the whole
39076 # argument.
39077 path="$complete"
39078 arguments="EOL"
39079 new_path=`$CYGPATH -u "$path"`
39080 new_path=`$WHICH "$new_path" 2> /dev/null`
39081 # bat and cmd files are not always considered executable in cygwin causing which
39082 # to not find them
39083 if test "x$new_path" = x \
39084 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39085 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39086 new_path=`$CYGPATH -u "$path"`
39087 fi
39088 if test "x$new_path" = x; then
39089 # It's still not found. Now this is an unrecoverable error.
39090 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39091 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39092 has_space=`$ECHO "$complete" | $GREP " "`
39093 if test "x$has_space" != x; then
39094 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39095 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39096 fi
39097 as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39098 fi
39099 fi
39100
39101 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39102 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39103 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39104 # "foo.exe" is OK but "foo" is an error.
39105 #
39106 # This test is therefore slightly more accurate than "test -f" to check for file presence.
39107 # It is also a way to make sure we got the proper file name for the real test later on.
39108 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39109 if test "x$test_shortpath" = x; then
39110 # Short path failed, file does not exist as specified.
39111 # Try adding .exe or .cmd
39112 if test -f "${new_path}.exe"; then
39113 input_to_shortpath="${new_path}.exe"
39114 elif test -f "${new_path}.cmd"; then
39115 input_to_shortpath="${new_path}.cmd"
39116 else
39117 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
39118 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
39119 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39120 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39121 as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39122 fi
39123 else
39124 input_to_shortpath="$new_path"
39125 fi
39126
39127 # Call helper function which possibly converts this using DOS-style short mode.
39128 # If so, the updated path is stored in $new_path.
39129 new_path="$input_to_shortpath"
39130
39131 input_path="$input_to_shortpath"
39132 # Check if we need to convert this using DOS-style short mode. If the path
39133 # contains just simple characters, use it. Otherwise (spaces, weird characters),
39134 # take no chances and rewrite it.
39135 # Note: m4 eats our [], so we need to use [ and ] instead.
39136 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39137 if test "x$has_forbidden_chars" != x; then
39138 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39139 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39140 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39141 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39142 # Going to short mode and back again did indeed matter. Since short mode is
39143 # case insensitive, let's make it lowercase to improve readability.
39144 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39145 # Now convert it back to Unix-style (cygpath)
39146 input_path=`$CYGPATH -u "$shortmode_path"`
39147 new_path="$input_path"
39148 fi
39149 fi
39150
39151 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39152 if test "x$test_cygdrive_prefix" = x; then
39153 # As a simple fix, exclude /usr/bin since it's not a real path.
39154 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39155 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39156 # a path prefixed by /cygdrive for fixpath to work.
39157 new_path="$CYGWIN_ROOT_PATH$input_path"
39158 fi
39159 fi
39160
39161 # remove trailing .exe if any
39162 new_path="${new_path/%.exe/}"
39163
39164 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39165
39166 # First separate the path from the arguments. This will split at the first
39167 # space.
39168 complete="$OBJDUMP"
39169 path="${complete%% *}"
39170 tmp="$complete EOL"
39171 arguments="${tmp#* }"
39172
39173 # Input might be given as Windows format, start by converting to
39174 # unix format.
39175 new_path="$path"
39176
39177 windows_path="$new_path"
39178 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39179 unix_path=`$CYGPATH -u "$windows_path"`
39180 new_path="$unix_path"
39181 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39182 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39183 new_path="$unix_path"
39184 fi
39185
39186
39187 # Now try to locate executable using which
39188 new_path=`$WHICH "$new_path" 2> /dev/null`
39189
39190 if test "x$new_path" = x; then
39191 # Oops. Which didn't find the executable.
39192 # The splitting of arguments from the executable at a space might have been incorrect,
39193 # since paths with space are more likely in Windows. Give it another try with the whole
39194 # argument.
39195 path="$complete"
39196 arguments="EOL"
39197 new_path="$path"
39198
39199 windows_path="$new_path"
39200 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39201 unix_path=`$CYGPATH -u "$windows_path"`
39202 new_path="$unix_path"
39203 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39204 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39205 new_path="$unix_path"
39206 fi
39207
39208
39209 new_path=`$WHICH "$new_path" 2> /dev/null`
39210 # bat and cmd files are not always considered executable in MSYS causing which
39211 # to not find them
39212 if test "x$new_path" = x \
39213 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39214 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39215 new_path="$path"
39216
39217 windows_path="$new_path"
39218 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39219 unix_path=`$CYGPATH -u "$windows_path"`
39220 new_path="$unix_path"
39221 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39222 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39223 new_path="$unix_path"
39224 fi
39225
39226 fi
39227
39228 if test "x$new_path" = x; then
39229 # It's still not found. Now this is an unrecoverable error.
39230 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39231 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39232 has_space=`$ECHO "$complete" | $GREP " "`
39233 if test "x$has_space" != x; then
39234 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39235 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39236 fi
39237 as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39238 fi
39239 fi
39240
39241 # Now new_path has a complete unix path to the binary
39242 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39243 # Keep paths in /bin as-is, but remove trailing .exe if any
39244 new_path="${new_path/%.exe/}"
39245 # Do not save /bin paths to all_fixpath_prefixes!
39246 else
39247 # Not in mixed or Windows style, start by that.
39248 new_path=`cmd //c echo $new_path`
39249
39250 input_path="$new_path"
39251 # Check if we need to convert this using DOS-style short mode. If the path
39252 # contains just simple characters, use it. Otherwise (spaces, weird characters),
39253 # take no chances and rewrite it.
39254 # Note: m4 eats our [], so we need to use [ and ] instead.
39255 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39256 if test "x$has_forbidden_chars" != x; then
39257 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39258 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39259 fi
39260
39261 # Output is in $new_path
39262
39263 windows_path="$new_path"
39264 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39265 unix_path=`$CYGPATH -u "$windows_path"`
39266 new_path="$unix_path"
39267 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39268 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39269 new_path="$unix_path"
39270 fi
39271
39272 # remove trailing .exe if any
39273 new_path="${new_path/%.exe/}"
39274
39275 # Save the first 10 bytes of this path to the storage, so fixpath can work.
39276 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39277 fi
39278
39279 else
39280 # We're on a unix platform. Hooray! :)
39281 # First separate the path from the arguments. This will split at the first
39282 # space.
39283 complete="$OBJDUMP"
39284 path="${complete%% *}"
39285 tmp="$complete EOL"
39286 arguments="${tmp#* }"
39287
39288 # Cannot rely on the command "which" here since it doesn't always work.
39289 is_absolute_path=`$ECHO "$path" | $GREP ^/`
39290 if test -z "$is_absolute_path"; then
39291 # Path to executable is not absolute. Find it.
39292 IFS_save="$IFS"
39293 IFS=:
39294 for p in $PATH; do
39295 if test -f "$p/$path" && test -x "$p/$path"; then
39296 new_path="$p/$path"
39297 break
39298 fi
39299 done
39300 IFS="$IFS_save"
39301 else
39302 # This is an absolute path, we can use it without further modifications.
39303 new_path="$path"
39304 fi
39305
39306 if test "x$new_path" = x; then
39307 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39308 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39309 has_space=`$ECHO "$complete" | $GREP " "`
39310 if test "x$has_space" != x; then
39311 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39312 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39313 fi
39314 as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39315 fi
39316 fi
39317
39318 # Now join together the path and the arguments once again
39319 if test "x$arguments" != xEOL; then
39320 new_complete="$new_path ${arguments% *}"
39321 else
39322 new_complete="$new_path"
39323 fi
39324
39325 if test "x$complete" != "x$new_complete"; then
39326 OBJDUMP="$new_complete"
39327 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
39328 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
39329 fi
39330 fi
39331
39332 fi
39333
39334
39335 # Restore old path.
39336 PATH="$OLD_PATH"
39337
39338 # Restore the flags to the user specified values.
39339 # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
39340 CFLAGS="$ORG_CFLAGS"
39341 CXXFLAGS="$ORG_CXXFLAGS"
39342
39343
39344 # Finally do some processing after the detection phase
39345
39346 if test "x$COMPILE_TYPE" = "xcross"; then
39347 # Now we need to find a C/C++ compiler that can build executables for the
39348 # build platform. We can't use the AC_PROG_CC macro, since it can only be
39349 # used once. Also, we need to do this without adding a tools dir to the
39350 # path, otherwise we might pick up cross-compilers which don't use standard
39351 # naming.
39352
39353 # FIXME: we should list the discovered compilers as an exclude pattern!
39354 # If we do that, we can do this detection before POST_DETECTION, and still
39355 # find the build compilers in the tools dir, if needed.
39356
39357
39358 # Publish this variable in the help.
39359
39360
39361 if test "x$BUILD_CC" = x; then
39362 # The variable is not set by user, try to locate tool using the code snippet
39363 for ac_prog in cl cc gcc
39364 do
39365 # Extract the first word of "$ac_prog", so it can be a program name with args.
39366 set dummy $ac_prog; ac_word=$2
39367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39368 $as_echo_n "checking for $ac_word... " >&6; }
39369 if ${ac_cv_path_BUILD_CC+:} false; then :
39370 $as_echo_n "(cached) " >&6
39371 else
39372 case $BUILD_CC in
39373 [\\/]* | ?:[\\/]*)
39374 ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39375 ;;
39376 *)
39377 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39378 for as_dir in $PATH
39379 do
39380 IFS=$as_save_IFS
39381 test -z "$as_dir" && as_dir=.
39382 for ac_exec_ext in '' $ac_executable_extensions; do
39383 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39384 ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39385 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39386 break 2
39387 fi
39388 done
39389 done
39390 IFS=$as_save_IFS
39391
39392 ;;
39393 esac
39394 fi
39395 BUILD_CC=$ac_cv_path_BUILD_CC
39396 if test -n "$BUILD_CC"; then
39397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39398 $as_echo "$BUILD_CC" >&6; }
39399 else
39400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39401 $as_echo "no" >&6; }
39402 fi
39403
39404
39405 test -n "$BUILD_CC" && break
39406 done
39407
39408 else
39409 # The variable is set, but is it from the command line or the environment?
39410
39411 # Try to remove the string !BUILD_CC! from our list.
39412 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
39413 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39414 # If it failed, the variable was not from the command line. Ignore it,
39415 # but warn the user (except for BASH, which is always set by the calling BASH).
39416 if test "xBUILD_CC" != xBASH; then
39417 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
39418 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
39419 fi
39420 # Try to locate tool using the code snippet
39421 for ac_prog in cl cc gcc
39422 do
39423 # Extract the first word of "$ac_prog", so it can be a program name with args.
39424 set dummy $ac_prog; ac_word=$2
39425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39426 $as_echo_n "checking for $ac_word... " >&6; }
39427 if ${ac_cv_path_BUILD_CC+:} false; then :
39428 $as_echo_n "(cached) " >&6
39429 else
39430 case $BUILD_CC in
39431 [\\/]* | ?:[\\/]*)
39432 ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39433 ;;
39434 *)
39435 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39436 for as_dir in $PATH
39437 do
39438 IFS=$as_save_IFS
39439 test -z "$as_dir" && as_dir=.
39440 for ac_exec_ext in '' $ac_executable_extensions; do
39441 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39442 ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39443 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39444 break 2
39445 fi
39446 done
39447 done
39448 IFS=$as_save_IFS
39449
39450 ;;
39451 esac
39452 fi
39453 BUILD_CC=$ac_cv_path_BUILD_CC
39454 if test -n "$BUILD_CC"; then
39455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39456 $as_echo "$BUILD_CC" >&6; }
39457 else
39458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39459 $as_echo "no" >&6; }
39460 fi
39461
39462
39463 test -n "$BUILD_CC" && break
39464 done
39465
39466 else
39467 # If it succeeded, then it was overridden by the user. We will use it
39468 # for the tool.
39469
39470 # First remove it from the list of overridden variables, so we can test
39471 # for unknown variables in the end.
39472 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39473
39474 # Check if the provided tool contains a complete path.
39475 tool_specified="$BUILD_CC"
39476 tool_basename="${tool_specified##*/}"
39477 if test "x$tool_basename" = "x$tool_specified"; then
39478 # A command without a complete path is provided, search $PATH.
39479 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
39480 $as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
39481 # Extract the first word of "$tool_basename", so it can be a program name with args.
39482 set dummy $tool_basename; ac_word=$2
39483 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39484 $as_echo_n "checking for $ac_word... " >&6; }
39485 if ${ac_cv_path_BUILD_CC+:} false; then :
39486 $as_echo_n "(cached) " >&6
39487 else
39488 case $BUILD_CC in
39489 [\\/]* | ?:[\\/]*)
39490 ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39491 ;;
39492 *)
39493 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39494 for as_dir in $PATH
39495 do
39496 IFS=$as_save_IFS
39497 test -z "$as_dir" && as_dir=.
39498 for ac_exec_ext in '' $ac_executable_extensions; do
39499 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39500 ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39501 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39502 break 2
39503 fi
39504 done
39505 done
39506 IFS=$as_save_IFS
39507
39508 ;;
39509 esac
39510 fi
39511 BUILD_CC=$ac_cv_path_BUILD_CC
39512 if test -n "$BUILD_CC"; then
39513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39514 $as_echo "$BUILD_CC" >&6; }
39515 else
39516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39517 $as_echo "no" >&6; }
39518 fi
39519
39520
39521 if test "x$BUILD_CC" = x; then
39522 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39523 fi
39524 else
39525 # Otherwise we believe it is a complete path. Use it as it is.
39526 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
39527 $as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
39528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
39529 $as_echo_n "checking for BUILD_CC... " >&6; }
39530 if test ! -x "$tool_specified"; then
39531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39532 $as_echo "not found" >&6; }
39533 as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
39534 fi
39535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39536 $as_echo "$tool_specified" >&6; }
39537 fi
39538 fi
39539 fi
39540
39541
39542
39543 # Only process if variable expands to non-empty
39544
39545 if test "x$BUILD_CC" != x; then
39546 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39547
39548 # First separate the path from the arguments. This will split at the first
39549 # space.
39550 complete="$BUILD_CC"
39551 path="${complete%% *}"
39552 tmp="$complete EOL"
39553 arguments="${tmp#* }"
39554
39555 # Input might be given as Windows format, start by converting to
39556 # unix format.
39557 new_path=`$CYGPATH -u "$path"`
39558
39559 # Now try to locate executable using which
39560 new_path=`$WHICH "$new_path" 2> /dev/null`
39561 # bat and cmd files are not always considered executable in cygwin causing which
39562 # to not find them
39563 if test "x$new_path" = x \
39564 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39565 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39566 new_path=`$CYGPATH -u "$path"`
39567 fi
39568 if test "x$new_path" = x; then
39569 # Oops. Which didn't find the executable.
39570 # The splitting of arguments from the executable at a space might have been incorrect,
39571 # since paths with space are more likely in Windows. Give it another try with the whole
39572 # argument.
39573 path="$complete"
39574 arguments="EOL"
39575 new_path=`$CYGPATH -u "$path"`
39576 new_path=`$WHICH "$new_path" 2> /dev/null`
39577 # bat and cmd files are not always considered executable in cygwin causing which
39578 # to not find them
39579 if test "x$new_path" = x \
39580 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39581 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39582 new_path=`$CYGPATH -u "$path"`
39583 fi
39584 if test "x$new_path" = x; then
39585 # It's still not found. Now this is an unrecoverable error.
39586 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39587 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39588 has_space=`$ECHO "$complete" | $GREP " "`
39589 if test "x$has_space" != x; then
39590 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39591 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39592 fi
39593 as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39594 fi
39595 fi
39596
39597 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39598 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39599 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39600 # "foo.exe" is OK but "foo" is an error.
39601 #
39602 # This test is therefore slightly more accurate than "test -f" to check for file presence.
39603 # It is also a way to make sure we got the proper file name for the real test later on.
39604 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39605 if test "x$test_shortpath" = x; then
39606 # Short path failed, file does not exist as specified.
39607 # Try adding .exe or .cmd
39608 if test -f "${new_path}.exe"; then
39609 input_to_shortpath="${new_path}.exe"
39610 elif test -f "${new_path}.cmd"; then
39611 input_to_shortpath="${new_path}.cmd"
39612 else
39613 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39614 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39615 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39616 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39617 as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39618 fi
39619 else
39620 input_to_shortpath="$new_path"
39621 fi
39622
39623 # Call helper function which possibly converts this using DOS-style short mode.
39624 # If so, the updated path is stored in $new_path.
39625 new_path="$input_to_shortpath"
39626
39627 input_path="$input_to_shortpath"
39628 # Check if we need to convert this using DOS-style short mode. If the path
39629 # contains just simple characters, use it. Otherwise (spaces, weird characters),
39630 # take no chances and rewrite it.
39631 # Note: m4 eats our [], so we need to use [ and ] instead.
39632 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39633 if test "x$has_forbidden_chars" != x; then
39634 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39635 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39636 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39637 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39638 # Going to short mode and back again did indeed matter. Since short mode is
39639 # case insensitive, let's make it lowercase to improve readability.
39640 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39641 # Now convert it back to Unix-style (cygpath)
39642 input_path=`$CYGPATH -u "$shortmode_path"`
39643 new_path="$input_path"
39644 fi
39645 fi
39646
39647 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39648 if test "x$test_cygdrive_prefix" = x; then
39649 # As a simple fix, exclude /usr/bin since it's not a real path.
39650 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39651 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39652 # a path prefixed by /cygdrive for fixpath to work.
39653 new_path="$CYGWIN_ROOT_PATH$input_path"
39654 fi
39655 fi
39656
39657 # remove trailing .exe if any
39658 new_path="${new_path/%.exe/}"
39659
39660 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39661
39662 # First separate the path from the arguments. This will split at the first
39663 # space.
39664 complete="$BUILD_CC"
39665 path="${complete%% *}"
39666 tmp="$complete EOL"
39667 arguments="${tmp#* }"
39668
39669 # Input might be given as Windows format, start by converting to
39670 # unix format.
39671 new_path="$path"
39672
39673 windows_path="$new_path"
39674 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39675 unix_path=`$CYGPATH -u "$windows_path"`
39676 new_path="$unix_path"
39677 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39678 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39679 new_path="$unix_path"
39680 fi
39681
39682
39683 # Now try to locate executable using which
39684 new_path=`$WHICH "$new_path" 2> /dev/null`
39685
39686 if test "x$new_path" = x; then
39687 # Oops. Which didn't find the executable.
39688 # The splitting of arguments from the executable at a space might have been incorrect,
39689 # since paths with space are more likely in Windows. Give it another try with the whole
39690 # argument.
39691 path="$complete"
39692 arguments="EOL"
39693 new_path="$path"
39694
39695 windows_path="$new_path"
39696 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39697 unix_path=`$CYGPATH -u "$windows_path"`
39698 new_path="$unix_path"
39699 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39700 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39701 new_path="$unix_path"
39702 fi
39703
39704
39705 new_path=`$WHICH "$new_path" 2> /dev/null`
39706 # bat and cmd files are not always considered executable in MSYS causing which
39707 # to not find them
39708 if test "x$new_path" = x \
39709 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39710 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39711 new_path="$path"
39712
39713 windows_path="$new_path"
39714 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39715 unix_path=`$CYGPATH -u "$windows_path"`
39716 new_path="$unix_path"
39717 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39718 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39719 new_path="$unix_path"
39720 fi
39721
39722 fi
39723
39724 if test "x$new_path" = x; then
39725 # It's still not found. Now this is an unrecoverable error.
39726 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39727 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39728 has_space=`$ECHO "$complete" | $GREP " "`
39729 if test "x$has_space" != x; then
39730 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39731 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39732 fi
39733 as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39734 fi
39735 fi
39736
39737 # Now new_path has a complete unix path to the binary
39738 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39739 # Keep paths in /bin as-is, but remove trailing .exe if any
39740 new_path="${new_path/%.exe/}"
39741 # Do not save /bin paths to all_fixpath_prefixes!
39742 else
39743 # Not in mixed or Windows style, start by that.
39744 new_path=`cmd //c echo $new_path`
39745
39746 input_path="$new_path"
39747 # Check if we need to convert this using DOS-style short mode. If the path
39748 # contains just simple characters, use it. Otherwise (spaces, weird characters),
39749 # take no chances and rewrite it.
39750 # Note: m4 eats our [], so we need to use [ and ] instead.
39751 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39752 if test "x$has_forbidden_chars" != x; then
39753 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39754 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39755 fi
39756
39757 # Output is in $new_path
39758
39759 windows_path="$new_path"
39760 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39761 unix_path=`$CYGPATH -u "$windows_path"`
39762 new_path="$unix_path"
39763 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39764 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39765 new_path="$unix_path"
39766 fi
39767
39768 # remove trailing .exe if any
39769 new_path="${new_path/%.exe/}"
39770
39771 # Save the first 10 bytes of this path to the storage, so fixpath can work.
39772 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39773 fi
39774
39775 else
39776 # We're on a unix platform. Hooray! :)
39777 # First separate the path from the arguments. This will split at the first
39778 # space.
39779 complete="$BUILD_CC"
39780 path="${complete%% *}"
39781 tmp="$complete EOL"
39782 arguments="${tmp#* }"
39783
39784 # Cannot rely on the command "which" here since it doesn't always work.
39785 is_absolute_path=`$ECHO "$path" | $GREP ^/`
39786 if test -z "$is_absolute_path"; then
39787 # Path to executable is not absolute. Find it.
39788 IFS_save="$IFS"
39789 IFS=:
39790 for p in $PATH; do
39791 if test -f "$p/$path" && test -x "$p/$path"; then
39792 new_path="$p/$path"
39793 break
39794 fi
39795 done
39796 IFS="$IFS_save"
39797 else
39798 # This is an absolute path, we can use it without further modifications.
39799 new_path="$path"
39800 fi
39801
39802 if test "x$new_path" = x; then
39803 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39804 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39805 has_space=`$ECHO "$complete" | $GREP " "`
39806 if test "x$has_space" != x; then
39807 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39808 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39809 fi
39810 as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39811 fi
39812 fi
39813
39814 # Now join together the path and the arguments once again
39815 if test "x$arguments" != xEOL; then
39816 new_complete="$new_path ${arguments% *}"
39817 else
39818 new_complete="$new_path"
39819 fi
39820
39821 if test "x$complete" != "x$new_complete"; then
39822 BUILD_CC="$new_complete"
39823 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39824 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39825 fi
39826 fi
39827
39828
39829
39830 # Publish this variable in the help.
39831
39832
39833 if test "x$BUILD_CXX" = x; then
39834 # The variable is not set by user, try to locate tool using the code snippet
39835 for ac_prog in cl CC g++
39836 do
39837 # Extract the first word of "$ac_prog", so it can be a program name with args.
39838 set dummy $ac_prog; ac_word=$2
39839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39840 $as_echo_n "checking for $ac_word... " >&6; }
39841 if ${ac_cv_path_BUILD_CXX+:} false; then :
39842 $as_echo_n "(cached) " >&6
39843 else
39844 case $BUILD_CXX in
39845 [\\/]* | ?:[\\/]*)
39846 ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39847 ;;
39848 *)
39849 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39850 for as_dir in $PATH
39851 do
39852 IFS=$as_save_IFS
39853 test -z "$as_dir" && as_dir=.
39854 for ac_exec_ext in '' $ac_executable_extensions; do
39855 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39856 ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39857 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39858 break 2
39859 fi
39860 done
39861 done
39862 IFS=$as_save_IFS
39863
39864 ;;
39865 esac
39866 fi
39867 BUILD_CXX=$ac_cv_path_BUILD_CXX
39868 if test -n "$BUILD_CXX"; then
39869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39870 $as_echo "$BUILD_CXX" >&6; }
39871 else
39872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39873 $as_echo "no" >&6; }
39874 fi
39875
39876
39877 test -n "$BUILD_CXX" && break
39878 done
39879
39880 else
39881 # The variable is set, but is it from the command line or the environment?
39882
39883 # Try to remove the string !BUILD_CXX! from our list.
39884 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39885 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39886 # If it failed, the variable was not from the command line. Ignore it,
39887 # but warn the user (except for BASH, which is always set by the calling BASH).
39888 if test "xBUILD_CXX" != xBASH; then
39889 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39890 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39891 fi
39892 # Try to locate tool using the code snippet
39893 for ac_prog in cl CC g++
39894 do
39895 # Extract the first word of "$ac_prog", so it can be a program name with args.
39896 set dummy $ac_prog; ac_word=$2
39897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39898 $as_echo_n "checking for $ac_word... " >&6; }
39899 if ${ac_cv_path_BUILD_CXX+:} false; then :
39900 $as_echo_n "(cached) " >&6
39901 else
39902 case $BUILD_CXX in
39903 [\\/]* | ?:[\\/]*)
39904 ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39905 ;;
39906 *)
39907 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39908 for as_dir in $PATH
39909 do
39910 IFS=$as_save_IFS
39911 test -z "$as_dir" && as_dir=.
39912 for ac_exec_ext in '' $ac_executable_extensions; do
39913 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39914 ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39915 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39916 break 2
39917 fi
39918 done
39919 done
39920 IFS=$as_save_IFS
39921
39922 ;;
39923 esac
39924 fi
39925 BUILD_CXX=$ac_cv_path_BUILD_CXX
39926 if test -n "$BUILD_CXX"; then
39927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39928 $as_echo "$BUILD_CXX" >&6; }
39929 else
39930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39931 $as_echo "no" >&6; }
39932 fi
39933
39934
39935 test -n "$BUILD_CXX" && break
39936 done
39937
39938 else
39939 # If it succeeded, then it was overridden by the user. We will use it
39940 # for the tool.
39941
39942 # First remove it from the list of overridden variables, so we can test
39943 # for unknown variables in the end.
39944 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39945
39946 # Check if the provided tool contains a complete path.
39947 tool_specified="$BUILD_CXX"
39948 tool_basename="${tool_specified##*/}"
39949 if test "x$tool_basename" = "x$tool_specified"; then
39950 # A command without a complete path is provided, search $PATH.
39951 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
39952 $as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
39953 # Extract the first word of "$tool_basename", so it can be a program name with args.
39954 set dummy $tool_basename; ac_word=$2
39955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39956 $as_echo_n "checking for $ac_word... " >&6; }
39957 if ${ac_cv_path_BUILD_CXX+:} false; then :
39958 $as_echo_n "(cached) " >&6
39959 else
39960 case $BUILD_CXX in
39961 [\\/]* | ?:[\\/]*)
39962 ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39963 ;;
39964 *)
39965 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39966 for as_dir in $PATH
39967 do
39968 IFS=$as_save_IFS
39969 test -z "$as_dir" && as_dir=.
39970 for ac_exec_ext in '' $ac_executable_extensions; do
39971 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39972 ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39973 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39974 break 2
39975 fi
39976 done
39977 done
39978 IFS=$as_save_IFS
39979
39980 ;;
39981 esac
39982 fi
39983 BUILD_CXX=$ac_cv_path_BUILD_CXX
39984 if test -n "$BUILD_CXX"; then
39985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39986 $as_echo "$BUILD_CXX" >&6; }
39987 else
39988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39989 $as_echo "no" >&6; }
39990 fi
39991
39992
39993 if test "x$BUILD_CXX" = x; then
39994 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39995 fi
39996 else
39997 # Otherwise we believe it is a complete path. Use it as it is.
39998 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
39999 $as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
40000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
40001 $as_echo_n "checking for BUILD_CXX... " >&6; }
40002 if test ! -x "$tool_specified"; then
40003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40004 $as_echo "not found" >&6; }
40005 as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
40006 fi
40007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40008 $as_echo "$tool_specified" >&6; }
40009 fi
40010 fi
40011 fi
40012
40013
40014
40015 # Only process if variable expands to non-empty
40016
40017 if test "x$BUILD_CXX" != x; then
40018 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40019
40020 # First separate the path from the arguments. This will split at the first
40021 # space.
40022 complete="$BUILD_CXX"
40023 path="${complete%% *}"
40024 tmp="$complete EOL"
40025 arguments="${tmp#* }"
40026
40027 # Input might be given as Windows format, start by converting to
40028 # unix format.
40029 new_path=`$CYGPATH -u "$path"`
40030
40031 # Now try to locate executable using which
40032 new_path=`$WHICH "$new_path" 2> /dev/null`
40033 # bat and cmd files are not always considered executable in cygwin causing which
40034 # to not find them
40035 if test "x$new_path" = x \
40036 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40037 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40038 new_path=`$CYGPATH -u "$path"`
40039 fi
40040 if test "x$new_path" = x; then
40041 # Oops. Which didn't find the executable.
40042 # The splitting of arguments from the executable at a space might have been incorrect,
40043 # since paths with space are more likely in Windows. Give it another try with the whole
40044 # argument.
40045 path="$complete"
40046 arguments="EOL"
40047 new_path=`$CYGPATH -u "$path"`
40048 new_path=`$WHICH "$new_path" 2> /dev/null`
40049 # bat and cmd files are not always considered executable in cygwin causing which
40050 # to not find them
40051 if test "x$new_path" = x \
40052 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40053 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40054 new_path=`$CYGPATH -u "$path"`
40055 fi
40056 if test "x$new_path" = x; then
40057 # It's still not found. Now this is an unrecoverable error.
40058 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40059 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40060 has_space=`$ECHO "$complete" | $GREP " "`
40061 if test "x$has_space" != x; then
40062 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40063 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40064 fi
40065 as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40066 fi
40067 fi
40068
40069 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40070 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40071 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40072 # "foo.exe" is OK but "foo" is an error.
40073 #
40074 # This test is therefore slightly more accurate than "test -f" to check for file presence.
40075 # It is also a way to make sure we got the proper file name for the real test later on.
40076 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40077 if test "x$test_shortpath" = x; then
40078 # Short path failed, file does not exist as specified.
40079 # Try adding .exe or .cmd
40080 if test -f "${new_path}.exe"; then
40081 input_to_shortpath="${new_path}.exe"
40082 elif test -f "${new_path}.cmd"; then
40083 input_to_shortpath="${new_path}.cmd"
40084 else
40085 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
40086 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
40087 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40088 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40089 as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40090 fi
40091 else
40092 input_to_shortpath="$new_path"
40093 fi
40094
40095 # Call helper function which possibly converts this using DOS-style short mode.
40096 # If so, the updated path is stored in $new_path.
40097 new_path="$input_to_shortpath"
40098
40099 input_path="$input_to_shortpath"
40100 # Check if we need to convert this using DOS-style short mode. If the path
40101 # contains just simple characters, use it. Otherwise (spaces, weird characters),
40102 # take no chances and rewrite it.
40103 # Note: m4 eats our [], so we need to use [ and ] instead.
40104 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40105 if test "x$has_forbidden_chars" != x; then
40106 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40107 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40108 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40109 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40110 # Going to short mode and back again did indeed matter. Since short mode is
40111 # case insensitive, let's make it lowercase to improve readability.
40112 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40113 # Now convert it back to Unix-style (cygpath)
40114 input_path=`$CYGPATH -u "$shortmode_path"`
40115 new_path="$input_path"
40116 fi
40117 fi
40118
40119 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40120 if test "x$test_cygdrive_prefix" = x; then
40121 # As a simple fix, exclude /usr/bin since it's not a real path.
40122 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40123 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40124 # a path prefixed by /cygdrive for fixpath to work.
40125 new_path="$CYGWIN_ROOT_PATH$input_path"
40126 fi
40127 fi
40128
40129 # remove trailing .exe if any
40130 new_path="${new_path/%.exe/}"
40131
40132 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40133
40134 # First separate the path from the arguments. This will split at the first
40135 # space.
40136 complete="$BUILD_CXX"
40137 path="${complete%% *}"
40138 tmp="$complete EOL"
40139 arguments="${tmp#* }"
40140
40141 # Input might be given as Windows format, start by converting to
40142 # unix format.
40143 new_path="$path"
40144
40145 windows_path="$new_path"
40146 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40147 unix_path=`$CYGPATH -u "$windows_path"`
40148 new_path="$unix_path"
40149 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40150 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40151 new_path="$unix_path"
40152 fi
40153
40154
40155 # Now try to locate executable using which
40156 new_path=`$WHICH "$new_path" 2> /dev/null`
40157
40158 if test "x$new_path" = x; then
40159 # Oops. Which didn't find the executable.
40160 # The splitting of arguments from the executable at a space might have been incorrect,
40161 # since paths with space are more likely in Windows. Give it another try with the whole
40162 # argument.
40163 path="$complete"
40164 arguments="EOL"
40165 new_path="$path"
40166
40167 windows_path="$new_path"
40168 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40169 unix_path=`$CYGPATH -u "$windows_path"`
40170 new_path="$unix_path"
40171 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40172 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40173 new_path="$unix_path"
40174 fi
40175
40176
40177 new_path=`$WHICH "$new_path" 2> /dev/null`
40178 # bat and cmd files are not always considered executable in MSYS causing which
40179 # to not find them
40180 if test "x$new_path" = x \
40181 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40182 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40183 new_path="$path"
40184
40185 windows_path="$new_path"
40186 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40187 unix_path=`$CYGPATH -u "$windows_path"`
40188 new_path="$unix_path"
40189 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40190 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40191 new_path="$unix_path"
40192 fi
40193
40194 fi
40195
40196 if test "x$new_path" = x; then
40197 # It's still not found. Now this is an unrecoverable error.
40198 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40199 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40200 has_space=`$ECHO "$complete" | $GREP " "`
40201 if test "x$has_space" != x; then
40202 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40203 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40204 fi
40205 as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40206 fi
40207 fi
40208
40209 # Now new_path has a complete unix path to the binary
40210 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40211 # Keep paths in /bin as-is, but remove trailing .exe if any
40212 new_path="${new_path/%.exe/}"
40213 # Do not save /bin paths to all_fixpath_prefixes!
40214 else
40215 # Not in mixed or Windows style, start by that.
40216 new_path=`cmd //c echo $new_path`
40217
40218 input_path="$new_path"
40219 # Check if we need to convert this using DOS-style short mode. If the path
40220 # contains just simple characters, use it. Otherwise (spaces, weird characters),
40221 # take no chances and rewrite it.
40222 # Note: m4 eats our [], so we need to use [ and ] instead.
40223 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40224 if test "x$has_forbidden_chars" != x; then
40225 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40226 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40227 fi
40228
40229 # Output is in $new_path
40230
40231 windows_path="$new_path"
40232 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40233 unix_path=`$CYGPATH -u "$windows_path"`
40234 new_path="$unix_path"
40235 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40236 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40237 new_path="$unix_path"
40238 fi
40239
40240 # remove trailing .exe if any
40241 new_path="${new_path/%.exe/}"
40242
40243 # Save the first 10 bytes of this path to the storage, so fixpath can work.
40244 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40245 fi
40246
40247 else
40248 # We're on a unix platform. Hooray! :)
40249 # First separate the path from the arguments. This will split at the first
40250 # space.
40251 complete="$BUILD_CXX"
40252 path="${complete%% *}"
40253 tmp="$complete EOL"
40254 arguments="${tmp#* }"
40255
40256 # Cannot rely on the command "which" here since it doesn't always work.
40257 is_absolute_path=`$ECHO "$path" | $GREP ^/`
40258 if test -z "$is_absolute_path"; then
40259 # Path to executable is not absolute. Find it.
40260 IFS_save="$IFS"
40261 IFS=:
40262 for p in $PATH; do
40263 if test -f "$p/$path" && test -x "$p/$path"; then
40264 new_path="$p/$path"
40265 break
40266 fi
40267 done
40268 IFS="$IFS_save"
40269 else
40270 # This is an absolute path, we can use it without further modifications.
40271 new_path="$path"
40272 fi
40273
40274 if test "x$new_path" = x; then
40275 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40276 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40277 has_space=`$ECHO "$complete" | $GREP " "`
40278 if test "x$has_space" != x; then
40279 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40280 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40281 fi
40282 as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40283 fi
40284 fi
40285
40286 # Now join together the path and the arguments once again
40287 if test "x$arguments" != xEOL; then
40288 new_complete="$new_path ${arguments% *}"
40289 else
40290 new_complete="$new_path"
40291 fi
40292
40293 if test "x$complete" != "x$new_complete"; then
40294 BUILD_CXX="$new_complete"
40295 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
40296 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
40297 fi
40298 fi
40299
40300
40301
40302 # Publish this variable in the help.
40303
40304
40305 if test "x$BUILD_LD" = x; then
40306 # The variable is not set by user, try to locate tool using the code snippet
40307 for ac_prog in ld
40308 do
40309 # Extract the first word of "$ac_prog", so it can be a program name with args.
40310 set dummy $ac_prog; ac_word=$2
40311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40312 $as_echo_n "checking for $ac_word... " >&6; }
40313 if ${ac_cv_path_BUILD_LD+:} false; then :
40314 $as_echo_n "(cached) " >&6
40315 else
40316 case $BUILD_LD in
40317 [\\/]* | ?:[\\/]*)
40318 ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40319 ;;
40320 *)
40321 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40322 for as_dir in $PATH
40323 do
40324 IFS=$as_save_IFS
40325 test -z "$as_dir" && as_dir=.
40326 for ac_exec_ext in '' $ac_executable_extensions; do
40327 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40328 ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40329 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40330 break 2
40331 fi
40332 done
40333 done
40334 IFS=$as_save_IFS
40335
40336 ;;
40337 esac
40338 fi
40339 BUILD_LD=$ac_cv_path_BUILD_LD
40340 if test -n "$BUILD_LD"; then
40341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40342 $as_echo "$BUILD_LD" >&6; }
40343 else
40344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40345 $as_echo "no" >&6; }
40346 fi
40347
40348
40349 test -n "$BUILD_LD" && break
40350 done
40351
40352 else
40353 # The variable is set, but is it from the command line or the environment?
40354
40355 # Try to remove the string !BUILD_LD! from our list.
40356 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
40357 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40358 # If it failed, the variable was not from the command line. Ignore it,
40359 # but warn the user (except for BASH, which is always set by the calling BASH).
40360 if test "xBUILD_LD" != xBASH; then
40361 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
40362 $as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
40363 fi
40364 # Try to locate tool using the code snippet
40365 for ac_prog in ld
40366 do
40367 # Extract the first word of "$ac_prog", so it can be a program name with args.
40368 set dummy $ac_prog; ac_word=$2
40369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40370 $as_echo_n "checking for $ac_word... " >&6; }
40371 if ${ac_cv_path_BUILD_LD+:} false; then :
40372 $as_echo_n "(cached) " >&6
40373 else
40374 case $BUILD_LD in
40375 [\\/]* | ?:[\\/]*)
40376 ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40377 ;;
40378 *)
40379 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40380 for as_dir in $PATH
40381 do
40382 IFS=$as_save_IFS
40383 test -z "$as_dir" && as_dir=.
40384 for ac_exec_ext in '' $ac_executable_extensions; do
40385 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40386 ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40387 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40388 break 2
40389 fi
40390 done
40391 done
40392 IFS=$as_save_IFS
40393
40394 ;;
40395 esac
40396 fi
40397 BUILD_LD=$ac_cv_path_BUILD_LD
40398 if test -n "$BUILD_LD"; then
40399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40400 $as_echo "$BUILD_LD" >&6; }
40401 else
40402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40403 $as_echo "no" >&6; }
40404 fi
40405
40406
40407 test -n "$BUILD_LD" && break
40408 done
40409
40410 else
40411 # If it succeeded, then it was overridden by the user. We will use it
40412 # for the tool.
40413
40414 # First remove it from the list of overridden variables, so we can test
40415 # for unknown variables in the end.
40416 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40417
40418 # Check if the provided tool contains a complete path.
40419 tool_specified="$BUILD_LD"
40420 tool_basename="${tool_specified##*/}"
40421 if test "x$tool_basename" = "x$tool_specified"; then
40422 # A command without a complete path is provided, search $PATH.
40423 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
40424 $as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
40425 # Extract the first word of "$tool_basename", so it can be a program name with args.
40426 set dummy $tool_basename; ac_word=$2
40427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40428 $as_echo_n "checking for $ac_word... " >&6; }
40429 if ${ac_cv_path_BUILD_LD+:} false; then :
40430 $as_echo_n "(cached) " >&6
40431 else
40432 case $BUILD_LD in
40433 [\\/]* | ?:[\\/]*)
40434 ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40435 ;;
40436 *)
40437 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40438 for as_dir in $PATH
40439 do
40440 IFS=$as_save_IFS
40441 test -z "$as_dir" && as_dir=.
40442 for ac_exec_ext in '' $ac_executable_extensions; do
40443 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40444 ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40445 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40446 break 2
40447 fi
40448 done
40449 done
40450 IFS=$as_save_IFS
40451
40452 ;;
40453 esac
40454 fi
40455 BUILD_LD=$ac_cv_path_BUILD_LD
40456 if test -n "$BUILD_LD"; then
40457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40458 $as_echo "$BUILD_LD" >&6; }
40459 else
40460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40461 $as_echo "no" >&6; }
40462 fi
40463
40464
40465 if test "x$BUILD_LD" = x; then
40466 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40467 fi
40468 else
40469 # Otherwise we believe it is a complete path. Use it as it is.
40470 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
40471 $as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
40472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
40473 $as_echo_n "checking for BUILD_LD... " >&6; }
40474 if test ! -x "$tool_specified"; then
40475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40476 $as_echo "not found" >&6; }
40477 as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
40478 fi
40479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40480 $as_echo "$tool_specified" >&6; }
40481 fi
40482 fi
40483 fi
40484
40485
40486
40487 # Only process if variable expands to non-empty
40488
40489 if test "x$BUILD_LD" != x; then
40490 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40491
40492 # First separate the path from the arguments. This will split at the first
40493 # space.
40494 complete="$BUILD_LD"
40495 path="${complete%% *}"
40496 tmp="$complete EOL"
40497 arguments="${tmp#* }"
40498
40499 # Input might be given as Windows format, start by converting to
40500 # unix format.
40501 new_path=`$CYGPATH -u "$path"`
40502
40503 # Now try to locate executable using which
40504 new_path=`$WHICH "$new_path" 2> /dev/null`
40505 # bat and cmd files are not always considered executable in cygwin causing which
40506 # to not find them
40507 if test "x$new_path" = x \
40508 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40509 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40510 new_path=`$CYGPATH -u "$path"`
40511 fi
40512 if test "x$new_path" = x; then
40513 # Oops. Which didn't find the executable.
40514 # The splitting of arguments from the executable at a space might have been incorrect,
40515 # since paths with space are more likely in Windows. Give it another try with the whole
40516 # argument.
40517 path="$complete"
40518 arguments="EOL"
40519 new_path=`$CYGPATH -u "$path"`
40520 new_path=`$WHICH "$new_path" 2> /dev/null`
40521 # bat and cmd files are not always considered executable in cygwin causing which
40522 # to not find them
40523 if test "x$new_path" = x \
40524 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40525 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40526 new_path=`$CYGPATH -u "$path"`
40527 fi
40528 if test "x$new_path" = x; then
40529 # It's still not found. Now this is an unrecoverable error.
40530 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40531 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40532 has_space=`$ECHO "$complete" | $GREP " "`
40533 if test "x$has_space" != x; then
40534 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40535 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40536 fi
40537 as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40538 fi
40539 fi
40540
40541 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40542 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40543 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40544 # "foo.exe" is OK but "foo" is an error.
40545 #
40546 # This test is therefore slightly more accurate than "test -f" to check for file presence.
40547 # It is also a way to make sure we got the proper file name for the real test later on.
40548 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40549 if test "x$test_shortpath" = x; then
40550 # Short path failed, file does not exist as specified.
40551 # Try adding .exe or .cmd
40552 if test -f "${new_path}.exe"; then
40553 input_to_shortpath="${new_path}.exe"
40554 elif test -f "${new_path}.cmd"; then
40555 input_to_shortpath="${new_path}.cmd"
40556 else
40557 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
40558 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
40559 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40560 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40561 as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40562 fi
40563 else
40564 input_to_shortpath="$new_path"
40565 fi
40566
40567 # Call helper function which possibly converts this using DOS-style short mode.
40568 # If so, the updated path is stored in $new_path.
40569 new_path="$input_to_shortpath"
40570
40571 input_path="$input_to_shortpath"
40572 # Check if we need to convert this using DOS-style short mode. If the path
40573 # contains just simple characters, use it. Otherwise (spaces, weird characters),
40574 # take no chances and rewrite it.
40575 # Note: m4 eats our [], so we need to use [ and ] instead.
40576 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40577 if test "x$has_forbidden_chars" != x; then
40578 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40579 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40580 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40581 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40582 # Going to short mode and back again did indeed matter. Since short mode is
40583 # case insensitive, let's make it lowercase to improve readability.
40584 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40585 # Now convert it back to Unix-style (cygpath)
40586 input_path=`$CYGPATH -u "$shortmode_path"`
40587 new_path="$input_path"
40588 fi
40589 fi
40590
40591 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40592 if test "x$test_cygdrive_prefix" = x; then
40593 # As a simple fix, exclude /usr/bin since it's not a real path.
40594 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40595 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40596 # a path prefixed by /cygdrive for fixpath to work.
40597 new_path="$CYGWIN_ROOT_PATH$input_path"
40598 fi
40599 fi
40600
40601 # remove trailing .exe if any
40602 new_path="${new_path/%.exe/}"
40603
40604 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40605
40606 # First separate the path from the arguments. This will split at the first
40607 # space.
40608 complete="$BUILD_LD"
40609 path="${complete%% *}"
40610 tmp="$complete EOL"
40611 arguments="${tmp#* }"
40612
40613 # Input might be given as Windows format, start by converting to
40614 # unix format.
40615 new_path="$path"
40616
40617 windows_path="$new_path"
40618 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40619 unix_path=`$CYGPATH -u "$windows_path"`
40620 new_path="$unix_path"
40621 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40622 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40623 new_path="$unix_path"
40624 fi
40625
40626
40627 # Now try to locate executable using which
40628 new_path=`$WHICH "$new_path" 2> /dev/null`
40629
40630 if test "x$new_path" = x; then
40631 # Oops. Which didn't find the executable.
40632 # The splitting of arguments from the executable at a space might have been incorrect,
40633 # since paths with space are more likely in Windows. Give it another try with the whole
40634 # argument.
40635 path="$complete"
40636 arguments="EOL"
40637 new_path="$path"
40638
40639 windows_path="$new_path"
40640 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40641 unix_path=`$CYGPATH -u "$windows_path"`
40642 new_path="$unix_path"
40643 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40644 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40645 new_path="$unix_path"
40646 fi
40647
40648
40649 new_path=`$WHICH "$new_path" 2> /dev/null`
40650 # bat and cmd files are not always considered executable in MSYS causing which
40651 # to not find them
40652 if test "x$new_path" = x \
40653 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40654 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40655 new_path="$path"
40656
40657 windows_path="$new_path"
40658 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40659 unix_path=`$CYGPATH -u "$windows_path"`
40660 new_path="$unix_path"
40661 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40662 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40663 new_path="$unix_path"
40664 fi
40665
40666 fi
40667
40668 if test "x$new_path" = x; then
40669 # It's still not found. Now this is an unrecoverable error.
40670 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40671 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40672 has_space=`$ECHO "$complete" | $GREP " "`
40673 if test "x$has_space" != x; then
40674 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40675 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40676 fi
40677 as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40678 fi
40679 fi
40680
40681 # Now new_path has a complete unix path to the binary
40682 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40683 # Keep paths in /bin as-is, but remove trailing .exe if any
40684 new_path="${new_path/%.exe/}"
40685 # Do not save /bin paths to all_fixpath_prefixes!
40686 else
40687 # Not in mixed or Windows style, start by that.
40688 new_path=`cmd //c echo $new_path`
40689
40690 input_path="$new_path"
40691 # Check if we need to convert this using DOS-style short mode. If the path
40692 # contains just simple characters, use it. Otherwise (spaces, weird characters),
40693 # take no chances and rewrite it.
40694 # Note: m4 eats our [], so we need to use [ and ] instead.
40695 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40696 if test "x$has_forbidden_chars" != x; then
40697 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40698 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40699 fi
40700
40701 # Output is in $new_path
40702
40703 windows_path="$new_path"
40704 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40705 unix_path=`$CYGPATH -u "$windows_path"`
40706 new_path="$unix_path"
40707 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40708 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40709 new_path="$unix_path"
40710 fi
40711
40712 # remove trailing .exe if any
40713 new_path="${new_path/%.exe/}"
40714
40715 # Save the first 10 bytes of this path to the storage, so fixpath can work.
40716 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40717 fi
40718
40719 else
40720 # We're on a unix platform. Hooray! :)
40721 # First separate the path from the arguments. This will split at the first
40722 # space.
40723 complete="$BUILD_LD"
40724 path="${complete%% *}"
40725 tmp="$complete EOL"
40726 arguments="${tmp#* }"
40727
40728 # Cannot rely on the command "which" here since it doesn't always work.
40729 is_absolute_path=`$ECHO "$path" | $GREP ^/`
40730 if test -z "$is_absolute_path"; then
40731 # Path to executable is not absolute. Find it.
40732 IFS_save="$IFS"
40733 IFS=:
40734 for p in $PATH; do
40735 if test -f "$p/$path" && test -x "$p/$path"; then
40736 new_path="$p/$path"
40737 break
40738 fi
40739 done
40740 IFS="$IFS_save"
40741 else
40742 # This is an absolute path, we can use it without further modifications.
40743 new_path="$path"
40744 fi
40745
40746 if test "x$new_path" = x; then
40747 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40748 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40749 has_space=`$ECHO "$complete" | $GREP " "`
40750 if test "x$has_space" != x; then
40751 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40752 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40753 fi
40754 as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40755 fi
40756 fi
40757
40758 # Now join together the path and the arguments once again
40759 if test "x$arguments" != xEOL; then
40760 new_complete="$new_path ${arguments% *}"
40761 else
40762 new_complete="$new_path"
40763 fi
40764
40765 if test "x$complete" != "x$new_complete"; then
40766 BUILD_LD="$new_complete"
40767 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40768 $as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40769 fi
40770 fi
40771
40772 else
40773 # If we are not cross compiling, use the normal target compilers for
40774 # building the build platform executables.
40775 BUILD_CC="$CC"
40776 BUILD_CXX="$CXX"
40777 BUILD_LD="$LD"
40778 fi
40779
40780
40781
40782
40783
40784
40785 if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40786 # For hotspot, we need these in Windows mixed path,
40787 # so rewrite them all. Need added .exe suffix.
40788 HOTSPOT_CXX="$CXX.exe"
40789 HOTSPOT_LD="$LD.exe"
40790 HOTSPOT_MT="$MT.exe"
40791 HOTSPOT_RC="$RC.exe"
40792
40793 unix_path="$HOTSPOT_CXX"
40794 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40795 windows_path=`$CYGPATH -m "$unix_path"`
40796 HOTSPOT_CXX="$windows_path"
40797 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40798 windows_path=`cmd //c echo $unix_path`
40799 HOTSPOT_CXX="$windows_path"
40800 fi
40801
40802
40803 unix_path="$HOTSPOT_LD"
40804 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40805 windows_path=`$CYGPATH -m "$unix_path"`
40806 HOTSPOT_LD="$windows_path"
40807 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40808 windows_path=`cmd //c echo $unix_path`
40809 HOTSPOT_LD="$windows_path"
40810 fi
40811
40812
40813 unix_path="$HOTSPOT_MT"
40814 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40815 windows_path=`$CYGPATH -m "$unix_path"`
40816 HOTSPOT_MT="$windows_path"
40817 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40818 windows_path=`cmd //c echo $unix_path`
40819 HOTSPOT_MT="$windows_path"
40820 fi
40821
40822
40823 unix_path="$HOTSPOT_RC"
40824 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40825 windows_path=`$CYGPATH -m "$unix_path"`
40826 HOTSPOT_RC="$windows_path"
40827 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40828 windows_path=`cmd //c echo $unix_path`
40829 HOTSPOT_RC="$windows_path"
40830 fi
40831
40832
40833
40834 else
40835 HOTSPOT_CXX="$CXX"
40836 HOTSPOT_LD="$LD"
40837 fi
40838
40839
40840
40841 if test "x$TOOLCHAIN_TYPE" = xclang; then
40842 USE_CLANG=true
40843 fi
40844
40845
40846
40847
40848
40849 # The package path is used only on macosx?
40850 # FIXME: clean this up, and/or move it elsewhere.
40851 PACKAGE_PATH=/opt/local
40852
40853
40854 # Check for extra potential brokenness.
40855 if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40856 # On Windows, double-check that we got the right compiler.
40857 CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40858 COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40859 if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40860 if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
40861 as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\" or \"x86\"." "$LINENO" 5
40862 fi
40863 elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40864 if test "x$COMPILER_CPU_TEST" != "xx64"; then
40865 as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40866 fi
40867 fi
40868 fi
40869
40870 if test "x$TOOLCHAIN_TYPE" = xgcc; then
40871 # If this is a --hash-style=gnu system, use --hash-style=both, why?
40872 HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40873 # This is later checked when setting flags.
40874
40875 # "-Og" suppported for GCC 4.8 and later
40876 CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
40877
40878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
40879 $as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
40880 supports=yes
40881
40882 saved_cflags="$CFLAGS"
40883 CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
40884 ac_ext=c
40885 ac_cpp='$CPP $CPPFLAGS'
40886 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40887 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40888 ac_compiler_gnu=$ac_cv_c_compiler_gnu
40889
40890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40891 /* end confdefs.h. */
40892 int i;
40893 _ACEOF
40894 if ac_fn_c_try_compile "$LINENO"; then :
40895
40896 else
40897 supports=no
40898 fi
40899 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40900 ac_ext=cpp
40901 ac_cpp='$CXXCPP $CPPFLAGS'
40902 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40903 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40904 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40905
40906 CFLAGS="$saved_cflags"
40907
40908 saved_cxxflags="$CXXFLAGS"
40909 CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
40910 ac_ext=cpp
40911 ac_cpp='$CXXCPP $CPPFLAGS'
40912 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40913 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40914 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40915
40916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40917 /* end confdefs.h. */
40918 int i;
40919 _ACEOF
40920 if ac_fn_cxx_try_compile "$LINENO"; then :
40921
40922 else
40923 supports=no
40924 fi
40925 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40926 ac_ext=cpp
40927 ac_cpp='$CXXCPP $CPPFLAGS'
40928 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40929 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40930 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40931
40932 CXXFLAGS="$saved_cxxflags"
40933
40934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40935 $as_echo "$supports" >&6; }
40936 if test "x$supports" = "xyes" ; then
40937 HAS_CFLAG_OPTIMIZE_DEBUG=true
40938 else
40939 HAS_CFLAG_OPTIMIZE_DEBUG=false
40940 fi
40941
40942
40943 # "-z relro" supported in GNU binutils 2.17 and later
40944 LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
40945
40946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
40947 $as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
40948 supports=yes
40949
40950 saved_ldflags="$LDFLAGS"
40951 LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
40952 ac_ext=c
40953 ac_cpp='$CPP $CPPFLAGS'
40954 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40955 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40956 ac_compiler_gnu=$ac_cv_c_compiler_gnu
40957
40958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40959 /* end confdefs.h. */
40960
40961 int
40962 main ()
40963 {
40964
40965 ;
40966 return 0;
40967 }
40968 _ACEOF
40969 if ac_fn_c_try_link "$LINENO"; then :
40970
40971 else
40972 supports=no
40973 fi
40974 rm -f core conftest.err conftest.$ac_objext \
40975 conftest$ac_exeext conftest.$ac_ext
40976 ac_ext=cpp
40977 ac_cpp='$CXXCPP $CPPFLAGS'
40978 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40979 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40980 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40981
40982 LDFLAGS="$saved_ldflags"
40983
40984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40985 $as_echo "$supports" >&6; }
40986 if test "x$supports" = "xyes" ; then
40987 HAS_LINKER_RELRO=true
40988 else
40989 HAS_LINKER_RELRO=false
40990 fi
40991
40992
40993 # "-z now" supported in GNU binutils 2.11 and later
40994 LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
40995
40996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
40997 $as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
40998 supports=yes
40999
41000 saved_ldflags="$LDFLAGS"
41001 LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
41002 ac_ext=c
41003 ac_cpp='$CPP $CPPFLAGS'
41004 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41005 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41006 ac_compiler_gnu=$ac_cv_c_compiler_gnu
41007
41008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41009 /* end confdefs.h. */
41010
41011 int
41012 main ()
41013 {
41014
41015 ;
41016 return 0;
41017 }
41018 _ACEOF
41019 if ac_fn_c_try_link "$LINENO"; then :
41020
41021 else
41022 supports=no
41023 fi
41024 rm -f core conftest.err conftest.$ac_objext \
41025 conftest$ac_exeext conftest.$ac_ext
41026 ac_ext=cpp
41027 ac_cpp='$CXXCPP $CPPFLAGS'
41028 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41029 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41030 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41031
41032 LDFLAGS="$saved_ldflags"
41033
41034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41035 $as_echo "$supports" >&6; }
41036 if test "x$supports" = "xyes" ; then
41037 HAS_LINKER_NOW=true
41038 else
41039 HAS_LINKER_NOW=false
41040 fi
41041
41042 fi
41043
41044 # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
41045 # in executable.'
41046 USING_BROKEN_SUSE_LD=no
41047 if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
41048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
41049 $as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
41050 $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
41051 $ECHO "int main() { }" > main.c
41052 if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
41053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41054 $as_echo "no" >&6; }
41055 USING_BROKEN_SUSE_LD=no
41056 else
41057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41058 $as_echo "yes" >&6; }
41059 USING_BROKEN_SUSE_LD=yes
41060 fi
41061 rm -rf version-script.map main.c a.out
41062 fi
41063
41064
41065
41066 # Setup the JTReg Regression Test Harness.
41067
41068
41069 # Check whether --with-jtreg was given.
41070 if test "${with_jtreg+set}" = set; then :
41071 withval=$with_jtreg;
41072 else
41073 with_jtreg=no
41074 fi
41075
41076
41077 if test "x$with_jtreg" = xno; then
41078 # jtreg disabled
41079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41080 $as_echo_n "checking for jtreg... " >&6; }
41081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41082 $as_echo "no" >&6; }
41083 else
41084 if test "x$with_jtreg" != xyes; then
41085 # with path specified.
41086 JT_HOME="$with_jtreg"
41087 fi
41088
41089 if test "x$JT_HOME" != x; then
41090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41091 $as_echo_n "checking for jtreg... " >&6; }
41092
41093 # use JT_HOME enviroment var.
41094
41095 # Only process if variable expands to non-empty
41096
41097 if test "x$JT_HOME" != x; then
41098 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41099
41100 # Input might be given as Windows format, start by converting to
41101 # unix format.
41102 path="$JT_HOME"
41103 new_path=`$CYGPATH -u "$path"`
41104
41105 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41106 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41107 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41108 # "foo.exe" is OK but "foo" is an error.
41109 #
41110 # This test is therefore slightly more accurate than "test -f" to check for file precense.
41111 # It is also a way to make sure we got the proper file name for the real test later on.
41112 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41113 if test "x$test_shortpath" = x; then
41114 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41115 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41116 as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
41117 fi
41118
41119 # Call helper function which possibly converts this using DOS-style short mode.
41120 # If so, the updated path is stored in $new_path.
41121
41122 input_path="$new_path"
41123 # Check if we need to convert this using DOS-style short mode. If the path
41124 # contains just simple characters, use it. Otherwise (spaces, weird characters),
41125 # take no chances and rewrite it.
41126 # Note: m4 eats our [], so we need to use [ and ] instead.
41127 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41128 if test "x$has_forbidden_chars" != x; then
41129 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41130 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41131 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41132 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41133 # Going to short mode and back again did indeed matter. Since short mode is
41134 # case insensitive, let's make it lowercase to improve readability.
41135 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41136 # Now convert it back to Unix-style (cygpath)
41137 input_path=`$CYGPATH -u "$shortmode_path"`
41138 new_path="$input_path"
41139 fi
41140 fi
41141
41142 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41143 if test "x$test_cygdrive_prefix" = x; then
41144 # As a simple fix, exclude /usr/bin since it's not a real path.
41145 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
41146 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41147 # a path prefixed by /cygdrive for fixpath to work.
41148 new_path="$CYGWIN_ROOT_PATH$input_path"
41149 fi
41150 fi
41151
41152
41153 if test "x$path" != "x$new_path"; then
41154 JT_HOME="$new_path"
41155 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41156 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41157 fi
41158
41159 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41160
41161 path="$JT_HOME"
41162 has_colon=`$ECHO $path | $GREP ^.:`
41163 new_path="$path"
41164 if test "x$has_colon" = x; then
41165 # Not in mixed or Windows style, start by that.
41166 new_path=`cmd //c echo $path`
41167 fi
41168
41169
41170 input_path="$new_path"
41171 # Check if we need to convert this using DOS-style short mode. If the path
41172 # contains just simple characters, use it. Otherwise (spaces, weird characters),
41173 # take no chances and rewrite it.
41174 # Note: m4 eats our [], so we need to use [ and ] instead.
41175 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41176 if test "x$has_forbidden_chars" != x; then
41177 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41178 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41179 fi
41180
41181
41182 windows_path="$new_path"
41183 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41184 unix_path=`$CYGPATH -u "$windows_path"`
41185 new_path="$unix_path"
41186 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41187 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41188 new_path="$unix_path"
41189 fi
41190
41191 if test "x$path" != "x$new_path"; then
41192 JT_HOME="$new_path"
41193 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41194 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41195 fi
41196
41197 # Save the first 10 bytes of this path to the storage, so fixpath can work.
41198 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41199
41200 else
41201 # We're on a unix platform. Hooray! :)
41202 path="$JT_HOME"
41203 has_space=`$ECHO "$path" | $GREP " "`
41204 if test "x$has_space" != x; then
41205 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41206 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41207 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
41208 fi
41209
41210 # Use eval to expand a potential ~
41211 eval path="$path"
41212 if test ! -f "$path" && test ! -d "$path"; then
41213 as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
41214 fi
41215
41216 JT_HOME="`cd "$path"; $THEPWDCMD -L`"
41217 fi
41218 fi
41219
41220
41221 # jtreg win32 script works for everybody
41222 JTREGEXE="$JT_HOME/bin/jtreg"
41223
41224 if test ! -f "$JTREGEXE"; then
41225 as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
41226 fi
41227
41228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41229 $as_echo "$JTREGEXE" >&6; }
41230 else
41231 # try to find jtreg on path
41232
41233
41234
41235 # Publish this variable in the help.
41236
41237
41238 if test "x$JTREGEXE" = x; then
41239 # The variable is not set by user, try to locate tool using the code snippet
41240 for ac_prog in jtreg
41241 do
41242 # Extract the first word of "$ac_prog", so it can be a program name with args.
41243 set dummy $ac_prog; ac_word=$2
41244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41245 $as_echo_n "checking for $ac_word... " >&6; }
41246 if ${ac_cv_path_JTREGEXE+:} false; then :
41247 $as_echo_n "(cached) " >&6
41248 else
41249 case $JTREGEXE in
41250 [\\/]* | ?:[\\/]*)
41251 ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41252 ;;
41253 *)
41254 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41255 for as_dir in $PATH
41256 do
41257 IFS=$as_save_IFS
41258 test -z "$as_dir" && as_dir=.
41259 for ac_exec_ext in '' $ac_executable_extensions; do
41260 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41261 ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41262 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41263 break 2
41264 fi
41265 done
41266 done
41267 IFS=$as_save_IFS
41268
41269 ;;
41270 esac
41271 fi
41272 JTREGEXE=$ac_cv_path_JTREGEXE
41273 if test -n "$JTREGEXE"; then
41274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41275 $as_echo "$JTREGEXE" >&6; }
41276 else
41277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41278 $as_echo "no" >&6; }
41279 fi
41280
41281
41282 test -n "$JTREGEXE" && break
41283 done
41284
41285 else
41286 # The variable is set, but is it from the command line or the environment?
41287
41288 # Try to remove the string !JTREGEXE! from our list.
41289 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
41290 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41291 # If it failed, the variable was not from the command line. Ignore it,
41292 # but warn the user (except for BASH, which is always set by the calling BASH).
41293 if test "xJTREGEXE" != xBASH; then
41294 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
41295 $as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
41296 fi
41297 # Try to locate tool using the code snippet
41298 for ac_prog in jtreg
41299 do
41300 # Extract the first word of "$ac_prog", so it can be a program name with args.
41301 set dummy $ac_prog; ac_word=$2
41302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41303 $as_echo_n "checking for $ac_word... " >&6; }
41304 if ${ac_cv_path_JTREGEXE+:} false; then :
41305 $as_echo_n "(cached) " >&6
41306 else
41307 case $JTREGEXE in
41308 [\\/]* | ?:[\\/]*)
41309 ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41310 ;;
41311 *)
41312 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41313 for as_dir in $PATH
41314 do
41315 IFS=$as_save_IFS
41316 test -z "$as_dir" && as_dir=.
41317 for ac_exec_ext in '' $ac_executable_extensions; do
41318 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41319 ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41320 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41321 break 2
41322 fi
41323 done
41324 done
41325 IFS=$as_save_IFS
41326
41327 ;;
41328 esac
41329 fi
41330 JTREGEXE=$ac_cv_path_JTREGEXE
41331 if test -n "$JTREGEXE"; then
41332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41333 $as_echo "$JTREGEXE" >&6; }
41334 else
41335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41336 $as_echo "no" >&6; }
41337 fi
41338
41339
41340 test -n "$JTREGEXE" && break
41341 done
41342
41343 else
41344 # If it succeeded, then it was overridden by the user. We will use it
41345 # for the tool.
41346
41347 # First remove it from the list of overridden variables, so we can test
41348 # for unknown variables in the end.
41349 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41350
41351 # Check if the provided tool contains a complete path.
41352 tool_specified="$JTREGEXE"
41353 tool_basename="${tool_specified##*/}"
41354 if test "x$tool_basename" = "x$tool_specified"; then
41355 # A command without a complete path is provided, search $PATH.
41356 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
41357 $as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
41358 # Extract the first word of "$tool_basename", so it can be a program name with args.
41359 set dummy $tool_basename; ac_word=$2
41360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41361 $as_echo_n "checking for $ac_word... " >&6; }
41362 if ${ac_cv_path_JTREGEXE+:} false; then :
41363 $as_echo_n "(cached) " >&6
41364 else
41365 case $JTREGEXE in
41366 [\\/]* | ?:[\\/]*)
41367 ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41368 ;;
41369 *)
41370 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41371 for as_dir in $PATH
41372 do
41373 IFS=$as_save_IFS
41374 test -z "$as_dir" && as_dir=.
41375 for ac_exec_ext in '' $ac_executable_extensions; do
41376 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41377 ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41378 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41379 break 2
41380 fi
41381 done
41382 done
41383 IFS=$as_save_IFS
41384
41385 ;;
41386 esac
41387 fi
41388 JTREGEXE=$ac_cv_path_JTREGEXE
41389 if test -n "$JTREGEXE"; then
41390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41391 $as_echo "$JTREGEXE" >&6; }
41392 else
41393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41394 $as_echo "no" >&6; }
41395 fi
41396
41397
41398 if test "x$JTREGEXE" = x; then
41399 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41400 fi
41401 else
41402 # Otherwise we believe it is a complete path. Use it as it is.
41403 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
41404 $as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
41405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
41406 $as_echo_n "checking for JTREGEXE... " >&6; }
41407 if test ! -x "$tool_specified"; then
41408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41409 $as_echo "not found" >&6; }
41410 as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
41411 fi
41412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41413 $as_echo "$tool_specified" >&6; }
41414 fi
41415 fi
41416 fi
41417
41418
41419
41420 if test "x$JTREGEXE" = x; then
41421 as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
41422 fi
41423
41424
41425 JT_HOME="`$DIRNAME $JTREGEXE`"
41426 fi
41427 fi
41428
41429
41430
41431
41432
41433
41434 # Option used to tell the compiler whether to create 32- or 64-bit executables
41435 if test "x$TOOLCHAIN_TYPE" = xxlc; then
41436 COMPILER_TARGET_BITS_FLAG="-q"
41437 else
41438 COMPILER_TARGET_BITS_FLAG="-m"
41439 fi
41440
41441
41442 # FIXME: figure out if we should select AR flags depending on OS or toolchain.
41443 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41444 ARFLAGS="-r"
41445 elif test "x$OPENJDK_TARGET_OS" = xaix; then
41446 ARFLAGS="-X64"
41447 elif test "x$OPENJDK_TARGET_OS" = xwindows; then
41448 # lib.exe is used as AR to create static libraries.
41449 ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
41450 else
41451 ARFLAGS=""
41452 fi
41453
41454
41455 ## Setup strip.
41456 # FIXME: should this really be per platform, or should it be per toolchain type?
41457 # strip is not provided by clang or solstudio; so guessing platform makes most sense.
41458 # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
41459 if test "x$OPENJDK_TARGET_OS" = xlinux; then
41460 STRIPFLAGS="-g"
41461 elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
41462 STRIPFLAGS="-x"
41463 elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41464 STRIPFLAGS="-S"
41465 elif test "x$OPENJDK_TARGET_OS" = xaix; then
41466 STRIPFLAGS="-X32_64"
41467 fi
41468
41469 if test "x$OPENJDK_TARGET_OS" != xwindows; then
41470 POST_STRIP_CMD="$STRIP $STRIPFLAGS"
41471 fi
41472
41473
41474 if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41475 CC_OUT_OPTION=-Fo
41476 EXE_OUT_OPTION=-out:
41477 LD_OUT_OPTION=-out:
41478 AR_OUT_OPTION=-out:
41479 else
41480 # The option used to specify the target .o,.a or .so file.
41481 # When compiling, how to specify the to be created object file.
41482 CC_OUT_OPTION='-o$(SPACE)'
41483 # When linking, how to specify the to be created executable.
41484 EXE_OUT_OPTION='-o$(SPACE)'
41485 # When linking, how to specify the to be created dynamically linkable library.
41486 LD_OUT_OPTION='-o$(SPACE)'
41487 # When archiving, how to specify the to be create static archive for object files.
41488 AR_OUT_OPTION='rcs$(SPACE)'
41489 fi
41490
41491
41492
41493
41494
41495 # On Windows, we need to set RC flags.
41496 if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41497 RC_FLAGS="-nologo -l0x409"
41498 if test "x$VARIANT" = xOPT; then
41499 RC_FLAGS="$RC_FLAGS -DNDEBUG"
41500 fi
41501
41502 # The version variables used to create RC_FLAGS may be overridden
41503 # in a custom configure script, or possibly the command line.
41504 # Let those variables be expanded at make time in spec.gmk.
41505 # The \$ are escaped to the shell, and the $(...) variables
41506 # are evaluated by make.
41507 RC_FLAGS="$RC_FLAGS \
41508 -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
41509 -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
41510 -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
41511 -D\"JDK_VER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
41512 -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
41513 -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
41514 -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
41515 fi
41516
41517
41518 if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41519 # silence copyright notice and other headers.
41520 COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
41521 fi
41522
41523 if test "x$SYSROOT" != "x"; then
41524 if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41525 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41526 # Solaris Studio does not have a concept of sysroot. Instead we must
41527 # make sure the default include and lib dirs are appended to each
41528 # compile and link command line.
41529 SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
41530 SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
41531 -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
41532 -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
41533 fi
41534 elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41535 # Apple only wants -isysroot <path>, but we also need -iframework<path>/System/Library/Frameworks
41536 SYSROOT_CFLAGS="-isysroot \"$SYSROOT\" -iframework\"$SYSROOT/System/Library/Frameworks\""
41537 SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
41538 elif test "x$TOOLCHAIN_TYPE" = xgcc; then
41539 SYSROOT_CFLAGS="--sysroot=$SYSROOT"
41540 SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
41541 elif test "x$TOOLCHAIN_TYPE" = xclang; then
41542 SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
41543 SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
41544 fi
41545 # Propagate the sysroot args to hotspot
41546 LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
41547 LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
41548 LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
41549 fi
41550
41551 # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
41552 # set this here so it doesn't have to be peppered throughout the forest
41553 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41554 SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41555 SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41556 fi
41557
41558
41559
41560
41561
41562 # FIXME: Currently we must test this after toolchain but before flags. Fix!
41563
41564 # Now we can test some aspects on the target using configure macros.
41565
41566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
41567 $as_echo_n "checking for ANSI C header files... " >&6; }
41568 if ${ac_cv_header_stdc+:} false; then :
41569 $as_echo_n "(cached) " >&6
41570 else
41571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41572 /* end confdefs.h. */
41573 #include <stdlib.h>
41574 #include <stdarg.h>
41575 #include <string.h>
41576 #include <float.h>
41577
41578 int
41579 main ()
41580 {
41581
41582 ;
41583 return 0;
41584 }
41585 _ACEOF
41586 if ac_fn_cxx_try_compile "$LINENO"; then :
41587 ac_cv_header_stdc=yes
41588 else
41589 ac_cv_header_stdc=no
41590 fi
41591 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41592
41593 if test $ac_cv_header_stdc = yes; then
41594 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
41595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41596 /* end confdefs.h. */
41597 #include <string.h>
41598
41599 _ACEOF
41600 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41601 $EGREP "memchr" >/dev/null 2>&1; then :
41602
41603 else
41604 ac_cv_header_stdc=no
41605 fi
41606 rm -f conftest*
41607
41608 fi
41609
41610 if test $ac_cv_header_stdc = yes; then
41611 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
41612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41613 /* end confdefs.h. */
41614 #include <stdlib.h>
41615
41616 _ACEOF
41617 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41618 $EGREP "free" >/dev/null 2>&1; then :
41619
41620 else
41621 ac_cv_header_stdc=no
41622 fi
41623 rm -f conftest*
41624
41625 fi
41626
41627 if test $ac_cv_header_stdc = yes; then
41628 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
41629 if test "$cross_compiling" = yes; then :
41630 :
41631 else
41632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41633 /* end confdefs.h. */
41634 #include <ctype.h>
41635 #include <stdlib.h>
41636 #if ((' ' & 0x0FF) == 0x020)
41637 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
41638 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
41639 #else
41640 # define ISLOWER(c) \
41641 (('a' <= (c) && (c) <= 'i') \
41642 || ('j' <= (c) && (c) <= 'r') \
41643 || ('s' <= (c) && (c) <= 'z'))
41644 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
41645 #endif
41646
41647 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
41648 int
41649 main ()
41650 {
41651 int i;
41652 for (i = 0; i < 256; i++)
41653 if (XOR (islower (i), ISLOWER (i))
41654 || toupper (i) != TOUPPER (i))
41655 return 2;
41656 return 0;
41657 }
41658 _ACEOF
41659 if ac_fn_cxx_try_run "$LINENO"; then :
41660
41661 else
41662 ac_cv_header_stdc=no
41663 fi
41664 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41665 conftest.$ac_objext conftest.beam conftest.$ac_ext
41666 fi
41667
41668 fi
41669 fi
41670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
41671 $as_echo "$ac_cv_header_stdc" >&6; }
41672 if test $ac_cv_header_stdc = yes; then
41673
41674 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
41675
41676 fi
41677
41678 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
41679 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
41680 inttypes.h stdint.h unistd.h
41681 do :
41682 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
41683 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
41684 "
41685 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
41686 cat >>confdefs.h <<_ACEOF
41687 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
41688 _ACEOF
41689
41690 fi
41691
41692 done
41693
41694
41695
41696 ###############################################################################
41697 #
41698 # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
41699 # (The JVM can use 32 or 64 bit Java pointers but that decision
41700 # is made at runtime.)
41701 #
41702
41703 if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
41704 # Always specify -m flag on Solaris
41705 # And -q on AIX because otherwise the compiler produces 32-bit objects by default
41706
41707 # When we add flags to the "official" CFLAGS etc, we need to
41708 # keep track of these additions in ADDED_CFLAGS etc. These
41709 # will later be checked to make sure only controlled additions
41710 # have been made to CFLAGS etc.
41711 ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41712 ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41713 ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41714
41715 CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41716 CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41717 LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41718
41719 CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41720 CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41721 LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41722
41723 elif test "x$COMPILE_TYPE" = xreduced; then
41724 if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
41725 # Specify -m if running reduced on unix platforms
41726
41727 # When we add flags to the "official" CFLAGS etc, we need to
41728 # keep track of these additions in ADDED_CFLAGS etc. These
41729 # will later be checked to make sure only controlled additions
41730 # have been made to CFLAGS etc.
41731 ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41732 ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41733 ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41734
41735 CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41736 CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41737 LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41738
41739 CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41740 CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41741 LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41742
41743 fi
41744 fi
41745
41746 # Make compilation sanity check
41747 for ac_header in stdio.h
41748 do :
41749 ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
41750 if test "x$ac_cv_header_stdio_h" = xyes; then :
41751 cat >>confdefs.h <<_ACEOF
41752 #define HAVE_STDIO_H 1
41753 _ACEOF
41754
41755 else
41756
41757 { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
41758 $as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
41759 if test "x$COMPILE_TYPE" = xreduced; then
41760 { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
41761 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
41762 elif test "x$COMPILE_TYPE" = xcross; then
41763 { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
41764 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
41765 fi
41766 as_fn_error $? "Cannot continue." "$LINENO" 5
41767
41768 fi
41769
41770 done
41771
41772
41773 # The cast to long int works around a bug in the HP C Compiler
41774 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41775 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41776 # This bug is HP SR number 8606223364.
41777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41778 $as_echo_n "checking size of int *... " >&6; }
41779 if ${ac_cv_sizeof_int_p+:} false; then :
41780 $as_echo_n "(cached) " >&6
41781 else
41782 if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p" "$ac_includes_default"; then :
41783
41784 else
41785 if test "$ac_cv_type_int_p" = yes; then
41786 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41787 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41788 as_fn_error 77 "cannot compute sizeof (int *)
41789 See \`config.log' for more details" "$LINENO" 5; }
41790 else
41791 ac_cv_sizeof_int_p=0
41792 fi
41793 fi
41794
41795 fi
41796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41797 $as_echo "$ac_cv_sizeof_int_p" >&6; }
41798
41799
41800
41801 cat >>confdefs.h <<_ACEOF
41802 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
41803 _ACEOF
41804
41805
41806
41807 # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
41808 if test "x$ac_cv_sizeof_int_p" = x; then
41809 # The test failed, lets stick to the assumed value.
41810 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&5
41811 $as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
41812 else
41813 TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41814
41815 if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41816 # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
41817 # Let's try to implicitely set the compilers target architecture and retry the test
41818 { $as_echo "$as_me:${as_lineno-$LINENO}: The tested number of bits in the target ($TESTED_TARGET_CPU_BITS) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS)." >&5
41819 $as_echo "$as_me: The tested number of bits in the target ($TESTED_TARGET_CPU_BITS) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS)." >&6;}
41820 { $as_echo "$as_me:${as_lineno-$LINENO}: I'll retry after setting the platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
41821 $as_echo "$as_me: I'll retry after setting the platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
41822
41823 # When we add flags to the "official" CFLAGS etc, we need to
41824 # keep track of these additions in ADDED_CFLAGS etc. These
41825 # will later be checked to make sure only controlled additions
41826 # have been made to CFLAGS etc.
41827 ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41828 ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41829 ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41830
41831 CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41832 CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41833 LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41834
41835 CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41836 CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41837 LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41838
41839
41840 # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
41841 unset ac_cv_sizeof_int_p
41842 # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
41843 cat >>confdefs.h <<_ACEOF
41844 #undef SIZEOF_INT_P
41845 _ACEOF
41846
41847 # The cast to long int works around a bug in the HP C Compiler
41848 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41849 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41850 # This bug is HP SR number 8606223364.
41851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41852 $as_echo_n "checking size of int *... " >&6; }
41853 if ${ac_cv_sizeof_int_p+:} false; then :
41854 $as_echo_n "(cached) " >&6
41855 else
41856 if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p" "$ac_includes_default"; then :
41857
41858 else
41859 if test "$ac_cv_type_int_p" = yes; then
41860 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41861 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41862 as_fn_error 77 "cannot compute sizeof (int *)
41863 See \`config.log' for more details" "$LINENO" 5; }
41864 else
41865 ac_cv_sizeof_int_p=0
41866 fi
41867 fi
41868
41869 fi
41870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41871 $as_echo "$ac_cv_sizeof_int_p" >&6; }
41872
41873
41874
41875 cat >>confdefs.h <<_ACEOF
41876 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
41877 _ACEOF
41878
41879
41880
41881 TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41882
41883 if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41884 as_fn_error $? "The tested number of bits in the target ($TESTED_TARGET_CPU_BITS) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS)" "$LINENO" 5
41885 fi
41886 fi
41887 fi
41888
41889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
41890 $as_echo_n "checking for target address size... " >&6; }
41891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
41892 $as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
41893
41894
41895 ###############################################################################
41896 #
41897 # Is the target little of big endian?
41898 #
41899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
41900 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
41901 if ${ac_cv_c_bigendian+:} false; then :
41902 $as_echo_n "(cached) " >&6
41903 else
41904 ac_cv_c_bigendian=unknown
41905 # See if we're dealing with a universal compiler.
41906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41907 /* end confdefs.h. */
41908 #ifndef __APPLE_CC__
41909 not a universal capable compiler
41910 #endif
41911 typedef int dummy;
41912
41913 _ACEOF
41914 if ac_fn_cxx_try_compile "$LINENO"; then :
41915
41916 # Check for potential -arch flags. It is not universal unless
41917 # there are at least two -arch flags with different values.
41918 ac_arch=
41919 ac_prev=
41920 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41921 if test -n "$ac_prev"; then
41922 case $ac_word in
41923 i?86 | x86_64 | ppc | ppc64)
41924 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41925 ac_arch=$ac_word
41926 else
41927 ac_cv_c_bigendian=universal
41928 break
41929 fi
41930 ;;
41931 esac
41932 ac_prev=
41933 elif test "x$ac_word" = "x-arch"; then
41934 ac_prev=arch
41935 fi
41936 done
41937 fi
41938 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41939 if test $ac_cv_c_bigendian = unknown; then
41940 # See if sys/param.h defines the BYTE_ORDER macro.
41941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41942 /* end confdefs.h. */
41943 #include <sys/types.h>
41944 #include <sys/param.h>
41945
41946 int
41947 main ()
41948 {
41949 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
41950 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
41951 && LITTLE_ENDIAN)
41952 bogus endian macros
41953 #endif
41954
41955 ;
41956 return 0;
41957 }
41958 _ACEOF
41959 if ac_fn_cxx_try_compile "$LINENO"; then :
41960 # It does; now see whether it defined to BIG_ENDIAN or not.
41961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41962 /* end confdefs.h. */
41963 #include <sys/types.h>
41964 #include <sys/param.h>
41965
41966 int
41967 main ()
41968 {
41969 #if BYTE_ORDER != BIG_ENDIAN
41970 not big endian
41971 #endif
41972
41973 ;
41974 return 0;
41975 }
41976 _ACEOF
41977 if ac_fn_cxx_try_compile "$LINENO"; then :
41978 ac_cv_c_bigendian=yes
41979 else
41980 ac_cv_c_bigendian=no
41981 fi
41982 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41983 fi
41984 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41985 fi
41986 if test $ac_cv_c_bigendian = unknown; then
41987 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
41988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41989 /* end confdefs.h. */
41990 #include <limits.h>
41991
41992 int
41993 main ()
41994 {
41995 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
41996 bogus endian macros
41997 #endif
41998
41999 ;
42000 return 0;
42001 }
42002 _ACEOF
42003 if ac_fn_cxx_try_compile "$LINENO"; then :
42004 # It does; now see whether it defined to _BIG_ENDIAN or not.
42005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42006 /* end confdefs.h. */
42007 #include <limits.h>
42008
42009 int
42010 main ()
42011 {
42012 #ifndef _BIG_ENDIAN
42013 not big endian
42014 #endif
42015
42016 ;
42017 return 0;
42018 }
42019 _ACEOF
42020 if ac_fn_cxx_try_compile "$LINENO"; then :
42021 ac_cv_c_bigendian=yes
42022 else
42023 ac_cv_c_bigendian=no
42024 fi
42025 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42026 fi
42027 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42028 fi
42029 if test $ac_cv_c_bigendian = unknown; then
42030 # Compile a test program.
42031 if test "$cross_compiling" = yes; then :
42032 # Try to guess by grepping values from an object file.
42033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42034 /* end confdefs.h. */
42035 short int ascii_mm[] =
42036 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
42037 short int ascii_ii[] =
42038 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
42039 int use_ascii (int i) {
42040 return ascii_mm[i] + ascii_ii[i];
42041 }
42042 short int ebcdic_ii[] =
42043 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
42044 short int ebcdic_mm[] =
42045 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
42046 int use_ebcdic (int i) {
42047 return ebcdic_mm[i] + ebcdic_ii[i];
42048 }
42049 extern int foo;
42050
42051 int
42052 main ()
42053 {
42054 return use_ascii (foo) == use_ebcdic (foo);
42055 ;
42056 return 0;
42057 }
42058 _ACEOF
42059 if ac_fn_cxx_try_compile "$LINENO"; then :
42060 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
42061 ac_cv_c_bigendian=yes
42062 fi
42063 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
42064 if test "$ac_cv_c_bigendian" = unknown; then
42065 ac_cv_c_bigendian=no
42066 else
42067 # finding both strings is unlikely to happen, but who knows?
42068 ac_cv_c_bigendian=unknown
42069 fi
42070 fi
42071 fi
42072 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42073 else
42074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42075 /* end confdefs.h. */
42076 $ac_includes_default
42077 int
42078 main ()
42079 {
42080
42081 /* Are we little or big endian? From Harbison&Steele. */
42082 union
42083 {
42084 long int l;
42085 char c[sizeof (long int)];
42086 } u;
42087 u.l = 1;
42088 return u.c[sizeof (long int) - 1] == 1;
42089
42090 ;
42091 return 0;
42092 }
42093 _ACEOF
42094 if ac_fn_cxx_try_run "$LINENO"; then :
42095 ac_cv_c_bigendian=no
42096 else
42097 ac_cv_c_bigendian=yes
42098 fi
42099 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42100 conftest.$ac_objext conftest.beam conftest.$ac_ext
42101 fi
42102
42103 fi
42104 fi
42105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
42106 $as_echo "$ac_cv_c_bigendian" >&6; }
42107 case $ac_cv_c_bigendian in #(
42108 yes)
42109 ENDIAN="big";; #(
42110 no)
42111 ENDIAN="little" ;; #(
42112 universal)
42113 ENDIAN="universal_endianness"
42114 ;; #(
42115 *)
42116 ENDIAN="unknown" ;;
42117 esac
42118
42119
42120 if test "x$ENDIAN" = xuniversal_endianness; then
42121 as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
42122 fi
42123 if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
42124 as_fn_error $? "The tested endian in the target ($ENDIAN) differs from the endian expected to be found in the target ($OPENJDK_TARGET_CPU_ENDIAN)" "$LINENO" 5
42125 fi
42126
42127
42128 # Configure flags for the tools
42129
42130 ###############################################################################
42131 #
42132 # How to compile shared libraries.
42133 #
42134
42135 if test "x$TOOLCHAIN_TYPE" = xgcc; then
42136 PICFLAG="-fPIC"
42137 C_FLAG_REORDER=''
42138 CXX_FLAG_REORDER=''
42139
42140 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42141 # Linking is different on MacOSX
42142 SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42143 SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42144 SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42145 SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42146 SET_SHARED_LIBRARY_MAPFILE=''
42147 else
42148 # Default works for linux, might work on other platforms as well.
42149 SHARED_LIBRARY_FLAGS='-shared'
42150 SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42151 SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42152 SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42153 SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42154 fi
42155 elif test "x$TOOLCHAIN_TYPE" = xclang; then
42156 PICFLAG=''
42157 C_FLAG_REORDER=''
42158 CXX_FLAG_REORDER=''
42159
42160 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42161 # Linking is different on MacOSX
42162 SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42163 SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42164 SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42165 SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42166 SET_SHARED_LIBRARY_MAPFILE=''
42167 else
42168 # Default works for linux, might work on other platforms as well.
42169 SHARED_LIBRARY_FLAGS='-shared'
42170 SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42171 SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42172 SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42173 SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42174 fi
42175 elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42176 PICFLAG="-KPIC"
42177 C_FLAG_REORDER='-xF'
42178 CXX_FLAG_REORDER='-xF'
42179 SHARED_LIBRARY_FLAGS="-G"
42180 SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
42181 SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42182 SET_SHARED_LIBRARY_NAME=''
42183 SET_SHARED_LIBRARY_MAPFILE='-M$1'
42184 elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42185 PICFLAG="-qpic=large"
42186 C_FLAG_REORDER=''
42187 CXX_FLAG_REORDER=''
42188 SHARED_LIBRARY_FLAGS="-qmkshrobj"
42189 SET_EXECUTABLE_ORIGIN=""
42190 SET_SHARED_LIBRARY_ORIGIN=''
42191 SET_SHARED_LIBRARY_NAME=''
42192 SET_SHARED_LIBRARY_MAPFILE=''
42193 elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42194 PICFLAG=""
42195 C_FLAG_REORDER=''
42196 CXX_FLAG_REORDER=''
42197 SHARED_LIBRARY_FLAGS="-LD"
42198 SET_EXECUTABLE_ORIGIN=''
42199 SET_SHARED_LIBRARY_ORIGIN=''
42200 SET_SHARED_LIBRARY_NAME=''
42201 SET_SHARED_LIBRARY_MAPFILE=''
42202 fi
42203
42204
42205
42206
42207
42208
42209
42210
42211 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42212 CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
42213 CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
42214 CFLAGS_JDKLIB_EXTRA='-xstrconst'
42215 fi
42216 # The (cross) compiler is now configured, we can now test capabilities
42217 # of the target platform.
42218
42219
42220
42221 ###############################################################################
42222 #
42223 # Setup the opt flags for different compilers
42224 # and different operating systems.
42225 #
42226
42227 # FIXME: this was indirectly the old default, but just inherited.
42228 # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42229 # C_FLAG_DEPS="-MMD -MF"
42230 # fi
42231
42232 # Generate make dependency files
42233 if test "x$TOOLCHAIN_TYPE" = xgcc; then
42234 C_FLAG_DEPS="-MMD -MF"
42235 elif test "x$TOOLCHAIN_TYPE" = xclang; then
42236 C_FLAG_DEPS="-MMD -MF"
42237 elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42238 C_FLAG_DEPS="-xMMD -xMF"
42239 elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42240 C_FLAG_DEPS="-qmakedep=gcc -MF"
42241 fi
42242 CXX_FLAG_DEPS="$C_FLAG_DEPS"
42243
42244
42245
42246 # Debug symbols
42247 if test "x$TOOLCHAIN_TYPE" = xgcc; then
42248 if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
42249 # reduce from default "-g2" option to save space
42250 CFLAGS_DEBUG_SYMBOLS="-g1"
42251 CXXFLAGS_DEBUG_SYMBOLS="-g1"
42252 else
42253 CFLAGS_DEBUG_SYMBOLS="-g"
42254 CXXFLAGS_DEBUG_SYMBOLS="-g"
42255 fi
42256 elif test "x$TOOLCHAIN_TYPE" = xclang; then
42257 CFLAGS_DEBUG_SYMBOLS="-g"
42258 CXXFLAGS_DEBUG_SYMBOLS="-g"
42259 elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42260 CFLAGS_DEBUG_SYMBOLS="-g -xs"
42261 # FIXME: likely a bug, this disables debug symbols rather than enables them
42262 CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
42263 elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42264 CFLAGS_DEBUG_SYMBOLS="-g"
42265 CXXFLAGS_DEBUG_SYMBOLS="-g"
42266 fi
42267
42268
42269
42270 # bounds, memory and behavior checking options
42271 if test "x$TOOLCHAIN_TYPE" = xgcc; then
42272 case $DEBUG_LEVEL in
42273 release )
42274 # no adjustment
42275 ;;
42276 fastdebug )
42277 # no adjustment
42278 ;;
42279 slowdebug )
42280 # Add runtime stack smashing and undefined behavior checks
42281 CFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
42282 CXXFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
42283 ;;
42284 esac
42285 fi
42286
42287
42288
42289 # Optimization levels
42290 if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42291 CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
42292
42293 if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
42294 # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
42295 C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
42296 C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
42297 C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
42298 C_O_FLAG_DEBUG="-xregs=no%frameptr"
42299 C_O_FLAG_NONE="-xregs=no%frameptr"
42300 CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
42301 CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
42302 CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
42303 CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
42304 CXX_O_FLAG_NONE="-xregs=no%frameptr"
42305 if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42306 C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
42307 CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
42308 fi
42309 elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42310 C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
42311 C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42312 C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42313 C_O_FLAG_DEBUG=""
42314 C_O_FLAG_NONE=""
42315 CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
42316 CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42317 CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42318 C_O_FLAG_DEBUG=""
42319 CXX_O_FLAG_NONE=""
42320 fi
42321 else
42322 # The remaining toolchains share opt flags between CC and CXX;
42323 # setup for C and duplicate afterwards.
42324 if test "x$TOOLCHAIN_TYPE" = xgcc; then
42325 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42326 # On MacOSX we optimize for size, something
42327 # we should do for all platforms?
42328 C_O_FLAG_HIGHEST="-Os"
42329 C_O_FLAG_HI="-Os"
42330 C_O_FLAG_NORM="-Os"
42331 else
42332 C_O_FLAG_HIGHEST="-O3"
42333 C_O_FLAG_HI="-O3"
42334 C_O_FLAG_NORM="-O2"
42335 fi
42336 C_O_FLAG_DEBUG="-O0"
42337 C_O_FLAG_NONE="-O0"
42338 elif test "x$TOOLCHAIN_TYPE" = xclang; then
42339 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42340 # On MacOSX we optimize for size, something
42341 # we should do for all platforms?
42342 C_O_FLAG_HIGHEST="-Os"
42343 C_O_FLAG_HI="-Os"
42344 C_O_FLAG_NORM="-Os"
42345 else
42346 C_O_FLAG_HIGHEST="-O3"
42347 C_O_FLAG_HI="-O3"
42348 C_O_FLAG_NORM="-O2"
42349 fi
42350 C_O_FLAG_DEBUG="-O0"
42351 C_O_FLAG_NONE="-O0"
42352 elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42353 C_O_FLAG_HIGHEST="-O3"
42354 C_O_FLAG_HI="-O3 -qstrict"
42355 C_O_FLAG_NORM="-O2"
42356 C_O_FLAG_DEBUG="-qnoopt"
42357 C_O_FLAG_NONE="-qnoop"
42358 elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42359 C_O_FLAG_HIGHEST="-O2"
42360 C_O_FLAG_HI="-O1"
42361 C_O_FLAG_NORM="-O1"
42362 C_O_FLAG_DEBUG="-Od"
42363 C_O_FLAG_NONE="-Od"
42364 fi
42365 CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
42366 CXX_O_FLAG_HI="$C_O_FLAG_HI"
42367 CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
42368 CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
42369 CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
42370 fi
42371
42372 # Adjust optimization flags according to debug level.
42373 case $DEBUG_LEVEL in
42374 release )
42375 # no adjustment
42376 ;;
42377 fastdebug )
42378 # Not quite so much optimization
42379 C_O_FLAG_HI="$C_O_FLAG_NORM"
42380 CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
42381 ;;
42382 slowdebug )
42383 # Disable optimization
42384 C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
42385 C_O_FLAG_HI="$C_O_FLAG_DEBUG"
42386 C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
42387 CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
42388 CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
42389 CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
42390 ;;
42391 esac
42392
42393
42394
42395
42396
42397
42398
42399
42400
42401
42402
42403
42404
42405 # Special extras...
42406 if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42407 if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42408 CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42409 CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42410 fi
42411 CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
42412 CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
42413 elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42414 CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
42415 CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
42416 fi
42417
42418 if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
42419 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
42420 $as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
42421 fi
42422
42423 if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
42424 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
42425 $as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
42426 fi
42427
42428 if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
42429 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
42430 $as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
42431 fi
42432
42433
42434 # Check whether --with-extra-cflags was given.
42435 if test "${with_extra_cflags+set}" = set; then :
42436 withval=$with_extra_cflags;
42437 fi
42438
42439
42440
42441 # Check whether --with-extra-cxxflags was given.
42442 if test "${with_extra_cxxflags+set}" = set; then :
42443 withval=$with_extra_cxxflags;
42444 fi
42445
42446
42447
42448 # Check whether --with-extra-ldflags was given.
42449 if test "${with_extra_ldflags+set}" = set; then :
42450 withval=$with_extra_ldflags;
42451 fi
42452
42453
42454 CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
42455 CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
42456 LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
42457
42458 # Hotspot needs these set in their legacy form
42459 LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
42460 LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
42461 LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
42462
42463
42464
42465
42466
42467 ###############################################################################
42468 #
42469 # Now setup the CFLAGS and LDFLAGS for the JDK build.
42470 # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
42471 #
42472
42473 # Setup compiler/platform specific flags into
42474 # CFLAGS_JDK - C Compiler flags
42475 # CXXFLAGS_JDK - C++ Compiler flags
42476 # COMMON_CCXXFLAGS_JDK - common to C and C++
42477 if test "x$TOOLCHAIN_TYPE" = xgcc; then
42478 if test "x$OPENJDK_TARGET_CPU" = xx86; then
42479 # Force compatibility with i586 on 32 bit intel platforms.
42480 COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
42481 fi
42482 COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
42483 -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
42484 case $OPENJDK_TARGET_CPU_ARCH in
42485 arm )
42486 # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42487 CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42488 ;;
42489 ppc )
42490 # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42491 CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42492 ;;
42493 * )
42494 COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
42495 CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42496 ;;
42497 esac
42498 elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42499 COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
42500 if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
42501 COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
42502 fi
42503
42504 CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
42505 CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
42506 elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42507 CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42508 CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42509 elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42510 COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
42511 -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
42512 -DWIN32_LEAN_AND_MEAN \
42513 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
42514 -D_WINSOCK_DEPRECATED_NO_WARNINGS \
42515 -DWIN32 -DIAL"
42516 if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
42517 COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
42518 else
42519 COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
42520 fi
42521 # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
42522 # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
42523 # studio.
42524 if test "x$TOOLCHAIN_VERSION" = "x2010"; then
42525 COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42526 -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
42527 fi
42528 fi
42529
42530 ###############################################################################
42531
42532 # Adjust flags according to debug level.
42533 case $DEBUG_LEVEL in
42534 fastdebug | slowdebug )
42535 CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
42536 CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
42537 JAVAC_FLAGS="$JAVAC_FLAGS -g"
42538 ;;
42539 release )
42540 ;;
42541 * )
42542 as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42543 ;;
42544 esac
42545
42546 # Setup LP64
42547 COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
42548
42549 # Set some common defines. These works for all compilers, but assume
42550 # -D is universally accepted.
42551
42552 # Setup endianness
42553 if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
42554 # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
42555 # Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
42556 # (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
42557 # Note: -Dmacro is the same as #define macro 1
42558 # -Dmacro= is the same as #define macro
42559 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42560 COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
42561 else
42562 COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
42563 fi
42564 else
42565 # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
42566 # are defined in the system?
42567 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42568 COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
42569 else
42570 COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
42571 fi
42572 fi
42573
42574 # Setup target OS define. Use OS target name but in upper case.
42575 OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
42576 COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
42577
42578 # Setup target CPU
42579 COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
42580
42581 # Setup debug/release defines
42582 if test "x$DEBUG_LEVEL" = xrelease; then
42583 COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
42584 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42585 COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
42586 fi
42587 else
42588 COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
42589 fi
42590
42591 # Set some additional per-OS defines.
42592 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42593 COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
42594 elif test "x$OPENJDK_TARGET_OS" = xaix; then
42595 # FIXME: PPC64 should not be here.
42596 COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
42597 elif test "x$OPENJDK_TARGET_OS" = xbsd; then
42598 COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
42599 fi
42600
42601 # Additional macosx handling
42602 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42603 # Setting these parameters makes it an error to link to macosx APIs that are
42604 # newer than the given OS version and makes the linked binaries compatible
42605 # even if built on a newer version of the OS.
42606 # The expected format is X.Y.Z
42607 MACOSX_VERSION_MIN=10.7.0
42608
42609
42610 # The macro takes the version with no dots, ex: 1070
42611 # Let the flags variables get resolved in make for easier override on make
42612 # command line.
42613 COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42614 LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42615 fi
42616
42617 # Setup some hard coded includes
42618 COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42619 -I${JDK_TOPDIR}/src/java.base/share/native/include \
42620 -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
42621 -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include"
42622
42623 # The shared libraries are compiled using the picflag.
42624 CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42625 CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
42626
42627 # Executable flags
42628 CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42629 CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42630
42631
42632
42633
42634
42635
42636 # Flags for compiling test libraries
42637 CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42638 CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
42639
42640 # Flags for compiling test executables
42641 CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42642 CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42643
42644
42645
42646
42647
42648
42649 # Setup LDFLAGS et al.
42650 #
42651
42652 # Now this is odd. The JDK native libraries have to link against libjvm.so
42653 # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
42654 # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
42655 # is identical for client and server? Yes. Which is picked at runtime (client or server)?
42656 # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
42657 # libraries will link to whatever is in memory. Yuck.
42658 #
42659 # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
42660 if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42661 LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
42662 if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42663 LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
42664 fi
42665 # TODO: make -debug optional "--disable-full-debug-symbols"
42666 LDFLAGS_JDK="$LDFLAGS_JDK -debug"
42667 elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42668 # If this is a --hash-style=gnu system, use --hash-style=both, why?
42669 # We have previously set HAS_GNU_HASH if this is the case
42670 if test -n "$HAS_GNU_HASH"; then
42671 LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
42672 fi
42673 if test "x$OPENJDK_TARGET_OS" = xlinux; then
42674 # And since we now know that the linker is gnu, then add -z defs, to forbid
42675 # undefined symbols in object files.
42676 LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
42677 case $DEBUG_LEVEL in
42678 release )
42679 # tell linker to optimize libraries.
42680 # Should this be supplied to the OSS linker as well?
42681 LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
42682 ;;
42683 slowdebug )
42684 if test "x$HAS_LINKER_NOW" = "xtrue"; then
42685 # do relocations at load
42686 LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
42687 LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
42688 fi
42689 if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42690 # mark relocations read only
42691 LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42692 LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42693 fi
42694 ;;
42695 fastdebug )
42696 if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42697 # mark relocations read only
42698 LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42699 LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42700 fi
42701 ;;
42702 * )
42703 as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42704 ;;
42705 esac
42706 fi
42707 elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42708 LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
42709 LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
42710 elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42711 LDFLAGS_JDK="${LDFLAGS_JDK} -brtl -bnolibpath -liconv -bexpall -bernotok"
42712 fi
42713
42714 # Customize LDFLAGS for executables
42715
42716 LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
42717
42718 if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42719 if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
42720 LDFLAGS_STACK_SIZE=1048576
42721 else
42722 LDFLAGS_STACK_SIZE=327680
42723 fi
42724 LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
42725 elif test "x$OPENJDK_TARGET_OS" = xlinux; then
42726 LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
42727 fi
42728
42729 # Customize LDFLAGS for libs
42730 LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
42731
42732 if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42733 LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
42734 LDFLAGS_JDKLIB_SUFFIX=""
42735 else
42736 LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS} \
42737 -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
42738
42739 # On some platforms (mac) the linker warns about non existing -L dirs.
42740 # Add server first if available. Linking aginst client does not always produce the same results.
42741 # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
42742 # Default to server for other variants.
42743 if test "x$JVM_VARIANT_SERVER" = xtrue; then
42744 LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42745 elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
42746 LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
42747 elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
42748 LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
42749 else
42750 LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42751 fi
42752
42753 LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
42754 if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42755 LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
42756 fi
42757 fi
42758
42759
42760
42761
42762
42763
42764
42765 LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
42766 LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
42767 LDFLAGS_TESTLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX"
42768 LDFLAGS_TESTEXE_SUFFIX="$LDFLAGS_JDKEXE_SUFFIX"
42769
42770
42771
42772
42773
42774
42775
42776 # Some Zero and Shark settings.
42777 # ZERO_ARCHFLAG tells the compiler which mode to build for
42778 case "${OPENJDK_TARGET_CPU}" in
42779 s390)
42780 ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
42781 ;;
42782 *)
42783 ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42784 esac
42785
42786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
42787 $as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
42788 supports=yes
42789
42790 saved_cflags="$CFLAGS"
42791 CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
42792 ac_ext=c
42793 ac_cpp='$CPP $CPPFLAGS'
42794 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42795 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42796 ac_compiler_gnu=$ac_cv_c_compiler_gnu
42797
42798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42799 /* end confdefs.h. */
42800 int i;
42801 _ACEOF
42802 if ac_fn_c_try_compile "$LINENO"; then :
42803
42804 else
42805 supports=no
42806 fi
42807 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42808 ac_ext=cpp
42809 ac_cpp='$CXXCPP $CPPFLAGS'
42810 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42811 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42812 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42813
42814 CFLAGS="$saved_cflags"
42815
42816 saved_cxxflags="$CXXFLAGS"
42817 CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
42818 ac_ext=cpp
42819 ac_cpp='$CXXCPP $CPPFLAGS'
42820 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42821 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42822 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42823
42824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42825 /* end confdefs.h. */
42826 int i;
42827 _ACEOF
42828 if ac_fn_cxx_try_compile "$LINENO"; then :
42829
42830 else
42831 supports=no
42832 fi
42833 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42834 ac_ext=cpp
42835 ac_cpp='$CXXCPP $CPPFLAGS'
42836 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42837 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42838 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42839
42840 CXXFLAGS="$saved_cxxflags"
42841
42842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42843 $as_echo "$supports" >&6; }
42844 if test "x$supports" = "xyes" ; then
42845 :
42846 else
42847 ZERO_ARCHFLAG=""
42848 fi
42849
42850
42851
42852 # Check that the compiler supports -mX (or -qX on AIX) flags
42853 # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
42854
42855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
42856 $as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
42857 supports=yes
42858
42859 saved_cflags="$CFLAGS"
42860 CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42861 ac_ext=c
42862 ac_cpp='$CPP $CPPFLAGS'
42863 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42864 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42865 ac_compiler_gnu=$ac_cv_c_compiler_gnu
42866
42867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42868 /* end confdefs.h. */
42869 int i;
42870 _ACEOF
42871 if ac_fn_c_try_compile "$LINENO"; then :
42872
42873 else
42874 supports=no
42875 fi
42876 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42877 ac_ext=cpp
42878 ac_cpp='$CXXCPP $CPPFLAGS'
42879 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42880 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42881 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42882
42883 CFLAGS="$saved_cflags"
42884
42885 saved_cxxflags="$CXXFLAGS"
42886 CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42887 ac_ext=cpp
42888 ac_cpp='$CXXCPP $CPPFLAGS'
42889 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42890 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42891 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42892
42893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42894 /* end confdefs.h. */
42895 int i;
42896 _ACEOF
42897 if ac_fn_cxx_try_compile "$LINENO"; then :
42898
42899 else
42900 supports=no
42901 fi
42902 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42903 ac_ext=cpp
42904 ac_cpp='$CXXCPP $CPPFLAGS'
42905 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42906 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42907 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42908
42909 CXXFLAGS="$saved_cxxflags"
42910
42911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42912 $as_echo "$supports" >&6; }
42913 if test "x$supports" = "xyes" ; then
42914 COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
42915 else
42916 COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
42917 fi
42918
42919
42920
42921 # Check whether --enable-warnings-as-errors was given.
42922 if test "${enable_warnings_as_errors+set}" = set; then :
42923 enableval=$enable_warnings_as_errors;
42924 fi
42925
42926
42927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
42928 $as_echo_n "checking if native warnings are errors... " >&6; }
42929 if test "x$enable_warnings_as_errors" = "xyes"; then
42930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
42931 $as_echo "yes (explicitely set)" >&6; }
42932 WARNINGS_AS_ERRORS=true
42933 elif test "x$enable_warnings_as_errors" = "xno"; then
42934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42935 $as_echo "no" >&6; }
42936 WARNINGS_AS_ERRORS=false
42937 elif test "x$enable_warnings_as_errors" = "x"; then
42938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
42939 $as_echo "yes (default)" >&6; }
42940 WARNINGS_AS_ERRORS=true
42941 else
42942 as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
42943 fi
42944
42945
42946 case "${TOOLCHAIN_TYPE}" in
42947 microsoft)
42948 DISABLE_WARNING_PREFIX="-wd"
42949 CFLAGS_WARNINGS_ARE_ERRORS="-WX"
42950 ;;
42951 solstudio)
42952 DISABLE_WARNING_PREFIX="-erroff="
42953 CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
42954 ;;
42955 gcc)
42956 # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
42957
42958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
42959 $as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
42960 supports=yes
42961
42962 saved_cflags="$CFLAGS"
42963 CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
42964 ac_ext=c
42965 ac_cpp='$CPP $CPPFLAGS'
42966 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42967 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42968 ac_compiler_gnu=$ac_cv_c_compiler_gnu
42969
42970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42971 /* end confdefs.h. */
42972 int i;
42973 _ACEOF
42974 if ac_fn_c_try_compile "$LINENO"; then :
42975
42976 else
42977 supports=no
42978 fi
42979 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42980 ac_ext=cpp
42981 ac_cpp='$CXXCPP $CPPFLAGS'
42982 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42983 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42984 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42985
42986 CFLAGS="$saved_cflags"
42987
42988 saved_cxxflags="$CXXFLAGS"
42989 CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
42990 ac_ext=cpp
42991 ac_cpp='$CXXCPP $CPPFLAGS'
42992 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42993 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42994 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42995
42996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42997 /* end confdefs.h. */
42998 int i;
42999 _ACEOF
43000 if ac_fn_cxx_try_compile "$LINENO"; then :
43001
43002 else
43003 supports=no
43004 fi
43005 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43006 ac_ext=cpp
43007 ac_cpp='$CXXCPP $CPPFLAGS'
43008 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43009 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43010 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43011
43012 CXXFLAGS="$saved_cxxflags"
43013
43014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
43015 $as_echo "$supports" >&6; }
43016 if test "x$supports" = "xyes" ; then
43017 GCC_CAN_DISABLE_WARNINGS=true
43018 else
43019 GCC_CAN_DISABLE_WARNINGS=false
43020
43021 fi
43022
43023 if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
43024 DISABLE_WARNING_PREFIX="-Wno-"
43025 else
43026 DISABLE_WARNING_PREFIX=
43027 fi
43028 CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
43029 ;;
43030 clang)
43031 DISABLE_WARNING_PREFIX="-Wno-"
43032 CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
43033 ;;
43034 esac
43035
43036
43037
43038
43039 # Setup debug symbols (need objcopy from the toolchain for that)
43040
43041 #
43042 # ENABLE_DEBUG_SYMBOLS
43043 # This must be done after the toolchain is setup, since we're looking at objcopy.
43044 #
43045 # Check whether --enable-debug-symbols was given.
43046 if test "${enable_debug_symbols+set}" = set; then :
43047 enableval=$enable_debug_symbols;
43048 fi
43049
43050
43051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
43052 $as_echo_n "checking if we should generate debug symbols... " >&6; }
43053
43054 if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
43055 # explicit enabling of enable-debug-symbols and can't find objcopy
43056 # this is an error
43057 as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
43058 fi
43059
43060 if test "x$enable_debug_symbols" = "xyes"; then
43061 ENABLE_DEBUG_SYMBOLS=true
43062 elif test "x$enable_debug_symbols" = "xno"; then
43063 ENABLE_DEBUG_SYMBOLS=false
43064 else
43065 # Default is on if objcopy is found
43066 if test "x$OBJCOPY" != x; then
43067 ENABLE_DEBUG_SYMBOLS=true
43068 # MacOS X and Windows don't use objcopy but default is on for those OSes
43069 elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
43070 ENABLE_DEBUG_SYMBOLS=true
43071 else
43072 ENABLE_DEBUG_SYMBOLS=false
43073 fi
43074 fi
43075
43076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
43077 $as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
43078
43079 #
43080 # ZIP_DEBUGINFO_FILES
43081 #
43082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
43083 $as_echo_n "checking if we should zip debug-info files... " >&6; }
43084 # Check whether --enable-zip-debug-info was given.
43085 if test "${enable_zip_debug_info+set}" = set; then :
43086 enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
43087 else
43088 enable_zip_debug_info="yes"
43089 fi
43090
43091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
43092 $as_echo "${enable_zip_debug_info}" >&6; }
43093
43094 if test "x${enable_zip_debug_info}" = "xno"; then
43095 ZIP_DEBUGINFO_FILES=false
43096 else
43097 ZIP_DEBUGINFO_FILES=true
43098 fi
43099
43100
43101
43102
43103
43104 # Check whether --enable-native-coverage was given.
43105 if test "${enable_native_coverage+set}" = set; then :
43106 enableval=$enable_native_coverage;
43107 fi
43108
43109 GCOV_ENABLED="false"
43110 if test "x$enable_native_coverage" = "xyes"; then
43111 if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
43112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
43113 $as_echo_n "checking if native coverage is enabled... " >&6; }
43114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43115 $as_echo "yes" >&6; }
43116 GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
43117 GCOV_LDFLAGS="-fprofile-arcs"
43118 LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
43119 LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
43120 LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
43121 CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
43122 CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
43123 CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
43124 CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
43125 LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
43126 LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
43127 GCOV_ENABLED="true"
43128 else
43129 as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
43130 fi
43131 elif test "x$enable_native_coverage" = "xno"; then
43132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
43133 $as_echo_n "checking if native coverage is enabled... " >&6; }
43134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43135 $as_echo "no" >&6; }
43136 elif test "x$enable_native_coverage" != "x"; then
43137 as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
43138 fi
43139
43140
43141
43142
43143 ###############################################################################
43144 #
43145 # Check dependencies for external and internal libraries.
43146 #
43147 ###############################################################################
43148
43149 # After we have toolchain, we can compile fixpath. It's needed by the lib checks.
43150
43151 # When using cygwin or msys, we need a wrapper binary that renames
43152 # /cygdrive/c/ arguments into c:/ arguments and peeks into
43153 # @files and rewrites these too! This wrapper binary is
43154 # called fixpath.
43155 FIXPATH=
43156 if test "x$OPENJDK_BUILD_OS" = xwindows; then
43157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
43158 $as_echo_n "checking if fixpath can be created... " >&6; }
43159 FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
43160 FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
43161 FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
43162 if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
43163 # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
43164 FIXPATH="$FIXPATH_BIN -c"
43165 elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
43166 # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
43167 # @ was chosen as separator to minimize risk of other tools messing around with it
43168 all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
43169 | tr ' ' '\n' | grep '^/./' | sort | uniq`
43170 fixpath_argument_list=`echo $all_unique_prefixes | tr ' ' '@'`
43171 FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
43172 fi
43173 FIXPATH_SRC_W="$FIXPATH_SRC"
43174 FIXPATH_BIN_W="$FIXPATH_BIN"
43175
43176 unix_path="$FIXPATH_SRC_W"
43177 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43178 windows_path=`$CYGPATH -m "$unix_path"`
43179 FIXPATH_SRC_W="$windows_path"
43180 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43181 windows_path=`cmd //c echo $unix_path`
43182 FIXPATH_SRC_W="$windows_path"
43183 fi
43184
43185
43186 unix_path="$FIXPATH_BIN_W"
43187 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43188 windows_path=`$CYGPATH -m "$unix_path"`
43189 FIXPATH_BIN_W="$windows_path"
43190 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43191 windows_path=`cmd //c echo $unix_path`
43192 FIXPATH_BIN_W="$windows_path"
43193 fi
43194
43195 $RM -rf $FIXPATH_BIN $FIXPATH_DIR
43196 $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
43197 cd $FIXPATH_DIR
43198 $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
43199 cd $CURDIR
43200
43201 if test ! -x $FIXPATH_BIN; then
43202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43203 $as_echo "no" >&6; }
43204 cat $FIXPATH_DIR/fixpath1.log
43205 as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
43206 fi
43207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43208 $as_echo "yes" >&6; }
43209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
43210 $as_echo_n "checking if fixpath.exe works... " >&6; }
43211 cd $FIXPATH_DIR
43212 $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
43213 > $FIXPATH_DIR/fixpath2.log 2>&1
43214 cd $CURDIR
43215 if test ! -x $FIXPATH_DIR/fixpath2.exe; then
43216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43217 $as_echo "no" >&6; }
43218 cat $FIXPATH_DIR/fixpath2.log
43219 as_fn_error $? "fixpath did not work!" "$LINENO" 5
43220 fi
43221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43222 $as_echo "yes" >&6; }
43223 fi
43224
43225
43226
43227
43228
43229
43230 ###############################################################################
43231 #
43232 # OS specific settings that we never will need to probe.
43233 #
43234 if test "x$OPENJDK_TARGET_OS" = xlinux; then
43235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
43236 $as_echo_n "checking what is not needed on Linux?... " >&6; }
43237 PULSE_NOT_NEEDED=yes
43238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
43239 $as_echo "pulse" >&6; }
43240 fi
43241
43242 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
43244 $as_echo_n "checking what is not needed on Solaris?... " >&6; }
43245 ALSA_NOT_NEEDED=yes
43246 PULSE_NOT_NEEDED=yes
43247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43248 $as_echo "alsa pulse" >&6; }
43249 fi
43250
43251 if test "x$OPENJDK_TARGET_OS" = xaix; then
43252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
43253 $as_echo_n "checking what is not needed on AIX?... " >&6; }
43254 ALSA_NOT_NEEDED=yes
43255 PULSE_NOT_NEEDED=yes
43256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43257 $as_echo "alsa pulse" >&6; }
43258 fi
43259
43260
43261 if test "x$OPENJDK_TARGET_OS" = xwindows; then
43262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
43263 $as_echo_n "checking what is not needed on Windows?... " >&6; }
43264 CUPS_NOT_NEEDED=yes
43265 ALSA_NOT_NEEDED=yes
43266 PULSE_NOT_NEEDED=yes
43267 X11_NOT_NEEDED=yes
43268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
43269 $as_echo "alsa cups pulse x11" >&6; }
43270 fi
43271
43272 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
43274 $as_echo_n "checking what is not needed on MacOSX?... " >&6; }
43275 ALSA_NOT_NEEDED=yes
43276 PULSE_NOT_NEEDED=yes
43277 X11_NOT_NEEDED=yes
43278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
43279 $as_echo "alsa pulse x11" >&6; }
43280 fi
43281
43282 if test "x$OPENJDK_TARGET_OS" = xbsd; then
43283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
43284 $as_echo_n "checking what is not needed on bsd?... " >&6; }
43285 ALSA_NOT_NEEDED=yes
43286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
43287 $as_echo "alsa" >&6; }
43288 fi
43289
43290 if test "x$OPENJDK" = "xfalse"; then
43291 FREETYPE_NOT_NEEDED=yes
43292 fi
43293
43294 if test "x$SUPPORT_HEADFUL" = xno; then
43295 X11_NOT_NEEDED=yes
43296 fi
43297
43298
43299
43300 ###############################################################################
43301 #
43302 # Check for X Windows
43303 #
43304
43305 if test "x$X11_NOT_NEEDED" = xyes; then
43306 if test "x${with_x}" != x; then
43307 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
43308 $as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
43309 fi
43310 X_CFLAGS=
43311 X_LIBS=
43312 else
43313 # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
43314 # Make a simple check for the libraries at the sysroot, and setup --x-includes and
43315 # --x-libraries for the sysroot, if that seems to be correct.
43316 if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
43317 if test "x$SYSROOT" != "x"; then
43318 if test "x$x_includes" = xNONE; then
43319 if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
43320 x_includes="$SYSROOT/usr/X11R6/include"
43321 elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
43322 x_includes="$SYSROOT/usr/include"
43323 fi
43324 fi
43325 if test "x$x_libraries" = xNONE; then
43326 if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
43327 x_libraries="$SYSROOT/usr/X11R6/lib"
43328 elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
43329 x_libraries="$SYSROOT/usr/lib64"
43330 elif test -f "$SYSROOT/usr/lib/libX11.so"; then
43331 x_libraries="$SYSROOT/usr/lib"
43332 fi
43333 fi
43334 fi
43335 fi
43336
43337 # Now let autoconf do it's magic
43338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
43339 $as_echo_n "checking for X... " >&6; }
43340
43341
43342 # Check whether --with-x was given.
43343 if test "${with_x+set}" = set; then :
43344 withval=$with_x;
43345 fi
43346
43347 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
43348 if test "x$with_x" = xno; then
43349 # The user explicitly disabled X.
43350 have_x=disabled
43351 else
43352 case $x_includes,$x_libraries in #(
43353 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
43354 *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
43355 $as_echo_n "(cached) " >&6
43356 else
43357 # One or both of the vars are not set, and there is no cached value.
43358 ac_x_includes=no ac_x_libraries=no
43359 rm -f -r conftest.dir
43360 if mkdir conftest.dir; then
43361 cd conftest.dir
43362 cat >Imakefile <<'_ACEOF'
43363 incroot:
43364 @echo incroot='${INCROOT}'
43365 usrlibdir:
43366 @echo usrlibdir='${USRLIBDIR}'
43367 libdir:
43368 @echo libdir='${LIBDIR}'
43369 _ACEOF
43370 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
43371 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
43372 for ac_var in incroot usrlibdir libdir; do
43373 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
43374 done
43375 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
43376 for ac_extension in a so sl dylib la dll; do
43377 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
43378 test -f "$ac_im_libdir/libX11.$ac_extension"; then
43379 ac_im_usrlibdir=$ac_im_libdir; break
43380 fi
43381 done
43382 # Screen out bogus values from the imake configuration. They are
43383 # bogus both because they are the default anyway, and because
43384 # using them would break gcc on systems where it needs fixed includes.
43385 case $ac_im_incroot in
43386 /usr/include) ac_x_includes= ;;
43387 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
43388 esac
43389 case $ac_im_usrlibdir in
43390 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
43391 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
43392 esac
43393 fi
43394 cd ..
43395 rm -f -r conftest.dir
43396 fi
43397
43398 # Standard set of common directories for X headers.
43399 # Check X11 before X11Rn because it is often a symlink to the current release.
43400 ac_x_header_dirs='
43401 /usr/X11/include
43402 /usr/X11R7/include
43403 /usr/X11R6/include
43404 /usr/X11R5/include
43405 /usr/X11R4/include
43406
43407 /usr/include/X11
43408 /usr/include/X11R7
43409 /usr/include/X11R6
43410 /usr/include/X11R5
43411 /usr/include/X11R4
43412
43413 /usr/local/X11/include
43414 /usr/local/X11R7/include
43415 /usr/local/X11R6/include
43416 /usr/local/X11R5/include
43417 /usr/local/X11R4/include
43418
43419 /usr/local/include/X11
43420 /usr/local/include/X11R7
43421 /usr/local/include/X11R6
43422 /usr/local/include/X11R5
43423 /usr/local/include/X11R4
43424
43425 /usr/X386/include
43426 /usr/x386/include
43427 /usr/XFree86/include/X11
43428
43429 /usr/include
43430 /usr/local/include
43431 /usr/unsupported/include
43432 /usr/athena/include
43433 /usr/local/x11r5/include
43434 /usr/lpp/Xamples/include
43435
43436 /usr/openwin/include
43437 /usr/openwin/share/include'
43438
43439 if test "$ac_x_includes" = no; then
43440 # Guess where to find include files, by looking for Xlib.h.
43441 # First, try using that file with no special directory specified.
43442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43443 /* end confdefs.h. */
43444 #include <X11/Xlib.h>
43445 _ACEOF
43446 if ac_fn_cxx_try_cpp "$LINENO"; then :
43447 # We can compile using X headers with no special include directory.
43448 ac_x_includes=
43449 else
43450 for ac_dir in $ac_x_header_dirs; do
43451 if test -r "$ac_dir/X11/Xlib.h"; then
43452 ac_x_includes=$ac_dir
43453 break
43454 fi
43455 done
43456 fi
43457 rm -f conftest.err conftest.i conftest.$ac_ext
43458 fi # $ac_x_includes = no
43459
43460 if test "$ac_x_libraries" = no; then
43461 # Check for the libraries.
43462 # See if we find them without any special options.
43463 # Don't add to $LIBS permanently.
43464 ac_save_LIBS=$LIBS
43465 LIBS="-lX11 $LIBS"
43466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43467 /* end confdefs.h. */
43468 #include <X11/Xlib.h>
43469 int
43470 main ()
43471 {
43472 XrmInitialize ()
43473 ;
43474 return 0;
43475 }
43476 _ACEOF
43477 if ac_fn_cxx_try_link "$LINENO"; then :
43478 LIBS=$ac_save_LIBS
43479 # We can link X programs with no special library path.
43480 ac_x_libraries=
43481 else
43482 LIBS=$ac_save_LIBS
43483 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
43484 do
43485 # Don't even attempt the hair of trying to link an X program!
43486 for ac_extension in a so sl dylib la dll; do
43487 if test -r "$ac_dir/libX11.$ac_extension"; then
43488 ac_x_libraries=$ac_dir
43489 break 2
43490 fi
43491 done
43492 done
43493 fi
43494 rm -f core conftest.err conftest.$ac_objext \
43495 conftest$ac_exeext conftest.$ac_ext
43496 fi # $ac_x_libraries = no
43497
43498 case $ac_x_includes,$ac_x_libraries in #(
43499 no,* | *,no | *\'*)
43500 # Didn't find X, or a directory has "'" in its name.
43501 ac_cv_have_x="have_x=no";; #(
43502 *)
43503 # Record where we found X for the cache.
43504 ac_cv_have_x="have_x=yes\
43505 ac_x_includes='$ac_x_includes'\
43506 ac_x_libraries='$ac_x_libraries'"
43507 esac
43508 fi
43509 ;; #(
43510 *) have_x=yes;;
43511 esac
43512 eval "$ac_cv_have_x"
43513 fi # $with_x != no
43514
43515 if test "$have_x" != yes; then
43516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
43517 $as_echo "$have_x" >&6; }
43518 no_x=yes
43519 else
43520 # If each of the values was on the command line, it overrides each guess.
43521 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
43522 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
43523 # Update the cache value to reflect the command line values.
43524 ac_cv_have_x="have_x=yes\
43525 ac_x_includes='$x_includes'\
43526 ac_x_libraries='$x_libraries'"
43527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
43528 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
43529 fi
43530
43531 if test "$no_x" = yes; then
43532 # Not all programs may use this symbol, but it does not hurt to define it.
43533
43534 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
43535
43536 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
43537 else
43538 if test -n "$x_includes"; then
43539 X_CFLAGS="$X_CFLAGS -I$x_includes"
43540 fi
43541
43542 # It would also be nice to do this for all -L options, not just this one.
43543 if test -n "$x_libraries"; then
43544 X_LIBS="$X_LIBS -L$x_libraries"
43545 # For Solaris; some versions of Sun CC require a space after -R and
43546 # others require no space. Words are not sufficient . . . .
43547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
43548 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
43549 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
43550 ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
43551 ac_cxx_werror_flag=yes
43552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43553 /* end confdefs.h. */
43554
43555 int
43556 main ()
43557 {
43558
43559 ;
43560 return 0;
43561 }
43562 _ACEOF
43563 if ac_fn_cxx_try_link "$LINENO"; then :
43564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43565 $as_echo "no" >&6; }
43566 X_LIBS="$X_LIBS -R$x_libraries"
43567 else
43568 LIBS="$ac_xsave_LIBS -R $x_libraries"
43569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43570 /* end confdefs.h. */
43571
43572 int
43573 main ()
43574 {
43575
43576 ;
43577 return 0;
43578 }
43579 _ACEOF
43580 if ac_fn_cxx_try_link "$LINENO"; then :
43581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43582 $as_echo "yes" >&6; }
43583 X_LIBS="$X_LIBS -R $x_libraries"
43584 else
43585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
43586 $as_echo "neither works" >&6; }
43587 fi
43588 rm -f core conftest.err conftest.$ac_objext \
43589 conftest$ac_exeext conftest.$ac_ext
43590 fi
43591 rm -f core conftest.err conftest.$ac_objext \
43592 conftest$ac_exeext conftest.$ac_ext
43593 ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
43594 LIBS=$ac_xsave_LIBS
43595 fi
43596
43597 # Check for system-dependent libraries X programs must link with.
43598 # Do this before checking for the system-independent R6 libraries
43599 # (-lICE), since we may need -lsocket or whatever for X linking.
43600
43601 if test "$ISC" = yes; then
43602 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
43603 else
43604 # Martyn Johnson says this is needed for Ultrix, if the X
43605 # libraries were built with DECnet support. And Karl Berry says
43606 # the Alpha needs dnet_stub (dnet does not exist).
43607 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
43608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43609 /* end confdefs.h. */
43610
43611 /* Override any GCC internal prototype to avoid an error.
43612 Use char because int might match the return type of a GCC
43613 builtin and then its argument prototype would still apply. */
43614 #ifdef __cplusplus
43615 extern "C"
43616 #endif
43617 char XOpenDisplay ();
43618 int
43619 main ()
43620 {
43621 return XOpenDisplay ();
43622 ;
43623 return 0;
43624 }
43625 _ACEOF
43626 if ac_fn_cxx_try_link "$LINENO"; then :
43627
43628 else
43629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
43630 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
43631 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
43632 $as_echo_n "(cached) " >&6
43633 else
43634 ac_check_lib_save_LIBS=$LIBS
43635 LIBS="-ldnet $LIBS"
43636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43637 /* end confdefs.h. */
43638
43639 /* Override any GCC internal prototype to avoid an error.
43640 Use char because int might match the return type of a GCC
43641 builtin and then its argument prototype would still apply. */
43642 #ifdef __cplusplus
43643 extern "C"
43644 #endif
43645 char dnet_ntoa ();
43646 int
43647 main ()
43648 {
43649 return dnet_ntoa ();
43650 ;
43651 return 0;
43652 }
43653 _ACEOF
43654 if ac_fn_cxx_try_link "$LINENO"; then :
43655 ac_cv_lib_dnet_dnet_ntoa=yes
43656 else
43657 ac_cv_lib_dnet_dnet_ntoa=no
43658 fi
43659 rm -f core conftest.err conftest.$ac_objext \
43660 conftest$ac_exeext conftest.$ac_ext
43661 LIBS=$ac_check_lib_save_LIBS
43662 fi
43663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
43664 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
43665 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
43666 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
43667 fi
43668
43669 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
43670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
43671 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
43672 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
43673 $as_echo_n "(cached) " >&6
43674 else
43675 ac_check_lib_save_LIBS=$LIBS
43676 LIBS="-ldnet_stub $LIBS"
43677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43678 /* end confdefs.h. */
43679
43680 /* Override any GCC internal prototype to avoid an error.
43681 Use char because int might match the return type of a GCC
43682 builtin and then its argument prototype would still apply. */
43683 #ifdef __cplusplus
43684 extern "C"
43685 #endif
43686 char dnet_ntoa ();
43687 int
43688 main ()
43689 {
43690 return dnet_ntoa ();
43691 ;
43692 return 0;
43693 }
43694 _ACEOF
43695 if ac_fn_cxx_try_link "$LINENO"; then :
43696 ac_cv_lib_dnet_stub_dnet_ntoa=yes
43697 else
43698 ac_cv_lib_dnet_stub_dnet_ntoa=no
43699 fi
43700 rm -f core conftest.err conftest.$ac_objext \
43701 conftest$ac_exeext conftest.$ac_ext
43702 LIBS=$ac_check_lib_save_LIBS
43703 fi
43704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
43705 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
43706 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
43707 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
43708 fi
43709
43710 fi
43711 fi
43712 rm -f core conftest.err conftest.$ac_objext \
43713 conftest$ac_exeext conftest.$ac_ext
43714 LIBS="$ac_xsave_LIBS"
43715
43716 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
43717 # to get the SysV transport functions.
43718 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
43719 # needs -lnsl.
43720 # The nsl library prevents programs from opening the X display
43721 # on Irix 5.2, according to T.E. Dickey.
43722 # The functions gethostbyname, getservbyname, and inet_addr are
43723 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
43724 ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
43725 if test "x$ac_cv_func_gethostbyname" = xyes; then :
43726
43727 fi
43728
43729 if test $ac_cv_func_gethostbyname = no; then
43730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
43731 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
43732 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
43733 $as_echo_n "(cached) " >&6
43734 else
43735 ac_check_lib_save_LIBS=$LIBS
43736 LIBS="-lnsl $LIBS"
43737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43738 /* end confdefs.h. */
43739
43740 /* Override any GCC internal prototype to avoid an error.
43741 Use char because int might match the return type of a GCC
43742 builtin and then its argument prototype would still apply. */
43743 #ifdef __cplusplus
43744 extern "C"
43745 #endif
43746 char gethostbyname ();
43747 int
43748 main ()
43749 {
43750 return gethostbyname ();
43751 ;
43752 return 0;
43753 }
43754 _ACEOF
43755 if ac_fn_cxx_try_link "$LINENO"; then :
43756 ac_cv_lib_nsl_gethostbyname=yes
43757 else
43758 ac_cv_lib_nsl_gethostbyname=no
43759 fi
43760 rm -f core conftest.err conftest.$ac_objext \
43761 conftest$ac_exeext conftest.$ac_ext
43762 LIBS=$ac_check_lib_save_LIBS
43763 fi
43764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
43765 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
43766 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
43767 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
43768 fi
43769
43770 if test $ac_cv_lib_nsl_gethostbyname = no; then
43771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
43772 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
43773 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
43774 $as_echo_n "(cached) " >&6
43775 else
43776 ac_check_lib_save_LIBS=$LIBS
43777 LIBS="-lbsd $LIBS"
43778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43779 /* end confdefs.h. */
43780
43781 /* Override any GCC internal prototype to avoid an error.
43782 Use char because int might match the return type of a GCC
43783 builtin and then its argument prototype would still apply. */
43784 #ifdef __cplusplus
43785 extern "C"
43786 #endif
43787 char gethostbyname ();
43788 int
43789 main ()
43790 {
43791 return gethostbyname ();
43792 ;
43793 return 0;
43794 }
43795 _ACEOF
43796 if ac_fn_cxx_try_link "$LINENO"; then :
43797 ac_cv_lib_bsd_gethostbyname=yes
43798 else
43799 ac_cv_lib_bsd_gethostbyname=no
43800 fi
43801 rm -f core conftest.err conftest.$ac_objext \
43802 conftest$ac_exeext conftest.$ac_ext
43803 LIBS=$ac_check_lib_save_LIBS
43804 fi
43805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
43806 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
43807 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
43808 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
43809 fi
43810
43811 fi
43812 fi
43813
43814 # lieder@skyler.mavd.honeywell.com says without -lsocket,
43815 # socket/setsockopt and other routines are undefined under SCO ODT
43816 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
43817 # on later versions), says Simon Leinen: it contains gethostby*
43818 # variants that don't use the name server (or something). -lsocket
43819 # must be given before -lnsl if both are needed. We assume that
43820 # if connect needs -lnsl, so does gethostbyname.
43821 ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
43822 if test "x$ac_cv_func_connect" = xyes; then :
43823
43824 fi
43825
43826 if test $ac_cv_func_connect = no; then
43827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
43828 $as_echo_n "checking for connect in -lsocket... " >&6; }
43829 if ${ac_cv_lib_socket_connect+:} false; then :
43830 $as_echo_n "(cached) " >&6
43831 else
43832 ac_check_lib_save_LIBS=$LIBS
43833 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
43834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43835 /* end confdefs.h. */
43836
43837 /* Override any GCC internal prototype to avoid an error.
43838 Use char because int might match the return type of a GCC
43839 builtin and then its argument prototype would still apply. */
43840 #ifdef __cplusplus
43841 extern "C"
43842 #endif
43843 char connect ();
43844 int
43845 main ()
43846 {
43847 return connect ();
43848 ;
43849 return 0;
43850 }
43851 _ACEOF
43852 if ac_fn_cxx_try_link "$LINENO"; then :
43853 ac_cv_lib_socket_connect=yes
43854 else
43855 ac_cv_lib_socket_connect=no
43856 fi
43857 rm -f core conftest.err conftest.$ac_objext \
43858 conftest$ac_exeext conftest.$ac_ext
43859 LIBS=$ac_check_lib_save_LIBS
43860 fi
43861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
43862 $as_echo "$ac_cv_lib_socket_connect" >&6; }
43863 if test "x$ac_cv_lib_socket_connect" = xyes; then :
43864 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
43865 fi
43866
43867 fi
43868
43869 # Guillermo Gomez says -lposix is necessary on A/UX.
43870 ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
43871 if test "x$ac_cv_func_remove" = xyes; then :
43872
43873 fi
43874
43875 if test $ac_cv_func_remove = no; then
43876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
43877 $as_echo_n "checking for remove in -lposix... " >&6; }
43878 if ${ac_cv_lib_posix_remove+:} false; then :
43879 $as_echo_n "(cached) " >&6
43880 else
43881 ac_check_lib_save_LIBS=$LIBS
43882 LIBS="-lposix $LIBS"
43883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43884 /* end confdefs.h. */
43885
43886 /* Override any GCC internal prototype to avoid an error.
43887 Use char because int might match the return type of a GCC
43888 builtin and then its argument prototype would still apply. */
43889 #ifdef __cplusplus
43890 extern "C"
43891 #endif
43892 char remove ();
43893 int
43894 main ()
43895 {
43896 return remove ();
43897 ;
43898 return 0;
43899 }
43900 _ACEOF
43901 if ac_fn_cxx_try_link "$LINENO"; then :
43902 ac_cv_lib_posix_remove=yes
43903 else
43904 ac_cv_lib_posix_remove=no
43905 fi
43906 rm -f core conftest.err conftest.$ac_objext \
43907 conftest$ac_exeext conftest.$ac_ext
43908 LIBS=$ac_check_lib_save_LIBS
43909 fi
43910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
43911 $as_echo "$ac_cv_lib_posix_remove" >&6; }
43912 if test "x$ac_cv_lib_posix_remove" = xyes; then :
43913 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
43914 fi
43915
43916 fi
43917
43918 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
43919 ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
43920 if test "x$ac_cv_func_shmat" = xyes; then :
43921
43922 fi
43923
43924 if test $ac_cv_func_shmat = no; then
43925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
43926 $as_echo_n "checking for shmat in -lipc... " >&6; }
43927 if ${ac_cv_lib_ipc_shmat+:} false; then :
43928 $as_echo_n "(cached) " >&6
43929 else
43930 ac_check_lib_save_LIBS=$LIBS
43931 LIBS="-lipc $LIBS"
43932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43933 /* end confdefs.h. */
43934
43935 /* Override any GCC internal prototype to avoid an error.
43936 Use char because int might match the return type of a GCC
43937 builtin and then its argument prototype would still apply. */
43938 #ifdef __cplusplus
43939 extern "C"
43940 #endif
43941 char shmat ();
43942 int
43943 main ()
43944 {
43945 return shmat ();
43946 ;
43947 return 0;
43948 }
43949 _ACEOF
43950 if ac_fn_cxx_try_link "$LINENO"; then :
43951 ac_cv_lib_ipc_shmat=yes
43952 else
43953 ac_cv_lib_ipc_shmat=no
43954 fi
43955 rm -f core conftest.err conftest.$ac_objext \
43956 conftest$ac_exeext conftest.$ac_ext
43957 LIBS=$ac_check_lib_save_LIBS
43958 fi
43959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
43960 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
43961 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
43962 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
43963 fi
43964
43965 fi
43966 fi
43967
43968 # Check for libraries that X11R6 Xt/Xaw programs need.
43969 ac_save_LDFLAGS=$LDFLAGS
43970 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
43971 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
43972 # check for ICE first), but we must link in the order -lSM -lICE or
43973 # we get undefined symbols. So assume we have SM if we have ICE.
43974 # These have to be linked with before -lX11, unlike the other
43975 # libraries we check for below, so use a different variable.
43976 # John Interrante, Karl Berry
43977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
43978 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
43979 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
43980 $as_echo_n "(cached) " >&6
43981 else
43982 ac_check_lib_save_LIBS=$LIBS
43983 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
43984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43985 /* end confdefs.h. */
43986
43987 /* Override any GCC internal prototype to avoid an error.
43988 Use char because int might match the return type of a GCC
43989 builtin and then its argument prototype would still apply. */
43990 #ifdef __cplusplus
43991 extern "C"
43992 #endif
43993 char IceConnectionNumber ();
43994 int
43995 main ()
43996 {
43997 return IceConnectionNumber ();
43998 ;
43999 return 0;
44000 }
44001 _ACEOF
44002 if ac_fn_cxx_try_link "$LINENO"; then :
44003 ac_cv_lib_ICE_IceConnectionNumber=yes
44004 else
44005 ac_cv_lib_ICE_IceConnectionNumber=no
44006 fi
44007 rm -f core conftest.err conftest.$ac_objext \
44008 conftest$ac_exeext conftest.$ac_ext
44009 LIBS=$ac_check_lib_save_LIBS
44010 fi
44011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
44012 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
44013 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
44014 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
44015 fi
44016
44017 LDFLAGS=$ac_save_LDFLAGS
44018
44019 fi
44020
44021
44022 # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
44023 # this doesn't make sense so we remove it.
44024 if test "x$COMPILE_TYPE" = xcross; then
44025 X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
44026 fi
44027
44028 if test "x$no_x" = xyes; then
44029
44030 # Print a helpful message on how to acquire the necessary build dependency.
44031 # x11 is the help tag: freetype, cups, pulse, alsa etc
44032 MISSING_DEPENDENCY=x11
44033
44034 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44035 cygwin_help $MISSING_DEPENDENCY
44036 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44037 msys_help $MISSING_DEPENDENCY
44038 else
44039 PKGHANDLER_COMMAND=
44040
44041 case $PKGHANDLER in
44042 apt-get)
44043 apt_help $MISSING_DEPENDENCY ;;
44044 yum)
44045 yum_help $MISSING_DEPENDENCY ;;
44046 port)
44047 port_help $MISSING_DEPENDENCY ;;
44048 pkgutil)
44049 pkgutil_help $MISSING_DEPENDENCY ;;
44050 pkgadd)
44051 pkgadd_help $MISSING_DEPENDENCY ;;
44052 esac
44053
44054 if test "x$PKGHANDLER_COMMAND" != x; then
44055 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44056 fi
44057 fi
44058
44059 as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
44060 fi
44061
44062 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44063 OPENWIN_HOME="/usr/openwin"
44064 X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
44065 X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
44066 -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
44067 -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
44068 -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
44069 fi
44070
44071 ac_ext=c
44072 ac_cpp='$CPP $CPPFLAGS'
44073 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44074 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44075 ac_compiler_gnu=$ac_cv_c_compiler_gnu
44076
44077 OLD_CFLAGS="$CFLAGS"
44078 CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
44079
44080 # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
44081 for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
44082 do :
44083 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44084 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
44085 # include <X11/Xlib.h>
44086 # include <X11/Xutil.h>
44087
44088
44089 "
44090 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44091 cat >>confdefs.h <<_ACEOF
44092 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44093 _ACEOF
44094 X11_HEADERS_OK=yes
44095 else
44096 X11_HEADERS_OK=no; break
44097 fi
44098
44099 done
44100
44101
44102 if test "x$X11_HEADERS_OK" = xno; then
44103
44104 # Print a helpful message on how to acquire the necessary build dependency.
44105 # x11 is the help tag: freetype, cups, pulse, alsa etc
44106 MISSING_DEPENDENCY=x11
44107
44108 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44109 cygwin_help $MISSING_DEPENDENCY
44110 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44111 msys_help $MISSING_DEPENDENCY
44112 else
44113 PKGHANDLER_COMMAND=
44114
44115 case $PKGHANDLER in
44116 apt-get)
44117 apt_help $MISSING_DEPENDENCY ;;
44118 yum)
44119 yum_help $MISSING_DEPENDENCY ;;
44120 port)
44121 port_help $MISSING_DEPENDENCY ;;
44122 pkgutil)
44123 pkgutil_help $MISSING_DEPENDENCY ;;
44124 pkgadd)
44125 pkgadd_help $MISSING_DEPENDENCY ;;
44126 esac
44127
44128 if test "x$PKGHANDLER_COMMAND" != x; then
44129 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44130 fi
44131 fi
44132
44133 as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
44134 fi
44135
44136 # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
44137 # defined in libawt_xawt.
44138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
44139 $as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
44140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44141 /* end confdefs.h. */
44142 #include <X11/extensions/Xrender.h>
44143 int
44144 main ()
44145 {
44146 XLinearGradient x;
44147 ;
44148 return 0;
44149 }
44150 _ACEOF
44151 if ac_fn_c_try_compile "$LINENO"; then :
44152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44153 $as_echo "yes" >&6; }
44154 else
44155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44156 $as_echo "no" >&6; }
44157 X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
44158 fi
44159 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44160
44161 CFLAGS="$OLD_CFLAGS"
44162 ac_ext=cpp
44163 ac_cpp='$CXXCPP $CPPFLAGS'
44164 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44165 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44166 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44167
44168 fi # X11_NOT_NEEDED
44169
44170
44171
44172
44173
44174
44175 ###############################################################################
44176 #
44177 # The common unix printing system cups is used to print from java.
44178 #
44179
44180 # Check whether --with-cups was given.
44181 if test "${with_cups+set}" = set; then :
44182 withval=$with_cups;
44183 fi
44184
44185
44186 # Check whether --with-cups-include was given.
44187 if test "${with_cups_include+set}" = set; then :
44188 withval=$with_cups_include;
44189 fi
44190
44191
44192 if test "x$CUPS_NOT_NEEDED" = xyes; then
44193 if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
44194 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
44195 $as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
44196 fi
44197 CUPS_CFLAGS=
44198 else
44199 CUPS_FOUND=no
44200
44201 if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
44202 as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
44203 fi
44204
44205 if test "x${with_cups}" != x; then
44206 CUPS_CFLAGS="-I${with_cups}/include"
44207 CUPS_FOUND=yes
44208 fi
44209 if test "x${with_cups_include}" != x; then
44210 CUPS_CFLAGS="-I${with_cups_include}"
44211 CUPS_FOUND=yes
44212 fi
44213 if test "x$CUPS_FOUND" = xno; then
44214
44215
44216 if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44217 # Source the builddeps file again, to make sure it uses the latest variables!
44218 . $builddepsfile
44219 # Look for a target and build machine specific resource!
44220 eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
44221 if test "x$resource" = x; then
44222 # Ok, lets instead look for a target specific resource
44223 eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
44224 fi
44225 if test "x$resource" = x; then
44226 # Ok, lets instead look for a build specific resource
44227 eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
44228 fi
44229 if test "x$resource" = x; then
44230 # Ok, lets instead look for a generic resource
44231 # (The cups comes from M4 and not the shell, thus no need for eval here.)
44232 resource=${builddep_cups}
44233 fi
44234 if test "x$resource" != x; then
44235 { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
44236 $as_echo "$as_me: Using builddeps $resource for cups" >&6;}
44237 # If the resource in the builddeps.conf file is an existing directory,
44238 # for example /java/linux/cups
44239 if test -d ${resource}; then
44240 depdir=${resource}
44241 else
44242
44243 # cups is for example mymodule
44244 # $resource is for example libs/general/libmymod_1_2_3.zip
44245 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
44246 # $with_builddeps_dir is for example /localhome/builddeps
44247 # depdir is the name of the variable into which we store the depdir, eg MYMOD
44248 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
44249 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
44250 filename=`basename $resource`
44251 filebase=`echo $filename | sed 's/\.[^\.]*$//'`
44252 filebase=${filename%%.*}
44253 extension=${filename#*.}
44254 installdir=$with_builddeps_dir/$filebase
44255 if test ! -f $installdir/$filename.unpacked; then
44256 { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
44257 $as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
44258 if test ! -d $installdir; then
44259 mkdir -p $installdir
44260 fi
44261 if test ! -d $installdir; then
44262 as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
44263 fi
44264 tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
44265 touch $tmpfile
44266 if test ! -f $tmpfile; then
44267 as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
44268 fi
44269
44270 # $with_builddeps_server/$resource is the ftp://abuilddeps.server.com/libs/cups.zip
44271 # $tmpfile is the local file name for the downloaded file.
44272 VALID_TOOL=no
44273 if test "x$BDEPS_FTP" = xwget; then
44274 VALID_TOOL=yes
44275 wget -O $tmpfile $with_builddeps_server/$resource
44276 fi
44277 if test "x$BDEPS_FTP" = xlftp; then
44278 VALID_TOOL=yes
44279 lftp -c "get $with_builddeps_server/$resource -o $tmpfile"
44280 fi
44281 if test "x$BDEPS_FTP" = xftp; then
44282 VALID_TOOL=yes
44283 FTPSERVER=`echo $with_builddeps_server/$resource | cut -f 3 -d '/'`
44284 FTPPATH=`echo $with_builddeps_server/$resource | cut -f 4- -d '/'`
44285 FTPUSERPWD=${FTPSERVER%%@*}
44286 if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
44287 FTPUSER=${userpwd%%:*}
44288 FTPPWD=${userpwd#*@}
44289 FTPSERVER=${FTPSERVER#*@}
44290 else
44291 FTPUSER=ftp
44292 FTPPWD=ftp
44293 fi
44294 # the "pass" command does not work on some
44295 # ftp clients (read ftp.exe) but if it works,
44296 # passive mode is better!
44297 ( \
44298 echo "user $FTPUSER $FTPPWD" ; \
44299 echo "pass" ; \
44300 echo "bin" ; \
44301 echo "get $FTPPATH $tmpfile" ; \
44302 ) | ftp -in $FTPSERVER
44303 fi
44304 if test "x$VALID_TOOL" != xyes; then
44305 as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44306 fi
44307
44308 mv $tmpfile $installdir/$filename
44309 if test ! -s $installdir/$filename; then
44310 as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44311 fi
44312 case "$extension" in
44313 zip) echo "Unzipping $installdir/$filename..."
44314 (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44315 ;;
44316 tar.gz) echo "Untaring $installdir/$filename..."
44317 (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44318 ;;
44319 tgz) echo "Untaring $installdir/$filename..."
44320 (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44321 ;;
44322 *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44323 ;;
44324 esac
44325 fi
44326 if test -f $installdir/$filename.unpacked; then
44327 depdir=$installdir
44328 fi
44329
44330 fi
44331 # Source the builddeps file again, because in the previous command, the depdir
44332 # was updated to point at the current build dependency install directory.
44333 . $builddepsfile
44334 # Now extract variables from the builddeps.conf files.
44335 theroot=${builddep_cups_ROOT}
44336 thecflags=${builddep_cups_CFLAGS}
44337 thelibs=${builddep_cups_LIBS}
44338 if test "x$depdir" = x; then
44339 as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
44340 fi
44341 CUPS=$depdir
44342 if test "x$theroot" != x; then
44343 CUPS="$theroot"
44344 fi
44345 if test "x$thecflags" != x; then
44346 CUPS_CFLAGS="$thecflags"
44347 fi
44348 if test "x$thelibs" != x; then
44349 CUPS_LIBS="$thelibs"
44350 fi
44351 CUPS_FOUND=yes
44352
44353 fi
44354
44355 fi
44356
44357 fi
44358 if test "x$CUPS_FOUND" = xno; then
44359 # Are the cups headers installed in the default /usr/include location?
44360 for ac_header in cups/cups.h cups/ppd.h
44361 do :
44362 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44363 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
44364 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44365 cat >>confdefs.h <<_ACEOF
44366 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44367 _ACEOF
44368
44369 CUPS_FOUND=yes
44370 CUPS_CFLAGS=
44371 DEFAULT_CUPS=yes
44372
44373
44374 fi
44375
44376 done
44377
44378 fi
44379 if test "x$CUPS_FOUND" = xno; then
44380 # Getting nervous now? Lets poke around for standard Solaris third-party
44381 # package installation locations.
44382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
44383 $as_echo_n "checking for cups headers... " >&6; }
44384 if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
44385 # An SFW package seems to be installed!
44386 CUPS_FOUND=yes
44387 CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
44388 elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
44389 # A CSW package seems to be installed!
44390 CUPS_FOUND=yes
44391 CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
44392 fi
44393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
44394 $as_echo "$CUPS_FOUND" >&6; }
44395 fi
44396 if test "x$CUPS_FOUND" = xno; then
44397
44398 # Print a helpful message on how to acquire the necessary build dependency.
44399 # cups is the help tag: freetype, cups, pulse, alsa etc
44400 MISSING_DEPENDENCY=cups
44401
44402 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44403 cygwin_help $MISSING_DEPENDENCY
44404 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44405 msys_help $MISSING_DEPENDENCY
44406 else
44407 PKGHANDLER_COMMAND=
44408
44409 case $PKGHANDLER in
44410 apt-get)
44411 apt_help $MISSING_DEPENDENCY ;;
44412 yum)
44413 yum_help $MISSING_DEPENDENCY ;;
44414 port)
44415 port_help $MISSING_DEPENDENCY ;;
44416 pkgutil)
44417 pkgutil_help $MISSING_DEPENDENCY ;;
44418 pkgadd)
44419 pkgadd_help $MISSING_DEPENDENCY ;;
44420 esac
44421
44422 if test "x$PKGHANDLER_COMMAND" != x; then
44423 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44424 fi
44425 fi
44426
44427 as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
44428 fi
44429 fi
44430
44431
44432
44433
44434
44435
44436 ###############################################################################
44437 #
44438 # The ubiquitous freetype library is used to render fonts.
44439 #
44440
44441 # Check whether --with-freetype was given.
44442 if test "${with_freetype+set}" = set; then :
44443 withval=$with_freetype;
44444 fi
44445
44446
44447 # Check whether --with-freetype-include was given.
44448 if test "${with_freetype_include+set}" = set; then :
44449 withval=$with_freetype_include;
44450 fi
44451
44452
44453 # Check whether --with-freetype-lib was given.
44454 if test "${with_freetype_lib+set}" = set; then :
44455 withval=$with_freetype_lib;
44456 fi
44457
44458
44459 # Check whether --with-freetype-src was given.
44460 if test "${with_freetype_src+set}" = set; then :
44461 withval=$with_freetype_src;
44462 fi
44463
44464 # Check whether --enable-freetype-bundling was given.
44465 if test "${enable_freetype_bundling+set}" = set; then :
44466 enableval=$enable_freetype_bundling;
44467 fi
44468
44469
44470 # Need to specify explicitly since it needs to be overridden on some versions of macosx
44471 FREETYPE_BASE_NAME=freetype
44472 FREETYPE_CFLAGS=
44473 FREETYPE_LIBS=
44474 FREETYPE_BUNDLE_LIB_PATH=
44475
44476 if test "x$FREETYPE_NOT_NEEDED" = xyes; then
44477 if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x || test "x$with_freetype_src" != x; then
44478 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
44479 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
44480 fi
44481 if test "x$enable_freetype_bundling" != x; then
44482 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
44483 $as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
44484 fi
44485 else
44486 # freetype is needed to build; go get it!
44487
44488 BUNDLE_FREETYPE="$enable_freetype_bundling"
44489
44490 if test "x$with_freetype_src" != x; then
44491 if test "x$OPENJDK_TARGET_OS" = xwindows; then
44492 # Try to build freetype if --with-freetype-src was given on Windows
44493
44494 FREETYPE_SRC_PATH="$with_freetype_src"
44495 BUILD_FREETYPE=yes
44496
44497 # Check if the freetype sources are acessible..
44498 if ! test -d $FREETYPE_SRC_PATH; then
44499 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&5
44500 $as_echo "$as_me: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
44501 BUILD_FREETYPE=no
44502 fi
44503 # ..and contain a vc2010 project file
44504 vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
44505 if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
44506 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&5
44507 $as_echo "$as_me: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
44508 BUILD_FREETYPE=no
44509 fi
44510 # Now check if configure found a version of 'msbuild.exe'
44511 if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
44512 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can not find an msbuild.exe executable (you may try to install .NET 4.0) - ignoring --with-freetype-src" >&5
44513 $as_echo "$as_me: WARNING: Can not find an msbuild.exe executable (you may try to install .NET 4.0) - ignoring --with-freetype-src" >&2;}
44514 BUILD_FREETYPE=no
44515 fi
44516
44517 # Ready to go..
44518 if test "x$BUILD_FREETYPE" = xyes; then
44519
44520 # msbuild requires trailing slashes for output directories
44521 freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
44522 freetype_lib_path_unix="$freetype_lib_path"
44523 freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
44524
44525 unix_path="$vcxproj_path"
44526 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44527 windows_path=`$CYGPATH -m "$unix_path"`
44528 vcxproj_path="$windows_path"
44529 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44530 windows_path=`cmd //c echo $unix_path`
44531 vcxproj_path="$windows_path"
44532 fi
44533
44534
44535 unix_path="$freetype_lib_path"
44536 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44537 windows_path=`$CYGPATH -m "$unix_path"`
44538 freetype_lib_path="$windows_path"
44539 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44540 windows_path=`cmd //c echo $unix_path`
44541 freetype_lib_path="$windows_path"
44542 fi
44543
44544
44545 unix_path="$freetype_obj_path"
44546 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44547 windows_path=`$CYGPATH -m "$unix_path"`
44548 freetype_obj_path="$windows_path"
44549 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44550 windows_path=`cmd //c echo $unix_path`
44551 freetype_obj_path="$windows_path"
44552 fi
44553
44554 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
44555 freetype_platform=x64
44556 else
44557 freetype_platform=win32
44558 fi
44559
44560 # The original freetype project file is for VS 2010 (i.e. 'v100'),
44561 # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
44562 # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
44563 # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
44564 { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
44565 $as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
44566
44567 # First we try to build the freetype.dll
44568 $ECHO -e "@echo off\n"\
44569 "$MSBUILD $vcxproj_path "\
44570 "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44571 "/p:Configuration=\"Release Multithreaded\" "\
44572 "/p:Platform=$freetype_platform "\
44573 "/p:ConfigurationType=DynamicLibrary "\
44574 "/p:TargetName=freetype "\
44575 "/p:OutDir=\"$freetype_lib_path\" "\
44576 "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
44577 cmd /c freetype.bat
44578
44579 if test -s "$freetype_lib_path_unix/freetype.dll"; then
44580 # If that succeeds we also build freetype.lib
44581 $ECHO -e "@echo off\n"\
44582 "$MSBUILD $vcxproj_path "\
44583 "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44584 "/p:Configuration=\"Release Multithreaded\" "\
44585 "/p:Platform=$freetype_platform "\
44586 "/p:ConfigurationType=StaticLibrary "\
44587 "/p:TargetName=freetype "\
44588 "/p:OutDir=\"$freetype_lib_path\" "\
44589 "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
44590 cmd /c freetype.bat
44591
44592 if test -s "$freetype_lib_path_unix/freetype.lib"; then
44593 # Once we build both, lib and dll, set freetype lib and include path appropriately
44594 POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
44595 POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
44596 { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
44597 $as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
44598 else
44599 BUILD_FREETYPE=no
44600 fi
44601 else
44602 BUILD_FREETYPE=no
44603 fi
44604 fi
44605
44606 if test "x$BUILD_FREETYPE" = xyes; then
44607 # Okay, we built it. Check that it works.
44608
44609 POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44610 POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44611 METHOD="--with-freetype-src"
44612
44613 # Let's start with an optimistic view of the world :-)
44614 FOUND_FREETYPE=yes
44615
44616 # First look for the canonical freetype main include file ft2build.h.
44617 if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44618 # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44619 POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44620 if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44621 # Fail.
44622 FOUND_FREETYPE=no
44623 fi
44624 fi
44625
44626 if test "x$FOUND_FREETYPE" = xyes; then
44627 # Include file found, let's continue the sanity check.
44628 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44629 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44630
44631 # Reset to default value
44632 FREETYPE_BASE_NAME=freetype
44633 FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44634 if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44635 if test "x$OPENJDK_TARGET_OS" = xmacosx \
44636 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44637 # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44638 # for the .6 version explicitly.
44639 FREETYPE_BASE_NAME=freetype.6
44640 FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44641 { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44642 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44643 else
44644 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44645 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44646 FOUND_FREETYPE=no
44647 fi
44648 else
44649 if test "x$OPENJDK_TARGET_OS" = xwindows; then
44650 # On Windows, we will need both .lib and .dll file.
44651 if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44652 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44653 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44654 FOUND_FREETYPE=no
44655 fi
44656 elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44657 && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44658 # Found lib in isa dir, use that instead.
44659 POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44660 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44661 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44662 fi
44663 fi
44664 fi
44665
44666 if test "x$FOUND_FREETYPE" = xyes; then
44667
44668 # Only process if variable expands to non-empty
44669
44670 if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
44671 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44672
44673 # Input might be given as Windows format, start by converting to
44674 # unix format.
44675 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44676 new_path=`$CYGPATH -u "$path"`
44677
44678 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44679 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44680 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44681 # "foo.exe" is OK but "foo" is an error.
44682 #
44683 # This test is therefore slightly more accurate than "test -f" to check for file precense.
44684 # It is also a way to make sure we got the proper file name for the real test later on.
44685 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44686 if test "x$test_shortpath" = x; then
44687 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44688 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44689 as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44690 fi
44691
44692 # Call helper function which possibly converts this using DOS-style short mode.
44693 # If so, the updated path is stored in $new_path.
44694
44695 input_path="$new_path"
44696 # Check if we need to convert this using DOS-style short mode. If the path
44697 # contains just simple characters, use it. Otherwise (spaces, weird characters),
44698 # take no chances and rewrite it.
44699 # Note: m4 eats our [], so we need to use [ and ] instead.
44700 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44701 if test "x$has_forbidden_chars" != x; then
44702 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44703 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44704 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44705 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44706 # Going to short mode and back again did indeed matter. Since short mode is
44707 # case insensitive, let's make it lowercase to improve readability.
44708 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44709 # Now convert it back to Unix-style (cygpath)
44710 input_path=`$CYGPATH -u "$shortmode_path"`
44711 new_path="$input_path"
44712 fi
44713 fi
44714
44715 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44716 if test "x$test_cygdrive_prefix" = x; then
44717 # As a simple fix, exclude /usr/bin since it's not a real path.
44718 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44719 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44720 # a path prefixed by /cygdrive for fixpath to work.
44721 new_path="$CYGWIN_ROOT_PATH$input_path"
44722 fi
44723 fi
44724
44725
44726 if test "x$path" != "x$new_path"; then
44727 POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44728 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44729 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44730 fi
44731
44732 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44733
44734 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44735 has_colon=`$ECHO $path | $GREP ^.:`
44736 new_path="$path"
44737 if test "x$has_colon" = x; then
44738 # Not in mixed or Windows style, start by that.
44739 new_path=`cmd //c echo $path`
44740 fi
44741
44742
44743 input_path="$new_path"
44744 # Check if we need to convert this using DOS-style short mode. If the path
44745 # contains just simple characters, use it. Otherwise (spaces, weird characters),
44746 # take no chances and rewrite it.
44747 # Note: m4 eats our [], so we need to use [ and ] instead.
44748 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44749 if test "x$has_forbidden_chars" != x; then
44750 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44751 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44752 fi
44753
44754
44755 windows_path="$new_path"
44756 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44757 unix_path=`$CYGPATH -u "$windows_path"`
44758 new_path="$unix_path"
44759 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44760 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44761 new_path="$unix_path"
44762 fi
44763
44764 if test "x$path" != "x$new_path"; then
44765 POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44766 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44767 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44768 fi
44769
44770 # Save the first 10 bytes of this path to the storage, so fixpath can work.
44771 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44772
44773 else
44774 # We're on a unix platform. Hooray! :)
44775 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44776 has_space=`$ECHO "$path" | $GREP " "`
44777 if test "x$has_space" != x; then
44778 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44779 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44780 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44781 fi
44782
44783 # Use eval to expand a potential ~
44784 eval path="$path"
44785 if test ! -f "$path" && test ! -d "$path"; then
44786 as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44787 fi
44788
44789 POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44790 fi
44791 fi
44792
44793
44794 # Only process if variable expands to non-empty
44795
44796 if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44797 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44798
44799 # Input might be given as Windows format, start by converting to
44800 # unix format.
44801 path="$POTENTIAL_FREETYPE_LIB_PATH"
44802 new_path=`$CYGPATH -u "$path"`
44803
44804 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44805 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44806 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44807 # "foo.exe" is OK but "foo" is an error.
44808 #
44809 # This test is therefore slightly more accurate than "test -f" to check for file precense.
44810 # It is also a way to make sure we got the proper file name for the real test later on.
44811 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44812 if test "x$test_shortpath" = x; then
44813 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44814 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44815 as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44816 fi
44817
44818 # Call helper function which possibly converts this using DOS-style short mode.
44819 # If so, the updated path is stored in $new_path.
44820
44821 input_path="$new_path"
44822 # Check if we need to convert this using DOS-style short mode. If the path
44823 # contains just simple characters, use it. Otherwise (spaces, weird characters),
44824 # take no chances and rewrite it.
44825 # Note: m4 eats our [], so we need to use [ and ] instead.
44826 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44827 if test "x$has_forbidden_chars" != x; then
44828 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44829 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44830 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44831 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44832 # Going to short mode and back again did indeed matter. Since short mode is
44833 # case insensitive, let's make it lowercase to improve readability.
44834 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44835 # Now convert it back to Unix-style (cygpath)
44836 input_path=`$CYGPATH -u "$shortmode_path"`
44837 new_path="$input_path"
44838 fi
44839 fi
44840
44841 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44842 if test "x$test_cygdrive_prefix" = x; then
44843 # As a simple fix, exclude /usr/bin since it's not a real path.
44844 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44845 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44846 # a path prefixed by /cygdrive for fixpath to work.
44847 new_path="$CYGWIN_ROOT_PATH$input_path"
44848 fi
44849 fi
44850
44851
44852 if test "x$path" != "x$new_path"; then
44853 POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44854 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44855 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44856 fi
44857
44858 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44859
44860 path="$POTENTIAL_FREETYPE_LIB_PATH"
44861 has_colon=`$ECHO $path | $GREP ^.:`
44862 new_path="$path"
44863 if test "x$has_colon" = x; then
44864 # Not in mixed or Windows style, start by that.
44865 new_path=`cmd //c echo $path`
44866 fi
44867
44868
44869 input_path="$new_path"
44870 # Check if we need to convert this using DOS-style short mode. If the path
44871 # contains just simple characters, use it. Otherwise (spaces, weird characters),
44872 # take no chances and rewrite it.
44873 # Note: m4 eats our [], so we need to use [ and ] instead.
44874 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44875 if test "x$has_forbidden_chars" != x; then
44876 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44877 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44878 fi
44879
44880
44881 windows_path="$new_path"
44882 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44883 unix_path=`$CYGPATH -u "$windows_path"`
44884 new_path="$unix_path"
44885 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44886 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44887 new_path="$unix_path"
44888 fi
44889
44890 if test "x$path" != "x$new_path"; then
44891 POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44892 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44893 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44894 fi
44895
44896 # Save the first 10 bytes of this path to the storage, so fixpath can work.
44897 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44898
44899 else
44900 # We're on a unix platform. Hooray! :)
44901 path="$POTENTIAL_FREETYPE_LIB_PATH"
44902 has_space=`$ECHO "$path" | $GREP " "`
44903 if test "x$has_space" != x; then
44904 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44905 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44906 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44907 fi
44908
44909 # Use eval to expand a potential ~
44910 eval path="$path"
44911 if test ! -f "$path" && test ! -d "$path"; then
44912 as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44913 fi
44914
44915 POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44916 fi
44917 fi
44918
44919
44920 FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44922 $as_echo_n "checking for freetype includes... " >&6; }
44923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44924 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44925 FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44927 $as_echo_n "checking for freetype libraries... " >&6; }
44928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44929 $as_echo "$FREETYPE_LIB_PATH" >&6; }
44930 fi
44931
44932 if test "x$FOUND_FREETYPE" != xyes; then
44933 as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
44934 fi
44935 else
44936 { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
44937 $as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
44938 as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
44939 fi
44940 else
44941 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
44942 $as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
44943 fi
44944 fi
44945
44946 if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
44947 # User has specified settings
44948
44949 if test "x$BUNDLE_FREETYPE" = x; then
44950 # If not specified, default is to bundle freetype
44951 BUNDLE_FREETYPE=yes
44952 fi
44953
44954 if test "x$with_freetype" != x; then
44955 POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
44956 POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
44957 fi
44958
44959 # Allow --with-freetype-lib and --with-freetype-include to override
44960 if test "x$with_freetype_include" != x; then
44961 POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
44962 fi
44963 if test "x$with_freetype_lib" != x; then
44964 POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
44965 fi
44966
44967 if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44968 # Okay, we got it. Check that it works.
44969
44970 POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44971 POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44972 METHOD="--with-freetype"
44973
44974 # Let's start with an optimistic view of the world :-)
44975 FOUND_FREETYPE=yes
44976
44977 # First look for the canonical freetype main include file ft2build.h.
44978 if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44979 # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44980 POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44981 if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44982 # Fail.
44983 FOUND_FREETYPE=no
44984 fi
44985 fi
44986
44987 if test "x$FOUND_FREETYPE" = xyes; then
44988 # Include file found, let's continue the sanity check.
44989 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44990 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44991
44992 # Reset to default value
44993 FREETYPE_BASE_NAME=freetype
44994 FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44995 if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44996 if test "x$OPENJDK_TARGET_OS" = xmacosx \
44997 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44998 # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44999 # for the .6 version explicitly.
45000 FREETYPE_BASE_NAME=freetype.6
45001 FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45002 { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45003 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45004 else
45005 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45006 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45007 FOUND_FREETYPE=no
45008 fi
45009 else
45010 if test "x$OPENJDK_TARGET_OS" = xwindows; then
45011 # On Windows, we will need both .lib and .dll file.
45012 if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45013 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45014 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45015 FOUND_FREETYPE=no
45016 fi
45017 elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45018 && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45019 # Found lib in isa dir, use that instead.
45020 POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45021 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45022 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45023 fi
45024 fi
45025 fi
45026
45027 if test "x$FOUND_FREETYPE" = xyes; then
45028
45029 # Only process if variable expands to non-empty
45030
45031 if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45032 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45033
45034 # Input might be given as Windows format, start by converting to
45035 # unix format.
45036 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45037 new_path=`$CYGPATH -u "$path"`
45038
45039 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45040 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45041 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45042 # "foo.exe" is OK but "foo" is an error.
45043 #
45044 # This test is therefore slightly more accurate than "test -f" to check for file precense.
45045 # It is also a way to make sure we got the proper file name for the real test later on.
45046 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45047 if test "x$test_shortpath" = x; then
45048 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45049 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45050 as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45051 fi
45052
45053 # Call helper function which possibly converts this using DOS-style short mode.
45054 # If so, the updated path is stored in $new_path.
45055
45056 input_path="$new_path"
45057 # Check if we need to convert this using DOS-style short mode. If the path
45058 # contains just simple characters, use it. Otherwise (spaces, weird characters),
45059 # take no chances and rewrite it.
45060 # Note: m4 eats our [], so we need to use [ and ] instead.
45061 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45062 if test "x$has_forbidden_chars" != x; then
45063 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45064 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45065 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45066 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45067 # Going to short mode and back again did indeed matter. Since short mode is
45068 # case insensitive, let's make it lowercase to improve readability.
45069 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45070 # Now convert it back to Unix-style (cygpath)
45071 input_path=`$CYGPATH -u "$shortmode_path"`
45072 new_path="$input_path"
45073 fi
45074 fi
45075
45076 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45077 if test "x$test_cygdrive_prefix" = x; then
45078 # As a simple fix, exclude /usr/bin since it's not a real path.
45079 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45080 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45081 # a path prefixed by /cygdrive for fixpath to work.
45082 new_path="$CYGWIN_ROOT_PATH$input_path"
45083 fi
45084 fi
45085
45086
45087 if test "x$path" != "x$new_path"; then
45088 POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45089 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45090 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45091 fi
45092
45093 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45094
45095 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45096 has_colon=`$ECHO $path | $GREP ^.:`
45097 new_path="$path"
45098 if test "x$has_colon" = x; then
45099 # Not in mixed or Windows style, start by that.
45100 new_path=`cmd //c echo $path`
45101 fi
45102
45103
45104 input_path="$new_path"
45105 # Check if we need to convert this using DOS-style short mode. If the path
45106 # contains just simple characters, use it. Otherwise (spaces, weird characters),
45107 # take no chances and rewrite it.
45108 # Note: m4 eats our [], so we need to use [ and ] instead.
45109 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45110 if test "x$has_forbidden_chars" != x; then
45111 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45112 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45113 fi
45114
45115
45116 windows_path="$new_path"
45117 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45118 unix_path=`$CYGPATH -u "$windows_path"`
45119 new_path="$unix_path"
45120 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45121 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45122 new_path="$unix_path"
45123 fi
45124
45125 if test "x$path" != "x$new_path"; then
45126 POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45127 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45128 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45129 fi
45130
45131 # Save the first 10 bytes of this path to the storage, so fixpath can work.
45132 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45133
45134 else
45135 # We're on a unix platform. Hooray! :)
45136 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45137 has_space=`$ECHO "$path" | $GREP " "`
45138 if test "x$has_space" != x; then
45139 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45140 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45141 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45142 fi
45143
45144 # Use eval to expand a potential ~
45145 eval path="$path"
45146 if test ! -f "$path" && test ! -d "$path"; then
45147 as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45148 fi
45149
45150 POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45151 fi
45152 fi
45153
45154
45155 # Only process if variable expands to non-empty
45156
45157 if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45158 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45159
45160 # Input might be given as Windows format, start by converting to
45161 # unix format.
45162 path="$POTENTIAL_FREETYPE_LIB_PATH"
45163 new_path=`$CYGPATH -u "$path"`
45164
45165 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45166 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45167 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45168 # "foo.exe" is OK but "foo" is an error.
45169 #
45170 # This test is therefore slightly more accurate than "test -f" to check for file precense.
45171 # It is also a way to make sure we got the proper file name for the real test later on.
45172 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45173 if test "x$test_shortpath" = x; then
45174 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45175 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45176 as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45177 fi
45178
45179 # Call helper function which possibly converts this using DOS-style short mode.
45180 # If so, the updated path is stored in $new_path.
45181
45182 input_path="$new_path"
45183 # Check if we need to convert this using DOS-style short mode. If the path
45184 # contains just simple characters, use it. Otherwise (spaces, weird characters),
45185 # take no chances and rewrite it.
45186 # Note: m4 eats our [], so we need to use [ and ] instead.
45187 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45188 if test "x$has_forbidden_chars" != x; then
45189 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45190 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45191 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45192 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45193 # Going to short mode and back again did indeed matter. Since short mode is
45194 # case insensitive, let's make it lowercase to improve readability.
45195 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45196 # Now convert it back to Unix-style (cygpath)
45197 input_path=`$CYGPATH -u "$shortmode_path"`
45198 new_path="$input_path"
45199 fi
45200 fi
45201
45202 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45203 if test "x$test_cygdrive_prefix" = x; then
45204 # As a simple fix, exclude /usr/bin since it's not a real path.
45205 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45206 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45207 # a path prefixed by /cygdrive for fixpath to work.
45208 new_path="$CYGWIN_ROOT_PATH$input_path"
45209 fi
45210 fi
45211
45212
45213 if test "x$path" != "x$new_path"; then
45214 POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45215 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45216 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45217 fi
45218
45219 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45220
45221 path="$POTENTIAL_FREETYPE_LIB_PATH"
45222 has_colon=`$ECHO $path | $GREP ^.:`
45223 new_path="$path"
45224 if test "x$has_colon" = x; then
45225 # Not in mixed or Windows style, start by that.
45226 new_path=`cmd //c echo $path`
45227 fi
45228
45229
45230 input_path="$new_path"
45231 # Check if we need to convert this using DOS-style short mode. If the path
45232 # contains just simple characters, use it. Otherwise (spaces, weird characters),
45233 # take no chances and rewrite it.
45234 # Note: m4 eats our [], so we need to use [ and ] instead.
45235 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45236 if test "x$has_forbidden_chars" != x; then
45237 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45238 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45239 fi
45240
45241
45242 windows_path="$new_path"
45243 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45244 unix_path=`$CYGPATH -u "$windows_path"`
45245 new_path="$unix_path"
45246 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45247 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45248 new_path="$unix_path"
45249 fi
45250
45251 if test "x$path" != "x$new_path"; then
45252 POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45253 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45254 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45255 fi
45256
45257 # Save the first 10 bytes of this path to the storage, so fixpath can work.
45258 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45259
45260 else
45261 # We're on a unix platform. Hooray! :)
45262 path="$POTENTIAL_FREETYPE_LIB_PATH"
45263 has_space=`$ECHO "$path" | $GREP " "`
45264 if test "x$has_space" != x; then
45265 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45266 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45267 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45268 fi
45269
45270 # Use eval to expand a potential ~
45271 eval path="$path"
45272 if test ! -f "$path" && test ! -d "$path"; then
45273 as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45274 fi
45275
45276 POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45277 fi
45278 fi
45279
45280
45281 FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45283 $as_echo_n "checking for freetype includes... " >&6; }
45284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45285 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45286 FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45288 $as_echo_n "checking for freetype libraries... " >&6; }
45289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45290 $as_echo "$FREETYPE_LIB_PATH" >&6; }
45291 fi
45292
45293 if test "x$FOUND_FREETYPE" != xyes; then
45294 as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
45295 fi
45296 else
45297 # User specified only one of lib or include. This is an error.
45298 if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
45299 { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
45300 $as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
45301 as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45302 else
45303 { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
45304 $as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
45305 as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45306 fi
45307 fi
45308 else
45309 # User did not specify settings, but we need freetype. Try to locate it.
45310
45311 if test "x$BUNDLE_FREETYPE" = x; then
45312 # If not specified, default is to bundle freetype only on windows
45313 if test "x$OPENJDK_TARGET_OS" = xwindows; then
45314 BUNDLE_FREETYPE=yes
45315 else
45316 BUNDLE_FREETYPE=no
45317 fi
45318 fi
45319
45320 if test "x$FOUND_FREETYPE" != xyes; then
45321 # Check builddeps
45322
45323
45324 if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
45325 # Source the builddeps file again, to make sure it uses the latest variables!
45326 . $builddepsfile
45327 # Look for a target and build machine specific resource!
45328 eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
45329 if test "x$resource" = x; then
45330 # Ok, lets instead look for a target specific resource
45331 eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
45332 fi
45333 if test "x$resource" = x; then
45334 # Ok, lets instead look for a build specific resource
45335 eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
45336 fi
45337 if test "x$resource" = x; then
45338 # Ok, lets instead look for a generic resource
45339 # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
45340 resource=${builddep_freetype2}
45341 fi
45342 if test "x$resource" != x; then
45343 { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
45344 $as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
45345 # If the resource in the builddeps.conf file is an existing directory,
45346 # for example /java/linux/cups
45347 if test -d ${resource}; then
45348 depdir=${resource}
45349 else
45350
45351 # freetype2 is for example mymodule
45352 # $resource is for example libs/general/libmymod_1_2_3.zip
45353 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
45354 # $with_builddeps_dir is for example /localhome/builddeps
45355 # depdir is the name of the variable into which we store the depdir, eg MYMOD
45356 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
45357 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
45358 filename=`basename $resource`
45359 filebase=`echo $filename | sed 's/\.[^\.]*$//'`
45360 filebase=${filename%%.*}
45361 extension=${filename#*.}
45362 installdir=$with_builddeps_dir/$filebase
45363 if test ! -f $installdir/$filename.unpacked; then
45364 { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
45365 $as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
45366 if test ! -d $installdir; then
45367 mkdir -p $installdir
45368 fi
45369 if test ! -d $installdir; then
45370 as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
45371 fi
45372 tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
45373 touch $tmpfile
45374 if test ! -f $tmpfile; then
45375 as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
45376 fi
45377
45378 # $with_builddeps_server/$resource is the ftp://abuilddeps.server.com/libs/cups.zip
45379 # $tmpfile is the local file name for the downloaded file.
45380 VALID_TOOL=no
45381 if test "x$BDEPS_FTP" = xwget; then
45382 VALID_TOOL=yes
45383 wget -O $tmpfile $with_builddeps_server/$resource
45384 fi
45385 if test "x$BDEPS_FTP" = xlftp; then
45386 VALID_TOOL=yes
45387 lftp -c "get $with_builddeps_server/$resource -o $tmpfile"
45388 fi
45389 if test "x$BDEPS_FTP" = xftp; then
45390 VALID_TOOL=yes
45391 FTPSERVER=`echo $with_builddeps_server/$resource | cut -f 3 -d '/'`
45392 FTPPATH=`echo $with_builddeps_server/$resource | cut -f 4- -d '/'`
45393 FTPUSERPWD=${FTPSERVER%%@*}
45394 if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
45395 FTPUSER=${userpwd%%:*}
45396 FTPPWD=${userpwd#*@}
45397 FTPSERVER=${FTPSERVER#*@}
45398 else
45399 FTPUSER=ftp
45400 FTPPWD=ftp
45401 fi
45402 # the "pass" command does not work on some
45403 # ftp clients (read ftp.exe) but if it works,
45404 # passive mode is better!
45405 ( \
45406 echo "user $FTPUSER $FTPPWD" ; \
45407 echo "pass" ; \
45408 echo "bin" ; \
45409 echo "get $FTPPATH $tmpfile" ; \
45410 ) | ftp -in $FTPSERVER
45411 fi
45412 if test "x$VALID_TOOL" != xyes; then
45413 as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
45414 fi
45415
45416 mv $tmpfile $installdir/$filename
45417 if test ! -s $installdir/$filename; then
45418 as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
45419 fi
45420 case "$extension" in
45421 zip) echo "Unzipping $installdir/$filename..."
45422 (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
45423 ;;
45424 tar.gz) echo "Untaring $installdir/$filename..."
45425 (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45426 ;;
45427 tgz) echo "Untaring $installdir/$filename..."
45428 (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45429 ;;
45430 *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
45431 ;;
45432 esac
45433 fi
45434 if test -f $installdir/$filename.unpacked; then
45435 depdir=$installdir
45436 fi
45437
45438 fi
45439 # Source the builddeps file again, because in the previous command, the depdir
45440 # was updated to point at the current build dependency install directory.
45441 . $builddepsfile
45442 # Now extract variables from the builddeps.conf files.
45443 theroot=${builddep_freetype2_ROOT}
45444 thecflags=${builddep_freetype2_CFLAGS}
45445 thelibs=${builddep_freetype2_LIBS}
45446 if test "x$depdir" = x; then
45447 as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
45448 fi
45449 FREETYPE=$depdir
45450 if test "x$theroot" != x; then
45451 FREETYPE="$theroot"
45452 fi
45453 if test "x$thecflags" != x; then
45454 FREETYPE_CFLAGS="$thecflags"
45455 fi
45456 if test "x$thelibs" != x; then
45457 FREETYPE_LIBS="$thelibs"
45458 fi
45459 FOUND_FREETYPE=yes
45460 else FOUND_FREETYPE=no
45461
45462 fi
45463 else FOUND_FREETYPE=no
45464
45465 fi
45466
45467 # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45468 if test "x$FOUND_FREETYPE" = xyes; then
45469 if test "x$BUNDLE_FREETYPE" = xyes; then
45470 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
45471 $as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
45472 FOUND_FREETYPE=no
45473 else
45474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45475 $as_echo_n "checking for freetype... " >&6; }
45476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
45477 $as_echo "yes (using builddeps)" >&6; }
45478 fi
45479 fi
45480 fi
45481
45482 # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
45483 if test "x$SYSROOT" = x; then
45484 if test "x$FOUND_FREETYPE" != xyes; then
45485 # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
45486 if test "x$PKG_CONFIG" != x; then
45487
45488 pkg_failed=no
45489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
45490 $as_echo_n "checking for FREETYPE... " >&6; }
45491
45492 if test -n "$FREETYPE_CFLAGS"; then
45493 pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
45494 elif test -n "$PKG_CONFIG"; then
45495 if test -n "$PKG_CONFIG" && \
45496 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45497 ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45498 ac_status=$?
45499 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45500 test $ac_status = 0; }; then
45501 pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
45502 else
45503 pkg_failed=yes
45504 fi
45505 else
45506 pkg_failed=untried
45507 fi
45508 if test -n "$FREETYPE_LIBS"; then
45509 pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
45510 elif test -n "$PKG_CONFIG"; then
45511 if test -n "$PKG_CONFIG" && \
45512 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45513 ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45514 ac_status=$?
45515 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45516 test $ac_status = 0; }; then
45517 pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
45518 else
45519 pkg_failed=yes
45520 fi
45521 else
45522 pkg_failed=untried
45523 fi
45524
45525
45526
45527 if test $pkg_failed = yes; then
45528
45529 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
45530 _pkg_short_errors_supported=yes
45531 else
45532 _pkg_short_errors_supported=no
45533 fi
45534 if test $_pkg_short_errors_supported = yes; then
45535 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
45536 else
45537 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
45538 fi
45539 # Put the nasty error message in config.log where it belongs
45540 echo "$FREETYPE_PKG_ERRORS" >&5
45541
45542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45543 $as_echo "no" >&6; }
45544 FOUND_FREETYPE=no
45545 elif test $pkg_failed = untried; then
45546 FOUND_FREETYPE=no
45547 else
45548 FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
45549 FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
45550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45551 $as_echo "yes" >&6; }
45552 FOUND_FREETYPE=yes
45553 fi
45554 if test "x$FOUND_FREETYPE" = xyes; then
45555 # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
45556 FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
45557 # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
45558 if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
45559 FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
45560 fi
45561 # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45562 if test "x$BUNDLE_FREETYPE" = xyes; then
45563 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
45564 $as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
45565 FOUND_FREETYPE=no
45566 else
45567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45568 $as_echo_n "checking for freetype... " >&6; }
45569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
45570 $as_echo "yes (using pkg-config)" >&6; }
45571 fi
45572 fi
45573 fi
45574 fi
45575 fi
45576
45577 if test "x$FOUND_FREETYPE" != xyes; then
45578 # Check in well-known locations
45579 if test "x$OPENJDK_TARGET_OS" = xwindows; then
45580 FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
45581
45582 windows_path="$FREETYPE_BASE_DIR"
45583 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45584 unix_path=`$CYGPATH -u "$windows_path"`
45585 FREETYPE_BASE_DIR="$unix_path"
45586 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45587 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45588 FREETYPE_BASE_DIR="$unix_path"
45589 fi
45590
45591
45592 POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45593 POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45594 METHOD="well-known location"
45595
45596 # Let's start with an optimistic view of the world :-)
45597 FOUND_FREETYPE=yes
45598
45599 # First look for the canonical freetype main include file ft2build.h.
45600 if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45601 # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45602 POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45603 if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45604 # Fail.
45605 FOUND_FREETYPE=no
45606 fi
45607 fi
45608
45609 if test "x$FOUND_FREETYPE" = xyes; then
45610 # Include file found, let's continue the sanity check.
45611 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45612 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45613
45614 # Reset to default value
45615 FREETYPE_BASE_NAME=freetype
45616 FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45617 if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45618 if test "x$OPENJDK_TARGET_OS" = xmacosx \
45619 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45620 # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45621 # for the .6 version explicitly.
45622 FREETYPE_BASE_NAME=freetype.6
45623 FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45624 { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45625 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45626 else
45627 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45628 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45629 FOUND_FREETYPE=no
45630 fi
45631 else
45632 if test "x$OPENJDK_TARGET_OS" = xwindows; then
45633 # On Windows, we will need both .lib and .dll file.
45634 if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45635 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45636 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45637 FOUND_FREETYPE=no
45638 fi
45639 elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45640 && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45641 # Found lib in isa dir, use that instead.
45642 POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45643 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45644 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45645 fi
45646 fi
45647 fi
45648
45649 if test "x$FOUND_FREETYPE" = xyes; then
45650
45651 # Only process if variable expands to non-empty
45652
45653 if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45654 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45655
45656 # Input might be given as Windows format, start by converting to
45657 # unix format.
45658 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45659 new_path=`$CYGPATH -u "$path"`
45660
45661 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45662 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45663 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45664 # "foo.exe" is OK but "foo" is an error.
45665 #
45666 # This test is therefore slightly more accurate than "test -f" to check for file precense.
45667 # It is also a way to make sure we got the proper file name for the real test later on.
45668 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45669 if test "x$test_shortpath" = x; then
45670 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45671 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45672 as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45673 fi
45674
45675 # Call helper function which possibly converts this using DOS-style short mode.
45676 # If so, the updated path is stored in $new_path.
45677
45678 input_path="$new_path"
45679 # Check if we need to convert this using DOS-style short mode. If the path
45680 # contains just simple characters, use it. Otherwise (spaces, weird characters),
45681 # take no chances and rewrite it.
45682 # Note: m4 eats our [], so we need to use [ and ] instead.
45683 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45684 if test "x$has_forbidden_chars" != x; then
45685 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45686 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45687 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45688 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45689 # Going to short mode and back again did indeed matter. Since short mode is
45690 # case insensitive, let's make it lowercase to improve readability.
45691 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45692 # Now convert it back to Unix-style (cygpath)
45693 input_path=`$CYGPATH -u "$shortmode_path"`
45694 new_path="$input_path"
45695 fi
45696 fi
45697
45698 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45699 if test "x$test_cygdrive_prefix" = x; then
45700 # As a simple fix, exclude /usr/bin since it's not a real path.
45701 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45702 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45703 # a path prefixed by /cygdrive for fixpath to work.
45704 new_path="$CYGWIN_ROOT_PATH$input_path"
45705 fi
45706 fi
45707
45708
45709 if test "x$path" != "x$new_path"; then
45710 POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45711 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45712 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45713 fi
45714
45715 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45716
45717 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45718 has_colon=`$ECHO $path | $GREP ^.:`
45719 new_path="$path"
45720 if test "x$has_colon" = x; then
45721 # Not in mixed or Windows style, start by that.
45722 new_path=`cmd //c echo $path`
45723 fi
45724
45725
45726 input_path="$new_path"
45727 # Check if we need to convert this using DOS-style short mode. If the path
45728 # contains just simple characters, use it. Otherwise (spaces, weird characters),
45729 # take no chances and rewrite it.
45730 # Note: m4 eats our [], so we need to use [ and ] instead.
45731 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45732 if test "x$has_forbidden_chars" != x; then
45733 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45734 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45735 fi
45736
45737
45738 windows_path="$new_path"
45739 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45740 unix_path=`$CYGPATH -u "$windows_path"`
45741 new_path="$unix_path"
45742 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45743 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45744 new_path="$unix_path"
45745 fi
45746
45747 if test "x$path" != "x$new_path"; then
45748 POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45749 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45750 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45751 fi
45752
45753 # Save the first 10 bytes of this path to the storage, so fixpath can work.
45754 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45755
45756 else
45757 # We're on a unix platform. Hooray! :)
45758 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45759 has_space=`$ECHO "$path" | $GREP " "`
45760 if test "x$has_space" != x; then
45761 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45762 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45763 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45764 fi
45765
45766 # Use eval to expand a potential ~
45767 eval path="$path"
45768 if test ! -f "$path" && test ! -d "$path"; then
45769 as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45770 fi
45771
45772 POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45773 fi
45774 fi
45775
45776
45777 # Only process if variable expands to non-empty
45778
45779 if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45780 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45781
45782 # Input might be given as Windows format, start by converting to
45783 # unix format.
45784 path="$POTENTIAL_FREETYPE_LIB_PATH"
45785 new_path=`$CYGPATH -u "$path"`
45786
45787 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45788 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45789 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45790 # "foo.exe" is OK but "foo" is an error.
45791 #
45792 # This test is therefore slightly more accurate than "test -f" to check for file precense.
45793 # It is also a way to make sure we got the proper file name for the real test later on.
45794 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45795 if test "x$test_shortpath" = x; then
45796 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45797 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45798 as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45799 fi
45800
45801 # Call helper function which possibly converts this using DOS-style short mode.
45802 # If so, the updated path is stored in $new_path.
45803
45804 input_path="$new_path"
45805 # Check if we need to convert this using DOS-style short mode. If the path
45806 # contains just simple characters, use it. Otherwise (spaces, weird characters),
45807 # take no chances and rewrite it.
45808 # Note: m4 eats our [], so we need to use [ and ] instead.
45809 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45810 if test "x$has_forbidden_chars" != x; then
45811 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45812 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45813 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45814 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45815 # Going to short mode and back again did indeed matter. Since short mode is
45816 # case insensitive, let's make it lowercase to improve readability.
45817 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45818 # Now convert it back to Unix-style (cygpath)
45819 input_path=`$CYGPATH -u "$shortmode_path"`
45820 new_path="$input_path"
45821 fi
45822 fi
45823
45824 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45825 if test "x$test_cygdrive_prefix" = x; then
45826 # As a simple fix, exclude /usr/bin since it's not a real path.
45827 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45828 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45829 # a path prefixed by /cygdrive for fixpath to work.
45830 new_path="$CYGWIN_ROOT_PATH$input_path"
45831 fi
45832 fi
45833
45834
45835 if test "x$path" != "x$new_path"; then
45836 POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45837 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45838 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45839 fi
45840
45841 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45842
45843 path="$POTENTIAL_FREETYPE_LIB_PATH"
45844 has_colon=`$ECHO $path | $GREP ^.:`
45845 new_path="$path"
45846 if test "x$has_colon" = x; then
45847 # Not in mixed or Windows style, start by that.
45848 new_path=`cmd //c echo $path`
45849 fi
45850
45851
45852 input_path="$new_path"
45853 # Check if we need to convert this using DOS-style short mode. If the path
45854 # contains just simple characters, use it. Otherwise (spaces, weird characters),
45855 # take no chances and rewrite it.
45856 # Note: m4 eats our [], so we need to use [ and ] instead.
45857 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45858 if test "x$has_forbidden_chars" != x; then
45859 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45860 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45861 fi
45862
45863
45864 windows_path="$new_path"
45865 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45866 unix_path=`$CYGPATH -u "$windows_path"`
45867 new_path="$unix_path"
45868 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45869 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45870 new_path="$unix_path"
45871 fi
45872
45873 if test "x$path" != "x$new_path"; then
45874 POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45875 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45876 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45877 fi
45878
45879 # Save the first 10 bytes of this path to the storage, so fixpath can work.
45880 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45881
45882 else
45883 # We're on a unix platform. Hooray! :)
45884 path="$POTENTIAL_FREETYPE_LIB_PATH"
45885 has_space=`$ECHO "$path" | $GREP " "`
45886 if test "x$has_space" != x; then
45887 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45888 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45889 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45890 fi
45891
45892 # Use eval to expand a potential ~
45893 eval path="$path"
45894 if test ! -f "$path" && test ! -d "$path"; then
45895 as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45896 fi
45897
45898 POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45899 fi
45900 fi
45901
45902
45903 FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45905 $as_echo_n "checking for freetype includes... " >&6; }
45906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45907 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45908 FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45910 $as_echo_n "checking for freetype libraries... " >&6; }
45911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45912 $as_echo "$FREETYPE_LIB_PATH" >&6; }
45913 fi
45914
45915 if test "x$FOUND_FREETYPE" != xyes; then
45916 FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
45917
45918 windows_path="$FREETYPE_BASE_DIR"
45919 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45920 unix_path=`$CYGPATH -u "$windows_path"`
45921 FREETYPE_BASE_DIR="$unix_path"
45922 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45923 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45924 FREETYPE_BASE_DIR="$unix_path"
45925 fi
45926
45927
45928 POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45929 POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45930 METHOD="well-known location"
45931
45932 # Let's start with an optimistic view of the world :-)
45933 FOUND_FREETYPE=yes
45934
45935 # First look for the canonical freetype main include file ft2build.h.
45936 if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45937 # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45938 POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45939 if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45940 # Fail.
45941 FOUND_FREETYPE=no
45942 fi
45943 fi
45944
45945 if test "x$FOUND_FREETYPE" = xyes; then
45946 # Include file found, let's continue the sanity check.
45947 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45948 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45949
45950 # Reset to default value
45951 FREETYPE_BASE_NAME=freetype
45952 FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45953 if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45954 if test "x$OPENJDK_TARGET_OS" = xmacosx \
45955 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45956 # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45957 # for the .6 version explicitly.
45958 FREETYPE_BASE_NAME=freetype.6
45959 FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45960 { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45961 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45962 else
45963 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45964 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45965 FOUND_FREETYPE=no
45966 fi
45967 else
45968 if test "x$OPENJDK_TARGET_OS" = xwindows; then
45969 # On Windows, we will need both .lib and .dll file.
45970 if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45971 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45972 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45973 FOUND_FREETYPE=no
45974 fi
45975 elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45976 && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45977 # Found lib in isa dir, use that instead.
45978 POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45979 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45980 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45981 fi
45982 fi
45983 fi
45984
45985 if test "x$FOUND_FREETYPE" = xyes; then
45986
45987 # Only process if variable expands to non-empty
45988
45989 if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45990 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45991
45992 # Input might be given as Windows format, start by converting to
45993 # unix format.
45994 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45995 new_path=`$CYGPATH -u "$path"`
45996
45997 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45998 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45999 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46000 # "foo.exe" is OK but "foo" is an error.
46001 #
46002 # This test is therefore slightly more accurate than "test -f" to check for file precense.
46003 # It is also a way to make sure we got the proper file name for the real test later on.
46004 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46005 if test "x$test_shortpath" = x; then
46006 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46007 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46008 as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46009 fi
46010
46011 # Call helper function which possibly converts this using DOS-style short mode.
46012 # If so, the updated path is stored in $new_path.
46013
46014 input_path="$new_path"
46015 # Check if we need to convert this using DOS-style short mode. If the path
46016 # contains just simple characters, use it. Otherwise (spaces, weird characters),
46017 # take no chances and rewrite it.
46018 # Note: m4 eats our [], so we need to use [ and ] instead.
46019 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46020 if test "x$has_forbidden_chars" != x; then
46021 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46022 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46023 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46024 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46025 # Going to short mode and back again did indeed matter. Since short mode is
46026 # case insensitive, let's make it lowercase to improve readability.
46027 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46028 # Now convert it back to Unix-style (cygpath)
46029 input_path=`$CYGPATH -u "$shortmode_path"`
46030 new_path="$input_path"
46031 fi
46032 fi
46033
46034 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46035 if test "x$test_cygdrive_prefix" = x; then
46036 # As a simple fix, exclude /usr/bin since it's not a real path.
46037 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46038 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46039 # a path prefixed by /cygdrive for fixpath to work.
46040 new_path="$CYGWIN_ROOT_PATH$input_path"
46041 fi
46042 fi
46043
46044
46045 if test "x$path" != "x$new_path"; then
46046 POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46047 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46048 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46049 fi
46050
46051 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46052
46053 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46054 has_colon=`$ECHO $path | $GREP ^.:`
46055 new_path="$path"
46056 if test "x$has_colon" = x; then
46057 # Not in mixed or Windows style, start by that.
46058 new_path=`cmd //c echo $path`
46059 fi
46060
46061
46062 input_path="$new_path"
46063 # Check if we need to convert this using DOS-style short mode. If the path
46064 # contains just simple characters, use it. Otherwise (spaces, weird characters),
46065 # take no chances and rewrite it.
46066 # Note: m4 eats our [], so we need to use [ and ] instead.
46067 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46068 if test "x$has_forbidden_chars" != x; then
46069 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46070 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46071 fi
46072
46073
46074 windows_path="$new_path"
46075 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46076 unix_path=`$CYGPATH -u "$windows_path"`
46077 new_path="$unix_path"
46078 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46079 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46080 new_path="$unix_path"
46081 fi
46082
46083 if test "x$path" != "x$new_path"; then
46084 POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46085 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46086 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46087 fi
46088
46089 # Save the first 10 bytes of this path to the storage, so fixpath can work.
46090 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46091
46092 else
46093 # We're on a unix platform. Hooray! :)
46094 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46095 has_space=`$ECHO "$path" | $GREP " "`
46096 if test "x$has_space" != x; then
46097 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46098 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46099 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46100 fi
46101
46102 # Use eval to expand a potential ~
46103 eval path="$path"
46104 if test ! -f "$path" && test ! -d "$path"; then
46105 as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46106 fi
46107
46108 POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46109 fi
46110 fi
46111
46112
46113 # Only process if variable expands to non-empty
46114
46115 if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46116 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46117
46118 # Input might be given as Windows format, start by converting to
46119 # unix format.
46120 path="$POTENTIAL_FREETYPE_LIB_PATH"
46121 new_path=`$CYGPATH -u "$path"`
46122
46123 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46124 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46125 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46126 # "foo.exe" is OK but "foo" is an error.
46127 #
46128 # This test is therefore slightly more accurate than "test -f" to check for file precense.
46129 # It is also a way to make sure we got the proper file name for the real test later on.
46130 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46131 if test "x$test_shortpath" = x; then
46132 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46133 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46134 as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46135 fi
46136
46137 # Call helper function which possibly converts this using DOS-style short mode.
46138 # If so, the updated path is stored in $new_path.
46139
46140 input_path="$new_path"
46141 # Check if we need to convert this using DOS-style short mode. If the path
46142 # contains just simple characters, use it. Otherwise (spaces, weird characters),
46143 # take no chances and rewrite it.
46144 # Note: m4 eats our [], so we need to use [ and ] instead.
46145 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46146 if test "x$has_forbidden_chars" != x; then
46147 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46148 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46149 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46150 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46151 # Going to short mode and back again did indeed matter. Since short mode is
46152 # case insensitive, let's make it lowercase to improve readability.
46153 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46154 # Now convert it back to Unix-style (cygpath)
46155 input_path=`$CYGPATH -u "$shortmode_path"`
46156 new_path="$input_path"
46157 fi
46158 fi
46159
46160 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46161 if test "x$test_cygdrive_prefix" = x; then
46162 # As a simple fix, exclude /usr/bin since it's not a real path.
46163 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46164 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46165 # a path prefixed by /cygdrive for fixpath to work.
46166 new_path="$CYGWIN_ROOT_PATH$input_path"
46167 fi
46168 fi
46169
46170
46171 if test "x$path" != "x$new_path"; then
46172 POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46173 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46174 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46175 fi
46176
46177 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46178
46179 path="$POTENTIAL_FREETYPE_LIB_PATH"
46180 has_colon=`$ECHO $path | $GREP ^.:`
46181 new_path="$path"
46182 if test "x$has_colon" = x; then
46183 # Not in mixed or Windows style, start by that.
46184 new_path=`cmd //c echo $path`
46185 fi
46186
46187
46188 input_path="$new_path"
46189 # Check if we need to convert this using DOS-style short mode. If the path
46190 # contains just simple characters, use it. Otherwise (spaces, weird characters),
46191 # take no chances and rewrite it.
46192 # Note: m4 eats our [], so we need to use [ and ] instead.
46193 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46194 if test "x$has_forbidden_chars" != x; then
46195 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46196 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46197 fi
46198
46199
46200 windows_path="$new_path"
46201 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46202 unix_path=`$CYGPATH -u "$windows_path"`
46203 new_path="$unix_path"
46204 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46205 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46206 new_path="$unix_path"
46207 fi
46208
46209 if test "x$path" != "x$new_path"; then
46210 POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46211 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46212 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46213 fi
46214
46215 # Save the first 10 bytes of this path to the storage, so fixpath can work.
46216 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46217
46218 else
46219 # We're on a unix platform. Hooray! :)
46220 path="$POTENTIAL_FREETYPE_LIB_PATH"
46221 has_space=`$ECHO "$path" | $GREP " "`
46222 if test "x$has_space" != x; then
46223 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46224 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46225 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46226 fi
46227
46228 # Use eval to expand a potential ~
46229 eval path="$path"
46230 if test ! -f "$path" && test ! -d "$path"; then
46231 as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46232 fi
46233
46234 POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46235 fi
46236 fi
46237
46238
46239 FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46241 $as_echo_n "checking for freetype includes... " >&6; }
46242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46243 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46244 FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46246 $as_echo_n "checking for freetype libraries... " >&6; }
46247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46248 $as_echo "$FREETYPE_LIB_PATH" >&6; }
46249 fi
46250
46251 fi
46252 else
46253 FREETYPE_BASE_DIR="$SYSROOT/usr"
46254
46255 POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46256 POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46257 METHOD="well-known location"
46258
46259 # Let's start with an optimistic view of the world :-)
46260 FOUND_FREETYPE=yes
46261
46262 # First look for the canonical freetype main include file ft2build.h.
46263 if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46264 # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46265 POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46266 if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46267 # Fail.
46268 FOUND_FREETYPE=no
46269 fi
46270 fi
46271
46272 if test "x$FOUND_FREETYPE" = xyes; then
46273 # Include file found, let's continue the sanity check.
46274 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46275 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46276
46277 # Reset to default value
46278 FREETYPE_BASE_NAME=freetype
46279 FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46280 if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46281 if test "x$OPENJDK_TARGET_OS" = xmacosx \
46282 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46283 # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46284 # for the .6 version explicitly.
46285 FREETYPE_BASE_NAME=freetype.6
46286 FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46287 { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46288 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46289 else
46290 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46291 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46292 FOUND_FREETYPE=no
46293 fi
46294 else
46295 if test "x$OPENJDK_TARGET_OS" = xwindows; then
46296 # On Windows, we will need both .lib and .dll file.
46297 if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46298 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46299 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46300 FOUND_FREETYPE=no
46301 fi
46302 elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46303 && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46304 # Found lib in isa dir, use that instead.
46305 POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46306 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46307 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46308 fi
46309 fi
46310 fi
46311
46312 if test "x$FOUND_FREETYPE" = xyes; then
46313
46314 # Only process if variable expands to non-empty
46315
46316 if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46317 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46318
46319 # Input might be given as Windows format, start by converting to
46320 # unix format.
46321 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46322 new_path=`$CYGPATH -u "$path"`
46323
46324 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46325 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46326 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46327 # "foo.exe" is OK but "foo" is an error.
46328 #
46329 # This test is therefore slightly more accurate than "test -f" to check for file precense.
46330 # It is also a way to make sure we got the proper file name for the real test later on.
46331 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46332 if test "x$test_shortpath" = x; then
46333 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46334 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46335 as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46336 fi
46337
46338 # Call helper function which possibly converts this using DOS-style short mode.
46339 # If so, the updated path is stored in $new_path.
46340
46341 input_path="$new_path"
46342 # Check if we need to convert this using DOS-style short mode. If the path
46343 # contains just simple characters, use it. Otherwise (spaces, weird characters),
46344 # take no chances and rewrite it.
46345 # Note: m4 eats our [], so we need to use [ and ] instead.
46346 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46347 if test "x$has_forbidden_chars" != x; then
46348 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46349 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46350 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46351 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46352 # Going to short mode and back again did indeed matter. Since short mode is
46353 # case insensitive, let's make it lowercase to improve readability.
46354 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46355 # Now convert it back to Unix-style (cygpath)
46356 input_path=`$CYGPATH -u "$shortmode_path"`
46357 new_path="$input_path"
46358 fi
46359 fi
46360
46361 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46362 if test "x$test_cygdrive_prefix" = x; then
46363 # As a simple fix, exclude /usr/bin since it's not a real path.
46364 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46365 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46366 # a path prefixed by /cygdrive for fixpath to work.
46367 new_path="$CYGWIN_ROOT_PATH$input_path"
46368 fi
46369 fi
46370
46371
46372 if test "x$path" != "x$new_path"; then
46373 POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46374 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46375 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46376 fi
46377
46378 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46379
46380 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46381 has_colon=`$ECHO $path | $GREP ^.:`
46382 new_path="$path"
46383 if test "x$has_colon" = x; then
46384 # Not in mixed or Windows style, start by that.
46385 new_path=`cmd //c echo $path`
46386 fi
46387
46388
46389 input_path="$new_path"
46390 # Check if we need to convert this using DOS-style short mode. If the path
46391 # contains just simple characters, use it. Otherwise (spaces, weird characters),
46392 # take no chances and rewrite it.
46393 # Note: m4 eats our [], so we need to use [ and ] instead.
46394 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46395 if test "x$has_forbidden_chars" != x; then
46396 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46397 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46398 fi
46399
46400
46401 windows_path="$new_path"
46402 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46403 unix_path=`$CYGPATH -u "$windows_path"`
46404 new_path="$unix_path"
46405 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46406 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46407 new_path="$unix_path"
46408 fi
46409
46410 if test "x$path" != "x$new_path"; then
46411 POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46412 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46413 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46414 fi
46415
46416 # Save the first 10 bytes of this path to the storage, so fixpath can work.
46417 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46418
46419 else
46420 # We're on a unix platform. Hooray! :)
46421 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46422 has_space=`$ECHO "$path" | $GREP " "`
46423 if test "x$has_space" != x; then
46424 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46425 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46426 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46427 fi
46428
46429 # Use eval to expand a potential ~
46430 eval path="$path"
46431 if test ! -f "$path" && test ! -d "$path"; then
46432 as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46433 fi
46434
46435 POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46436 fi
46437 fi
46438
46439
46440 # Only process if variable expands to non-empty
46441
46442 if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46443 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46444
46445 # Input might be given as Windows format, start by converting to
46446 # unix format.
46447 path="$POTENTIAL_FREETYPE_LIB_PATH"
46448 new_path=`$CYGPATH -u "$path"`
46449
46450 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46451 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46452 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46453 # "foo.exe" is OK but "foo" is an error.
46454 #
46455 # This test is therefore slightly more accurate than "test -f" to check for file precense.
46456 # It is also a way to make sure we got the proper file name for the real test later on.
46457 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46458 if test "x$test_shortpath" = x; then
46459 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46460 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46461 as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46462 fi
46463
46464 # Call helper function which possibly converts this using DOS-style short mode.
46465 # If so, the updated path is stored in $new_path.
46466
46467 input_path="$new_path"
46468 # Check if we need to convert this using DOS-style short mode. If the path
46469 # contains just simple characters, use it. Otherwise (spaces, weird characters),
46470 # take no chances and rewrite it.
46471 # Note: m4 eats our [], so we need to use [ and ] instead.
46472 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46473 if test "x$has_forbidden_chars" != x; then
46474 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46475 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46476 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46477 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46478 # Going to short mode and back again did indeed matter. Since short mode is
46479 # case insensitive, let's make it lowercase to improve readability.
46480 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46481 # Now convert it back to Unix-style (cygpath)
46482 input_path=`$CYGPATH -u "$shortmode_path"`
46483 new_path="$input_path"
46484 fi
46485 fi
46486
46487 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46488 if test "x$test_cygdrive_prefix" = x; then
46489 # As a simple fix, exclude /usr/bin since it's not a real path.
46490 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46491 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46492 # a path prefixed by /cygdrive for fixpath to work.
46493 new_path="$CYGWIN_ROOT_PATH$input_path"
46494 fi
46495 fi
46496
46497
46498 if test "x$path" != "x$new_path"; then
46499 POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46500 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46501 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46502 fi
46503
46504 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46505
46506 path="$POTENTIAL_FREETYPE_LIB_PATH"
46507 has_colon=`$ECHO $path | $GREP ^.:`
46508 new_path="$path"
46509 if test "x$has_colon" = x; then
46510 # Not in mixed or Windows style, start by that.
46511 new_path=`cmd //c echo $path`
46512 fi
46513
46514
46515 input_path="$new_path"
46516 # Check if we need to convert this using DOS-style short mode. If the path
46517 # contains just simple characters, use it. Otherwise (spaces, weird characters),
46518 # take no chances and rewrite it.
46519 # Note: m4 eats our [], so we need to use [ and ] instead.
46520 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46521 if test "x$has_forbidden_chars" != x; then
46522 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46523 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46524 fi
46525
46526
46527 windows_path="$new_path"
46528 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46529 unix_path=`$CYGPATH -u "$windows_path"`
46530 new_path="$unix_path"
46531 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46532 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46533 new_path="$unix_path"
46534 fi
46535
46536 if test "x$path" != "x$new_path"; then
46537 POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46538 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46539 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46540 fi
46541
46542 # Save the first 10 bytes of this path to the storage, so fixpath can work.
46543 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46544
46545 else
46546 # We're on a unix platform. Hooray! :)
46547 path="$POTENTIAL_FREETYPE_LIB_PATH"
46548 has_space=`$ECHO "$path" | $GREP " "`
46549 if test "x$has_space" != x; then
46550 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46551 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46552 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46553 fi
46554
46555 # Use eval to expand a potential ~
46556 eval path="$path"
46557 if test ! -f "$path" && test ! -d "$path"; then
46558 as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46559 fi
46560
46561 POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46562 fi
46563 fi
46564
46565
46566 FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46568 $as_echo_n "checking for freetype includes... " >&6; }
46569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46570 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46571 FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46573 $as_echo_n "checking for freetype libraries... " >&6; }
46574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46575 $as_echo "$FREETYPE_LIB_PATH" >&6; }
46576 fi
46577
46578
46579 if test "x$FOUND_FREETYPE" != xyes; then
46580 FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
46581
46582 POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46583 POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46584 METHOD="well-known location"
46585
46586 # Let's start with an optimistic view of the world :-)
46587 FOUND_FREETYPE=yes
46588
46589 # First look for the canonical freetype main include file ft2build.h.
46590 if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46591 # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46592 POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46593 if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46594 # Fail.
46595 FOUND_FREETYPE=no
46596 fi
46597 fi
46598
46599 if test "x$FOUND_FREETYPE" = xyes; then
46600 # Include file found, let's continue the sanity check.
46601 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46602 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46603
46604 # Reset to default value
46605 FREETYPE_BASE_NAME=freetype
46606 FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46607 if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46608 if test "x$OPENJDK_TARGET_OS" = xmacosx \
46609 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46610 # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46611 # for the .6 version explicitly.
46612 FREETYPE_BASE_NAME=freetype.6
46613 FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46614 { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46615 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46616 else
46617 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46618 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46619 FOUND_FREETYPE=no
46620 fi
46621 else
46622 if test "x$OPENJDK_TARGET_OS" = xwindows; then
46623 # On Windows, we will need both .lib and .dll file.
46624 if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46625 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46626 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46627 FOUND_FREETYPE=no
46628 fi
46629 elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46630 && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46631 # Found lib in isa dir, use that instead.
46632 POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46633 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46634 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46635 fi
46636 fi
46637 fi
46638
46639 if test "x$FOUND_FREETYPE" = xyes; then
46640
46641 # Only process if variable expands to non-empty
46642
46643 if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46644 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46645
46646 # Input might be given as Windows format, start by converting to
46647 # unix format.
46648 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46649 new_path=`$CYGPATH -u "$path"`
46650
46651 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46652 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46653 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46654 # "foo.exe" is OK but "foo" is an error.
46655 #
46656 # This test is therefore slightly more accurate than "test -f" to check for file precense.
46657 # It is also a way to make sure we got the proper file name for the real test later on.
46658 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46659 if test "x$test_shortpath" = x; then
46660 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46661 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46662 as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46663 fi
46664
46665 # Call helper function which possibly converts this using DOS-style short mode.
46666 # If so, the updated path is stored in $new_path.
46667
46668 input_path="$new_path"
46669 # Check if we need to convert this using DOS-style short mode. If the path
46670 # contains just simple characters, use it. Otherwise (spaces, weird characters),
46671 # take no chances and rewrite it.
46672 # Note: m4 eats our [], so we need to use [ and ] instead.
46673 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46674 if test "x$has_forbidden_chars" != x; then
46675 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46676 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46677 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46678 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46679 # Going to short mode and back again did indeed matter. Since short mode is
46680 # case insensitive, let's make it lowercase to improve readability.
46681 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46682 # Now convert it back to Unix-style (cygpath)
46683 input_path=`$CYGPATH -u "$shortmode_path"`
46684 new_path="$input_path"
46685 fi
46686 fi
46687
46688 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46689 if test "x$test_cygdrive_prefix" = x; then
46690 # As a simple fix, exclude /usr/bin since it's not a real path.
46691 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46692 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46693 # a path prefixed by /cygdrive for fixpath to work.
46694 new_path="$CYGWIN_ROOT_PATH$input_path"
46695 fi
46696 fi
46697
46698
46699 if test "x$path" != "x$new_path"; then
46700 POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46701 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46702 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46703 fi
46704
46705 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46706
46707 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46708 has_colon=`$ECHO $path | $GREP ^.:`
46709 new_path="$path"
46710 if test "x$has_colon" = x; then
46711 # Not in mixed or Windows style, start by that.
46712 new_path=`cmd //c echo $path`
46713 fi
46714
46715
46716 input_path="$new_path"
46717 # Check if we need to convert this using DOS-style short mode. If the path
46718 # contains just simple characters, use it. Otherwise (spaces, weird characters),
46719 # take no chances and rewrite it.
46720 # Note: m4 eats our [], so we need to use [ and ] instead.
46721 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46722 if test "x$has_forbidden_chars" != x; then
46723 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46724 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46725 fi
46726
46727
46728 windows_path="$new_path"
46729 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46730 unix_path=`$CYGPATH -u "$windows_path"`
46731 new_path="$unix_path"
46732 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46733 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46734 new_path="$unix_path"
46735 fi
46736
46737 if test "x$path" != "x$new_path"; then
46738 POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46739 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46740 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46741 fi
46742
46743 # Save the first 10 bytes of this path to the storage, so fixpath can work.
46744 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46745
46746 else
46747 # We're on a unix platform. Hooray! :)
46748 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46749 has_space=`$ECHO "$path" | $GREP " "`
46750 if test "x$has_space" != x; then
46751 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46752 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46753 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46754 fi
46755
46756 # Use eval to expand a potential ~
46757 eval path="$path"
46758 if test ! -f "$path" && test ! -d "$path"; then
46759 as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46760 fi
46761
46762 POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46763 fi
46764 fi
46765
46766
46767 # Only process if variable expands to non-empty
46768
46769 if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46770 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46771
46772 # Input might be given as Windows format, start by converting to
46773 # unix format.
46774 path="$POTENTIAL_FREETYPE_LIB_PATH"
46775 new_path=`$CYGPATH -u "$path"`
46776
46777 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46778 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46779 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46780 # "foo.exe" is OK but "foo" is an error.
46781 #
46782 # This test is therefore slightly more accurate than "test -f" to check for file precense.
46783 # It is also a way to make sure we got the proper file name for the real test later on.
46784 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46785 if test "x$test_shortpath" = x; then
46786 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46787 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46788 as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46789 fi
46790
46791 # Call helper function which possibly converts this using DOS-style short mode.
46792 # If so, the updated path is stored in $new_path.
46793
46794 input_path="$new_path"
46795 # Check if we need to convert this using DOS-style short mode. If the path
46796 # contains just simple characters, use it. Otherwise (spaces, weird characters),
46797 # take no chances and rewrite it.
46798 # Note: m4 eats our [], so we need to use [ and ] instead.
46799 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46800 if test "x$has_forbidden_chars" != x; then
46801 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46802 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46803 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46804 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46805 # Going to short mode and back again did indeed matter. Since short mode is
46806 # case insensitive, let's make it lowercase to improve readability.
46807 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46808 # Now convert it back to Unix-style (cygpath)
46809 input_path=`$CYGPATH -u "$shortmode_path"`
46810 new_path="$input_path"
46811 fi
46812 fi
46813
46814 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46815 if test "x$test_cygdrive_prefix" = x; then
46816 # As a simple fix, exclude /usr/bin since it's not a real path.
46817 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46818 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46819 # a path prefixed by /cygdrive for fixpath to work.
46820 new_path="$CYGWIN_ROOT_PATH$input_path"
46821 fi
46822 fi
46823
46824
46825 if test "x$path" != "x$new_path"; then
46826 POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46827 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46828 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46829 fi
46830
46831 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46832
46833 path="$POTENTIAL_FREETYPE_LIB_PATH"
46834 has_colon=`$ECHO $path | $GREP ^.:`
46835 new_path="$path"
46836 if test "x$has_colon" = x; then
46837 # Not in mixed or Windows style, start by that.
46838 new_path=`cmd //c echo $path`
46839 fi
46840
46841
46842 input_path="$new_path"
46843 # Check if we need to convert this using DOS-style short mode. If the path
46844 # contains just simple characters, use it. Otherwise (spaces, weird characters),
46845 # take no chances and rewrite it.
46846 # Note: m4 eats our [], so we need to use [ and ] instead.
46847 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46848 if test "x$has_forbidden_chars" != x; then
46849 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46850 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46851 fi
46852
46853
46854 windows_path="$new_path"
46855 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46856 unix_path=`$CYGPATH -u "$windows_path"`
46857 new_path="$unix_path"
46858 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46859 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46860 new_path="$unix_path"
46861 fi
46862
46863 if test "x$path" != "x$new_path"; then
46864 POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46865 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46866 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46867 fi
46868
46869 # Save the first 10 bytes of this path to the storage, so fixpath can work.
46870 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46871
46872 else
46873 # We're on a unix platform. Hooray! :)
46874 path="$POTENTIAL_FREETYPE_LIB_PATH"
46875 has_space=`$ECHO "$path" | $GREP " "`
46876 if test "x$has_space" != x; then
46877 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46878 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46879 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46880 fi
46881
46882 # Use eval to expand a potential ~
46883 eval path="$path"
46884 if test ! -f "$path" && test ! -d "$path"; then
46885 as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46886 fi
46887
46888 POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46889 fi
46890 fi
46891
46892
46893 FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46895 $as_echo_n "checking for freetype includes... " >&6; }
46896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46897 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46898 FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46900 $as_echo_n "checking for freetype libraries... " >&6; }
46901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46902 $as_echo "$FREETYPE_LIB_PATH" >&6; }
46903 fi
46904
46905 fi
46906
46907 if test "x$FOUND_FREETYPE" != xyes; then
46908 FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
46909
46910 POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46911 POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46912 METHOD="well-known location"
46913
46914 # Let's start with an optimistic view of the world :-)
46915 FOUND_FREETYPE=yes
46916
46917 # First look for the canonical freetype main include file ft2build.h.
46918 if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46919 # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46920 POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46921 if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46922 # Fail.
46923 FOUND_FREETYPE=no
46924 fi
46925 fi
46926
46927 if test "x$FOUND_FREETYPE" = xyes; then
46928 # Include file found, let's continue the sanity check.
46929 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46930 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46931
46932 # Reset to default value
46933 FREETYPE_BASE_NAME=freetype
46934 FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46935 if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46936 if test "x$OPENJDK_TARGET_OS" = xmacosx \
46937 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46938 # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46939 # for the .6 version explicitly.
46940 FREETYPE_BASE_NAME=freetype.6
46941 FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46942 { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46943 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46944 else
46945 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46946 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46947 FOUND_FREETYPE=no
46948 fi
46949 else
46950 if test "x$OPENJDK_TARGET_OS" = xwindows; then
46951 # On Windows, we will need both .lib and .dll file.
46952 if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46953 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46954 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46955 FOUND_FREETYPE=no
46956 fi
46957 elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46958 && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46959 # Found lib in isa dir, use that instead.
46960 POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46961 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46962 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46963 fi
46964 fi
46965 fi
46966
46967 if test "x$FOUND_FREETYPE" = xyes; then
46968
46969 # Only process if variable expands to non-empty
46970
46971 if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46972 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46973
46974 # Input might be given as Windows format, start by converting to
46975 # unix format.
46976 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46977 new_path=`$CYGPATH -u "$path"`
46978
46979 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46980 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46981 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46982 # "foo.exe" is OK but "foo" is an error.
46983 #
46984 # This test is therefore slightly more accurate than "test -f" to check for file precense.
46985 # It is also a way to make sure we got the proper file name for the real test later on.
46986 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46987 if test "x$test_shortpath" = x; then
46988 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46989 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46990 as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46991 fi
46992
46993 # Call helper function which possibly converts this using DOS-style short mode.
46994 # If so, the updated path is stored in $new_path.
46995
46996 input_path="$new_path"
46997 # Check if we need to convert this using DOS-style short mode. If the path
46998 # contains just simple characters, use it. Otherwise (spaces, weird characters),
46999 # take no chances and rewrite it.
47000 # Note: m4 eats our [], so we need to use [ and ] instead.
47001 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47002 if test "x$has_forbidden_chars" != x; then
47003 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47004 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47005 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47006 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47007 # Going to short mode and back again did indeed matter. Since short mode is
47008 # case insensitive, let's make it lowercase to improve readability.
47009 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47010 # Now convert it back to Unix-style (cygpath)
47011 input_path=`$CYGPATH -u "$shortmode_path"`
47012 new_path="$input_path"
47013 fi
47014 fi
47015
47016 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47017 if test "x$test_cygdrive_prefix" = x; then
47018 # As a simple fix, exclude /usr/bin since it's not a real path.
47019 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47020 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47021 # a path prefixed by /cygdrive for fixpath to work.
47022 new_path="$CYGWIN_ROOT_PATH$input_path"
47023 fi
47024 fi
47025
47026
47027 if test "x$path" != "x$new_path"; then
47028 POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47029 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47030 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47031 fi
47032
47033 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47034
47035 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47036 has_colon=`$ECHO $path | $GREP ^.:`
47037 new_path="$path"
47038 if test "x$has_colon" = x; then
47039 # Not in mixed or Windows style, start by that.
47040 new_path=`cmd //c echo $path`
47041 fi
47042
47043
47044 input_path="$new_path"
47045 # Check if we need to convert this using DOS-style short mode. If the path
47046 # contains just simple characters, use it. Otherwise (spaces, weird characters),
47047 # take no chances and rewrite it.
47048 # Note: m4 eats our [], so we need to use [ and ] instead.
47049 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47050 if test "x$has_forbidden_chars" != x; then
47051 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47052 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47053 fi
47054
47055
47056 windows_path="$new_path"
47057 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47058 unix_path=`$CYGPATH -u "$windows_path"`
47059 new_path="$unix_path"
47060 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47061 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47062 new_path="$unix_path"
47063 fi
47064
47065 if test "x$path" != "x$new_path"; then
47066 POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47067 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47068 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47069 fi
47070
47071 # Save the first 10 bytes of this path to the storage, so fixpath can work.
47072 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47073
47074 else
47075 # We're on a unix platform. Hooray! :)
47076 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47077 has_space=`$ECHO "$path" | $GREP " "`
47078 if test "x$has_space" != x; then
47079 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47080 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47081 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47082 fi
47083
47084 # Use eval to expand a potential ~
47085 eval path="$path"
47086 if test ! -f "$path" && test ! -d "$path"; then
47087 as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47088 fi
47089
47090 POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47091 fi
47092 fi
47093
47094
47095 # Only process if variable expands to non-empty
47096
47097 if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47098 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47099
47100 # Input might be given as Windows format, start by converting to
47101 # unix format.
47102 path="$POTENTIAL_FREETYPE_LIB_PATH"
47103 new_path=`$CYGPATH -u "$path"`
47104
47105 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47106 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47107 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47108 # "foo.exe" is OK but "foo" is an error.
47109 #
47110 # This test is therefore slightly more accurate than "test -f" to check for file precense.
47111 # It is also a way to make sure we got the proper file name for the real test later on.
47112 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47113 if test "x$test_shortpath" = x; then
47114 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47115 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47116 as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47117 fi
47118
47119 # Call helper function which possibly converts this using DOS-style short mode.
47120 # If so, the updated path is stored in $new_path.
47121
47122 input_path="$new_path"
47123 # Check if we need to convert this using DOS-style short mode. If the path
47124 # contains just simple characters, use it. Otherwise (spaces, weird characters),
47125 # take no chances and rewrite it.
47126 # Note: m4 eats our [], so we need to use [ and ] instead.
47127 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47128 if test "x$has_forbidden_chars" != x; then
47129 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47130 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47131 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47132 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47133 # Going to short mode and back again did indeed matter. Since short mode is
47134 # case insensitive, let's make it lowercase to improve readability.
47135 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47136 # Now convert it back to Unix-style (cygpath)
47137 input_path=`$CYGPATH -u "$shortmode_path"`
47138 new_path="$input_path"
47139 fi
47140 fi
47141
47142 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47143 if test "x$test_cygdrive_prefix" = x; then
47144 # As a simple fix, exclude /usr/bin since it's not a real path.
47145 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47146 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47147 # a path prefixed by /cygdrive for fixpath to work.
47148 new_path="$CYGWIN_ROOT_PATH$input_path"
47149 fi
47150 fi
47151
47152
47153 if test "x$path" != "x$new_path"; then
47154 POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47155 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47156 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47157 fi
47158
47159 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47160
47161 path="$POTENTIAL_FREETYPE_LIB_PATH"
47162 has_colon=`$ECHO $path | $GREP ^.:`
47163 new_path="$path"
47164 if test "x$has_colon" = x; then
47165 # Not in mixed or Windows style, start by that.
47166 new_path=`cmd //c echo $path`
47167 fi
47168
47169
47170 input_path="$new_path"
47171 # Check if we need to convert this using DOS-style short mode. If the path
47172 # contains just simple characters, use it. Otherwise (spaces, weird characters),
47173 # take no chances and rewrite it.
47174 # Note: m4 eats our [], so we need to use [ and ] instead.
47175 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47176 if test "x$has_forbidden_chars" != x; then
47177 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47178 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47179 fi
47180
47181
47182 windows_path="$new_path"
47183 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47184 unix_path=`$CYGPATH -u "$windows_path"`
47185 new_path="$unix_path"
47186 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47187 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47188 new_path="$unix_path"
47189 fi
47190
47191 if test "x$path" != "x$new_path"; then
47192 POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47193 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47194 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47195 fi
47196
47197 # Save the first 10 bytes of this path to the storage, so fixpath can work.
47198 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47199
47200 else
47201 # We're on a unix platform. Hooray! :)
47202 path="$POTENTIAL_FREETYPE_LIB_PATH"
47203 has_space=`$ECHO "$path" | $GREP " "`
47204 if test "x$has_space" != x; then
47205 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47206 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47207 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47208 fi
47209
47210 # Use eval to expand a potential ~
47211 eval path="$path"
47212 if test ! -f "$path" && test ! -d "$path"; then
47213 as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47214 fi
47215
47216 POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47217 fi
47218 fi
47219
47220
47221 FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47223 $as_echo_n "checking for freetype includes... " >&6; }
47224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47225 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47226 FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47228 $as_echo_n "checking for freetype libraries... " >&6; }
47229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47230 $as_echo "$FREETYPE_LIB_PATH" >&6; }
47231 fi
47232
47233 fi
47234
47235 if test "x$FOUND_FREETYPE" != xyes; then
47236 FREETYPE_BASE_DIR="$SYSROOT/usr"
47237 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47238
47239 POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47240 POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
47241 METHOD="well-known location"
47242
47243 # Let's start with an optimistic view of the world :-)
47244 FOUND_FREETYPE=yes
47245
47246 # First look for the canonical freetype main include file ft2build.h.
47247 if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47248 # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47249 POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47250 if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47251 # Fail.
47252 FOUND_FREETYPE=no
47253 fi
47254 fi
47255
47256 if test "x$FOUND_FREETYPE" = xyes; then
47257 # Include file found, let's continue the sanity check.
47258 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47259 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47260
47261 # Reset to default value
47262 FREETYPE_BASE_NAME=freetype
47263 FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47264 if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47265 if test "x$OPENJDK_TARGET_OS" = xmacosx \
47266 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47267 # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47268 # for the .6 version explicitly.
47269 FREETYPE_BASE_NAME=freetype.6
47270 FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47271 { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47272 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47273 else
47274 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47275 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47276 FOUND_FREETYPE=no
47277 fi
47278 else
47279 if test "x$OPENJDK_TARGET_OS" = xwindows; then
47280 # On Windows, we will need both .lib and .dll file.
47281 if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47282 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47283 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47284 FOUND_FREETYPE=no
47285 fi
47286 elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47287 && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47288 # Found lib in isa dir, use that instead.
47289 POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47290 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47291 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47292 fi
47293 fi
47294 fi
47295
47296 if test "x$FOUND_FREETYPE" = xyes; then
47297
47298 # Only process if variable expands to non-empty
47299
47300 if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47301 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47302
47303 # Input might be given as Windows format, start by converting to
47304 # unix format.
47305 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47306 new_path=`$CYGPATH -u "$path"`
47307
47308 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47309 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47310 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47311 # "foo.exe" is OK but "foo" is an error.
47312 #
47313 # This test is therefore slightly more accurate than "test -f" to check for file precense.
47314 # It is also a way to make sure we got the proper file name for the real test later on.
47315 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47316 if test "x$test_shortpath" = x; then
47317 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47318 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47319 as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47320 fi
47321
47322 # Call helper function which possibly converts this using DOS-style short mode.
47323 # If so, the updated path is stored in $new_path.
47324
47325 input_path="$new_path"
47326 # Check if we need to convert this using DOS-style short mode. If the path
47327 # contains just simple characters, use it. Otherwise (spaces, weird characters),
47328 # take no chances and rewrite it.
47329 # Note: m4 eats our [], so we need to use [ and ] instead.
47330 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47331 if test "x$has_forbidden_chars" != x; then
47332 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47333 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47334 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47335 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47336 # Going to short mode and back again did indeed matter. Since short mode is
47337 # case insensitive, let's make it lowercase to improve readability.
47338 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47339 # Now convert it back to Unix-style (cygpath)
47340 input_path=`$CYGPATH -u "$shortmode_path"`
47341 new_path="$input_path"
47342 fi
47343 fi
47344
47345 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47346 if test "x$test_cygdrive_prefix" = x; then
47347 # As a simple fix, exclude /usr/bin since it's not a real path.
47348 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47349 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47350 # a path prefixed by /cygdrive for fixpath to work.
47351 new_path="$CYGWIN_ROOT_PATH$input_path"
47352 fi
47353 fi
47354
47355
47356 if test "x$path" != "x$new_path"; then
47357 POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47358 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47359 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47360 fi
47361
47362 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47363
47364 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47365 has_colon=`$ECHO $path | $GREP ^.:`
47366 new_path="$path"
47367 if test "x$has_colon" = x; then
47368 # Not in mixed or Windows style, start by that.
47369 new_path=`cmd //c echo $path`
47370 fi
47371
47372
47373 input_path="$new_path"
47374 # Check if we need to convert this using DOS-style short mode. If the path
47375 # contains just simple characters, use it. Otherwise (spaces, weird characters),
47376 # take no chances and rewrite it.
47377 # Note: m4 eats our [], so we need to use [ and ] instead.
47378 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47379 if test "x$has_forbidden_chars" != x; then
47380 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47381 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47382 fi
47383
47384
47385 windows_path="$new_path"
47386 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47387 unix_path=`$CYGPATH -u "$windows_path"`
47388 new_path="$unix_path"
47389 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47390 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47391 new_path="$unix_path"
47392 fi
47393
47394 if test "x$path" != "x$new_path"; then
47395 POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47396 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47397 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47398 fi
47399
47400 # Save the first 10 bytes of this path to the storage, so fixpath can work.
47401 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47402
47403 else
47404 # We're on a unix platform. Hooray! :)
47405 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47406 has_space=`$ECHO "$path" | $GREP " "`
47407 if test "x$has_space" != x; then
47408 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47409 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47410 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47411 fi
47412
47413 # Use eval to expand a potential ~
47414 eval path="$path"
47415 if test ! -f "$path" && test ! -d "$path"; then
47416 as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47417 fi
47418
47419 POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47420 fi
47421 fi
47422
47423
47424 # Only process if variable expands to non-empty
47425
47426 if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47427 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47428
47429 # Input might be given as Windows format, start by converting to
47430 # unix format.
47431 path="$POTENTIAL_FREETYPE_LIB_PATH"
47432 new_path=`$CYGPATH -u "$path"`
47433
47434 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47435 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47436 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47437 # "foo.exe" is OK but "foo" is an error.
47438 #
47439 # This test is therefore slightly more accurate than "test -f" to check for file precense.
47440 # It is also a way to make sure we got the proper file name for the real test later on.
47441 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47442 if test "x$test_shortpath" = x; then
47443 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47444 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47445 as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47446 fi
47447
47448 # Call helper function which possibly converts this using DOS-style short mode.
47449 # If so, the updated path is stored in $new_path.
47450
47451 input_path="$new_path"
47452 # Check if we need to convert this using DOS-style short mode. If the path
47453 # contains just simple characters, use it. Otherwise (spaces, weird characters),
47454 # take no chances and rewrite it.
47455 # Note: m4 eats our [], so we need to use [ and ] instead.
47456 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47457 if test "x$has_forbidden_chars" != x; then
47458 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47459 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47460 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47461 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47462 # Going to short mode and back again did indeed matter. Since short mode is
47463 # case insensitive, let's make it lowercase to improve readability.
47464 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47465 # Now convert it back to Unix-style (cygpath)
47466 input_path=`$CYGPATH -u "$shortmode_path"`
47467 new_path="$input_path"
47468 fi
47469 fi
47470
47471 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47472 if test "x$test_cygdrive_prefix" = x; then
47473 # As a simple fix, exclude /usr/bin since it's not a real path.
47474 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47475 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47476 # a path prefixed by /cygdrive for fixpath to work.
47477 new_path="$CYGWIN_ROOT_PATH$input_path"
47478 fi
47479 fi
47480
47481
47482 if test "x$path" != "x$new_path"; then
47483 POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47484 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47485 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47486 fi
47487
47488 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47489
47490 path="$POTENTIAL_FREETYPE_LIB_PATH"
47491 has_colon=`$ECHO $path | $GREP ^.:`
47492 new_path="$path"
47493 if test "x$has_colon" = x; then
47494 # Not in mixed or Windows style, start by that.
47495 new_path=`cmd //c echo $path`
47496 fi
47497
47498
47499 input_path="$new_path"
47500 # Check if we need to convert this using DOS-style short mode. If the path
47501 # contains just simple characters, use it. Otherwise (spaces, weird characters),
47502 # take no chances and rewrite it.
47503 # Note: m4 eats our [], so we need to use [ and ] instead.
47504 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47505 if test "x$has_forbidden_chars" != x; then
47506 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47507 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47508 fi
47509
47510
47511 windows_path="$new_path"
47512 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47513 unix_path=`$CYGPATH -u "$windows_path"`
47514 new_path="$unix_path"
47515 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47516 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47517 new_path="$unix_path"
47518 fi
47519
47520 if test "x$path" != "x$new_path"; then
47521 POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47522 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47523 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47524 fi
47525
47526 # Save the first 10 bytes of this path to the storage, so fixpath can work.
47527 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47528
47529 else
47530 # We're on a unix platform. Hooray! :)
47531 path="$POTENTIAL_FREETYPE_LIB_PATH"
47532 has_space=`$ECHO "$path" | $GREP " "`
47533 if test "x$has_space" != x; then
47534 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47535 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47536 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47537 fi
47538
47539 # Use eval to expand a potential ~
47540 eval path="$path"
47541 if test ! -f "$path" && test ! -d "$path"; then
47542 as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47543 fi
47544
47545 POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47546 fi
47547 fi
47548
47549
47550 FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47552 $as_echo_n "checking for freetype includes... " >&6; }
47553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47554 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47555 FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47557 $as_echo_n "checking for freetype libraries... " >&6; }
47558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47559 $as_echo "$FREETYPE_LIB_PATH" >&6; }
47560 fi
47561
47562 else
47563
47564 POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47565 POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
47566 METHOD="well-known location"
47567
47568 # Let's start with an optimistic view of the world :-)
47569 FOUND_FREETYPE=yes
47570
47571 # First look for the canonical freetype main include file ft2build.h.
47572 if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47573 # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47574 POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47575 if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47576 # Fail.
47577 FOUND_FREETYPE=no
47578 fi
47579 fi
47580
47581 if test "x$FOUND_FREETYPE" = xyes; then
47582 # Include file found, let's continue the sanity check.
47583 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47584 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47585
47586 # Reset to default value
47587 FREETYPE_BASE_NAME=freetype
47588 FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47589 if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47590 if test "x$OPENJDK_TARGET_OS" = xmacosx \
47591 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47592 # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47593 # for the .6 version explicitly.
47594 FREETYPE_BASE_NAME=freetype.6
47595 FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47596 { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47597 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47598 else
47599 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47600 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47601 FOUND_FREETYPE=no
47602 fi
47603 else
47604 if test "x$OPENJDK_TARGET_OS" = xwindows; then
47605 # On Windows, we will need both .lib and .dll file.
47606 if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47607 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47608 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47609 FOUND_FREETYPE=no
47610 fi
47611 elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47612 && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47613 # Found lib in isa dir, use that instead.
47614 POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47615 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47616 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47617 fi
47618 fi
47619 fi
47620
47621 if test "x$FOUND_FREETYPE" = xyes; then
47622
47623 # Only process if variable expands to non-empty
47624
47625 if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47626 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47627
47628 # Input might be given as Windows format, start by converting to
47629 # unix format.
47630 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47631 new_path=`$CYGPATH -u "$path"`
47632
47633 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47634 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47635 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47636 # "foo.exe" is OK but "foo" is an error.
47637 #
47638 # This test is therefore slightly more accurate than "test -f" to check for file precense.
47639 # It is also a way to make sure we got the proper file name for the real test later on.
47640 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47641 if test "x$test_shortpath" = x; then
47642 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47643 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47644 as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47645 fi
47646
47647 # Call helper function which possibly converts this using DOS-style short mode.
47648 # If so, the updated path is stored in $new_path.
47649
47650 input_path="$new_path"
47651 # Check if we need to convert this using DOS-style short mode. If the path
47652 # contains just simple characters, use it. Otherwise (spaces, weird characters),
47653 # take no chances and rewrite it.
47654 # Note: m4 eats our [], so we need to use [ and ] instead.
47655 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47656 if test "x$has_forbidden_chars" != x; then
47657 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47658 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47659 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47660 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47661 # Going to short mode and back again did indeed matter. Since short mode is
47662 # case insensitive, let's make it lowercase to improve readability.
47663 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47664 # Now convert it back to Unix-style (cygpath)
47665 input_path=`$CYGPATH -u "$shortmode_path"`
47666 new_path="$input_path"
47667 fi
47668 fi
47669
47670 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47671 if test "x$test_cygdrive_prefix" = x; then
47672 # As a simple fix, exclude /usr/bin since it's not a real path.
47673 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47674 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47675 # a path prefixed by /cygdrive for fixpath to work.
47676 new_path="$CYGWIN_ROOT_PATH$input_path"
47677 fi
47678 fi
47679
47680
47681 if test "x$path" != "x$new_path"; then
47682 POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47683 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47684 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47685 fi
47686
47687 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47688
47689 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47690 has_colon=`$ECHO $path | $GREP ^.:`
47691 new_path="$path"
47692 if test "x$has_colon" = x; then
47693 # Not in mixed or Windows style, start by that.
47694 new_path=`cmd //c echo $path`
47695 fi
47696
47697
47698 input_path="$new_path"
47699 # Check if we need to convert this using DOS-style short mode. If the path
47700 # contains just simple characters, use it. Otherwise (spaces, weird characters),
47701 # take no chances and rewrite it.
47702 # Note: m4 eats our [], so we need to use [ and ] instead.
47703 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47704 if test "x$has_forbidden_chars" != x; then
47705 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47706 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47707 fi
47708
47709
47710 windows_path="$new_path"
47711 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47712 unix_path=`$CYGPATH -u "$windows_path"`
47713 new_path="$unix_path"
47714 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47715 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47716 new_path="$unix_path"
47717 fi
47718
47719 if test "x$path" != "x$new_path"; then
47720 POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47721 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47722 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47723 fi
47724
47725 # Save the first 10 bytes of this path to the storage, so fixpath can work.
47726 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47727
47728 else
47729 # We're on a unix platform. Hooray! :)
47730 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47731 has_space=`$ECHO "$path" | $GREP " "`
47732 if test "x$has_space" != x; then
47733 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47734 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47735 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47736 fi
47737
47738 # Use eval to expand a potential ~
47739 eval path="$path"
47740 if test ! -f "$path" && test ! -d "$path"; then
47741 as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47742 fi
47743
47744 POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47745 fi
47746 fi
47747
47748
47749 # Only process if variable expands to non-empty
47750
47751 if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47752 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47753
47754 # Input might be given as Windows format, start by converting to
47755 # unix format.
47756 path="$POTENTIAL_FREETYPE_LIB_PATH"
47757 new_path=`$CYGPATH -u "$path"`
47758
47759 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47760 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47761 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47762 # "foo.exe" is OK but "foo" is an error.
47763 #
47764 # This test is therefore slightly more accurate than "test -f" to check for file precense.
47765 # It is also a way to make sure we got the proper file name for the real test later on.
47766 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47767 if test "x$test_shortpath" = x; then
47768 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47769 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47770 as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47771 fi
47772
47773 # Call helper function which possibly converts this using DOS-style short mode.
47774 # If so, the updated path is stored in $new_path.
47775
47776 input_path="$new_path"
47777 # Check if we need to convert this using DOS-style short mode. If the path
47778 # contains just simple characters, use it. Otherwise (spaces, weird characters),
47779 # take no chances and rewrite it.
47780 # Note: m4 eats our [], so we need to use [ and ] instead.
47781 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47782 if test "x$has_forbidden_chars" != x; then
47783 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47784 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47785 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47786 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47787 # Going to short mode and back again did indeed matter. Since short mode is
47788 # case insensitive, let's make it lowercase to improve readability.
47789 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47790 # Now convert it back to Unix-style (cygpath)
47791 input_path=`$CYGPATH -u "$shortmode_path"`
47792 new_path="$input_path"
47793 fi
47794 fi
47795
47796 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47797 if test "x$test_cygdrive_prefix" = x; then
47798 # As a simple fix, exclude /usr/bin since it's not a real path.
47799 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47800 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47801 # a path prefixed by /cygdrive for fixpath to work.
47802 new_path="$CYGWIN_ROOT_PATH$input_path"
47803 fi
47804 fi
47805
47806
47807 if test "x$path" != "x$new_path"; then
47808 POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47809 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47810 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47811 fi
47812
47813 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47814
47815 path="$POTENTIAL_FREETYPE_LIB_PATH"
47816 has_colon=`$ECHO $path | $GREP ^.:`
47817 new_path="$path"
47818 if test "x$has_colon" = x; then
47819 # Not in mixed or Windows style, start by that.
47820 new_path=`cmd //c echo $path`
47821 fi
47822
47823
47824 input_path="$new_path"
47825 # Check if we need to convert this using DOS-style short mode. If the path
47826 # contains just simple characters, use it. Otherwise (spaces, weird characters),
47827 # take no chances and rewrite it.
47828 # Note: m4 eats our [], so we need to use [ and ] instead.
47829 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47830 if test "x$has_forbidden_chars" != x; then
47831 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47832 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47833 fi
47834
47835
47836 windows_path="$new_path"
47837 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47838 unix_path=`$CYGPATH -u "$windows_path"`
47839 new_path="$unix_path"
47840 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47841 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47842 new_path="$unix_path"
47843 fi
47844
47845 if test "x$path" != "x$new_path"; then
47846 POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47847 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47848 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47849 fi
47850
47851 # Save the first 10 bytes of this path to the storage, so fixpath can work.
47852 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47853
47854 else
47855 # We're on a unix platform. Hooray! :)
47856 path="$POTENTIAL_FREETYPE_LIB_PATH"
47857 has_space=`$ECHO "$path" | $GREP " "`
47858 if test "x$has_space" != x; then
47859 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47860 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47861 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47862 fi
47863
47864 # Use eval to expand a potential ~
47865 eval path="$path"
47866 if test ! -f "$path" && test ! -d "$path"; then
47867 as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47868 fi
47869
47870 POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47871 fi
47872 fi
47873
47874
47875 FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47877 $as_echo_n "checking for freetype includes... " >&6; }
47878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47879 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47880 FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47882 $as_echo_n "checking for freetype libraries... " >&6; }
47883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47884 $as_echo "$FREETYPE_LIB_PATH" >&6; }
47885 fi
47886
47887 if test "x$FOUND_FREETYPE" != xyes; then
47888
47889 POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47890 POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
47891 METHOD="well-known location"
47892
47893 # Let's start with an optimistic view of the world :-)
47894 FOUND_FREETYPE=yes
47895
47896 # First look for the canonical freetype main include file ft2build.h.
47897 if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47898 # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47899 POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47900 if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47901 # Fail.
47902 FOUND_FREETYPE=no
47903 fi
47904 fi
47905
47906 if test "x$FOUND_FREETYPE" = xyes; then
47907 # Include file found, let's continue the sanity check.
47908 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47909 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47910
47911 # Reset to default value
47912 FREETYPE_BASE_NAME=freetype
47913 FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47914 if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47915 if test "x$OPENJDK_TARGET_OS" = xmacosx \
47916 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47917 # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47918 # for the .6 version explicitly.
47919 FREETYPE_BASE_NAME=freetype.6
47920 FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47921 { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47922 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47923 else
47924 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47925 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47926 FOUND_FREETYPE=no
47927 fi
47928 else
47929 if test "x$OPENJDK_TARGET_OS" = xwindows; then
47930 # On Windows, we will need both .lib and .dll file.
47931 if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47932 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47933 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47934 FOUND_FREETYPE=no
47935 fi
47936 elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47937 && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47938 # Found lib in isa dir, use that instead.
47939 POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47940 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47941 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47942 fi
47943 fi
47944 fi
47945
47946 if test "x$FOUND_FREETYPE" = xyes; then
47947
47948 # Only process if variable expands to non-empty
47949
47950 if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47951 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47952
47953 # Input might be given as Windows format, start by converting to
47954 # unix format.
47955 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47956 new_path=`$CYGPATH -u "$path"`
47957
47958 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47959 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47960 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47961 # "foo.exe" is OK but "foo" is an error.
47962 #
47963 # This test is therefore slightly more accurate than "test -f" to check for file precense.
47964 # It is also a way to make sure we got the proper file name for the real test later on.
47965 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47966 if test "x$test_shortpath" = x; then
47967 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47968 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47969 as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47970 fi
47971
47972 # Call helper function which possibly converts this using DOS-style short mode.
47973 # If so, the updated path is stored in $new_path.
47974
47975 input_path="$new_path"
47976 # Check if we need to convert this using DOS-style short mode. If the path
47977 # contains just simple characters, use it. Otherwise (spaces, weird characters),
47978 # take no chances and rewrite it.
47979 # Note: m4 eats our [], so we need to use [ and ] instead.
47980 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47981 if test "x$has_forbidden_chars" != x; then
47982 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47983 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47984 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47985 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47986 # Going to short mode and back again did indeed matter. Since short mode is
47987 # case insensitive, let's make it lowercase to improve readability.
47988 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47989 # Now convert it back to Unix-style (cygpath)
47990 input_path=`$CYGPATH -u "$shortmode_path"`
47991 new_path="$input_path"
47992 fi
47993 fi
47994
47995 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47996 if test "x$test_cygdrive_prefix" = x; then
47997 # As a simple fix, exclude /usr/bin since it's not a real path.
47998 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47999 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48000 # a path prefixed by /cygdrive for fixpath to work.
48001 new_path="$CYGWIN_ROOT_PATH$input_path"
48002 fi
48003 fi
48004
48005
48006 if test "x$path" != "x$new_path"; then
48007 POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
48008 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48009 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48010 fi
48011
48012 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48013
48014 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48015 has_colon=`$ECHO $path | $GREP ^.:`
48016 new_path="$path"
48017 if test "x$has_colon" = x; then
48018 # Not in mixed or Windows style, start by that.
48019 new_path=`cmd //c echo $path`
48020 fi
48021
48022
48023 input_path="$new_path"
48024 # Check if we need to convert this using DOS-style short mode. If the path
48025 # contains just simple characters, use it. Otherwise (spaces, weird characters),
48026 # take no chances and rewrite it.
48027 # Note: m4 eats our [], so we need to use [ and ] instead.
48028 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48029 if test "x$has_forbidden_chars" != x; then
48030 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48031 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48032 fi
48033
48034
48035 windows_path="$new_path"
48036 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48037 unix_path=`$CYGPATH -u "$windows_path"`
48038 new_path="$unix_path"
48039 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48040 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48041 new_path="$unix_path"
48042 fi
48043
48044 if test "x$path" != "x$new_path"; then
48045 POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
48046 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48047 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48048 fi
48049
48050 # Save the first 10 bytes of this path to the storage, so fixpath can work.
48051 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48052
48053 else
48054 # We're on a unix platform. Hooray! :)
48055 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48056 has_space=`$ECHO "$path" | $GREP " "`
48057 if test "x$has_space" != x; then
48058 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48059 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48060 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48061 fi
48062
48063 # Use eval to expand a potential ~
48064 eval path="$path"
48065 if test ! -f "$path" && test ! -d "$path"; then
48066 as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48067 fi
48068
48069 POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48070 fi
48071 fi
48072
48073
48074 # Only process if variable expands to non-empty
48075
48076 if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
48077 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48078
48079 # Input might be given as Windows format, start by converting to
48080 # unix format.
48081 path="$POTENTIAL_FREETYPE_LIB_PATH"
48082 new_path=`$CYGPATH -u "$path"`
48083
48084 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48085 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48086 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48087 # "foo.exe" is OK but "foo" is an error.
48088 #
48089 # This test is therefore slightly more accurate than "test -f" to check for file precense.
48090 # It is also a way to make sure we got the proper file name for the real test later on.
48091 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48092 if test "x$test_shortpath" = x; then
48093 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48094 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48095 as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
48096 fi
48097
48098 # Call helper function which possibly converts this using DOS-style short mode.
48099 # If so, the updated path is stored in $new_path.
48100
48101 input_path="$new_path"
48102 # Check if we need to convert this using DOS-style short mode. If the path
48103 # contains just simple characters, use it. Otherwise (spaces, weird characters),
48104 # take no chances and rewrite it.
48105 # Note: m4 eats our [], so we need to use [ and ] instead.
48106 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48107 if test "x$has_forbidden_chars" != x; then
48108 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48109 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48110 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48111 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48112 # Going to short mode and back again did indeed matter. Since short mode is
48113 # case insensitive, let's make it lowercase to improve readability.
48114 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48115 # Now convert it back to Unix-style (cygpath)
48116 input_path=`$CYGPATH -u "$shortmode_path"`
48117 new_path="$input_path"
48118 fi
48119 fi
48120
48121 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48122 if test "x$test_cygdrive_prefix" = x; then
48123 # As a simple fix, exclude /usr/bin since it's not a real path.
48124 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48125 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48126 # a path prefixed by /cygdrive for fixpath to work.
48127 new_path="$CYGWIN_ROOT_PATH$input_path"
48128 fi
48129 fi
48130
48131
48132 if test "x$path" != "x$new_path"; then
48133 POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48134 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48135 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48136 fi
48137
48138 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48139
48140 path="$POTENTIAL_FREETYPE_LIB_PATH"
48141 has_colon=`$ECHO $path | $GREP ^.:`
48142 new_path="$path"
48143 if test "x$has_colon" = x; then
48144 # Not in mixed or Windows style, start by that.
48145 new_path=`cmd //c echo $path`
48146 fi
48147
48148
48149 input_path="$new_path"
48150 # Check if we need to convert this using DOS-style short mode. If the path
48151 # contains just simple characters, use it. Otherwise (spaces, weird characters),
48152 # take no chances and rewrite it.
48153 # Note: m4 eats our [], so we need to use [ and ] instead.
48154 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48155 if test "x$has_forbidden_chars" != x; then
48156 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48157 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48158 fi
48159
48160
48161 windows_path="$new_path"
48162 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48163 unix_path=`$CYGPATH -u "$windows_path"`
48164 new_path="$unix_path"
48165 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48166 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48167 new_path="$unix_path"
48168 fi
48169
48170 if test "x$path" != "x$new_path"; then
48171 POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48172 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48173 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48174 fi
48175
48176 # Save the first 10 bytes of this path to the storage, so fixpath can work.
48177 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48178
48179 else
48180 # We're on a unix platform. Hooray! :)
48181 path="$POTENTIAL_FREETYPE_LIB_PATH"
48182 has_space=`$ECHO "$path" | $GREP " "`
48183 if test "x$has_space" != x; then
48184 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48185 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48186 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48187 fi
48188
48189 # Use eval to expand a potential ~
48190 eval path="$path"
48191 if test ! -f "$path" && test ! -d "$path"; then
48192 as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48193 fi
48194
48195 POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48196 fi
48197 fi
48198
48199
48200 FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
48202 $as_echo_n "checking for freetype includes... " >&6; }
48203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
48204 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
48205 FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
48206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
48207 $as_echo_n "checking for freetype libraries... " >&6; }
48208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
48209 $as_echo "$FREETYPE_LIB_PATH" >&6; }
48210 fi
48211
48212 fi
48213 fi
48214 fi
48215 fi
48216 fi # end check in well-known locations
48217
48218 if test "x$FOUND_FREETYPE" != xyes; then
48219
48220 # Print a helpful message on how to acquire the necessary build dependency.
48221 # freetype is the help tag: freetype, cups, pulse, alsa etc
48222 MISSING_DEPENDENCY=freetype
48223
48224 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48225 cygwin_help $MISSING_DEPENDENCY
48226 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48227 msys_help $MISSING_DEPENDENCY
48228 else
48229 PKGHANDLER_COMMAND=
48230
48231 case $PKGHANDLER in
48232 apt-get)
48233 apt_help $MISSING_DEPENDENCY ;;
48234 yum)
48235 yum_help $MISSING_DEPENDENCY ;;
48236 port)
48237 port_help $MISSING_DEPENDENCY ;;
48238 pkgutil)
48239 pkgutil_help $MISSING_DEPENDENCY ;;
48240 pkgadd)
48241 pkgadd_help $MISSING_DEPENDENCY ;;
48242 esac
48243
48244 if test "x$PKGHANDLER_COMMAND" != x; then
48245 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48246 fi
48247 fi
48248
48249 as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
48250 fi
48251 fi # end user specified settings
48252
48253 # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
48254 if test "x$FREETYPE_CFLAGS" = x; then
48255
48256 # Only process if variable expands to non-empty
48257
48258 if test "x$FREETYPE_INCLUDE_PATH" != x; then
48259 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48260
48261 # Input might be given as Windows format, start by converting to
48262 # unix format.
48263 path="$FREETYPE_INCLUDE_PATH"
48264 new_path=`$CYGPATH -u "$path"`
48265
48266 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48267 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48268 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48269 # "foo.exe" is OK but "foo" is an error.
48270 #
48271 # This test is therefore slightly more accurate than "test -f" to check for file precense.
48272 # It is also a way to make sure we got the proper file name for the real test later on.
48273 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48274 if test "x$test_shortpath" = x; then
48275 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48276 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48277 as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
48278 fi
48279
48280 # Call helper function which possibly converts this using DOS-style short mode.
48281 # If so, the updated path is stored in $new_path.
48282
48283 input_path="$new_path"
48284 # Check if we need to convert this using DOS-style short mode. If the path
48285 # contains just simple characters, use it. Otherwise (spaces, weird characters),
48286 # take no chances and rewrite it.
48287 # Note: m4 eats our [], so we need to use [ and ] instead.
48288 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48289 if test "x$has_forbidden_chars" != x; then
48290 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48291 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48292 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48293 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48294 # Going to short mode and back again did indeed matter. Since short mode is
48295 # case insensitive, let's make it lowercase to improve readability.
48296 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48297 # Now convert it back to Unix-style (cygpath)
48298 input_path=`$CYGPATH -u "$shortmode_path"`
48299 new_path="$input_path"
48300 fi
48301 fi
48302
48303 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48304 if test "x$test_cygdrive_prefix" = x; then
48305 # As a simple fix, exclude /usr/bin since it's not a real path.
48306 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48307 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48308 # a path prefixed by /cygdrive for fixpath to work.
48309 new_path="$CYGWIN_ROOT_PATH$input_path"
48310 fi
48311 fi
48312
48313
48314 if test "x$path" != "x$new_path"; then
48315 FREETYPE_INCLUDE_PATH="$new_path"
48316 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48317 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48318 fi
48319
48320 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48321
48322 path="$FREETYPE_INCLUDE_PATH"
48323 has_colon=`$ECHO $path | $GREP ^.:`
48324 new_path="$path"
48325 if test "x$has_colon" = x; then
48326 # Not in mixed or Windows style, start by that.
48327 new_path=`cmd //c echo $path`
48328 fi
48329
48330
48331 input_path="$new_path"
48332 # Check if we need to convert this using DOS-style short mode. If the path
48333 # contains just simple characters, use it. Otherwise (spaces, weird characters),
48334 # take no chances and rewrite it.
48335 # Note: m4 eats our [], so we need to use [ and ] instead.
48336 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48337 if test "x$has_forbidden_chars" != x; then
48338 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48339 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48340 fi
48341
48342
48343 windows_path="$new_path"
48344 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48345 unix_path=`$CYGPATH -u "$windows_path"`
48346 new_path="$unix_path"
48347 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48348 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48349 new_path="$unix_path"
48350 fi
48351
48352 if test "x$path" != "x$new_path"; then
48353 FREETYPE_INCLUDE_PATH="$new_path"
48354 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48355 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48356 fi
48357
48358 # Save the first 10 bytes of this path to the storage, so fixpath can work.
48359 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48360
48361 else
48362 # We're on a unix platform. Hooray! :)
48363 path="$FREETYPE_INCLUDE_PATH"
48364 has_space=`$ECHO "$path" | $GREP " "`
48365 if test "x$has_space" != x; then
48366 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48367 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48368 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48369 fi
48370
48371 # Use eval to expand a potential ~
48372 eval path="$path"
48373 if test ! -f "$path" && test ! -d "$path"; then
48374 as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48375 fi
48376
48377 FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48378 fi
48379 fi
48380
48381 if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
48382 FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
48383 else
48384 FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
48385 fi
48386 fi
48387
48388 if test "x$FREETYPE_LIBS" = x; then
48389
48390 # Only process if variable expands to non-empty
48391
48392 if test "x$FREETYPE_LIB_PATH" != x; then
48393 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48394
48395 # Input might be given as Windows format, start by converting to
48396 # unix format.
48397 path="$FREETYPE_LIB_PATH"
48398 new_path=`$CYGPATH -u "$path"`
48399
48400 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48401 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48402 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48403 # "foo.exe" is OK but "foo" is an error.
48404 #
48405 # This test is therefore slightly more accurate than "test -f" to check for file precense.
48406 # It is also a way to make sure we got the proper file name for the real test later on.
48407 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48408 if test "x$test_shortpath" = x; then
48409 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48410 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48411 as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
48412 fi
48413
48414 # Call helper function which possibly converts this using DOS-style short mode.
48415 # If so, the updated path is stored in $new_path.
48416
48417 input_path="$new_path"
48418 # Check if we need to convert this using DOS-style short mode. If the path
48419 # contains just simple characters, use it. Otherwise (spaces, weird characters),
48420 # take no chances and rewrite it.
48421 # Note: m4 eats our [], so we need to use [ and ] instead.
48422 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48423 if test "x$has_forbidden_chars" != x; then
48424 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48425 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48426 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48427 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48428 # Going to short mode and back again did indeed matter. Since short mode is
48429 # case insensitive, let's make it lowercase to improve readability.
48430 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48431 # Now convert it back to Unix-style (cygpath)
48432 input_path=`$CYGPATH -u "$shortmode_path"`
48433 new_path="$input_path"
48434 fi
48435 fi
48436
48437 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48438 if test "x$test_cygdrive_prefix" = x; then
48439 # As a simple fix, exclude /usr/bin since it's not a real path.
48440 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48441 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48442 # a path prefixed by /cygdrive for fixpath to work.
48443 new_path="$CYGWIN_ROOT_PATH$input_path"
48444 fi
48445 fi
48446
48447
48448 if test "x$path" != "x$new_path"; then
48449 FREETYPE_LIB_PATH="$new_path"
48450 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48451 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48452 fi
48453
48454 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48455
48456 path="$FREETYPE_LIB_PATH"
48457 has_colon=`$ECHO $path | $GREP ^.:`
48458 new_path="$path"
48459 if test "x$has_colon" = x; then
48460 # Not in mixed or Windows style, start by that.
48461 new_path=`cmd //c echo $path`
48462 fi
48463
48464
48465 input_path="$new_path"
48466 # Check if we need to convert this using DOS-style short mode. If the path
48467 # contains just simple characters, use it. Otherwise (spaces, weird characters),
48468 # take no chances and rewrite it.
48469 # Note: m4 eats our [], so we need to use [ and ] instead.
48470 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48471 if test "x$has_forbidden_chars" != x; then
48472 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48473 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48474 fi
48475
48476
48477 windows_path="$new_path"
48478 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48479 unix_path=`$CYGPATH -u "$windows_path"`
48480 new_path="$unix_path"
48481 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48482 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48483 new_path="$unix_path"
48484 fi
48485
48486 if test "x$path" != "x$new_path"; then
48487 FREETYPE_LIB_PATH="$new_path"
48488 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48489 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48490 fi
48491
48492 # Save the first 10 bytes of this path to the storage, so fixpath can work.
48493 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48494
48495 else
48496 # We're on a unix platform. Hooray! :)
48497 path="$FREETYPE_LIB_PATH"
48498 has_space=`$ECHO "$path" | $GREP " "`
48499 if test "x$has_space" != x; then
48500 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48501 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48502 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48503 fi
48504
48505 # Use eval to expand a potential ~
48506 eval path="$path"
48507 if test ! -f "$path" && test ! -d "$path"; then
48508 as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48509 fi
48510
48511 FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48512 fi
48513 fi
48514
48515 if test "x$OPENJDK_TARGET_OS" = xwindows; then
48516 FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
48517 else
48518 FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
48519 fi
48520 fi
48521
48522 # Try to compile it
48523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
48524 $as_echo_n "checking if we can compile and link with freetype... " >&6; }
48525 ac_ext=cpp
48526 ac_cpp='$CXXCPP $CPPFLAGS'
48527 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48528 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48529 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48530
48531 PREV_CXXCFLAGS="$CXXFLAGS"
48532 PREV_LIBS="$LIBS"
48533 PREV_CXX="$CXX"
48534 CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
48535 LIBS="$LIBS $FREETYPE_LIBS"
48536 CXX="$FIXPATH $CXX"
48537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48538 /* end confdefs.h. */
48539
48540 #include<ft2build.h>
48541 #include FT_FREETYPE_H
48542 int main () {
48543 FT_Init_FreeType(NULL);
48544 return 0;
48545 }
48546
48547 _ACEOF
48548 if ac_fn_cxx_try_link "$LINENO"; then :
48549
48550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48551 $as_echo "yes" >&6; }
48552
48553 else
48554
48555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48556 $as_echo "no" >&6; }
48557 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
48558 $as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
48559 { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
48560 $as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
48561
48562
48563 # Print a helpful message on how to acquire the necessary build dependency.
48564 # freetype is the help tag: freetype, cups, pulse, alsa etc
48565 MISSING_DEPENDENCY=freetype
48566
48567 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48568 cygwin_help $MISSING_DEPENDENCY
48569 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48570 msys_help $MISSING_DEPENDENCY
48571 else
48572 PKGHANDLER_COMMAND=
48573
48574 case $PKGHANDLER in
48575 apt-get)
48576 apt_help $MISSING_DEPENDENCY ;;
48577 yum)
48578 yum_help $MISSING_DEPENDENCY ;;
48579 port)
48580 port_help $MISSING_DEPENDENCY ;;
48581 pkgutil)
48582 pkgutil_help $MISSING_DEPENDENCY ;;
48583 pkgadd)
48584 pkgadd_help $MISSING_DEPENDENCY ;;
48585 esac
48586
48587 if test "x$PKGHANDLER_COMMAND" != x; then
48588 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48589 fi
48590 fi
48591
48592
48593 as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
48594
48595
48596 fi
48597 rm -f core conftest.err conftest.$ac_objext \
48598 conftest$ac_exeext conftest.$ac_ext
48599 CXXCFLAGS="$PREV_CXXFLAGS"
48600 LIBS="$PREV_LIBS"
48601 CXX="$PREV_CXX"
48602 ac_ext=cpp
48603 ac_cpp='$CXXCPP $CPPFLAGS'
48604 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48605 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48606 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48607
48608
48609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
48610 $as_echo_n "checking if we should bundle freetype... " >&6; }
48611 if test "x$BUNDLE_FREETYPE" = xyes; then
48612 FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
48613 fi
48614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
48615 $as_echo "$BUNDLE_FREETYPE" >&6; }
48616
48617 fi # end freetype needed
48618
48619
48620
48621
48622
48623
48624
48625 ###############################################################################
48626 #
48627 # Check for alsa headers and libraries. Used on Linux/GNU systems.
48628 #
48629
48630 # Check whether --with-alsa was given.
48631 if test "${with_alsa+set}" = set; then :
48632 withval=$with_alsa;
48633 fi
48634
48635
48636 # Check whether --with-alsa-include was given.
48637 if test "${with_alsa_include+set}" = set; then :
48638 withval=$with_alsa_include;
48639 fi
48640
48641
48642 # Check whether --with-alsa-lib was given.
48643 if test "${with_alsa_lib+set}" = set; then :
48644 withval=$with_alsa_lib;
48645 fi
48646
48647
48648 if test "x$ALSA_NOT_NEEDED" = xyes; then
48649 if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
48650 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
48651 $as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
48652 fi
48653 ALSA_CFLAGS=
48654 ALSA_LIBS=
48655 else
48656 ALSA_FOUND=no
48657
48658 if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
48659 as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
48660 fi
48661
48662 if test "x${with_alsa}" != x; then
48663 ALSA_LIBS="-L${with_alsa}/lib -lasound"
48664 ALSA_CFLAGS="-I${with_alsa}/include"
48665 ALSA_FOUND=yes
48666 fi
48667 if test "x${with_alsa_include}" != x; then
48668 ALSA_CFLAGS="-I${with_alsa_include}"
48669 ALSA_FOUND=yes
48670 fi
48671 if test "x${with_alsa_lib}" != x; then
48672 ALSA_LIBS="-L${with_alsa_lib} -lasound"
48673 ALSA_FOUND=yes
48674 fi
48675 if test "x$ALSA_FOUND" = xno; then
48676
48677
48678 if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
48679 # Source the builddeps file again, to make sure it uses the latest variables!
48680 . $builddepsfile
48681 # Look for a target and build machine specific resource!
48682 eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
48683 if test "x$resource" = x; then
48684 # Ok, lets instead look for a target specific resource
48685 eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
48686 fi
48687 if test "x$resource" = x; then
48688 # Ok, lets instead look for a build specific resource
48689 eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
48690 fi
48691 if test "x$resource" = x; then
48692 # Ok, lets instead look for a generic resource
48693 # (The alsa comes from M4 and not the shell, thus no need for eval here.)
48694 resource=${builddep_alsa}
48695 fi
48696 if test "x$resource" != x; then
48697 { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
48698 $as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
48699 # If the resource in the builddeps.conf file is an existing directory,
48700 # for example /java/linux/cups
48701 if test -d ${resource}; then
48702 depdir=${resource}
48703 else
48704
48705 # alsa is for example mymodule
48706 # $resource is for example libs/general/libmymod_1_2_3.zip
48707 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
48708 # $with_builddeps_dir is for example /localhome/builddeps
48709 # depdir is the name of the variable into which we store the depdir, eg MYMOD
48710 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
48711 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
48712 filename=`basename $resource`
48713 filebase=`echo $filename | sed 's/\.[^\.]*$//'`
48714 filebase=${filename%%.*}
48715 extension=${filename#*.}
48716 installdir=$with_builddeps_dir/$filebase
48717 if test ! -f $installdir/$filename.unpacked; then
48718 { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
48719 $as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
48720 if test ! -d $installdir; then
48721 mkdir -p $installdir
48722 fi
48723 if test ! -d $installdir; then
48724 as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
48725 fi
48726 tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
48727 touch $tmpfile
48728 if test ! -f $tmpfile; then
48729 as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
48730 fi
48731
48732 # $with_builddeps_server/$resource is the ftp://abuilddeps.server.com/libs/cups.zip
48733 # $tmpfile is the local file name for the downloaded file.
48734 VALID_TOOL=no
48735 if test "x$BDEPS_FTP" = xwget; then
48736 VALID_TOOL=yes
48737 wget -O $tmpfile $with_builddeps_server/$resource
48738 fi
48739 if test "x$BDEPS_FTP" = xlftp; then
48740 VALID_TOOL=yes
48741 lftp -c "get $with_builddeps_server/$resource -o $tmpfile"
48742 fi
48743 if test "x$BDEPS_FTP" = xftp; then
48744 VALID_TOOL=yes
48745 FTPSERVER=`echo $with_builddeps_server/$resource | cut -f 3 -d '/'`
48746 FTPPATH=`echo $with_builddeps_server/$resource | cut -f 4- -d '/'`
48747 FTPUSERPWD=${FTPSERVER%%@*}
48748 if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
48749 FTPUSER=${userpwd%%:*}
48750 FTPPWD=${userpwd#*@}
48751 FTPSERVER=${FTPSERVER#*@}
48752 else
48753 FTPUSER=ftp
48754 FTPPWD=ftp
48755 fi
48756 # the "pass" command does not work on some
48757 # ftp clients (read ftp.exe) but if it works,
48758 # passive mode is better!
48759 ( \
48760 echo "user $FTPUSER $FTPPWD" ; \
48761 echo "pass" ; \
48762 echo "bin" ; \
48763 echo "get $FTPPATH $tmpfile" ; \
48764 ) | ftp -in $FTPSERVER
48765 fi
48766 if test "x$VALID_TOOL" != xyes; then
48767 as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
48768 fi
48769
48770 mv $tmpfile $installdir/$filename
48771 if test ! -s $installdir/$filename; then
48772 as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
48773 fi
48774 case "$extension" in
48775 zip) echo "Unzipping $installdir/$filename..."
48776 (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
48777 ;;
48778 tar.gz) echo "Untaring $installdir/$filename..."
48779 (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48780 ;;
48781 tgz) echo "Untaring $installdir/$filename..."
48782 (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48783 ;;
48784 *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
48785 ;;
48786 esac
48787 fi
48788 if test -f $installdir/$filename.unpacked; then
48789 depdir=$installdir
48790 fi
48791
48792 fi
48793 # Source the builddeps file again, because in the previous command, the depdir
48794 # was updated to point at the current build dependency install directory.
48795 . $builddepsfile
48796 # Now extract variables from the builddeps.conf files.
48797 theroot=${builddep_alsa_ROOT}
48798 thecflags=${builddep_alsa_CFLAGS}
48799 thelibs=${builddep_alsa_LIBS}
48800 if test "x$depdir" = x; then
48801 as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
48802 fi
48803 ALSA=$depdir
48804 if test "x$theroot" != x; then
48805 ALSA="$theroot"
48806 fi
48807 if test "x$thecflags" != x; then
48808 ALSA_CFLAGS="$thecflags"
48809 fi
48810 if test "x$thelibs" != x; then
48811 ALSA_LIBS="$thelibs"
48812 fi
48813 ALSA_FOUND=yes
48814 else ALSA_FOUND=no
48815
48816 fi
48817 else ALSA_FOUND=no
48818
48819 fi
48820
48821 fi
48822 # Do not try pkg-config if we have a sysroot set.
48823 if test "x$SYSROOT" = x; then
48824 if test "x$ALSA_FOUND" = xno; then
48825
48826 pkg_failed=no
48827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
48828 $as_echo_n "checking for ALSA... " >&6; }
48829
48830 if test -n "$ALSA_CFLAGS"; then
48831 pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
48832 elif test -n "$PKG_CONFIG"; then
48833 if test -n "$PKG_CONFIG" && \
48834 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48835 ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48836 ac_status=$?
48837 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48838 test $ac_status = 0; }; then
48839 pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
48840 else
48841 pkg_failed=yes
48842 fi
48843 else
48844 pkg_failed=untried
48845 fi
48846 if test -n "$ALSA_LIBS"; then
48847 pkg_cv_ALSA_LIBS="$ALSA_LIBS"
48848 elif test -n "$PKG_CONFIG"; then
48849 if test -n "$PKG_CONFIG" && \
48850 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48851 ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48852 ac_status=$?
48853 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48854 test $ac_status = 0; }; then
48855 pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
48856 else
48857 pkg_failed=yes
48858 fi
48859 else
48860 pkg_failed=untried
48861 fi
48862
48863
48864
48865 if test $pkg_failed = yes; then
48866
48867 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48868 _pkg_short_errors_supported=yes
48869 else
48870 _pkg_short_errors_supported=no
48871 fi
48872 if test $_pkg_short_errors_supported = yes; then
48873 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
48874 else
48875 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
48876 fi
48877 # Put the nasty error message in config.log where it belongs
48878 echo "$ALSA_PKG_ERRORS" >&5
48879
48880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48881 $as_echo "no" >&6; }
48882 ALSA_FOUND=no
48883 elif test $pkg_failed = untried; then
48884 ALSA_FOUND=no
48885 else
48886 ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
48887 ALSA_LIBS=$pkg_cv_ALSA_LIBS
48888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48889 $as_echo "yes" >&6; }
48890 ALSA_FOUND=yes
48891 fi
48892 fi
48893 fi
48894 if test "x$ALSA_FOUND" = xno; then
48895 for ac_header in alsa/asoundlib.h
48896 do :
48897 ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
48898 if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
48899 cat >>confdefs.h <<_ACEOF
48900 #define HAVE_ALSA_ASOUNDLIB_H 1
48901 _ACEOF
48902
48903 ALSA_FOUND=yes
48904 ALSA_CFLAGS=-Iignoreme
48905 ALSA_LIBS=-lasound
48906 DEFAULT_ALSA=yes
48907
48908 else
48909 ALSA_FOUND=no
48910 fi
48911
48912 done
48913
48914 fi
48915 if test "x$ALSA_FOUND" = xno; then
48916
48917 # Print a helpful message on how to acquire the necessary build dependency.
48918 # alsa is the help tag: freetype, cups, pulse, alsa etc
48919 MISSING_DEPENDENCY=alsa
48920
48921 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48922 cygwin_help $MISSING_DEPENDENCY
48923 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48924 msys_help $MISSING_DEPENDENCY
48925 else
48926 PKGHANDLER_COMMAND=
48927
48928 case $PKGHANDLER in
48929 apt-get)
48930 apt_help $MISSING_DEPENDENCY ;;
48931 yum)
48932 yum_help $MISSING_DEPENDENCY ;;
48933 port)
48934 port_help $MISSING_DEPENDENCY ;;
48935 pkgutil)
48936 pkgutil_help $MISSING_DEPENDENCY ;;
48937 pkgadd)
48938 pkgadd_help $MISSING_DEPENDENCY ;;
48939 esac
48940
48941 if test "x$PKGHANDLER_COMMAND" != x; then
48942 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48943 fi
48944 fi
48945
48946 as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
48947 fi
48948 fi
48949
48950
48951
48952
48953
48954
48955 ###############################################################################
48956 #
48957 # Check for the jpeg library
48958 #
48959
48960
48961 # Check whether --with-libjpeg was given.
48962 if test "${with_libjpeg+set}" = set; then :
48963 withval=$with_libjpeg;
48964 fi
48965
48966
48967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
48968 $as_echo_n "checking for which libjpeg to use... " >&6; }
48969
48970 # default is bundled
48971 DEFAULT_LIBJPEG=bundled
48972
48973 #
48974 # if user didn't specify, use DEFAULT_LIBJPEG
48975 #
48976 if test "x${with_libjpeg}" = "x"; then
48977 with_libjpeg=${DEFAULT_LIBJPEG}
48978 fi
48979
48980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
48981 $as_echo "${with_libjpeg}" >&6; }
48982
48983 if test "x${with_libjpeg}" = "xbundled"; then
48984 USE_EXTERNAL_LIBJPEG=false
48985 elif test "x${with_libjpeg}" = "xsystem"; then
48986 ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
48987 if test "x$ac_cv_header_jpeglib_h" = xyes; then :
48988
48989 else
48990 as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
48991 fi
48992
48993
48994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
48995 $as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
48996 if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
48997 $as_echo_n "(cached) " >&6
48998 else
48999 ac_check_lib_save_LIBS=$LIBS
49000 LIBS="-ljpeg $LIBS"
49001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49002 /* end confdefs.h. */
49003
49004 /* Override any GCC internal prototype to avoid an error.
49005 Use char because int might match the return type of a GCC
49006 builtin and then its argument prototype would still apply. */
49007 #ifdef __cplusplus
49008 extern "C"
49009 #endif
49010 char jpeg_CreateDecompress ();
49011 int
49012 main ()
49013 {
49014 return jpeg_CreateDecompress ();
49015 ;
49016 return 0;
49017 }
49018 _ACEOF
49019 if ac_fn_cxx_try_link "$LINENO"; then :
49020 ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
49021 else
49022 ac_cv_lib_jpeg_jpeg_CreateDecompress=no
49023 fi
49024 rm -f core conftest.err conftest.$ac_objext \
49025 conftest$ac_exeext conftest.$ac_ext
49026 LIBS=$ac_check_lib_save_LIBS
49027 fi
49028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
49029 $as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
49030 if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
49031 cat >>confdefs.h <<_ACEOF
49032 #define HAVE_LIBJPEG 1
49033 _ACEOF
49034
49035 LIBS="-ljpeg $LIBS"
49036
49037 else
49038 as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
49039 fi
49040
49041
49042 USE_EXTERNAL_LIBJPEG=true
49043 else
49044 as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
49045 fi
49046
49047
49048
49049 ###############################################################################
49050 #
49051 # Check for the gif library
49052 #
49053
49054
49055 # Check whether --with-giflib was given.
49056 if test "${with_giflib+set}" = set; then :
49057 withval=$with_giflib;
49058 fi
49059
49060
49061
49062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
49063 $as_echo_n "checking for which giflib to use... " >&6; }
49064
49065 # default is bundled
49066 DEFAULT_GIFLIB=bundled
49067
49068 #
49069 # if user didn't specify, use DEFAULT_GIFLIB
49070 #
49071 if test "x${with_giflib}" = "x"; then
49072 with_giflib=${DEFAULT_GIFLIB}
49073 fi
49074
49075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
49076 $as_echo "${with_giflib}" >&6; }
49077
49078 if test "x${with_giflib}" = "xbundled"; then
49079 USE_EXTERNAL_LIBGIF=false
49080 elif test "x${with_giflib}" = "xsystem"; then
49081 ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
49082 if test "x$ac_cv_header_gif_lib_h" = xyes; then :
49083
49084 else
49085 as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
49086 fi
49087
49088
49089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
49090 $as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
49091 if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
49092 $as_echo_n "(cached) " >&6
49093 else
49094 ac_check_lib_save_LIBS=$LIBS
49095 LIBS="-lgif $LIBS"
49096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49097 /* end confdefs.h. */
49098
49099 /* Override any GCC internal prototype to avoid an error.
49100 Use char because int might match the return type of a GCC
49101 builtin and then its argument prototype would still apply. */
49102 #ifdef __cplusplus
49103 extern "C"
49104 #endif
49105 char DGifGetCode ();
49106 int
49107 main ()
49108 {
49109 return DGifGetCode ();
49110 ;
49111 return 0;
49112 }
49113 _ACEOF
49114 if ac_fn_cxx_try_link "$LINENO"; then :
49115 ac_cv_lib_gif_DGifGetCode=yes
49116 else
49117 ac_cv_lib_gif_DGifGetCode=no
49118 fi
49119 rm -f core conftest.err conftest.$ac_objext \
49120 conftest$ac_exeext conftest.$ac_ext
49121 LIBS=$ac_check_lib_save_LIBS
49122 fi
49123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
49124 $as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
49125 if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
49126 cat >>confdefs.h <<_ACEOF
49127 #define HAVE_LIBGIF 1
49128 _ACEOF
49129
49130 LIBS="-lgif $LIBS"
49131
49132 else
49133 as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
49134 fi
49135
49136
49137 USE_EXTERNAL_LIBGIF=true
49138 else
49139 as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
49140 fi
49141
49142
49143 ###############################################################################
49144 #
49145 # Check for the lcms2 library
49146 #
49147
49148
49149 # Check whether --with-lcms was given.
49150 if test "${with_lcms+set}" = set; then :
49151 withval=$with_lcms;
49152 fi
49153
49154
49155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
49156 $as_echo_n "checking for which lcms to use... " >&6; }
49157
49158 DEFAULT_LCMS=bundled
49159
49160 #
49161 # If user didn't specify, use DEFAULT_LCMS
49162 #
49163 if test "x${with_lcms}" = "x"; then
49164 with_lcms=${DEFAULT_LCMS}
49165 fi
49166
49167 if test "x${with_lcms}" = "xbundled"; then
49168 USE_EXTERNAL_LCMS=false
49169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49170 $as_echo "bundled" >&6; }
49171 elif test "x${with_lcms}" = "xsystem"; then
49172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49173 $as_echo "system" >&6; }
49174
49175 pkg_failed=no
49176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
49177 $as_echo_n "checking for LCMS... " >&6; }
49178
49179 if test -n "$LCMS_CFLAGS"; then
49180 pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
49181 elif test -n "$PKG_CONFIG"; then
49182 if test -n "$PKG_CONFIG" && \
49183 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
49184 ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
49185 ac_status=$?
49186 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49187 test $ac_status = 0; }; then
49188 pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
49189 else
49190 pkg_failed=yes
49191 fi
49192 else
49193 pkg_failed=untried
49194 fi
49195 if test -n "$LCMS_LIBS"; then
49196 pkg_cv_LCMS_LIBS="$LCMS_LIBS"
49197 elif test -n "$PKG_CONFIG"; then
49198 if test -n "$PKG_CONFIG" && \
49199 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
49200 ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
49201 ac_status=$?
49202 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49203 test $ac_status = 0; }; then
49204 pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
49205 else
49206 pkg_failed=yes
49207 fi
49208 else
49209 pkg_failed=untried
49210 fi
49211
49212
49213
49214 if test $pkg_failed = yes; then
49215
49216 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49217 _pkg_short_errors_supported=yes
49218 else
49219 _pkg_short_errors_supported=no
49220 fi
49221 if test $_pkg_short_errors_supported = yes; then
49222 LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
49223 else
49224 LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
49225 fi
49226 # Put the nasty error message in config.log where it belongs
49227 echo "$LCMS_PKG_ERRORS" >&5
49228
49229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49230 $as_echo "no" >&6; }
49231 LCMS_FOUND=no
49232 elif test $pkg_failed = untried; then
49233 LCMS_FOUND=no
49234 else
49235 LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
49236 LCMS_LIBS=$pkg_cv_LCMS_LIBS
49237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49238 $as_echo "yes" >&6; }
49239 LCMS_FOUND=yes
49240 fi
49241 if test "x${LCMS_FOUND}" = "xyes"; then
49242 USE_EXTERNAL_LCMS=true
49243 else
49244 as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
49245 fi
49246 else
49247 as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
49248 fi
49249
49250
49251
49252 ###############################################################################
49253 #
49254 # Check for the png library
49255 #
49256
49257
49258 # Check whether --with-libpng was given.
49259 if test "${with_libpng+set}" = set; then :
49260 withval=$with_libpng;
49261 fi
49262
49263
49264
49265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
49266 $as_echo_n "checking for which libpng to use... " >&6; }
49267
49268 # default is bundled
49269 DEFAULT_LIBPNG=bundled
49270
49271 #
49272 # if user didn't specify, use DEFAULT_LIBPNG
49273 #
49274 if test "x${with_libpng}" = "x"; then
49275 with_libpng=${DEFAULT_LIBPNG}
49276 fi
49277
49278 if test "x${with_libpng}" = "xbundled"; then
49279 USE_EXTERNAL_LIBPNG=false
49280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49281 $as_echo "bundled" >&6; }
49282 elif test "x${with_libpng}" = "xsystem"; then
49283
49284 pkg_failed=no
49285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
49286 $as_echo_n "checking for PNG... " >&6; }
49287
49288 if test -n "$PNG_CFLAGS"; then
49289 pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
49290 elif test -n "$PKG_CONFIG"; then
49291 if test -n "$PKG_CONFIG" && \
49292 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
49293 ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
49294 ac_status=$?
49295 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49296 test $ac_status = 0; }; then
49297 pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
49298 else
49299 pkg_failed=yes
49300 fi
49301 else
49302 pkg_failed=untried
49303 fi
49304 if test -n "$PNG_LIBS"; then
49305 pkg_cv_PNG_LIBS="$PNG_LIBS"
49306 elif test -n "$PKG_CONFIG"; then
49307 if test -n "$PKG_CONFIG" && \
49308 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
49309 ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
49310 ac_status=$?
49311 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49312 test $ac_status = 0; }; then
49313 pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
49314 else
49315 pkg_failed=yes
49316 fi
49317 else
49318 pkg_failed=untried
49319 fi
49320
49321
49322
49323 if test $pkg_failed = yes; then
49324
49325 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49326 _pkg_short_errors_supported=yes
49327 else
49328 _pkg_short_errors_supported=no
49329 fi
49330 if test $_pkg_short_errors_supported = yes; then
49331 PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
49332 else
49333 PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
49334 fi
49335 # Put the nasty error message in config.log where it belongs
49336 echo "$PNG_PKG_ERRORS" >&5
49337
49338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49339 $as_echo "no" >&6; }
49340 LIBPNG_FOUND=no
49341 elif test $pkg_failed = untried; then
49342 LIBPNG_FOUND=no
49343 else
49344 PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
49345 PNG_LIBS=$pkg_cv_PNG_LIBS
49346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49347 $as_echo "yes" >&6; }
49348 LIBPNG_FOUND=yes
49349 fi
49350 if test "x${LIBPNG_FOUND}" = "xyes"; then
49351 USE_EXTERNAL_LIBPNG=true
49352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49353 $as_echo "system" >&6; }
49354 else
49355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49356 $as_echo "system not found" >&6; }
49357 as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
49358 fi
49359 else
49360 as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
49361 fi
49362
49363
49364 ###############################################################################
49365 #
49366 # Check for the zlib library
49367 #
49368
49369
49370 # Check whether --with-zlib was given.
49371 if test "${with_zlib+set}" = set; then :
49372 withval=$with_zlib;
49373 fi
49374
49375
49376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
49377 $as_echo_n "checking for compress in -lz... " >&6; }
49378 if ${ac_cv_lib_z_compress+:} false; then :
49379 $as_echo_n "(cached) " >&6
49380 else
49381 ac_check_lib_save_LIBS=$LIBS
49382 LIBS="-lz $LIBS"
49383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49384 /* end confdefs.h. */
49385
49386 /* Override any GCC internal prototype to avoid an error.
49387 Use char because int might match the return type of a GCC
49388 builtin and then its argument prototype would still apply. */
49389 #ifdef __cplusplus
49390 extern "C"
49391 #endif
49392 char compress ();
49393 int
49394 main ()
49395 {
49396 return compress ();
49397 ;
49398 return 0;
49399 }
49400 _ACEOF
49401 if ac_fn_cxx_try_link "$LINENO"; then :
49402 ac_cv_lib_z_compress=yes
49403 else
49404 ac_cv_lib_z_compress=no
49405 fi
49406 rm -f core conftest.err conftest.$ac_objext \
49407 conftest$ac_exeext conftest.$ac_ext
49408 LIBS=$ac_check_lib_save_LIBS
49409 fi
49410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
49411 $as_echo "$ac_cv_lib_z_compress" >&6; }
49412 if test "x$ac_cv_lib_z_compress" = xyes; then :
49413 ZLIB_FOUND=yes
49414 else
49415 ZLIB_FOUND=no
49416 fi
49417
49418
49419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
49420 $as_echo_n "checking for which zlib to use... " >&6; }
49421
49422 DEFAULT_ZLIB=bundled
49423 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49424 #
49425 # On macosx default is system...on others default is
49426 #
49427 DEFAULT_ZLIB=system
49428 fi
49429
49430 if test "x${ZLIB_FOUND}" != "xyes"; then
49431 #
49432 # If we don't find any system...set default to bundled
49433 #
49434 DEFAULT_ZLIB=bundled
49435 fi
49436
49437 #
49438 # If user didn't specify, use DEFAULT_ZLIB
49439 #
49440 if test "x${with_zlib}" = "x"; then
49441 with_zlib=${DEFAULT_ZLIB}
49442 fi
49443
49444 if test "x${with_zlib}" = "xbundled"; then
49445 USE_EXTERNAL_LIBZ=false
49446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49447 $as_echo "bundled" >&6; }
49448 elif test "x${with_zlib}" = "xsystem"; then
49449 if test "x${ZLIB_FOUND}" = "xyes"; then
49450 USE_EXTERNAL_LIBZ=true
49451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49452 $as_echo "system" >&6; }
49453 else
49454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49455 $as_echo "system not found" >&6; }
49456 as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
49457 fi
49458 else
49459 as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
49460 fi
49461
49462
49463
49464 ###############################################################################
49465 LIBZIP_CAN_USE_MMAP=true
49466
49467
49468
49469 ###############################################################################
49470 #
49471 # Check if altzone exists in time.h
49472 #
49473
49474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49475 /* end confdefs.h. */
49476 #include <time.h>
49477 int
49478 main ()
49479 {
49480 return (int)altzone;
49481 ;
49482 return 0;
49483 }
49484 _ACEOF
49485 if ac_fn_cxx_try_link "$LINENO"; then :
49486 has_altzone=yes
49487 else
49488 has_altzone=no
49489 fi
49490 rm -f core conftest.err conftest.$ac_objext \
49491 conftest$ac_exeext conftest.$ac_ext
49492 if test "x$has_altzone" = xyes; then
49493
49494 $as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
49495
49496 fi
49497
49498 ###############################################################################
49499 #
49500 # Check the maths library
49501 #
49502
49503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
49504 $as_echo_n "checking for cos in -lm... " >&6; }
49505 if ${ac_cv_lib_m_cos+:} false; then :
49506 $as_echo_n "(cached) " >&6
49507 else
49508 ac_check_lib_save_LIBS=$LIBS
49509 LIBS="-lm $LIBS"
49510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49511 /* end confdefs.h. */
49512
49513 /* Override any GCC internal prototype to avoid an error.
49514 Use char because int might match the return type of a GCC
49515 builtin and then its argument prototype would still apply. */
49516 #ifdef __cplusplus
49517 extern "C"
49518 #endif
49519 char cos ();
49520 int
49521 main ()
49522 {
49523 return cos ();
49524 ;
49525 return 0;
49526 }
49527 _ACEOF
49528 if ac_fn_cxx_try_link "$LINENO"; then :
49529 ac_cv_lib_m_cos=yes
49530 else
49531 ac_cv_lib_m_cos=no
49532 fi
49533 rm -f core conftest.err conftest.$ac_objext \
49534 conftest$ac_exeext conftest.$ac_ext
49535 LIBS=$ac_check_lib_save_LIBS
49536 fi
49537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
49538 $as_echo "$ac_cv_lib_m_cos" >&6; }
49539 if test "x$ac_cv_lib_m_cos" = xyes; then :
49540 cat >>confdefs.h <<_ACEOF
49541 #define HAVE_LIBM 1
49542 _ACEOF
49543
49544 LIBS="-lm $LIBS"
49545
49546 else
49547
49548 { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
49549 $as_echo "$as_me: Maths library was not found" >&6;}
49550
49551
49552 fi
49553
49554
49555
49556 ###############################################################################
49557 #
49558 # Check for libdl.so
49559
49560 save_LIBS="$LIBS"
49561 LIBS=""
49562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
49563 $as_echo_n "checking for dlopen in -ldl... " >&6; }
49564 if ${ac_cv_lib_dl_dlopen+:} false; then :
49565 $as_echo_n "(cached) " >&6
49566 else
49567 ac_check_lib_save_LIBS=$LIBS
49568 LIBS="-ldl $LIBS"
49569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49570 /* end confdefs.h. */
49571
49572 /* Override any GCC internal prototype to avoid an error.
49573 Use char because int might match the return type of a GCC
49574 builtin and then its argument prototype would still apply. */
49575 #ifdef __cplusplus
49576 extern "C"
49577 #endif
49578 char dlopen ();
49579 int
49580 main ()
49581 {
49582 return dlopen ();
49583 ;
49584 return 0;
49585 }
49586 _ACEOF
49587 if ac_fn_cxx_try_link "$LINENO"; then :
49588 ac_cv_lib_dl_dlopen=yes
49589 else
49590 ac_cv_lib_dl_dlopen=no
49591 fi
49592 rm -f core conftest.err conftest.$ac_objext \
49593 conftest$ac_exeext conftest.$ac_ext
49594 LIBS=$ac_check_lib_save_LIBS
49595 fi
49596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
49597 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
49598 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
49599 cat >>confdefs.h <<_ACEOF
49600 #define HAVE_LIBDL 1
49601 _ACEOF
49602
49603 LIBS="-ldl $LIBS"
49604
49605 fi
49606
49607 LIBDL="$LIBS"
49608
49609 LIBS="$save_LIBS"
49610
49611
49612 ###############################################################################
49613 #
49614 # statically link libstdc++ before C++ ABI is stablized on Linux unless
49615 # dynamic build is configured on command line.
49616 #
49617
49618 # Check whether --with-stdc++lib was given.
49619 if test "${with_stdc__lib+set}" = set; then :
49620 withval=$with_stdc__lib;
49621 if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
49622 && test "x$with_stdc__lib" != xdefault; then
49623 as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
49624 fi
49625
49626 else
49627 with_stdc__lib=default
49628
49629 fi
49630
49631
49632 if test "x$OPENJDK_TARGET_OS" = xlinux; then
49633 # Test if -lstdc++ works.
49634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
49635 $as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
49636 ac_ext=cpp
49637 ac_cpp='$CXXCPP $CPPFLAGS'
49638 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49639 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49640 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49641
49642 OLD_CXXFLAGS="$CXXFLAGS"
49643 CXXFLAGS="$CXXFLAGS -lstdc++"
49644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49645 /* end confdefs.h. */
49646
49647 int
49648 main ()
49649 {
49650 return 0;
49651 ;
49652 return 0;
49653 }
49654 _ACEOF
49655 if ac_fn_cxx_try_link "$LINENO"; then :
49656 has_dynamic_libstdcxx=yes
49657 else
49658 has_dynamic_libstdcxx=no
49659 fi
49660 rm -f core conftest.err conftest.$ac_objext \
49661 conftest$ac_exeext conftest.$ac_ext
49662 CXXFLAGS="$OLD_CXXFLAGS"
49663 ac_ext=cpp
49664 ac_cpp='$CXXCPP $CPPFLAGS'
49665 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49666 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49667 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49668
49669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
49670 $as_echo "$has_dynamic_libstdcxx" >&6; }
49671
49672 # Test if stdc++ can be linked statically.
49673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
49674 $as_echo_n "checking if static link of stdc++ is possible... " >&6; }
49675 STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
49676 ac_ext=cpp
49677 ac_cpp='$CXXCPP $CPPFLAGS'
49678 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49679 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49680 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49681
49682 OLD_LIBS="$LIBS"
49683 OLD_CXX="$CXX"
49684 LIBS="$STATIC_STDCXX_FLAGS"
49685 CXX="$CC"
49686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49687 /* end confdefs.h. */
49688
49689 int
49690 main ()
49691 {
49692 return 0;
49693 ;
49694 return 0;
49695 }
49696 _ACEOF
49697 if ac_fn_cxx_try_link "$LINENO"; then :
49698 has_static_libstdcxx=yes
49699 else
49700 has_static_libstdcxx=no
49701 fi
49702 rm -f core conftest.err conftest.$ac_objext \
49703 conftest$ac_exeext conftest.$ac_ext
49704 LIBS="$OLD_LIBS"
49705 CXX="$OLD_CXX"
49706 ac_ext=cpp
49707 ac_cpp='$CXXCPP $CPPFLAGS'
49708 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49709 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49710 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49711
49712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
49713 $as_echo "$has_static_libstdcxx" >&6; }
49714
49715 if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
49716 as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
49717 fi
49718
49719 if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
49720 as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
49721 fi
49722
49723 if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
49724 as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
49725 fi
49726
49727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
49728 $as_echo_n "checking how to link with libstdc++... " >&6; }
49729 # If dynamic was requested, it's available since it would fail above otherwise.
49730 # If dynamic wasn't requested, go with static unless it isn't available.
49731 if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49732 LIBCXX="$LIBCXX -lstdc++"
49733 LDCXX="$CXX"
49734 STATIC_CXX_SETTING="STATIC_CXX=false"
49735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
49736 $as_echo "dynamic" >&6; }
49737 else
49738 LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
49739 LDCXX="$CC"
49740 STATIC_CXX_SETTING="STATIC_CXX=true"
49741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
49742 $as_echo "static" >&6; }
49743 fi
49744 fi
49745
49746
49747 if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49748 # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
49749
49750 pkg_failed=no
49751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
49752 $as_echo_n "checking for LIBFFI... " >&6; }
49753
49754 if test -n "$LIBFFI_CFLAGS"; then
49755 pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
49756 elif test -n "$PKG_CONFIG"; then
49757 if test -n "$PKG_CONFIG" && \
49758 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49759 ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49760 ac_status=$?
49761 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49762 test $ac_status = 0; }; then
49763 pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
49764 else
49765 pkg_failed=yes
49766 fi
49767 else
49768 pkg_failed=untried
49769 fi
49770 if test -n "$LIBFFI_LIBS"; then
49771 pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
49772 elif test -n "$PKG_CONFIG"; then
49773 if test -n "$PKG_CONFIG" && \
49774 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49775 ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49776 ac_status=$?
49777 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49778 test $ac_status = 0; }; then
49779 pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
49780 else
49781 pkg_failed=yes
49782 fi
49783 else
49784 pkg_failed=untried
49785 fi
49786
49787
49788
49789 if test $pkg_failed = yes; then
49790
49791 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49792 _pkg_short_errors_supported=yes
49793 else
49794 _pkg_short_errors_supported=no
49795 fi
49796 if test $_pkg_short_errors_supported = yes; then
49797 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
49798 else
49799 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
49800 fi
49801 # Put the nasty error message in config.log where it belongs
49802 echo "$LIBFFI_PKG_ERRORS" >&5
49803
49804 as_fn_error $? "Package requirements (libffi) were not met:
49805
49806 $LIBFFI_PKG_ERRORS
49807
49808 Consider adjusting the PKG_CONFIG_PATH environment variable if you
49809 installed software in a non-standard prefix.
49810
49811 Alternatively, you may set the environment variables LIBFFI_CFLAGS
49812 and LIBFFI_LIBS to avoid the need to call pkg-config.
49813 See the pkg-config man page for more details.
49814 " "$LINENO" 5
49815 elif test $pkg_failed = untried; then
49816 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49817 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49818 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
49819 is in your PATH or set the PKG_CONFIG environment variable to the full
49820 path to pkg-config.
49821
49822 Alternatively, you may set the environment variables LIBFFI_CFLAGS
49823 and LIBFFI_LIBS to avoid the need to call pkg-config.
49824 See the pkg-config man page for more details.
49825
49826 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
49827 See \`config.log' for more details" "$LINENO" 5; }
49828 else
49829 LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
49830 LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
49831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49832 $as_echo "yes" >&6; }
49833 :
49834 fi
49835
49836 fi
49837
49838 if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49839 # Extract the first word of "llvm-config", so it can be a program name with args.
49840 set dummy llvm-config; ac_word=$2
49841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49842 $as_echo_n "checking for $ac_word... " >&6; }
49843 if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
49844 $as_echo_n "(cached) " >&6
49845 else
49846 if test -n "$LLVM_CONFIG"; then
49847 ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
49848 else
49849 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49850 for as_dir in $PATH
49851 do
49852 IFS=$as_save_IFS
49853 test -z "$as_dir" && as_dir=.
49854 for ac_exec_ext in '' $ac_executable_extensions; do
49855 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49856 ac_cv_prog_LLVM_CONFIG="llvm-config"
49857 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49858 break 2
49859 fi
49860 done
49861 done
49862 IFS=$as_save_IFS
49863
49864 fi
49865 fi
49866 LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
49867 if test -n "$LLVM_CONFIG"; then
49868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
49869 $as_echo "$LLVM_CONFIG" >&6; }
49870 else
49871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49872 $as_echo "no" >&6; }
49873 fi
49874
49875
49876
49877 if test "x$LLVM_CONFIG" != xllvm-config; then
49878 as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
49879 fi
49880
49881 llvm_components="jit mcjit engine nativecodegen native"
49882 unset LLVM_CFLAGS
49883 for flag in $("$LLVM_CONFIG" --cxxflags); do
49884 if echo "${flag}" | grep -q '^-[ID]'; then
49885 if test "${flag}" != "-D_DEBUG" ; then
49886 if test "${LLVM_CFLAGS}" != "" ; then
49887 LLVM_CFLAGS="${LLVM_CFLAGS} "
49888 fi
49889 LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
49890 fi
49891 fi
49892 done
49893 llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
49894 LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
49895
49896 unset LLVM_LDFLAGS
49897 for flag in $("${LLVM_CONFIG}" --ldflags); do
49898 if echo "${flag}" | grep -q '^-L'; then
49899 if test "${LLVM_LDFLAGS}" != ""; then
49900 LLVM_LDFLAGS="${LLVM_LDFLAGS} "
49901 fi
49902 LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
49903 fi
49904 done
49905
49906 unset LLVM_LIBS
49907 for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
49908 if echo "${flag}" | grep -q '^-l'; then
49909 if test "${LLVM_LIBS}" != ""; then
49910 LLVM_LIBS="${LLVM_LIBS} "
49911 fi
49912 LLVM_LIBS="${LLVM_LIBS}${flag}"
49913 fi
49914 done
49915
49916
49917
49918
49919 fi
49920
49921 # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
49922 if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
49923 LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
49924 fi
49925
49926 # TODO better (platform agnostic) test
49927 if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
49928 LIBCXX="-lstdc++"
49929 fi
49930
49931
49932
49933
49934 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
49935
49936
49937 # Check whether --with-msvcr-dll was given.
49938 if test "${with_msvcr_dll+set}" = set; then :
49939 withval=$with_msvcr_dll;
49940 fi
49941
49942
49943 if test "x$with_msvcr_dll" != x; then
49944 # If given explicitely by user, do not probe. If not present, fail directly.
49945
49946 DLL_NAME="$MSVCR_NAME"
49947 POSSIBLE_MSVC_DLL="$with_msvcr_dll"
49948 METHOD="--with-msvcr-dll"
49949 if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49950 { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49951 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49952
49953 # Need to check if the found msvcr is correct architecture
49954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49955 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49956 MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49957 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49958 # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49959 # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49960 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49961 CORRECT_MSVCR_ARCH="PE32 executable"
49962 else
49963 CORRECT_MSVCR_ARCH="PE32+ executable"
49964 fi
49965 else
49966 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49967 CORRECT_MSVCR_ARCH=386
49968 else
49969 CORRECT_MSVCR_ARCH=x86-64
49970 fi
49971 fi
49972 if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49974 $as_echo "ok" >&6; }
49975 MSVC_DLL="$POSSIBLE_MSVC_DLL"
49976
49977 # Only process if variable expands to non-empty
49978
49979 if test "x$MSVC_DLL" != x; then
49980 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49981
49982 # Input might be given as Windows format, start by converting to
49983 # unix format.
49984 path="$MSVC_DLL"
49985 new_path=`$CYGPATH -u "$path"`
49986
49987 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49988 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49989 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49990 # "foo.exe" is OK but "foo" is an error.
49991 #
49992 # This test is therefore slightly more accurate than "test -f" to check for file precense.
49993 # It is also a way to make sure we got the proper file name for the real test later on.
49994 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49995 if test "x$test_shortpath" = x; then
49996 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49997 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49998 as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49999 fi
50000
50001 # Call helper function which possibly converts this using DOS-style short mode.
50002 # If so, the updated path is stored in $new_path.
50003
50004 input_path="$new_path"
50005 # Check if we need to convert this using DOS-style short mode. If the path
50006 # contains just simple characters, use it. Otherwise (spaces, weird characters),
50007 # take no chances and rewrite it.
50008 # Note: m4 eats our [], so we need to use [ and ] instead.
50009 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50010 if test "x$has_forbidden_chars" != x; then
50011 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50012 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50013 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50014 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50015 # Going to short mode and back again did indeed matter. Since short mode is
50016 # case insensitive, let's make it lowercase to improve readability.
50017 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50018 # Now convert it back to Unix-style (cygpath)
50019 input_path=`$CYGPATH -u "$shortmode_path"`
50020 new_path="$input_path"
50021 fi
50022 fi
50023
50024 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50025 if test "x$test_cygdrive_prefix" = x; then
50026 # As a simple fix, exclude /usr/bin since it's not a real path.
50027 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50028 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50029 # a path prefixed by /cygdrive for fixpath to work.
50030 new_path="$CYGWIN_ROOT_PATH$input_path"
50031 fi
50032 fi
50033
50034
50035 if test "x$path" != "x$new_path"; then
50036 MSVC_DLL="$new_path"
50037 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50038 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50039 fi
50040
50041 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50042
50043 path="$MSVC_DLL"
50044 has_colon=`$ECHO $path | $GREP ^.:`
50045 new_path="$path"
50046 if test "x$has_colon" = x; then
50047 # Not in mixed or Windows style, start by that.
50048 new_path=`cmd //c echo $path`
50049 fi
50050
50051
50052 input_path="$new_path"
50053 # Check if we need to convert this using DOS-style short mode. If the path
50054 # contains just simple characters, use it. Otherwise (spaces, weird characters),
50055 # take no chances and rewrite it.
50056 # Note: m4 eats our [], so we need to use [ and ] instead.
50057 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50058 if test "x$has_forbidden_chars" != x; then
50059 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50060 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50061 fi
50062
50063
50064 windows_path="$new_path"
50065 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50066 unix_path=`$CYGPATH -u "$windows_path"`
50067 new_path="$unix_path"
50068 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50069 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50070 new_path="$unix_path"
50071 fi
50072
50073 if test "x$path" != "x$new_path"; then
50074 MSVC_DLL="$new_path"
50075 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50076 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50077 fi
50078
50079 # Save the first 10 bytes of this path to the storage, so fixpath can work.
50080 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50081
50082 else
50083 # We're on a unix platform. Hooray! :)
50084 path="$MSVC_DLL"
50085 has_space=`$ECHO "$path" | $GREP " "`
50086 if test "x$has_space" != x; then
50087 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50088 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50089 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50090 fi
50091
50092 # Use eval to expand a potential ~
50093 eval path="$path"
50094 if test ! -f "$path" && test ! -d "$path"; then
50095 as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50096 fi
50097
50098 MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50099 fi
50100 fi
50101
50102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50103 $as_echo_n "checking for $DLL_NAME... " >&6; }
50104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50105 $as_echo "$MSVC_DLL" >&6; }
50106 else
50107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50108 $as_echo "incorrect, ignoring" >&6; }
50109 { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50110 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50111 fi
50112 fi
50113
50114 if test "x$MSVC_DLL" = x; then
50115 as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
50116 fi
50117 MSVCR_DLL="$MSVC_DLL"
50118 elif test "x$DEVKIT_MSVCR_DLL" != x; then
50119
50120 DLL_NAME="$MSVCR_NAME"
50121 POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
50122 METHOD="devkit"
50123 if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50124 { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50125 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50126
50127 # Need to check if the found msvcr is correct architecture
50128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50129 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50130 MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50131 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50132 # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50133 # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50134 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50135 CORRECT_MSVCR_ARCH="PE32 executable"
50136 else
50137 CORRECT_MSVCR_ARCH="PE32+ executable"
50138 fi
50139 else
50140 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50141 CORRECT_MSVCR_ARCH=386
50142 else
50143 CORRECT_MSVCR_ARCH=x86-64
50144 fi
50145 fi
50146 if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50148 $as_echo "ok" >&6; }
50149 MSVC_DLL="$POSSIBLE_MSVC_DLL"
50150
50151 # Only process if variable expands to non-empty
50152
50153 if test "x$MSVC_DLL" != x; then
50154 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50155
50156 # Input might be given as Windows format, start by converting to
50157 # unix format.
50158 path="$MSVC_DLL"
50159 new_path=`$CYGPATH -u "$path"`
50160
50161 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50162 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50163 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50164 # "foo.exe" is OK but "foo" is an error.
50165 #
50166 # This test is therefore slightly more accurate than "test -f" to check for file precense.
50167 # It is also a way to make sure we got the proper file name for the real test later on.
50168 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50169 if test "x$test_shortpath" = x; then
50170 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50171 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50172 as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50173 fi
50174
50175 # Call helper function which possibly converts this using DOS-style short mode.
50176 # If so, the updated path is stored in $new_path.
50177
50178 input_path="$new_path"
50179 # Check if we need to convert this using DOS-style short mode. If the path
50180 # contains just simple characters, use it. Otherwise (spaces, weird characters),
50181 # take no chances and rewrite it.
50182 # Note: m4 eats our [], so we need to use [ and ] instead.
50183 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50184 if test "x$has_forbidden_chars" != x; then
50185 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50186 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50187 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50188 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50189 # Going to short mode and back again did indeed matter. Since short mode is
50190 # case insensitive, let's make it lowercase to improve readability.
50191 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50192 # Now convert it back to Unix-style (cygpath)
50193 input_path=`$CYGPATH -u "$shortmode_path"`
50194 new_path="$input_path"
50195 fi
50196 fi
50197
50198 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50199 if test "x$test_cygdrive_prefix" = x; then
50200 # As a simple fix, exclude /usr/bin since it's not a real path.
50201 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50202 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50203 # a path prefixed by /cygdrive for fixpath to work.
50204 new_path="$CYGWIN_ROOT_PATH$input_path"
50205 fi
50206 fi
50207
50208
50209 if test "x$path" != "x$new_path"; then
50210 MSVC_DLL="$new_path"
50211 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50212 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50213 fi
50214
50215 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50216
50217 path="$MSVC_DLL"
50218 has_colon=`$ECHO $path | $GREP ^.:`
50219 new_path="$path"
50220 if test "x$has_colon" = x; then
50221 # Not in mixed or Windows style, start by that.
50222 new_path=`cmd //c echo $path`
50223 fi
50224
50225
50226 input_path="$new_path"
50227 # Check if we need to convert this using DOS-style short mode. If the path
50228 # contains just simple characters, use it. Otherwise (spaces, weird characters),
50229 # take no chances and rewrite it.
50230 # Note: m4 eats our [], so we need to use [ and ] instead.
50231 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50232 if test "x$has_forbidden_chars" != x; then
50233 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50234 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50235 fi
50236
50237
50238 windows_path="$new_path"
50239 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50240 unix_path=`$CYGPATH -u "$windows_path"`
50241 new_path="$unix_path"
50242 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50243 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50244 new_path="$unix_path"
50245 fi
50246
50247 if test "x$path" != "x$new_path"; then
50248 MSVC_DLL="$new_path"
50249 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50250 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50251 fi
50252
50253 # Save the first 10 bytes of this path to the storage, so fixpath can work.
50254 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50255
50256 else
50257 # We're on a unix platform. Hooray! :)
50258 path="$MSVC_DLL"
50259 has_space=`$ECHO "$path" | $GREP " "`
50260 if test "x$has_space" != x; then
50261 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50262 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50263 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50264 fi
50265
50266 # Use eval to expand a potential ~
50267 eval path="$path"
50268 if test ! -f "$path" && test ! -d "$path"; then
50269 as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50270 fi
50271
50272 MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50273 fi
50274 fi
50275
50276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50277 $as_echo_n "checking for $DLL_NAME... " >&6; }
50278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50279 $as_echo "$MSVC_DLL" >&6; }
50280 else
50281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50282 $as_echo "incorrect, ignoring" >&6; }
50283 { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50284 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50285 fi
50286 fi
50287
50288 if test "x$MSVC_DLL" = x; then
50289 as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
50290 fi
50291 MSVCR_DLL="$MSVC_DLL"
50292 else
50293
50294 DLL_NAME="${MSVCR_NAME}"
50295 MSVC_DLL=
50296
50297 if test "x$MSVC_DLL" = x; then
50298 # Probe: Using well-known location from Visual Studio 10.0
50299 if test "x$VCINSTALLDIR" != x; then
50300 CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
50301
50302 windows_path="$CYGWIN_VC_INSTALL_DIR"
50303 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50304 unix_path=`$CYGPATH -u "$windows_path"`
50305 CYGWIN_VC_INSTALL_DIR="$unix_path"
50306 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50307 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50308 CYGWIN_VC_INSTALL_DIR="$unix_path"
50309 fi
50310
50311 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50312 POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50313 else
50314 POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50315 fi
50316 $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
50317
50318 DLL_NAME="$DLL_NAME"
50319 POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50320 METHOD="well-known location in VCINSTALLDIR"
50321 if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50322 { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50323 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50324
50325 # Need to check if the found msvcr is correct architecture
50326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50327 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50328 MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50329 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50330 # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50331 # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50332 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50333 CORRECT_MSVCR_ARCH="PE32 executable"
50334 else
50335 CORRECT_MSVCR_ARCH="PE32+ executable"
50336 fi
50337 else
50338 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50339 CORRECT_MSVCR_ARCH=386
50340 else
50341 CORRECT_MSVCR_ARCH=x86-64
50342 fi
50343 fi
50344 if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50346 $as_echo "ok" >&6; }
50347 MSVC_DLL="$POSSIBLE_MSVC_DLL"
50348
50349 # Only process if variable expands to non-empty
50350
50351 if test "x$MSVC_DLL" != x; then
50352 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50353
50354 # Input might be given as Windows format, start by converting to
50355 # unix format.
50356 path="$MSVC_DLL"
50357 new_path=`$CYGPATH -u "$path"`
50358
50359 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50360 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50361 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50362 # "foo.exe" is OK but "foo" is an error.
50363 #
50364 # This test is therefore slightly more accurate than "test -f" to check for file precense.
50365 # It is also a way to make sure we got the proper file name for the real test later on.
50366 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50367 if test "x$test_shortpath" = x; then
50368 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50369 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50370 as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50371 fi
50372
50373 # Call helper function which possibly converts this using DOS-style short mode.
50374 # If so, the updated path is stored in $new_path.
50375
50376 input_path="$new_path"
50377 # Check if we need to convert this using DOS-style short mode. If the path
50378 # contains just simple characters, use it. Otherwise (spaces, weird characters),
50379 # take no chances and rewrite it.
50380 # Note: m4 eats our [], so we need to use [ and ] instead.
50381 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50382 if test "x$has_forbidden_chars" != x; then
50383 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50384 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50385 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50386 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50387 # Going to short mode and back again did indeed matter. Since short mode is
50388 # case insensitive, let's make it lowercase to improve readability.
50389 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50390 # Now convert it back to Unix-style (cygpath)
50391 input_path=`$CYGPATH -u "$shortmode_path"`
50392 new_path="$input_path"
50393 fi
50394 fi
50395
50396 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50397 if test "x$test_cygdrive_prefix" = x; then
50398 # As a simple fix, exclude /usr/bin since it's not a real path.
50399 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50400 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50401 # a path prefixed by /cygdrive for fixpath to work.
50402 new_path="$CYGWIN_ROOT_PATH$input_path"
50403 fi
50404 fi
50405
50406
50407 if test "x$path" != "x$new_path"; then
50408 MSVC_DLL="$new_path"
50409 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50410 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50411 fi
50412
50413 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50414
50415 path="$MSVC_DLL"
50416 has_colon=`$ECHO $path | $GREP ^.:`
50417 new_path="$path"
50418 if test "x$has_colon" = x; then
50419 # Not in mixed or Windows style, start by that.
50420 new_path=`cmd //c echo $path`
50421 fi
50422
50423
50424 input_path="$new_path"
50425 # Check if we need to convert this using DOS-style short mode. If the path
50426 # contains just simple characters, use it. Otherwise (spaces, weird characters),
50427 # take no chances and rewrite it.
50428 # Note: m4 eats our [], so we need to use [ and ] instead.
50429 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50430 if test "x$has_forbidden_chars" != x; then
50431 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50432 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50433 fi
50434
50435
50436 windows_path="$new_path"
50437 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50438 unix_path=`$CYGPATH -u "$windows_path"`
50439 new_path="$unix_path"
50440 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50441 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50442 new_path="$unix_path"
50443 fi
50444
50445 if test "x$path" != "x$new_path"; then
50446 MSVC_DLL="$new_path"
50447 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50448 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50449 fi
50450
50451 # Save the first 10 bytes of this path to the storage, so fixpath can work.
50452 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50453
50454 else
50455 # We're on a unix platform. Hooray! :)
50456 path="$MSVC_DLL"
50457 has_space=`$ECHO "$path" | $GREP " "`
50458 if test "x$has_space" != x; then
50459 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50460 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50461 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50462 fi
50463
50464 # Use eval to expand a potential ~
50465 eval path="$path"
50466 if test ! -f "$path" && test ! -d "$path"; then
50467 as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50468 fi
50469
50470 MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50471 fi
50472 fi
50473
50474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50475 $as_echo_n "checking for $DLL_NAME... " >&6; }
50476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50477 $as_echo "$MSVC_DLL" >&6; }
50478 else
50479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50480 $as_echo "incorrect, ignoring" >&6; }
50481 { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50482 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50483 fi
50484 fi
50485
50486 fi
50487 fi
50488
50489 if test "x$MSVC_DLL" = x; then
50490 # Probe: Check in the Boot JDK directory.
50491 POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
50492
50493 DLL_NAME="$DLL_NAME"
50494 POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50495 METHOD="well-known location in Boot JDK"
50496 if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50497 { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50498 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50499
50500 # Need to check if the found msvcr is correct architecture
50501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50502 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50503 MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50504 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50505 # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50506 # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50507 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50508 CORRECT_MSVCR_ARCH="PE32 executable"
50509 else
50510 CORRECT_MSVCR_ARCH="PE32+ executable"
50511 fi
50512 else
50513 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50514 CORRECT_MSVCR_ARCH=386
50515 else
50516 CORRECT_MSVCR_ARCH=x86-64
50517 fi
50518 fi
50519 if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50521 $as_echo "ok" >&6; }
50522 MSVC_DLL="$POSSIBLE_MSVC_DLL"
50523
50524 # Only process if variable expands to non-empty
50525
50526 if test "x$MSVC_DLL" != x; then
50527 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50528
50529 # Input might be given as Windows format, start by converting to
50530 # unix format.
50531 path="$MSVC_DLL"
50532 new_path=`$CYGPATH -u "$path"`
50533
50534 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50535 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50536 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50537 # "foo.exe" is OK but "foo" is an error.
50538 #
50539 # This test is therefore slightly more accurate than "test -f" to check for file precense.
50540 # It is also a way to make sure we got the proper file name for the real test later on.
50541 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50542 if test "x$test_shortpath" = x; then
50543 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50544 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50545 as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50546 fi
50547
50548 # Call helper function which possibly converts this using DOS-style short mode.
50549 # If so, the updated path is stored in $new_path.
50550
50551 input_path="$new_path"
50552 # Check if we need to convert this using DOS-style short mode. If the path
50553 # contains just simple characters, use it. Otherwise (spaces, weird characters),
50554 # take no chances and rewrite it.
50555 # Note: m4 eats our [], so we need to use [ and ] instead.
50556 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50557 if test "x$has_forbidden_chars" != x; then
50558 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50559 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50560 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50561 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50562 # Going to short mode and back again did indeed matter. Since short mode is
50563 # case insensitive, let's make it lowercase to improve readability.
50564 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50565 # Now convert it back to Unix-style (cygpath)
50566 input_path=`$CYGPATH -u "$shortmode_path"`
50567 new_path="$input_path"
50568 fi
50569 fi
50570
50571 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50572 if test "x$test_cygdrive_prefix" = x; then
50573 # As a simple fix, exclude /usr/bin since it's not a real path.
50574 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50575 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50576 # a path prefixed by /cygdrive for fixpath to work.
50577 new_path="$CYGWIN_ROOT_PATH$input_path"
50578 fi
50579 fi
50580
50581
50582 if test "x$path" != "x$new_path"; then
50583 MSVC_DLL="$new_path"
50584 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50585 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50586 fi
50587
50588 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50589
50590 path="$MSVC_DLL"
50591 has_colon=`$ECHO $path | $GREP ^.:`
50592 new_path="$path"
50593 if test "x$has_colon" = x; then
50594 # Not in mixed or Windows style, start by that.
50595 new_path=`cmd //c echo $path`
50596 fi
50597
50598
50599 input_path="$new_path"
50600 # Check if we need to convert this using DOS-style short mode. If the path
50601 # contains just simple characters, use it. Otherwise (spaces, weird characters),
50602 # take no chances and rewrite it.
50603 # Note: m4 eats our [], so we need to use [ and ] instead.
50604 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50605 if test "x$has_forbidden_chars" != x; then
50606 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50607 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50608 fi
50609
50610
50611 windows_path="$new_path"
50612 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50613 unix_path=`$CYGPATH -u "$windows_path"`
50614 new_path="$unix_path"
50615 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50616 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50617 new_path="$unix_path"
50618 fi
50619
50620 if test "x$path" != "x$new_path"; then
50621 MSVC_DLL="$new_path"
50622 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50623 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50624 fi
50625
50626 # Save the first 10 bytes of this path to the storage, so fixpath can work.
50627 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50628
50629 else
50630 # We're on a unix platform. Hooray! :)
50631 path="$MSVC_DLL"
50632 has_space=`$ECHO "$path" | $GREP " "`
50633 if test "x$has_space" != x; then
50634 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50635 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50636 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50637 fi
50638
50639 # Use eval to expand a potential ~
50640 eval path="$path"
50641 if test ! -f "$path" && test ! -d "$path"; then
50642 as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50643 fi
50644
50645 MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50646 fi
50647 fi
50648
50649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50650 $as_echo_n "checking for $DLL_NAME... " >&6; }
50651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50652 $as_echo "$MSVC_DLL" >&6; }
50653 else
50654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50655 $as_echo "incorrect, ignoring" >&6; }
50656 { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50657 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50658 fi
50659 fi
50660
50661 fi
50662
50663 if test "x$MSVC_DLL" = x; then
50664 # Probe: Look in the Windows system32 directory
50665 CYGWIN_SYSTEMROOT="$SYSTEMROOT"
50666
50667 windows_path="$CYGWIN_SYSTEMROOT"
50668 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50669 unix_path=`$CYGPATH -u "$windows_path"`
50670 CYGWIN_SYSTEMROOT="$unix_path"
50671 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50672 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50673 CYGWIN_SYSTEMROOT="$unix_path"
50674 fi
50675
50676 POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
50677
50678 DLL_NAME="$DLL_NAME"
50679 POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50680 METHOD="well-known location in SYSTEMROOT"
50681 if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50682 { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50683 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50684
50685 # Need to check if the found msvcr is correct architecture
50686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50687 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50688 MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50689 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50690 # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50691 # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50692 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50693 CORRECT_MSVCR_ARCH="PE32 executable"
50694 else
50695 CORRECT_MSVCR_ARCH="PE32+ executable"
50696 fi
50697 else
50698 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50699 CORRECT_MSVCR_ARCH=386
50700 else
50701 CORRECT_MSVCR_ARCH=x86-64
50702 fi
50703 fi
50704 if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50706 $as_echo "ok" >&6; }
50707 MSVC_DLL="$POSSIBLE_MSVC_DLL"
50708
50709 # Only process if variable expands to non-empty
50710
50711 if test "x$MSVC_DLL" != x; then
50712 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50713
50714 # Input might be given as Windows format, start by converting to
50715 # unix format.
50716 path="$MSVC_DLL"
50717 new_path=`$CYGPATH -u "$path"`
50718
50719 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50720 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50721 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50722 # "foo.exe" is OK but "foo" is an error.
50723 #
50724 # This test is therefore slightly more accurate than "test -f" to check for file precense.
50725 # It is also a way to make sure we got the proper file name for the real test later on.
50726 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50727 if test "x$test_shortpath" = x; then
50728 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50729 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50730 as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50731 fi
50732
50733 # Call helper function which possibly converts this using DOS-style short mode.
50734 # If so, the updated path is stored in $new_path.
50735
50736 input_path="$new_path"
50737 # Check if we need to convert this using DOS-style short mode. If the path
50738 # contains just simple characters, use it. Otherwise (spaces, weird characters),
50739 # take no chances and rewrite it.
50740 # Note: m4 eats our [], so we need to use [ and ] instead.
50741 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50742 if test "x$has_forbidden_chars" != x; then
50743 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50744 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50745 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50746 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50747 # Going to short mode and back again did indeed matter. Since short mode is
50748 # case insensitive, let's make it lowercase to improve readability.
50749 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50750 # Now convert it back to Unix-style (cygpath)
50751 input_path=`$CYGPATH -u "$shortmode_path"`
50752 new_path="$input_path"
50753 fi
50754 fi
50755
50756 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50757 if test "x$test_cygdrive_prefix" = x; then
50758 # As a simple fix, exclude /usr/bin since it's not a real path.
50759 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50760 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50761 # a path prefixed by /cygdrive for fixpath to work.
50762 new_path="$CYGWIN_ROOT_PATH$input_path"
50763 fi
50764 fi
50765
50766
50767 if test "x$path" != "x$new_path"; then
50768 MSVC_DLL="$new_path"
50769 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50770 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50771 fi
50772
50773 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50774
50775 path="$MSVC_DLL"
50776 has_colon=`$ECHO $path | $GREP ^.:`
50777 new_path="$path"
50778 if test "x$has_colon" = x; then
50779 # Not in mixed or Windows style, start by that.
50780 new_path=`cmd //c echo $path`
50781 fi
50782
50783
50784 input_path="$new_path"
50785 # Check if we need to convert this using DOS-style short mode. If the path
50786 # contains just simple characters, use it. Otherwise (spaces, weird characters),
50787 # take no chances and rewrite it.
50788 # Note: m4 eats our [], so we need to use [ and ] instead.
50789 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50790 if test "x$has_forbidden_chars" != x; then
50791 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50792 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50793 fi
50794
50795
50796 windows_path="$new_path"
50797 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50798 unix_path=`$CYGPATH -u "$windows_path"`
50799 new_path="$unix_path"
50800 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50801 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50802 new_path="$unix_path"
50803 fi
50804
50805 if test "x$path" != "x$new_path"; then
50806 MSVC_DLL="$new_path"
50807 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50808 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50809 fi
50810
50811 # Save the first 10 bytes of this path to the storage, so fixpath can work.
50812 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50813
50814 else
50815 # We're on a unix platform. Hooray! :)
50816 path="$MSVC_DLL"
50817 has_space=`$ECHO "$path" | $GREP " "`
50818 if test "x$has_space" != x; then
50819 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50820 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50821 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50822 fi
50823
50824 # Use eval to expand a potential ~
50825 eval path="$path"
50826 if test ! -f "$path" && test ! -d "$path"; then
50827 as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50828 fi
50829
50830 MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50831 fi
50832 fi
50833
50834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50835 $as_echo_n "checking for $DLL_NAME... " >&6; }
50836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50837 $as_echo "$MSVC_DLL" >&6; }
50838 else
50839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50840 $as_echo "incorrect, ignoring" >&6; }
50841 { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50842 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50843 fi
50844 fi
50845
50846 fi
50847
50848 if test "x$MSVC_DLL" = x; then
50849 # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50850 if test "x$VS100COMNTOOLS" != x; then
50851 CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50852
50853 windows_path="$CYGWIN_VS_TOOLS_DIR"
50854 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50855 unix_path=`$CYGPATH -u "$windows_path"`
50856 CYGWIN_VS_TOOLS_DIR="$unix_path"
50857 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50858 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50859 CYGWIN_VS_TOOLS_DIR="$unix_path"
50860 fi
50861
50862 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50863 POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50864 | $GREP -i /x64/ | $HEAD --lines 1`
50865 else
50866 POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50867 | $GREP -i /x86/ | $HEAD --lines 1`
50868 fi
50869
50870 DLL_NAME="$DLL_NAME"
50871 POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50872 METHOD="search of VS100COMNTOOLS"
50873 if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50874 { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50875 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50876
50877 # Need to check if the found msvcr is correct architecture
50878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50879 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50880 MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50881 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50882 # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50883 # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50884 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50885 CORRECT_MSVCR_ARCH="PE32 executable"
50886 else
50887 CORRECT_MSVCR_ARCH="PE32+ executable"
50888 fi
50889 else
50890 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50891 CORRECT_MSVCR_ARCH=386
50892 else
50893 CORRECT_MSVCR_ARCH=x86-64
50894 fi
50895 fi
50896 if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50898 $as_echo "ok" >&6; }
50899 MSVC_DLL="$POSSIBLE_MSVC_DLL"
50900
50901 # Only process if variable expands to non-empty
50902
50903 if test "x$MSVC_DLL" != x; then
50904 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50905
50906 # Input might be given as Windows format, start by converting to
50907 # unix format.
50908 path="$MSVC_DLL"
50909 new_path=`$CYGPATH -u "$path"`
50910
50911 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50912 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50913 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50914 # "foo.exe" is OK but "foo" is an error.
50915 #
50916 # This test is therefore slightly more accurate than "test -f" to check for file precense.
50917 # It is also a way to make sure we got the proper file name for the real test later on.
50918 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50919 if test "x$test_shortpath" = x; then
50920 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50921 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50922 as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50923 fi
50924
50925 # Call helper function which possibly converts this using DOS-style short mode.
50926 # If so, the updated path is stored in $new_path.
50927
50928 input_path="$new_path"
50929 # Check if we need to convert this using DOS-style short mode. If the path
50930 # contains just simple characters, use it. Otherwise (spaces, weird characters),
50931 # take no chances and rewrite it.
50932 # Note: m4 eats our [], so we need to use [ and ] instead.
50933 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50934 if test "x$has_forbidden_chars" != x; then
50935 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50936 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50937 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50938 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50939 # Going to short mode and back again did indeed matter. Since short mode is
50940 # case insensitive, let's make it lowercase to improve readability.
50941 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50942 # Now convert it back to Unix-style (cygpath)
50943 input_path=`$CYGPATH -u "$shortmode_path"`
50944 new_path="$input_path"
50945 fi
50946 fi
50947
50948 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50949 if test "x$test_cygdrive_prefix" = x; then
50950 # As a simple fix, exclude /usr/bin since it's not a real path.
50951 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50952 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50953 # a path prefixed by /cygdrive for fixpath to work.
50954 new_path="$CYGWIN_ROOT_PATH$input_path"
50955 fi
50956 fi
50957
50958
50959 if test "x$path" != "x$new_path"; then
50960 MSVC_DLL="$new_path"
50961 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50962 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50963 fi
50964
50965 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50966
50967 path="$MSVC_DLL"
50968 has_colon=`$ECHO $path | $GREP ^.:`
50969 new_path="$path"
50970 if test "x$has_colon" = x; then
50971 # Not in mixed or Windows style, start by that.
50972 new_path=`cmd //c echo $path`
50973 fi
50974
50975
50976 input_path="$new_path"
50977 # Check if we need to convert this using DOS-style short mode. If the path
50978 # contains just simple characters, use it. Otherwise (spaces, weird characters),
50979 # take no chances and rewrite it.
50980 # Note: m4 eats our [], so we need to use [ and ] instead.
50981 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50982 if test "x$has_forbidden_chars" != x; then
50983 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50984 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50985 fi
50986
50987
50988 windows_path="$new_path"
50989 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50990 unix_path=`$CYGPATH -u "$windows_path"`
50991 new_path="$unix_path"
50992 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50993 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50994 new_path="$unix_path"
50995 fi
50996
50997 if test "x$path" != "x$new_path"; then
50998 MSVC_DLL="$new_path"
50999 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51000 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51001 fi
51002
51003 # Save the first 10 bytes of this path to the storage, so fixpath can work.
51004 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51005
51006 else
51007 # We're on a unix platform. Hooray! :)
51008 path="$MSVC_DLL"
51009 has_space=`$ECHO "$path" | $GREP " "`
51010 if test "x$has_space" != x; then
51011 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51012 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51013 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51014 fi
51015
51016 # Use eval to expand a potential ~
51017 eval path="$path"
51018 if test ! -f "$path" && test ! -d "$path"; then
51019 as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51020 fi
51021
51022 MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51023 fi
51024 fi
51025
51026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51027 $as_echo_n "checking for $DLL_NAME... " >&6; }
51028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51029 $as_echo "$MSVC_DLL" >&6; }
51030 else
51031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51032 $as_echo "incorrect, ignoring" >&6; }
51033 { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51034 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51035 fi
51036 fi
51037
51038 fi
51039 fi
51040
51041 if test "x$MSVC_DLL" = x; then
51042 # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
51043 # (This was the original behaviour; kept since it might turn something up)
51044 if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
51045 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51046 POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51047 | $GREP x64 | $HEAD --lines 1`
51048 else
51049 POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51050 | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
51051 if test "x$POSSIBLE_MSVC_DLL" = x; then
51052 # We're grasping at straws now...
51053 POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51054 | $HEAD --lines 1`
51055 fi
51056 fi
51057
51058
51059 DLL_NAME="$DLL_NAME"
51060 POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51061 METHOD="search of VCINSTALLDIR"
51062 if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51063 { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51064 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51065
51066 # Need to check if the found msvcr is correct architecture
51067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51068 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51069 MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51070 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51071 # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51072 # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51073 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51074 CORRECT_MSVCR_ARCH="PE32 executable"
51075 else
51076 CORRECT_MSVCR_ARCH="PE32+ executable"
51077 fi
51078 else
51079 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51080 CORRECT_MSVCR_ARCH=386
51081 else
51082 CORRECT_MSVCR_ARCH=x86-64
51083 fi
51084 fi
51085 if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51087 $as_echo "ok" >&6; }
51088 MSVC_DLL="$POSSIBLE_MSVC_DLL"
51089
51090 # Only process if variable expands to non-empty
51091
51092 if test "x$MSVC_DLL" != x; then
51093 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51094
51095 # Input might be given as Windows format, start by converting to
51096 # unix format.
51097 path="$MSVC_DLL"
51098 new_path=`$CYGPATH -u "$path"`
51099
51100 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51101 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51102 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51103 # "foo.exe" is OK but "foo" is an error.
51104 #
51105 # This test is therefore slightly more accurate than "test -f" to check for file precense.
51106 # It is also a way to make sure we got the proper file name for the real test later on.
51107 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51108 if test "x$test_shortpath" = x; then
51109 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51110 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51111 as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51112 fi
51113
51114 # Call helper function which possibly converts this using DOS-style short mode.
51115 # If so, the updated path is stored in $new_path.
51116
51117 input_path="$new_path"
51118 # Check if we need to convert this using DOS-style short mode. If the path
51119 # contains just simple characters, use it. Otherwise (spaces, weird characters),
51120 # take no chances and rewrite it.
51121 # Note: m4 eats our [], so we need to use [ and ] instead.
51122 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51123 if test "x$has_forbidden_chars" != x; then
51124 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51125 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51126 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51127 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51128 # Going to short mode and back again did indeed matter. Since short mode is
51129 # case insensitive, let's make it lowercase to improve readability.
51130 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51131 # Now convert it back to Unix-style (cygpath)
51132 input_path=`$CYGPATH -u "$shortmode_path"`
51133 new_path="$input_path"
51134 fi
51135 fi
51136
51137 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51138 if test "x$test_cygdrive_prefix" = x; then
51139 # As a simple fix, exclude /usr/bin since it's not a real path.
51140 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51141 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51142 # a path prefixed by /cygdrive for fixpath to work.
51143 new_path="$CYGWIN_ROOT_PATH$input_path"
51144 fi
51145 fi
51146
51147
51148 if test "x$path" != "x$new_path"; then
51149 MSVC_DLL="$new_path"
51150 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51151 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51152 fi
51153
51154 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51155
51156 path="$MSVC_DLL"
51157 has_colon=`$ECHO $path | $GREP ^.:`
51158 new_path="$path"
51159 if test "x$has_colon" = x; then
51160 # Not in mixed or Windows style, start by that.
51161 new_path=`cmd //c echo $path`
51162 fi
51163
51164
51165 input_path="$new_path"
51166 # Check if we need to convert this using DOS-style short mode. If the path
51167 # contains just simple characters, use it. Otherwise (spaces, weird characters),
51168 # take no chances and rewrite it.
51169 # Note: m4 eats our [], so we need to use [ and ] instead.
51170 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51171 if test "x$has_forbidden_chars" != x; then
51172 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51173 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51174 fi
51175
51176
51177 windows_path="$new_path"
51178 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51179 unix_path=`$CYGPATH -u "$windows_path"`
51180 new_path="$unix_path"
51181 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51182 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51183 new_path="$unix_path"
51184 fi
51185
51186 if test "x$path" != "x$new_path"; then
51187 MSVC_DLL="$new_path"
51188 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51189 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51190 fi
51191
51192 # Save the first 10 bytes of this path to the storage, so fixpath can work.
51193 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51194
51195 else
51196 # We're on a unix platform. Hooray! :)
51197 path="$MSVC_DLL"
51198 has_space=`$ECHO "$path" | $GREP " "`
51199 if test "x$has_space" != x; then
51200 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51201 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51202 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51203 fi
51204
51205 # Use eval to expand a potential ~
51206 eval path="$path"
51207 if test ! -f "$path" && test ! -d "$path"; then
51208 as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51209 fi
51210
51211 MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51212 fi
51213 fi
51214
51215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51216 $as_echo_n "checking for $DLL_NAME... " >&6; }
51217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51218 $as_echo "$MSVC_DLL" >&6; }
51219 else
51220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51221 $as_echo "incorrect, ignoring" >&6; }
51222 { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51223 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51224 fi
51225 fi
51226
51227 fi
51228 fi
51229
51230 if test "x$MSVC_DLL" = x; then
51231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51232 $as_echo_n "checking for $DLL_NAME... " >&6; }
51233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51234 $as_echo "no" >&6; }
51235 as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
51236 fi
51237
51238 MSVCR_DLL="$MSVC_DLL"
51239 fi
51240
51241
51242
51243 # Check whether --with-msvcp-dll was given.
51244 if test "${with_msvcp_dll+set}" = set; then :
51245 withval=$with_msvcp_dll;
51246 fi
51247
51248
51249 if test "x$MSVCP_NAME" != "x"; then
51250 if test "x$with_msvcp_dll" != x; then
51251 # If given explicitely by user, do not probe. If not present, fail directly.
51252
51253 DLL_NAME="$MSVCP_NAME"
51254 POSSIBLE_MSVC_DLL="$with_msvcp_dll"
51255 METHOD="--with-msvcp-dll"
51256 if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51257 { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51258 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51259
51260 # Need to check if the found msvcr is correct architecture
51261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51262 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51263 MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51264 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51265 # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51266 # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51267 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51268 CORRECT_MSVCR_ARCH="PE32 executable"
51269 else
51270 CORRECT_MSVCR_ARCH="PE32+ executable"
51271 fi
51272 else
51273 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51274 CORRECT_MSVCR_ARCH=386
51275 else
51276 CORRECT_MSVCR_ARCH=x86-64
51277 fi
51278 fi
51279 if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51281 $as_echo "ok" >&6; }
51282 MSVC_DLL="$POSSIBLE_MSVC_DLL"
51283
51284 # Only process if variable expands to non-empty
51285
51286 if test "x$MSVC_DLL" != x; then
51287 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51288
51289 # Input might be given as Windows format, start by converting to
51290 # unix format.
51291 path="$MSVC_DLL"
51292 new_path=`$CYGPATH -u "$path"`
51293
51294 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51295 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51296 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51297 # "foo.exe" is OK but "foo" is an error.
51298 #
51299 # This test is therefore slightly more accurate than "test -f" to check for file precense.
51300 # It is also a way to make sure we got the proper file name for the real test later on.
51301 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51302 if test "x$test_shortpath" = x; then
51303 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51304 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51305 as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51306 fi
51307
51308 # Call helper function which possibly converts this using DOS-style short mode.
51309 # If so, the updated path is stored in $new_path.
51310
51311 input_path="$new_path"
51312 # Check if we need to convert this using DOS-style short mode. If the path
51313 # contains just simple characters, use it. Otherwise (spaces, weird characters),
51314 # take no chances and rewrite it.
51315 # Note: m4 eats our [], so we need to use [ and ] instead.
51316 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51317 if test "x$has_forbidden_chars" != x; then
51318 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51319 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51320 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51321 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51322 # Going to short mode and back again did indeed matter. Since short mode is
51323 # case insensitive, let's make it lowercase to improve readability.
51324 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51325 # Now convert it back to Unix-style (cygpath)
51326 input_path=`$CYGPATH -u "$shortmode_path"`
51327 new_path="$input_path"
51328 fi
51329 fi
51330
51331 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51332 if test "x$test_cygdrive_prefix" = x; then
51333 # As a simple fix, exclude /usr/bin since it's not a real path.
51334 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51335 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51336 # a path prefixed by /cygdrive for fixpath to work.
51337 new_path="$CYGWIN_ROOT_PATH$input_path"
51338 fi
51339 fi
51340
51341
51342 if test "x$path" != "x$new_path"; then
51343 MSVC_DLL="$new_path"
51344 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51345 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51346 fi
51347
51348 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51349
51350 path="$MSVC_DLL"
51351 has_colon=`$ECHO $path | $GREP ^.:`
51352 new_path="$path"
51353 if test "x$has_colon" = x; then
51354 # Not in mixed or Windows style, start by that.
51355 new_path=`cmd //c echo $path`
51356 fi
51357
51358
51359 input_path="$new_path"
51360 # Check if we need to convert this using DOS-style short mode. If the path
51361 # contains just simple characters, use it. Otherwise (spaces, weird characters),
51362 # take no chances and rewrite it.
51363 # Note: m4 eats our [], so we need to use [ and ] instead.
51364 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51365 if test "x$has_forbidden_chars" != x; then
51366 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51367 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51368 fi
51369
51370
51371 windows_path="$new_path"
51372 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51373 unix_path=`$CYGPATH -u "$windows_path"`
51374 new_path="$unix_path"
51375 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51376 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51377 new_path="$unix_path"
51378 fi
51379
51380 if test "x$path" != "x$new_path"; then
51381 MSVC_DLL="$new_path"
51382 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51383 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51384 fi
51385
51386 # Save the first 10 bytes of this path to the storage, so fixpath can work.
51387 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51388
51389 else
51390 # We're on a unix platform. Hooray! :)
51391 path="$MSVC_DLL"
51392 has_space=`$ECHO "$path" | $GREP " "`
51393 if test "x$has_space" != x; then
51394 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51395 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51396 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51397 fi
51398
51399 # Use eval to expand a potential ~
51400 eval path="$path"
51401 if test ! -f "$path" && test ! -d "$path"; then
51402 as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51403 fi
51404
51405 MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51406 fi
51407 fi
51408
51409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51410 $as_echo_n "checking for $DLL_NAME... " >&6; }
51411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51412 $as_echo "$MSVC_DLL" >&6; }
51413 else
51414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51415 $as_echo "incorrect, ignoring" >&6; }
51416 { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51417 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51418 fi
51419 fi
51420
51421 if test "x$MSVC_DLL" = x; then
51422 as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
51423 fi
51424 MSVCP_DLL="$MSVC_DLL"
51425 elif test "x$DEVKIT_MSVCP_DLL" != x; then
51426
51427 DLL_NAME="$MSVCP_NAME"
51428 POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
51429 METHOD="devkit"
51430 if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51431 { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51432 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51433
51434 # Need to check if the found msvcr is correct architecture
51435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51436 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51437 MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51438 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51439 # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51440 # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51441 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51442 CORRECT_MSVCR_ARCH="PE32 executable"
51443 else
51444 CORRECT_MSVCR_ARCH="PE32+ executable"
51445 fi
51446 else
51447 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51448 CORRECT_MSVCR_ARCH=386
51449 else
51450 CORRECT_MSVCR_ARCH=x86-64
51451 fi
51452 fi
51453 if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51455 $as_echo "ok" >&6; }
51456 MSVC_DLL="$POSSIBLE_MSVC_DLL"
51457
51458 # Only process if variable expands to non-empty
51459
51460 if test "x$MSVC_DLL" != x; then
51461 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51462
51463 # Input might be given as Windows format, start by converting to
51464 # unix format.
51465 path="$MSVC_DLL"
51466 new_path=`$CYGPATH -u "$path"`
51467
51468 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51469 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51470 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51471 # "foo.exe" is OK but "foo" is an error.
51472 #
51473 # This test is therefore slightly more accurate than "test -f" to check for file precense.
51474 # It is also a way to make sure we got the proper file name for the real test later on.
51475 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51476 if test "x$test_shortpath" = x; then
51477 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51478 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51479 as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51480 fi
51481
51482 # Call helper function which possibly converts this using DOS-style short mode.
51483 # If so, the updated path is stored in $new_path.
51484
51485 input_path="$new_path"
51486 # Check if we need to convert this using DOS-style short mode. If the path
51487 # contains just simple characters, use it. Otherwise (spaces, weird characters),
51488 # take no chances and rewrite it.
51489 # Note: m4 eats our [], so we need to use [ and ] instead.
51490 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51491 if test "x$has_forbidden_chars" != x; then
51492 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51493 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51494 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51495 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51496 # Going to short mode and back again did indeed matter. Since short mode is
51497 # case insensitive, let's make it lowercase to improve readability.
51498 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51499 # Now convert it back to Unix-style (cygpath)
51500 input_path=`$CYGPATH -u "$shortmode_path"`
51501 new_path="$input_path"
51502 fi
51503 fi
51504
51505 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51506 if test "x$test_cygdrive_prefix" = x; then
51507 # As a simple fix, exclude /usr/bin since it's not a real path.
51508 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51509 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51510 # a path prefixed by /cygdrive for fixpath to work.
51511 new_path="$CYGWIN_ROOT_PATH$input_path"
51512 fi
51513 fi
51514
51515
51516 if test "x$path" != "x$new_path"; then
51517 MSVC_DLL="$new_path"
51518 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51519 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51520 fi
51521
51522 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51523
51524 path="$MSVC_DLL"
51525 has_colon=`$ECHO $path | $GREP ^.:`
51526 new_path="$path"
51527 if test "x$has_colon" = x; then
51528 # Not in mixed or Windows style, start by that.
51529 new_path=`cmd //c echo $path`
51530 fi
51531
51532
51533 input_path="$new_path"
51534 # Check if we need to convert this using DOS-style short mode. If the path
51535 # contains just simple characters, use it. Otherwise (spaces, weird characters),
51536 # take no chances and rewrite it.
51537 # Note: m4 eats our [], so we need to use [ and ] instead.
51538 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51539 if test "x$has_forbidden_chars" != x; then
51540 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51541 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51542 fi
51543
51544
51545 windows_path="$new_path"
51546 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51547 unix_path=`$CYGPATH -u "$windows_path"`
51548 new_path="$unix_path"
51549 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51550 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51551 new_path="$unix_path"
51552 fi
51553
51554 if test "x$path" != "x$new_path"; then
51555 MSVC_DLL="$new_path"
51556 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51557 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51558 fi
51559
51560 # Save the first 10 bytes of this path to the storage, so fixpath can work.
51561 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51562
51563 else
51564 # We're on a unix platform. Hooray! :)
51565 path="$MSVC_DLL"
51566 has_space=`$ECHO "$path" | $GREP " "`
51567 if test "x$has_space" != x; then
51568 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51569 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51570 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51571 fi
51572
51573 # Use eval to expand a potential ~
51574 eval path="$path"
51575 if test ! -f "$path" && test ! -d "$path"; then
51576 as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51577 fi
51578
51579 MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51580 fi
51581 fi
51582
51583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51584 $as_echo_n "checking for $DLL_NAME... " >&6; }
51585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51586 $as_echo "$MSVC_DLL" >&6; }
51587 else
51588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51589 $as_echo "incorrect, ignoring" >&6; }
51590 { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51591 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51592 fi
51593 fi
51594
51595 if test "x$MSVC_DLL" = x; then
51596 as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
51597 fi
51598 MSVCP_DLL="$MSVC_DLL"
51599 else
51600
51601 DLL_NAME="${MSVCP_NAME}"
51602 MSVC_DLL=
51603
51604 if test "x$MSVC_DLL" = x; then
51605 # Probe: Using well-known location from Visual Studio 10.0
51606 if test "x$VCINSTALLDIR" != x; then
51607 CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
51608
51609 windows_path="$CYGWIN_VC_INSTALL_DIR"
51610 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51611 unix_path=`$CYGPATH -u "$windows_path"`
51612 CYGWIN_VC_INSTALL_DIR="$unix_path"
51613 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51614 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51615 CYGWIN_VC_INSTALL_DIR="$unix_path"
51616 fi
51617
51618 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51619 POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
51620 else
51621 POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
51622 fi
51623 $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
51624
51625 DLL_NAME="$DLL_NAME"
51626 POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51627 METHOD="well-known location in VCINSTALLDIR"
51628 if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51629 { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51630 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51631
51632 # Need to check if the found msvcr is correct architecture
51633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51634 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51635 MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51636 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51637 # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51638 # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51639 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51640 CORRECT_MSVCR_ARCH="PE32 executable"
51641 else
51642 CORRECT_MSVCR_ARCH="PE32+ executable"
51643 fi
51644 else
51645 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51646 CORRECT_MSVCR_ARCH=386
51647 else
51648 CORRECT_MSVCR_ARCH=x86-64
51649 fi
51650 fi
51651 if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51653 $as_echo "ok" >&6; }
51654 MSVC_DLL="$POSSIBLE_MSVC_DLL"
51655
51656 # Only process if variable expands to non-empty
51657
51658 if test "x$MSVC_DLL" != x; then
51659 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51660
51661 # Input might be given as Windows format, start by converting to
51662 # unix format.
51663 path="$MSVC_DLL"
51664 new_path=`$CYGPATH -u "$path"`
51665
51666 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51667 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51668 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51669 # "foo.exe" is OK but "foo" is an error.
51670 #
51671 # This test is therefore slightly more accurate than "test -f" to check for file precense.
51672 # It is also a way to make sure we got the proper file name for the real test later on.
51673 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51674 if test "x$test_shortpath" = x; then
51675 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51676 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51677 as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51678 fi
51679
51680 # Call helper function which possibly converts this using DOS-style short mode.
51681 # If so, the updated path is stored in $new_path.
51682
51683 input_path="$new_path"
51684 # Check if we need to convert this using DOS-style short mode. If the path
51685 # contains just simple characters, use it. Otherwise (spaces, weird characters),
51686 # take no chances and rewrite it.
51687 # Note: m4 eats our [], so we need to use [ and ] instead.
51688 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51689 if test "x$has_forbidden_chars" != x; then
51690 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51691 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51692 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51693 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51694 # Going to short mode and back again did indeed matter. Since short mode is
51695 # case insensitive, let's make it lowercase to improve readability.
51696 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51697 # Now convert it back to Unix-style (cygpath)
51698 input_path=`$CYGPATH -u "$shortmode_path"`
51699 new_path="$input_path"
51700 fi
51701 fi
51702
51703 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51704 if test "x$test_cygdrive_prefix" = x; then
51705 # As a simple fix, exclude /usr/bin since it's not a real path.
51706 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51707 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51708 # a path prefixed by /cygdrive for fixpath to work.
51709 new_path="$CYGWIN_ROOT_PATH$input_path"
51710 fi
51711 fi
51712
51713
51714 if test "x$path" != "x$new_path"; then
51715 MSVC_DLL="$new_path"
51716 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51717 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51718 fi
51719
51720 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51721
51722 path="$MSVC_DLL"
51723 has_colon=`$ECHO $path | $GREP ^.:`
51724 new_path="$path"
51725 if test "x$has_colon" = x; then
51726 # Not in mixed or Windows style, start by that.
51727 new_path=`cmd //c echo $path`
51728 fi
51729
51730
51731 input_path="$new_path"
51732 # Check if we need to convert this using DOS-style short mode. If the path
51733 # contains just simple characters, use it. Otherwise (spaces, weird characters),
51734 # take no chances and rewrite it.
51735 # Note: m4 eats our [], so we need to use [ and ] instead.
51736 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51737 if test "x$has_forbidden_chars" != x; then
51738 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51739 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51740 fi
51741
51742
51743 windows_path="$new_path"
51744 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51745 unix_path=`$CYGPATH -u "$windows_path"`
51746 new_path="$unix_path"
51747 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51748 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51749 new_path="$unix_path"
51750 fi
51751
51752 if test "x$path" != "x$new_path"; then
51753 MSVC_DLL="$new_path"
51754 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51755 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51756 fi
51757
51758 # Save the first 10 bytes of this path to the storage, so fixpath can work.
51759 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51760
51761 else
51762 # We're on a unix platform. Hooray! :)
51763 path="$MSVC_DLL"
51764 has_space=`$ECHO "$path" | $GREP " "`
51765 if test "x$has_space" != x; then
51766 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51767 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51768 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51769 fi
51770
51771 # Use eval to expand a potential ~
51772 eval path="$path"
51773 if test ! -f "$path" && test ! -d "$path"; then
51774 as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51775 fi
51776
51777 MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51778 fi
51779 fi
51780
51781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51782 $as_echo_n "checking for $DLL_NAME... " >&6; }
51783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51784 $as_echo "$MSVC_DLL" >&6; }
51785 else
51786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51787 $as_echo "incorrect, ignoring" >&6; }
51788 { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51789 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51790 fi
51791 fi
51792
51793 fi
51794 fi
51795
51796 if test "x$MSVC_DLL" = x; then
51797 # Probe: Check in the Boot JDK directory.
51798 POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
51799
51800 DLL_NAME="$DLL_NAME"
51801 POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51802 METHOD="well-known location in Boot JDK"
51803 if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51804 { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51805 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51806
51807 # Need to check if the found msvcr is correct architecture
51808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51809 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51810 MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51811 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51812 # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51813 # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51814 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51815 CORRECT_MSVCR_ARCH="PE32 executable"
51816 else
51817 CORRECT_MSVCR_ARCH="PE32+ executable"
51818 fi
51819 else
51820 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51821 CORRECT_MSVCR_ARCH=386
51822 else
51823 CORRECT_MSVCR_ARCH=x86-64
51824 fi
51825 fi
51826 if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51828 $as_echo "ok" >&6; }
51829 MSVC_DLL="$POSSIBLE_MSVC_DLL"
51830
51831 # Only process if variable expands to non-empty
51832
51833 if test "x$MSVC_DLL" != x; then
51834 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51835
51836 # Input might be given as Windows format, start by converting to
51837 # unix format.
51838 path="$MSVC_DLL"
51839 new_path=`$CYGPATH -u "$path"`
51840
51841 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51842 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51843 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51844 # "foo.exe" is OK but "foo" is an error.
51845 #
51846 # This test is therefore slightly more accurate than "test -f" to check for file precense.
51847 # It is also a way to make sure we got the proper file name for the real test later on.
51848 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51849 if test "x$test_shortpath" = x; then
51850 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51851 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51852 as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51853 fi
51854
51855 # Call helper function which possibly converts this using DOS-style short mode.
51856 # If so, the updated path is stored in $new_path.
51857
51858 input_path="$new_path"
51859 # Check if we need to convert this using DOS-style short mode. If the path
51860 # contains just simple characters, use it. Otherwise (spaces, weird characters),
51861 # take no chances and rewrite it.
51862 # Note: m4 eats our [], so we need to use [ and ] instead.
51863 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51864 if test "x$has_forbidden_chars" != x; then
51865 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51866 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51867 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51868 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51869 # Going to short mode and back again did indeed matter. Since short mode is
51870 # case insensitive, let's make it lowercase to improve readability.
51871 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51872 # Now convert it back to Unix-style (cygpath)
51873 input_path=`$CYGPATH -u "$shortmode_path"`
51874 new_path="$input_path"
51875 fi
51876 fi
51877
51878 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51879 if test "x$test_cygdrive_prefix" = x; then
51880 # As a simple fix, exclude /usr/bin since it's not a real path.
51881 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51882 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51883 # a path prefixed by /cygdrive for fixpath to work.
51884 new_path="$CYGWIN_ROOT_PATH$input_path"
51885 fi
51886 fi
51887
51888
51889 if test "x$path" != "x$new_path"; then
51890 MSVC_DLL="$new_path"
51891 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51892 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51893 fi
51894
51895 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51896
51897 path="$MSVC_DLL"
51898 has_colon=`$ECHO $path | $GREP ^.:`
51899 new_path="$path"
51900 if test "x$has_colon" = x; then
51901 # Not in mixed or Windows style, start by that.
51902 new_path=`cmd //c echo $path`
51903 fi
51904
51905
51906 input_path="$new_path"
51907 # Check if we need to convert this using DOS-style short mode. If the path
51908 # contains just simple characters, use it. Otherwise (spaces, weird characters),
51909 # take no chances and rewrite it.
51910 # Note: m4 eats our [], so we need to use [ and ] instead.
51911 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51912 if test "x$has_forbidden_chars" != x; then
51913 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51914 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51915 fi
51916
51917
51918 windows_path="$new_path"
51919 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51920 unix_path=`$CYGPATH -u "$windows_path"`
51921 new_path="$unix_path"
51922 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51923 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51924 new_path="$unix_path"
51925 fi
51926
51927 if test "x$path" != "x$new_path"; then
51928 MSVC_DLL="$new_path"
51929 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51930 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51931 fi
51932
51933 # Save the first 10 bytes of this path to the storage, so fixpath can work.
51934 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51935
51936 else
51937 # We're on a unix platform. Hooray! :)
51938 path="$MSVC_DLL"
51939 has_space=`$ECHO "$path" | $GREP " "`
51940 if test "x$has_space" != x; then
51941 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51942 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51943 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51944 fi
51945
51946 # Use eval to expand a potential ~
51947 eval path="$path"
51948 if test ! -f "$path" && test ! -d "$path"; then
51949 as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51950 fi
51951
51952 MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51953 fi
51954 fi
51955
51956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51957 $as_echo_n "checking for $DLL_NAME... " >&6; }
51958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51959 $as_echo "$MSVC_DLL" >&6; }
51960 else
51961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51962 $as_echo "incorrect, ignoring" >&6; }
51963 { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51964 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51965 fi
51966 fi
51967
51968 fi
51969
51970 if test "x$MSVC_DLL" = x; then
51971 # Probe: Look in the Windows system32 directory
51972 CYGWIN_SYSTEMROOT="$SYSTEMROOT"
51973
51974 windows_path="$CYGWIN_SYSTEMROOT"
51975 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51976 unix_path=`$CYGPATH -u "$windows_path"`
51977 CYGWIN_SYSTEMROOT="$unix_path"
51978 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51979 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51980 CYGWIN_SYSTEMROOT="$unix_path"
51981 fi
51982
51983 POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
51984
51985 DLL_NAME="$DLL_NAME"
51986 POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51987 METHOD="well-known location in SYSTEMROOT"
51988 if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51989 { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51990 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51991
51992 # Need to check if the found msvcr is correct architecture
51993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51994 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51995 MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51996 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51997 # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51998 # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51999 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52000 CORRECT_MSVCR_ARCH="PE32 executable"
52001 else
52002 CORRECT_MSVCR_ARCH="PE32+ executable"
52003 fi
52004 else
52005 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52006 CORRECT_MSVCR_ARCH=386
52007 else
52008 CORRECT_MSVCR_ARCH=x86-64
52009 fi
52010 fi
52011 if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52013 $as_echo "ok" >&6; }
52014 MSVC_DLL="$POSSIBLE_MSVC_DLL"
52015
52016 # Only process if variable expands to non-empty
52017
52018 if test "x$MSVC_DLL" != x; then
52019 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52020
52021 # Input might be given as Windows format, start by converting to
52022 # unix format.
52023 path="$MSVC_DLL"
52024 new_path=`$CYGPATH -u "$path"`
52025
52026 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52027 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52028 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52029 # "foo.exe" is OK but "foo" is an error.
52030 #
52031 # This test is therefore slightly more accurate than "test -f" to check for file precense.
52032 # It is also a way to make sure we got the proper file name for the real test later on.
52033 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52034 if test "x$test_shortpath" = x; then
52035 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52036 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52037 as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52038 fi
52039
52040 # Call helper function which possibly converts this using DOS-style short mode.
52041 # If so, the updated path is stored in $new_path.
52042
52043 input_path="$new_path"
52044 # Check if we need to convert this using DOS-style short mode. If the path
52045 # contains just simple characters, use it. Otherwise (spaces, weird characters),
52046 # take no chances and rewrite it.
52047 # Note: m4 eats our [], so we need to use [ and ] instead.
52048 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52049 if test "x$has_forbidden_chars" != x; then
52050 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52051 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52052 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52053 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52054 # Going to short mode and back again did indeed matter. Since short mode is
52055 # case insensitive, let's make it lowercase to improve readability.
52056 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52057 # Now convert it back to Unix-style (cygpath)
52058 input_path=`$CYGPATH -u "$shortmode_path"`
52059 new_path="$input_path"
52060 fi
52061 fi
52062
52063 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52064 if test "x$test_cygdrive_prefix" = x; then
52065 # As a simple fix, exclude /usr/bin since it's not a real path.
52066 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52067 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52068 # a path prefixed by /cygdrive for fixpath to work.
52069 new_path="$CYGWIN_ROOT_PATH$input_path"
52070 fi
52071 fi
52072
52073
52074 if test "x$path" != "x$new_path"; then
52075 MSVC_DLL="$new_path"
52076 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52077 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52078 fi
52079
52080 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52081
52082 path="$MSVC_DLL"
52083 has_colon=`$ECHO $path | $GREP ^.:`
52084 new_path="$path"
52085 if test "x$has_colon" = x; then
52086 # Not in mixed or Windows style, start by that.
52087 new_path=`cmd //c echo $path`
52088 fi
52089
52090
52091 input_path="$new_path"
52092 # Check if we need to convert this using DOS-style short mode. If the path
52093 # contains just simple characters, use it. Otherwise (spaces, weird characters),
52094 # take no chances and rewrite it.
52095 # Note: m4 eats our [], so we need to use [ and ] instead.
52096 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52097 if test "x$has_forbidden_chars" != x; then
52098 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52099 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52100 fi
52101
52102
52103 windows_path="$new_path"
52104 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52105 unix_path=`$CYGPATH -u "$windows_path"`
52106 new_path="$unix_path"
52107 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52108 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52109 new_path="$unix_path"
52110 fi
52111
52112 if test "x$path" != "x$new_path"; then
52113 MSVC_DLL="$new_path"
52114 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52115 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52116 fi
52117
52118 # Save the first 10 bytes of this path to the storage, so fixpath can work.
52119 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52120
52121 else
52122 # We're on a unix platform. Hooray! :)
52123 path="$MSVC_DLL"
52124 has_space=`$ECHO "$path" | $GREP " "`
52125 if test "x$has_space" != x; then
52126 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52127 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52128 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52129 fi
52130
52131 # Use eval to expand a potential ~
52132 eval path="$path"
52133 if test ! -f "$path" && test ! -d "$path"; then
52134 as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52135 fi
52136
52137 MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52138 fi
52139 fi
52140
52141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52142 $as_echo_n "checking for $DLL_NAME... " >&6; }
52143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52144 $as_echo "$MSVC_DLL" >&6; }
52145 else
52146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52147 $as_echo "incorrect, ignoring" >&6; }
52148 { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52149 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52150 fi
52151 fi
52152
52153 fi
52154
52155 if test "x$MSVC_DLL" = x; then
52156 # Probe: If Visual Studio Express is installed, there is usually one with the debugger
52157 if test "x$VS100COMNTOOLS" != x; then
52158 CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
52159
52160 windows_path="$CYGWIN_VS_TOOLS_DIR"
52161 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52162 unix_path=`$CYGPATH -u "$windows_path"`
52163 CYGWIN_VS_TOOLS_DIR="$unix_path"
52164 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52165 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52166 CYGWIN_VS_TOOLS_DIR="$unix_path"
52167 fi
52168
52169 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
52170 POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
52171 | $GREP -i /x64/ | $HEAD --lines 1`
52172 else
52173 POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
52174 | $GREP -i /x86/ | $HEAD --lines 1`
52175 fi
52176
52177 DLL_NAME="$DLL_NAME"
52178 POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
52179 METHOD="search of VS100COMNTOOLS"
52180 if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52181 { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52182 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52183
52184 # Need to check if the found msvcr is correct architecture
52185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52186 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52187 MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52188 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52189 # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52190 # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52191 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52192 CORRECT_MSVCR_ARCH="PE32 executable"
52193 else
52194 CORRECT_MSVCR_ARCH="PE32+ executable"
52195 fi
52196 else
52197 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52198 CORRECT_MSVCR_ARCH=386
52199 else
52200 CORRECT_MSVCR_ARCH=x86-64
52201 fi
52202 fi
52203 if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52205 $as_echo "ok" >&6; }
52206 MSVC_DLL="$POSSIBLE_MSVC_DLL"
52207
52208 # Only process if variable expands to non-empty
52209
52210 if test "x$MSVC_DLL" != x; then
52211 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52212
52213 # Input might be given as Windows format, start by converting to
52214 # unix format.
52215 path="$MSVC_DLL"
52216 new_path=`$CYGPATH -u "$path"`
52217
52218 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52219 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52220 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52221 # "foo.exe" is OK but "foo" is an error.
52222 #
52223 # This test is therefore slightly more accurate than "test -f" to check for file precense.
52224 # It is also a way to make sure we got the proper file name for the real test later on.
52225 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52226 if test "x$test_shortpath" = x; then
52227 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52228 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52229 as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52230 fi
52231
52232 # Call helper function which possibly converts this using DOS-style short mode.
52233 # If so, the updated path is stored in $new_path.
52234
52235 input_path="$new_path"
52236 # Check if we need to convert this using DOS-style short mode. If the path
52237 # contains just simple characters, use it. Otherwise (spaces, weird characters),
52238 # take no chances and rewrite it.
52239 # Note: m4 eats our [], so we need to use [ and ] instead.
52240 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52241 if test "x$has_forbidden_chars" != x; then
52242 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52243 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52244 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52245 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52246 # Going to short mode and back again did indeed matter. Since short mode is
52247 # case insensitive, let's make it lowercase to improve readability.
52248 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52249 # Now convert it back to Unix-style (cygpath)
52250 input_path=`$CYGPATH -u "$shortmode_path"`
52251 new_path="$input_path"
52252 fi
52253 fi
52254
52255 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52256 if test "x$test_cygdrive_prefix" = x; then
52257 # As a simple fix, exclude /usr/bin since it's not a real path.
52258 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52259 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52260 # a path prefixed by /cygdrive for fixpath to work.
52261 new_path="$CYGWIN_ROOT_PATH$input_path"
52262 fi
52263 fi
52264
52265
52266 if test "x$path" != "x$new_path"; then
52267 MSVC_DLL="$new_path"
52268 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52269 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52270 fi
52271
52272 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52273
52274 path="$MSVC_DLL"
52275 has_colon=`$ECHO $path | $GREP ^.:`
52276 new_path="$path"
52277 if test "x$has_colon" = x; then
52278 # Not in mixed or Windows style, start by that.
52279 new_path=`cmd //c echo $path`
52280 fi
52281
52282
52283 input_path="$new_path"
52284 # Check if we need to convert this using DOS-style short mode. If the path
52285 # contains just simple characters, use it. Otherwise (spaces, weird characters),
52286 # take no chances and rewrite it.
52287 # Note: m4 eats our [], so we need to use [ and ] instead.
52288 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52289 if test "x$has_forbidden_chars" != x; then
52290 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52291 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52292 fi
52293
52294
52295 windows_path="$new_path"
52296 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52297 unix_path=`$CYGPATH -u "$windows_path"`
52298 new_path="$unix_path"
52299 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52300 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52301 new_path="$unix_path"
52302 fi
52303
52304 if test "x$path" != "x$new_path"; then
52305 MSVC_DLL="$new_path"
52306 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52307 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52308 fi
52309
52310 # Save the first 10 bytes of this path to the storage, so fixpath can work.
52311 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52312
52313 else
52314 # We're on a unix platform. Hooray! :)
52315 path="$MSVC_DLL"
52316 has_space=`$ECHO "$path" | $GREP " "`
52317 if test "x$has_space" != x; then
52318 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52319 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52320 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52321 fi
52322
52323 # Use eval to expand a potential ~
52324 eval path="$path"
52325 if test ! -f "$path" && test ! -d "$path"; then
52326 as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52327 fi
52328
52329 MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52330 fi
52331 fi
52332
52333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52334 $as_echo_n "checking for $DLL_NAME... " >&6; }
52335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52336 $as_echo "$MSVC_DLL" >&6; }
52337 else
52338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52339 $as_echo "incorrect, ignoring" >&6; }
52340 { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52341 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52342 fi
52343 fi
52344
52345 fi
52346 fi
52347
52348 if test "x$MSVC_DLL" = x; then
52349 # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
52350 # (This was the original behaviour; kept since it might turn something up)
52351 if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
52352 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
52353 POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
52354 | $GREP x64 | $HEAD --lines 1`
52355 else
52356 POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
52357 | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
52358 if test "x$POSSIBLE_MSVC_DLL" = x; then
52359 # We're grasping at straws now...
52360 POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
52361 | $HEAD --lines 1`
52362 fi
52363 fi
52364
52365
52366 DLL_NAME="$DLL_NAME"
52367 POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
52368 METHOD="search of VCINSTALLDIR"
52369 if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52370 { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52371 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52372
52373 # Need to check if the found msvcr is correct architecture
52374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52375 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52376 MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52377 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52378 # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52379 # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52380 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52381 CORRECT_MSVCR_ARCH="PE32 executable"
52382 else
52383 CORRECT_MSVCR_ARCH="PE32+ executable"
52384 fi
52385 else
52386 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52387 CORRECT_MSVCR_ARCH=386
52388 else
52389 CORRECT_MSVCR_ARCH=x86-64
52390 fi
52391 fi
52392 if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52394 $as_echo "ok" >&6; }
52395 MSVC_DLL="$POSSIBLE_MSVC_DLL"
52396
52397 # Only process if variable expands to non-empty
52398
52399 if test "x$MSVC_DLL" != x; then
52400 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52401
52402 # Input might be given as Windows format, start by converting to
52403 # unix format.
52404 path="$MSVC_DLL"
52405 new_path=`$CYGPATH -u "$path"`
52406
52407 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52408 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52409 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52410 # "foo.exe" is OK but "foo" is an error.
52411 #
52412 # This test is therefore slightly more accurate than "test -f" to check for file precense.
52413 # It is also a way to make sure we got the proper file name for the real test later on.
52414 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52415 if test "x$test_shortpath" = x; then
52416 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52417 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52418 as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52419 fi
52420
52421 # Call helper function which possibly converts this using DOS-style short mode.
52422 # If so, the updated path is stored in $new_path.
52423
52424 input_path="$new_path"
52425 # Check if we need to convert this using DOS-style short mode. If the path
52426 # contains just simple characters, use it. Otherwise (spaces, weird characters),
52427 # take no chances and rewrite it.
52428 # Note: m4 eats our [], so we need to use [ and ] instead.
52429 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52430 if test "x$has_forbidden_chars" != x; then
52431 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52432 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52433 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52434 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52435 # Going to short mode and back again did indeed matter. Since short mode is
52436 # case insensitive, let's make it lowercase to improve readability.
52437 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52438 # Now convert it back to Unix-style (cygpath)
52439 input_path=`$CYGPATH -u "$shortmode_path"`
52440 new_path="$input_path"
52441 fi
52442 fi
52443
52444 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52445 if test "x$test_cygdrive_prefix" = x; then
52446 # As a simple fix, exclude /usr/bin since it's not a real path.
52447 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52448 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52449 # a path prefixed by /cygdrive for fixpath to work.
52450 new_path="$CYGWIN_ROOT_PATH$input_path"
52451 fi
52452 fi
52453
52454
52455 if test "x$path" != "x$new_path"; then
52456 MSVC_DLL="$new_path"
52457 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52458 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52459 fi
52460
52461 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52462
52463 path="$MSVC_DLL"
52464 has_colon=`$ECHO $path | $GREP ^.:`
52465 new_path="$path"
52466 if test "x$has_colon" = x; then
52467 # Not in mixed or Windows style, start by that.
52468 new_path=`cmd //c echo $path`
52469 fi
52470
52471
52472 input_path="$new_path"
52473 # Check if we need to convert this using DOS-style short mode. If the path
52474 # contains just simple characters, use it. Otherwise (spaces, weird characters),
52475 # take no chances and rewrite it.
52476 # Note: m4 eats our [], so we need to use [ and ] instead.
52477 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52478 if test "x$has_forbidden_chars" != x; then
52479 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52480 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52481 fi
52482
52483
52484 windows_path="$new_path"
52485 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52486 unix_path=`$CYGPATH -u "$windows_path"`
52487 new_path="$unix_path"
52488 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52489 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52490 new_path="$unix_path"
52491 fi
52492
52493 if test "x$path" != "x$new_path"; then
52494 MSVC_DLL="$new_path"
52495 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52496 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52497 fi
52498
52499 # Save the first 10 bytes of this path to the storage, so fixpath can work.
52500 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52501
52502 else
52503 # We're on a unix platform. Hooray! :)
52504 path="$MSVC_DLL"
52505 has_space=`$ECHO "$path" | $GREP " "`
52506 if test "x$has_space" != x; then
52507 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52508 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52509 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52510 fi
52511
52512 # Use eval to expand a potential ~
52513 eval path="$path"
52514 if test ! -f "$path" && test ! -d "$path"; then
52515 as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52516 fi
52517
52518 MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52519 fi
52520 fi
52521
52522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52523 $as_echo_n "checking for $DLL_NAME... " >&6; }
52524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52525 $as_echo "$MSVC_DLL" >&6; }
52526 else
52527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52528 $as_echo "incorrect, ignoring" >&6; }
52529 { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52530 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52531 fi
52532 fi
52533
52534 fi
52535 fi
52536
52537 if test "x$MSVC_DLL" = x; then
52538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52539 $as_echo_n "checking for $DLL_NAME... " >&6; }
52540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52541 $as_echo "no" >&6; }
52542 as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
52543 fi
52544
52545 MSVCP_DLL="$MSVC_DLL"
52546 fi
52547
52548 fi
52549
52550
52551
52552 # Check whether --with-dxsdk was given.
52553 if test "${with_dxsdk+set}" = set; then :
52554 withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
52555 $as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
52556 fi
52557
52558
52559
52560
52561 # Check whether --with-dxsdk-lib was given.
52562 if test "${with_dxsdk_lib+set}" = set; then :
52563 withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
52564 $as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
52565 fi
52566
52567
52568
52569
52570 # Check whether --with-dxsdk-include was given.
52571 if test "${with_dxsdk_include+set}" = set; then :
52572 withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
52573 $as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
52574 fi
52575
52576
52577 fi
52578
52579
52580 ###############################################################################
52581 #
52582 # We need to do some final tweaking, when everything else is done.
52583 #
52584 ###############################################################################
52585
52586
52587 HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
52588
52589
52590 # The name of the Service Agent jar.
52591 SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
52592 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
52593 SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
52594 fi
52595
52596
52597
52598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
52599 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
52600
52601 if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
52602 ENABLE_INTREE_EC=yes
52603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52604 $as_echo "yes" >&6; }
52605 else
52606 ENABLE_INTREE_EC=no
52607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52608 $as_echo "no" >&6; }
52609 fi
52610
52611
52612
52613
52614 ###############################################################################
52615 #
52616 # Configure parts of the build that only affect the build performance,
52617 # not the result.
52618 #
52619 ###############################################################################
52620
52621
52622 # How many cores do we have on this build system?
52623
52624 # Check whether --with-num-cores was given.
52625 if test "${with_num_cores+set}" = set; then :
52626 withval=$with_num_cores;
52627 fi
52628
52629 if test "x$with_num_cores" = x; then
52630 # The number of cores were not specified, try to probe them.
52631
52632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
52633 $as_echo_n "checking for number of cores... " >&6; }
52634 NUM_CORES=1
52635 FOUND_CORES=no
52636
52637 if test -f /proc/cpuinfo; then
52638 # Looks like a Linux (or cygwin) system
52639 NUM_CORES=`cat /proc/cpuinfo | grep -c processor`
52640 FOUND_CORES=yes
52641 elif test -x /usr/sbin/psrinfo; then
52642 # Looks like a Solaris system
52643 NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
52644 FOUND_CORES=yes
52645 elif test -x /usr/sbin/system_profiler; then
52646 # Looks like a MacOSX system
52647 NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk '{print $5}'`
52648 FOUND_CORES=yes
52649 elif test "x$OPENJDK_BUILD_OS" = xaix ; then
52650 NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
52651 FOUND_CORES=yes
52652 elif test -n "$NUMBER_OF_PROCESSORS"; then
52653 # On windows, look in the env
52654 NUM_CORES=$NUMBER_OF_PROCESSORS
52655 FOUND_CORES=yes
52656 fi
52657
52658 if test "x$FOUND_CORES" = xyes; then
52659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
52660 $as_echo "$NUM_CORES" >&6; }
52661 else
52662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
52663 $as_echo "could not detect number of cores, defaulting to 1" >&6; }
52664 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
52665 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
52666 fi
52667
52668 else
52669 NUM_CORES=$with_num_cores
52670 fi
52671
52672
52673
52674 # How much memory do we have on this build system?
52675
52676 # Check whether --with-memory-size was given.
52677 if test "${with_memory_size+set}" = set; then :
52678 withval=$with_memory_size;
52679 fi
52680
52681 if test "x$with_memory_size" = x; then
52682 # The memory size was not specified, try to probe it.
52683
52684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
52685 $as_echo_n "checking for memory size... " >&6; }
52686 # Default to 1024 MB
52687 MEMORY_SIZE=1024
52688 FOUND_MEM=no
52689
52690 if test -f /proc/meminfo; then
52691 # Looks like a Linux (or cygwin) system
52692 MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
52693 MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
52694 FOUND_MEM=yes
52695 elif test -x /usr/sbin/prtconf; then
52696 # Looks like a Solaris or AIX system
52697 MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
52698 FOUND_MEM=yes
52699 elif test -x /usr/sbin/system_profiler; then
52700 # Looks like a MacOSX system
52701 MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk '{print $2}'`
52702 MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
52703 FOUND_MEM=yes
52704 elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52705 # Windows, but without cygwin
52706 MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
52707 MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
52708 FOUND_MEM=yes
52709 fi
52710
52711 if test "x$FOUND_MEM" = xyes; then
52712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
52713 $as_echo "$MEMORY_SIZE MB" >&6; }
52714 else
52715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
52716 $as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
52717 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
52718 $as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
52719 fi
52720
52721 else
52722 MEMORY_SIZE=$with_memory_size
52723 fi
52724
52725
52726
52727 # Provide a decent default number of parallel jobs for make depending on
52728 # number of cores, amount of memory and machine architecture.
52729
52730 # Check whether --with-jobs was given.
52731 if test "${with_jobs+set}" = set; then :
52732 withval=$with_jobs;
52733 fi
52734
52735 if test "x$with_jobs" = x; then
52736 # Number of jobs was not specified, calculate.
52737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
52738 $as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
52739 # Approximate memory in GB.
52740 memory_gb=`expr $MEMORY_SIZE / 1024`
52741 # Pick the lowest of memory in gb and number of cores.
52742 if test "$memory_gb" -lt "$NUM_CORES"; then
52743 JOBS="$memory_gb"
52744 else
52745 JOBS="$NUM_CORES"
52746 # On bigger machines, leave some room for other processes to run
52747 if test "$JOBS" -gt "4"; then
52748 JOBS=`expr $JOBS '*' 90 / 100`
52749 fi
52750 fi
52751 # Cap number of jobs to 16
52752 if test "$JOBS" -gt "16"; then
52753 JOBS=16
52754 fi
52755 if test "$JOBS" -eq "0"; then
52756 JOBS=1
52757 fi
52758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
52759 $as_echo "$JOBS" >&6; }
52760 else
52761 JOBS=$with_jobs
52762 fi
52763
52764
52765
52766 # Setup arguments for the boot jdk (after cores and memory have been setup)
52767
52768 ##############################################################################
52769 #
52770 # Specify jvm options for anything that is run with the Boot JDK.
52771 # Not all JVM:s accept the same arguments on the command line.
52772 #
52773
52774 # Check whether --with-boot-jdk-jvmargs was given.
52775 if test "${with_boot_jdk_jvmargs+set}" = set; then :
52776 withval=$with_boot_jdk_jvmargs;
52777 fi
52778
52779
52780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
52781 $as_echo_n "checking flags for boot jdk java command ... " >&6; }
52782
52783 # Disable special log output when a debug build is used as Boot JDK...
52784
52785 $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
52786 $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
52787 OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
52788 FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52789 FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52790 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52791 boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
52792 JVM_ARG_OK=true
52793 else
52794 $ECHO "Arg failed:" >&5
52795 $ECHO "$OUTPUT" >&5
52796 JVM_ARG_OK=false
52797 fi
52798
52799
52800 # Apply user provided options.
52801
52802 $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
52803 $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
52804 OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
52805 FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52806 FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52807 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52808 boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
52809 JVM_ARG_OK=true
52810 else
52811 $ECHO "Arg failed:" >&5
52812 $ECHO "$OUTPUT" >&5
52813 JVM_ARG_OK=false
52814 fi
52815
52816
52817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
52818 $as_echo "$boot_jdk_jvmargs" >&6; }
52819
52820 # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
52821 JAVA_FLAGS=$boot_jdk_jvmargs
52822
52823
52824
52825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
52826 $as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
52827
52828 # Starting amount of heap memory.
52829
52830 $ECHO "Check if jvm arg is ok: -Xms64M" >&5
52831 $ECHO "Command: $JAVA -Xms64M -version" >&5
52832 OUTPUT=`$JAVA -Xms64M -version 2>&1`
52833 FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52834 FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52835 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52836 boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
52837 JVM_ARG_OK=true
52838 else
52839 $ECHO "Arg failed:" >&5
52840 $ECHO "$OUTPUT" >&5
52841 JVM_ARG_OK=false
52842 fi
52843
52844
52845 # Maximum amount of heap memory.
52846 # Maximum stack size.
52847 JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
52848 if test "x$BUILD_NUM_BITS" = x32; then
52849 if test "$JVM_MAX_HEAP" -gt "1100"; then
52850 JVM_MAX_HEAP=1100
52851 elif test "$JVM_MAX_HEAP" -lt "512"; then
52852 JVM_MAX_HEAP=512
52853 fi
52854 STACK_SIZE=768
52855 else
52856 # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
52857 # pointers are used. Apparently, we need to increase the heap and stack
52858 # space for the jvm. More specifically, when running javac to build huge
52859 # jdk batch
52860 if test "$JVM_MAX_HEAP" -gt "1600"; then
52861 JVM_MAX_HEAP=1600
52862 elif test "$JVM_MAX_HEAP" -lt "512"; then
52863 JVM_MAX_HEAP=512
52864 fi
52865 STACK_SIZE=1536
52866 fi
52867
52868 $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
52869 $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
52870 OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
52871 FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52872 FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52873 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52874 boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
52875 JVM_ARG_OK=true
52876 else
52877 $ECHO "Arg failed:" >&5
52878 $ECHO "$OUTPUT" >&5
52879 JVM_ARG_OK=false
52880 fi
52881
52882
52883 $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
52884 $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
52885 OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
52886 FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52887 FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52888 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52889 boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
52890 JVM_ARG_OK=true
52891 else
52892 $ECHO "Arg failed:" >&5
52893 $ECHO "$OUTPUT" >&5
52894 JVM_ARG_OK=false
52895 fi
52896
52897
52898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
52899 $as_echo "$boot_jdk_jvmargs_big" >&6; }
52900
52901 JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
52902
52903
52904
52905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
52906 $as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
52907
52908 # Use serial gc for small short lived tools if possible
52909
52910 $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
52911 $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
52912 OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
52913 FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52914 FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52915 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52916 boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
52917 JVM_ARG_OK=true
52918 else
52919 $ECHO "Arg failed:" >&5
52920 $ECHO "$OUTPUT" >&5
52921 JVM_ARG_OK=false
52922 fi
52923
52924
52925 $ECHO "Check if jvm arg is ok: -Xms32M" >&5
52926 $ECHO "Command: $JAVA -Xms32M -version" >&5
52927 OUTPUT=`$JAVA -Xms32M -version 2>&1`
52928 FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52929 FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52930 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52931 boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
52932 JVM_ARG_OK=true
52933 else
52934 $ECHO "Arg failed:" >&5
52935 $ECHO "$OUTPUT" >&5
52936 JVM_ARG_OK=false
52937 fi
52938
52939
52940 $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
52941 $ECHO "Command: $JAVA -Xmx512M -version" >&5
52942 OUTPUT=`$JAVA -Xmx512M -version 2>&1`
52943 FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52944 FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52945 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52946 boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
52947 JVM_ARG_OK=true
52948 else
52949 $ECHO "Arg failed:" >&5
52950 $ECHO "$OUTPUT" >&5
52951 JVM_ARG_OK=false
52952 fi
52953
52954
52955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
52956 $as_echo "$boot_jdk_jvmargs_small" >&6; }
52957
52958 JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
52959
52960
52961 JAVA_TOOL_FLAGS_SMALL=""
52962 for f in $JAVA_FLAGS_SMALL; do
52963 JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
52964 done
52965
52966
52967
52968 # Setup smart javac (after cores and memory have been setup)
52969
52970
52971 # Check whether --with-sjavac-server-java was given.
52972 if test "${with_sjavac_server_java+set}" = set; then :
52973 withval=$with_sjavac_server_java;
52974 fi
52975
52976
52977 if test "x$with_sjavac_server_java" != x; then
52978 SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
52979 FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
52980 if test "x$FOUND_VERSION" = x; then
52981 as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
52982 fi
52983 else
52984 SJAVAC_SERVER_JAVA="$JAVA"
52985 fi
52986
52987
52988 if test "$MEMORY_SIZE" -gt "3000"; then
52989
52990 $ECHO "Check if jvm arg is ok: -d64" >&5
52991 $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
52992 OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
52993 FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52994 FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52995 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52996 SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
52997 JVM_ARG_OK=true
52998 else
52999 $ECHO "Arg failed:" >&5
53000 $ECHO "$OUTPUT" >&5
53001 JVM_ARG_OK=false
53002 fi
53003
53004 if test "$JVM_ARG_OK" = true; then
53005 JVM_64BIT=true
53006 JVM_ARG_OK=false
53007 fi
53008 fi
53009
53010 MX_VALUE=`expr $MEMORY_SIZE / 2`
53011 if test "$JVM_64BIT" = true; then
53012 # Set ms lower than mx since more than one instance of the server might
53013 # get launched at the same time before they figure out which instance won.
53014 MS_VALUE=512
53015 if test "$MX_VALUE" -gt "2048"; then
53016 MX_VALUE=2048
53017 fi
53018 else
53019 MS_VALUE=256
53020 if test "$MX_VALUE" -gt "1500"; then
53021 MX_VALUE=1500
53022 fi
53023 fi
53024 if test "$MX_VALUE" -lt "512"; then
53025 MX_VALUE=512
53026 fi
53027
53028 $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
53029 $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
53030 OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
53031 FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
53032 FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
53033 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
53034 SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
53035 JVM_ARG_OK=true
53036 else
53037 $ECHO "Arg failed:" >&5
53038 $ECHO "$OUTPUT" >&5
53039 JVM_ARG_OK=false
53040 fi
53041
53042
53043
53044 # Check whether --enable-sjavac was given.
53045 if test "${enable_sjavac+set}" = set; then :
53046 enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
53047 else
53048 ENABLE_SJAVAC='no'
53049 fi
53050
53051 if test "x$JVM_ARG_OK" = "xfalse"; then
53052 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
53053 $as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
53054 ENABLE_SJAVAC=no;
53055 fi
53056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
53057 $as_echo_n "checking whether to use sjavac... " >&6; }
53058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
53059 $as_echo "$ENABLE_SJAVAC" >&6; }
53060
53061
53062
53063 # Can the C/C++ compiler use precompiled headers?
53064
53065
53066 ###############################################################################
53067 #
53068 # Can the C/C++ compiler use precompiled headers?
53069 #
53070 # Check whether --enable-precompiled-headers was given.
53071 if test "${enable_precompiled_headers+set}" = set; then :
53072 enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
53073 else
53074 ENABLE_PRECOMPH=yes
53075 fi
53076
53077
53078 USE_PRECOMPILED_HEADER=1
53079 if test "x$ENABLE_PRECOMPH" = xno; then
53080 USE_PRECOMPILED_HEADER=0
53081 fi
53082
53083 if test "x$ENABLE_PRECOMPH" = xyes; then
53084 # Check that the compiler actually supports precomp headers.
53085 if test "x$TOOLCHAIN_TYPE" = xgcc; then
53086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
53087 $as_echo_n "checking that precompiled headers work... " >&6; }
53088 echo "int alfa();" > conftest.h
53089 $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
53090 if test ! -f conftest.hpp.gch; then
53091 USE_PRECOMPILED_HEADER=0
53092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53093 $as_echo "no" >&6; }
53094 else
53095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53096 $as_echo "yes" >&6; }
53097 fi
53098 rm -f conftest.h conftest.hpp.gch
53099 fi
53100 fi
53101
53102
53103
53104
53105 # Setup use of ccache, if available
53106
53107 # Check whether --enable-ccache was given.
53108 if test "${enable_ccache+set}" = set; then :
53109 enableval=$enable_ccache;
53110 fi
53111
53112
53113 CCACHE=
53114 CCACHE_STATUS=
53115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
53116 $as_echo_n "checking is ccache enabled... " >&6; }
53117 if test "x$enable_ccache" = xyes; then
53118 if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
53119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53120 $as_echo "yes" >&6; }
53121 OLD_PATH="$PATH"
53122 if test "x$TOOLCHAIN_PATH" != x; then
53123 PATH=$TOOLCHAIN_PATH:$PATH
53124 fi
53125
53126
53127
53128 # Publish this variable in the help.
53129
53130
53131 if test "x$CCACHE" = x; then
53132 # The variable is not set by user, try to locate tool using the code snippet
53133 for ac_prog in ccache
53134 do
53135 # Extract the first word of "$ac_prog", so it can be a program name with args.
53136 set dummy $ac_prog; ac_word=$2
53137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53138 $as_echo_n "checking for $ac_word... " >&6; }
53139 if ${ac_cv_path_CCACHE+:} false; then :
53140 $as_echo_n "(cached) " >&6
53141 else
53142 case $CCACHE in
53143 [\\/]* | ?:[\\/]*)
53144 ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
53145 ;;
53146 *)
53147 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53148 for as_dir in $PATH
53149 do
53150 IFS=$as_save_IFS
53151 test -z "$as_dir" && as_dir=.
53152 for ac_exec_ext in '' $ac_executable_extensions; do
53153 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53154 ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53155 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53156 break 2
53157 fi
53158 done
53159 done
53160 IFS=$as_save_IFS
53161
53162 ;;
53163 esac
53164 fi
53165 CCACHE=$ac_cv_path_CCACHE
53166 if test -n "$CCACHE"; then
53167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53168 $as_echo "$CCACHE" >&6; }
53169 else
53170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53171 $as_echo "no" >&6; }
53172 fi
53173
53174
53175 test -n "$CCACHE" && break
53176 done
53177
53178 else
53179 # The variable is set, but is it from the command line or the environment?
53180
53181 # Try to remove the string !CCACHE! from our list.
53182 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
53183 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
53184 # If it failed, the variable was not from the command line. Ignore it,
53185 # but warn the user (except for BASH, which is always set by the calling BASH).
53186 if test "xCCACHE" != xBASH; then
53187 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
53188 $as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
53189 fi
53190 # Try to locate tool using the code snippet
53191 for ac_prog in ccache
53192 do
53193 # Extract the first word of "$ac_prog", so it can be a program name with args.
53194 set dummy $ac_prog; ac_word=$2
53195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53196 $as_echo_n "checking for $ac_word... " >&6; }
53197 if ${ac_cv_path_CCACHE+:} false; then :
53198 $as_echo_n "(cached) " >&6
53199 else
53200 case $CCACHE in
53201 [\\/]* | ?:[\\/]*)
53202 ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
53203 ;;
53204 *)
53205 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53206 for as_dir in $PATH
53207 do
53208 IFS=$as_save_IFS
53209 test -z "$as_dir" && as_dir=.
53210 for ac_exec_ext in '' $ac_executable_extensions; do
53211 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53212 ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53213 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53214 break 2
53215 fi
53216 done
53217 done
53218 IFS=$as_save_IFS
53219
53220 ;;
53221 esac
53222 fi
53223 CCACHE=$ac_cv_path_CCACHE
53224 if test -n "$CCACHE"; then
53225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53226 $as_echo "$CCACHE" >&6; }
53227 else
53228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53229 $as_echo "no" >&6; }
53230 fi
53231
53232
53233 test -n "$CCACHE" && break
53234 done
53235
53236 else
53237 # If it succeeded, then it was overridden by the user. We will use it
53238 # for the tool.
53239
53240 # First remove it from the list of overridden variables, so we can test
53241 # for unknown variables in the end.
53242 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
53243
53244 # Check if the provided tool contains a complete path.
53245 tool_specified="$CCACHE"
53246 tool_basename="${tool_specified##*/}"
53247 if test "x$tool_basename" = "x$tool_specified"; then
53248 # A command without a complete path is provided, search $PATH.
53249 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
53250 $as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
53251 # Extract the first word of "$tool_basename", so it can be a program name with args.
53252 set dummy $tool_basename; ac_word=$2
53253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53254 $as_echo_n "checking for $ac_word... " >&6; }
53255 if ${ac_cv_path_CCACHE+:} false; then :
53256 $as_echo_n "(cached) " >&6
53257 else
53258 case $CCACHE in
53259 [\\/]* | ?:[\\/]*)
53260 ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
53261 ;;
53262 *)
53263 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53264 for as_dir in $PATH
53265 do
53266 IFS=$as_save_IFS
53267 test -z "$as_dir" && as_dir=.
53268 for ac_exec_ext in '' $ac_executable_extensions; do
53269 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53270 ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53271 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53272 break 2
53273 fi
53274 done
53275 done
53276 IFS=$as_save_IFS
53277
53278 ;;
53279 esac
53280 fi
53281 CCACHE=$ac_cv_path_CCACHE
53282 if test -n "$CCACHE"; then
53283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53284 $as_echo "$CCACHE" >&6; }
53285 else
53286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53287 $as_echo "no" >&6; }
53288 fi
53289
53290
53291 if test "x$CCACHE" = x; then
53292 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
53293 fi
53294 else
53295 # Otherwise we believe it is a complete path. Use it as it is.
53296 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
53297 $as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
53298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
53299 $as_echo_n "checking for CCACHE... " >&6; }
53300 if test ! -x "$tool_specified"; then
53301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
53302 $as_echo "not found" >&6; }
53303 as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
53304 fi
53305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
53306 $as_echo "$tool_specified" >&6; }
53307 fi
53308 fi
53309 fi
53310
53311
53312
53313 if test "x$CCACHE" = x; then
53314 as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
53315 fi
53316
53317
53318 PATH="$OLD_PATH"
53319 CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
53320 CCACHE_STATUS="Active ($CCACHE_VERSION)"
53321 else
53322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53323 $as_echo "no" >&6; }
53324 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
53325 $as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
53326 fi
53327 elif test "x$enable_ccache" = xno; then
53328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
53329 $as_echo "no, explicitly disabled" >&6; }
53330 CCACHE_STATUS="Disabled"
53331 elif test "x$enable_ccache" = x; then
53332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53333 $as_echo "no" >&6; }
53334 else
53335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
53336 $as_echo "unknown" >&6; }
53337 as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
53338 fi
53339
53340
53341
53342 # Check whether --with-ccache-dir was given.
53343 if test "${with_ccache_dir+set}" = set; then :
53344 withval=$with_ccache_dir;
53345 fi
53346
53347
53348 if test "x$with_ccache_dir" != x; then
53349 # When using a non home ccache directory, assume the use is to share ccache files
53350 # with other users. Thus change the umask.
53351 SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
53352 if test "x$CCACHE" = x; then
53353 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
53354 $as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
53355 fi
53356 fi
53357
53358 if test "x$CCACHE" != x; then
53359
53360 if test "x$CCACHE" != x; then
53361 if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
53362 HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
53363 $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
53364 if test "x$HAS_BAD_CCACHE" != "x"; then
53365 as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
53366 fi
53367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
53368 $as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
53369 CCACHE_PRECOMP_FLAG="-fpch-preprocess"
53370 PUSHED_FLAGS="$CXXFLAGS"
53371 CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
53372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53373 /* end confdefs.h. */
53374
53375 int
53376 main ()
53377 {
53378
53379 ;
53380 return 0;
53381 }
53382 _ACEOF
53383 if ac_fn_cxx_try_compile "$LINENO"; then :
53384 CC_KNOWS_CCACHE_TRICK=yes
53385 else
53386 CC_KNOWS_CCACHE_TRICK=no
53387 fi
53388 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53389 CXXFLAGS="$PUSHED_FLAGS"
53390 if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
53391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53392 $as_echo "yes" >&6; }
53393 CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
53394
53395 CCACHE_SLOPPINESS=pch_defines,time_macros
53396 else
53397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53398 $as_echo "no" >&6; }
53399 as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
53400 fi
53401 fi
53402
53403 CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
53404 CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
53405
53406 if test "x$SET_CCACHE_DIR" != x; then
53407 mkdir -p $CCACHE_DIR > /dev/null 2>&1
53408 chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
53409 fi
53410 fi
53411
53412 fi
53413
53414
53415 ###############################################################################
53416 #
53417 # And now the finish...
53418 #
53419 ###############################################################################
53420
53421 # Check for some common pitfalls
53422
53423 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53424 file_to_test="$SRC_ROOT/LICENSE"
53425 if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
53426 as_fn_error $? "Bad file permissions on src files. This is usually caused by cloning the repositories with a non cygwin hg in a directory not created in cygwin." "$LINENO" 5
53427 fi
53428 fi
53429
53430
53431 # Did user specify any unknown variables?
53432
53433 if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
53434 # Replace the separating ! with spaces before presenting for end user.
53435 unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
53436 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
53437 $as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
53438 fi
53439
53440
53441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
53442 $as_echo_n "checking if build directory is on local disk... " >&6; }
53443
53444 # df -l lists only local disks; if the given directory is not found then
53445 # a non-zero exit code is given
53446 if test "x$DF" = x; then
53447 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53448 # msys does not have df; use Windows "net use" instead.
53449 IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
53450 if test "x$IS_NETWORK_DISK" = x; then
53451 OUTPUT_DIR_IS_LOCAL="yes"
53452 else
53453 OUTPUT_DIR_IS_LOCAL="no"
53454 fi
53455 else
53456 # No df here, say it's local
53457 OUTPUT_DIR_IS_LOCAL="yes"
53458 fi
53459 else
53460 if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
53461 OUTPUT_DIR_IS_LOCAL="yes"
53462 else
53463 OUTPUT_DIR_IS_LOCAL="no"
53464 fi
53465 fi
53466
53467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
53468 $as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
53469
53470
53471
53472 # Check if the user has any old-style ALT_ variables set.
53473 FOUND_ALT_VARIABLES=`env | grep ^ALT_`
53474
53475 # Before generating output files, test if they exist. If they do, this is a reconfigure.
53476 # Since we can't properly handle the dependencies for this, warn the user about the situation
53477 if test -e $OUTPUT_ROOT/spec.gmk; then
53478 IS_RECONFIGURE=yes
53479 else
53480 IS_RECONFIGURE=no
53481 fi
53482
53483
53484 # At the end, call the custom hook. (Dummy macro if no custom sources available)
53485
53486
53487 # We're messing a bit with internal autoconf variables to put the config.status
53488 # in the output directory instead of the current directory.
53489 CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
53490
53491 # Create the actual output files. Now the main work of configure is done.
53492 cat >confcache <<\_ACEOF
53493 # This file is a shell script that caches the results of configure
53494 # tests run on this system so they can be shared between configure
53495 # scripts and configure runs, see configure's option --config-cache.
53496 # It is not useful on other systems. If it contains results you don't
53497 # want to keep, you may remove or edit it.
53498 #
53499 # config.status only pays attention to the cache file if you give it
53500 # the --recheck option to rerun configure.
53501 #
53502 # `ac_cv_env_foo' variables (set or unset) will be overridden when
53503 # loading this file, other *unset* `ac_cv_foo' will be assigned the
53504 # following values.
53505
53506 _ACEOF
53507
53508 # The following way of writing the cache mishandles newlines in values,
53509 # but we know of no workaround that is simple, portable, and efficient.
53510 # So, we kill variables containing newlines.
53511 # Ultrix sh set writes to stderr and can't be redirected directly,
53512 # and sets the high bit in the cache file unless we assign to the vars.
53513 (
53514 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
53515 eval ac_val=\$$ac_var
53516 case $ac_val in #(
53517 *${as_nl}*)
53518 case $ac_var in #(
53519 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
53520 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
53521 esac
53522 case $ac_var in #(
53523 _ | IFS | as_nl) ;; #(
53524 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
53525 *) { eval $ac_var=; unset $ac_var;} ;;
53526 esac ;;
53527 esac
53528 done
53529
53530 (set) 2>&1 |
53531 case $as_nl`(ac_space=' '; set) 2>&1` in #(
53532 *${as_nl}ac_space=\ *)
53533 # `set' does not quote correctly, so add quotes: double-quote
53534 # substitution turns \\\\ into \\, and sed turns \\ into \.
53535 sed -n \
53536 "s/'/'\\\\''/g;
53537 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
53538 ;; #(
53539 *)
53540 # `set' quotes correctly as required by POSIX, so do not add quotes.
53541 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
53542 ;;
53543 esac |
53544 sort
53545 ) |
53546 sed '
53547 /^ac_cv_env_/b end
53548 t clear
53549 :clear
53550 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
53551 t end
53552 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
53553 :end' >>confcache
53554 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
53555 if test -w "$cache_file"; then
53556 if test "x$cache_file" != "x/dev/null"; then
53557 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
53558 $as_echo "$as_me: updating cache $cache_file" >&6;}
53559 if test ! -f "$cache_file" || test -h "$cache_file"; then
53560 cat confcache >"$cache_file"
53561 else
53562 case $cache_file in #(
53563 */* | ?:*)
53564 mv -f confcache "$cache_file"$$ &&
53565 mv -f "$cache_file"$$ "$cache_file" ;; #(
53566 *)
53567 mv -f confcache "$cache_file" ;;
53568 esac
53569 fi
53570 fi
53571 else
53572 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
53573 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
53574 fi
53575 fi
53576 rm -f confcache
53577
53578 test "x$prefix" = xNONE && prefix=$ac_default_prefix
53579 # Let make expand exec_prefix.
53580 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
53581
53582 # Transform confdefs.h into DEFS.
53583 # Protect against shell expansion while executing Makefile rules.
53584 # Protect against Makefile macro expansion.
53585 #
53586 # If the first sed substitution is executed (which looks for macros that
53587 # take arguments), then branch to the quote section. Otherwise,
53588 # look for a macro that doesn't take arguments.
53589 ac_script='
53590 :mline
53591 /\\$/{
53592 N
53593 s,\\\n,,
53594 b mline
53595 }
53596 t clear
53597 :clear
53598 s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
53599 t quote
53600 s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g
53601 t quote
53602 b any
53603 :quote
53604 s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g
53605 s/\[/\\&/g
53606 s/\]/\\&/g
53607 s/\$/$$/g
53608 H
53609 :any
53610 ${
53611 g
53612 s/^\n//
53613 s/\n/ /g
53614 p
53615 }
53616 '
53617 DEFS=`sed -n "$ac_script" confdefs.h`
53618
53619
53620 ac_libobjs=
53621 ac_ltlibobjs=
53622 U=
53623 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
53624 # 1. Remove the extension, and $U if already installed.
53625 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
53626 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
53627 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
53628 # will be set to the directory where LIBOBJS objects are built.
53629 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
53630 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
53631 done
53632 LIBOBJS=$ac_libobjs
53633
53634 LTLIBOBJS=$ac_ltlibobjs
53635
53636
53637
53638 : "${CONFIG_STATUS=./config.status}"
53639 ac_write_fail=0
53640 ac_clean_files_save=$ac_clean_files
53641 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
53642 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
53643 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
53644 as_write_fail=0
53645 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
53646 #! $SHELL
53647 # Generated by $as_me.
53648 # Run this file to recreate the current configuration.
53649 # Compiler output produced by configure, useful for debugging
53650 # configure, is in config.log if it exists.
53651
53652 debug=false
53653 ac_cs_recheck=false
53654 ac_cs_silent=false
53655
53656 SHELL=\${CONFIG_SHELL-$SHELL}
53657 export SHELL
53658 _ASEOF
53659 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
53660 ## -------------------- ##
53661 ## M4sh Initialization. ##
53662 ## -------------------- ##
53663
53664 # Be more Bourne compatible
53665 DUALCASE=1; export DUALCASE # for MKS sh
53666 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
53667 emulate sh
53668 NULLCMD=:
53669 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
53670 # is contrary to our usage. Disable this feature.
53671 alias -g '${1+"$@"}'='"$@"'
53672 setopt NO_GLOB_SUBST
53673 else
53674 case `(set -o) 2>/dev/null` in #(
53675 *posix*) :
53676 set -o posix ;; #(
53677 *) :
53678 ;;
53679 esac
53680 fi
53681
53682
53683 as_nl='
53684 '
53685 export as_nl
53686 # Printing a long string crashes Solaris 7 /usr/bin/printf.
53687 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
53688 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
53689 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
53690 # Prefer a ksh shell builtin over an external printf program on Solaris,
53691 # but without wasting forks for bash or zsh.
53692 if test -z "$BASH_VERSION$ZSH_VERSION" \
53693 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53694 as_echo='print -r --'
53695 as_echo_n='print -rn --'
53696 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
53697 as_echo='printf %s\n'
53698 as_echo_n='printf %s'
53699 else
53700 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
53701 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53702 as_echo_n='/usr/ucb/echo -n'
53703 else
53704 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
53705 as_echo_n_body='eval
53706 arg=$1;
53707 case $arg in #(
53708 *"$as_nl"*)
53709 expr "X$arg" : "X\\(.*\\)$as_nl";
53710 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
53711 esac;
53712 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
53713 '
53714 export as_echo_n_body
53715 as_echo_n='sh -c $as_echo_n_body as_echo'
53716 fi
53717 export as_echo_body
53718 as_echo='sh -c $as_echo_body as_echo'
53719 fi
53720
53721 # The user is always right.
53722 if test "${PATH_SEPARATOR+set}" != set; then
53723 PATH_SEPARATOR=:
53724 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
53725 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
53726 PATH_SEPARATOR=';'
53727 }
53728 fi
53729
53730
53731 # IFS
53732 # We need space, tab and new line, in precisely that order. Quoting is
53733 # there to prevent editors from complaining about space-tab.
53734 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
53735 # splitting by setting IFS to empty value.)
53736 IFS=" "" $as_nl"
53737
53738 # Find who we are. Look in the path if we contain no directory separator.
53739 as_myself=
53740 case $0 in #((
53741 *[\\/]* ) as_myself=$0 ;;
53742 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53743 for as_dir in $PATH
53744 do
53745 IFS=$as_save_IFS
53746 test -z "$as_dir" && as_dir=.
53747 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
53748 done
53749 IFS=$as_save_IFS
53750
53751 ;;
53752 esac
53753 # We did not find ourselves, most probably we were run as `sh COMMAND'
53754 # in which case we are not to be found in the path.
53755 if test "x$as_myself" = x; then
53756 as_myself=$0
53757 fi
53758 if test ! -f "$as_myself"; then
53759 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
53760 exit 1
53761 fi
53762
53763 # Unset variables that we do not need and which cause bugs (e.g. in
53764 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
53765 # suppresses any "Segmentation fault" message there. '((' could
53766 # trigger a bug in pdksh 5.2.14.
53767 for as_var in BASH_ENV ENV MAIL MAILPATH
53768 do eval test x\${$as_var+set} = xset \
53769 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
53770 done
53771 PS1='$ '
53772 PS2='> '
53773 PS4='+ '
53774
53775 # NLS nuisances.
53776 LC_ALL=C
53777 export LC_ALL
53778 LANGUAGE=C
53779 export LANGUAGE
53780
53781 # CDPATH.
53782 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
53783
53784
53785 # as_fn_error STATUS ERROR [LINENO LOG_FD]
53786 # ----------------------------------------
53787 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
53788 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
53789 # script with STATUS, using 1 if that was 0.
53790 as_fn_error ()
53791 {
53792 as_status=$1; test $as_status -eq 0 && as_status=1
53793 if test "$4"; then
53794 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
53795 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
53796 fi
53797 $as_echo "$as_me: error: $2" >&2
53798 as_fn_exit $as_status
53799 } # as_fn_error
53800
53801
53802 # as_fn_set_status STATUS
53803 # -----------------------
53804 # Set $? to STATUS, without forking.
53805 as_fn_set_status ()
53806 {
53807 return $1
53808 } # as_fn_set_status
53809
53810 # as_fn_exit STATUS
53811 # -----------------
53812 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
53813 as_fn_exit ()
53814 {
53815 set +e
53816 as_fn_set_status $1
53817 exit $1
53818 } # as_fn_exit
53819
53820 # as_fn_unset VAR
53821 # ---------------
53822 # Portably unset VAR.
53823 as_fn_unset ()
53824 {
53825 { eval $1=; unset $1;}
53826 }
53827 as_unset=as_fn_unset
53828 # as_fn_append VAR VALUE
53829 # ----------------------
53830 # Append the text in VALUE to the end of the definition contained in VAR. Take
53831 # advantage of any shell optimizations that allow amortized linear growth over
53832 # repeated appends, instead of the typical quadratic growth present in naive
53833 # implementations.
53834 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
53835 eval 'as_fn_append ()
53836 {
53837 eval $1+=\$2
53838 }'
53839 else
53840 as_fn_append ()
53841 {
53842 eval $1=\$$1\$2
53843 }
53844 fi # as_fn_append
53845
53846 # as_fn_arith ARG...
53847 # ------------------
53848 # Perform arithmetic evaluation on the ARGs, and store the result in the
53849 # global $as_val. Take advantage of shells that can avoid forks. The arguments
53850 # must be portable across $(()) and expr.
53851 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
53852 eval 'as_fn_arith ()
53853 {
53854 as_val=$(( $* ))
53855 }'
53856 else
53857 as_fn_arith ()
53858 {
53859 as_val=`expr "$@" || test $? -eq 1`
53860 }
53861 fi # as_fn_arith
53862
53863
53864 if expr a : '\(a\)' >/dev/null 2>&1 &&
53865 test "X`expr 00001 : '.*\(...\)'`" = X001; then
53866 as_expr=expr
53867 else
53868 as_expr=false
53869 fi
53870
53871 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
53872 as_basename=basename
53873 else
53874 as_basename=false
53875 fi
53876
53877 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
53878 as_dirname=dirname
53879 else
53880 as_dirname=false
53881 fi
53882
53883 as_me=`$as_basename -- "$0" ||
53884 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
53885 X"$0" : 'X\(//\)$' \| \
53886 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
53887 $as_echo X/"$0" |
53888 sed '/^.*\/\([^/][^/]*\)\/*$/{
53889 s//\1/
53890 q
53891 }
53892 /^X\/\(\/\/\)$/{
53893 s//\1/
53894 q
53895 }
53896 /^X\/\(\/\).*/{
53897 s//\1/
53898 q
53899 }
53900 s/.*/./; q'`
53901
53902 # Avoid depending upon Character Ranges.
53903 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
53904 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
53905 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
53906 as_cr_digits='0123456789'
53907 as_cr_alnum=$as_cr_Letters$as_cr_digits
53908
53909 ECHO_C= ECHO_N= ECHO_T=
53910 case `echo -n x` in #(((((
53911 -n*)
53912 case `echo 'xy\c'` in
53913 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
53914 xy) ECHO_C='\c';;
53915 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
53916 ECHO_T=' ';;
53917 esac;;
53918 *)
53919 ECHO_N='-n';;
53920 esac
53921
53922 rm -f conf$$ conf$$.exe conf$$.file
53923 if test -d conf$$.dir; then
53924 rm -f conf$$.dir/conf$$.file
53925 else
53926 rm -f conf$$.dir
53927 mkdir conf$$.dir 2>/dev/null
53928 fi
53929 if (echo >conf$$.file) 2>/dev/null; then
53930 if ln -s conf$$.file conf$$ 2>/dev/null; then
53931 as_ln_s='ln -s'
53932 # ... but there are two gotchas:
53933 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
53934 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
53935 # In both cases, we have to default to `cp -pR'.
53936 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
53937 as_ln_s='cp -pR'
53938 elif ln conf$$.file conf$$ 2>/dev/null; then
53939 as_ln_s=ln
53940 else
53941 as_ln_s='cp -pR'
53942 fi
53943 else
53944 as_ln_s='cp -pR'
53945 fi
53946 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
53947 rmdir conf$$.dir 2>/dev/null
53948
53949
53950 # as_fn_mkdir_p
53951 # -------------
53952 # Create "$as_dir" as a directory, including parents if necessary.
53953 as_fn_mkdir_p ()
53954 {
53955
53956 case $as_dir in #(
53957 -*) as_dir=./$as_dir;;
53958 esac
53959 test -d "$as_dir" || eval $as_mkdir_p || {
53960 as_dirs=
53961 while :; do
53962 case $as_dir in #(
53963 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
53964 *) as_qdir=$as_dir;;
53965 esac
53966 as_dirs="'$as_qdir' $as_dirs"
53967 as_dir=`$as_dirname -- "$as_dir" ||
53968 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
53969 X"$as_dir" : 'X\(//\)[^/]' \| \
53970 X"$as_dir" : 'X\(//\)$' \| \
53971 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
53972 $as_echo X"$as_dir" |
53973 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
53974 s//\1/
53975 q
53976 }
53977 /^X\(\/\/\)[^/].*/{
53978 s//\1/
53979 q
53980 }
53981 /^X\(\/\/\)$/{
53982 s//\1/
53983 q
53984 }
53985 /^X\(\/\).*/{
53986 s//\1/
53987 q
53988 }
53989 s/.*/./; q'`
53990 test -d "$as_dir" && break
53991 done
53992 test -z "$as_dirs" || eval "mkdir $as_dirs"
53993 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
53994
53995
53996 } # as_fn_mkdir_p
53997 if mkdir -p . 2>/dev/null; then
53998 as_mkdir_p='mkdir -p "$as_dir"'
53999 else
54000 test -d ./-p && rmdir ./-p
54001 as_mkdir_p=false
54002 fi
54003
54004
54005 # as_fn_executable_p FILE
54006 # -----------------------
54007 # Test if FILE is an executable regular file.
54008 as_fn_executable_p ()
54009 {
54010 test -f "$1" && test -x "$1"
54011 } # as_fn_executable_p
54012 as_test_x='test -x'
54013 as_executable_p=as_fn_executable_p
54014
54015 # Sed expression to map a string onto a valid CPP name.
54016 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
54017
54018 # Sed expression to map a string onto a valid variable name.
54019 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
54020
54021
54022 exec 6>&1
54023 ## ----------------------------------- ##
54024 ## Main body of $CONFIG_STATUS script. ##
54025 ## ----------------------------------- ##
54026 _ASEOF
54027 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
54028
54029 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54030 # Save the log message, to keep $0 and so on meaningful, and to
54031 # report actual input values of CONFIG_FILES etc. instead of their
54032 # values after options handling.
54033 ac_log="
54034 This file was extended by OpenJDK $as_me jdk9, which was
54035 generated by GNU Autoconf 2.69. Invocation command line was
54036
54037 CONFIG_FILES = $CONFIG_FILES
54038 CONFIG_HEADERS = $CONFIG_HEADERS
54039 CONFIG_LINKS = $CONFIG_LINKS
54040 CONFIG_COMMANDS = $CONFIG_COMMANDS
54041 $ $0 $@
54042
54043 on `(hostname || uname -n) 2>/dev/null | sed 1q`
54044 "
54045
54046 _ACEOF
54047
54048 case $ac_config_files in *"
54049 "*) set x $ac_config_files; shift; ac_config_files=$*;;
54050 esac
54051
54052
54053
54054 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54055 # Files that config.status was made for.
54056 config_files="$ac_config_files"
54057
54058 _ACEOF
54059
54060 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54061 ac_cs_usage="\
54062 \`$as_me' instantiates files and other configuration actions
54063 from templates according to the current configuration. Unless the files
54064 and actions are specified as TAGs, all are instantiated by default.
54065
54066 Usage: $0 [OPTION]... [TAG]...
54067
54068 -h, --help print this help, then exit
54069 -V, --version print version number and configuration settings, then exit
54070 --config print configuration, then exit
54071 -q, --quiet, --silent
54072 do not print progress messages
54073 -d, --debug don't remove temporary files
54074 --recheck update $as_me by reconfiguring in the same conditions
54075 --file=FILE[:TEMPLATE]
54076 instantiate the configuration file FILE
54077
54078 Configuration files:
54079 $config_files
54080
54081 Report bugs to <build-dev@openjdk.java.net>.
54082 OpenJDK home page: <http://openjdk.java.net>."
54083
54084 _ACEOF
54085 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54086 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
54087 ac_cs_version="\\
54088 OpenJDK config.status jdk9
54089 configured by $0, generated by GNU Autoconf 2.69,
54090 with options \\"\$ac_cs_config\\"
54091
54092 Copyright (C) 2012 Free Software Foundation, Inc.
54093 This config.status script is free software; the Free Software Foundation
54094 gives unlimited permission to copy, distribute and modify it."
54095
54096 ac_pwd='$ac_pwd'
54097 srcdir='$srcdir'
54098 AWK='$AWK'
54099 test -n "\$AWK" || AWK=awk
54100 _ACEOF
54101
54102 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54103 # The default lists apply if the user does not specify any file.
54104 ac_need_defaults=:
54105 while test $# != 0
54106 do
54107 case $1 in
54108 --*=?*)
54109 ac_option=`expr "X$1" : 'X\([^=]*\)='`
54110 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
54111 ac_shift=:
54112 ;;
54113 --*=)
54114 ac_option=`expr "X$1" : 'X\([^=]*\)='`
54115 ac_optarg=
54116 ac_shift=:
54117 ;;
54118 *)
54119 ac_option=$1
54120 ac_optarg=$2
54121 ac_shift=shift
54122 ;;
54123 esac
54124
54125 case $ac_option in
54126 # Handling of the options.
54127 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
54128 ac_cs_recheck=: ;;
54129 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
54130 $as_echo "$ac_cs_version"; exit ;;
54131 --config | --confi | --conf | --con | --co | --c )
54132 $as_echo "$ac_cs_config"; exit ;;
54133 --debug | --debu | --deb | --de | --d | -d )
54134 debug=: ;;
54135 --file | --fil | --fi | --f )
54136 $ac_shift
54137 case $ac_optarg in
54138 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
54139 '') as_fn_error $? "missing file argument" ;;
54140 esac
54141 as_fn_append CONFIG_FILES " '$ac_optarg'"
54142 ac_need_defaults=false;;
54143 --he | --h | --help | --hel | -h )
54144 $as_echo "$ac_cs_usage"; exit ;;
54145 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
54146 | -silent | --silent | --silen | --sile | --sil | --si | --s)
54147 ac_cs_silent=: ;;
54148
54149 # This is an error.
54150 -*) as_fn_error $? "unrecognized option: \`$1'
54151 Try \`$0 --help' for more information." ;;
54152
54153 *) as_fn_append ac_config_targets " $1"
54154 ac_need_defaults=false ;;
54155
54156 esac
54157 shift
54158 done
54159
54160 ac_configure_extra_args=
54161
54162 if $ac_cs_silent; then
54163 exec 6>/dev/null
54164 ac_configure_extra_args="$ac_configure_extra_args --silent"
54165 fi
54166
54167 _ACEOF
54168 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54169 if \$ac_cs_recheck; then
54170 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
54171 shift
54172 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
54173 CONFIG_SHELL='$SHELL'
54174 export CONFIG_SHELL
54175 exec "\$@"
54176 fi
54177
54178 _ACEOF
54179 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54180 exec 5>>config.log
54181 {
54182 echo
54183 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
54184 ## Running $as_me. ##
54185 _ASBOX
54186 $as_echo "$ac_log"
54187 } >&5
54188
54189 _ACEOF
54190 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54191 _ACEOF
54192
54193 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54194
54195 # Handling of arguments.
54196 for ac_config_target in $ac_config_targets
54197 do
54198 case $ac_config_target in
54199 "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
54200 "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
54201 "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
54202 "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
54203 "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
54204
54205 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
54206 esac
54207 done
54208
54209
54210 # If the user did not use the arguments to specify the items to instantiate,
54211 # then the envvar interface is used. Set only those that are not.
54212 # We use the long form for the default assignment because of an extremely
54213 # bizarre bug on SunOS 4.1.3.
54214 if $ac_need_defaults; then
54215 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
54216 fi
54217
54218 # Have a temporary directory for convenience. Make it in the build tree
54219 # simply because there is no reason against having it here, and in addition,
54220 # creating and moving files from /tmp can sometimes cause problems.
54221 # Hook for its removal unless debugging.
54222 # Note that there is a small window in which the directory will not be cleaned:
54223 # after its creation but before its name has been assigned to `$tmp'.
54224 $debug ||
54225 {
54226 tmp= ac_tmp=
54227 trap 'exit_status=$?
54228 : "${ac_tmp:=$tmp}"
54229 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
54230 ' 0
54231 trap 'as_fn_exit 1' 1 2 13 15
54232 }
54233 # Create a (secure) tmp directory for tmp files.
54234
54235 {
54236 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
54237 test -d "$tmp"
54238 } ||
54239 {
54240 tmp=./conf$$-$RANDOM
54241 (umask 077 && mkdir "$tmp")
54242 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
54243 ac_tmp=$tmp
54244
54245 # Set up the scripts for CONFIG_FILES section.
54246 # No need to generate them if there are no CONFIG_FILES.
54247 # This happens for instance with `./config.status config.h'.
54248 if test -n "$CONFIG_FILES"; then
54249
54250
54251 ac_cr=`echo X | tr X '\015'`
54252 # On cygwin, bash can eat \r inside `` if the user requested igncr.
54253 # But we know of no other shell where ac_cr would be empty at this
54254 # point, so we can use a bashism as a fallback.
54255 if test "x$ac_cr" = x; then
54256 eval ac_cr=\$\'\\r\'
54257 fi
54258 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
54259 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
54260 ac_cs_awk_cr='\\r'
54261 else
54262 ac_cs_awk_cr=$ac_cr
54263 fi
54264
54265 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
54266 _ACEOF
54267
54268
54269 {
54270 echo "cat >conf$$subs.awk <<_ACEOF" &&
54271 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
54272 echo "_ACEOF"
54273 } >conf$$subs.sh ||
54274 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54275 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
54276 ac_delim='%!_!# '
54277 for ac_last_try in false false false false false :; do
54278 . ./conf$$subs.sh ||
54279 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54280
54281 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
54282 if test $ac_delim_n = $ac_delim_num; then
54283 break
54284 elif $ac_last_try; then
54285 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54286 else
54287 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
54288 fi
54289 done
54290 rm -f conf$$subs.sh
54291
54292 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54293 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
54294 _ACEOF
54295 sed -n '
54296 h
54297 s/^/S["/; s/!.*/"]=/
54298 p
54299 g
54300 s/^[^!]*!//
54301 :repl
54302 t repl
54303 s/'"$ac_delim"'$//
54304 t delim
54305 :nl
54306 h
54307 s/\(.\{148\}\)..*/\1/
54308 t more1
54309 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
54310 p
54311 n
54312 b repl
54313 :more1
54314 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
54315 p
54316 g
54317 s/.\{148\}//
54318 t nl
54319 :delim
54320 h
54321 s/\(.\{148\}\)..*/\1/
54322 t more2
54323 s/["\\]/\\&/g; s/^/"/; s/$/"/
54324 p
54325 b
54326 :more2
54327 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
54328 p
54329 g
54330 s/.\{148\}//
54331 t delim
54332 ' <conf$$subs.awk | sed '
54333 /^[^""]/{
54334 N
54335 s/\n//
54336 }
54337 ' >>$CONFIG_STATUS || ac_write_fail=1
54338 rm -f conf$$subs.awk
54339 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54340 _ACAWK
54341 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
54342 for (key in S) S_is_set[key] = 1
54343 FS = ""
54344
54345 }
54346 {
54347 line = $ 0
54348 nfields = split(line, field, "@")
54349 substed = 0
54350 len = length(field[1])
54351 for (i = 2; i < nfields; i++) {
54352 key = field[i]
54353 keylen = length(key)
54354 if (S_is_set[key]) {
54355 value = S[key]
54356 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
54357 len += length(value) + length(field[++i])
54358 substed = 1
54359 } else
54360 len += 1 + keylen
54361 }
54362
54363 print line
54364 }
54365
54366 _ACAWK
54367 _ACEOF
54368 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54369 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
54370 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
54371 else
54372 cat
54373 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
54374 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
54375 _ACEOF
54376
54377 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
54378 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
54379 # trailing colons and then remove the whole line if VPATH becomes empty
54380 # (actually we leave an empty line to preserve line numbers).
54381 if test "x$srcdir" = x.; then
54382 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
54383 h
54384 s///
54385 s/^/:/
54386 s/[ ]*$/:/
54387 s/:\$(srcdir):/:/g
54388 s/:\${srcdir}:/:/g
54389 s/:@srcdir@:/:/g
54390 s/^:*//
54391 s/:*$//
54392 x
54393 s/\(=[ ]*\).*/\1/
54394 G
54395 s/\n//
54396 s/^[^=]*=[ ]*$//
54397 }'
54398 fi
54399
54400 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54401 fi # test -n "$CONFIG_FILES"
54402
54403
54404 eval set X " :F $CONFIG_FILES "
54405 shift
54406 for ac_tag
54407 do
54408 case $ac_tag in
54409 :[FHLC]) ac_mode=$ac_tag; continue;;
54410 esac
54411 case $ac_mode$ac_tag in
54412 :[FHL]*:*);;
54413 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
54414 :[FH]-) ac_tag=-:-;;
54415 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
54416 esac
54417 ac_save_IFS=$IFS
54418 IFS=:
54419 set x $ac_tag
54420 IFS=$ac_save_IFS
54421 shift
54422 ac_file=$1
54423 shift
54424
54425 case $ac_mode in
54426 :L) ac_source=$1;;
54427 :[FH])
54428 ac_file_inputs=
54429 for ac_f
54430 do
54431 case $ac_f in
54432 -) ac_f="$ac_tmp/stdin";;
54433 *) # Look for the file first in the build tree, then in the source tree
54434 # (if the path is not absolute). The absolute path cannot be DOS-style,
54435 # because $ac_f cannot contain `:'.
54436 test -f "$ac_f" ||
54437 case $ac_f in
54438 [\\/$]*) false;;
54439 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
54440 esac ||
54441 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
54442 esac
54443 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
54444 as_fn_append ac_file_inputs " '$ac_f'"
54445 done
54446
54447 # Let's still pretend it is `configure' which instantiates (i.e., don't
54448 # use $as_me), people would be surprised to read:
54449 # /* config.h. Generated by config.status. */
54450 configure_input='Generated from '`
54451 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
54452 `' by configure.'
54453 if test x"$ac_file" != x-; then
54454 configure_input="$ac_file. $configure_input"
54455 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
54456 $as_echo "$as_me: creating $ac_file" >&6;}
54457 fi
54458 # Neutralize special characters interpreted by sed in replacement strings.
54459 case $configure_input in #(
54460 *\&* | *\|* | *\\* )
54461 ac_sed_conf_input=`$as_echo "$configure_input" |
54462 sed 's/[\\\\&|]/\\\\&/g'`;; #(
54463 *) ac_sed_conf_input=$configure_input;;
54464 esac
54465
54466 case $ac_tag in
54467 *:-:* | *:-) cat >"$ac_tmp/stdin" \
54468 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
54469 esac
54470 ;;
54471 esac
54472
54473 ac_dir=`$as_dirname -- "$ac_file" ||
54474 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
54475 X"$ac_file" : 'X\(//\)[^/]' \| \
54476 X"$ac_file" : 'X\(//\)$' \| \
54477 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
54478 $as_echo X"$ac_file" |
54479 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
54480 s//\1/
54481 q
54482 }
54483 /^X\(\/\/\)[^/].*/{
54484 s//\1/
54485 q
54486 }
54487 /^X\(\/\/\)$/{
54488 s//\1/
54489 q
54490 }
54491 /^X\(\/\).*/{
54492 s//\1/
54493 q
54494 }
54495 s/.*/./; q'`
54496 as_dir="$ac_dir"; as_fn_mkdir_p
54497 ac_builddir=.
54498
54499 case "$ac_dir" in
54500 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
54501 *)
54502 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
54503 # A ".." for each directory in $ac_dir_suffix.
54504 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
54505 case $ac_top_builddir_sub in
54506 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
54507 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
54508 esac ;;
54509 esac
54510 ac_abs_top_builddir=$ac_pwd
54511 ac_abs_builddir=$ac_pwd$ac_dir_suffix
54512 # for backward compatibility:
54513 ac_top_builddir=$ac_top_build_prefix
54514
54515 case $srcdir in
54516 .) # We are building in place.
54517 ac_srcdir=.
54518 ac_top_srcdir=$ac_top_builddir_sub
54519 ac_abs_top_srcdir=$ac_pwd ;;
54520 [\\/]* | ?:[\\/]* ) # Absolute name.
54521 ac_srcdir=$srcdir$ac_dir_suffix;
54522 ac_top_srcdir=$srcdir
54523 ac_abs_top_srcdir=$srcdir ;;
54524 *) # Relative name.
54525 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
54526 ac_top_srcdir=$ac_top_build_prefix$srcdir
54527 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
54528 esac
54529 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
54530
54531
54532 case $ac_mode in
54533 :F)
54534 #
54535 # CONFIG_FILE
54536 #
54537
54538 _ACEOF
54539
54540 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54541 # If the template does not know about datarootdir, expand it.
54542 # FIXME: This hack should be removed a few years after 2.60.
54543 ac_datarootdir_hack=; ac_datarootdir_seen=
54544 ac_sed_dataroot='
54545 /datarootdir/ {
54546 p
54547 q
54548 }
54549 /@datadir@/p
54550 /@docdir@/p
54551 /@infodir@/p
54552 /@localedir@/p
54553 /@mandir@/p'
54554 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
54555 *datarootdir*) ac_datarootdir_seen=yes;;
54556 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
54557 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
54558 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
54559 _ACEOF
54560 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54561 ac_datarootdir_hack='
54562 s&@datadir@&$datadir&g
54563 s&@docdir@&$docdir&g
54564 s&@infodir@&$infodir&g
54565 s&@localedir@&$localedir&g
54566 s&@mandir@&$mandir&g
54567 s&\\\${datarootdir}&$datarootdir&g' ;;
54568 esac
54569 _ACEOF
54570
54571 # Neutralize VPATH when `$srcdir' = `.'.
54572 # Shell code in configure.ac might set extrasub.
54573 # FIXME: do we really want to maintain this feature?
54574 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54575 ac_sed_extra="$ac_vpsub
54576 $extrasub
54577 _ACEOF
54578 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54579 :t
54580 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
54581 s|@configure_input@|$ac_sed_conf_input|;t t
54582 s&@top_builddir@&$ac_top_builddir_sub&;t t
54583 s&@top_build_prefix@&$ac_top_build_prefix&;t t
54584 s&@srcdir@&$ac_srcdir&;t t
54585 s&@abs_srcdir@&$ac_abs_srcdir&;t t
54586 s&@top_srcdir@&$ac_top_srcdir&;t t
54587 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
54588 s&@builddir@&$ac_builddir&;t t
54589 s&@abs_builddir@&$ac_abs_builddir&;t t
54590 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
54591 $ac_datarootdir_hack
54592 "
54593 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
54594 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54595
54596 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
54597 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
54598 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
54599 "$ac_tmp/out"`; test -z "$ac_out"; } &&
54600 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
54601 which seems to be undefined. Please make sure it is defined" >&5
54602 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
54603 which seems to be undefined. Please make sure it is defined" >&2;}
54604
54605 rm -f "$ac_tmp/stdin"
54606 case $ac_file in
54607 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
54608 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
54609 esac \
54610 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54611 ;;
54612
54613
54614
54615 esac
54616
54617 done # for ac_tag
54618
54619
54620 as_fn_exit 0
54621 _ACEOF
54622 ac_clean_files=$ac_clean_files_save
54623
54624 test $ac_write_fail = 0 ||
54625 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
54626
54627
54628 # configure is writing to config.log, and then calls config.status.
54629 # config.status does its own redirection, appending to config.log.
54630 # Unfortunately, on DOS this fails, as config.log is still kept open
54631 # by configure, so config.status won't be able to write to it; its
54632 # output is simply discarded. So we exec the FD to /dev/null,
54633 # effectively closing config.log, so it can be properly (re)opened and
54634 # appended to by config.status. When coming back to configure, we
54635 # need to make the FD available again.
54636 if test "$no_create" != yes; then
54637 ac_cs_success=:
54638 ac_config_status_args=
54639 test "$silent" = yes &&
54640 ac_config_status_args="$ac_config_status_args --quiet"
54641 exec 5>/dev/null
54642 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
54643 exec 5>>config.log
54644 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
54645 # would make configure fail if this is the last instruction.
54646 $ac_cs_success || as_fn_exit 1
54647 fi
54648 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
54649 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
54650 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
54651 fi
54652
54653
54654 # After AC_OUTPUT, we need to do final work
54655
54656
54657 # Try to move config.log (generated by autoconf) to the configure-support directory.
54658 if test -e ./config.log; then
54659 $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
54660 fi
54661
54662 # Rotate our log file (configure.log)
54663 if test -e "$OUTPUT_ROOT/configure.log.old"; then
54664 $RM -f "$OUTPUT_ROOT/configure.log.old"
54665 fi
54666 if test -e "$OUTPUT_ROOT/configure.log"; then
54667 $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
54668 fi
54669
54670 # Move configure.log from current directory to the build output root
54671 if test -e ./configure.log; then
54672 echo found it
54673 $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
54674 fi
54675
54676 # Make the compare script executable
54677 $CHMOD +x $OUTPUT_ROOT/compare.sh
54678
54679
54680 # Finally output some useful information to the user
54681
54682 # Finally output some useful information to the user
54683
54684 printf "\n"
54685 printf "====================================================\n"
54686 if test "x$no_create" != "xyes"; then
54687 if test "x$IS_RECONFIGURE" != "xyes"; then
54688 printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
54689 else
54690 printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
54691 fi
54692 else
54693 if test "x$IS_RECONFIGURE" != "xyes"; then
54694 printf "A configuration has been successfully checked but not created\n"
54695 else
54696 printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
54697 fi
54698 fi
54699 if test "x$CONFIGURE_COMMAND_LINE" != x; then
54700 printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
54701 else
54702 printf "using default settings.\n"
54703 fi
54704
54705 printf "\n"
54706 printf "Configuration summary:\n"
54707 printf "* Debug level: $DEBUG_LEVEL\n"
54708 printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
54709 printf "* JDK variant: $JDK_VARIANT\n"
54710 printf "* JVM variants: $with_jvm_variants\n"
54711 printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
54712 printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
54713
54714 printf "\n"
54715 printf "Tools summary:\n"
54716 if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
54717 printf "* Environment: $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
54718 fi
54719 printf "* Boot JDK: $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
54720 if test "x$TOOLCHAIN_VERSION" != "x"; then
54721 print_version=" $TOOLCHAIN_VERSION"
54722 fi
54723 printf "* Toolchain: $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
54724 printf "* C Compiler: Version $CC_VERSION_NUMBER (at $CC)\n"
54725 printf "* C++ Compiler: Version $CXX_VERSION_NUMBER (at $CXX)\n"
54726
54727 printf "\n"
54728 printf "Build performance summary:\n"
54729 printf "* Cores to use: $JOBS\n"
54730 printf "* Memory limit: $MEMORY_SIZE MB\n"
54731 if test "x$CCACHE_STATUS" != "x"; then
54732 printf "* ccache status: $CCACHE_STATUS\n"
54733 fi
54734 printf "\n"
54735
54736 if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
54737 printf "NOTE: You have requested to build more than one version of the JVM, which\n"
54738 printf "will result in longer build times.\n"
54739 printf "\n"
54740 fi
54741
54742 if test "x$FOUND_ALT_VARIABLES" != "x"; then
54743 printf "WARNING: You have old-style ALT_ environment variables set.\n"
54744 printf "These are not respected, and will be ignored. It is recommended\n"
54745 printf "that you clean your environment. The following variables are set:\n"
54746 printf "$FOUND_ALT_VARIABLES\n"
54747 printf "\n"
54748 fi
54749
54750 if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
54751 printf "WARNING: Your build output directory is not on a local disk.\n"
54752 printf "This will severely degrade build performance!\n"
54753 printf "It is recommended that you create an output directory on a local disk,\n"
54754 printf "and run the configure script again from that directory.\n"
54755 printf "\n"
54756 fi
54757
54758 if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
54759 printf "WARNING: The result of this configuration has overridden an older\n"
54760 printf "configuration. You *should* run 'make clean' to make sure you get a\n"
54761 printf "proper build. Failure to do so might result in strange build problems.\n"
54762 printf "\n"
54763 fi
54764
54765 if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
54766 printf "WARNING: The result of this configuration was not saved.\n"
54767 printf "You should run without '--no-create | -n' to create the configuration.\n"
54768 printf "\n"
54769 fi
54770
54771
54772
54773 # Locate config.log.
54774 if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
54775 CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
54776 elif test -e "./config.log"; then
54777 CONFIG_LOG_PATH="."
54778 fi
54779
54780 if test -e "$CONFIG_LOG_PATH/config.log"; then
54781 $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
54782 if test $? -eq 0; then
54783 printf "The following warnings were produced. Repeated here for convenience:\n"
54784 # We must quote sed expression (using []) to stop m4 from eating the [].
54785 $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e 's/^configure:[0-9]*: //'
54786 printf "\n"
54787 fi
54788 fi
54789