1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.68 for OpenJDK jdk8.
4 #
5 # Report bugs to <build-dev@openjdk.java.net>.
6 #
7 #
8 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
9 # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
10 # Foundation, Inc.
11 #
12 #
13 # This configure script is free software; the Free Software Foundation
14 # gives unlimited permission to copy, distribute and modify it.
15 ## -------------------- ##
16 ## M4sh Initialization. ##
17 ## -------------------- ##
18
19 # Be more Bourne compatible
20 DUALCASE=1; export DUALCASE # for MKS sh
21 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
22 emulate sh
23 NULLCMD=:
24 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25 # is contrary to our usage. Disable this feature.
26 alias -g '${1+"$@"}'='"$@"'
27 setopt NO_GLOB_SUBST
28 else
29 case `(set -o) 2>/dev/null` in #(
30 *posix*) :
31 set -o posix ;; #(
32 *) :
33 ;;
34 esac
35 fi
36
37
38 as_nl='
39 '
40 export as_nl
41 # Printing a long string crashes Solaris 7 /usr/bin/printf.
42 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45 # Prefer a ksh shell builtin over an external printf program on Solaris,
46 # but without wasting forks for bash or zsh.
47 if test -z "$BASH_VERSION$ZSH_VERSION" \
48 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49 as_echo='print -r --'
50 as_echo_n='print -rn --'
51 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52 as_echo='printf %s\n'
53 as_echo_n='printf %s'
54 else
55 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57 as_echo_n='/usr/ucb/echo -n'
58 else
59 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60 as_echo_n_body='eval
61 arg=$1;
62 case $arg in #(
63 *"$as_nl"*)
64 expr "X$arg" : "X\\(.*\\)$as_nl";
65 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66 esac;
67 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68 '
69 export as_echo_n_body
70 as_echo_n='sh -c $as_echo_n_body as_echo'
71 fi
72 export as_echo_body
73 as_echo='sh -c $as_echo_body as_echo'
74 fi
75
76 # The user is always right.
77 if test "${PATH_SEPARATOR+set}" != set; then
78 PATH_SEPARATOR=:
79 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81 PATH_SEPARATOR=';'
82 }
83 fi
84
85
86 # IFS
87 # We need space, tab and new line, in precisely that order. Quoting is
88 # there to prevent editors from complaining about space-tab.
89 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
90 # splitting by setting IFS to empty value.)
91 IFS=" "" $as_nl"
92
93 # Find who we are. Look in the path if we contain no directory separator.
94 as_myself=
95 case $0 in #((
96 *[\\/]* ) as_myself=$0 ;;
97 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
98 for as_dir in $PATH
99 do
100 IFS=$as_save_IFS
101 test -z "$as_dir" && as_dir=.
102 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
103 done
104 IFS=$as_save_IFS
105
106 ;;
107 esac
108 # We did not find ourselves, most probably we were run as `sh COMMAND'
109 # in which case we are not to be found in the path.
110 if test "x$as_myself" = x; then
111 as_myself=$0
112 fi
113 if test ! -f "$as_myself"; then
114 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
115 exit 1
116 fi
117
118 # Unset variables that we do not need and which cause bugs (e.g. in
119 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
120 # suppresses any "Segmentation fault" message there. '((' could
121 # trigger a bug in pdksh 5.2.14.
122 for as_var in BASH_ENV ENV MAIL MAILPATH
123 do eval test x\${$as_var+set} = xset \
124 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
125 done
126 PS1='$ '
127 PS2='> '
128 PS4='+ '
129
130 # NLS nuisances.
131 LC_ALL=C
132 export LC_ALL
133 LANGUAGE=C
134 export LANGUAGE
135
136 # CDPATH.
137 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
138
139 if test "x$CONFIG_SHELL" = x; then
140 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
141 emulate sh
142 NULLCMD=:
143 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
144 # is contrary to our usage. Disable this feature.
145 alias -g '\${1+\"\$@\"}'='\"\$@\"'
146 setopt NO_GLOB_SUBST
147 else
148 case \`(set -o) 2>/dev/null\` in #(
149 *posix*) :
150 set -o posix ;; #(
151 *) :
152 ;;
153 esac
154 fi
155 "
156 as_required="as_fn_return () { (exit \$1); }
157 as_fn_success () { as_fn_return 0; }
158 as_fn_failure () { as_fn_return 1; }
159 as_fn_ret_success () { return 0; }
160 as_fn_ret_failure () { return 1; }
161
162 exitcode=0
163 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
164 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
165 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
166 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
167 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
168
169 else
170 exitcode=1; echo positional parameters were not saved.
171 fi
172 test x\$exitcode = x0 || exit 1"
173 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
174 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
175 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
176 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
177 test \$(( 1 + 1 )) = 2 || exit 1"
178 if (eval "$as_required") 2>/dev/null; then :
179 as_have_required=yes
180 else
181 as_have_required=no
182 fi
183 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
184
185 else
186 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
187 as_found=false
188 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
189 do
190 IFS=$as_save_IFS
191 test -z "$as_dir" && as_dir=.
192 as_found=:
193 case $as_dir in #(
194 /*)
195 for as_base in sh bash ksh sh5; do
196 # Try only shells that exist, to save several forks.
197 as_shell=$as_dir/$as_base
198 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
199 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
200 CONFIG_SHELL=$as_shell as_have_required=yes
201 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
202 break 2
203 fi
204 fi
205 done;;
206 esac
207 as_found=false
208 done
209 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
210 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
211 CONFIG_SHELL=$SHELL as_have_required=yes
212 fi; }
213 IFS=$as_save_IFS
214
215
216 if test "x$CONFIG_SHELL" != x; then :
217 # We cannot yet assume a decent shell, so we have to provide a
218 # neutralization value for shells without unset; and this also
219 # works around shells that cannot unset nonexistent variables.
220 # Preserve -v and -x to the replacement shell.
221 BASH_ENV=/dev/null
222 ENV=/dev/null
223 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
224 export CONFIG_SHELL
225 case $- in # ((((
226 *v*x* | *x*v* ) as_opts=-vx ;;
227 *v* ) as_opts=-v ;;
228 *x* ) as_opts=-x ;;
229 * ) as_opts= ;;
230 esac
231 exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
232 fi
233
234 if test x$as_have_required = xno; then :
235 $as_echo "$0: This script requires a shell more modern than all"
236 $as_echo "$0: the shells that I found on your system."
237 if test x${ZSH_VERSION+set} = xset ; then
238 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
239 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
240 else
241 $as_echo "$0: Please tell bug-autoconf@gnu.org and
242 $0: build-dev@openjdk.java.net about your system, including
243 $0: any error possibly output before this message. Then
244 $0: install a modern shell, or manually run the script
245 $0: under such a shell if you do have one."
246 fi
247 exit 1
248 fi
249 fi
250 fi
251 SHELL=${CONFIG_SHELL-/bin/sh}
252 export SHELL
253 # Unset more variables known to interfere with behavior of common tools.
254 CLICOLOR_FORCE= GREP_OPTIONS=
255 unset CLICOLOR_FORCE GREP_OPTIONS
256
257 ## --------------------- ##
258 ## M4sh Shell Functions. ##
259 ## --------------------- ##
260 # as_fn_unset VAR
261 # ---------------
262 # Portably unset VAR.
263 as_fn_unset ()
264 {
265 { eval $1=; unset $1;}
266 }
267 as_unset=as_fn_unset
268
269 # as_fn_set_status STATUS
270 # -----------------------
271 # Set $? to STATUS, without forking.
272 as_fn_set_status ()
273 {
274 return $1
275 } # as_fn_set_status
276
277 # as_fn_exit STATUS
278 # -----------------
279 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
280 as_fn_exit ()
281 {
282 set +e
283 as_fn_set_status $1
284 exit $1
285 } # as_fn_exit
286
287 # as_fn_mkdir_p
288 # -------------
289 # Create "$as_dir" as a directory, including parents if necessary.
290 as_fn_mkdir_p ()
291 {
292
293 case $as_dir in #(
294 -*) as_dir=./$as_dir;;
295 esac
296 test -d "$as_dir" || eval $as_mkdir_p || {
297 as_dirs=
298 while :; do
299 case $as_dir in #(
300 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
301 *) as_qdir=$as_dir;;
302 esac
303 as_dirs="'$as_qdir' $as_dirs"
304 as_dir=`$as_dirname -- "$as_dir" ||
305 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
306 X"$as_dir" : 'X\(//\)[^/]' \| \
307 X"$as_dir" : 'X\(//\)$' \| \
308 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
309 $as_echo X"$as_dir" |
310 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
311 s//\1/
312 q
313 }
314 /^X\(\/\/\)[^/].*/{
315 s//\1/
316 q
317 }
318 /^X\(\/\/\)$/{
319 s//\1/
320 q
321 }
322 /^X\(\/\).*/{
323 s//\1/
324 q
325 }
326 s/.*/./; q'`
327 test -d "$as_dir" && break
328 done
329 test -z "$as_dirs" || eval "mkdir $as_dirs"
330 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
331
332
333 } # as_fn_mkdir_p
334 # as_fn_append VAR VALUE
335 # ----------------------
336 # Append the text in VALUE to the end of the definition contained in VAR. Take
337 # advantage of any shell optimizations that allow amortized linear growth over
338 # repeated appends, instead of the typical quadratic growth present in naive
339 # implementations.
340 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
341 eval 'as_fn_append ()
342 {
343 eval $1+=\$2
344 }'
345 else
346 as_fn_append ()
347 {
348 eval $1=\$$1\$2
349 }
350 fi # as_fn_append
351
352 # as_fn_arith ARG...
353 # ------------------
354 # Perform arithmetic evaluation on the ARGs, and store the result in the
355 # global $as_val. Take advantage of shells that can avoid forks. The arguments
356 # must be portable across $(()) and expr.
357 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
358 eval 'as_fn_arith ()
359 {
360 as_val=$(( $* ))
361 }'
362 else
363 as_fn_arith ()
364 {
365 as_val=`expr "$@" || test $? -eq 1`
366 }
367 fi # as_fn_arith
368
369
370 # as_fn_error STATUS ERROR [LINENO LOG_FD]
371 # ----------------------------------------
372 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
373 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
374 # script with STATUS, using 1 if that was 0.
375 as_fn_error ()
376 {
377 as_status=$1; test $as_status -eq 0 && as_status=1
378 if test "$4"; then
379 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
380 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
381 fi
382 $as_echo "$as_me: error: $2" >&2
383 as_fn_exit $as_status
384 } # as_fn_error
385
386 if expr a : '\(a\)' >/dev/null 2>&1 &&
387 test "X`expr 00001 : '.*\(...\)'`" = X001; then
388 as_expr=expr
389 else
390 as_expr=false
391 fi
392
393 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
394 as_basename=basename
395 else
396 as_basename=false
397 fi
398
399 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
400 as_dirname=dirname
401 else
402 as_dirname=false
403 fi
404
405 as_me=`$as_basename -- "$0" ||
406 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
407 X"$0" : 'X\(//\)$' \| \
408 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
409 $as_echo X/"$0" |
410 sed '/^.*\/\([^/][^/]*\)\/*$/{
411 s//\1/
412 q
413 }
414 /^X\/\(\/\/\)$/{
415 s//\1/
416 q
417 }
418 /^X\/\(\/\).*/{
419 s//\1/
420 q
421 }
422 s/.*/./; q'`
423
424 # Avoid depending upon Character Ranges.
425 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
426 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
427 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
428 as_cr_digits='0123456789'
429 as_cr_alnum=$as_cr_Letters$as_cr_digits
430
431
432 as_lineno_1=$LINENO as_lineno_1a=$LINENO
433 as_lineno_2=$LINENO as_lineno_2a=$LINENO
434 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
435 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
436 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
437 sed -n '
438 p
439 /[$]LINENO/=
440 ' <$as_myself |
441 sed '
442 s/[$]LINENO.*/&-/
443 t lineno
444 b
445 :lineno
446 N
447 :loop
448 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
449 t loop
450 s/-\n.*//
451 ' >$as_me.lineno &&
452 chmod +x "$as_me.lineno" ||
453 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
454
455 # Don't try to exec as it changes $[0], causing all sort of problems
456 # (the dirname of $[0] is not the place where we might find the
457 # original and so on. Autoconf is especially sensitive to this).
458 . "./$as_me.lineno"
459 # Exit status is that of the last command.
460 exit
461 }
462
463 ECHO_C= ECHO_N= ECHO_T=
464 case `echo -n x` in #(((((
465 -n*)
466 case `echo 'xy\c'` in
467 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
468 xy) ECHO_C='\c';;
469 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
470 ECHO_T=' ';;
471 esac;;
472 *)
473 ECHO_N='-n';;
474 esac
475
476 rm -f conf$$ conf$$.exe conf$$.file
477 if test -d conf$$.dir; then
478 rm -f conf$$.dir/conf$$.file
479 else
480 rm -f conf$$.dir
481 mkdir conf$$.dir 2>/dev/null
482 fi
483 if (echo >conf$$.file) 2>/dev/null; then
484 if ln -s conf$$.file conf$$ 2>/dev/null; then
485 as_ln_s='ln -s'
486 # ... but there are two gotchas:
487 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
488 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
489 # In both cases, we have to default to `cp -p'.
490 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
491 as_ln_s='cp -p'
492 elif ln conf$$.file conf$$ 2>/dev/null; then
493 as_ln_s=ln
494 else
495 as_ln_s='cp -p'
496 fi
497 else
498 as_ln_s='cp -p'
499 fi
500 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
501 rmdir conf$$.dir 2>/dev/null
502
503 if mkdir -p . 2>/dev/null; then
504 as_mkdir_p='mkdir -p "$as_dir"'
505 else
506 test -d ./-p && rmdir ./-p
507 as_mkdir_p=false
508 fi
509
510 if test -x / >/dev/null 2>&1; then
511 as_test_x='test -x'
512 else
513 if ls -dL / >/dev/null 2>&1; then
514 as_ls_L_option=L
515 else
516 as_ls_L_option=
517 fi
518 as_test_x='
519 eval sh -c '\''
520 if test -d "$1"; then
521 test -d "$1/.";
522 else
523 case $1 in #(
524 -*)set "./$1";;
525 esac;
526 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
527 ???[sx]*):;;*)false;;esac;fi
528 '\'' sh
529 '
530 fi
531 as_executable_p=$as_test_x
532
533 # Sed expression to map a string onto a valid CPP name.
534 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
535
536 # Sed expression to map a string onto a valid variable name.
537 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
538
539
540 test -n "$DJDIR" || exec 7<&0 </dev/null
541 exec 6>&1
542
543 # Name of the host.
544 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
545 # so uname gets run too.
546 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
547
548 #
549 # Initializations.
550 #
551 ac_default_prefix=/usr/local
552 ac_clean_files=
553 ac_config_libobj_dir=.
554 LIBOBJS=
555 cross_compiling=no
556 subdirs=
557 MFLAGS=
558 MAKEFLAGS=
559
560 # Identity of this package.
561 PACKAGE_NAME='OpenJDK'
562 PACKAGE_TARNAME='openjdk'
563 PACKAGE_VERSION='jdk8'
564 PACKAGE_STRING='OpenJDK jdk8'
565 PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
566 PACKAGE_URL='http://openjdk.java.net'
567
568 # Factoring default headers for most tests.
569 ac_includes_default="\
570 #include <stdio.h>
571 #ifdef HAVE_SYS_TYPES_H
572 # include <sys/types.h>
573 #endif
574 #ifdef HAVE_SYS_STAT_H
575 # include <sys/stat.h>
576 #endif
577 #ifdef STDC_HEADERS
578 # include <stdlib.h>
579 # include <stddef.h>
580 #else
581 # ifdef HAVE_STDLIB_H
582 # include <stdlib.h>
583 # endif
584 #endif
585 #ifdef HAVE_STRING_H
586 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
587 # include <memory.h>
588 # endif
589 # include <string.h>
590 #endif
591 #ifdef HAVE_STRINGS_H
592 # include <strings.h>
593 #endif
594 #ifdef HAVE_INTTYPES_H
595 # include <inttypes.h>
596 #endif
597 #ifdef HAVE_STDINT_H
598 # include <stdint.h>
599 #endif
600 #ifdef HAVE_UNISTD_H
601 # include <unistd.h>
602 #endif"
603
604 ac_subst_vars='LTLIBOBJS
605 LIBOBJS
606 CCACHE
607 USE_PRECOMPILED_HEADER
608 SJAVAC_SERVER_DIR
609 ENABLE_SJAVAC
610 SJAVAC_SERVER_CORES
611 SJAVAC_SERVER_JAVA
612 JOBS
613 MEMORY_SIZE
614 NUM_CORES
615 ENABLE_INTREE_EC
616 SALIB_NAME
617 HOTSPOT_MAKE_ARGS
618 FIXPATH
619 LIBCXX
620 STATIC_CXX_SETTING
621 LIBDL
622 LIBM
623 LIBZIP_CAN_USE_MMAP
624 USE_EXTERNAL_LIBZ
625 USE_EXTERNAL_LIBGIF
626 USE_EXTERNAL_LIBJPEG
627 ALSA_LIBS
628 ALSA_CFLAGS
629 FREETYPE2_LIB_PATH
630 USING_SYSTEM_FT_LIB
631 FREETYPE2_LIBS
632 FREETYPE2_CFLAGS
633 CUPS_CFLAGS
634 OPENWIN_HOME
635 X_EXTRA_LIBS
636 X_LIBS
637 X_PRE_LIBS
638 X_CFLAGS
639 XMKMF
640 CXXFLAGS_DEBUG_SYMBOLS
641 CFLAGS_DEBUG_SYMBOLS
642 ZIP_DEBUGINFO_FILES
643 ENABLE_DEBUG_SYMBOLS
644 LDFLAGS_CXX_JDK
645 LDFLAGS_JDKEXE_SUFFIX
646 LDFLAGS_JDKLIB_SUFFIX
647 LDFLAGS_JDKEXE
648 LDFLAGS_JDKLIB
649 CXXFLAGS_JDKEXE
650 CXXFLAGS_JDKLIB
651 CFLAGS_JDKEXE
652 CFLAGS_JDKLIB
653 MACOSX_VERSION_MIN
654 PACKAGE_PATH
655 LEGACY_EXTRA_LDFLAGS
656 LEGACY_EXTRA_CXXFLAGS
657 LEGACY_EXTRA_CFLAGS
658 CXX_FLAG_DEPS
659 C_FLAG_DEPS
660 CXX_O_FLAG_NONE
661 CXX_O_FLAG_NORM
662 CXX_O_FLAG_HI
663 CXX_O_FLAG_HIGHEST
664 C_O_FLAG_NONE
665 C_O_FLAG_NORM
666 C_O_FLAG_HI
667 C_O_FLAG_HIGHEST
668 POST_MCS_CMD
669 POST_STRIP_CMD
670 SET_EXECUTABLE_ORIGIN
671 SET_SHARED_LIBRARY_ORIGIN
672 CXX_FLAG_REORDER
673 C_FLAG_REORDER
674 SET_SHARED_LIBRARY_MAPFILE
675 SET_SHARED_LIBRARY_NAME
676 SHARED_LIBRARY_FLAGS
677 EXE_SUFFIX
678 STATIC_LIBRARY_SUFFIX
679 SHARED_LIBRARY_SUFFIX
680 LIBRARY_PREFIX
681 STATIC_LIBRARY
682 SHARED_LIBRARY
683 OBJ_SUFFIX
684 LIPO
685 ac_ct_OBJDUMP
686 OBJDUMP
687 ac_ct_OBJCOPY
688 OBJCOPY
689 MCS
690 STRIP
691 NM
692 AS
693 CXXCPP
694 CPP
695 COMPILER_TYPE
696 RC_FLAGS
697 DUMPBIN
698 WINAR
699 HOTSPOT_RC
700 HOTSPOT_MT
701 RC
702 MT
703 WINLD
704 HOTSPOT_LD
705 HOTSPOT_CXX
706 ARFLAGS
707 AR
708 LDEXECXX
709 LDCXX
710 LDEXE
711 LD
712 ac_ct_OBJC
713 OBJCFLAGS
714 OBJC
715 ac_ct_CXX
716 CXXFLAGS
717 CXX
718 ac_ct_PROPER_COMPILER_CXX
719 PROPER_COMPILER_CXX
720 POTENTIAL_CXX
721 TOOLS_DIR_CXX
722 OBJEXT
723 EXEEXT
724 ac_ct_CC
725 CPPFLAGS
726 LDFLAGS
727 CFLAGS
728 CC
729 ac_ct_PROPER_COMPILER_CC
730 PROPER_COMPILER_CC
731 POTENTIAL_CC
732 TOOLS_DIR_CC
733 BUILD_LD
734 BUILD_CXX
735 BUILD_CC
736 MSVCR_DLL
737 DXSDK_INCLUDE_PATH
738 DXSDK_LIB_PATH
739 VS_PATH
740 VS_LIB
741 VS_INCLUDE
742 CYGWIN_LINK
743 AR_OUT_OPTION
744 LD_OUT_OPTION
745 EXE_OUT_OPTION
746 CC_OUT_OPTION
747 BUILD_HOTSPOT
748 HOTSPOT_DIST
749 BUILD_OUTPUT
750 OVERRIDE_SRC_ROOT
751 ADD_SRC_ROOT
752 JDK_TOPDIR
753 NASHORN_TOPDIR
754 HOTSPOT_TOPDIR
755 JAXWS_TOPDIR
756 JAXP_TOPDIR
757 CORBA_TOPDIR
758 LANGTOOLS_TOPDIR
759 BOOT_JDK_JVMARGS
760 JAVAC_FLAGS
761 BOOT_JDK_SOURCETARGET
762 BOOT_JDK
763 BOOT_TOOLSJAR
764 BOOT_RTJAR
765 JAVA_CHECK
766 JAVAC_CHECK
767 COOKED_BUILD_NUMBER
768 JDK_VERSION
769 COPYRIGHT_YEAR
770 MACOSX_BUNDLE_ID_BASE
771 MACOSX_BUNDLE_NAME_BASE
772 COMPANY_NAME
773 JDK_RC_PLATFORM_NAME
774 PRODUCT_SUFFIX
775 PRODUCT_NAME
776 LAUNCHER_NAME
777 MILESTONE
778 JDK_BUILD_NUMBER
779 JDK_UPDATE_VERSION
780 JDK_MICRO_VERSION
781 JDK_MINOR_VERSION
782 JDK_MAJOR_VERSION
783 USER_RELEASE_SUFFIX
784 COMPRESS_JARS
785 UNLIMITED_CRYPTO
786 CACERTS_FILE
787 TEST_IN_BUILD
788 BUILD_HEADLESS
789 SUPPORT_HEADFUL
790 SUPPORT_HEADLESS
791 BDEPS_FTP
792 BDEPS_UNZIP
793 OS_VERSION_MICRO
794 OS_VERSION_MINOR
795 OS_VERSION_MAJOR
796 PKG_CONFIG
797 TIME
798 STAT
799 HG
800 READELF
801 OTOOL
802 LDD
803 ZIP
804 UNZIP
805 FIND_DELETE
806 MAKE
807 CHECK_TOOLSDIR_MAKE
808 CHECK_TOOLSDIR_GMAKE
809 CHECK_MAKE
810 CHECK_GMAKE
811 PKGHANDLER
812 OUTPUT_ROOT
813 CONF_NAME
814 SPEC
815 BUILD_VARIANT_RELEASE
816 DEBUG_CLASSFILES
817 FASTDEBUG
818 VARIANT
819 DEBUG_LEVEL
820 MACOSX_UNIVERSAL
821 JVM_VARIANT_ZEROSHARK
822 JVM_VARIANT_ZERO
823 JVM_VARIANT_KERNEL
824 JVM_VARIANT_MINIMAL1
825 JVM_VARIANT_CLIENT
826 JVM_VARIANT_SERVER
827 JVM_VARIANTS
828 JDK_VARIANT
829 SET_OPENJDK
830 BUILD_LOG_WRAPPER
831 BUILD_LOG_PREVIOUS
832 BUILD_LOG
833 SYS_ROOT
834 PATH_SEP
835 SRC_ROOT
836 DEFINE_CROSS_COMPILE_ARCH
837 LP64
838 OPENJDK_TARGET_OS_API_DIR
839 OPENJDK_TARGET_CPU_JLI_CFLAGS
840 OPENJDK_TARGET_CPU_OSARCH
841 OPENJDK_TARGET_CPU_ISADIR
842 OPENJDK_TARGET_CPU_LIBDIR
843 OPENJDK_TARGET_CPU_LEGACY_LIB
844 OPENJDK_TARGET_CPU_LEGACY
845 REQUIRED_OS_VERSION
846 REQUIRED_OS_NAME
847 COMPILE_TYPE
848 OPENJDK_TARGET_CPU_ENDIAN
849 OPENJDK_TARGET_CPU_BITS
850 OPENJDK_TARGET_CPU_ARCH
851 OPENJDK_TARGET_CPU
852 OPENJDK_TARGET_OS_API
853 OPENJDK_TARGET_OS
854 OPENJDK_BUILD_CPU_ENDIAN
855 OPENJDK_BUILD_CPU_BITS
856 OPENJDK_BUILD_CPU_ARCH
857 OPENJDK_BUILD_CPU
858 OPENJDK_BUILD_OS_API
859 OPENJDK_BUILD_OS
860 OPENJDK_BUILD_AUTOCONF_NAME
861 OPENJDK_TARGET_AUTOCONF_NAME
862 target_os
863 target_vendor
864 target_cpu
865 target
866 host_os
867 host_vendor
868 host_cpu
869 host
870 build_os
871 build_vendor
872 build_cpu
873 build
874 SETFILE
875 DF
876 READLINK
877 CYGPATH
878 NAWK
879 SED
880 FGREP
881 EGREP
882 GREP
883 AWK
884 XARGS
885 WHICH
886 WC
887 UNIQ
888 UNAME
889 TR
890 TOUCH
891 TEE
892 TAR
893 TAIL
894 SORT
895 SH
896 RM
897 THEPWDCMD
898 PRINTF
899 MV
900 MKTEMP
901 MKDIR
902 LS
903 LN
904 HEAD
905 FIND
906 FILE
907 EXPR
908 ECHO
909 DIRNAME
910 DIFF
911 DATE
912 CUT
913 CPIO
914 CP
915 COMM
916 CMP
917 CHMOD
918 CAT
919 BASH
920 BASENAME
921 DATE_WHEN_CONFIGURED
922 CONFIGURE_COMMAND_LINE
923 CUSTOM_MAKE_DIR
924 target_alias
925 host_alias
926 build_alias
927 LIBS
928 ECHO_T
929 ECHO_N
930 ECHO_C
931 DEFS
932 mandir
933 localedir
934 libdir
935 psdir
936 pdfdir
937 dvidir
938 htmldir
939 infodir
940 docdir
941 oldincludedir
942 includedir
943 localstatedir
944 sharedstatedir
945 sysconfdir
946 datadir
947 datarootdir
948 libexecdir
949 sbindir
950 bindir
951 program_transform_name
952 prefix
953 exec_prefix
954 PACKAGE_URL
955 PACKAGE_BUGREPORT
956 PACKAGE_STRING
957 PACKAGE_VERSION
958 PACKAGE_TARNAME
959 PACKAGE_NAME
960 PATH_SEPARATOR
961 SHELL'
962 ac_subst_files=''
963 ac_user_opts='
964 enable_option_checking
965 with_custom_make_dir
966 with_target_bits
967 with_sys_root
968 with_tools_dir
969 with_devkit
970 enable_openjdk_only
971 with_jdk_variant
972 with_jvm_variants
973 enable_debug
974 with_debug_level
975 with_conf_name
976 with_builddeps_conf
977 with_builddeps_server
978 with_builddeps_dir
979 with_builddeps_group
980 enable_headful
981 enable_hotspot_test_in_build
982 with_cacerts_file
983 enable_unlimited_crypto
984 with_milestone
985 with_build_number
986 with_user_release_suffix
987 with_boot_jdk
988 with_boot_jdk_jvmargs
989 with_add_source_root
990 with_override_source_root
991 with_adds_and_overrides
992 with_override_langtools
993 with_override_corba
994 with_override_jaxp
995 with_override_jaxws
996 with_override_hotspot
997 with_override_jdk
998 with_import_hotspot
999 with_msvcr_dll
1000 with_dxsdk
1001 with_dxsdk_lib
1002 with_dxsdk_include
1003 with_extra_cflags
1004 with_extra_cxxflags
1005 with_extra_ldflags
1006 enable_debug_symbols
1007 enable_zip_debug_info
1008 enable_macosx_runtime_support
1009 with_x
1010 with_cups
1011 with_cups_include
1012 with_freetype
1013 with_alsa
1014 with_alsa_include
1015 with_alsa_lib
1016 with_zlib
1017 with_stdc__lib
1018 with_num_cores
1019 with_memory_size
1020 with_jobs
1021 with_sjavac_server_java
1022 with_sjavac_server_cores
1023 enable_sjavac
1024 enable_precompiled_headers
1025 enable_ccache
1026 with_ccache_dir
1027 '
1028 ac_precious_vars='build_alias
1029 host_alias
1030 target_alias
1031 PKG_CONFIG
1032 CC
1033 CFLAGS
1034 LDFLAGS
1035 LIBS
1036 CPPFLAGS
1037 CXX
1038 CXXFLAGS
1039 CCC
1040 OBJC
1041 OBJCFLAGS
1042 CPP
1043 CXXCPP
1044 XMKMF
1045 FREETYPE2_CFLAGS
1046 FREETYPE2_LIBS
1047 ALSA_CFLAGS
1048 ALSA_LIBS'
1049
1050
1051 # Initialize some variables set by options.
1052 ac_init_help=
1053 ac_init_version=false
1054 ac_unrecognized_opts=
1055 ac_unrecognized_sep=
1056 # The variables have the same names as the options, with
1057 # dashes changed to underlines.
1058 cache_file=/dev/null
1059 exec_prefix=NONE
1060 no_create=
1061 no_recursion=
1062 prefix=NONE
1063 program_prefix=NONE
1064 program_suffix=NONE
1065 program_transform_name=s,x,x,
1066 silent=
1067 site=
1068 srcdir=
1069 verbose=
1070 x_includes=NONE
1071 x_libraries=NONE
1072
1073 # Installation directory options.
1074 # These are left unexpanded so users can "make install exec_prefix=/foo"
1075 # and all the variables that are supposed to be based on exec_prefix
1076 # by default will actually change.
1077 # Use braces instead of parens because sh, perl, etc. also accept them.
1078 # (The list follows the same order as the GNU Coding Standards.)
1079 bindir='${exec_prefix}/bin'
1080 sbindir='${exec_prefix}/sbin'
1081 libexecdir='${exec_prefix}/libexec'
1082 datarootdir='${prefix}/share'
1083 datadir='${datarootdir}'
1084 sysconfdir='${prefix}/etc'
1085 sharedstatedir='${prefix}/com'
1086 localstatedir='${prefix}/var'
1087 includedir='${prefix}/include'
1088 oldincludedir='/usr/include'
1089 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1090 infodir='${datarootdir}/info'
1091 htmldir='${docdir}'
1092 dvidir='${docdir}'
1093 pdfdir='${docdir}'
1094 psdir='${docdir}'
1095 libdir='${exec_prefix}/lib'
1096 localedir='${datarootdir}/locale'
1097 mandir='${datarootdir}/man'
1098
1099 ac_prev=
1100 ac_dashdash=
1101 for ac_option
1102 do
1103 # If the previous option needs an argument, assign it.
1104 if test -n "$ac_prev"; then
1105 eval $ac_prev=\$ac_option
1106 ac_prev=
1107 continue
1108 fi
1109
1110 case $ac_option in
1111 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1112 *=) ac_optarg= ;;
1113 *) ac_optarg=yes ;;
1114 esac
1115
1116 # Accept the important Cygnus configure options, so we can diagnose typos.
1117
1118 case $ac_dashdash$ac_option in
1119 --)
1120 ac_dashdash=yes ;;
1121
1122 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1123 ac_prev=bindir ;;
1124 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1125 bindir=$ac_optarg ;;
1126
1127 -build | --build | --buil | --bui | --bu)
1128 ac_prev=build_alias ;;
1129 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1130 build_alias=$ac_optarg ;;
1131
1132 -cache-file | --cache-file | --cache-fil | --cache-fi \
1133 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1134 ac_prev=cache_file ;;
1135 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1136 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1137 cache_file=$ac_optarg ;;
1138
1139 --config-cache | -C)
1140 cache_file=config.cache ;;
1141
1142 -datadir | --datadir | --datadi | --datad)
1143 ac_prev=datadir ;;
1144 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1145 datadir=$ac_optarg ;;
1146
1147 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1148 | --dataroo | --dataro | --datar)
1149 ac_prev=datarootdir ;;
1150 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1151 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1152 datarootdir=$ac_optarg ;;
1153
1154 -disable-* | --disable-*)
1155 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1156 # Reject names that are not valid shell variable names.
1157 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1158 as_fn_error $? "invalid feature name: $ac_useropt"
1159 ac_useropt_orig=$ac_useropt
1160 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1161 case $ac_user_opts in
1162 *"
1163 "enable_$ac_useropt"
1164 "*) ;;
1165 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1166 ac_unrecognized_sep=', ';;
1167 esac
1168 eval enable_$ac_useropt=no ;;
1169
1170 -docdir | --docdir | --docdi | --doc | --do)
1171 ac_prev=docdir ;;
1172 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1173 docdir=$ac_optarg ;;
1174
1175 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1176 ac_prev=dvidir ;;
1177 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1178 dvidir=$ac_optarg ;;
1179
1180 -enable-* | --enable-*)
1181 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1182 # Reject names that are not valid shell variable names.
1183 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1184 as_fn_error $? "invalid feature name: $ac_useropt"
1185 ac_useropt_orig=$ac_useropt
1186 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1187 case $ac_user_opts in
1188 *"
1189 "enable_$ac_useropt"
1190 "*) ;;
1191 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1192 ac_unrecognized_sep=', ';;
1193 esac
1194 eval enable_$ac_useropt=\$ac_optarg ;;
1195
1196 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1197 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1198 | --exec | --exe | --ex)
1199 ac_prev=exec_prefix ;;
1200 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1201 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1202 | --exec=* | --exe=* | --ex=*)
1203 exec_prefix=$ac_optarg ;;
1204
1205 -gas | --gas | --ga | --g)
1206 # Obsolete; use --with-gas.
1207 with_gas=yes ;;
1208
1209 -help | --help | --hel | --he | -h)
1210 ac_init_help=long ;;
1211 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1212 ac_init_help=recursive ;;
1213 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1214 ac_init_help=short ;;
1215
1216 -host | --host | --hos | --ho)
1217 ac_prev=host_alias ;;
1218 -host=* | --host=* | --hos=* | --ho=*)
1219 host_alias=$ac_optarg ;;
1220
1221 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1222 ac_prev=htmldir ;;
1223 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1224 | --ht=*)
1225 htmldir=$ac_optarg ;;
1226
1227 -includedir | --includedir | --includedi | --included | --include \
1228 | --includ | --inclu | --incl | --inc)
1229 ac_prev=includedir ;;
1230 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1231 | --includ=* | --inclu=* | --incl=* | --inc=*)
1232 includedir=$ac_optarg ;;
1233
1234 -infodir | --infodir | --infodi | --infod | --info | --inf)
1235 ac_prev=infodir ;;
1236 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1237 infodir=$ac_optarg ;;
1238
1239 -libdir | --libdir | --libdi | --libd)
1240 ac_prev=libdir ;;
1241 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1242 libdir=$ac_optarg ;;
1243
1244 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1245 | --libexe | --libex | --libe)
1246 ac_prev=libexecdir ;;
1247 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1248 | --libexe=* | --libex=* | --libe=*)
1249 libexecdir=$ac_optarg ;;
1250
1251 -localedir | --localedir | --localedi | --localed | --locale)
1252 ac_prev=localedir ;;
1253 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1254 localedir=$ac_optarg ;;
1255
1256 -localstatedir | --localstatedir | --localstatedi | --localstated \
1257 | --localstate | --localstat | --localsta | --localst | --locals)
1258 ac_prev=localstatedir ;;
1259 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1260 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1261 localstatedir=$ac_optarg ;;
1262
1263 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1264 ac_prev=mandir ;;
1265 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1266 mandir=$ac_optarg ;;
1267
1268 -nfp | --nfp | --nf)
1269 # Obsolete; use --without-fp.
1270 with_fp=no ;;
1271
1272 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1273 | --no-cr | --no-c | -n)
1274 no_create=yes ;;
1275
1276 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1277 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1278 no_recursion=yes ;;
1279
1280 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1281 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1282 | --oldin | --oldi | --old | --ol | --o)
1283 ac_prev=oldincludedir ;;
1284 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1285 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1286 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1287 oldincludedir=$ac_optarg ;;
1288
1289 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1290 ac_prev=prefix ;;
1291 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1292 prefix=$ac_optarg ;;
1293
1294 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1295 | --program-pre | --program-pr | --program-p)
1296 ac_prev=program_prefix ;;
1297 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1298 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1299 program_prefix=$ac_optarg ;;
1300
1301 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1302 | --program-suf | --program-su | --program-s)
1303 ac_prev=program_suffix ;;
1304 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1305 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1306 program_suffix=$ac_optarg ;;
1307
1308 -program-transform-name | --program-transform-name \
1309 | --program-transform-nam | --program-transform-na \
1310 | --program-transform-n | --program-transform- \
1311 | --program-transform | --program-transfor \
1312 | --program-transfo | --program-transf \
1313 | --program-trans | --program-tran \
1314 | --progr-tra | --program-tr | --program-t)
1315 ac_prev=program_transform_name ;;
1316 -program-transform-name=* | --program-transform-name=* \
1317 | --program-transform-nam=* | --program-transform-na=* \
1318 | --program-transform-n=* | --program-transform-=* \
1319 | --program-transform=* | --program-transfor=* \
1320 | --program-transfo=* | --program-transf=* \
1321 | --program-trans=* | --program-tran=* \
1322 | --progr-tra=* | --program-tr=* | --program-t=*)
1323 program_transform_name=$ac_optarg ;;
1324
1325 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1326 ac_prev=pdfdir ;;
1327 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1328 pdfdir=$ac_optarg ;;
1329
1330 -psdir | --psdir | --psdi | --psd | --ps)
1331 ac_prev=psdir ;;
1332 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1333 psdir=$ac_optarg ;;
1334
1335 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1336 | -silent | --silent | --silen | --sile | --sil)
1337 silent=yes ;;
1338
1339 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1340 ac_prev=sbindir ;;
1341 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1342 | --sbi=* | --sb=*)
1343 sbindir=$ac_optarg ;;
1344
1345 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1346 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1347 | --sharedst | --shareds | --shared | --share | --shar \
1348 | --sha | --sh)
1349 ac_prev=sharedstatedir ;;
1350 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1351 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1352 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1353 | --sha=* | --sh=*)
1354 sharedstatedir=$ac_optarg ;;
1355
1356 -site | --site | --sit)
1357 ac_prev=site ;;
1358 -site=* | --site=* | --sit=*)
1359 site=$ac_optarg ;;
1360
1361 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1362 ac_prev=srcdir ;;
1363 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1364 srcdir=$ac_optarg ;;
1365
1366 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1367 | --syscon | --sysco | --sysc | --sys | --sy)
1368 ac_prev=sysconfdir ;;
1369 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1370 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1371 sysconfdir=$ac_optarg ;;
1372
1373 -target | --target | --targe | --targ | --tar | --ta | --t)
1374 ac_prev=target_alias ;;
1375 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1376 target_alias=$ac_optarg ;;
1377
1378 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1379 verbose=yes ;;
1380
1381 -version | --version | --versio | --versi | --vers | -V)
1382 ac_init_version=: ;;
1383
1384 -with-* | --with-*)
1385 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1386 # Reject names that are not valid shell variable names.
1387 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1388 as_fn_error $? "invalid package name: $ac_useropt"
1389 ac_useropt_orig=$ac_useropt
1390 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1391 case $ac_user_opts in
1392 *"
1393 "with_$ac_useropt"
1394 "*) ;;
1395 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1396 ac_unrecognized_sep=', ';;
1397 esac
1398 eval with_$ac_useropt=\$ac_optarg ;;
1399
1400 -without-* | --without-*)
1401 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1402 # Reject names that are not valid shell variable names.
1403 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1404 as_fn_error $? "invalid package name: $ac_useropt"
1405 ac_useropt_orig=$ac_useropt
1406 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1407 case $ac_user_opts in
1408 *"
1409 "with_$ac_useropt"
1410 "*) ;;
1411 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1412 ac_unrecognized_sep=', ';;
1413 esac
1414 eval with_$ac_useropt=no ;;
1415
1416 --x)
1417 # Obsolete; use --with-x.
1418 with_x=yes ;;
1419
1420 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1421 | --x-incl | --x-inc | --x-in | --x-i)
1422 ac_prev=x_includes ;;
1423 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1424 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1425 x_includes=$ac_optarg ;;
1426
1427 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1428 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1429 ac_prev=x_libraries ;;
1430 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1431 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1432 x_libraries=$ac_optarg ;;
1433
1434 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1435 Try \`$0 --help' for more information"
1436 ;;
1437
1438 *=*)
1439 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1440 # Reject names that are not valid shell variable names.
1441 case $ac_envvar in #(
1442 '' | [0-9]* | *[!_$as_cr_alnum]* )
1443 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1444 esac
1445 eval $ac_envvar=\$ac_optarg
1446 export $ac_envvar ;;
1447
1448 *)
1449 # FIXME: should be removed in autoconf 3.0.
1450 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1451 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1452 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1453 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1454 ;;
1455
1456 esac
1457 done
1458
1459 if test -n "$ac_prev"; then
1460 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1461 as_fn_error $? "missing argument to $ac_option"
1462 fi
1463
1464 if test -n "$ac_unrecognized_opts"; then
1465 case $enable_option_checking in
1466 no) ;;
1467 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1468 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1469 esac
1470 fi
1471
1472 # Check all directory arguments for consistency.
1473 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1474 datadir sysconfdir sharedstatedir localstatedir includedir \
1475 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1476 libdir localedir mandir
1477 do
1478 eval ac_val=\$$ac_var
1479 # Remove trailing slashes.
1480 case $ac_val in
1481 */ )
1482 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1483 eval $ac_var=\$ac_val;;
1484 esac
1485 # Be sure to have absolute directory names.
1486 case $ac_val in
1487 [\\/$]* | ?:[\\/]* ) continue;;
1488 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1489 esac
1490 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1491 done
1492
1493 # There might be people who depend on the old broken behavior: `$host'
1494 # used to hold the argument of --host etc.
1495 # FIXME: To remove some day.
1496 build=$build_alias
1497 host=$host_alias
1498 target=$target_alias
1499
1500 # FIXME: To remove some day.
1501 if test "x$host_alias" != x; then
1502 if test "x$build_alias" = x; then
1503 cross_compiling=maybe
1504 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1505 If a cross compiler is detected then cross compile mode will be used" >&2
1506 elif test "x$build_alias" != "x$host_alias"; then
1507 cross_compiling=yes
1508 fi
1509 fi
1510
1511 ac_tool_prefix=
1512 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1513
1514 test "$silent" = yes && exec 6>/dev/null
1515
1516
1517 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1518 ac_ls_di=`ls -di .` &&
1519 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1520 as_fn_error $? "working directory cannot be determined"
1521 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1522 as_fn_error $? "pwd does not report name of working directory"
1523
1524
1525 # Find the source files, if location was not specified.
1526 if test -z "$srcdir"; then
1527 ac_srcdir_defaulted=yes
1528 # Try the directory containing this script, then the parent directory.
1529 ac_confdir=`$as_dirname -- "$as_myself" ||
1530 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1531 X"$as_myself" : 'X\(//\)[^/]' \| \
1532 X"$as_myself" : 'X\(//\)$' \| \
1533 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1534 $as_echo X"$as_myself" |
1535 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1536 s//\1/
1537 q
1538 }
1539 /^X\(\/\/\)[^/].*/{
1540 s//\1/
1541 q
1542 }
1543 /^X\(\/\/\)$/{
1544 s//\1/
1545 q
1546 }
1547 /^X\(\/\).*/{
1548 s//\1/
1549 q
1550 }
1551 s/.*/./; q'`
1552 srcdir=$ac_confdir
1553 if test ! -r "$srcdir/$ac_unique_file"; then
1554 srcdir=..
1555 fi
1556 else
1557 ac_srcdir_defaulted=no
1558 fi
1559 if test ! -r "$srcdir/$ac_unique_file"; then
1560 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1561 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1562 fi
1563 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1564 ac_abs_confdir=`(
1565 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1566 pwd)`
1567 # When building in place, set srcdir=.
1568 if test "$ac_abs_confdir" = "$ac_pwd"; then
1569 srcdir=.
1570 fi
1571 # Remove unnecessary trailing slashes from srcdir.
1572 # Double slashes in file names in object file debugging info
1573 # mess up M-x gdb in Emacs.
1574 case $srcdir in
1575 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1576 esac
1577 for ac_var in $ac_precious_vars; do
1578 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1579 eval ac_env_${ac_var}_value=\$${ac_var}
1580 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1581 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1582 done
1583
1584 #
1585 # Report the --help message.
1586 #
1587 if test "$ac_init_help" = "long"; then
1588 # Omit some internal or obsolete options to make the list less imposing.
1589 # This message is too long to be a string in the A/UX 3.1 sh.
1590 cat <<_ACEOF
1591 \`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1592
1593 Usage: $0 [OPTION]... [VAR=VALUE]...
1594
1595 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1596 VAR=VALUE. See below for descriptions of some of the useful variables.
1597
1598 Defaults for the options are specified in brackets.
1599
1600 Configuration:
1601 -h, --help display this help and exit
1602 --help=short display options specific to this package
1603 --help=recursive display the short help of all the included packages
1604 -V, --version display version information and exit
1605 -q, --quiet, --silent do not print \`checking ...' messages
1606 --cache-file=FILE cache test results in FILE [disabled]
1607 -C, --config-cache alias for \`--cache-file=config.cache'
1608 -n, --no-create do not create output files
1609 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1610
1611 Installation directories:
1612 --prefix=PREFIX install architecture-independent files in PREFIX
1613 [$ac_default_prefix]
1614 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1615 [PREFIX]
1616
1617 By default, \`make install' will install all the files in
1618 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1619 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1620 for instance \`--prefix=\$HOME'.
1621
1622 For better control, use the options below.
1623
1624 Fine tuning of the installation directories:
1625 --bindir=DIR user executables [EPREFIX/bin]
1626 --sbindir=DIR system admin executables [EPREFIX/sbin]
1627 --libexecdir=DIR program executables [EPREFIX/libexec]
1628 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1629 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1630 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1631 --libdir=DIR object code libraries [EPREFIX/lib]
1632 --includedir=DIR C header files [PREFIX/include]
1633 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1634 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1635 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1636 --infodir=DIR info documentation [DATAROOTDIR/info]
1637 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1638 --mandir=DIR man documentation [DATAROOTDIR/man]
1639 --docdir=DIR documentation root [DATAROOTDIR/doc/openjdk]
1640 --htmldir=DIR html documentation [DOCDIR]
1641 --dvidir=DIR dvi documentation [DOCDIR]
1642 --pdfdir=DIR pdf documentation [DOCDIR]
1643 --psdir=DIR ps documentation [DOCDIR]
1644 _ACEOF
1645
1646 cat <<\_ACEOF
1647
1648 X features:
1649 --x-includes=DIR X include files are in DIR
1650 --x-libraries=DIR X library files are in DIR
1651
1652 System types:
1653 --build=BUILD configure for building on BUILD [guessed]
1654 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1655 --target=TARGET configure for building compilers for TARGET [HOST]
1656 _ACEOF
1657 fi
1658
1659 if test -n "$ac_init_help"; then
1660 case $ac_init_help in
1661 short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1662 esac
1663 cat <<\_ACEOF
1664
1665 Optional Features:
1666 --disable-option-checking ignore unrecognized --enable/--with options
1667 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1668 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1669 --enable-openjdk-only suppress building custom source even if present
1670 [disabled]
1671 --enable-debug set the debug level to fastdebug (shorthand for
1672 --with-debug-level=fastdebug) [disabled]
1673 --disable-headful disable building headful support (graphical UI
1674 support) [enabled]
1675 --enable-hotspot-test-in-build
1676 run the Queens test after Hotspot build [disabled]
1677 --enable-unlimited-crypto
1678 Enable unlimited crypto policy [disabled]
1679 --disable-debug-symbols disable generation of debug symbols [enabled]
1680 --disable-zip-debug-info
1681 disable zipping of debug-info files [enabled]
1682 --disable-macosx-runtime-support
1683 disable the use of MacOSX Java runtime support
1684 framework [enabled]
1685 --enable-sjavac use sjavac to do fast incremental compiles
1686 [disabled]
1687 --disable-precompiled-headers
1688 disable using precompiled headers when compiling C++
1689 [enabled]
1690 --disable-ccache disable using ccache to speed up recompilations
1691 [enabled]
1692
1693 Optional Packages:
1694 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1695 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1696 --with-custom-make-dir use this directory for custom build/make files
1697 --with-target-bits build 32-bit or 64-bit binaries (for platforms that
1698 support it), e.g. --with-target-bits=32 [guessed]
1699 --with-sys-root pass this sys-root to the compilers and tools (for
1700 cross-compiling)
1701 --with-tools-dir search this directory for compilers and tools (for
1702 cross-compiling)
1703 --with-devkit use this directory as base for tools-dir and
1704 sys-root (for cross-compiling)
1705 --with-jdk-variant JDK variant to build (normal) [normal]
1706 --with-jvm-variants JVM variants (separated by commas) to build (server,
1707 client, minimal1, kernel, zero, zeroshark) [server]
1708 --with-debug-level set the debug level (release, fastdebug, slowdebug)
1709 [release]
1710 --with-conf-name use this as the name of the configuration [generated
1711 from important configuration options]
1712 --with-builddeps-conf use this configuration file for the builddeps
1713 --with-builddeps-server download and use build dependencies from this server
1714 url
1715 --with-builddeps-dir store downloaded build dependencies here
1716 [/localhome/builddeps]
1717 --with-builddeps-group chgrp the downloaded build dependencies to this
1718 group
1719 --with-cacerts-file specify alternative cacerts file
1720 --with-milestone Set milestone value for build [internal]
1721 --with-build-number Set build number value for build [b00]
1722 --with-user-release-suffix
1723 Add a custom string to the version string if build
1724 number isn't set.[username_builddateb00]
1725 --with-boot-jdk path to Boot JDK (used to bootstrap build) [probed]
1726 --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1727 invocations of the Boot JDK, overriding the default
1728 values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1729 -enableassertions"
1730 --with-add-source-root for each and every source directory, look in this
1731 additional source root for the same directory; if it
1732 exists and have files in it, include it in the build
1733 --with-override-source-root
1734 for each and every source directory, look in this
1735 override source root for the same directory; if it
1736 exists, use that directory instead and ignore the
1737 directory in the original source root
1738 --with-adds-and-overrides
1739 use the subdirs 'adds' and 'overrides' in the
1740 specified directory as add-source-root and
1741 override-source-root
1742 --with-override-langtools
1743 use this langtools dir for the build
1744 --with-override-corba use this corba dir for the build
1745 --with-override-jaxp use this jaxp dir for the build
1746 --with-override-jaxws use this jaxws dir for the build
1747 --with-override-hotspot use this hotspot dir for the build
1748 --with-override-jdk use this jdk dir for the build
1749 --with-import-hotspot import hotspot binaries from this jdk image or
1750 hotspot build dist dir instead of building from
1751 source
1752 --with-msvcr-dll copy this msvcr100.dll into the built JDK (Windows
1753 only) [probed]
1754 --with-dxsdk the DirectX SDK (Windows only) [probed]
1755 --with-dxsdk-lib the DirectX SDK lib directory (Windows only)
1756 [probed]
1757 --with-dxsdk-include the DirectX SDK include directory (Windows only)
1758 [probed]
1759 --with-extra-cflags extra flags to be used when compiling jdk c-files
1760 --with-extra-cxxflags extra flags to be used when compiling jdk c++-files
1761 --with-extra-ldflags extra flags to be used when linking jdk
1762 --with-x use the X Window System
1763 --with-cups specify prefix directory for the cups package
1764 (expecting the headers under PATH/include)
1765 --with-cups-include specify directory for the cups include files
1766 --with-freetype specify prefix directory for the freetype2 package
1767 (expecting the libraries under PATH/lib and the
1768 headers under PATH/include)
1769 --with-alsa specify prefix directory for the alsa package
1770 (expecting the libraries under PATH/lib and the
1771 headers under PATH/include)
1772 --with-alsa-include specify directory for the alsa include files
1773 --with-alsa-lib specify directory for the alsa library
1774 --with-zlib use zlib from build system or OpenJDK source
1775 (system, bundled) [bundled]
1776 --with-stdc++lib=<static>,<dynamic>,<default>
1777 force linking of the C++ runtime on Linux to either
1778 static or dynamic, default is static with dynamic as
1779 fallback
1780 --with-num-cores number of cores in the build system, e.g.
1781 --with-num-cores=8 [probed]
1782 --with-memory-size memory (in MB) available in the build system, e.g.
1783 --with-memory-size=1024 [probed]
1784 --with-jobs number of parallel jobs to let make run [calculated
1785 based on cores and memory]
1786 --with-sjavac-server-java
1787 use this java binary for running the sjavac
1788 background server [Boot JDK java]
1789 --with-sjavac-server-cores
1790 use at most this number of concurrent threads on the
1791 sjavac server [probed]
1792 --with-ccache-dir where to store ccache files [~/.ccache]
1793
1794 Some influential environment variables:
1795 PKG_CONFIG path to pkg-config utility
1796 CC C compiler command
1797 CFLAGS C compiler flags
1798 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1799 nonstandard directory <lib dir>
1800 LIBS libraries to pass to the linker, e.g. -l<library>
1801 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1802 you have headers in a nonstandard directory <include dir>
1803 CXX C++ compiler command
1804 CXXFLAGS C++ compiler flags
1805 OBJC Objective C compiler command
1806 OBJCFLAGS Objective C compiler flags
1807 CPP C preprocessor
1808 CXXCPP C++ preprocessor
1809 XMKMF Path to xmkmf, Makefile generator for X Window System
1810 FREETYPE2_CFLAGS
1811 C compiler flags for FREETYPE2, overriding pkg-config
1812 FREETYPE2_LIBS
1813 linker flags for FREETYPE2, overriding pkg-config
1814 ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1815 ALSA_LIBS linker flags for ALSA, overriding pkg-config
1816
1817 Use these variables to override the choices made by `configure' or to help
1818 it to find libraries and programs with nonstandard names/locations.
1819
1820 Report bugs to <build-dev@openjdk.java.net>.
1821 OpenJDK home page: <http://openjdk.java.net>.
1822 _ACEOF
1823 ac_status=$?
1824 fi
1825
1826 if test "$ac_init_help" = "recursive"; then
1827 # If there are subdirs, report their specific --help.
1828 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1829 test -d "$ac_dir" ||
1830 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1831 continue
1832 ac_builddir=.
1833
1834 case "$ac_dir" in
1835 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1836 *)
1837 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1838 # A ".." for each directory in $ac_dir_suffix.
1839 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1840 case $ac_top_builddir_sub in
1841 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1842 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1843 esac ;;
1844 esac
1845 ac_abs_top_builddir=$ac_pwd
1846 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1847 # for backward compatibility:
1848 ac_top_builddir=$ac_top_build_prefix
1849
1850 case $srcdir in
1851 .) # We are building in place.
1852 ac_srcdir=.
1853 ac_top_srcdir=$ac_top_builddir_sub
1854 ac_abs_top_srcdir=$ac_pwd ;;
1855 [\\/]* | ?:[\\/]* ) # Absolute name.
1856 ac_srcdir=$srcdir$ac_dir_suffix;
1857 ac_top_srcdir=$srcdir
1858 ac_abs_top_srcdir=$srcdir ;;
1859 *) # Relative name.
1860 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1861 ac_top_srcdir=$ac_top_build_prefix$srcdir
1862 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1863 esac
1864 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1865
1866 cd "$ac_dir" || { ac_status=$?; continue; }
1867 # Check for guested configure.
1868 if test -f "$ac_srcdir/configure.gnu"; then
1869 echo &&
1870 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1871 elif test -f "$ac_srcdir/configure"; then
1872 echo &&
1873 $SHELL "$ac_srcdir/configure" --help=recursive
1874 else
1875 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1876 fi || ac_status=$?
1877 cd "$ac_pwd" || { ac_status=$?; break; }
1878 done
1879 fi
1880
1881 test -n "$ac_init_help" && exit $ac_status
1882 if $ac_init_version; then
1883 cat <<\_ACEOF
1884 OpenJDK configure jdk8
1885 generated by GNU Autoconf 2.68
1886
1887 Copyright (C) 2010 Free Software Foundation, Inc.
1888 This configure script is free software; the Free Software Foundation
1889 gives unlimited permission to copy, distribute and modify it.
1890 _ACEOF
1891 exit
1892 fi
1893
1894 ## ------------------------ ##
1895 ## Autoconf initialization. ##
1896 ## ------------------------ ##
1897
1898 # ac_fn_c_try_compile LINENO
1899 # --------------------------
1900 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1901 ac_fn_c_try_compile ()
1902 {
1903 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1904 rm -f conftest.$ac_objext
1905 if { { ac_try="$ac_compile"
1906 case "(($ac_try" in
1907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1908 *) ac_try_echo=$ac_try;;
1909 esac
1910 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1911 $as_echo "$ac_try_echo"; } >&5
1912 (eval "$ac_compile") 2>conftest.err
1913 ac_status=$?
1914 if test -s conftest.err; then
1915 grep -v '^ *+' conftest.err >conftest.er1
1916 cat conftest.er1 >&5
1917 mv -f conftest.er1 conftest.err
1918 fi
1919 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1920 test $ac_status = 0; } && {
1921 test -z "$ac_c_werror_flag" ||
1922 test ! -s conftest.err
1923 } && test -s conftest.$ac_objext; then :
1924 ac_retval=0
1925 else
1926 $as_echo "$as_me: failed program was:" >&5
1927 sed 's/^/| /' conftest.$ac_ext >&5
1928
1929 ac_retval=1
1930 fi
1931 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1932 as_fn_set_status $ac_retval
1933
1934 } # ac_fn_c_try_compile
1935
1936 # ac_fn_cxx_try_compile LINENO
1937 # ----------------------------
1938 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1939 ac_fn_cxx_try_compile ()
1940 {
1941 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1942 rm -f conftest.$ac_objext
1943 if { { ac_try="$ac_compile"
1944 case "(($ac_try" in
1945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1946 *) ac_try_echo=$ac_try;;
1947 esac
1948 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1949 $as_echo "$ac_try_echo"; } >&5
1950 (eval "$ac_compile") 2>conftest.err
1951 ac_status=$?
1952 if test -s conftest.err; then
1953 grep -v '^ *+' conftest.err >conftest.er1
1954 cat conftest.er1 >&5
1955 mv -f conftest.er1 conftest.err
1956 fi
1957 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1958 test $ac_status = 0; } && {
1959 test -z "$ac_cxx_werror_flag" ||
1960 test ! -s conftest.err
1961 } && test -s conftest.$ac_objext; then :
1962 ac_retval=0
1963 else
1964 $as_echo "$as_me: failed program was:" >&5
1965 sed 's/^/| /' conftest.$ac_ext >&5
1966
1967 ac_retval=1
1968 fi
1969 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1970 as_fn_set_status $ac_retval
1971
1972 } # ac_fn_cxx_try_compile
1973
1974 # ac_fn_objc_try_compile LINENO
1975 # -----------------------------
1976 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1977 ac_fn_objc_try_compile ()
1978 {
1979 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1980 rm -f conftest.$ac_objext
1981 if { { ac_try="$ac_compile"
1982 case "(($ac_try" in
1983 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1984 *) ac_try_echo=$ac_try;;
1985 esac
1986 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1987 $as_echo "$ac_try_echo"; } >&5
1988 (eval "$ac_compile") 2>conftest.err
1989 ac_status=$?
1990 if test -s conftest.err; then
1991 grep -v '^ *+' conftest.err >conftest.er1
1992 cat conftest.er1 >&5
1993 mv -f conftest.er1 conftest.err
1994 fi
1995 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1996 test $ac_status = 0; } && {
1997 test -z "$ac_objc_werror_flag" ||
1998 test ! -s conftest.err
1999 } && test -s conftest.$ac_objext; then :
2000 ac_retval=0
2001 else
2002 $as_echo "$as_me: failed program was:" >&5
2003 sed 's/^/| /' conftest.$ac_ext >&5
2004
2005 ac_retval=1
2006 fi
2007 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2008 as_fn_set_status $ac_retval
2009
2010 } # ac_fn_objc_try_compile
2011
2012 # ac_fn_c_try_cpp LINENO
2013 # ----------------------
2014 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2015 ac_fn_c_try_cpp ()
2016 {
2017 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2018 if { { ac_try="$ac_cpp conftest.$ac_ext"
2019 case "(($ac_try" in
2020 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2021 *) ac_try_echo=$ac_try;;
2022 esac
2023 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2024 $as_echo "$ac_try_echo"; } >&5
2025 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2026 ac_status=$?
2027 if test -s conftest.err; then
2028 grep -v '^ *+' conftest.err >conftest.er1
2029 cat conftest.er1 >&5
2030 mv -f conftest.er1 conftest.err
2031 fi
2032 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2033 test $ac_status = 0; } > conftest.i && {
2034 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2035 test ! -s conftest.err
2036 }; then :
2037 ac_retval=0
2038 else
2039 $as_echo "$as_me: failed program was:" >&5
2040 sed 's/^/| /' conftest.$ac_ext >&5
2041
2042 ac_retval=1
2043 fi
2044 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2045 as_fn_set_status $ac_retval
2046
2047 } # ac_fn_c_try_cpp
2048
2049 # ac_fn_cxx_try_cpp LINENO
2050 # ------------------------
2051 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2052 ac_fn_cxx_try_cpp ()
2053 {
2054 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2055 if { { ac_try="$ac_cpp conftest.$ac_ext"
2056 case "(($ac_try" in
2057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2058 *) ac_try_echo=$ac_try;;
2059 esac
2060 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2061 $as_echo "$ac_try_echo"; } >&5
2062 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2063 ac_status=$?
2064 if test -s conftest.err; then
2065 grep -v '^ *+' conftest.err >conftest.er1
2066 cat conftest.er1 >&5
2067 mv -f conftest.er1 conftest.err
2068 fi
2069 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2070 test $ac_status = 0; } > conftest.i && {
2071 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2072 test ! -s conftest.err
2073 }; then :
2074 ac_retval=0
2075 else
2076 $as_echo "$as_me: failed program was:" >&5
2077 sed 's/^/| /' conftest.$ac_ext >&5
2078
2079 ac_retval=1
2080 fi
2081 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2082 as_fn_set_status $ac_retval
2083
2084 } # ac_fn_cxx_try_cpp
2085
2086 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2087 # ---------------------------------------------------------
2088 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2089 # the include files in INCLUDES and setting the cache variable VAR
2090 # accordingly.
2091 ac_fn_cxx_check_header_mongrel ()
2092 {
2093 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2094 if eval \${$3+:} false; then :
2095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2096 $as_echo_n "checking for $2... " >&6; }
2097 if eval \${$3+:} false; then :
2098 $as_echo_n "(cached) " >&6
2099 fi
2100 eval ac_res=\$$3
2101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2102 $as_echo "$ac_res" >&6; }
2103 else
2104 # Is the header compilable?
2105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2106 $as_echo_n "checking $2 usability... " >&6; }
2107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2108 /* end confdefs.h. */
2109 $4
2110 #include <$2>
2111 _ACEOF
2112 if ac_fn_cxx_try_compile "$LINENO"; then :
2113 ac_header_compiler=yes
2114 else
2115 ac_header_compiler=no
2116 fi
2117 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2119 $as_echo "$ac_header_compiler" >&6; }
2120
2121 # Is the header present?
2122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2123 $as_echo_n "checking $2 presence... " >&6; }
2124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2125 /* end confdefs.h. */
2126 #include <$2>
2127 _ACEOF
2128 if ac_fn_cxx_try_cpp "$LINENO"; then :
2129 ac_header_preproc=yes
2130 else
2131 ac_header_preproc=no
2132 fi
2133 rm -f conftest.err conftest.i conftest.$ac_ext
2134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2135 $as_echo "$ac_header_preproc" >&6; }
2136
2137 # So? What about this header?
2138 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2139 yes:no: )
2140 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2141 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2142 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2143 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2144 ;;
2145 no:yes:* )
2146 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2147 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2148 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2149 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2150 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2151 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2152 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2153 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2154 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2155 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2156 ( $as_echo "## ----------------------------------------- ##
2157 ## Report this to build-dev@openjdk.java.net ##
2158 ## ----------------------------------------- ##"
2159 ) | sed "s/^/$as_me: WARNING: /" >&2
2160 ;;
2161 esac
2162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2163 $as_echo_n "checking for $2... " >&6; }
2164 if eval \${$3+:} false; then :
2165 $as_echo_n "(cached) " >&6
2166 else
2167 eval "$3=\$ac_header_compiler"
2168 fi
2169 eval ac_res=\$$3
2170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2171 $as_echo "$ac_res" >&6; }
2172 fi
2173 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2174
2175 } # ac_fn_cxx_check_header_mongrel
2176
2177 # ac_fn_cxx_try_run LINENO
2178 # ------------------------
2179 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2180 # that executables *can* be run.
2181 ac_fn_cxx_try_run ()
2182 {
2183 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2184 if { { ac_try="$ac_link"
2185 case "(($ac_try" in
2186 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2187 *) ac_try_echo=$ac_try;;
2188 esac
2189 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2190 $as_echo "$ac_try_echo"; } >&5
2191 (eval "$ac_link") 2>&5
2192 ac_status=$?
2193 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2194 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2195 { { case "(($ac_try" in
2196 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2197 *) ac_try_echo=$ac_try;;
2198 esac
2199 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2200 $as_echo "$ac_try_echo"; } >&5
2201 (eval "$ac_try") 2>&5
2202 ac_status=$?
2203 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2204 test $ac_status = 0; }; }; then :
2205 ac_retval=0
2206 else
2207 $as_echo "$as_me: program exited with status $ac_status" >&5
2208 $as_echo "$as_me: failed program was:" >&5
2209 sed 's/^/| /' conftest.$ac_ext >&5
2210
2211 ac_retval=$ac_status
2212 fi
2213 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2214 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2215 as_fn_set_status $ac_retval
2216
2217 } # ac_fn_cxx_try_run
2218
2219 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2220 # ---------------------------------------------------------
2221 # Tests whether HEADER exists and can be compiled using the include files in
2222 # INCLUDES, setting the cache variable VAR accordingly.
2223 ac_fn_cxx_check_header_compile ()
2224 {
2225 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2227 $as_echo_n "checking for $2... " >&6; }
2228 if eval \${$3+:} false; then :
2229 $as_echo_n "(cached) " >&6
2230 else
2231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2232 /* end confdefs.h. */
2233 $4
2234 #include <$2>
2235 _ACEOF
2236 if ac_fn_cxx_try_compile "$LINENO"; then :
2237 eval "$3=yes"
2238 else
2239 eval "$3=no"
2240 fi
2241 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2242 fi
2243 eval ac_res=\$$3
2244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2245 $as_echo "$ac_res" >&6; }
2246 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2247
2248 } # ac_fn_cxx_check_header_compile
2249
2250 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2251 # ----------------------------------------------
2252 # Tries to find the compile-time value of EXPR in a program that includes
2253 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2254 # computed
2255 ac_fn_cxx_compute_int ()
2256 {
2257 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2258 if test "$cross_compiling" = yes; then
2259 # Depending upon the size, compute the lo and hi bounds.
2260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2261 /* end confdefs.h. */
2262 $4
2263 int
2264 main ()
2265 {
2266 static int test_array [1 - 2 * !(($2) >= 0)];
2267 test_array [0] = 0
2268
2269 ;
2270 return 0;
2271 }
2272 _ACEOF
2273 if ac_fn_cxx_try_compile "$LINENO"; then :
2274 ac_lo=0 ac_mid=0
2275 while :; do
2276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2277 /* end confdefs.h. */
2278 $4
2279 int
2280 main ()
2281 {
2282 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2283 test_array [0] = 0
2284
2285 ;
2286 return 0;
2287 }
2288 _ACEOF
2289 if ac_fn_cxx_try_compile "$LINENO"; then :
2290 ac_hi=$ac_mid; break
2291 else
2292 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2293 if test $ac_lo -le $ac_mid; then
2294 ac_lo= ac_hi=
2295 break
2296 fi
2297 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2298 fi
2299 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2300 done
2301 else
2302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2303 /* end confdefs.h. */
2304 $4
2305 int
2306 main ()
2307 {
2308 static int test_array [1 - 2 * !(($2) < 0)];
2309 test_array [0] = 0
2310
2311 ;
2312 return 0;
2313 }
2314 _ACEOF
2315 if ac_fn_cxx_try_compile "$LINENO"; then :
2316 ac_hi=-1 ac_mid=-1
2317 while :; do
2318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2319 /* end confdefs.h. */
2320 $4
2321 int
2322 main ()
2323 {
2324 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2325 test_array [0] = 0
2326
2327 ;
2328 return 0;
2329 }
2330 _ACEOF
2331 if ac_fn_cxx_try_compile "$LINENO"; then :
2332 ac_lo=$ac_mid; break
2333 else
2334 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2335 if test $ac_mid -le $ac_hi; then
2336 ac_lo= ac_hi=
2337 break
2338 fi
2339 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2340 fi
2341 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2342 done
2343 else
2344 ac_lo= ac_hi=
2345 fi
2346 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2347 fi
2348 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2349 # Binary search between lo and hi bounds.
2350 while test "x$ac_lo" != "x$ac_hi"; do
2351 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2353 /* end confdefs.h. */
2354 $4
2355 int
2356 main ()
2357 {
2358 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2359 test_array [0] = 0
2360
2361 ;
2362 return 0;
2363 }
2364 _ACEOF
2365 if ac_fn_cxx_try_compile "$LINENO"; then :
2366 ac_hi=$ac_mid
2367 else
2368 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2369 fi
2370 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2371 done
2372 case $ac_lo in #((
2373 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2374 '') ac_retval=1 ;;
2375 esac
2376 else
2377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2378 /* end confdefs.h. */
2379 $4
2380 static long int longval () { return $2; }
2381 static unsigned long int ulongval () { return $2; }
2382 #include <stdio.h>
2383 #include <stdlib.h>
2384 int
2385 main ()
2386 {
2387
2388 FILE *f = fopen ("conftest.val", "w");
2389 if (! f)
2390 return 1;
2391 if (($2) < 0)
2392 {
2393 long int i = longval ();
2394 if (i != ($2))
2395 return 1;
2396 fprintf (f, "%ld", i);
2397 }
2398 else
2399 {
2400 unsigned long int i = ulongval ();
2401 if (i != ($2))
2402 return 1;
2403 fprintf (f, "%lu", i);
2404 }
2405 /* Do not output a trailing newline, as this causes \r\n confusion
2406 on some platforms. */
2407 return ferror (f) || fclose (f) != 0;
2408
2409 ;
2410 return 0;
2411 }
2412 _ACEOF
2413 if ac_fn_cxx_try_run "$LINENO"; then :
2414 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2415 else
2416 ac_retval=1
2417 fi
2418 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2419 conftest.$ac_objext conftest.beam conftest.$ac_ext
2420 rm -f conftest.val
2421
2422 fi
2423 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2424 as_fn_set_status $ac_retval
2425
2426 } # ac_fn_cxx_compute_int
2427
2428 # ac_fn_cxx_try_link LINENO
2429 # -------------------------
2430 # Try to link conftest.$ac_ext, and return whether this succeeded.
2431 ac_fn_cxx_try_link ()
2432 {
2433 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2434 rm -f conftest.$ac_objext conftest$ac_exeext
2435 if { { ac_try="$ac_link"
2436 case "(($ac_try" in
2437 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2438 *) ac_try_echo=$ac_try;;
2439 esac
2440 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2441 $as_echo "$ac_try_echo"; } >&5
2442 (eval "$ac_link") 2>conftest.err
2443 ac_status=$?
2444 if test -s conftest.err; then
2445 grep -v '^ *+' conftest.err >conftest.er1
2446 cat conftest.er1 >&5
2447 mv -f conftest.er1 conftest.err
2448 fi
2449 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2450 test $ac_status = 0; } && {
2451 test -z "$ac_cxx_werror_flag" ||
2452 test ! -s conftest.err
2453 } && test -s conftest$ac_exeext && {
2454 test "$cross_compiling" = yes ||
2455 $as_test_x conftest$ac_exeext
2456 }; then :
2457 ac_retval=0
2458 else
2459 $as_echo "$as_me: failed program was:" >&5
2460 sed 's/^/| /' conftest.$ac_ext >&5
2461
2462 ac_retval=1
2463 fi
2464 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2465 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2466 # interfere with the next link command; also delete a directory that is
2467 # left behind by Apple's compiler. We do this before executing the actions.
2468 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2469 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2470 as_fn_set_status $ac_retval
2471
2472 } # ac_fn_cxx_try_link
2473
2474 # ac_fn_cxx_check_func LINENO FUNC VAR
2475 # ------------------------------------
2476 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2477 ac_fn_cxx_check_func ()
2478 {
2479 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2481 $as_echo_n "checking for $2... " >&6; }
2482 if eval \${$3+:} false; then :
2483 $as_echo_n "(cached) " >&6
2484 else
2485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2486 /* end confdefs.h. */
2487 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2488 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2489 #define $2 innocuous_$2
2490
2491 /* System header to define __stub macros and hopefully few prototypes,
2492 which can conflict with char $2 (); below.
2493 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2494 <limits.h> exists even on freestanding compilers. */
2495
2496 #ifdef __STDC__
2497 # include <limits.h>
2498 #else
2499 # include <assert.h>
2500 #endif
2501
2502 #undef $2
2503
2504 /* Override any GCC internal prototype to avoid an error.
2505 Use char because int might match the return type of a GCC
2506 builtin and then its argument prototype would still apply. */
2507 #ifdef __cplusplus
2508 extern "C"
2509 #endif
2510 char $2 ();
2511 /* The GNU C library defines this for functions which it implements
2512 to always fail with ENOSYS. Some functions are actually named
2513 something starting with __ and the normal name is an alias. */
2514 #if defined __stub_$2 || defined __stub___$2
2515 choke me
2516 #endif
2517
2518 int
2519 main ()
2520 {
2521 return $2 ();
2522 ;
2523 return 0;
2524 }
2525 _ACEOF
2526 if ac_fn_cxx_try_link "$LINENO"; then :
2527 eval "$3=yes"
2528 else
2529 eval "$3=no"
2530 fi
2531 rm -f core conftest.err conftest.$ac_objext \
2532 conftest$ac_exeext conftest.$ac_ext
2533 fi
2534 eval ac_res=\$$3
2535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2536 $as_echo "$ac_res" >&6; }
2537 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2538
2539 } # ac_fn_cxx_check_func
2540
2541 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2542 # -------------------------------------------------------
2543 # Tests whether HEADER exists and can be compiled using the include files in
2544 # INCLUDES, setting the cache variable VAR accordingly.
2545 ac_fn_c_check_header_compile ()
2546 {
2547 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2549 $as_echo_n "checking for $2... " >&6; }
2550 if eval \${$3+:} false; then :
2551 $as_echo_n "(cached) " >&6
2552 else
2553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2554 /* end confdefs.h. */
2555 $4
2556 #include <$2>
2557 _ACEOF
2558 if ac_fn_c_try_compile "$LINENO"; then :
2559 eval "$3=yes"
2560 else
2561 eval "$3=no"
2562 fi
2563 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2564 fi
2565 eval ac_res=\$$3
2566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2567 $as_echo "$ac_res" >&6; }
2568 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2569
2570 } # ac_fn_c_check_header_compile
2571 cat >config.log <<_ACEOF
2572 This file contains any messages produced by compilers while
2573 running configure, to aid debugging if configure makes a mistake.
2574
2575 It was created by OpenJDK $as_me jdk8, which was
2576 generated by GNU Autoconf 2.68. Invocation command line was
2577
2578 $ $0 $@
2579
2580 _ACEOF
2581 exec 5>>config.log
2582 {
2583 cat <<_ASUNAME
2584 ## --------- ##
2585 ## Platform. ##
2586 ## --------- ##
2587
2588 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2589 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2590 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2591 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2592 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2593
2594 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2595 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2596
2597 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2598 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2599 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2600 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2601 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2602 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2603 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2604
2605 _ASUNAME
2606
2607 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2608 for as_dir in $PATH
2609 do
2610 IFS=$as_save_IFS
2611 test -z "$as_dir" && as_dir=.
2612 $as_echo "PATH: $as_dir"
2613 done
2614 IFS=$as_save_IFS
2615
2616 } >&5
2617
2618 cat >&5 <<_ACEOF
2619
2620
2621 ## ----------- ##
2622 ## Core tests. ##
2623 ## ----------- ##
2624
2625 _ACEOF
2626
2627
2628 # Keep a trace of the command line.
2629 # Strip out --no-create and --no-recursion so they do not pile up.
2630 # Strip out --silent because we don't want to record it for future runs.
2631 # Also quote any args containing shell meta-characters.
2632 # Make two passes to allow for proper duplicate-argument suppression.
2633 ac_configure_args=
2634 ac_configure_args0=
2635 ac_configure_args1=
2636 ac_must_keep_next=false
2637 for ac_pass in 1 2
2638 do
2639 for ac_arg
2640 do
2641 case $ac_arg in
2642 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2643 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2644 | -silent | --silent | --silen | --sile | --sil)
2645 continue ;;
2646 *\'*)
2647 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2648 esac
2649 case $ac_pass in
2650 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2651 2)
2652 as_fn_append ac_configure_args1 " '$ac_arg'"
2653 if test $ac_must_keep_next = true; then
2654 ac_must_keep_next=false # Got value, back to normal.
2655 else
2656 case $ac_arg in
2657 *=* | --config-cache | -C | -disable-* | --disable-* \
2658 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2659 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2660 | -with-* | --with-* | -without-* | --without-* | --x)
2661 case "$ac_configure_args0 " in
2662 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2663 esac
2664 ;;
2665 -* ) ac_must_keep_next=true ;;
2666 esac
2667 fi
2668 as_fn_append ac_configure_args " '$ac_arg'"
2669 ;;
2670 esac
2671 done
2672 done
2673 { ac_configure_args0=; unset ac_configure_args0;}
2674 { ac_configure_args1=; unset ac_configure_args1;}
2675
2676 # When interrupted or exit'd, cleanup temporary files, and complete
2677 # config.log. We remove comments because anyway the quotes in there
2678 # would cause problems or look ugly.
2679 # WARNING: Use '\'' to represent an apostrophe within the trap.
2680 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2681 trap 'exit_status=$?
2682 # Save into config.log some information that might help in debugging.
2683 {
2684 echo
2685
2686 $as_echo "## ---------------- ##
2687 ## Cache variables. ##
2688 ## ---------------- ##"
2689 echo
2690 # The following way of writing the cache mishandles newlines in values,
2691 (
2692 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2693 eval ac_val=\$$ac_var
2694 case $ac_val in #(
2695 *${as_nl}*)
2696 case $ac_var in #(
2697 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2698 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2699 esac
2700 case $ac_var in #(
2701 _ | IFS | as_nl) ;; #(
2702 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2703 *) { eval $ac_var=; unset $ac_var;} ;;
2704 esac ;;
2705 esac
2706 done
2707 (set) 2>&1 |
2708 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2709 *${as_nl}ac_space=\ *)
2710 sed -n \
2711 "s/'\''/'\''\\\\'\'''\''/g;
2712 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2713 ;; #(
2714 *)
2715 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2716 ;;
2717 esac |
2718 sort
2719 )
2720 echo
2721
2722 $as_echo "## ----------------- ##
2723 ## Output variables. ##
2724 ## ----------------- ##"
2725 echo
2726 for ac_var in $ac_subst_vars
2727 do
2728 eval ac_val=\$$ac_var
2729 case $ac_val in
2730 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2731 esac
2732 $as_echo "$ac_var='\''$ac_val'\''"
2733 done | sort
2734 echo
2735
2736 if test -n "$ac_subst_files"; then
2737 $as_echo "## ------------------- ##
2738 ## File substitutions. ##
2739 ## ------------------- ##"
2740 echo
2741 for ac_var in $ac_subst_files
2742 do
2743 eval ac_val=\$$ac_var
2744 case $ac_val in
2745 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2746 esac
2747 $as_echo "$ac_var='\''$ac_val'\''"
2748 done | sort
2749 echo
2750 fi
2751
2752 if test -s confdefs.h; then
2753 $as_echo "## ----------- ##
2754 ## confdefs.h. ##
2755 ## ----------- ##"
2756 echo
2757 cat confdefs.h
2758 echo
2759 fi
2760 test "$ac_signal" != 0 &&
2761 $as_echo "$as_me: caught signal $ac_signal"
2762 $as_echo "$as_me: exit $exit_status"
2763 } >&5
2764 rm -f core *.core core.conftest.* &&
2765 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2766 exit $exit_status
2767 ' 0
2768 for ac_signal in 1 2 13 15; do
2769 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2770 done
2771 ac_signal=0
2772
2773 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2774 rm -f -r conftest* confdefs.h
2775
2776 $as_echo "/* confdefs.h */" > confdefs.h
2777
2778 # Predefined preprocessor variables.
2779
2780 cat >>confdefs.h <<_ACEOF
2781 #define PACKAGE_NAME "$PACKAGE_NAME"
2782 _ACEOF
2783
2784 cat >>confdefs.h <<_ACEOF
2785 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2786 _ACEOF
2787
2788 cat >>confdefs.h <<_ACEOF
2789 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2790 _ACEOF
2791
2792 cat >>confdefs.h <<_ACEOF
2793 #define PACKAGE_STRING "$PACKAGE_STRING"
2794 _ACEOF
2795
2796 cat >>confdefs.h <<_ACEOF
2797 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2798 _ACEOF
2799
2800 cat >>confdefs.h <<_ACEOF
2801 #define PACKAGE_URL "$PACKAGE_URL"
2802 _ACEOF
2803
2804
2805 # Let the site file select an alternate cache file if it wants to.
2806 # Prefer an explicitly selected file to automatically selected ones.
2807 ac_site_file1=NONE
2808 ac_site_file2=NONE
2809 if test -n "$CONFIG_SITE"; then
2810 # We do not want a PATH search for config.site.
2811 case $CONFIG_SITE in #((
2812 -*) ac_site_file1=./$CONFIG_SITE;;
2813 */*) ac_site_file1=$CONFIG_SITE;;
2814 *) ac_site_file1=./$CONFIG_SITE;;
2815 esac
2816 elif test "x$prefix" != xNONE; then
2817 ac_site_file1=$prefix/share/config.site
2818 ac_site_file2=$prefix/etc/config.site
2819 else
2820 ac_site_file1=$ac_default_prefix/share/config.site
2821 ac_site_file2=$ac_default_prefix/etc/config.site
2822 fi
2823 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2824 do
2825 test "x$ac_site_file" = xNONE && continue
2826 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2827 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2828 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2829 sed 's/^/| /' "$ac_site_file" >&5
2830 . "$ac_site_file" \
2831 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2832 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2833 as_fn_error $? "failed to load site script $ac_site_file
2834 See \`config.log' for more details" "$LINENO" 5; }
2835 fi
2836 done
2837
2838 if test -r "$cache_file"; then
2839 # Some versions of bash will fail to source /dev/null (special files
2840 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2841 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2842 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2843 $as_echo "$as_me: loading cache $cache_file" >&6;}
2844 case $cache_file in
2845 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2846 *) . "./$cache_file";;
2847 esac
2848 fi
2849 else
2850 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2851 $as_echo "$as_me: creating cache $cache_file" >&6;}
2852 >$cache_file
2853 fi
2854
2855 # Check that the precious variables saved in the cache have kept the same
2856 # value.
2857 ac_cache_corrupted=false
2858 for ac_var in $ac_precious_vars; do
2859 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2860 eval ac_new_set=\$ac_env_${ac_var}_set
2861 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2862 eval ac_new_val=\$ac_env_${ac_var}_value
2863 case $ac_old_set,$ac_new_set in
2864 set,)
2865 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2866 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2867 ac_cache_corrupted=: ;;
2868 ,set)
2869 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2870 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2871 ac_cache_corrupted=: ;;
2872 ,);;
2873 *)
2874 if test "x$ac_old_val" != "x$ac_new_val"; then
2875 # differences in whitespace do not lead to failure.
2876 ac_old_val_w=`echo x $ac_old_val`
2877 ac_new_val_w=`echo x $ac_new_val`
2878 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2879 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2880 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2881 ac_cache_corrupted=:
2882 else
2883 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2884 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2885 eval $ac_var=\$ac_old_val
2886 fi
2887 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2888 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2889 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2890 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2891 fi;;
2892 esac
2893 # Pass precious variables to config.status.
2894 if test "$ac_new_set" = set; then
2895 case $ac_new_val in
2896 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2897 *) ac_arg=$ac_var=$ac_new_val ;;
2898 esac
2899 case " $ac_configure_args " in
2900 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2901 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2902 esac
2903 fi
2904 done
2905 if $ac_cache_corrupted; then
2906 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2907 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2908 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2909 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2910 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2911 fi
2912 ## -------------------- ##
2913 ## Main body of script. ##
2914 ## -------------------- ##
2915
2916 ac_ext=c
2917 ac_cpp='$CPP $CPPFLAGS'
2918 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2919 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2920 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2921
2922
2923
2924 ac_aux_dir=
2925 for ac_dir in build-aux "$srcdir"/build-aux; do
2926 if test -f "$ac_dir/install-sh"; then
2927 ac_aux_dir=$ac_dir
2928 ac_install_sh="$ac_aux_dir/install-sh -c"
2929 break
2930 elif test -f "$ac_dir/install.sh"; then
2931 ac_aux_dir=$ac_dir
2932 ac_install_sh="$ac_aux_dir/install.sh -c"
2933 break
2934 elif test -f "$ac_dir/shtool"; then
2935 ac_aux_dir=$ac_dir
2936 ac_install_sh="$ac_aux_dir/shtool install -c"
2937 break
2938 fi
2939 done
2940 if test -z "$ac_aux_dir"; then
2941 as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2942 fi
2943
2944 # These three variables are undocumented and unsupported,
2945 # and are intended to be withdrawn in a future Autoconf release.
2946 # They can cause serious problems if a builder's source tree is in a directory
2947 # whose full name contains unusual characters.
2948 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2949 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2950 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2951
2952
2953 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
2954
2955 #
2956 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
2957 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2958 #
2959 # This code is free software; you can redistribute it and/or modify it
2960 # under the terms of the GNU General Public License version 2 only, as
2961 # published by the Free Software Foundation. Oracle designates this
2962 # particular file as subject to the "Classpath" exception as provided
2963 # by Oracle in the LICENSE file that accompanied this code.
2964 #
2965 # This code is distributed in the hope that it will be useful, but WITHOUT
2966 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2967 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
2968 # version 2 for more details (a copy is included in the LICENSE file that
2969 # accompanied this code).
2970 #
2971 # You should have received a copy of the GNU General Public License version
2972 # 2 along with this work; if not, write to the Free Software Foundation,
2973 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2974 #
2975 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2976 # or visit www.oracle.com if you need additional information or have any
2977 # questions.
2978 #
2979
2980 #
2981 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
2982 #
2983 # This program is free software; you can redistribute it and/or modify
2984 # it under the terms of the GNU General Public License as published by
2985 # the Free Software Foundation; either version 2 of the License, or
2986 # (at your option) any later version.
2987 #
2988 # This program is distributed in the hope that it will be useful, but
2989 # WITHOUT ANY WARRANTY; without even the implied warranty of
2990 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2991 # General Public License for more details.
2992 #
2993 # You should have received a copy of the GNU General Public License
2994 # along with this program; if not, write to the Free Software
2995 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2996 #
2997 # As a special exception to the GNU General Public License, if you
2998 # distribute this file as part of a program that contains a
2999 # configuration script generated by Autoconf, you may include it under
3000 # the same distribution terms that you use for the rest of that program.
3001
3002 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
3003 # ----------------------------------
3004 # PKG_PROG_PKG_CONFIG
3005
3006 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3007 #
3008 # Check to see whether a particular set of modules exists. Similar
3009 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
3010 #
3011 #
3012 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
3013 # this or PKG_CHECK_MODULES is called, or make sure to call
3014 # PKG_CHECK_EXISTS manually
3015 # --------------------------------------------------------------
3016
3017
3018
3019 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3020 # ---------------------------------------------
3021 # _PKG_CONFIG
3022
3023 # _PKG_SHORT_ERRORS_SUPPORTED
3024 # -----------------------------
3025 # _PKG_SHORT_ERRORS_SUPPORTED
3026
3027
3028 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3029 # [ACTION-IF-NOT-FOUND])
3030 #
3031 #
3032 # Note that if there is a possibility the first call to
3033 # PKG_CHECK_MODULES might not happen, you should be sure to include an
3034 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3035 #
3036 #
3037 # --------------------------------------------------------------
3038 # PKG_CHECK_MODULES
3039
3040
3041 # Include these first...
3042 #
3043 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3044 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3045 #
3046 # This code is free software; you can redistribute it and/or modify it
3047 # under the terms of the GNU General Public License version 2 only, as
3048 # published by the Free Software Foundation. Oracle designates this
3049 # particular file as subject to the "Classpath" exception as provided
3050 # by Oracle in the LICENSE file that accompanied this code.
3051 #
3052 # This code is distributed in the hope that it will be useful, but WITHOUT
3053 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3054 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
3055 # version 2 for more details (a copy is included in the LICENSE file that
3056 # accompanied this code).
3057 #
3058 # You should have received a copy of the GNU General Public License version
3059 # 2 along with this work; if not, write to the Free Software Foundation,
3060 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3061 #
3062 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3063 # or visit www.oracle.com if you need additional information or have any
3064 # questions.
3065 #
3066
3067
3068
3069 # This will make sure the given variable points to a full and proper
3070 # path. This means:
3071 # 1) There will be no spaces in the path. On posix platforms,
3072 # spaces in the path will result in an error. On Windows,
3073 # the path will be rewritten using short-style to be space-free.
3074 # 2) The path will be absolute, and it will be in unix-style (on
3075 # cygwin).
3076 # $1: The name of the variable to fix
3077
3078
3079 # This will make sure the given variable points to a executable
3080 # with a full and proper path. This means:
3081 # 1) There will be no spaces in the path. On posix platforms,
3082 # spaces in the path will result in an error. On Windows,
3083 # the path will be rewritten using short-style to be space-free.
3084 # 2) The path will be absolute, and it will be in unix-style (on
3085 # cygwin).
3086 # Any arguments given to the executable is preserved.
3087 # If the input variable does not have a directory specification, then
3088 # it need to be in the PATH.
3089 # $1: The name of the variable to fix
3090
3091
3092
3093
3094
3095
3096 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3097 # $1: variable to check
3098 # $2: executable name to print in warning (optional)
3099
3100
3101 # Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3102 # Arguments as AC_PATH_PROG:
3103 # $1: variable to set
3104 # $2: executable name to look for
3105
3106
3107 # Setup the most fundamental tools that relies on not much else to set up,
3108 # but is used by much of the early bootstrap code.
3109
3110
3111 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3112
3113
3114
3115
3116
3117
3118
3119 #%%% Simple tools %%%
3120
3121 # Check if we have found a usable version of make
3122 # $1: the path to a potential make binary (or empty)
3123 # $2: the description on how we found this
3124
3125
3126 # Goes looking for a usable version of GNU make.
3127
3128
3129
3130
3131
3132
3133 # Check if build directory is on local disk. If not possible to determine,
3134 # we prefer to claim it's local.
3135 # Argument 1: directory to test
3136 # Argument 2: what to do if it is on local disk
3137 # Argument 3: what to do otherwise (remote disk or failure)
3138
3139
3140 # Check that source files have basic read permissions set. This might
3141 # not be the case in cygwin in certain conditions.
3142
3143
3144
3145
3146 #
3147 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3148 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3149 #
3150 # This code is free software; you can redistribute it and/or modify it
3151 # under the terms of the GNU General Public License version 2 only, as
3152 # published by the Free Software Foundation. Oracle designates this
3153 # particular file as subject to the "Classpath" exception as provided
3154 # by Oracle in the LICENSE file that accompanied this code.
3155 #
3156 # This code is distributed in the hope that it will be useful, but WITHOUT
3157 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3158 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
3159 # version 2 for more details (a copy is included in the LICENSE file that
3160 # accompanied this code).
3161 #
3162 # You should have received a copy of the GNU General Public License version
3163 # 2 along with this work; if not, write to the Free Software Foundation,
3164 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3165 #
3166 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3167 # or visit www.oracle.com if you need additional information or have any
3168 # questions.
3169 #
3170
3171
3172
3173
3174
3175 # Helper function which possibly converts a path using DOS-style short mode.
3176 # If so, the updated path is stored in $new_path.
3177 # $1: The path to check
3178
3179
3180 # Helper function which possibly converts a path using DOS-style short mode.
3181 # If so, the updated path is stored in $new_path.
3182 # $1: The path to check
3183
3184
3185 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3186 # and could probably be heavily simplified. However, all changes in this
3187 # area tend to need lot of testing in different scenarios, and in lack of
3188 # proper unit testing, cleaning this up has not been deemed worth the effort
3189 # at the moment.
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3200
3201
3202
3203
3204 #
3205 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3206 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3207 #
3208 # This code is free software; you can redistribute it and/or modify it
3209 # under the terms of the GNU General Public License version 2 only, as
3210 # published by the Free Software Foundation. Oracle designates this
3211 # particular file as subject to the "Classpath" exception as provided
3212 # by Oracle in the LICENSE file that accompanied this code.
3213 #
3214 # This code is distributed in the hope that it will be useful, but WITHOUT
3215 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3216 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
3217 # version 2 for more details (a copy is included in the LICENSE file that
3218 # accompanied this code).
3219 #
3220 # You should have received a copy of the GNU General Public License version
3221 # 2 along with this work; if not, write to the Free Software Foundation,
3222 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3223 #
3224 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3225 # or visit www.oracle.com if you need additional information or have any
3226 # questions.
3227 #
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239 # ... then the rest
3240 #
3241 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3242 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3243 #
3244 # This code is free software; you can redistribute it and/or modify it
3245 # under the terms of the GNU General Public License version 2 only, as
3246 # published by the Free Software Foundation. Oracle designates this
3247 # particular file as subject to the "Classpath" exception as provided
3248 # by Oracle in the LICENSE file that accompanied this code.
3249 #
3250 # This code is distributed in the hope that it will be useful, but WITHOUT
3251 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3252 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
3253 # version 2 for more details (a copy is included in the LICENSE file that
3254 # accompanied this code).
3255 #
3256 # You should have received a copy of the GNU General Public License version
3257 # 2 along with this work; if not, write to the Free Software Foundation,
3258 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3259 #
3260 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3261 # or visit www.oracle.com if you need additional information or have any
3262 # questions.
3263 #
3264
3265 # Execute the check given as argument, and verify the result
3266 # If the Boot JDK was previously found, do nothing
3267 # $1 A command line (typically autoconf macro) to execute
3268
3269
3270 # Test: Is bootjdk explicitely set by command line arguments?
3271
3272
3273 # Test: Is bootjdk available from builddeps?
3274
3275
3276 # Test: Is $JAVA_HOME set?
3277
3278
3279 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3280
3281
3282 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3283
3284
3285 # Look for a jdk in the given path. If there are multiple, try to select the newest.
3286 # If found, set BOOT_JDK and BOOT_JDK_FOUND.
3287 # $1 = Path to directory containing jdk installations.
3288 # $2 = String to append to the found JDK directory to get the proper JDK home
3289
3290
3291 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3292 # environmental variable as base for where to look.
3293 # $1 Name of an environmal variable, assumed to point to the Program Files directory.
3294
3295
3296 # Test: Is there a JDK installed in default, well-known locations?
3297
3298
3299 # Check that a command-line tool in the Boot JDK is correct
3300 # $1 = name of variable to assign
3301 # $2 = name of binary
3302
3303
3304 ###############################################################################
3305 #
3306 # We need a Boot JDK to bootstrap the build.
3307 #
3308
3309
3310
3311
3312
3313 #
3314 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3315 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3316 #
3317 # This code is free software; you can redistribute it and/or modify it
3318 # under the terms of the GNU General Public License version 2 only, as
3319 # published by the Free Software Foundation. Oracle designates this
3320 # particular file as subject to the "Classpath" exception as provided
3321 # by Oracle in the LICENSE file that accompanied this code.
3322 #
3323 # This code is distributed in the hope that it will be useful, but WITHOUT
3324 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3325 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
3326 # version 2 for more details (a copy is included in the LICENSE file that
3327 # accompanied this code).
3328 #
3329 # You should have received a copy of the GNU General Public License version
3330 # 2 along with this work; if not, write to the Free Software Foundation,
3331 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3332 #
3333 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3334 # or visit www.oracle.com if you need additional information or have any
3335 # questions.
3336 #
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357 #
3358 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3359 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3360 #
3361 # This code is free software; you can redistribute it and/or modify it
3362 # under the terms of the GNU General Public License version 2 only, as
3363 # published by the Free Software Foundation. Oracle designates this
3364 # particular file as subject to the "Classpath" exception as provided
3365 # by Oracle in the LICENSE file that accompanied this code.
3366 #
3367 # This code is distributed in the hope that it will be useful, but WITHOUT
3368 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3369 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
3370 # version 2 for more details (a copy is included in the LICENSE file that
3371 # accompanied this code).
3372 #
3373 # You should have received a copy of the GNU General Public License version
3374 # 2 along with this work; if not, write to the Free Software Foundation,
3375 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3376 #
3377 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3378 # or visit www.oracle.com if you need additional information or have any
3379 # questions.
3380 #
3381
3382
3383
3384
3385
3386 cygwin_help() {
3387 case $1 in
3388 unzip)
3389 PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3390 zip)
3391 PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3392 make)
3393 PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3394 * )
3395 break ;;
3396 esac
3397 }
3398
3399 apt_help() {
3400 case $1 in
3401 devkit)
3402 PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3403 openjdk)
3404 PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3405 alsa)
3406 PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3407 cups)
3408 PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3409 freetype2)
3410 PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3411 pulse)
3412 PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3413 x11)
3414 PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3415 ccache)
3416 PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3417 * )
3418 break ;;
3419 esac
3420 }
3421
3422 yum_help() {
3423 case $1 in
3424 devkit)
3425 PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3426 openjdk)
3427 PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3428 alsa)
3429 PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3430 cups)
3431 PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3432 freetype2)
3433 PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3434 pulse)
3435 PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3436 x11)
3437 PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3438 ccache)
3439 PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3440 * )
3441 break ;;
3442 esac
3443 }
3444
3445 port_help() {
3446 PKGHANDLER_COMMAND=""
3447 }
3448
3449 pkgutil_help() {
3450 PKGHANDLER_COMMAND=""
3451 }
3452
3453 pkgadd_help() {
3454 PKGHANDLER_COMMAND=""
3455 }
3456
3457
3458
3459 #
3460 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3461 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3462 #
3463 # This code is free software; you can redistribute it and/or modify it
3464 # under the terms of the GNU General Public License version 2 only, as
3465 # published by the Free Software Foundation. Oracle designates this
3466 # particular file as subject to the "Classpath" exception as provided
3467 # by Oracle in the LICENSE file that accompanied this code.
3468 #
3469 # This code is distributed in the hope that it will be useful, but WITHOUT
3470 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3471 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
3472 # version 2 for more details (a copy is included in the LICENSE file that
3473 # accompanied this code).
3474 #
3475 # You should have received a copy of the GNU General Public License version
3476 # 2 along with this work; if not, write to the Free Software Foundation,
3477 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3478 #
3479 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3480 # or visit www.oracle.com if you need additional information or have any
3481 # questions.
3482 #
3483
3484
3485
3486
3487
3488
3489
3490
3491 ###############################################################################
3492 #
3493 # Should we build only OpenJDK even if closed sources are present?
3494 #
3495
3496
3497
3498
3499 ###############################################################################
3500 #
3501 # Setup version numbers
3502 #
3503
3504
3505
3506
3507
3508
3509 # Support for customization of the build process. Some build files
3510 # will include counterparts from this location, if they exist. This allows
3511 # for a degree of customization of the build targets and the rules/recipes
3512 # to create them
3513
3514 # Check whether --with-custom-make-dir was given.
3515 if test "${with_custom_make_dir+set}" = set; then :
3516 withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3517 fi
3518
3519
3520
3521 #
3522 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3523 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3524 #
3525 # This code is free software; you can redistribute it and/or modify it
3526 # under the terms of the GNU General Public License version 2 only, as
3527 # published by the Free Software Foundation. Oracle designates this
3528 # particular file as subject to the "Classpath" exception as provided
3529 # by Oracle in the LICENSE file that accompanied this code.
3530 #
3531 # This code is distributed in the hope that it will be useful, but WITHOUT
3532 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3533 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
3534 # version 2 for more details (a copy is included in the LICENSE file that
3535 # accompanied this code).
3536 #
3537 # You should have received a copy of the GNU General Public License version
3538 # 2 along with this work; if not, write to the Free Software Foundation,
3539 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3540 #
3541 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3542 # or visit www.oracle.com if you need additional information or have any
3543 # questions.
3544 #
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560 #
3561 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3562 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3563 #
3564 # This code is free software; you can redistribute it and/or modify it
3565 # under the terms of the GNU General Public License version 2 only, as
3566 # published by the Free Software Foundation. Oracle designates this
3567 # particular file as subject to the "Classpath" exception as provided
3568 # by Oracle in the LICENSE file that accompanied this code.
3569 #
3570 # This code is distributed in the hope that it will be useful, but WITHOUT
3571 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3572 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
3573 # version 2 for more details (a copy is included in the LICENSE file that
3574 # accompanied this code).
3575 #
3576 # You should have received a copy of the GNU General Public License version
3577 # 2 along with this work; if not, write to the Free Software Foundation,
3578 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3579 #
3580 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3581 # or visit www.oracle.com if you need additional information or have any
3582 # questions.
3583 #
3584
3585 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3586 # Converts autoconf style CPU name to OpenJDK style, into
3587 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3588
3589
3590 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3591 # Converts autoconf style OS name to OpenJDK style, into
3592 # VAR_OS and VAR_OS_API.
3593
3594
3595 # Expects $host_os $host_cpu $build_os and $build_cpu
3596 # and $with_target_bits to have been setup!
3597 #
3598 # Translate the standard triplet(quadruplet) definition
3599 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3600 # OPENJDK_BUILD_OS, etc.
3601
3602
3603 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3604 # accordingly. Must be done after setting up build and target system, but before
3605 # doing anything else with these values.
3606
3607
3608 # Setup the legacy variables, for controlling the old makefiles.
3609 #
3610
3611
3612
3613
3614 #%%% Build and target systems %%%
3615
3616
3617
3618
3619 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3620 # Add -mX to various FLAGS variables.
3621
3622
3623
3624
3625
3626
3627 #
3628 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3629 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3630 #
3631 # This code is free software; you can redistribute it and/or modify it
3632 # under the terms of the GNU General Public License version 2 only, as
3633 # published by the Free Software Foundation. Oracle designates this
3634 # particular file as subject to the "Classpath" exception as provided
3635 # by Oracle in the LICENSE file that accompanied this code.
3636 #
3637 # This code is distributed in the hope that it will be useful, but WITHOUT
3638 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3639 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
3640 # version 2 for more details (a copy is included in the LICENSE file that
3641 # accompanied this code).
3642 #
3643 # You should have received a copy of the GNU General Public License version
3644 # 2 along with this work; if not, write to the Free Software Foundation,
3645 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3646 #
3647 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3648 # or visit www.oracle.com if you need additional information or have any
3649 # questions.
3650 #
3651
3652
3653
3654
3655
3656
3657
3658
3659 #
3660 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3661 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3662 #
3663 # This code is free software; you can redistribute it and/or modify it
3664 # under the terms of the GNU General Public License version 2 only, as
3665 # published by the Free Software Foundation. Oracle designates this
3666 # particular file as subject to the "Classpath" exception as provided
3667 # by Oracle in the LICENSE file that accompanied this code.
3668 #
3669 # This code is distributed in the hope that it will be useful, but WITHOUT
3670 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3671 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
3672 # version 2 for more details (a copy is included in the LICENSE file that
3673 # accompanied this code).
3674 #
3675 # You should have received a copy of the GNU General Public License version
3676 # 2 along with this work; if not, write to the Free Software Foundation,
3677 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3678 #
3679 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3680 # or visit www.oracle.com if you need additional information or have any
3681 # questions.
3682 #
3683
3684 # $1 = compiler to test (CC or CXX)
3685 # $2 = human readable name of compiler (C or C++)
3686
3687
3688
3689
3690
3691 # $1 = compiler to test (CC or CXX)
3692 # $2 = human readable name of compiler (C or C++)
3693 # $3 = list of compiler names to search for
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706 #
3707 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3708 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3709 #
3710 # This code is free software; you can redistribute it and/or modify it
3711 # under the terms of the GNU General Public License version 2 only, as
3712 # published by the Free Software Foundation. Oracle designates this
3713 # particular file as subject to the "Classpath" exception as provided
3714 # by Oracle in the LICENSE file that accompanied this code.
3715 #
3716 # This code is distributed in the hope that it will be useful, but WITHOUT
3717 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3718 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
3719 # version 2 for more details (a copy is included in the LICENSE file that
3720 # accompanied this code).
3721 #
3722 # You should have received a copy of the GNU General Public License version
3723 # 2 along with this work; if not, write to the Free Software Foundation,
3724 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3725 #
3726 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3727 # or visit www.oracle.com if you need additional information or have any
3728 # questions.
3729 #
3730
3731
3732
3733
3734
3735
3736
3737 # Check if the VS env variables were setup prior to running configure.
3738 # If not, then find vcvarsall.bat and run it automatically, and integrate
3739 # the set env variables into the spec file.
3740
3741
3742
3743 # Setup the DXSDK paths
3744
3745
3746
3747
3748
3749
3750 # This line needs to be here, verbatim, after all includes and the dummy hook
3751 # definitions. It is replaced with custom functionality when building
3752 # custom sources.
3753 #CUSTOM_AUTOCONF_INCLUDE
3754
3755 # Do not change or remove the following line, it is needed for consistency checks:
3756 DATE_WHEN_GENERATED=1363617192
3757
3758 ###############################################################################
3759 #
3760 # Initialization / Boot-strapping
3761 #
3762 # The bootstrapping process needs to solve the "chicken or the egg" problem,
3763 # thus it jumps back and forth, each time gaining something needed later on.
3764 #
3765 ###############################################################################
3766
3767 # Basic initialization that must happen first of all
3768
3769 # Save the original command line. This is passed to us by the wrapper configure script.
3770
3771 DATE_WHEN_CONFIGURED=`LANG=C date`
3772
3773 { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3774 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3775 { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3776 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3777
3778
3779
3780 # Start with tools that do not need have cross compilation support
3781 # and can be expected to be found in the default PATH. These tools are
3782 # used by configure. Nor are these tools expected to be found in the
3783 # devkit from the builddeps server either, since they are
3784 # needed to download the devkit.
3785
3786 # First are all the simple required tools.
3787
3788 for ac_prog in basename
3789 do
3790 # Extract the first word of "$ac_prog", so it can be a program name with args.
3791 set dummy $ac_prog; ac_word=$2
3792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3793 $as_echo_n "checking for $ac_word... " >&6; }
3794 if ${ac_cv_path_BASENAME+:} false; then :
3795 $as_echo_n "(cached) " >&6
3796 else
3797 case $BASENAME in
3798 [\\/]* | ?:[\\/]*)
3799 ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3800 ;;
3801 *)
3802 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3803 for as_dir in $PATH
3804 do
3805 IFS=$as_save_IFS
3806 test -z "$as_dir" && as_dir=.
3807 for ac_exec_ext in '' $ac_executable_extensions; do
3808 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3809 ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3810 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3811 break 2
3812 fi
3813 done
3814 done
3815 IFS=$as_save_IFS
3816
3817 ;;
3818 esac
3819 fi
3820 BASENAME=$ac_cv_path_BASENAME
3821 if test -n "$BASENAME"; then
3822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3823 $as_echo "$BASENAME" >&6; }
3824 else
3825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3826 $as_echo "no" >&6; }
3827 fi
3828
3829
3830 test -n "$BASENAME" && break
3831 done
3832
3833
3834 if test "x$BASENAME" = x; then
3835 if test "xbasename" = x; then
3836 PROG_NAME=basename
3837 else
3838 PROG_NAME=basename
3839 fi
3840 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3841 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3842 as_fn_error $? "Cannot continue" "$LINENO" 5
3843 fi
3844
3845
3846
3847 for ac_prog in bash
3848 do
3849 # Extract the first word of "$ac_prog", so it can be a program name with args.
3850 set dummy $ac_prog; ac_word=$2
3851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3852 $as_echo_n "checking for $ac_word... " >&6; }
3853 if ${ac_cv_path_BASH+:} false; then :
3854 $as_echo_n "(cached) " >&6
3855 else
3856 case $BASH in
3857 [\\/]* | ?:[\\/]*)
3858 ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3859 ;;
3860 *)
3861 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3862 for as_dir in $PATH
3863 do
3864 IFS=$as_save_IFS
3865 test -z "$as_dir" && as_dir=.
3866 for ac_exec_ext in '' $ac_executable_extensions; do
3867 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3868 ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3869 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3870 break 2
3871 fi
3872 done
3873 done
3874 IFS=$as_save_IFS
3875
3876 ;;
3877 esac
3878 fi
3879 BASH=$ac_cv_path_BASH
3880 if test -n "$BASH"; then
3881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3882 $as_echo "$BASH" >&6; }
3883 else
3884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3885 $as_echo "no" >&6; }
3886 fi
3887
3888
3889 test -n "$BASH" && break
3890 done
3891
3892
3893 if test "x$BASH" = x; then
3894 if test "xbash" = x; then
3895 PROG_NAME=bash
3896 else
3897 PROG_NAME=bash
3898 fi
3899 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3900 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3901 as_fn_error $? "Cannot continue" "$LINENO" 5
3902 fi
3903
3904
3905
3906 for ac_prog in cat
3907 do
3908 # Extract the first word of "$ac_prog", so it can be a program name with args.
3909 set dummy $ac_prog; ac_word=$2
3910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3911 $as_echo_n "checking for $ac_word... " >&6; }
3912 if ${ac_cv_path_CAT+:} false; then :
3913 $as_echo_n "(cached) " >&6
3914 else
3915 case $CAT in
3916 [\\/]* | ?:[\\/]*)
3917 ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3918 ;;
3919 *)
3920 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3921 for as_dir in $PATH
3922 do
3923 IFS=$as_save_IFS
3924 test -z "$as_dir" && as_dir=.
3925 for ac_exec_ext in '' $ac_executable_extensions; do
3926 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3927 ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3928 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3929 break 2
3930 fi
3931 done
3932 done
3933 IFS=$as_save_IFS
3934
3935 ;;
3936 esac
3937 fi
3938 CAT=$ac_cv_path_CAT
3939 if test -n "$CAT"; then
3940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3941 $as_echo "$CAT" >&6; }
3942 else
3943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3944 $as_echo "no" >&6; }
3945 fi
3946
3947
3948 test -n "$CAT" && break
3949 done
3950
3951
3952 if test "x$CAT" = x; then
3953 if test "xcat" = x; then
3954 PROG_NAME=cat
3955 else
3956 PROG_NAME=cat
3957 fi
3958 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3959 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3960 as_fn_error $? "Cannot continue" "$LINENO" 5
3961 fi
3962
3963
3964
3965 for ac_prog in chmod
3966 do
3967 # Extract the first word of "$ac_prog", so it can be a program name with args.
3968 set dummy $ac_prog; ac_word=$2
3969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3970 $as_echo_n "checking for $ac_word... " >&6; }
3971 if ${ac_cv_path_CHMOD+:} false; then :
3972 $as_echo_n "(cached) " >&6
3973 else
3974 case $CHMOD in
3975 [\\/]* | ?:[\\/]*)
3976 ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
3977 ;;
3978 *)
3979 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3980 for as_dir in $PATH
3981 do
3982 IFS=$as_save_IFS
3983 test -z "$as_dir" && as_dir=.
3984 for ac_exec_ext in '' $ac_executable_extensions; do
3985 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3986 ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
3987 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3988 break 2
3989 fi
3990 done
3991 done
3992 IFS=$as_save_IFS
3993
3994 ;;
3995 esac
3996 fi
3997 CHMOD=$ac_cv_path_CHMOD
3998 if test -n "$CHMOD"; then
3999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4000 $as_echo "$CHMOD" >&6; }
4001 else
4002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4003 $as_echo "no" >&6; }
4004 fi
4005
4006
4007 test -n "$CHMOD" && break
4008 done
4009
4010
4011 if test "x$CHMOD" = x; then
4012 if test "xchmod" = x; then
4013 PROG_NAME=chmod
4014 else
4015 PROG_NAME=chmod
4016 fi
4017 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4018 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4019 as_fn_error $? "Cannot continue" "$LINENO" 5
4020 fi
4021
4022
4023
4024 for ac_prog in cmp
4025 do
4026 # Extract the first word of "$ac_prog", so it can be a program name with args.
4027 set dummy $ac_prog; ac_word=$2
4028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4029 $as_echo_n "checking for $ac_word... " >&6; }
4030 if ${ac_cv_path_CMP+:} false; then :
4031 $as_echo_n "(cached) " >&6
4032 else
4033 case $CMP in
4034 [\\/]* | ?:[\\/]*)
4035 ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4036 ;;
4037 *)
4038 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4039 for as_dir in $PATH
4040 do
4041 IFS=$as_save_IFS
4042 test -z "$as_dir" && as_dir=.
4043 for ac_exec_ext in '' $ac_executable_extensions; do
4044 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4045 ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4046 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4047 break 2
4048 fi
4049 done
4050 done
4051 IFS=$as_save_IFS
4052
4053 ;;
4054 esac
4055 fi
4056 CMP=$ac_cv_path_CMP
4057 if test -n "$CMP"; then
4058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4059 $as_echo "$CMP" >&6; }
4060 else
4061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4062 $as_echo "no" >&6; }
4063 fi
4064
4065
4066 test -n "$CMP" && break
4067 done
4068
4069
4070 if test "x$CMP" = x; then
4071 if test "xcmp" = x; then
4072 PROG_NAME=cmp
4073 else
4074 PROG_NAME=cmp
4075 fi
4076 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4077 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4078 as_fn_error $? "Cannot continue" "$LINENO" 5
4079 fi
4080
4081
4082
4083 for ac_prog in comm
4084 do
4085 # Extract the first word of "$ac_prog", so it can be a program name with args.
4086 set dummy $ac_prog; ac_word=$2
4087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4088 $as_echo_n "checking for $ac_word... " >&6; }
4089 if ${ac_cv_path_COMM+:} false; then :
4090 $as_echo_n "(cached) " >&6
4091 else
4092 case $COMM in
4093 [\\/]* | ?:[\\/]*)
4094 ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4095 ;;
4096 *)
4097 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4098 for as_dir in $PATH
4099 do
4100 IFS=$as_save_IFS
4101 test -z "$as_dir" && as_dir=.
4102 for ac_exec_ext in '' $ac_executable_extensions; do
4103 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4104 ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4105 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4106 break 2
4107 fi
4108 done
4109 done
4110 IFS=$as_save_IFS
4111
4112 ;;
4113 esac
4114 fi
4115 COMM=$ac_cv_path_COMM
4116 if test -n "$COMM"; then
4117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4118 $as_echo "$COMM" >&6; }
4119 else
4120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4121 $as_echo "no" >&6; }
4122 fi
4123
4124
4125 test -n "$COMM" && break
4126 done
4127
4128
4129 if test "x$COMM" = x; then
4130 if test "xcomm" = x; then
4131 PROG_NAME=comm
4132 else
4133 PROG_NAME=comm
4134 fi
4135 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4136 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4137 as_fn_error $? "Cannot continue" "$LINENO" 5
4138 fi
4139
4140
4141
4142 for ac_prog in cp
4143 do
4144 # Extract the first word of "$ac_prog", so it can be a program name with args.
4145 set dummy $ac_prog; ac_word=$2
4146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4147 $as_echo_n "checking for $ac_word... " >&6; }
4148 if ${ac_cv_path_CP+:} false; then :
4149 $as_echo_n "(cached) " >&6
4150 else
4151 case $CP in
4152 [\\/]* | ?:[\\/]*)
4153 ac_cv_path_CP="$CP" # Let the user override the test with a path.
4154 ;;
4155 *)
4156 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4157 for as_dir in $PATH
4158 do
4159 IFS=$as_save_IFS
4160 test -z "$as_dir" && as_dir=.
4161 for ac_exec_ext in '' $ac_executable_extensions; do
4162 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4163 ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4164 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4165 break 2
4166 fi
4167 done
4168 done
4169 IFS=$as_save_IFS
4170
4171 ;;
4172 esac
4173 fi
4174 CP=$ac_cv_path_CP
4175 if test -n "$CP"; then
4176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4177 $as_echo "$CP" >&6; }
4178 else
4179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4180 $as_echo "no" >&6; }
4181 fi
4182
4183
4184 test -n "$CP" && break
4185 done
4186
4187
4188 if test "x$CP" = x; then
4189 if test "xcp" = x; then
4190 PROG_NAME=cp
4191 else
4192 PROG_NAME=cp
4193 fi
4194 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4195 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4196 as_fn_error $? "Cannot continue" "$LINENO" 5
4197 fi
4198
4199
4200
4201 for ac_prog in cpio
4202 do
4203 # Extract the first word of "$ac_prog", so it can be a program name with args.
4204 set dummy $ac_prog; ac_word=$2
4205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4206 $as_echo_n "checking for $ac_word... " >&6; }
4207 if ${ac_cv_path_CPIO+:} false; then :
4208 $as_echo_n "(cached) " >&6
4209 else
4210 case $CPIO in
4211 [\\/]* | ?:[\\/]*)
4212 ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4213 ;;
4214 *)
4215 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4216 for as_dir in $PATH
4217 do
4218 IFS=$as_save_IFS
4219 test -z "$as_dir" && as_dir=.
4220 for ac_exec_ext in '' $ac_executable_extensions; do
4221 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4222 ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4223 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4224 break 2
4225 fi
4226 done
4227 done
4228 IFS=$as_save_IFS
4229
4230 ;;
4231 esac
4232 fi
4233 CPIO=$ac_cv_path_CPIO
4234 if test -n "$CPIO"; then
4235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4236 $as_echo "$CPIO" >&6; }
4237 else
4238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4239 $as_echo "no" >&6; }
4240 fi
4241
4242
4243 test -n "$CPIO" && break
4244 done
4245
4246
4247 if test "x$CPIO" = x; then
4248 if test "xcpio" = x; then
4249 PROG_NAME=cpio
4250 else
4251 PROG_NAME=cpio
4252 fi
4253 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4254 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4255 as_fn_error $? "Cannot continue" "$LINENO" 5
4256 fi
4257
4258
4259
4260 for ac_prog in cut
4261 do
4262 # Extract the first word of "$ac_prog", so it can be a program name with args.
4263 set dummy $ac_prog; ac_word=$2
4264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4265 $as_echo_n "checking for $ac_word... " >&6; }
4266 if ${ac_cv_path_CUT+:} false; then :
4267 $as_echo_n "(cached) " >&6
4268 else
4269 case $CUT in
4270 [\\/]* | ?:[\\/]*)
4271 ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4272 ;;
4273 *)
4274 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4275 for as_dir in $PATH
4276 do
4277 IFS=$as_save_IFS
4278 test -z "$as_dir" && as_dir=.
4279 for ac_exec_ext in '' $ac_executable_extensions; do
4280 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4281 ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4282 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4283 break 2
4284 fi
4285 done
4286 done
4287 IFS=$as_save_IFS
4288
4289 ;;
4290 esac
4291 fi
4292 CUT=$ac_cv_path_CUT
4293 if test -n "$CUT"; then
4294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4295 $as_echo "$CUT" >&6; }
4296 else
4297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4298 $as_echo "no" >&6; }
4299 fi
4300
4301
4302 test -n "$CUT" && break
4303 done
4304
4305
4306 if test "x$CUT" = x; then
4307 if test "xcut" = x; then
4308 PROG_NAME=cut
4309 else
4310 PROG_NAME=cut
4311 fi
4312 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4313 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4314 as_fn_error $? "Cannot continue" "$LINENO" 5
4315 fi
4316
4317
4318
4319 for ac_prog in date
4320 do
4321 # Extract the first word of "$ac_prog", so it can be a program name with args.
4322 set dummy $ac_prog; ac_word=$2
4323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4324 $as_echo_n "checking for $ac_word... " >&6; }
4325 if ${ac_cv_path_DATE+:} false; then :
4326 $as_echo_n "(cached) " >&6
4327 else
4328 case $DATE in
4329 [\\/]* | ?:[\\/]*)
4330 ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4331 ;;
4332 *)
4333 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4334 for as_dir in $PATH
4335 do
4336 IFS=$as_save_IFS
4337 test -z "$as_dir" && as_dir=.
4338 for ac_exec_ext in '' $ac_executable_extensions; do
4339 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4340 ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4341 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4342 break 2
4343 fi
4344 done
4345 done
4346 IFS=$as_save_IFS
4347
4348 ;;
4349 esac
4350 fi
4351 DATE=$ac_cv_path_DATE
4352 if test -n "$DATE"; then
4353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4354 $as_echo "$DATE" >&6; }
4355 else
4356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4357 $as_echo "no" >&6; }
4358 fi
4359
4360
4361 test -n "$DATE" && break
4362 done
4363
4364
4365 if test "x$DATE" = x; then
4366 if test "xdate" = x; then
4367 PROG_NAME=date
4368 else
4369 PROG_NAME=date
4370 fi
4371 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4372 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4373 as_fn_error $? "Cannot continue" "$LINENO" 5
4374 fi
4375
4376
4377
4378 for ac_prog in gdiff diff
4379 do
4380 # Extract the first word of "$ac_prog", so it can be a program name with args.
4381 set dummy $ac_prog; ac_word=$2
4382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4383 $as_echo_n "checking for $ac_word... " >&6; }
4384 if ${ac_cv_path_DIFF+:} false; then :
4385 $as_echo_n "(cached) " >&6
4386 else
4387 case $DIFF in
4388 [\\/]* | ?:[\\/]*)
4389 ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4390 ;;
4391 *)
4392 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4393 for as_dir in $PATH
4394 do
4395 IFS=$as_save_IFS
4396 test -z "$as_dir" && as_dir=.
4397 for ac_exec_ext in '' $ac_executable_extensions; do
4398 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4399 ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4400 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4401 break 2
4402 fi
4403 done
4404 done
4405 IFS=$as_save_IFS
4406
4407 ;;
4408 esac
4409 fi
4410 DIFF=$ac_cv_path_DIFF
4411 if test -n "$DIFF"; then
4412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4413 $as_echo "$DIFF" >&6; }
4414 else
4415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4416 $as_echo "no" >&6; }
4417 fi
4418
4419
4420 test -n "$DIFF" && break
4421 done
4422
4423
4424 if test "x$DIFF" = x; then
4425 if test "xgdiff diff" = x; then
4426 PROG_NAME=diff
4427 else
4428 PROG_NAME=gdiff diff
4429 fi
4430 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4431 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4432 as_fn_error $? "Cannot continue" "$LINENO" 5
4433 fi
4434
4435
4436
4437 for ac_prog in dirname
4438 do
4439 # Extract the first word of "$ac_prog", so it can be a program name with args.
4440 set dummy $ac_prog; ac_word=$2
4441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4442 $as_echo_n "checking for $ac_word... " >&6; }
4443 if ${ac_cv_path_DIRNAME+:} false; then :
4444 $as_echo_n "(cached) " >&6
4445 else
4446 case $DIRNAME in
4447 [\\/]* | ?:[\\/]*)
4448 ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4449 ;;
4450 *)
4451 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4452 for as_dir in $PATH
4453 do
4454 IFS=$as_save_IFS
4455 test -z "$as_dir" && as_dir=.
4456 for ac_exec_ext in '' $ac_executable_extensions; do
4457 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4458 ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4459 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4460 break 2
4461 fi
4462 done
4463 done
4464 IFS=$as_save_IFS
4465
4466 ;;
4467 esac
4468 fi
4469 DIRNAME=$ac_cv_path_DIRNAME
4470 if test -n "$DIRNAME"; then
4471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4472 $as_echo "$DIRNAME" >&6; }
4473 else
4474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4475 $as_echo "no" >&6; }
4476 fi
4477
4478
4479 test -n "$DIRNAME" && break
4480 done
4481
4482
4483 if test "x$DIRNAME" = x; then
4484 if test "xdirname" = x; then
4485 PROG_NAME=dirname
4486 else
4487 PROG_NAME=dirname
4488 fi
4489 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4490 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4491 as_fn_error $? "Cannot continue" "$LINENO" 5
4492 fi
4493
4494
4495
4496 for ac_prog in echo
4497 do
4498 # Extract the first word of "$ac_prog", so it can be a program name with args.
4499 set dummy $ac_prog; ac_word=$2
4500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4501 $as_echo_n "checking for $ac_word... " >&6; }
4502 if ${ac_cv_path_ECHO+:} false; then :
4503 $as_echo_n "(cached) " >&6
4504 else
4505 case $ECHO in
4506 [\\/]* | ?:[\\/]*)
4507 ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4508 ;;
4509 *)
4510 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4511 for as_dir in $PATH
4512 do
4513 IFS=$as_save_IFS
4514 test -z "$as_dir" && as_dir=.
4515 for ac_exec_ext in '' $ac_executable_extensions; do
4516 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4517 ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4518 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4519 break 2
4520 fi
4521 done
4522 done
4523 IFS=$as_save_IFS
4524
4525 ;;
4526 esac
4527 fi
4528 ECHO=$ac_cv_path_ECHO
4529 if test -n "$ECHO"; then
4530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4531 $as_echo "$ECHO" >&6; }
4532 else
4533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4534 $as_echo "no" >&6; }
4535 fi
4536
4537
4538 test -n "$ECHO" && break
4539 done
4540
4541
4542 if test "x$ECHO" = x; then
4543 if test "xecho" = x; then
4544 PROG_NAME=echo
4545 else
4546 PROG_NAME=echo
4547 fi
4548 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4549 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4550 as_fn_error $? "Cannot continue" "$LINENO" 5
4551 fi
4552
4553
4554
4555 for ac_prog in expr
4556 do
4557 # Extract the first word of "$ac_prog", so it can be a program name with args.
4558 set dummy $ac_prog; ac_word=$2
4559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4560 $as_echo_n "checking for $ac_word... " >&6; }
4561 if ${ac_cv_path_EXPR+:} false; then :
4562 $as_echo_n "(cached) " >&6
4563 else
4564 case $EXPR in
4565 [\\/]* | ?:[\\/]*)
4566 ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4567 ;;
4568 *)
4569 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4570 for as_dir in $PATH
4571 do
4572 IFS=$as_save_IFS
4573 test -z "$as_dir" && as_dir=.
4574 for ac_exec_ext in '' $ac_executable_extensions; do
4575 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4576 ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4577 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4578 break 2
4579 fi
4580 done
4581 done
4582 IFS=$as_save_IFS
4583
4584 ;;
4585 esac
4586 fi
4587 EXPR=$ac_cv_path_EXPR
4588 if test -n "$EXPR"; then
4589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4590 $as_echo "$EXPR" >&6; }
4591 else
4592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4593 $as_echo "no" >&6; }
4594 fi
4595
4596
4597 test -n "$EXPR" && break
4598 done
4599
4600
4601 if test "x$EXPR" = x; then
4602 if test "xexpr" = x; then
4603 PROG_NAME=expr
4604 else
4605 PROG_NAME=expr
4606 fi
4607 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4608 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4609 as_fn_error $? "Cannot continue" "$LINENO" 5
4610 fi
4611
4612
4613
4614 for ac_prog in file
4615 do
4616 # Extract the first word of "$ac_prog", so it can be a program name with args.
4617 set dummy $ac_prog; ac_word=$2
4618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4619 $as_echo_n "checking for $ac_word... " >&6; }
4620 if ${ac_cv_path_FILE+:} false; then :
4621 $as_echo_n "(cached) " >&6
4622 else
4623 case $FILE in
4624 [\\/]* | ?:[\\/]*)
4625 ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4626 ;;
4627 *)
4628 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4629 for as_dir in $PATH
4630 do
4631 IFS=$as_save_IFS
4632 test -z "$as_dir" && as_dir=.
4633 for ac_exec_ext in '' $ac_executable_extensions; do
4634 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4635 ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4636 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4637 break 2
4638 fi
4639 done
4640 done
4641 IFS=$as_save_IFS
4642
4643 ;;
4644 esac
4645 fi
4646 FILE=$ac_cv_path_FILE
4647 if test -n "$FILE"; then
4648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4649 $as_echo "$FILE" >&6; }
4650 else
4651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4652 $as_echo "no" >&6; }
4653 fi
4654
4655
4656 test -n "$FILE" && break
4657 done
4658
4659
4660 if test "x$FILE" = x; then
4661 if test "xfile" = x; then
4662 PROG_NAME=file
4663 else
4664 PROG_NAME=file
4665 fi
4666 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4667 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4668 as_fn_error $? "Cannot continue" "$LINENO" 5
4669 fi
4670
4671
4672
4673 for ac_prog in find
4674 do
4675 # Extract the first word of "$ac_prog", so it can be a program name with args.
4676 set dummy $ac_prog; ac_word=$2
4677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4678 $as_echo_n "checking for $ac_word... " >&6; }
4679 if ${ac_cv_path_FIND+:} false; then :
4680 $as_echo_n "(cached) " >&6
4681 else
4682 case $FIND in
4683 [\\/]* | ?:[\\/]*)
4684 ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4685 ;;
4686 *)
4687 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4688 for as_dir in $PATH
4689 do
4690 IFS=$as_save_IFS
4691 test -z "$as_dir" && as_dir=.
4692 for ac_exec_ext in '' $ac_executable_extensions; do
4693 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4694 ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4695 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4696 break 2
4697 fi
4698 done
4699 done
4700 IFS=$as_save_IFS
4701
4702 ;;
4703 esac
4704 fi
4705 FIND=$ac_cv_path_FIND
4706 if test -n "$FIND"; then
4707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4708 $as_echo "$FIND" >&6; }
4709 else
4710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4711 $as_echo "no" >&6; }
4712 fi
4713
4714
4715 test -n "$FIND" && break
4716 done
4717
4718
4719 if test "x$FIND" = x; then
4720 if test "xfind" = x; then
4721 PROG_NAME=find
4722 else
4723 PROG_NAME=find
4724 fi
4725 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4726 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4727 as_fn_error $? "Cannot continue" "$LINENO" 5
4728 fi
4729
4730
4731
4732 for ac_prog in head
4733 do
4734 # Extract the first word of "$ac_prog", so it can be a program name with args.
4735 set dummy $ac_prog; ac_word=$2
4736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4737 $as_echo_n "checking for $ac_word... " >&6; }
4738 if ${ac_cv_path_HEAD+:} false; then :
4739 $as_echo_n "(cached) " >&6
4740 else
4741 case $HEAD in
4742 [\\/]* | ?:[\\/]*)
4743 ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4744 ;;
4745 *)
4746 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4747 for as_dir in $PATH
4748 do
4749 IFS=$as_save_IFS
4750 test -z "$as_dir" && as_dir=.
4751 for ac_exec_ext in '' $ac_executable_extensions; do
4752 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4753 ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4754 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4755 break 2
4756 fi
4757 done
4758 done
4759 IFS=$as_save_IFS
4760
4761 ;;
4762 esac
4763 fi
4764 HEAD=$ac_cv_path_HEAD
4765 if test -n "$HEAD"; then
4766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4767 $as_echo "$HEAD" >&6; }
4768 else
4769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4770 $as_echo "no" >&6; }
4771 fi
4772
4773
4774 test -n "$HEAD" && break
4775 done
4776
4777
4778 if test "x$HEAD" = x; then
4779 if test "xhead" = x; then
4780 PROG_NAME=head
4781 else
4782 PROG_NAME=head
4783 fi
4784 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4785 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4786 as_fn_error $? "Cannot continue" "$LINENO" 5
4787 fi
4788
4789
4790
4791 for ac_prog in ln
4792 do
4793 # Extract the first word of "$ac_prog", so it can be a program name with args.
4794 set dummy $ac_prog; ac_word=$2
4795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4796 $as_echo_n "checking for $ac_word... " >&6; }
4797 if ${ac_cv_path_LN+:} false; then :
4798 $as_echo_n "(cached) " >&6
4799 else
4800 case $LN in
4801 [\\/]* | ?:[\\/]*)
4802 ac_cv_path_LN="$LN" # Let the user override the test with a path.
4803 ;;
4804 *)
4805 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4806 for as_dir in $PATH
4807 do
4808 IFS=$as_save_IFS
4809 test -z "$as_dir" && as_dir=.
4810 for ac_exec_ext in '' $ac_executable_extensions; do
4811 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4812 ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4813 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4814 break 2
4815 fi
4816 done
4817 done
4818 IFS=$as_save_IFS
4819
4820 ;;
4821 esac
4822 fi
4823 LN=$ac_cv_path_LN
4824 if test -n "$LN"; then
4825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4826 $as_echo "$LN" >&6; }
4827 else
4828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4829 $as_echo "no" >&6; }
4830 fi
4831
4832
4833 test -n "$LN" && break
4834 done
4835
4836
4837 if test "x$LN" = x; then
4838 if test "xln" = x; then
4839 PROG_NAME=ln
4840 else
4841 PROG_NAME=ln
4842 fi
4843 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4844 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4845 as_fn_error $? "Cannot continue" "$LINENO" 5
4846 fi
4847
4848
4849
4850 for ac_prog in ls
4851 do
4852 # Extract the first word of "$ac_prog", so it can be a program name with args.
4853 set dummy $ac_prog; ac_word=$2
4854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4855 $as_echo_n "checking for $ac_word... " >&6; }
4856 if ${ac_cv_path_LS+:} false; then :
4857 $as_echo_n "(cached) " >&6
4858 else
4859 case $LS in
4860 [\\/]* | ?:[\\/]*)
4861 ac_cv_path_LS="$LS" # Let the user override the test with a path.
4862 ;;
4863 *)
4864 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4865 for as_dir in $PATH
4866 do
4867 IFS=$as_save_IFS
4868 test -z "$as_dir" && as_dir=.
4869 for ac_exec_ext in '' $ac_executable_extensions; do
4870 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4871 ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4872 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4873 break 2
4874 fi
4875 done
4876 done
4877 IFS=$as_save_IFS
4878
4879 ;;
4880 esac
4881 fi
4882 LS=$ac_cv_path_LS
4883 if test -n "$LS"; then
4884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4885 $as_echo "$LS" >&6; }
4886 else
4887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4888 $as_echo "no" >&6; }
4889 fi
4890
4891
4892 test -n "$LS" && break
4893 done
4894
4895
4896 if test "x$LS" = x; then
4897 if test "xls" = x; then
4898 PROG_NAME=ls
4899 else
4900 PROG_NAME=ls
4901 fi
4902 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4903 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4904 as_fn_error $? "Cannot continue" "$LINENO" 5
4905 fi
4906
4907
4908
4909 for ac_prog in mkdir
4910 do
4911 # Extract the first word of "$ac_prog", so it can be a program name with args.
4912 set dummy $ac_prog; ac_word=$2
4913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4914 $as_echo_n "checking for $ac_word... " >&6; }
4915 if ${ac_cv_path_MKDIR+:} false; then :
4916 $as_echo_n "(cached) " >&6
4917 else
4918 case $MKDIR in
4919 [\\/]* | ?:[\\/]*)
4920 ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4921 ;;
4922 *)
4923 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4924 for as_dir in $PATH
4925 do
4926 IFS=$as_save_IFS
4927 test -z "$as_dir" && as_dir=.
4928 for ac_exec_ext in '' $ac_executable_extensions; do
4929 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4930 ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4931 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4932 break 2
4933 fi
4934 done
4935 done
4936 IFS=$as_save_IFS
4937
4938 ;;
4939 esac
4940 fi
4941 MKDIR=$ac_cv_path_MKDIR
4942 if test -n "$MKDIR"; then
4943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4944 $as_echo "$MKDIR" >&6; }
4945 else
4946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4947 $as_echo "no" >&6; }
4948 fi
4949
4950
4951 test -n "$MKDIR" && break
4952 done
4953
4954
4955 if test "x$MKDIR" = x; then
4956 if test "xmkdir" = x; then
4957 PROG_NAME=mkdir
4958 else
4959 PROG_NAME=mkdir
4960 fi
4961 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4962 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4963 as_fn_error $? "Cannot continue" "$LINENO" 5
4964 fi
4965
4966
4967
4968 for ac_prog in mktemp
4969 do
4970 # Extract the first word of "$ac_prog", so it can be a program name with args.
4971 set dummy $ac_prog; ac_word=$2
4972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4973 $as_echo_n "checking for $ac_word... " >&6; }
4974 if ${ac_cv_path_MKTEMP+:} false; then :
4975 $as_echo_n "(cached) " >&6
4976 else
4977 case $MKTEMP in
4978 [\\/]* | ?:[\\/]*)
4979 ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
4980 ;;
4981 *)
4982 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4983 for as_dir in $PATH
4984 do
4985 IFS=$as_save_IFS
4986 test -z "$as_dir" && as_dir=.
4987 for ac_exec_ext in '' $ac_executable_extensions; do
4988 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4989 ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
4990 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4991 break 2
4992 fi
4993 done
4994 done
4995 IFS=$as_save_IFS
4996
4997 ;;
4998 esac
4999 fi
5000 MKTEMP=$ac_cv_path_MKTEMP
5001 if test -n "$MKTEMP"; then
5002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5003 $as_echo "$MKTEMP" >&6; }
5004 else
5005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5006 $as_echo "no" >&6; }
5007 fi
5008
5009
5010 test -n "$MKTEMP" && break
5011 done
5012
5013
5014 if test "x$MKTEMP" = x; then
5015 if test "xmktemp" = x; then
5016 PROG_NAME=mktemp
5017 else
5018 PROG_NAME=mktemp
5019 fi
5020 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5021 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5022 as_fn_error $? "Cannot continue" "$LINENO" 5
5023 fi
5024
5025
5026
5027 for ac_prog in mv
5028 do
5029 # Extract the first word of "$ac_prog", so it can be a program name with args.
5030 set dummy $ac_prog; ac_word=$2
5031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5032 $as_echo_n "checking for $ac_word... " >&6; }
5033 if ${ac_cv_path_MV+:} false; then :
5034 $as_echo_n "(cached) " >&6
5035 else
5036 case $MV in
5037 [\\/]* | ?:[\\/]*)
5038 ac_cv_path_MV="$MV" # Let the user override the test with a path.
5039 ;;
5040 *)
5041 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5042 for as_dir in $PATH
5043 do
5044 IFS=$as_save_IFS
5045 test -z "$as_dir" && as_dir=.
5046 for ac_exec_ext in '' $ac_executable_extensions; do
5047 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5048 ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5049 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5050 break 2
5051 fi
5052 done
5053 done
5054 IFS=$as_save_IFS
5055
5056 ;;
5057 esac
5058 fi
5059 MV=$ac_cv_path_MV
5060 if test -n "$MV"; then
5061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5062 $as_echo "$MV" >&6; }
5063 else
5064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5065 $as_echo "no" >&6; }
5066 fi
5067
5068
5069 test -n "$MV" && break
5070 done
5071
5072
5073 if test "x$MV" = x; then
5074 if test "xmv" = x; then
5075 PROG_NAME=mv
5076 else
5077 PROG_NAME=mv
5078 fi
5079 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5080 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5081 as_fn_error $? "Cannot continue" "$LINENO" 5
5082 fi
5083
5084
5085
5086 for ac_prog in printf
5087 do
5088 # Extract the first word of "$ac_prog", so it can be a program name with args.
5089 set dummy $ac_prog; ac_word=$2
5090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5091 $as_echo_n "checking for $ac_word... " >&6; }
5092 if ${ac_cv_path_PRINTF+:} false; then :
5093 $as_echo_n "(cached) " >&6
5094 else
5095 case $PRINTF in
5096 [\\/]* | ?:[\\/]*)
5097 ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5098 ;;
5099 *)
5100 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5101 for as_dir in $PATH
5102 do
5103 IFS=$as_save_IFS
5104 test -z "$as_dir" && as_dir=.
5105 for ac_exec_ext in '' $ac_executable_extensions; do
5106 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5107 ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5108 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5109 break 2
5110 fi
5111 done
5112 done
5113 IFS=$as_save_IFS
5114
5115 ;;
5116 esac
5117 fi
5118 PRINTF=$ac_cv_path_PRINTF
5119 if test -n "$PRINTF"; then
5120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5121 $as_echo "$PRINTF" >&6; }
5122 else
5123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5124 $as_echo "no" >&6; }
5125 fi
5126
5127
5128 test -n "$PRINTF" && break
5129 done
5130
5131
5132 if test "x$PRINTF" = x; then
5133 if test "xprintf" = x; then
5134 PROG_NAME=printf
5135 else
5136 PROG_NAME=printf
5137 fi
5138 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5139 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5140 as_fn_error $? "Cannot continue" "$LINENO" 5
5141 fi
5142
5143
5144
5145 for ac_prog in pwd
5146 do
5147 # Extract the first word of "$ac_prog", so it can be a program name with args.
5148 set dummy $ac_prog; ac_word=$2
5149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5150 $as_echo_n "checking for $ac_word... " >&6; }
5151 if ${ac_cv_path_THEPWDCMD+:} false; then :
5152 $as_echo_n "(cached) " >&6
5153 else
5154 case $THEPWDCMD in
5155 [\\/]* | ?:[\\/]*)
5156 ac_cv_path_THEPWDCMD="$THEPWDCMD" # Let the user override the test with a path.
5157 ;;
5158 *)
5159 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5160 for as_dir in $PATH
5161 do
5162 IFS=$as_save_IFS
5163 test -z "$as_dir" && as_dir=.
5164 for ac_exec_ext in '' $ac_executable_extensions; do
5165 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5166 ac_cv_path_THEPWDCMD="$as_dir/$ac_word$ac_exec_ext"
5167 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5168 break 2
5169 fi
5170 done
5171 done
5172 IFS=$as_save_IFS
5173
5174 ;;
5175 esac
5176 fi
5177 THEPWDCMD=$ac_cv_path_THEPWDCMD
5178 if test -n "$THEPWDCMD"; then
5179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $THEPWDCMD" >&5
5180 $as_echo "$THEPWDCMD" >&6; }
5181 else
5182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5183 $as_echo "no" >&6; }
5184 fi
5185
5186
5187 test -n "$THEPWDCMD" && break
5188 done
5189
5190
5191 if test "x$THEPWDCMD" = x; then
5192 if test "xpwd" = x; then
5193 PROG_NAME=thepwdcmd
5194 else
5195 PROG_NAME=pwd
5196 fi
5197 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5198 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5199 as_fn_error $? "Cannot continue" "$LINENO" 5
5200 fi
5201
5202
5203
5204 for ac_prog in rm
5205 do
5206 # Extract the first word of "$ac_prog", so it can be a program name with args.
5207 set dummy $ac_prog; ac_word=$2
5208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5209 $as_echo_n "checking for $ac_word... " >&6; }
5210 if ${ac_cv_path_RM+:} false; then :
5211 $as_echo_n "(cached) " >&6
5212 else
5213 case $RM in
5214 [\\/]* | ?:[\\/]*)
5215 ac_cv_path_RM="$RM" # Let the user override the test with a path.
5216 ;;
5217 *)
5218 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5219 for as_dir in $PATH
5220 do
5221 IFS=$as_save_IFS
5222 test -z "$as_dir" && as_dir=.
5223 for ac_exec_ext in '' $ac_executable_extensions; do
5224 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5225 ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5226 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5227 break 2
5228 fi
5229 done
5230 done
5231 IFS=$as_save_IFS
5232
5233 ;;
5234 esac
5235 fi
5236 RM=$ac_cv_path_RM
5237 if test -n "$RM"; then
5238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5239 $as_echo "$RM" >&6; }
5240 else
5241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5242 $as_echo "no" >&6; }
5243 fi
5244
5245
5246 test -n "$RM" && break
5247 done
5248
5249
5250 if test "x$RM" = x; then
5251 if test "xrm" = x; then
5252 PROG_NAME=rm
5253 else
5254 PROG_NAME=rm
5255 fi
5256 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5257 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5258 as_fn_error $? "Cannot continue" "$LINENO" 5
5259 fi
5260
5261
5262
5263 for ac_prog in sh
5264 do
5265 # Extract the first word of "$ac_prog", so it can be a program name with args.
5266 set dummy $ac_prog; ac_word=$2
5267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5268 $as_echo_n "checking for $ac_word... " >&6; }
5269 if ${ac_cv_path_SH+:} false; then :
5270 $as_echo_n "(cached) " >&6
5271 else
5272 case $SH in
5273 [\\/]* | ?:[\\/]*)
5274 ac_cv_path_SH="$SH" # Let the user override the test with a path.
5275 ;;
5276 *)
5277 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5278 for as_dir in $PATH
5279 do
5280 IFS=$as_save_IFS
5281 test -z "$as_dir" && as_dir=.
5282 for ac_exec_ext in '' $ac_executable_extensions; do
5283 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5284 ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5285 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5286 break 2
5287 fi
5288 done
5289 done
5290 IFS=$as_save_IFS
5291
5292 ;;
5293 esac
5294 fi
5295 SH=$ac_cv_path_SH
5296 if test -n "$SH"; then
5297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5298 $as_echo "$SH" >&6; }
5299 else
5300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5301 $as_echo "no" >&6; }
5302 fi
5303
5304
5305 test -n "$SH" && break
5306 done
5307
5308
5309 if test "x$SH" = x; then
5310 if test "xsh" = x; then
5311 PROG_NAME=sh
5312 else
5313 PROG_NAME=sh
5314 fi
5315 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5316 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5317 as_fn_error $? "Cannot continue" "$LINENO" 5
5318 fi
5319
5320
5321
5322 for ac_prog in sort
5323 do
5324 # Extract the first word of "$ac_prog", so it can be a program name with args.
5325 set dummy $ac_prog; ac_word=$2
5326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5327 $as_echo_n "checking for $ac_word... " >&6; }
5328 if ${ac_cv_path_SORT+:} false; then :
5329 $as_echo_n "(cached) " >&6
5330 else
5331 case $SORT in
5332 [\\/]* | ?:[\\/]*)
5333 ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5334 ;;
5335 *)
5336 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5337 for as_dir in $PATH
5338 do
5339 IFS=$as_save_IFS
5340 test -z "$as_dir" && as_dir=.
5341 for ac_exec_ext in '' $ac_executable_extensions; do
5342 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5343 ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5344 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5345 break 2
5346 fi
5347 done
5348 done
5349 IFS=$as_save_IFS
5350
5351 ;;
5352 esac
5353 fi
5354 SORT=$ac_cv_path_SORT
5355 if test -n "$SORT"; then
5356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5357 $as_echo "$SORT" >&6; }
5358 else
5359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5360 $as_echo "no" >&6; }
5361 fi
5362
5363
5364 test -n "$SORT" && break
5365 done
5366
5367
5368 if test "x$SORT" = x; then
5369 if test "xsort" = x; then
5370 PROG_NAME=sort
5371 else
5372 PROG_NAME=sort
5373 fi
5374 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5375 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5376 as_fn_error $? "Cannot continue" "$LINENO" 5
5377 fi
5378
5379
5380
5381 for ac_prog in tail
5382 do
5383 # Extract the first word of "$ac_prog", so it can be a program name with args.
5384 set dummy $ac_prog; ac_word=$2
5385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5386 $as_echo_n "checking for $ac_word... " >&6; }
5387 if ${ac_cv_path_TAIL+:} false; then :
5388 $as_echo_n "(cached) " >&6
5389 else
5390 case $TAIL in
5391 [\\/]* | ?:[\\/]*)
5392 ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5393 ;;
5394 *)
5395 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5396 for as_dir in $PATH
5397 do
5398 IFS=$as_save_IFS
5399 test -z "$as_dir" && as_dir=.
5400 for ac_exec_ext in '' $ac_executable_extensions; do
5401 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5402 ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5403 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5404 break 2
5405 fi
5406 done
5407 done
5408 IFS=$as_save_IFS
5409
5410 ;;
5411 esac
5412 fi
5413 TAIL=$ac_cv_path_TAIL
5414 if test -n "$TAIL"; then
5415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5416 $as_echo "$TAIL" >&6; }
5417 else
5418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5419 $as_echo "no" >&6; }
5420 fi
5421
5422
5423 test -n "$TAIL" && break
5424 done
5425
5426
5427 if test "x$TAIL" = x; then
5428 if test "xtail" = x; then
5429 PROG_NAME=tail
5430 else
5431 PROG_NAME=tail
5432 fi
5433 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5434 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5435 as_fn_error $? "Cannot continue" "$LINENO" 5
5436 fi
5437
5438
5439
5440 for ac_prog in tar
5441 do
5442 # Extract the first word of "$ac_prog", so it can be a program name with args.
5443 set dummy $ac_prog; ac_word=$2
5444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5445 $as_echo_n "checking for $ac_word... " >&6; }
5446 if ${ac_cv_path_TAR+:} false; then :
5447 $as_echo_n "(cached) " >&6
5448 else
5449 case $TAR in
5450 [\\/]* | ?:[\\/]*)
5451 ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5452 ;;
5453 *)
5454 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5455 for as_dir in $PATH
5456 do
5457 IFS=$as_save_IFS
5458 test -z "$as_dir" && as_dir=.
5459 for ac_exec_ext in '' $ac_executable_extensions; do
5460 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5461 ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5462 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5463 break 2
5464 fi
5465 done
5466 done
5467 IFS=$as_save_IFS
5468
5469 ;;
5470 esac
5471 fi
5472 TAR=$ac_cv_path_TAR
5473 if test -n "$TAR"; then
5474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5475 $as_echo "$TAR" >&6; }
5476 else
5477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5478 $as_echo "no" >&6; }
5479 fi
5480
5481
5482 test -n "$TAR" && break
5483 done
5484
5485
5486 if test "x$TAR" = x; then
5487 if test "xtar" = x; then
5488 PROG_NAME=tar
5489 else
5490 PROG_NAME=tar
5491 fi
5492 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5493 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5494 as_fn_error $? "Cannot continue" "$LINENO" 5
5495 fi
5496
5497
5498
5499 for ac_prog in tee
5500 do
5501 # Extract the first word of "$ac_prog", so it can be a program name with args.
5502 set dummy $ac_prog; ac_word=$2
5503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5504 $as_echo_n "checking for $ac_word... " >&6; }
5505 if ${ac_cv_path_TEE+:} false; then :
5506 $as_echo_n "(cached) " >&6
5507 else
5508 case $TEE in
5509 [\\/]* | ?:[\\/]*)
5510 ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5511 ;;
5512 *)
5513 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5514 for as_dir in $PATH
5515 do
5516 IFS=$as_save_IFS
5517 test -z "$as_dir" && as_dir=.
5518 for ac_exec_ext in '' $ac_executable_extensions; do
5519 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5520 ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5521 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5522 break 2
5523 fi
5524 done
5525 done
5526 IFS=$as_save_IFS
5527
5528 ;;
5529 esac
5530 fi
5531 TEE=$ac_cv_path_TEE
5532 if test -n "$TEE"; then
5533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5534 $as_echo "$TEE" >&6; }
5535 else
5536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5537 $as_echo "no" >&6; }
5538 fi
5539
5540
5541 test -n "$TEE" && break
5542 done
5543
5544
5545 if test "x$TEE" = x; then
5546 if test "xtee" = x; then
5547 PROG_NAME=tee
5548 else
5549 PROG_NAME=tee
5550 fi
5551 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5552 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5553 as_fn_error $? "Cannot continue" "$LINENO" 5
5554 fi
5555
5556
5557
5558 for ac_prog in touch
5559 do
5560 # Extract the first word of "$ac_prog", so it can be a program name with args.
5561 set dummy $ac_prog; ac_word=$2
5562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5563 $as_echo_n "checking for $ac_word... " >&6; }
5564 if ${ac_cv_path_TOUCH+:} false; then :
5565 $as_echo_n "(cached) " >&6
5566 else
5567 case $TOUCH in
5568 [\\/]* | ?:[\\/]*)
5569 ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5570 ;;
5571 *)
5572 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5573 for as_dir in $PATH
5574 do
5575 IFS=$as_save_IFS
5576 test -z "$as_dir" && as_dir=.
5577 for ac_exec_ext in '' $ac_executable_extensions; do
5578 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5579 ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5580 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5581 break 2
5582 fi
5583 done
5584 done
5585 IFS=$as_save_IFS
5586
5587 ;;
5588 esac
5589 fi
5590 TOUCH=$ac_cv_path_TOUCH
5591 if test -n "$TOUCH"; then
5592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5593 $as_echo "$TOUCH" >&6; }
5594 else
5595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5596 $as_echo "no" >&6; }
5597 fi
5598
5599
5600 test -n "$TOUCH" && break
5601 done
5602
5603
5604 if test "x$TOUCH" = x; then
5605 if test "xtouch" = x; then
5606 PROG_NAME=touch
5607 else
5608 PROG_NAME=touch
5609 fi
5610 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5611 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5612 as_fn_error $? "Cannot continue" "$LINENO" 5
5613 fi
5614
5615
5616
5617 for ac_prog in tr
5618 do
5619 # Extract the first word of "$ac_prog", so it can be a program name with args.
5620 set dummy $ac_prog; ac_word=$2
5621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5622 $as_echo_n "checking for $ac_word... " >&6; }
5623 if ${ac_cv_path_TR+:} false; then :
5624 $as_echo_n "(cached) " >&6
5625 else
5626 case $TR in
5627 [\\/]* | ?:[\\/]*)
5628 ac_cv_path_TR="$TR" # Let the user override the test with a path.
5629 ;;
5630 *)
5631 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5632 for as_dir in $PATH
5633 do
5634 IFS=$as_save_IFS
5635 test -z "$as_dir" && as_dir=.
5636 for ac_exec_ext in '' $ac_executable_extensions; do
5637 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5638 ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5639 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5640 break 2
5641 fi
5642 done
5643 done
5644 IFS=$as_save_IFS
5645
5646 ;;
5647 esac
5648 fi
5649 TR=$ac_cv_path_TR
5650 if test -n "$TR"; then
5651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5652 $as_echo "$TR" >&6; }
5653 else
5654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5655 $as_echo "no" >&6; }
5656 fi
5657
5658
5659 test -n "$TR" && break
5660 done
5661
5662
5663 if test "x$TR" = x; then
5664 if test "xtr" = x; then
5665 PROG_NAME=tr
5666 else
5667 PROG_NAME=tr
5668 fi
5669 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5670 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5671 as_fn_error $? "Cannot continue" "$LINENO" 5
5672 fi
5673
5674
5675
5676 for ac_prog in uname
5677 do
5678 # Extract the first word of "$ac_prog", so it can be a program name with args.
5679 set dummy $ac_prog; ac_word=$2
5680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5681 $as_echo_n "checking for $ac_word... " >&6; }
5682 if ${ac_cv_path_UNAME+:} false; then :
5683 $as_echo_n "(cached) " >&6
5684 else
5685 case $UNAME in
5686 [\\/]* | ?:[\\/]*)
5687 ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5688 ;;
5689 *)
5690 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5691 for as_dir in $PATH
5692 do
5693 IFS=$as_save_IFS
5694 test -z "$as_dir" && as_dir=.
5695 for ac_exec_ext in '' $ac_executable_extensions; do
5696 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5697 ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5698 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5699 break 2
5700 fi
5701 done
5702 done
5703 IFS=$as_save_IFS
5704
5705 ;;
5706 esac
5707 fi
5708 UNAME=$ac_cv_path_UNAME
5709 if test -n "$UNAME"; then
5710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5711 $as_echo "$UNAME" >&6; }
5712 else
5713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5714 $as_echo "no" >&6; }
5715 fi
5716
5717
5718 test -n "$UNAME" && break
5719 done
5720
5721
5722 if test "x$UNAME" = x; then
5723 if test "xuname" = x; then
5724 PROG_NAME=uname
5725 else
5726 PROG_NAME=uname
5727 fi
5728 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5729 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5730 as_fn_error $? "Cannot continue" "$LINENO" 5
5731 fi
5732
5733
5734
5735 for ac_prog in uniq
5736 do
5737 # Extract the first word of "$ac_prog", so it can be a program name with args.
5738 set dummy $ac_prog; ac_word=$2
5739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5740 $as_echo_n "checking for $ac_word... " >&6; }
5741 if ${ac_cv_path_UNIQ+:} false; then :
5742 $as_echo_n "(cached) " >&6
5743 else
5744 case $UNIQ in
5745 [\\/]* | ?:[\\/]*)
5746 ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5747 ;;
5748 *)
5749 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5750 for as_dir in $PATH
5751 do
5752 IFS=$as_save_IFS
5753 test -z "$as_dir" && as_dir=.
5754 for ac_exec_ext in '' $ac_executable_extensions; do
5755 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5756 ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5757 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5758 break 2
5759 fi
5760 done
5761 done
5762 IFS=$as_save_IFS
5763
5764 ;;
5765 esac
5766 fi
5767 UNIQ=$ac_cv_path_UNIQ
5768 if test -n "$UNIQ"; then
5769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5770 $as_echo "$UNIQ" >&6; }
5771 else
5772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5773 $as_echo "no" >&6; }
5774 fi
5775
5776
5777 test -n "$UNIQ" && break
5778 done
5779
5780
5781 if test "x$UNIQ" = x; then
5782 if test "xuniq" = x; then
5783 PROG_NAME=uniq
5784 else
5785 PROG_NAME=uniq
5786 fi
5787 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5788 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5789 as_fn_error $? "Cannot continue" "$LINENO" 5
5790 fi
5791
5792
5793
5794 for ac_prog in wc
5795 do
5796 # Extract the first word of "$ac_prog", so it can be a program name with args.
5797 set dummy $ac_prog; ac_word=$2
5798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5799 $as_echo_n "checking for $ac_word... " >&6; }
5800 if ${ac_cv_path_WC+:} false; then :
5801 $as_echo_n "(cached) " >&6
5802 else
5803 case $WC in
5804 [\\/]* | ?:[\\/]*)
5805 ac_cv_path_WC="$WC" # Let the user override the test with a path.
5806 ;;
5807 *)
5808 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5809 for as_dir in $PATH
5810 do
5811 IFS=$as_save_IFS
5812 test -z "$as_dir" && as_dir=.
5813 for ac_exec_ext in '' $ac_executable_extensions; do
5814 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5815 ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5816 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5817 break 2
5818 fi
5819 done
5820 done
5821 IFS=$as_save_IFS
5822
5823 ;;
5824 esac
5825 fi
5826 WC=$ac_cv_path_WC
5827 if test -n "$WC"; then
5828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5829 $as_echo "$WC" >&6; }
5830 else
5831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5832 $as_echo "no" >&6; }
5833 fi
5834
5835
5836 test -n "$WC" && break
5837 done
5838
5839
5840 if test "x$WC" = x; then
5841 if test "xwc" = x; then
5842 PROG_NAME=wc
5843 else
5844 PROG_NAME=wc
5845 fi
5846 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5847 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5848 as_fn_error $? "Cannot continue" "$LINENO" 5
5849 fi
5850
5851
5852
5853 for ac_prog in which
5854 do
5855 # Extract the first word of "$ac_prog", so it can be a program name with args.
5856 set dummy $ac_prog; ac_word=$2
5857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5858 $as_echo_n "checking for $ac_word... " >&6; }
5859 if ${ac_cv_path_WHICH+:} false; then :
5860 $as_echo_n "(cached) " >&6
5861 else
5862 case $WHICH in
5863 [\\/]* | ?:[\\/]*)
5864 ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5865 ;;
5866 *)
5867 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5868 for as_dir in $PATH
5869 do
5870 IFS=$as_save_IFS
5871 test -z "$as_dir" && as_dir=.
5872 for ac_exec_ext in '' $ac_executable_extensions; do
5873 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5874 ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5875 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5876 break 2
5877 fi
5878 done
5879 done
5880 IFS=$as_save_IFS
5881
5882 ;;
5883 esac
5884 fi
5885 WHICH=$ac_cv_path_WHICH
5886 if test -n "$WHICH"; then
5887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5888 $as_echo "$WHICH" >&6; }
5889 else
5890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5891 $as_echo "no" >&6; }
5892 fi
5893
5894
5895 test -n "$WHICH" && break
5896 done
5897
5898
5899 if test "x$WHICH" = x; then
5900 if test "xwhich" = x; then
5901 PROG_NAME=which
5902 else
5903 PROG_NAME=which
5904 fi
5905 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5906 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5907 as_fn_error $? "Cannot continue" "$LINENO" 5
5908 fi
5909
5910
5911
5912 for ac_prog in xargs
5913 do
5914 # Extract the first word of "$ac_prog", so it can be a program name with args.
5915 set dummy $ac_prog; ac_word=$2
5916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5917 $as_echo_n "checking for $ac_word... " >&6; }
5918 if ${ac_cv_path_XARGS+:} false; then :
5919 $as_echo_n "(cached) " >&6
5920 else
5921 case $XARGS in
5922 [\\/]* | ?:[\\/]*)
5923 ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5924 ;;
5925 *)
5926 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5927 for as_dir in $PATH
5928 do
5929 IFS=$as_save_IFS
5930 test -z "$as_dir" && as_dir=.
5931 for ac_exec_ext in '' $ac_executable_extensions; do
5932 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5933 ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5934 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5935 break 2
5936 fi
5937 done
5938 done
5939 IFS=$as_save_IFS
5940
5941 ;;
5942 esac
5943 fi
5944 XARGS=$ac_cv_path_XARGS
5945 if test -n "$XARGS"; then
5946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5947 $as_echo "$XARGS" >&6; }
5948 else
5949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5950 $as_echo "no" >&6; }
5951 fi
5952
5953
5954 test -n "$XARGS" && break
5955 done
5956
5957
5958 if test "x$XARGS" = x; then
5959 if test "xxargs" = x; then
5960 PROG_NAME=xargs
5961 else
5962 PROG_NAME=xargs
5963 fi
5964 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5965 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5966 as_fn_error $? "Cannot continue" "$LINENO" 5
5967 fi
5968
5969
5970
5971 # Then required tools that require some special treatment.
5972 for ac_prog in gawk mawk nawk awk
5973 do
5974 # Extract the first word of "$ac_prog", so it can be a program name with args.
5975 set dummy $ac_prog; ac_word=$2
5976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5977 $as_echo_n "checking for $ac_word... " >&6; }
5978 if ${ac_cv_prog_AWK+:} false; then :
5979 $as_echo_n "(cached) " >&6
5980 else
5981 if test -n "$AWK"; then
5982 ac_cv_prog_AWK="$AWK" # Let the user override the test.
5983 else
5984 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5985 for as_dir in $PATH
5986 do
5987 IFS=$as_save_IFS
5988 test -z "$as_dir" && as_dir=.
5989 for ac_exec_ext in '' $ac_executable_extensions; do
5990 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5991 ac_cv_prog_AWK="$ac_prog"
5992 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5993 break 2
5994 fi
5995 done
5996 done
5997 IFS=$as_save_IFS
5998
5999 fi
6000 fi
6001 AWK=$ac_cv_prog_AWK
6002 if test -n "$AWK"; then
6003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6004 $as_echo "$AWK" >&6; }
6005 else
6006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6007 $as_echo "no" >&6; }
6008 fi
6009
6010
6011 test -n "$AWK" && break
6012 done
6013
6014
6015 if test "x$AWK" = x; then
6016 if test "x" = x; then
6017 PROG_NAME=awk
6018 else
6019 PROG_NAME=
6020 fi
6021 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6022 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6023 as_fn_error $? "Cannot continue" "$LINENO" 5
6024 fi
6025
6026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6027 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6028 if ${ac_cv_path_GREP+:} false; then :
6029 $as_echo_n "(cached) " >&6
6030 else
6031 if test -z "$GREP"; then
6032 ac_path_GREP_found=false
6033 # Loop through the user's path and test for each of PROGNAME-LIST
6034 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6035 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6036 do
6037 IFS=$as_save_IFS
6038 test -z "$as_dir" && as_dir=.
6039 for ac_prog in grep ggrep; do
6040 for ac_exec_ext in '' $ac_executable_extensions; do
6041 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6042 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6043 # Check for GNU ac_path_GREP and select it if it is found.
6044 # Check for GNU $ac_path_GREP
6045 case `"$ac_path_GREP" --version 2>&1` in
6046 *GNU*)
6047 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6048 *)
6049 ac_count=0
6050 $as_echo_n 0123456789 >"conftest.in"
6051 while :
6052 do
6053 cat "conftest.in" "conftest.in" >"conftest.tmp"
6054 mv "conftest.tmp" "conftest.in"
6055 cp "conftest.in" "conftest.nl"
6056 $as_echo 'GREP' >> "conftest.nl"
6057 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6058 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6059 as_fn_arith $ac_count + 1 && ac_count=$as_val
6060 if test $ac_count -gt ${ac_path_GREP_max-0}; then
6061 # Best one so far, save it but keep looking for a better one
6062 ac_cv_path_GREP="$ac_path_GREP"
6063 ac_path_GREP_max=$ac_count
6064 fi
6065 # 10*(2^10) chars as input seems more than enough
6066 test $ac_count -gt 10 && break
6067 done
6068 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6069 esac
6070
6071 $ac_path_GREP_found && break 3
6072 done
6073 done
6074 done
6075 IFS=$as_save_IFS
6076 if test -z "$ac_cv_path_GREP"; then
6077 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6078 fi
6079 else
6080 ac_cv_path_GREP=$GREP
6081 fi
6082
6083 fi
6084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6085 $as_echo "$ac_cv_path_GREP" >&6; }
6086 GREP="$ac_cv_path_GREP"
6087
6088
6089
6090 if test "x$GREP" = x; then
6091 if test "x" = x; then
6092 PROG_NAME=grep
6093 else
6094 PROG_NAME=
6095 fi
6096 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6097 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6098 as_fn_error $? "Cannot continue" "$LINENO" 5
6099 fi
6100
6101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6102 $as_echo_n "checking for egrep... " >&6; }
6103 if ${ac_cv_path_EGREP+:} false; then :
6104 $as_echo_n "(cached) " >&6
6105 else
6106 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6107 then ac_cv_path_EGREP="$GREP -E"
6108 else
6109 if test -z "$EGREP"; then
6110 ac_path_EGREP_found=false
6111 # Loop through the user's path and test for each of PROGNAME-LIST
6112 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6113 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6114 do
6115 IFS=$as_save_IFS
6116 test -z "$as_dir" && as_dir=.
6117 for ac_prog in egrep; do
6118 for ac_exec_ext in '' $ac_executable_extensions; do
6119 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6120 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6121 # Check for GNU ac_path_EGREP and select it if it is found.
6122 # Check for GNU $ac_path_EGREP
6123 case `"$ac_path_EGREP" --version 2>&1` in
6124 *GNU*)
6125 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6126 *)
6127 ac_count=0
6128 $as_echo_n 0123456789 >"conftest.in"
6129 while :
6130 do
6131 cat "conftest.in" "conftest.in" >"conftest.tmp"
6132 mv "conftest.tmp" "conftest.in"
6133 cp "conftest.in" "conftest.nl"
6134 $as_echo 'EGREP' >> "conftest.nl"
6135 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6136 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6137 as_fn_arith $ac_count + 1 && ac_count=$as_val
6138 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6139 # Best one so far, save it but keep looking for a better one
6140 ac_cv_path_EGREP="$ac_path_EGREP"
6141 ac_path_EGREP_max=$ac_count
6142 fi
6143 # 10*(2^10) chars as input seems more than enough
6144 test $ac_count -gt 10 && break
6145 done
6146 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6147 esac
6148
6149 $ac_path_EGREP_found && break 3
6150 done
6151 done
6152 done
6153 IFS=$as_save_IFS
6154 if test -z "$ac_cv_path_EGREP"; then
6155 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6156 fi
6157 else
6158 ac_cv_path_EGREP=$EGREP
6159 fi
6160
6161 fi
6162 fi
6163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6164 $as_echo "$ac_cv_path_EGREP" >&6; }
6165 EGREP="$ac_cv_path_EGREP"
6166
6167
6168
6169 if test "x$EGREP" = x; then
6170 if test "x" = x; then
6171 PROG_NAME=egrep
6172 else
6173 PROG_NAME=
6174 fi
6175 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6176 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6177 as_fn_error $? "Cannot continue" "$LINENO" 5
6178 fi
6179
6180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6181 $as_echo_n "checking for fgrep... " >&6; }
6182 if ${ac_cv_path_FGREP+:} false; then :
6183 $as_echo_n "(cached) " >&6
6184 else
6185 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6186 then ac_cv_path_FGREP="$GREP -F"
6187 else
6188 if test -z "$FGREP"; then
6189 ac_path_FGREP_found=false
6190 # Loop through the user's path and test for each of PROGNAME-LIST
6191 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6192 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6193 do
6194 IFS=$as_save_IFS
6195 test -z "$as_dir" && as_dir=.
6196 for ac_prog in fgrep; do
6197 for ac_exec_ext in '' $ac_executable_extensions; do
6198 ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6199 { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6200 # Check for GNU ac_path_FGREP and select it if it is found.
6201 # Check for GNU $ac_path_FGREP
6202 case `"$ac_path_FGREP" --version 2>&1` in
6203 *GNU*)
6204 ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6205 *)
6206 ac_count=0
6207 $as_echo_n 0123456789 >"conftest.in"
6208 while :
6209 do
6210 cat "conftest.in" "conftest.in" >"conftest.tmp"
6211 mv "conftest.tmp" "conftest.in"
6212 cp "conftest.in" "conftest.nl"
6213 $as_echo 'FGREP' >> "conftest.nl"
6214 "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6215 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6216 as_fn_arith $ac_count + 1 && ac_count=$as_val
6217 if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6218 # Best one so far, save it but keep looking for a better one
6219 ac_cv_path_FGREP="$ac_path_FGREP"
6220 ac_path_FGREP_max=$ac_count
6221 fi
6222 # 10*(2^10) chars as input seems more than enough
6223 test $ac_count -gt 10 && break
6224 done
6225 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6226 esac
6227
6228 $ac_path_FGREP_found && break 3
6229 done
6230 done
6231 done
6232 IFS=$as_save_IFS
6233 if test -z "$ac_cv_path_FGREP"; then
6234 as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6235 fi
6236 else
6237 ac_cv_path_FGREP=$FGREP
6238 fi
6239
6240 fi
6241 fi
6242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6243 $as_echo "$ac_cv_path_FGREP" >&6; }
6244 FGREP="$ac_cv_path_FGREP"
6245
6246
6247
6248 if test "x$FGREP" = x; then
6249 if test "x" = x; then
6250 PROG_NAME=fgrep
6251 else
6252 PROG_NAME=
6253 fi
6254 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6255 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6256 as_fn_error $? "Cannot continue" "$LINENO" 5
6257 fi
6258
6259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6260 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
6261 if ${ac_cv_path_SED+:} false; then :
6262 $as_echo_n "(cached) " >&6
6263 else
6264 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6265 for ac_i in 1 2 3 4 5 6 7; do
6266 ac_script="$ac_script$as_nl$ac_script"
6267 done
6268 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6269 { ac_script=; unset ac_script;}
6270 if test -z "$SED"; then
6271 ac_path_SED_found=false
6272 # Loop through the user's path and test for each of PROGNAME-LIST
6273 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6274 for as_dir in $PATH
6275 do
6276 IFS=$as_save_IFS
6277 test -z "$as_dir" && as_dir=.
6278 for ac_prog in sed gsed; do
6279 for ac_exec_ext in '' $ac_executable_extensions; do
6280 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6281 { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6282 # Check for GNU ac_path_SED and select it if it is found.
6283 # Check for GNU $ac_path_SED
6284 case `"$ac_path_SED" --version 2>&1` in
6285 *GNU*)
6286 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6287 *)
6288 ac_count=0
6289 $as_echo_n 0123456789 >"conftest.in"
6290 while :
6291 do
6292 cat "conftest.in" "conftest.in" >"conftest.tmp"
6293 mv "conftest.tmp" "conftest.in"
6294 cp "conftest.in" "conftest.nl"
6295 $as_echo '' >> "conftest.nl"
6296 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6297 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6298 as_fn_arith $ac_count + 1 && ac_count=$as_val
6299 if test $ac_count -gt ${ac_path_SED_max-0}; then
6300 # Best one so far, save it but keep looking for a better one
6301 ac_cv_path_SED="$ac_path_SED"
6302 ac_path_SED_max=$ac_count
6303 fi
6304 # 10*(2^10) chars as input seems more than enough
6305 test $ac_count -gt 10 && break
6306 done
6307 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6308 esac
6309
6310 $ac_path_SED_found && break 3
6311 done
6312 done
6313 done
6314 IFS=$as_save_IFS
6315 if test -z "$ac_cv_path_SED"; then
6316 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6317 fi
6318 else
6319 ac_cv_path_SED=$SED
6320 fi
6321
6322 fi
6323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6324 $as_echo "$ac_cv_path_SED" >&6; }
6325 SED="$ac_cv_path_SED"
6326 rm -f conftest.sed
6327
6328
6329 if test "x$SED" = x; then
6330 if test "x" = x; then
6331 PROG_NAME=sed
6332 else
6333 PROG_NAME=
6334 fi
6335 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6336 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6337 as_fn_error $? "Cannot continue" "$LINENO" 5
6338 fi
6339
6340
6341 for ac_prog in nawk gawk awk
6342 do
6343 # Extract the first word of "$ac_prog", so it can be a program name with args.
6344 set dummy $ac_prog; ac_word=$2
6345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6346 $as_echo_n "checking for $ac_word... " >&6; }
6347 if ${ac_cv_path_NAWK+:} false; then :
6348 $as_echo_n "(cached) " >&6
6349 else
6350 case $NAWK in
6351 [\\/]* | ?:[\\/]*)
6352 ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6353 ;;
6354 *)
6355 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6356 for as_dir in $PATH
6357 do
6358 IFS=$as_save_IFS
6359 test -z "$as_dir" && as_dir=.
6360 for ac_exec_ext in '' $ac_executable_extensions; do
6361 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6362 ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6363 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6364 break 2
6365 fi
6366 done
6367 done
6368 IFS=$as_save_IFS
6369
6370 ;;
6371 esac
6372 fi
6373 NAWK=$ac_cv_path_NAWK
6374 if test -n "$NAWK"; then
6375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6376 $as_echo "$NAWK" >&6; }
6377 else
6378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6379 $as_echo "no" >&6; }
6380 fi
6381
6382
6383 test -n "$NAWK" && break
6384 done
6385
6386
6387 if test "x$NAWK" = x; then
6388 if test "x" = x; then
6389 PROG_NAME=nawk
6390 else
6391 PROG_NAME=
6392 fi
6393 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6394 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6395 as_fn_error $? "Cannot continue" "$LINENO" 5
6396 fi
6397
6398
6399 # Always force rm.
6400 RM="$RM -f"
6401
6402 # These are not required on all platforms
6403 # Extract the first word of "cygpath", so it can be a program name with args.
6404 set dummy cygpath; ac_word=$2
6405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6406 $as_echo_n "checking for $ac_word... " >&6; }
6407 if ${ac_cv_path_CYGPATH+:} false; then :
6408 $as_echo_n "(cached) " >&6
6409 else
6410 case $CYGPATH in
6411 [\\/]* | ?:[\\/]*)
6412 ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6413 ;;
6414 *)
6415 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6416 for as_dir in $PATH
6417 do
6418 IFS=$as_save_IFS
6419 test -z "$as_dir" && as_dir=.
6420 for ac_exec_ext in '' $ac_executable_extensions; do
6421 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6422 ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6423 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6424 break 2
6425 fi
6426 done
6427 done
6428 IFS=$as_save_IFS
6429
6430 ;;
6431 esac
6432 fi
6433 CYGPATH=$ac_cv_path_CYGPATH
6434 if test -n "$CYGPATH"; then
6435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6436 $as_echo "$CYGPATH" >&6; }
6437 else
6438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6439 $as_echo "no" >&6; }
6440 fi
6441
6442
6443 # Extract the first word of "readlink", so it can be a program name with args.
6444 set dummy readlink; ac_word=$2
6445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6446 $as_echo_n "checking for $ac_word... " >&6; }
6447 if ${ac_cv_path_READLINK+:} false; then :
6448 $as_echo_n "(cached) " >&6
6449 else
6450 case $READLINK in
6451 [\\/]* | ?:[\\/]*)
6452 ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6453 ;;
6454 *)
6455 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6456 for as_dir in $PATH
6457 do
6458 IFS=$as_save_IFS
6459 test -z "$as_dir" && as_dir=.
6460 for ac_exec_ext in '' $ac_executable_extensions; do
6461 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6462 ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6463 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6464 break 2
6465 fi
6466 done
6467 done
6468 IFS=$as_save_IFS
6469
6470 ;;
6471 esac
6472 fi
6473 READLINK=$ac_cv_path_READLINK
6474 if test -n "$READLINK"; then
6475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6476 $as_echo "$READLINK" >&6; }
6477 else
6478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6479 $as_echo "no" >&6; }
6480 fi
6481
6482
6483 # Extract the first word of "df", so it can be a program name with args.
6484 set dummy df; ac_word=$2
6485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6486 $as_echo_n "checking for $ac_word... " >&6; }
6487 if ${ac_cv_path_DF+:} false; then :
6488 $as_echo_n "(cached) " >&6
6489 else
6490 case $DF in
6491 [\\/]* | ?:[\\/]*)
6492 ac_cv_path_DF="$DF" # Let the user override the test with a path.
6493 ;;
6494 *)
6495 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6496 for as_dir in $PATH
6497 do
6498 IFS=$as_save_IFS
6499 test -z "$as_dir" && as_dir=.
6500 for ac_exec_ext in '' $ac_executable_extensions; do
6501 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6502 ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6503 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6504 break 2
6505 fi
6506 done
6507 done
6508 IFS=$as_save_IFS
6509
6510 ;;
6511 esac
6512 fi
6513 DF=$ac_cv_path_DF
6514 if test -n "$DF"; then
6515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6516 $as_echo "$DF" >&6; }
6517 else
6518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6519 $as_echo "no" >&6; }
6520 fi
6521
6522
6523 # Extract the first word of "SetFile", so it can be a program name with args.
6524 set dummy SetFile; ac_word=$2
6525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6526 $as_echo_n "checking for $ac_word... " >&6; }
6527 if ${ac_cv_path_SETFILE+:} false; then :
6528 $as_echo_n "(cached) " >&6
6529 else
6530 case $SETFILE in
6531 [\\/]* | ?:[\\/]*)
6532 ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6533 ;;
6534 *)
6535 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6536 for as_dir in $PATH
6537 do
6538 IFS=$as_save_IFS
6539 test -z "$as_dir" && as_dir=.
6540 for ac_exec_ext in '' $ac_executable_extensions; do
6541 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6542 ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6543 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6544 break 2
6545 fi
6546 done
6547 done
6548 IFS=$as_save_IFS
6549
6550 ;;
6551 esac
6552 fi
6553 SETFILE=$ac_cv_path_SETFILE
6554 if test -n "$SETFILE"; then
6555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6556 $as_echo "$SETFILE" >&6; }
6557 else
6558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6559 $as_echo "no" >&6; }
6560 fi
6561
6562
6563
6564
6565 # Now we can determine OpenJDK build and target platforms. This is required to
6566 # have early on.
6567 # Make sure we can run config.sub.
6568 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6569 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6570
6571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6572 $as_echo_n "checking build system type... " >&6; }
6573 if ${ac_cv_build+:} false; then :
6574 $as_echo_n "(cached) " >&6
6575 else
6576 ac_build_alias=$build_alias
6577 test "x$ac_build_alias" = x &&
6578 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6579 test "x$ac_build_alias" = x &&
6580 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6581 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6582 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6583
6584 fi
6585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6586 $as_echo "$ac_cv_build" >&6; }
6587 case $ac_cv_build in
6588 *-*-*) ;;
6589 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6590 esac
6591 build=$ac_cv_build
6592 ac_save_IFS=$IFS; IFS='-'
6593 set x $ac_cv_build
6594 shift
6595 build_cpu=$1
6596 build_vendor=$2
6597 shift; shift
6598 # Remember, the first character of IFS is used to create $*,
6599 # except with old shells:
6600 build_os=$*
6601 IFS=$ac_save_IFS
6602 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6603
6604
6605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6606 $as_echo_n "checking host system type... " >&6; }
6607 if ${ac_cv_host+:} false; then :
6608 $as_echo_n "(cached) " >&6
6609 else
6610 if test "x$host_alias" = x; then
6611 ac_cv_host=$ac_cv_build
6612 else
6613 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6614 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6615 fi
6616
6617 fi
6618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6619 $as_echo "$ac_cv_host" >&6; }
6620 case $ac_cv_host in
6621 *-*-*) ;;
6622 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6623 esac
6624 host=$ac_cv_host
6625 ac_save_IFS=$IFS; IFS='-'
6626 set x $ac_cv_host
6627 shift
6628 host_cpu=$1
6629 host_vendor=$2
6630 shift; shift
6631 # Remember, the first character of IFS is used to create $*,
6632 # except with old shells:
6633 host_os=$*
6634 IFS=$ac_save_IFS
6635 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6636
6637
6638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6639 $as_echo_n "checking target system type... " >&6; }
6640 if ${ac_cv_target+:} false; then :
6641 $as_echo_n "(cached) " >&6
6642 else
6643 if test "x$target_alias" = x; then
6644 ac_cv_target=$ac_cv_host
6645 else
6646 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6647 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6648 fi
6649
6650 fi
6651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6652 $as_echo "$ac_cv_target" >&6; }
6653 case $ac_cv_target in
6654 *-*-*) ;;
6655 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6656 esac
6657 target=$ac_cv_target
6658 ac_save_IFS=$IFS; IFS='-'
6659 set x $ac_cv_target
6660 shift
6661 target_cpu=$1
6662 target_vendor=$2
6663 shift; shift
6664 # Remember, the first character of IFS is used to create $*,
6665 # except with old shells:
6666 target_os=$*
6667 IFS=$ac_save_IFS
6668 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6669
6670
6671 # The aliases save the names the user supplied, while $host etc.
6672 # will get canonicalized.
6673 test -n "$target_alias" &&
6674 test "$program_prefix$program_suffix$program_transform_name" = \
6675 NONENONEs,x,x, &&
6676 program_prefix=${target_alias}-
6677
6678 # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6679 # is confusing; it assumes you are cross-compiling a cross-compiler (!) and "target" is thus the target of the
6680 # product you're building. The target of this build is called "host". Since this is confusing to most people, we
6681 # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6682 # to use the configure naming style.
6683
6684
6685
6686
6687
6688 # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6689 # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6690 # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6691 # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6692 OPENJDK_TARGET_AUTOCONF_NAME="$host"
6693 OPENJDK_BUILD_AUTOCONF_NAME="$build"
6694
6695
6696
6697 # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6698
6699 case "$build_os" in
6700 *linux*)
6701 VAR_OS=linux
6702 VAR_OS_API=posix
6703 VAR_OS_ENV=linux
6704 ;;
6705 *solaris*)
6706 VAR_OS=solaris
6707 VAR_OS_API=posix
6708 VAR_OS_ENV=solaris
6709 ;;
6710 *darwin*)
6711 VAR_OS=macosx
6712 VAR_OS_API=posix
6713 VAR_OS_ENV=macosx
6714 ;;
6715 *bsd*)
6716 VAR_OS=bsd
6717 VAR_OS_API=posix
6718 VAR_OS_ENV=bsd
6719 ;;
6720 *cygwin*)
6721 VAR_OS=windows
6722 VAR_OS_API=winapi
6723 VAR_OS_ENV=windows.cygwin
6724 ;;
6725 *mingw*)
6726 VAR_OS=windows
6727 VAR_OS_API=winapi
6728 VAR_OS_ENV=windows.msys
6729 ;;
6730 *)
6731 as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6732 ;;
6733 esac
6734
6735
6736 # First argument is the cpu name from the trip/quad
6737 case "$build_cpu" in
6738 x86_64)
6739 VAR_CPU=x86_64
6740 VAR_CPU_ARCH=x86
6741 VAR_CPU_BITS=64
6742 VAR_CPU_ENDIAN=little
6743 ;;
6744 i?86)
6745 VAR_CPU=x86
6746 VAR_CPU_ARCH=x86
6747 VAR_CPU_BITS=32
6748 VAR_CPU_ENDIAN=little
6749 ;;
6750 arm*)
6751 VAR_CPU=arm
6752 VAR_CPU_ARCH=arm
6753 VAR_CPU_BITS=32
6754 VAR_CPU_ENDIAN=little
6755 ;;
6756 powerpc)
6757 VAR_CPU=ppc
6758 VAR_CPU_ARCH=ppc
6759 VAR_CPU_BITS=32
6760 VAR_CPU_ENDIAN=big
6761 ;;
6762 powerpc64)
6763 VAR_CPU=ppc64
6764 VAR_CPU_ARCH=ppc
6765 VAR_CPU_BITS=64
6766 VAR_CPU_ENDIAN=big
6767 ;;
6768 sparc)
6769 VAR_CPU=sparc
6770 VAR_CPU_ARCH=sparc
6771 VAR_CPU_BITS=32
6772 VAR_CPU_ENDIAN=big
6773 ;;
6774 sparcv9)
6775 VAR_CPU=sparcv9
6776 VAR_CPU_ARCH=sparc
6777 VAR_CPU_BITS=64
6778 VAR_CPU_ENDIAN=big
6779 ;;
6780 *)
6781 as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6782 ;;
6783 esac
6784
6785 # ..and setup our own variables. (Do this explicitely to facilitate searching)
6786 OPENJDK_BUILD_OS="$VAR_OS"
6787 OPENJDK_BUILD_OS_API="$VAR_OS_API"
6788 OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6789 OPENJDK_BUILD_CPU="$VAR_CPU"
6790 OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6791 OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6792 OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6793
6794
6795
6796
6797
6798
6799
6800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6801 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
6802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6803 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6804
6805 # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6806
6807 case "$host_os" in
6808 *linux*)
6809 VAR_OS=linux
6810 VAR_OS_API=posix
6811 VAR_OS_ENV=linux
6812 ;;
6813 *solaris*)
6814 VAR_OS=solaris
6815 VAR_OS_API=posix
6816 VAR_OS_ENV=solaris
6817 ;;
6818 *darwin*)
6819 VAR_OS=macosx
6820 VAR_OS_API=posix
6821 VAR_OS_ENV=macosx
6822 ;;
6823 *bsd*)
6824 VAR_OS=bsd
6825 VAR_OS_API=posix
6826 VAR_OS_ENV=bsd
6827 ;;
6828 *cygwin*)
6829 VAR_OS=windows
6830 VAR_OS_API=winapi
6831 VAR_OS_ENV=windows.cygwin
6832 ;;
6833 *mingw*)
6834 VAR_OS=windows
6835 VAR_OS_API=winapi
6836 VAR_OS_ENV=windows.msys
6837 ;;
6838 *)
6839 as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6840 ;;
6841 esac
6842
6843
6844 # First argument is the cpu name from the trip/quad
6845 case "$host_cpu" in
6846 x86_64)
6847 VAR_CPU=x86_64
6848 VAR_CPU_ARCH=x86
6849 VAR_CPU_BITS=64
6850 VAR_CPU_ENDIAN=little
6851 ;;
6852 i?86)
6853 VAR_CPU=x86
6854 VAR_CPU_ARCH=x86
6855 VAR_CPU_BITS=32
6856 VAR_CPU_ENDIAN=little
6857 ;;
6858 arm*)
6859 VAR_CPU=arm
6860 VAR_CPU_ARCH=arm
6861 VAR_CPU_BITS=32
6862 VAR_CPU_ENDIAN=little
6863 ;;
6864 powerpc)
6865 VAR_CPU=ppc
6866 VAR_CPU_ARCH=ppc
6867 VAR_CPU_BITS=32
6868 VAR_CPU_ENDIAN=big
6869 ;;
6870 powerpc64)
6871 VAR_CPU=ppc64
6872 VAR_CPU_ARCH=ppc
6873 VAR_CPU_BITS=64
6874 VAR_CPU_ENDIAN=big
6875 ;;
6876 sparc)
6877 VAR_CPU=sparc
6878 VAR_CPU_ARCH=sparc
6879 VAR_CPU_BITS=32
6880 VAR_CPU_ENDIAN=big
6881 ;;
6882 sparcv9)
6883 VAR_CPU=sparcv9
6884 VAR_CPU_ARCH=sparc
6885 VAR_CPU_BITS=64
6886 VAR_CPU_ENDIAN=big
6887 ;;
6888 *)
6889 as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6890 ;;
6891 esac
6892
6893 # ... and setup our own variables. (Do this explicitely to facilitate searching)
6894 OPENJDK_TARGET_OS="$VAR_OS"
6895 OPENJDK_TARGET_OS_API="$VAR_OS_API"
6896 OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6897 OPENJDK_TARGET_CPU="$VAR_CPU"
6898 OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6899 OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6900 OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6901
6902
6903
6904
6905
6906
6907
6908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6909 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
6910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6911 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6912
6913
6914
6915 # Check whether --with-target-bits was given.
6916 if test "${with_target_bits+set}" = set; then :
6917 withval=$with_target_bits;
6918 fi
6919
6920
6921 # We have three types of compiles:
6922 # native == normal compilation, target system == build system
6923 # cross == traditional cross compilation, target system != build system; special toolchain needed
6924 # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6925 #
6926 if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6927 # We're doing a proper cross-compilation
6928 COMPILE_TYPE="cross"
6929 else
6930 COMPILE_TYPE="native"
6931 fi
6932
6933 if test "x$with_target_bits" != x; then
6934 if test "x$COMPILE_TYPE" = "xcross"; then
6935 as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6936 fi
6937
6938 if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6939 # A reduced build is requested
6940 COMPILE_TYPE="reduced"
6941 OPENJDK_TARGET_CPU_BITS=32
6942 if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6943 OPENJDK_TARGET_CPU=x86
6944 elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6945 OPENJDK_TARGET_CPU=sparc
6946 else
6947 as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6948 fi
6949 elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6950 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
6951 elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6952 { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6953 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6954 else
6955 as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6956 fi
6957 fi
6958
6959
6960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6961 $as_echo_n "checking compilation type... " >&6; }
6962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6963 $as_echo "$COMPILE_TYPE" >&6; }
6964
6965
6966 if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6967 REQUIRED_OS_NAME=SunOS
6968 REQUIRED_OS_VERSION=5.10
6969 fi
6970 if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6971 REQUIRED_OS_NAME=Linux
6972 REQUIRED_OS_VERSION=2.6
6973 fi
6974 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6975 REQUIRED_OS_NAME=Windows
6976 if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6977 REQUIRED_OS_VERSION=5.2
6978 else
6979 REQUIRED_OS_VERSION=5.1
6980 fi
6981 fi
6982 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
6983 REQUIRED_OS_NAME=Darwin
6984 REQUIRED_OS_VERSION=11.2
6985 fi
6986
6987
6988
6989
6990
6991 # Also store the legacy naming of the cpu.
6992 # Ie i586 and amd64 instead of x86 and x86_64
6993 OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
6994 if test "x$OPENJDK_TARGET_CPU" = xx86; then
6995 OPENJDK_TARGET_CPU_LEGACY="i586"
6996 elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6997 # On all platforms except MacOSX replace x86_64 with amd64.
6998 OPENJDK_TARGET_CPU_LEGACY="amd64"
6999 fi
7000
7001
7002 # And the second legacy naming of the cpu.
7003 # Ie i386 and amd64 instead of x86 and x86_64.
7004 OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
7005 if test "x$OPENJDK_TARGET_CPU" = xx86; then
7006 OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
7007 elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7008 OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
7009 fi
7010
7011
7012 # This is the name of the cpu (but using i386 and amd64 instead of
7013 # x86 and x86_64, respectively), preceeded by a /, to be used when
7014 # locating libraries. On macosx, it's empty, though.
7015 OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
7016 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7017 OPENJDK_TARGET_CPU_LIBDIR=""
7018 fi
7019
7020
7021 # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
7022 # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7023 # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7024 OPENJDK_TARGET_CPU_ISADIR=""
7025 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7026 if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7027 OPENJDK_TARGET_CPU_ISADIR="/amd64"
7028 elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7029 OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7030 fi
7031 fi
7032
7033
7034 # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7035 OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7036 if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7037 # On linux only, we replace x86 with i386.
7038 OPENJDK_TARGET_CPU_OSARCH="i386"
7039 elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7040 # On all platforms except macosx, we replace x86_64 with amd64.
7041 OPENJDK_TARGET_CPU_OSARCH="amd64"
7042 fi
7043
7044
7045 OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7046 if test "x$OPENJDK_TARGET_CPU" = xx86; then
7047 OPENJDK_TARGET_CPU_JLI="i386"
7048 elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7049 # On all platforms except macosx, we replace x86_64 with amd64.
7050 OPENJDK_TARGET_CPU_JLI="amd64"
7051 fi
7052 # Now setup the -D flags for building libjli.
7053 OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7054 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7055 if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7056 OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7057 elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7058 OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7059 fi
7060 fi
7061
7062
7063 # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7064 if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7065 OPENJDK_TARGET_OS_API_DIR="solaris"
7066 fi
7067 if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7068 OPENJDK_TARGET_OS_API_DIR="windows"
7069 fi
7070
7071
7072 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7073 A_LP64="LP64:="
7074 # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7075 # unpack200.exe
7076 if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7077 ADD_LP64="-D_LP64=1"
7078 fi
7079 fi
7080 LP64=$A_LP64
7081
7082
7083 if test "x$COMPILE_TYPE" = "xcross"; then
7084 # FIXME: ... or should this include reduced builds..?
7085 DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7086 else
7087 DEFINE_CROSS_COMPILE_ARCH=""
7088 fi
7089
7090
7091
7092
7093 # Continue setting up basic stuff. Most remaining code require fundamental tools.
7094
7095 # Locate the directory of this script.
7096 SCRIPT="$0"
7097
7098 if test "x$OPENJDK_BUILD_OS" != xwindows; then
7099 # Follow a chain of symbolic links. Use readlink
7100 # where it exists, else fall back to horribly
7101 # complicated shell code.
7102 if test "x$READLINK_TESTED" != yes; then
7103 # On MacOSX there is a readlink tool with a different
7104 # purpose than the GNU readlink tool. Check the found readlink.
7105 ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7106 if test "x$ISGNU" = x; then
7107 # A readlink that we do not know how to use.
7108 # Are there other non-GNU readlinks out there?
7109 READLINK_TESTED=yes
7110 READLINK=
7111 fi
7112 fi
7113
7114 if test "x$READLINK" != x; then
7115 SCRIPT=`$READLINK -f $SCRIPT`
7116 else
7117 # Save the current directory for restoring afterwards
7118 STARTDIR=$PWD
7119 COUNTER=0
7120 sym_link_dir=`$DIRNAME $SCRIPT`
7121 sym_link_file=`$BASENAME $SCRIPT`
7122 # Use the system pwd and not the shell builtin to resolve directory symlinks
7123 cd $sym_link_dir
7124 cd `$THEPWDCMD`
7125 sym_link_dir=`$THEPWDCMD`
7126 # Resolve file symlinks
7127 while test $COUNTER -lt 20; do
7128 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7129 if test "x$ISLINK" == x; then
7130 # This is not a symbolic link! We are done!
7131 break
7132 fi
7133 # Again resolve directory symlinks since the target of the just found
7134 # link could be in a different directory
7135 cd `$DIRNAME $ISLINK`
7136 sym_link_dir=`$THEPWDCMD`
7137 sym_link_file=`$BASENAME $ISLINK`
7138 let COUNTER=COUNTER+1
7139 done
7140 cd $STARTDIR
7141 SCRIPT=$sym_link_dir/$sym_link_file
7142 fi
7143 fi
7144
7145 AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD`
7146
7147 # Where is the source? It is located two levels above the configure script.
7148 CURDIR="$PWD"
7149 cd "$AUTOCONF_DIR/../.."
7150 SRC_ROOT="`$THEPWDCMD`"
7151
7152 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7153 PATH_SEP=";"
7154
7155 SRC_ROOT_LENGTH=`$THEPWDCMD|$WC -m`
7156 if test $SRC_ROOT_LENGTH -gt 100; then
7157 as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7158 fi
7159
7160 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7162 $as_echo_n "checking cygwin release... " >&6; }
7163 CYGWIN_VERSION=`$UNAME -r`
7164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7165 $as_echo "$CYGWIN_VERSION" >&6; }
7166 WINDOWS_ENV_VENDOR='cygwin'
7167 WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7168
7169 CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7170 if test "x$CYGWIN_VERSION_OK" = x; then
7171 { $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
7172 $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;}
7173 as_fn_error $? "Cannot continue" "$LINENO" 5
7174 fi
7175 if test "x$CYGPATH" = x; then
7176 as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7177 fi
7178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7179 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7180 # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7181 cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7182 # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7183 CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7185 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
7186 WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7187 test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7188 if test "x$test_cygdrive_prefix" = x; then
7189 as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7190 fi
7191 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7193 $as_echo_n "checking msys release... " >&6; }
7194 MSYS_VERSION=`$UNAME -r`
7195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7196 $as_echo "$MSYS_VERSION" >&6; }
7197
7198 WINDOWS_ENV_VENDOR='msys'
7199 WINDOWS_ENV_VERSION="$MSYS_VERSION"
7200
7201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7202 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
7203 # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7204 MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7205
7206 windows_path="$MSYS_ROOT_PATH"
7207 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7208 unix_path=`$CYGPATH -u "$windows_path"`
7209 MSYS_ROOT_PATH="$unix_path"
7210 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7211 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7212 MSYS_ROOT_PATH="$unix_path"
7213 fi
7214
7215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7216 $as_echo "$MSYS_ROOT_PATH" >&6; }
7217 WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7218 else
7219 as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7220 fi
7221
7222 # Test if windows or unix (cygwin/msys) find is first in path.
7223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7224 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7225 FIND_BINARY_OUTPUT=`find --version 2>&1`
7226 if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7228 $as_echo "unix style" >&6; }
7229 elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7231 $as_echo "Windows" >&6; }
7232 { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7233 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7234 { $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
7235 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7236 as_fn_error $? "Cannot continue" "$LINENO" 5
7237 else
7238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7239 $as_echo "unknown" >&6; }
7240 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7241 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7242 fi
7243
7244 else
7245 PATH_SEP=":"
7246 fi
7247
7248
7249
7250 cd "$CURDIR"
7251
7252
7253 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7254
7255 # Input might be given as Windows format, start by converting to
7256 # unix format.
7257 path="$SRC_ROOT"
7258 new_path=`$CYGPATH -u "$path"`
7259
7260 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7261 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7262 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7263 # "foo.exe" is OK but "foo" is an error.
7264 #
7265 # This test is therefore slightly more accurate than "test -f" to check for file precense.
7266 # It is also a way to make sure we got the proper file name for the real test later on.
7267 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7268 if test "x$test_shortpath" = x; then
7269 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7270 $as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7271 as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7272 fi
7273
7274 # Call helper function which possibly converts this using DOS-style short mode.
7275 # If so, the updated path is stored in $new_path.
7276
7277 input_path="$new_path"
7278 # Check if we need to convert this using DOS-style short mode. If the path
7279 # contains just simple characters, use it. Otherwise (spaces, weird characters),
7280 # take no chances and rewrite it.
7281 # Note: m4 eats our [], so we need to use [ and ] instead.
7282 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7283 if test "x$has_forbidden_chars" != x; then
7284 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7285 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7286 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7287 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7288 # Going to short mode and back again did indeed matter. Since short mode is
7289 # case insensitive, let's make it lowercase to improve readability.
7290 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7291 # Now convert it back to Unix-stile (cygpath)
7292 input_path=`$CYGPATH -u "$shortmode_path"`
7293 new_path="$input_path"
7294 fi
7295 fi
7296
7297 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7298 if test "x$test_cygdrive_prefix" = x; then
7299 # As a simple fix, exclude /usr/bin since it's not a real path.
7300 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7301 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7302 # a path prefixed by /cygdrive for fixpath to work.
7303 new_path="$CYGWIN_ROOT_PATH$input_path"
7304 fi
7305 fi
7306
7307
7308 if test "x$path" != "x$new_path"; then
7309 SRC_ROOT="$new_path"
7310 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7311 $as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7312 fi
7313
7314 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7315
7316 path="$SRC_ROOT"
7317 has_colon=`$ECHO $path | $GREP ^.:`
7318 new_path="$path"
7319 if test "x$has_colon" = x; then
7320 # Not in mixed or Windows style, start by that.
7321 new_path=`cmd //c echo $path`
7322 fi
7323
7324
7325 input_path="$new_path"
7326 # Check if we need to convert this using DOS-style short mode. If the path
7327 # contains just simple characters, use it. Otherwise (spaces, weird characters),
7328 # take no chances and rewrite it.
7329 # Note: m4 eats our [], so we need to use [ and ] instead.
7330 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7331 if test "x$has_forbidden_chars" != x; then
7332 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7333 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7334 fi
7335
7336
7337 windows_path="$new_path"
7338 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7339 unix_path=`$CYGPATH -u "$windows_path"`
7340 new_path="$unix_path"
7341 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7342 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7343 new_path="$unix_path"
7344 fi
7345
7346 if test "x$path" != "x$new_path"; then
7347 SRC_ROOT="$new_path"
7348 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7349 $as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7350 fi
7351
7352 # Save the first 10 bytes of this path to the storage, so fixpath can work.
7353 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7354
7355 else
7356 # We're on a posix platform. Hooray! :)
7357 path="$SRC_ROOT"
7358
7359 if test ! -f "$path" && test ! -d "$path"; then
7360 as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7361 fi
7362
7363 has_space=`$ECHO "$path" | $GREP " "`
7364 if test "x$has_space" != x; then
7365 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7366 $as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7367 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7368 fi
7369 fi
7370
7371
7372 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7373
7374 # Input might be given as Windows format, start by converting to
7375 # unix format.
7376 path="$CURDIR"
7377 new_path=`$CYGPATH -u "$path"`
7378
7379 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7380 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7381 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7382 # "foo.exe" is OK but "foo" is an error.
7383 #
7384 # This test is therefore slightly more accurate than "test -f" to check for file precense.
7385 # It is also a way to make sure we got the proper file name for the real test later on.
7386 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7387 if test "x$test_shortpath" = x; then
7388 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7389 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7390 as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7391 fi
7392
7393 # Call helper function which possibly converts this using DOS-style short mode.
7394 # If so, the updated path is stored in $new_path.
7395
7396 input_path="$new_path"
7397 # Check if we need to convert this using DOS-style short mode. If the path
7398 # contains just simple characters, use it. Otherwise (spaces, weird characters),
7399 # take no chances and rewrite it.
7400 # Note: m4 eats our [], so we need to use [ and ] instead.
7401 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7402 if test "x$has_forbidden_chars" != x; then
7403 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7404 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7405 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7406 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7407 # Going to short mode and back again did indeed matter. Since short mode is
7408 # case insensitive, let's make it lowercase to improve readability.
7409 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7410 # Now convert it back to Unix-stile (cygpath)
7411 input_path=`$CYGPATH -u "$shortmode_path"`
7412 new_path="$input_path"
7413 fi
7414 fi
7415
7416 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7417 if test "x$test_cygdrive_prefix" = x; then
7418 # As a simple fix, exclude /usr/bin since it's not a real path.
7419 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7420 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7421 # a path prefixed by /cygdrive for fixpath to work.
7422 new_path="$CYGWIN_ROOT_PATH$input_path"
7423 fi
7424 fi
7425
7426
7427 if test "x$path" != "x$new_path"; then
7428 CURDIR="$new_path"
7429 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7430 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7431 fi
7432
7433 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7434
7435 path="$CURDIR"
7436 has_colon=`$ECHO $path | $GREP ^.:`
7437 new_path="$path"
7438 if test "x$has_colon" = x; then
7439 # Not in mixed or Windows style, start by that.
7440 new_path=`cmd //c echo $path`
7441 fi
7442
7443
7444 input_path="$new_path"
7445 # Check if we need to convert this using DOS-style short mode. If the path
7446 # contains just simple characters, use it. Otherwise (spaces, weird characters),
7447 # take no chances and rewrite it.
7448 # Note: m4 eats our [], so we need to use [ and ] instead.
7449 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7450 if test "x$has_forbidden_chars" != x; then
7451 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7452 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7453 fi
7454
7455
7456 windows_path="$new_path"
7457 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7458 unix_path=`$CYGPATH -u "$windows_path"`
7459 new_path="$unix_path"
7460 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7461 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7462 new_path="$unix_path"
7463 fi
7464
7465 if test "x$path" != "x$new_path"; then
7466 CURDIR="$new_path"
7467 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7468 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7469 fi
7470
7471 # Save the first 10 bytes of this path to the storage, so fixpath can work.
7472 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7473
7474 else
7475 # We're on a posix platform. Hooray! :)
7476 path="$CURDIR"
7477
7478 if test ! -f "$path" && test ! -d "$path"; then
7479 as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7480 fi
7481
7482 has_space=`$ECHO "$path" | $GREP " "`
7483 if test "x$has_space" != x; then
7484 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7485 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7486 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7487 fi
7488 fi
7489
7490
7491 if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7492 # Add extra search paths on solaris for utilities like ar and as etc...
7493 PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7494 fi
7495
7496 # You can force the sys-root if the sys-root encoded into the cross compiler tools
7497 # is not correct.
7498
7499 # Check whether --with-sys-root was given.
7500 if test "${with_sys_root+set}" = set; then :
7501 withval=$with_sys_root;
7502 fi
7503
7504
7505 if test "x$with_sys_root" != x; then
7506 SYS_ROOT=$with_sys_root
7507 else
7508 SYS_ROOT=/
7509 fi
7510
7511
7512
7513 # Check whether --with-tools-dir was given.
7514 if test "${with_tools_dir+set}" = set; then :
7515 withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7516 fi
7517
7518
7519
7520 # Check whether --with-devkit was given.
7521 if test "${with_devkit+set}" = set; then :
7522 withval=$with_devkit;
7523 if test "x$with_sys_root" != x; then
7524 as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7525 fi
7526 if test "x$with_tools_dir" != x; then
7527 as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
7528 fi
7529 TOOLS_DIR=$with_devkit/bin
7530 SYS_ROOT=$with_devkit/$host_alias/libc
7531
7532 fi
7533
7534
7535
7536
7537 # Setup default logging of stdout and stderr to build.log in the output root.
7538 BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7539 BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7540 BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7541
7542
7543
7544
7545
7546 # Check if it's a pure open build or if custom sources are to be used.
7547
7548 # Check whether --enable-openjdk-only was given.
7549 if test "${enable_openjdk_only+set}" = set; then :
7550 enableval=$enable_openjdk_only;
7551 else
7552 enable_openjdk_only="no"
7553 fi
7554
7555
7556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7557 $as_echo_n "checking for presence of closed sources... " >&6; }
7558 if test -d "$SRC_ROOT/jdk/src/closed"; then
7559 CLOSED_SOURCE_PRESENT=yes
7560 else
7561 CLOSED_SOURCE_PRESENT=no
7562 fi
7563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7564 $as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7565
7566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7567 $as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7568 SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7570 $as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7571
7572 if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7573 OPENJDK=true
7574 if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7575 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7576 $as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7577 fi
7578 else
7579 if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7580 OPENJDK=true
7581 else
7582 OPENJDK=false
7583 fi
7584 fi
7585
7586 if test "x$OPENJDK" = "xtrue"; then
7587 SET_OPENJDK="OPENJDK=true"
7588 fi
7589
7590
7591
7592
7593 # These are needed to be able to create a configuration name (and thus the output directory)
7594
7595 ###############################################################################
7596 #
7597 # Check which variant of the JDK that we want to build.
7598 # Currently we have:
7599 # normal: standard edition
7600 # but the custom make system may add other variants
7601 #
7602 # Effectively the JDK variant gives a name to a specific set of
7603 # modules to compile into the JDK. In the future, these modules
7604 # might even be Jigsaw modules.
7605 #
7606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7607 $as_echo_n "checking which variant of the JDK to build... " >&6; }
7608
7609 # Check whether --with-jdk-variant was given.
7610 if test "${with_jdk_variant+set}" = set; then :
7611 withval=$with_jdk_variant;
7612 fi
7613
7614
7615 if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7616 JDK_VARIANT="normal"
7617 else
7618 as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7619 fi
7620
7621
7622
7623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7624 $as_echo "$JDK_VARIANT" >&6; }
7625
7626
7627
7628 ###############################################################################
7629 #
7630 # Check which variants of the JVM that we want to build.
7631 # Currently we have:
7632 # server: normal interpreter and a tiered C1/C2 compiler
7633 # client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7634 # minimal1: reduced form of client with optional VM services and features stripped out
7635 # kernel: kernel footprint JVM that passes the TCK without major performance problems,
7636 # ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7637 # zero: no machine code interpreter, no compiler
7638 # zeroshark: zero interpreter and shark/llvm compiler backend
7639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7640 $as_echo_n "checking which variants of the JVM to build... " >&6; }
7641
7642 # Check whether --with-jvm-variants was given.
7643 if test "${with_jvm_variants+set}" = set; then :
7644 withval=$with_jvm_variants;
7645 fi
7646
7647
7648 if test "x$with_jvm_variants" = x; then
7649 with_jvm_variants="server"
7650 fi
7651
7652 JVM_VARIANTS=",$with_jvm_variants,"
7653 TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//' -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7654
7655 if test "x$TEST_VARIANTS" != "x,"; then
7656 as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7657 fi
7658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7659 $as_echo "$with_jvm_variants" >&6; }
7660
7661 JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7662 JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7663 JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7664 JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7665 JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7666 JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7667
7668 if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7669 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7670 as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7671 fi
7672 fi
7673 if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7674 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7675 as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7676 fi
7677 fi
7678 if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7679 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7680 as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7681 fi
7682 fi
7683
7684 # Replace the commas with AND for use in the build directory name.
7685 ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7686 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/'`
7687 if test "x$COUNT_VARIANTS" != "x,1"; then
7688 BUILDING_MULTIPLE_JVM_VARIANTS=yes
7689 else
7690 BUILDING_MULTIPLE_JVM_VARIANTS=no
7691 fi
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7702 MACOSX_UNIVERSAL="true"
7703 fi
7704
7705
7706
7707
7708
7709 ###############################################################################
7710 #
7711 # Set the debug level
7712 # release: no debug information, all optimizations, no asserts.
7713 # fastdebug: debug information (-g), all optimizations, all asserts
7714 # slowdebug: debug information (-g), no optimizations, all asserts
7715 #
7716 DEBUG_LEVEL="release"
7717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7718 $as_echo_n "checking which debug level to use... " >&6; }
7719 # Check whether --enable-debug was given.
7720 if test "${enable_debug+set}" = set; then :
7721 enableval=$enable_debug;
7722 ENABLE_DEBUG="${enableval}"
7723 DEBUG_LEVEL="fastdebug"
7724
7725 else
7726 ENABLE_DEBUG="no"
7727 fi
7728
7729
7730
7731 # Check whether --with-debug-level was given.
7732 if test "${with_debug_level+set}" = set; then :
7733 withval=$with_debug_level;
7734 DEBUG_LEVEL="${withval}"
7735 if test "x$ENABLE_DEBUG" = xyes; then
7736 as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7737 fi
7738
7739 fi
7740
7741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7742 $as_echo "$DEBUG_LEVEL" >&6; }
7743
7744 if test "x$DEBUG_LEVEL" != xrelease && \
7745 test "x$DEBUG_LEVEL" != xfastdebug && \
7746 test "x$DEBUG_LEVEL" != xslowdebug; then
7747 as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7748 fi
7749
7750
7751 ###############################################################################
7752 #
7753 # Setup legacy vars/targets and new vars to deal with different debug levels.
7754 #
7755
7756 case $DEBUG_LEVEL in
7757 release )
7758 VARIANT="OPT"
7759 FASTDEBUG="false"
7760 DEBUG_CLASSFILES="false"
7761 BUILD_VARIANT_RELEASE=""
7762 HOTSPOT_DEBUG_LEVEL="product"
7763 HOTSPOT_EXPORT="product"
7764 ;;
7765 fastdebug )
7766 VARIANT="DBG"
7767 FASTDEBUG="true"
7768 DEBUG_CLASSFILES="true"
7769 BUILD_VARIANT_RELEASE="-fastdebug"
7770 HOTSPOT_DEBUG_LEVEL="fastdebug"
7771 HOTSPOT_EXPORT="fastdebug"
7772 ;;
7773 slowdebug )
7774 VARIANT="DBG"
7775 FASTDEBUG="false"
7776 DEBUG_CLASSFILES="true"
7777 BUILD_VARIANT_RELEASE="-debug"
7778 HOTSPOT_DEBUG_LEVEL="jvmg"
7779 HOTSPOT_EXPORT="debug"
7780 ;;
7781 esac
7782
7783 #####
7784 # Generate the legacy makefile targets for hotspot.
7785 # The hotspot api for selecting the build artifacts, really, needs to be improved.
7786 # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7787 # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7788 # But until then ...
7789 HOTSPOT_TARGET=""
7790
7791 if test "x$JVM_VARIANT_SERVER" = xtrue; then
7792 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7793 fi
7794
7795 if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7796 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7797 fi
7798
7799 if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7800 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7801 fi
7802
7803 if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7804 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7805 fi
7806
7807 if test "x$JVM_VARIANT_ZERO" = xtrue; then
7808 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7809 fi
7810
7811 if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7812 HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7813 fi
7814
7815 HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7816
7817 # On Macosx universal binaries are produced, but they only contain
7818 # 64 bit intel. This invalidates control of which jvms are built
7819 # from configure, but only server is valid anyway. Fix this
7820 # when hotspot makefiles are rewritten.
7821 if test "x$MACOSX_UNIVERSAL" = xtrue; then
7822 HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7823 fi
7824
7825 #####
7826
7827
7828
7829
7830
7831
7832
7833
7834 # With basic setup done, call the custom early hook.
7835
7836
7837 # To properly create a configuration name, we need to have the OpenJDK target
7838 # and options (variants and debug level) parsed.
7839
7840
7841
7842 # Check whether --with-conf-name was given.
7843 if test "${with_conf_name+set}" = set; then :
7844 withval=$with_conf_name; CONF_NAME=${with_conf_name}
7845 fi
7846
7847
7848 # Test from where we are running configure, in or outside of src root.
7849 # To enable comparison of directories, CURDIR needs to be symlink free
7850 # just like SRC_ROOT already is
7851 NOSYM_CURDIR="$CURDIR"
7852
7853 if test "x$OPENJDK_BUILD_OS" != xwindows; then
7854 # Follow a chain of symbolic links. Use readlink
7855 # where it exists, else fall back to horribly
7856 # complicated shell code.
7857 if test "x$READLINK_TESTED" != yes; then
7858 # On MacOSX there is a readlink tool with a different
7859 # purpose than the GNU readlink tool. Check the found readlink.
7860 ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7861 if test "x$ISGNU" = x; then
7862 # A readlink that we do not know how to use.
7863 # Are there other non-GNU readlinks out there?
7864 READLINK_TESTED=yes
7865 READLINK=
7866 fi
7867 fi
7868
7869 if test "x$READLINK" != x; then
7870 NOSYM_CURDIR=`$READLINK -f $NOSYM_CURDIR`
7871 else
7872 # Save the current directory for restoring afterwards
7873 STARTDIR=$PWD
7874 COUNTER=0
7875 sym_link_dir=`$DIRNAME $NOSYM_CURDIR`
7876 sym_link_file=`$BASENAME $NOSYM_CURDIR`
7877 # Use the system pwd and not the shell builtin to resolve directory symlinks
7878 cd $sym_link_dir
7879 cd `$THEPWDCMD`
7880 sym_link_dir=`$THEPWDCMD`
7881 # Resolve file symlinks
7882 while test $COUNTER -lt 20; do
7883 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7884 if test "x$ISLINK" == x; then
7885 # This is not a symbolic link! We are done!
7886 break
7887 fi
7888 # Again resolve directory symlinks since the target of the just found
7889 # link could be in a different directory
7890 cd `$DIRNAME $ISLINK`
7891 sym_link_dir=`$THEPWDCMD`
7892 sym_link_file=`$BASENAME $ISLINK`
7893 let COUNTER=COUNTER+1
7894 done
7895 cd $STARTDIR
7896 NOSYM_CURDIR=$sym_link_dir/$sym_link_file
7897 fi
7898 fi
7899
7900 if test "x$NOSYM_CURDIR" = "x$SRC_ROOT" || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common" \
7901 || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/autoconf" \
7902 || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7903 # We are running configure from the src root.
7904 # Create a default ./build/target-variant-debuglevel output root.
7905 if test "x${CONF_NAME}" = x; then
7906 CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7907 fi
7908 OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7909 $MKDIR -p "$OUTPUT_ROOT"
7910 if test ! -d "$OUTPUT_ROOT"; then
7911 as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7912 fi
7913 else
7914 # We are running configure from outside of the src dir.
7915 # Then use the current directory as output dir!
7916 # If configuration is situated in normal build directory, just use the build
7917 # directory name as configuration name, otherwise use the complete path.
7918 if test "x${CONF_NAME}" = x; then
7919 CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7920 fi
7921 OUTPUT_ROOT="$CURDIR"
7922
7923 # WARNING: This might be a bad thing to do. You need to be sure you want to
7924 # have a configuration in this directory. Do some sanity checks!
7925
7926 if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7927 # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7928 # other files
7929 files_present=`$LS $OUTPUT_ROOT`
7930 # Configure has already touched config.log and confdefs.h in the current dir when this check
7931 # is performed.
7932 filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
7933 | $TR -d '\n'`
7934 if test "x$filtered_files" != x; then
7935 { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
7936 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
7937 { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
7938 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7939 { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7940 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7941 { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
7942 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7943 { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
7944 $as_echo "$as_me: seriously mess up just about everything." >&6;}
7945 { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
7946 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
7947 { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
7948 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
7949 as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
7950 fi
7951 fi
7952 fi
7953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
7954 $as_echo_n "checking what configuration name to use... " >&6; }
7955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
7956 $as_echo "$CONF_NAME" >&6; }
7957
7958
7959 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7960
7961 # Input might be given as Windows format, start by converting to
7962 # unix format.
7963 path="$OUTPUT_ROOT"
7964 new_path=`$CYGPATH -u "$path"`
7965
7966 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7967 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7968 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7969 # "foo.exe" is OK but "foo" is an error.
7970 #
7971 # This test is therefore slightly more accurate than "test -f" to check for file precense.
7972 # It is also a way to make sure we got the proper file name for the real test later on.
7973 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7974 if test "x$test_shortpath" = x; then
7975 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7976 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7977 as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
7978 fi
7979
7980 # Call helper function which possibly converts this using DOS-style short mode.
7981 # If so, the updated path is stored in $new_path.
7982
7983 input_path="$new_path"
7984 # Check if we need to convert this using DOS-style short mode. If the path
7985 # contains just simple characters, use it. Otherwise (spaces, weird characters),
7986 # take no chances and rewrite it.
7987 # Note: m4 eats our [], so we need to use [ and ] instead.
7988 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7989 if test "x$has_forbidden_chars" != x; then
7990 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7991 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7992 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7993 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7994 # Going to short mode and back again did indeed matter. Since short mode is
7995 # case insensitive, let's make it lowercase to improve readability.
7996 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7997 # Now convert it back to Unix-stile (cygpath)
7998 input_path=`$CYGPATH -u "$shortmode_path"`
7999 new_path="$input_path"
8000 fi
8001 fi
8002
8003 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8004 if test "x$test_cygdrive_prefix" = x; then
8005 # As a simple fix, exclude /usr/bin since it's not a real path.
8006 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
8007 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8008 # a path prefixed by /cygdrive for fixpath to work.
8009 new_path="$CYGWIN_ROOT_PATH$input_path"
8010 fi
8011 fi
8012
8013
8014 if test "x$path" != "x$new_path"; then
8015 OUTPUT_ROOT="$new_path"
8016 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8017 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8018 fi
8019
8020 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8021
8022 path="$OUTPUT_ROOT"
8023 has_colon=`$ECHO $path | $GREP ^.:`
8024 new_path="$path"
8025 if test "x$has_colon" = x; then
8026 # Not in mixed or Windows style, start by that.
8027 new_path=`cmd //c echo $path`
8028 fi
8029
8030
8031 input_path="$new_path"
8032 # Check if we need to convert this using DOS-style short mode. If the path
8033 # contains just simple characters, use it. Otherwise (spaces, weird characters),
8034 # take no chances and rewrite it.
8035 # Note: m4 eats our [], so we need to use [ and ] instead.
8036 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8037 if test "x$has_forbidden_chars" != x; then
8038 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8039 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8040 fi
8041
8042
8043 windows_path="$new_path"
8044 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8045 unix_path=`$CYGPATH -u "$windows_path"`
8046 new_path="$unix_path"
8047 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8048 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8049 new_path="$unix_path"
8050 fi
8051
8052 if test "x$path" != "x$new_path"; then
8053 OUTPUT_ROOT="$new_path"
8054 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8055 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8056 fi
8057
8058 # Save the first 10 bytes of this path to the storage, so fixpath can work.
8059 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8060
8061 else
8062 # We're on a posix platform. Hooray! :)
8063 path="$OUTPUT_ROOT"
8064
8065 if test ! -f "$path" && test ! -d "$path"; then
8066 as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8067 fi
8068
8069 has_space=`$ECHO "$path" | $GREP " "`
8070 if test "x$has_space" != x; then
8071 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8072 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8073 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8074 fi
8075 fi
8076
8077
8078 SPEC=$OUTPUT_ROOT/spec.gmk
8079
8080 CONF_NAME=$CONF_NAME
8081
8082 OUTPUT_ROOT=$OUTPUT_ROOT
8083
8084
8085 # Most of the probed defines are put into config.h
8086 ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8087
8088 # The spec.gmk file contains all variables for the make system.
8089 ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8090
8091 # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8092 ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8093
8094 # The bootcycle-spec.gmk file contains support for boot cycle builds.
8095 ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8096
8097 # The compare.sh is used to compare the build output to other builds.
8098 ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8099
8100 # Spec.sh is currently used by compare-objects.sh
8101 ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8102
8103 # The generated Makefile knows where the spec.gmk is and where the source is.
8104 # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8105 # which will look for generated configurations
8106 ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8107
8108
8109 # Save the arguments given to us
8110 echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8111
8112
8113 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8114
8115 for ac_prog in apt-get yum port pkgutil pkgadd
8116 do
8117 # Extract the first word of "$ac_prog", so it can be a program name with args.
8118 set dummy $ac_prog; ac_word=$2
8119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8120 $as_echo_n "checking for $ac_word... " >&6; }
8121 if ${ac_cv_prog_PKGHANDLER+:} false; then :
8122 $as_echo_n "(cached) " >&6
8123 else
8124 if test -n "$PKGHANDLER"; then
8125 ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8126 else
8127 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8128 for as_dir in $PATH
8129 do
8130 IFS=$as_save_IFS
8131 test -z "$as_dir" && as_dir=.
8132 for ac_exec_ext in '' $ac_executable_extensions; do
8133 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8134 ac_cv_prog_PKGHANDLER="$ac_prog"
8135 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8136 break 2
8137 fi
8138 done
8139 done
8140 IFS=$as_save_IFS
8141
8142 fi
8143 fi
8144 PKGHANDLER=$ac_cv_prog_PKGHANDLER
8145 if test -n "$PKGHANDLER"; then
8146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8147 $as_echo "$PKGHANDLER" >&6; }
8148 else
8149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8150 $as_echo "no" >&6; }
8151 fi
8152
8153
8154 test -n "$PKGHANDLER" && break
8155 done
8156
8157
8158
8159 # Setup tools that requires more complex handling, or that is not needed by the configure script.
8160
8161
8162 # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8163 if test "x$MAKE" != x; then
8164 # User has supplied a make, test it.
8165 if test ! -f "$MAKE"; then
8166 as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8167 fi
8168
8169 MAKE_CANDIDATE=""$MAKE""
8170 DESCRIPTION="user supplied MAKE=$MAKE"
8171 if test "x$MAKE_CANDIDATE" != x; then
8172 { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8173 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8174 MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8175 IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8176 if test "x$IS_GNU_MAKE" = x; then
8177 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8178 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8179 else
8180 IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8181 if test "x$IS_MODERN_MAKE" = x; then
8182 { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
8183 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
8184 else
8185 if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8186 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8187 MAKE_EXPECTED_ENV='cygwin'
8188 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8189 MAKE_EXPECTED_ENV='msys'
8190 else
8191 as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8192 fi
8193 MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8194 IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8195 else
8196 # Not relevant for non-Windows
8197 IS_MAKE_CORRECT_ENV=true
8198 fi
8199 if test "x$IS_MAKE_CORRECT_ENV" = x; then
8200 { $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
8201 $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;}
8202 else
8203 FOUND_MAKE=$MAKE_CANDIDATE
8204
8205 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8206
8207 # First separate the path from the arguments. This will split at the first
8208 # space.
8209 complete="$FOUND_MAKE"
8210 path="${complete%% *}"
8211 tmp="$complete EOL"
8212 arguments="${tmp#* }"
8213
8214 # Input might be given as Windows format, start by converting to
8215 # unix format.
8216 new_path=`$CYGPATH -u "$path"`
8217
8218 # Now try to locate executable using which
8219 new_path=`$WHICH "$new_path" 2> /dev/null`
8220 # bat and cmd files are not always considered executable in cygwin causing which
8221 # to not find them
8222 if test "x$new_path" = x \
8223 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8224 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8225 new_path=`$CYGPATH -u "$path"`
8226 fi
8227 if test "x$new_path" = x; then
8228 # Oops. Which didn't find the executable.
8229 # The splitting of arguments from the executable at a space might have been incorrect,
8230 # since paths with space are more likely in Windows. Give it another try with the whole
8231 # argument.
8232 path="$complete"
8233 arguments="EOL"
8234 new_path=`$CYGPATH -u "$path"`
8235 new_path=`$WHICH "$new_path" 2> /dev/null`
8236 # bat and cmd files are not always considered executable in cygwin causing which
8237 # to not find them
8238 if test "x$new_path" = x \
8239 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8240 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8241 new_path=`$CYGPATH -u "$path"`
8242 fi
8243 if test "x$new_path" = x; then
8244 # It's still not found. Now this is an unrecoverable error.
8245 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8246 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8247 has_space=`$ECHO "$complete" | $GREP " "`
8248 if test "x$has_space" != x; then
8249 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8250 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8251 fi
8252 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8253 fi
8254 fi
8255
8256 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8257 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8258 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8259 # "foo.exe" is OK but "foo" is an error.
8260 #
8261 # This test is therefore slightly more accurate than "test -f" to check for file precense.
8262 # It is also a way to make sure we got the proper file name for the real test later on.
8263 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8264 if test "x$test_shortpath" = x; then
8265 # Short path failed, file does not exist as specified.
8266 # Try adding .exe or .cmd
8267 if test -f "${new_path}.exe"; then
8268 input_to_shortpath="${new_path}.exe"
8269 elif test -f "${new_path}.cmd"; then
8270 input_to_shortpath="${new_path}.cmd"
8271 else
8272 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8273 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8274 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8275 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8276 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8277 fi
8278 else
8279 input_to_shortpath="$new_path"
8280 fi
8281
8282 # Call helper function which possibly converts this using DOS-style short mode.
8283 # If so, the updated path is stored in $new_path.
8284 new_path="$input_to_shortpath"
8285
8286 input_path="$input_to_shortpath"
8287 # Check if we need to convert this using DOS-style short mode. If the path
8288 # contains just simple characters, use it. Otherwise (spaces, weird characters),
8289 # take no chances and rewrite it.
8290 # Note: m4 eats our [], so we need to use [ and ] instead.
8291 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8292 if test "x$has_forbidden_chars" != x; then
8293 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8294 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8295 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8296 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8297 # Going to short mode and back again did indeed matter. Since short mode is
8298 # case insensitive, let's make it lowercase to improve readability.
8299 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8300 # Now convert it back to Unix-stile (cygpath)
8301 input_path=`$CYGPATH -u "$shortmode_path"`
8302 new_path="$input_path"
8303 fi
8304 fi
8305
8306 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8307 if test "x$test_cygdrive_prefix" = x; then
8308 # As a simple fix, exclude /usr/bin since it's not a real path.
8309 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8310 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8311 # a path prefixed by /cygdrive for fixpath to work.
8312 new_path="$CYGWIN_ROOT_PATH$input_path"
8313 fi
8314 fi
8315
8316 # remove trailing .exe if any
8317 new_path="${new_path/%.exe/}"
8318
8319 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8320
8321 # First separate the path from the arguments. This will split at the first
8322 # space.
8323 complete="$FOUND_MAKE"
8324 path="${complete%% *}"
8325 tmp="$complete EOL"
8326 arguments="${tmp#* }"
8327
8328 # Input might be given as Windows format, start by converting to
8329 # unix format.
8330 new_path="$path"
8331
8332 windows_path="$new_path"
8333 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8334 unix_path=`$CYGPATH -u "$windows_path"`
8335 new_path="$unix_path"
8336 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8337 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8338 new_path="$unix_path"
8339 fi
8340
8341
8342 # Now try to locate executable using which
8343 new_path=`$WHICH "$new_path" 2> /dev/null`
8344
8345 if test "x$new_path" = x; then
8346 # Oops. Which didn't find the executable.
8347 # The splitting of arguments from the executable at a space might have been incorrect,
8348 # since paths with space are more likely in Windows. Give it another try with the whole
8349 # argument.
8350 path="$complete"
8351 arguments="EOL"
8352 new_path="$path"
8353
8354 windows_path="$new_path"
8355 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8356 unix_path=`$CYGPATH -u "$windows_path"`
8357 new_path="$unix_path"
8358 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8359 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8360 new_path="$unix_path"
8361 fi
8362
8363
8364 new_path=`$WHICH "$new_path" 2> /dev/null`
8365
8366 if test "x$new_path" = x; then
8367 # It's still not found. Now this is an unrecoverable error.
8368 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8369 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8370 has_space=`$ECHO "$complete" | $GREP " "`
8371 if test "x$has_space" != x; then
8372 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8373 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8374 fi
8375 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8376 fi
8377 fi
8378
8379 # Now new_path has a complete unix path to the binary
8380 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8381 # Keep paths in /bin as-is, but remove trailing .exe if any
8382 new_path="${new_path/%.exe/}"
8383 # Do not save /bin paths to all_fixpath_prefixes!
8384 else
8385 # Not in mixed or Windows style, start by that.
8386 new_path=`cmd //c echo $new_path`
8387
8388 input_path="$new_path"
8389 # Check if we need to convert this using DOS-style short mode. If the path
8390 # contains just simple characters, use it. Otherwise (spaces, weird characters),
8391 # take no chances and rewrite it.
8392 # Note: m4 eats our [], so we need to use [ and ] instead.
8393 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8394 if test "x$has_forbidden_chars" != x; then
8395 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8396 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8397 fi
8398
8399 # Output is in $new_path
8400
8401 windows_path="$new_path"
8402 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8403 unix_path=`$CYGPATH -u "$windows_path"`
8404 new_path="$unix_path"
8405 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8406 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8407 new_path="$unix_path"
8408 fi
8409
8410 # remove trailing .exe if any
8411 new_path="${new_path/%.exe/}"
8412
8413 # Save the first 10 bytes of this path to the storage, so fixpath can work.
8414 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8415 fi
8416
8417 else
8418 # We're on a posix platform. Hooray! :)
8419 # First separate the path from the arguments. This will split at the first
8420 # space.
8421 complete="$FOUND_MAKE"
8422 path="${complete%% *}"
8423 tmp="$complete EOL"
8424 arguments="${tmp#* }"
8425
8426 # Cannot rely on the command "which" here since it doesn't always work.
8427 is_absolute_path=`$ECHO "$path" | $GREP ^/`
8428 if test -z "$is_absolute_path"; then
8429 # Path to executable is not absolute. Find it.
8430 IFS_save="$IFS"
8431 IFS=:
8432 for p in $PATH; do
8433 if test -f "$p/$path" && test -x "$p/$path"; then
8434 new_path="$p/$path"
8435 break
8436 fi
8437 done
8438 IFS="$IFS_save"
8439 else
8440 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8441 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8442 new_path="$path"
8443 fi
8444
8445 if test "x$new_path" = x; then
8446 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8447 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8448 has_space=`$ECHO "$complete" | $GREP " "`
8449 if test "x$has_space" != x; then
8450 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8451 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8452 fi
8453 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8454 fi
8455 fi
8456
8457 # Now join together the path and the arguments once again
8458 if test "x$arguments" != xEOL; then
8459 new_complete="$new_path ${arguments% *}"
8460 else
8461 new_complete="$new_path"
8462 fi
8463
8464 if test "x$complete" != "x$new_complete"; then
8465 FOUND_MAKE="$new_complete"
8466 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8467 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8468 fi
8469
8470 fi
8471 fi
8472 fi
8473 fi
8474
8475 if test "x$FOUND_MAKE" = x; then
8476 as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8477 fi
8478 else
8479 # Try our hardest to locate a correct version of GNU make
8480 for ac_prog in gmake
8481 do
8482 # Extract the first word of "$ac_prog", so it can be a program name with args.
8483 set dummy $ac_prog; ac_word=$2
8484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8485 $as_echo_n "checking for $ac_word... " >&6; }
8486 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
8487 $as_echo_n "(cached) " >&6
8488 else
8489 case $CHECK_GMAKE in
8490 [\\/]* | ?:[\\/]*)
8491 ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8492 ;;
8493 *)
8494 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8495 for as_dir in $PATH
8496 do
8497 IFS=$as_save_IFS
8498 test -z "$as_dir" && as_dir=.
8499 for ac_exec_ext in '' $ac_executable_extensions; do
8500 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8501 ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8502 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8503 break 2
8504 fi
8505 done
8506 done
8507 IFS=$as_save_IFS
8508
8509 ;;
8510 esac
8511 fi
8512 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8513 if test -n "$CHECK_GMAKE"; then
8514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8515 $as_echo "$CHECK_GMAKE" >&6; }
8516 else
8517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8518 $as_echo "no" >&6; }
8519 fi
8520
8521
8522 test -n "$CHECK_GMAKE" && break
8523 done
8524
8525
8526 MAKE_CANDIDATE=""$CHECK_GMAKE""
8527 DESCRIPTION="gmake in PATH"
8528 if test "x$MAKE_CANDIDATE" != x; then
8529 { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8530 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8531 MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8532 IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8533 if test "x$IS_GNU_MAKE" = x; then
8534 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8535 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8536 else
8537 IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8538 if test "x$IS_MODERN_MAKE" = x; then
8539 { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
8540 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
8541 else
8542 if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8543 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8544 MAKE_EXPECTED_ENV='cygwin'
8545 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8546 MAKE_EXPECTED_ENV='msys'
8547 else
8548 as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8549 fi
8550 MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8551 IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8552 else
8553 # Not relevant for non-Windows
8554 IS_MAKE_CORRECT_ENV=true
8555 fi
8556 if test "x$IS_MAKE_CORRECT_ENV" = x; then
8557 { $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
8558 $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;}
8559 else
8560 FOUND_MAKE=$MAKE_CANDIDATE
8561
8562 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8563
8564 # First separate the path from the arguments. This will split at the first
8565 # space.
8566 complete="$FOUND_MAKE"
8567 path="${complete%% *}"
8568 tmp="$complete EOL"
8569 arguments="${tmp#* }"
8570
8571 # Input might be given as Windows format, start by converting to
8572 # unix format.
8573 new_path=`$CYGPATH -u "$path"`
8574
8575 # Now try to locate executable using which
8576 new_path=`$WHICH "$new_path" 2> /dev/null`
8577 # bat and cmd files are not always considered executable in cygwin causing which
8578 # to not find them
8579 if test "x$new_path" = x \
8580 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8581 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8582 new_path=`$CYGPATH -u "$path"`
8583 fi
8584 if test "x$new_path" = x; then
8585 # Oops. Which didn't find the executable.
8586 # The splitting of arguments from the executable at a space might have been incorrect,
8587 # since paths with space are more likely in Windows. Give it another try with the whole
8588 # argument.
8589 path="$complete"
8590 arguments="EOL"
8591 new_path=`$CYGPATH -u "$path"`
8592 new_path=`$WHICH "$new_path" 2> /dev/null`
8593 # bat and cmd files are not always considered executable in cygwin causing which
8594 # to not find them
8595 if test "x$new_path" = x \
8596 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8597 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8598 new_path=`$CYGPATH -u "$path"`
8599 fi
8600 if test "x$new_path" = x; then
8601 # It's still not found. Now this is an unrecoverable error.
8602 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8603 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8604 has_space=`$ECHO "$complete" | $GREP " "`
8605 if test "x$has_space" != x; then
8606 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8607 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8608 fi
8609 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8610 fi
8611 fi
8612
8613 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8614 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8615 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8616 # "foo.exe" is OK but "foo" is an error.
8617 #
8618 # This test is therefore slightly more accurate than "test -f" to check for file precense.
8619 # It is also a way to make sure we got the proper file name for the real test later on.
8620 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8621 if test "x$test_shortpath" = x; then
8622 # Short path failed, file does not exist as specified.
8623 # Try adding .exe or .cmd
8624 if test -f "${new_path}.exe"; then
8625 input_to_shortpath="${new_path}.exe"
8626 elif test -f "${new_path}.cmd"; then
8627 input_to_shortpath="${new_path}.cmd"
8628 else
8629 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8630 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8631 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8632 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8633 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8634 fi
8635 else
8636 input_to_shortpath="$new_path"
8637 fi
8638
8639 # Call helper function which possibly converts this using DOS-style short mode.
8640 # If so, the updated path is stored in $new_path.
8641 new_path="$input_to_shortpath"
8642
8643 input_path="$input_to_shortpath"
8644 # Check if we need to convert this using DOS-style short mode. If the path
8645 # contains just simple characters, use it. Otherwise (spaces, weird characters),
8646 # take no chances and rewrite it.
8647 # Note: m4 eats our [], so we need to use [ and ] instead.
8648 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8649 if test "x$has_forbidden_chars" != x; then
8650 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8651 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8652 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8653 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8654 # Going to short mode and back again did indeed matter. Since short mode is
8655 # case insensitive, let's make it lowercase to improve readability.
8656 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8657 # Now convert it back to Unix-stile (cygpath)
8658 input_path=`$CYGPATH -u "$shortmode_path"`
8659 new_path="$input_path"
8660 fi
8661 fi
8662
8663 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8664 if test "x$test_cygdrive_prefix" = x; then
8665 # As a simple fix, exclude /usr/bin since it's not a real path.
8666 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8667 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8668 # a path prefixed by /cygdrive for fixpath to work.
8669 new_path="$CYGWIN_ROOT_PATH$input_path"
8670 fi
8671 fi
8672
8673 # remove trailing .exe if any
8674 new_path="${new_path/%.exe/}"
8675
8676 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8677
8678 # First separate the path from the arguments. This will split at the first
8679 # space.
8680 complete="$FOUND_MAKE"
8681 path="${complete%% *}"
8682 tmp="$complete EOL"
8683 arguments="${tmp#* }"
8684
8685 # Input might be given as Windows format, start by converting to
8686 # unix format.
8687 new_path="$path"
8688
8689 windows_path="$new_path"
8690 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8691 unix_path=`$CYGPATH -u "$windows_path"`
8692 new_path="$unix_path"
8693 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8694 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8695 new_path="$unix_path"
8696 fi
8697
8698
8699 # Now try to locate executable using which
8700 new_path=`$WHICH "$new_path" 2> /dev/null`
8701
8702 if test "x$new_path" = x; then
8703 # Oops. Which didn't find the executable.
8704 # The splitting of arguments from the executable at a space might have been incorrect,
8705 # since paths with space are more likely in Windows. Give it another try with the whole
8706 # argument.
8707 path="$complete"
8708 arguments="EOL"
8709 new_path="$path"
8710
8711 windows_path="$new_path"
8712 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8713 unix_path=`$CYGPATH -u "$windows_path"`
8714 new_path="$unix_path"
8715 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8716 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8717 new_path="$unix_path"
8718 fi
8719
8720
8721 new_path=`$WHICH "$new_path" 2> /dev/null`
8722
8723 if test "x$new_path" = x; then
8724 # It's still not found. Now this is an unrecoverable error.
8725 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8726 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8727 has_space=`$ECHO "$complete" | $GREP " "`
8728 if test "x$has_space" != x; then
8729 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8730 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8731 fi
8732 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8733 fi
8734 fi
8735
8736 # Now new_path has a complete unix path to the binary
8737 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8738 # Keep paths in /bin as-is, but remove trailing .exe if any
8739 new_path="${new_path/%.exe/}"
8740 # Do not save /bin paths to all_fixpath_prefixes!
8741 else
8742 # Not in mixed or Windows style, start by that.
8743 new_path=`cmd //c echo $new_path`
8744
8745 input_path="$new_path"
8746 # Check if we need to convert this using DOS-style short mode. If the path
8747 # contains just simple characters, use it. Otherwise (spaces, weird characters),
8748 # take no chances and rewrite it.
8749 # Note: m4 eats our [], so we need to use [ and ] instead.
8750 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8751 if test "x$has_forbidden_chars" != x; then
8752 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8753 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8754 fi
8755
8756 # Output is in $new_path
8757
8758 windows_path="$new_path"
8759 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8760 unix_path=`$CYGPATH -u "$windows_path"`
8761 new_path="$unix_path"
8762 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8763 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8764 new_path="$unix_path"
8765 fi
8766
8767 # remove trailing .exe if any
8768 new_path="${new_path/%.exe/}"
8769
8770 # Save the first 10 bytes of this path to the storage, so fixpath can work.
8771 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8772 fi
8773
8774 else
8775 # We're on a posix platform. Hooray! :)
8776 # First separate the path from the arguments. This will split at the first
8777 # space.
8778 complete="$FOUND_MAKE"
8779 path="${complete%% *}"
8780 tmp="$complete EOL"
8781 arguments="${tmp#* }"
8782
8783 # Cannot rely on the command "which" here since it doesn't always work.
8784 is_absolute_path=`$ECHO "$path" | $GREP ^/`
8785 if test -z "$is_absolute_path"; then
8786 # Path to executable is not absolute. Find it.
8787 IFS_save="$IFS"
8788 IFS=:
8789 for p in $PATH; do
8790 if test -f "$p/$path" && test -x "$p/$path"; then
8791 new_path="$p/$path"
8792 break
8793 fi
8794 done
8795 IFS="$IFS_save"
8796 else
8797 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8798 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8799 new_path="$path"
8800 fi
8801
8802 if test "x$new_path" = x; then
8803 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8804 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8805 has_space=`$ECHO "$complete" | $GREP " "`
8806 if test "x$has_space" != x; then
8807 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8808 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8809 fi
8810 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8811 fi
8812 fi
8813
8814 # Now join together the path and the arguments once again
8815 if test "x$arguments" != xEOL; then
8816 new_complete="$new_path ${arguments% *}"
8817 else
8818 new_complete="$new_path"
8819 fi
8820
8821 if test "x$complete" != "x$new_complete"; then
8822 FOUND_MAKE="$new_complete"
8823 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8824 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8825 fi
8826
8827 fi
8828 fi
8829 fi
8830 fi
8831
8832
8833 if test "x$FOUND_MAKE" = x; then
8834 for ac_prog in make
8835 do
8836 # Extract the first word of "$ac_prog", so it can be a program name with args.
8837 set dummy $ac_prog; ac_word=$2
8838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8839 $as_echo_n "checking for $ac_word... " >&6; }
8840 if ${ac_cv_path_CHECK_MAKE+:} false; then :
8841 $as_echo_n "(cached) " >&6
8842 else
8843 case $CHECK_MAKE in
8844 [\\/]* | ?:[\\/]*)
8845 ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8846 ;;
8847 *)
8848 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8849 for as_dir in $PATH
8850 do
8851 IFS=$as_save_IFS
8852 test -z "$as_dir" && as_dir=.
8853 for ac_exec_ext in '' $ac_executable_extensions; do
8854 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8855 ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8856 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8857 break 2
8858 fi
8859 done
8860 done
8861 IFS=$as_save_IFS
8862
8863 ;;
8864 esac
8865 fi
8866 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8867 if test -n "$CHECK_MAKE"; then
8868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8869 $as_echo "$CHECK_MAKE" >&6; }
8870 else
8871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8872 $as_echo "no" >&6; }
8873 fi
8874
8875
8876 test -n "$CHECK_MAKE" && break
8877 done
8878
8879
8880 MAKE_CANDIDATE=""$CHECK_MAKE""
8881 DESCRIPTION="make in PATH"
8882 if test "x$MAKE_CANDIDATE" != x; then
8883 { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8884 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8885 MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8886 IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8887 if test "x$IS_GNU_MAKE" = x; then
8888 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8889 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8890 else
8891 IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8892 if test "x$IS_MODERN_MAKE" = x; then
8893 { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
8894 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
8895 else
8896 if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8897 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8898 MAKE_EXPECTED_ENV='cygwin'
8899 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8900 MAKE_EXPECTED_ENV='msys'
8901 else
8902 as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8903 fi
8904 MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8905 IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8906 else
8907 # Not relevant for non-Windows
8908 IS_MAKE_CORRECT_ENV=true
8909 fi
8910 if test "x$IS_MAKE_CORRECT_ENV" = x; then
8911 { $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
8912 $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;}
8913 else
8914 FOUND_MAKE=$MAKE_CANDIDATE
8915
8916 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8917
8918 # First separate the path from the arguments. This will split at the first
8919 # space.
8920 complete="$FOUND_MAKE"
8921 path="${complete%% *}"
8922 tmp="$complete EOL"
8923 arguments="${tmp#* }"
8924
8925 # Input might be given as Windows format, start by converting to
8926 # unix format.
8927 new_path=`$CYGPATH -u "$path"`
8928
8929 # Now try to locate executable using which
8930 new_path=`$WHICH "$new_path" 2> /dev/null`
8931 # bat and cmd files are not always considered executable in cygwin causing which
8932 # to not find them
8933 if test "x$new_path" = x \
8934 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8935 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8936 new_path=`$CYGPATH -u "$path"`
8937 fi
8938 if test "x$new_path" = x; then
8939 # Oops. Which didn't find the executable.
8940 # The splitting of arguments from the executable at a space might have been incorrect,
8941 # since paths with space are more likely in Windows. Give it another try with the whole
8942 # argument.
8943 path="$complete"
8944 arguments="EOL"
8945 new_path=`$CYGPATH -u "$path"`
8946 new_path=`$WHICH "$new_path" 2> /dev/null`
8947 # bat and cmd files are not always considered executable in cygwin causing which
8948 # to not find them
8949 if test "x$new_path" = x \
8950 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8951 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8952 new_path=`$CYGPATH -u "$path"`
8953 fi
8954 if test "x$new_path" = x; then
8955 # It's still not found. Now this is an unrecoverable error.
8956 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8957 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8958 has_space=`$ECHO "$complete" | $GREP " "`
8959 if test "x$has_space" != x; then
8960 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8961 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8962 fi
8963 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8964 fi
8965 fi
8966
8967 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8968 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8969 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8970 # "foo.exe" is OK but "foo" is an error.
8971 #
8972 # This test is therefore slightly more accurate than "test -f" to check for file precense.
8973 # It is also a way to make sure we got the proper file name for the real test later on.
8974 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8975 if test "x$test_shortpath" = x; then
8976 # Short path failed, file does not exist as specified.
8977 # Try adding .exe or .cmd
8978 if test -f "${new_path}.exe"; then
8979 input_to_shortpath="${new_path}.exe"
8980 elif test -f "${new_path}.cmd"; then
8981 input_to_shortpath="${new_path}.cmd"
8982 else
8983 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8984 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8985 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8986 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8987 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8988 fi
8989 else
8990 input_to_shortpath="$new_path"
8991 fi
8992
8993 # Call helper function which possibly converts this using DOS-style short mode.
8994 # If so, the updated path is stored in $new_path.
8995 new_path="$input_to_shortpath"
8996
8997 input_path="$input_to_shortpath"
8998 # Check if we need to convert this using DOS-style short mode. If the path
8999 # contains just simple characters, use it. Otherwise (spaces, weird characters),
9000 # take no chances and rewrite it.
9001 # Note: m4 eats our [], so we need to use [ and ] instead.
9002 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9003 if test "x$has_forbidden_chars" != x; then
9004 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9005 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9006 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9007 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9008 # Going to short mode and back again did indeed matter. Since short mode is
9009 # case insensitive, let's make it lowercase to improve readability.
9010 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9011 # Now convert it back to Unix-stile (cygpath)
9012 input_path=`$CYGPATH -u "$shortmode_path"`
9013 new_path="$input_path"
9014 fi
9015 fi
9016
9017 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9018 if test "x$test_cygdrive_prefix" = x; then
9019 # As a simple fix, exclude /usr/bin since it's not a real path.
9020 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9021 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9022 # a path prefixed by /cygdrive for fixpath to work.
9023 new_path="$CYGWIN_ROOT_PATH$input_path"
9024 fi
9025 fi
9026
9027 # remove trailing .exe if any
9028 new_path="${new_path/%.exe/}"
9029
9030 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9031
9032 # First separate the path from the arguments. This will split at the first
9033 # space.
9034 complete="$FOUND_MAKE"
9035 path="${complete%% *}"
9036 tmp="$complete EOL"
9037 arguments="${tmp#* }"
9038
9039 # Input might be given as Windows format, start by converting to
9040 # unix format.
9041 new_path="$path"
9042
9043 windows_path="$new_path"
9044 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9045 unix_path=`$CYGPATH -u "$windows_path"`
9046 new_path="$unix_path"
9047 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9048 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9049 new_path="$unix_path"
9050 fi
9051
9052
9053 # Now try to locate executable using which
9054 new_path=`$WHICH "$new_path" 2> /dev/null`
9055
9056 if test "x$new_path" = x; then
9057 # Oops. Which didn't find the executable.
9058 # The splitting of arguments from the executable at a space might have been incorrect,
9059 # since paths with space are more likely in Windows. Give it another try with the whole
9060 # argument.
9061 path="$complete"
9062 arguments="EOL"
9063 new_path="$path"
9064
9065 windows_path="$new_path"
9066 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9067 unix_path=`$CYGPATH -u "$windows_path"`
9068 new_path="$unix_path"
9069 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9070 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9071 new_path="$unix_path"
9072 fi
9073
9074
9075 new_path=`$WHICH "$new_path" 2> /dev/null`
9076
9077 if test "x$new_path" = x; then
9078 # It's still not found. Now this is an unrecoverable error.
9079 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9080 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9081 has_space=`$ECHO "$complete" | $GREP " "`
9082 if test "x$has_space" != x; then
9083 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9084 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9085 fi
9086 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9087 fi
9088 fi
9089
9090 # Now new_path has a complete unix path to the binary
9091 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9092 # Keep paths in /bin as-is, but remove trailing .exe if any
9093 new_path="${new_path/%.exe/}"
9094 # Do not save /bin paths to all_fixpath_prefixes!
9095 else
9096 # Not in mixed or Windows style, start by that.
9097 new_path=`cmd //c echo $new_path`
9098
9099 input_path="$new_path"
9100 # Check if we need to convert this using DOS-style short mode. If the path
9101 # contains just simple characters, use it. Otherwise (spaces, weird characters),
9102 # take no chances and rewrite it.
9103 # Note: m4 eats our [], so we need to use [ and ] instead.
9104 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9105 if test "x$has_forbidden_chars" != x; then
9106 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9107 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9108 fi
9109
9110 # Output is in $new_path
9111
9112 windows_path="$new_path"
9113 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9114 unix_path=`$CYGPATH -u "$windows_path"`
9115 new_path="$unix_path"
9116 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9117 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9118 new_path="$unix_path"
9119 fi
9120
9121 # remove trailing .exe if any
9122 new_path="${new_path/%.exe/}"
9123
9124 # Save the first 10 bytes of this path to the storage, so fixpath can work.
9125 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9126 fi
9127
9128 else
9129 # We're on a posix platform. Hooray! :)
9130 # First separate the path from the arguments. This will split at the first
9131 # space.
9132 complete="$FOUND_MAKE"
9133 path="${complete%% *}"
9134 tmp="$complete EOL"
9135 arguments="${tmp#* }"
9136
9137 # Cannot rely on the command "which" here since it doesn't always work.
9138 is_absolute_path=`$ECHO "$path" | $GREP ^/`
9139 if test -z "$is_absolute_path"; then
9140 # Path to executable is not absolute. Find it.
9141 IFS_save="$IFS"
9142 IFS=:
9143 for p in $PATH; do
9144 if test -f "$p/$path" && test -x "$p/$path"; then
9145 new_path="$p/$path"
9146 break
9147 fi
9148 done
9149 IFS="$IFS_save"
9150 else
9151 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9152 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9153 new_path="$path"
9154 fi
9155
9156 if test "x$new_path" = x; then
9157 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9158 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9159 has_space=`$ECHO "$complete" | $GREP " "`
9160 if test "x$has_space" != x; then
9161 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9162 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9163 fi
9164 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9165 fi
9166 fi
9167
9168 # Now join together the path and the arguments once again
9169 if test "x$arguments" != xEOL; then
9170 new_complete="$new_path ${arguments% *}"
9171 else
9172 new_complete="$new_path"
9173 fi
9174
9175 if test "x$complete" != "x$new_complete"; then
9176 FOUND_MAKE="$new_complete"
9177 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9178 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9179 fi
9180
9181 fi
9182 fi
9183 fi
9184 fi
9185
9186 fi
9187
9188 if test "x$FOUND_MAKE" = x; then
9189 if test "x$TOOLS_DIR" != x; then
9190 # We have a tools-dir, check that as well before giving up.
9191 OLD_PATH=$PATH
9192 PATH=$TOOLS_DIR:$PATH
9193 for ac_prog in gmake
9194 do
9195 # Extract the first word of "$ac_prog", so it can be a program name with args.
9196 set dummy $ac_prog; ac_word=$2
9197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9198 $as_echo_n "checking for $ac_word... " >&6; }
9199 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
9200 $as_echo_n "(cached) " >&6
9201 else
9202 case $CHECK_TOOLSDIR_GMAKE in
9203 [\\/]* | ?:[\\/]*)
9204 ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9205 ;;
9206 *)
9207 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9208 for as_dir in $PATH
9209 do
9210 IFS=$as_save_IFS
9211 test -z "$as_dir" && as_dir=.
9212 for ac_exec_ext in '' $ac_executable_extensions; do
9213 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9214 ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9215 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9216 break 2
9217 fi
9218 done
9219 done
9220 IFS=$as_save_IFS
9221
9222 ;;
9223 esac
9224 fi
9225 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9226 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9228 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9229 else
9230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9231 $as_echo "no" >&6; }
9232 fi
9233
9234
9235 test -n "$CHECK_TOOLSDIR_GMAKE" && break
9236 done
9237
9238
9239 MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9240 DESCRIPTION="gmake in tools-dir"
9241 if test "x$MAKE_CANDIDATE" != x; then
9242 { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9243 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9244 MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9245 IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9246 if test "x$IS_GNU_MAKE" = x; then
9247 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9248 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9249 else
9250 IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9251 if test "x$IS_MODERN_MAKE" = x; then
9252 { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
9253 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
9254 else
9255 if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9256 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9257 MAKE_EXPECTED_ENV='cygwin'
9258 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9259 MAKE_EXPECTED_ENV='msys'
9260 else
9261 as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9262 fi
9263 MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9264 IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9265 else
9266 # Not relevant for non-Windows
9267 IS_MAKE_CORRECT_ENV=true
9268 fi
9269 if test "x$IS_MAKE_CORRECT_ENV" = x; then
9270 { $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
9271 $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;}
9272 else
9273 FOUND_MAKE=$MAKE_CANDIDATE
9274
9275 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9276
9277 # First separate the path from the arguments. This will split at the first
9278 # space.
9279 complete="$FOUND_MAKE"
9280 path="${complete%% *}"
9281 tmp="$complete EOL"
9282 arguments="${tmp#* }"
9283
9284 # Input might be given as Windows format, start by converting to
9285 # unix format.
9286 new_path=`$CYGPATH -u "$path"`
9287
9288 # Now try to locate executable using which
9289 new_path=`$WHICH "$new_path" 2> /dev/null`
9290 # bat and cmd files are not always considered executable in cygwin causing which
9291 # to not find them
9292 if test "x$new_path" = x \
9293 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9294 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9295 new_path=`$CYGPATH -u "$path"`
9296 fi
9297 if test "x$new_path" = x; then
9298 # Oops. Which didn't find the executable.
9299 # The splitting of arguments from the executable at a space might have been incorrect,
9300 # since paths with space are more likely in Windows. Give it another try with the whole
9301 # argument.
9302 path="$complete"
9303 arguments="EOL"
9304 new_path=`$CYGPATH -u "$path"`
9305 new_path=`$WHICH "$new_path" 2> /dev/null`
9306 # bat and cmd files are not always considered executable in cygwin causing which
9307 # to not find them
9308 if test "x$new_path" = x \
9309 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9310 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9311 new_path=`$CYGPATH -u "$path"`
9312 fi
9313 if test "x$new_path" = x; then
9314 # It's still not found. Now this is an unrecoverable error.
9315 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9316 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9317 has_space=`$ECHO "$complete" | $GREP " "`
9318 if test "x$has_space" != x; then
9319 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9320 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9321 fi
9322 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9323 fi
9324 fi
9325
9326 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9327 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9328 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9329 # "foo.exe" is OK but "foo" is an error.
9330 #
9331 # This test is therefore slightly more accurate than "test -f" to check for file precense.
9332 # It is also a way to make sure we got the proper file name for the real test later on.
9333 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9334 if test "x$test_shortpath" = x; then
9335 # Short path failed, file does not exist as specified.
9336 # Try adding .exe or .cmd
9337 if test -f "${new_path}.exe"; then
9338 input_to_shortpath="${new_path}.exe"
9339 elif test -f "${new_path}.cmd"; then
9340 input_to_shortpath="${new_path}.cmd"
9341 else
9342 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9343 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9344 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9345 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9346 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9347 fi
9348 else
9349 input_to_shortpath="$new_path"
9350 fi
9351
9352 # Call helper function which possibly converts this using DOS-style short mode.
9353 # If so, the updated path is stored in $new_path.
9354 new_path="$input_to_shortpath"
9355
9356 input_path="$input_to_shortpath"
9357 # Check if we need to convert this using DOS-style short mode. If the path
9358 # contains just simple characters, use it. Otherwise (spaces, weird characters),
9359 # take no chances and rewrite it.
9360 # Note: m4 eats our [], so we need to use [ and ] instead.
9361 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9362 if test "x$has_forbidden_chars" != x; then
9363 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9364 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9365 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9366 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9367 # Going to short mode and back again did indeed matter. Since short mode is
9368 # case insensitive, let's make it lowercase to improve readability.
9369 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9370 # Now convert it back to Unix-stile (cygpath)
9371 input_path=`$CYGPATH -u "$shortmode_path"`
9372 new_path="$input_path"
9373 fi
9374 fi
9375
9376 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9377 if test "x$test_cygdrive_prefix" = x; then
9378 # As a simple fix, exclude /usr/bin since it's not a real path.
9379 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9380 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9381 # a path prefixed by /cygdrive for fixpath to work.
9382 new_path="$CYGWIN_ROOT_PATH$input_path"
9383 fi
9384 fi
9385
9386 # remove trailing .exe if any
9387 new_path="${new_path/%.exe/}"
9388
9389 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9390
9391 # First separate the path from the arguments. This will split at the first
9392 # space.
9393 complete="$FOUND_MAKE"
9394 path="${complete%% *}"
9395 tmp="$complete EOL"
9396 arguments="${tmp#* }"
9397
9398 # Input might be given as Windows format, start by converting to
9399 # unix format.
9400 new_path="$path"
9401
9402 windows_path="$new_path"
9403 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9404 unix_path=`$CYGPATH -u "$windows_path"`
9405 new_path="$unix_path"
9406 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9407 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9408 new_path="$unix_path"
9409 fi
9410
9411
9412 # Now try to locate executable using which
9413 new_path=`$WHICH "$new_path" 2> /dev/null`
9414
9415 if test "x$new_path" = x; then
9416 # Oops. Which didn't find the executable.
9417 # The splitting of arguments from the executable at a space might have been incorrect,
9418 # since paths with space are more likely in Windows. Give it another try with the whole
9419 # argument.
9420 path="$complete"
9421 arguments="EOL"
9422 new_path="$path"
9423
9424 windows_path="$new_path"
9425 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9426 unix_path=`$CYGPATH -u "$windows_path"`
9427 new_path="$unix_path"
9428 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9429 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9430 new_path="$unix_path"
9431 fi
9432
9433
9434 new_path=`$WHICH "$new_path" 2> /dev/null`
9435
9436 if test "x$new_path" = x; then
9437 # It's still not found. Now this is an unrecoverable error.
9438 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9439 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9440 has_space=`$ECHO "$complete" | $GREP " "`
9441 if test "x$has_space" != x; then
9442 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9443 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9444 fi
9445 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9446 fi
9447 fi
9448
9449 # Now new_path has a complete unix path to the binary
9450 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9451 # Keep paths in /bin as-is, but remove trailing .exe if any
9452 new_path="${new_path/%.exe/}"
9453 # Do not save /bin paths to all_fixpath_prefixes!
9454 else
9455 # Not in mixed or Windows style, start by that.
9456 new_path=`cmd //c echo $new_path`
9457
9458 input_path="$new_path"
9459 # Check if we need to convert this using DOS-style short mode. If the path
9460 # contains just simple characters, use it. Otherwise (spaces, weird characters),
9461 # take no chances and rewrite it.
9462 # Note: m4 eats our [], so we need to use [ and ] instead.
9463 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9464 if test "x$has_forbidden_chars" != x; then
9465 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9466 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9467 fi
9468
9469 # Output is in $new_path
9470
9471 windows_path="$new_path"
9472 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9473 unix_path=`$CYGPATH -u "$windows_path"`
9474 new_path="$unix_path"
9475 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9476 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9477 new_path="$unix_path"
9478 fi
9479
9480 # remove trailing .exe if any
9481 new_path="${new_path/%.exe/}"
9482
9483 # Save the first 10 bytes of this path to the storage, so fixpath can work.
9484 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9485 fi
9486
9487 else
9488 # We're on a posix platform. Hooray! :)
9489 # First separate the path from the arguments. This will split at the first
9490 # space.
9491 complete="$FOUND_MAKE"
9492 path="${complete%% *}"
9493 tmp="$complete EOL"
9494 arguments="${tmp#* }"
9495
9496 # Cannot rely on the command "which" here since it doesn't always work.
9497 is_absolute_path=`$ECHO "$path" | $GREP ^/`
9498 if test -z "$is_absolute_path"; then
9499 # Path to executable is not absolute. Find it.
9500 IFS_save="$IFS"
9501 IFS=:
9502 for p in $PATH; do
9503 if test -f "$p/$path" && test -x "$p/$path"; then
9504 new_path="$p/$path"
9505 break
9506 fi
9507 done
9508 IFS="$IFS_save"
9509 else
9510 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9511 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9512 new_path="$path"
9513 fi
9514
9515 if test "x$new_path" = x; then
9516 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9517 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9518 has_space=`$ECHO "$complete" | $GREP " "`
9519 if test "x$has_space" != x; then
9520 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9521 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9522 fi
9523 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9524 fi
9525 fi
9526
9527 # Now join together the path and the arguments once again
9528 if test "x$arguments" != xEOL; then
9529 new_complete="$new_path ${arguments% *}"
9530 else
9531 new_complete="$new_path"
9532 fi
9533
9534 if test "x$complete" != "x$new_complete"; then
9535 FOUND_MAKE="$new_complete"
9536 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9537 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9538 fi
9539
9540 fi
9541 fi
9542 fi
9543 fi
9544
9545 if test "x$FOUND_MAKE" = x; then
9546 for ac_prog in make
9547 do
9548 # Extract the first word of "$ac_prog", so it can be a program name with args.
9549 set dummy $ac_prog; ac_word=$2
9550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9551 $as_echo_n "checking for $ac_word... " >&6; }
9552 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
9553 $as_echo_n "(cached) " >&6
9554 else
9555 case $CHECK_TOOLSDIR_MAKE in
9556 [\\/]* | ?:[\\/]*)
9557 ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9558 ;;
9559 *)
9560 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9561 for as_dir in $PATH
9562 do
9563 IFS=$as_save_IFS
9564 test -z "$as_dir" && as_dir=.
9565 for ac_exec_ext in '' $ac_executable_extensions; do
9566 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9567 ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9568 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9569 break 2
9570 fi
9571 done
9572 done
9573 IFS=$as_save_IFS
9574
9575 ;;
9576 esac
9577 fi
9578 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9579 if test -n "$CHECK_TOOLSDIR_MAKE"; then
9580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9581 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9582 else
9583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9584 $as_echo "no" >&6; }
9585 fi
9586
9587
9588 test -n "$CHECK_TOOLSDIR_MAKE" && break
9589 done
9590
9591
9592 MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9593 DESCRIPTION="make in tools-dir"
9594 if test "x$MAKE_CANDIDATE" != x; then
9595 { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9596 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9597 MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9598 IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9599 if test "x$IS_GNU_MAKE" = x; then
9600 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9601 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9602 else
9603 IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9604 if test "x$IS_MODERN_MAKE" = x; then
9605 { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
9606 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
9607 else
9608 if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9609 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9610 MAKE_EXPECTED_ENV='cygwin'
9611 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9612 MAKE_EXPECTED_ENV='msys'
9613 else
9614 as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9615 fi
9616 MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9617 IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9618 else
9619 # Not relevant for non-Windows
9620 IS_MAKE_CORRECT_ENV=true
9621 fi
9622 if test "x$IS_MAKE_CORRECT_ENV" = x; then
9623 { $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
9624 $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;}
9625 else
9626 FOUND_MAKE=$MAKE_CANDIDATE
9627
9628 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9629
9630 # First separate the path from the arguments. This will split at the first
9631 # space.
9632 complete="$FOUND_MAKE"
9633 path="${complete%% *}"
9634 tmp="$complete EOL"
9635 arguments="${tmp#* }"
9636
9637 # Input might be given as Windows format, start by converting to
9638 # unix format.
9639 new_path=`$CYGPATH -u "$path"`
9640
9641 # Now try to locate executable using which
9642 new_path=`$WHICH "$new_path" 2> /dev/null`
9643 # bat and cmd files are not always considered executable in cygwin causing which
9644 # to not find them
9645 if test "x$new_path" = x \
9646 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9647 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9648 new_path=`$CYGPATH -u "$path"`
9649 fi
9650 if test "x$new_path" = x; then
9651 # Oops. Which didn't find the executable.
9652 # The splitting of arguments from the executable at a space might have been incorrect,
9653 # since paths with space are more likely in Windows. Give it another try with the whole
9654 # argument.
9655 path="$complete"
9656 arguments="EOL"
9657 new_path=`$CYGPATH -u "$path"`
9658 new_path=`$WHICH "$new_path" 2> /dev/null`
9659 # bat and cmd files are not always considered executable in cygwin causing which
9660 # to not find them
9661 if test "x$new_path" = x \
9662 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9663 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9664 new_path=`$CYGPATH -u "$path"`
9665 fi
9666 if test "x$new_path" = x; then
9667 # It's still not found. Now this is an unrecoverable error.
9668 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9669 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9670 has_space=`$ECHO "$complete" | $GREP " "`
9671 if test "x$has_space" != x; then
9672 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9673 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9674 fi
9675 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9676 fi
9677 fi
9678
9679 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9680 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9681 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9682 # "foo.exe" is OK but "foo" is an error.
9683 #
9684 # This test is therefore slightly more accurate than "test -f" to check for file precense.
9685 # It is also a way to make sure we got the proper file name for the real test later on.
9686 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9687 if test "x$test_shortpath" = x; then
9688 # Short path failed, file does not exist as specified.
9689 # Try adding .exe or .cmd
9690 if test -f "${new_path}.exe"; then
9691 input_to_shortpath="${new_path}.exe"
9692 elif test -f "${new_path}.cmd"; then
9693 input_to_shortpath="${new_path}.cmd"
9694 else
9695 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9696 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9697 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9698 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9699 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9700 fi
9701 else
9702 input_to_shortpath="$new_path"
9703 fi
9704
9705 # Call helper function which possibly converts this using DOS-style short mode.
9706 # If so, the updated path is stored in $new_path.
9707 new_path="$input_to_shortpath"
9708
9709 input_path="$input_to_shortpath"
9710 # Check if we need to convert this using DOS-style short mode. If the path
9711 # contains just simple characters, use it. Otherwise (spaces, weird characters),
9712 # take no chances and rewrite it.
9713 # Note: m4 eats our [], so we need to use [ and ] instead.
9714 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9715 if test "x$has_forbidden_chars" != x; then
9716 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9717 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9718 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9719 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9720 # Going to short mode and back again did indeed matter. Since short mode is
9721 # case insensitive, let's make it lowercase to improve readability.
9722 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9723 # Now convert it back to Unix-stile (cygpath)
9724 input_path=`$CYGPATH -u "$shortmode_path"`
9725 new_path="$input_path"
9726 fi
9727 fi
9728
9729 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9730 if test "x$test_cygdrive_prefix" = x; then
9731 # As a simple fix, exclude /usr/bin since it's not a real path.
9732 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9733 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9734 # a path prefixed by /cygdrive for fixpath to work.
9735 new_path="$CYGWIN_ROOT_PATH$input_path"
9736 fi
9737 fi
9738
9739 # remove trailing .exe if any
9740 new_path="${new_path/%.exe/}"
9741
9742 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9743
9744 # First separate the path from the arguments. This will split at the first
9745 # space.
9746 complete="$FOUND_MAKE"
9747 path="${complete%% *}"
9748 tmp="$complete EOL"
9749 arguments="${tmp#* }"
9750
9751 # Input might be given as Windows format, start by converting to
9752 # unix format.
9753 new_path="$path"
9754
9755 windows_path="$new_path"
9756 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9757 unix_path=`$CYGPATH -u "$windows_path"`
9758 new_path="$unix_path"
9759 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9760 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9761 new_path="$unix_path"
9762 fi
9763
9764
9765 # Now try to locate executable using which
9766 new_path=`$WHICH "$new_path" 2> /dev/null`
9767
9768 if test "x$new_path" = x; then
9769 # Oops. Which didn't find the executable.
9770 # The splitting of arguments from the executable at a space might have been incorrect,
9771 # since paths with space are more likely in Windows. Give it another try with the whole
9772 # argument.
9773 path="$complete"
9774 arguments="EOL"
9775 new_path="$path"
9776
9777 windows_path="$new_path"
9778 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9779 unix_path=`$CYGPATH -u "$windows_path"`
9780 new_path="$unix_path"
9781 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9782 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9783 new_path="$unix_path"
9784 fi
9785
9786
9787 new_path=`$WHICH "$new_path" 2> /dev/null`
9788
9789 if test "x$new_path" = x; then
9790 # It's still not found. Now this is an unrecoverable error.
9791 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9792 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9793 has_space=`$ECHO "$complete" | $GREP " "`
9794 if test "x$has_space" != x; then
9795 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9796 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9797 fi
9798 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9799 fi
9800 fi
9801
9802 # Now new_path has a complete unix path to the binary
9803 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9804 # Keep paths in /bin as-is, but remove trailing .exe if any
9805 new_path="${new_path/%.exe/}"
9806 # Do not save /bin paths to all_fixpath_prefixes!
9807 else
9808 # Not in mixed or Windows style, start by that.
9809 new_path=`cmd //c echo $new_path`
9810
9811 input_path="$new_path"
9812 # Check if we need to convert this using DOS-style short mode. If the path
9813 # contains just simple characters, use it. Otherwise (spaces, weird characters),
9814 # take no chances and rewrite it.
9815 # Note: m4 eats our [], so we need to use [ and ] instead.
9816 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9817 if test "x$has_forbidden_chars" != x; then
9818 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9819 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9820 fi
9821
9822 # Output is in $new_path
9823
9824 windows_path="$new_path"
9825 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9826 unix_path=`$CYGPATH -u "$windows_path"`
9827 new_path="$unix_path"
9828 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9829 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9830 new_path="$unix_path"
9831 fi
9832
9833 # remove trailing .exe if any
9834 new_path="${new_path/%.exe/}"
9835
9836 # Save the first 10 bytes of this path to the storage, so fixpath can work.
9837 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9838 fi
9839
9840 else
9841 # We're on a posix platform. Hooray! :)
9842 # First separate the path from the arguments. This will split at the first
9843 # space.
9844 complete="$FOUND_MAKE"
9845 path="${complete%% *}"
9846 tmp="$complete EOL"
9847 arguments="${tmp#* }"
9848
9849 # Cannot rely on the command "which" here since it doesn't always work.
9850 is_absolute_path=`$ECHO "$path" | $GREP ^/`
9851 if test -z "$is_absolute_path"; then
9852 # Path to executable is not absolute. Find it.
9853 IFS_save="$IFS"
9854 IFS=:
9855 for p in $PATH; do
9856 if test -f "$p/$path" && test -x "$p/$path"; then
9857 new_path="$p/$path"
9858 break
9859 fi
9860 done
9861 IFS="$IFS_save"
9862 else
9863 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9864 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9865 new_path="$path"
9866 fi
9867
9868 if test "x$new_path" = x; then
9869 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9870 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9871 has_space=`$ECHO "$complete" | $GREP " "`
9872 if test "x$has_space" != x; then
9873 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9874 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9875 fi
9876 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9877 fi
9878 fi
9879
9880 # Now join together the path and the arguments once again
9881 if test "x$arguments" != xEOL; then
9882 new_complete="$new_path ${arguments% *}"
9883 else
9884 new_complete="$new_path"
9885 fi
9886
9887 if test "x$complete" != "x$new_complete"; then
9888 FOUND_MAKE="$new_complete"
9889 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9890 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9891 fi
9892
9893 fi
9894 fi
9895 fi
9896 fi
9897
9898 fi
9899 PATH=$OLD_PATH
9900 fi
9901 fi
9902
9903 if test "x$FOUND_MAKE" = x; then
9904 as_fn_error $? "Cannot find GNU make 3.81 or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure." "$LINENO" 5
9905 fi
9906 fi
9907
9908 MAKE=$FOUND_MAKE
9909
9910 { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9911 $as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9912
9913
9914
9915 # Test if find supports -delete
9916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9917 $as_echo_n "checking if find supports -delete... " >&6; }
9918 FIND_DELETE="-delete"
9919
9920 DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9921
9922 echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9923
9924 TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9925 if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9926 # No, it does not.
9927 rm $DELETEDIR/TestIfFindSupportsDelete
9928 FIND_DELETE="-exec rm \{\} \+"
9929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9930 $as_echo "no" >&6; }
9931 else
9932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9933 $as_echo "yes" >&6; }
9934 fi
9935 rmdir $DELETEDIR
9936
9937
9938
9939 # These tools might not be installed by default,
9940 # need hint on how to install them.
9941
9942 for ac_prog in unzip
9943 do
9944 # Extract the first word of "$ac_prog", so it can be a program name with args.
9945 set dummy $ac_prog; ac_word=$2
9946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9947 $as_echo_n "checking for $ac_word... " >&6; }
9948 if ${ac_cv_path_UNZIP+:} false; then :
9949 $as_echo_n "(cached) " >&6
9950 else
9951 case $UNZIP in
9952 [\\/]* | ?:[\\/]*)
9953 ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
9954 ;;
9955 *)
9956 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9957 for as_dir in $PATH
9958 do
9959 IFS=$as_save_IFS
9960 test -z "$as_dir" && as_dir=.
9961 for ac_exec_ext in '' $ac_executable_extensions; do
9962 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9963 ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
9964 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9965 break 2
9966 fi
9967 done
9968 done
9969 IFS=$as_save_IFS
9970
9971 ;;
9972 esac
9973 fi
9974 UNZIP=$ac_cv_path_UNZIP
9975 if test -n "$UNZIP"; then
9976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
9977 $as_echo "$UNZIP" >&6; }
9978 else
9979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9980 $as_echo "no" >&6; }
9981 fi
9982
9983
9984 test -n "$UNZIP" && break
9985 done
9986
9987
9988 if test "x$UNZIP" = x; then
9989 if test "xunzip" = x; then
9990 PROG_NAME=unzip
9991 else
9992 PROG_NAME=unzip
9993 fi
9994 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9995 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9996 as_fn_error $? "Cannot continue" "$LINENO" 5
9997 fi
9998
9999
10000
10001 for ac_prog in zip
10002 do
10003 # Extract the first word of "$ac_prog", so it can be a program name with args.
10004 set dummy $ac_prog; ac_word=$2
10005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10006 $as_echo_n "checking for $ac_word... " >&6; }
10007 if ${ac_cv_path_ZIP+:} false; then :
10008 $as_echo_n "(cached) " >&6
10009 else
10010 case $ZIP in
10011 [\\/]* | ?:[\\/]*)
10012 ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
10013 ;;
10014 *)
10015 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10016 for as_dir in $PATH
10017 do
10018 IFS=$as_save_IFS
10019 test -z "$as_dir" && as_dir=.
10020 for ac_exec_ext in '' $ac_executable_extensions; do
10021 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10022 ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
10023 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10024 break 2
10025 fi
10026 done
10027 done
10028 IFS=$as_save_IFS
10029
10030 ;;
10031 esac
10032 fi
10033 ZIP=$ac_cv_path_ZIP
10034 if test -n "$ZIP"; then
10035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10036 $as_echo "$ZIP" >&6; }
10037 else
10038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10039 $as_echo "no" >&6; }
10040 fi
10041
10042
10043 test -n "$ZIP" && break
10044 done
10045
10046
10047 if test "x$ZIP" = x; then
10048 if test "xzip" = x; then
10049 PROG_NAME=zip
10050 else
10051 PROG_NAME=zip
10052 fi
10053 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10054 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10055 as_fn_error $? "Cannot continue" "$LINENO" 5
10056 fi
10057
10058
10059
10060 # Non-required basic tools
10061
10062 # Extract the first word of "ldd", so it can be a program name with args.
10063 set dummy ldd; ac_word=$2
10064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10065 $as_echo_n "checking for $ac_word... " >&6; }
10066 if ${ac_cv_path_LDD+:} false; then :
10067 $as_echo_n "(cached) " >&6
10068 else
10069 case $LDD in
10070 [\\/]* | ?:[\\/]*)
10071 ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10072 ;;
10073 *)
10074 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10075 for as_dir in $PATH
10076 do
10077 IFS=$as_save_IFS
10078 test -z "$as_dir" && as_dir=.
10079 for ac_exec_ext in '' $ac_executable_extensions; do
10080 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10081 ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10082 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10083 break 2
10084 fi
10085 done
10086 done
10087 IFS=$as_save_IFS
10088
10089 ;;
10090 esac
10091 fi
10092 LDD=$ac_cv_path_LDD
10093 if test -n "$LDD"; then
10094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10095 $as_echo "$LDD" >&6; }
10096 else
10097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10098 $as_echo "no" >&6; }
10099 fi
10100
10101
10102 if test "x$LDD" = "x"; then
10103 # List shared lib dependencies is used for
10104 # debug output and checking for forbidden dependencies.
10105 # We can build without it.
10106 LDD="true"
10107 fi
10108 # Extract the first word of "otool", so it can be a program name with args.
10109 set dummy otool; ac_word=$2
10110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10111 $as_echo_n "checking for $ac_word... " >&6; }
10112 if ${ac_cv_path_OTOOL+:} false; then :
10113 $as_echo_n "(cached) " >&6
10114 else
10115 case $OTOOL in
10116 [\\/]* | ?:[\\/]*)
10117 ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10118 ;;
10119 *)
10120 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10121 for as_dir in $PATH
10122 do
10123 IFS=$as_save_IFS
10124 test -z "$as_dir" && as_dir=.
10125 for ac_exec_ext in '' $ac_executable_extensions; do
10126 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10127 ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10128 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10129 break 2
10130 fi
10131 done
10132 done
10133 IFS=$as_save_IFS
10134
10135 ;;
10136 esac
10137 fi
10138 OTOOL=$ac_cv_path_OTOOL
10139 if test -n "$OTOOL"; then
10140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10141 $as_echo "$OTOOL" >&6; }
10142 else
10143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10144 $as_echo "no" >&6; }
10145 fi
10146
10147
10148 if test "x$OTOOL" = "x"; then
10149 OTOOL="true"
10150 fi
10151 for ac_prog in readelf greadelf
10152 do
10153 # Extract the first word of "$ac_prog", so it can be a program name with args.
10154 set dummy $ac_prog; ac_word=$2
10155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10156 $as_echo_n "checking for $ac_word... " >&6; }
10157 if ${ac_cv_path_READELF+:} false; then :
10158 $as_echo_n "(cached) " >&6
10159 else
10160 case $READELF in
10161 [\\/]* | ?:[\\/]*)
10162 ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10163 ;;
10164 *)
10165 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10166 for as_dir in $PATH
10167 do
10168 IFS=$as_save_IFS
10169 test -z "$as_dir" && as_dir=.
10170 for ac_exec_ext in '' $ac_executable_extensions; do
10171 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10172 ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10173 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10174 break 2
10175 fi
10176 done
10177 done
10178 IFS=$as_save_IFS
10179
10180 ;;
10181 esac
10182 fi
10183 READELF=$ac_cv_path_READELF
10184 if test -n "$READELF"; then
10185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10186 $as_echo "$READELF" >&6; }
10187 else
10188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10189 $as_echo "no" >&6; }
10190 fi
10191
10192
10193 test -n "$READELF" && break
10194 done
10195
10196 # Extract the first word of "hg", so it can be a program name with args.
10197 set dummy hg; ac_word=$2
10198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10199 $as_echo_n "checking for $ac_word... " >&6; }
10200 if ${ac_cv_path_HG+:} false; then :
10201 $as_echo_n "(cached) " >&6
10202 else
10203 case $HG in
10204 [\\/]* | ?:[\\/]*)
10205 ac_cv_path_HG="$HG" # Let the user override the test with a path.
10206 ;;
10207 *)
10208 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10209 for as_dir in $PATH
10210 do
10211 IFS=$as_save_IFS
10212 test -z "$as_dir" && as_dir=.
10213 for ac_exec_ext in '' $ac_executable_extensions; do
10214 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10215 ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10216 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10217 break 2
10218 fi
10219 done
10220 done
10221 IFS=$as_save_IFS
10222
10223 ;;
10224 esac
10225 fi
10226 HG=$ac_cv_path_HG
10227 if test -n "$HG"; then
10228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10229 $as_echo "$HG" >&6; }
10230 else
10231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10232 $as_echo "no" >&6; }
10233 fi
10234
10235
10236 # Extract the first word of "stat", so it can be a program name with args.
10237 set dummy stat; ac_word=$2
10238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10239 $as_echo_n "checking for $ac_word... " >&6; }
10240 if ${ac_cv_path_STAT+:} false; then :
10241 $as_echo_n "(cached) " >&6
10242 else
10243 case $STAT in
10244 [\\/]* | ?:[\\/]*)
10245 ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10246 ;;
10247 *)
10248 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10249 for as_dir in $PATH
10250 do
10251 IFS=$as_save_IFS
10252 test -z "$as_dir" && as_dir=.
10253 for ac_exec_ext in '' $ac_executable_extensions; do
10254 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10255 ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10256 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10257 break 2
10258 fi
10259 done
10260 done
10261 IFS=$as_save_IFS
10262
10263 ;;
10264 esac
10265 fi
10266 STAT=$ac_cv_path_STAT
10267 if test -n "$STAT"; then
10268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10269 $as_echo "$STAT" >&6; }
10270 else
10271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10272 $as_echo "no" >&6; }
10273 fi
10274
10275
10276 # Extract the first word of "time", so it can be a program name with args.
10277 set dummy time; ac_word=$2
10278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10279 $as_echo_n "checking for $ac_word... " >&6; }
10280 if ${ac_cv_path_TIME+:} false; then :
10281 $as_echo_n "(cached) " >&6
10282 else
10283 case $TIME in
10284 [\\/]* | ?:[\\/]*)
10285 ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10286 ;;
10287 *)
10288 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10289 for as_dir in $PATH
10290 do
10291 IFS=$as_save_IFS
10292 test -z "$as_dir" && as_dir=.
10293 for ac_exec_ext in '' $ac_executable_extensions; do
10294 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10295 ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10296 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10297 break 2
10298 fi
10299 done
10300 done
10301 IFS=$as_save_IFS
10302
10303 ;;
10304 esac
10305 fi
10306 TIME=$ac_cv_path_TIME
10307 if test -n "$TIME"; then
10308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10309 $as_echo "$TIME" >&6; }
10310 else
10311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10312 $as_echo "no" >&6; }
10313 fi
10314
10315
10316
10317 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10318
10319 for ac_prog in comm
10320 do
10321 # Extract the first word of "$ac_prog", so it can be a program name with args.
10322 set dummy $ac_prog; ac_word=$2
10323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10324 $as_echo_n "checking for $ac_word... " >&6; }
10325 if ${ac_cv_path_COMM+:} false; then :
10326 $as_echo_n "(cached) " >&6
10327 else
10328 case $COMM in
10329 [\\/]* | ?:[\\/]*)
10330 ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10331 ;;
10332 *)
10333 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10334 for as_dir in $PATH
10335 do
10336 IFS=$as_save_IFS
10337 test -z "$as_dir" && as_dir=.
10338 for ac_exec_ext in '' $ac_executable_extensions; do
10339 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10340 ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10341 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10342 break 2
10343 fi
10344 done
10345 done
10346 IFS=$as_save_IFS
10347
10348 ;;
10349 esac
10350 fi
10351 COMM=$ac_cv_path_COMM
10352 if test -n "$COMM"; then
10353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10354 $as_echo "$COMM" >&6; }
10355 else
10356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10357 $as_echo "no" >&6; }
10358 fi
10359
10360
10361 test -n "$COMM" && break
10362 done
10363
10364
10365 if test "x$COMM" = x; then
10366 if test "xcomm" = x; then
10367 PROG_NAME=comm
10368 else
10369 PROG_NAME=comm
10370 fi
10371 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10372 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10373 as_fn_error $? "Cannot continue" "$LINENO" 5
10374 fi
10375
10376
10377 fi
10378
10379
10380 # Check if pkg-config is available.
10381
10382
10383 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10384 if test -n "$ac_tool_prefix"; then
10385 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10386 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10388 $as_echo_n "checking for $ac_word... " >&6; }
10389 if ${ac_cv_path_PKG_CONFIG+:} false; then :
10390 $as_echo_n "(cached) " >&6
10391 else
10392 case $PKG_CONFIG in
10393 [\\/]* | ?:[\\/]*)
10394 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10395 ;;
10396 *)
10397 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10398 for as_dir in $PATH
10399 do
10400 IFS=$as_save_IFS
10401 test -z "$as_dir" && as_dir=.
10402 for ac_exec_ext in '' $ac_executable_extensions; do
10403 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10404 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10405 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10406 break 2
10407 fi
10408 done
10409 done
10410 IFS=$as_save_IFS
10411
10412 ;;
10413 esac
10414 fi
10415 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10416 if test -n "$PKG_CONFIG"; then
10417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10418 $as_echo "$PKG_CONFIG" >&6; }
10419 else
10420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10421 $as_echo "no" >&6; }
10422 fi
10423
10424
10425 fi
10426 if test -z "$ac_cv_path_PKG_CONFIG"; then
10427 ac_pt_PKG_CONFIG=$PKG_CONFIG
10428 # Extract the first word of "pkg-config", so it can be a program name with args.
10429 set dummy pkg-config; ac_word=$2
10430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10431 $as_echo_n "checking for $ac_word... " >&6; }
10432 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10433 $as_echo_n "(cached) " >&6
10434 else
10435 case $ac_pt_PKG_CONFIG in
10436 [\\/]* | ?:[\\/]*)
10437 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10438 ;;
10439 *)
10440 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10441 for as_dir in $PATH
10442 do
10443 IFS=$as_save_IFS
10444 test -z "$as_dir" && as_dir=.
10445 for ac_exec_ext in '' $ac_executable_extensions; do
10446 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10447 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10448 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10449 break 2
10450 fi
10451 done
10452 done
10453 IFS=$as_save_IFS
10454
10455 ;;
10456 esac
10457 fi
10458 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10459 if test -n "$ac_pt_PKG_CONFIG"; then
10460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10461 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
10462 else
10463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10464 $as_echo "no" >&6; }
10465 fi
10466
10467 if test "x$ac_pt_PKG_CONFIG" = x; then
10468 PKG_CONFIG=""
10469 else
10470 case $cross_compiling:$ac_tool_warned in
10471 yes:)
10472 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10473 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10474 ac_tool_warned=yes ;;
10475 esac
10476 PKG_CONFIG=$ac_pt_PKG_CONFIG
10477 fi
10478 else
10479 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10480 fi
10481
10482 fi
10483 if test -n "$PKG_CONFIG"; then
10484 _pkg_min_version=0.9.0
10485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10486 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10487 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10489 $as_echo "yes" >&6; }
10490 else
10491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10492 $as_echo "no" >&6; }
10493 PKG_CONFIG=""
10494 fi
10495
10496 fi
10497
10498 # After basic tools have been setup, we can check build os specific details.
10499
10500 ###############################################################################
10501
10502 # Note that this is the build platform OS version!
10503
10504 OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10505 OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10506 OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10507 OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10508
10509
10510
10511
10512
10513 # Setup builddeps, for automatic downloading of tools we need.
10514 # This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10515 # boot-jdk setup, but we need to have basic tools setup first.
10516
10517
10518 # Check whether --with-builddeps-conf was given.
10519 if test "${with_builddeps_conf+set}" = set; then :
10520 withval=$with_builddeps_conf;
10521 fi
10522
10523
10524
10525 # Check whether --with-builddeps-server was given.
10526 if test "${with_builddeps_server+set}" = set; then :
10527 withval=$with_builddeps_server;
10528 fi
10529
10530
10531
10532 # Check whether --with-builddeps-dir was given.
10533 if test "${with_builddeps_dir+set}" = set; then :
10534 withval=$with_builddeps_dir;
10535 else
10536 with_builddeps_dir=/localhome/builddeps
10537 fi
10538
10539
10540
10541 # Check whether --with-builddeps-group was given.
10542 if test "${with_builddeps_group+set}" = set; then :
10543 withval=$with_builddeps_group;
10544 fi
10545
10546
10547
10548
10549 if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10550 if test "x$with_builddeps_conf" != x; then
10551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10552 $as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10553 builddepsfile=$with_builddeps_conf
10554 if test -s $builddepsfile; then
10555 . $builddepsfile
10556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10557 $as_echo "loaded!" >&6; }
10558 else
10559 as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10560 fi
10561 else
10562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10563 $as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10564 builddepsfile=`mktemp`
10565 touch $builddepsfile
10566 # Put all found confs into a single file.
10567 find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10568 # Source the file to acquire the variables
10569 if test -s $builddepsfile; then
10570 . $builddepsfile
10571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10572 $as_echo "found at least one!" >&6; }
10573 else
10574 as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10575 fi
10576 fi
10577 # Create build and target names that use _ instead of "-" and ".".
10578 # This is necessary to use them in variable names.
10579 build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10580 target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10581 # Extract rewrite information for build and target
10582 eval rewritten_build=\${REWRITE_${build_var}}
10583 if test "x$rewritten_build" = x; then
10584 rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10585 echo Build stays the same $rewritten_build
10586 else
10587 echo Rewriting build for builddeps into $rewritten_build
10588 fi
10589 eval rewritten_target=\${REWRITE_${target_var}}
10590 if test "x$rewritten_target" = x; then
10591 rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10592 echo Target stays the same $rewritten_target
10593 else
10594 echo Rewriting target for builddeps into $rewritten_target
10595 fi
10596 rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10597 rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10598 fi
10599 for ac_prog in 7z unzip
10600 do
10601 # Extract the first word of "$ac_prog", so it can be a program name with args.
10602 set dummy $ac_prog; 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_prog_BDEPS_UNZIP+:} false; then :
10606 $as_echo_n "(cached) " >&6
10607 else
10608 if test -n "$BDEPS_UNZIP"; then
10609 ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10610 else
10611 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10612 for as_dir in $PATH
10613 do
10614 IFS=$as_save_IFS
10615 test -z "$as_dir" && as_dir=.
10616 for ac_exec_ext in '' $ac_executable_extensions; do
10617 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10618 ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10619 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10620 break 2
10621 fi
10622 done
10623 done
10624 IFS=$as_save_IFS
10625
10626 fi
10627 fi
10628 BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10629 if test -n "$BDEPS_UNZIP"; then
10630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10631 $as_echo "$BDEPS_UNZIP" >&6; }
10632 else
10633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10634 $as_echo "no" >&6; }
10635 fi
10636
10637
10638 test -n "$BDEPS_UNZIP" && break
10639 done
10640
10641 if test "x$BDEPS_UNZIP" = x7z; then
10642 BDEPS_UNZIP="7z x"
10643 fi
10644
10645 for ac_prog in wget lftp ftp
10646 do
10647 # Extract the first word of "$ac_prog", so it can be a program name with args.
10648 set dummy $ac_prog; ac_word=$2
10649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10650 $as_echo_n "checking for $ac_word... " >&6; }
10651 if ${ac_cv_prog_BDEPS_FTP+:} false; then :
10652 $as_echo_n "(cached) " >&6
10653 else
10654 if test -n "$BDEPS_FTP"; then
10655 ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10656 else
10657 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10658 for as_dir in $PATH
10659 do
10660 IFS=$as_save_IFS
10661 test -z "$as_dir" && as_dir=.
10662 for ac_exec_ext in '' $ac_executable_extensions; do
10663 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10664 ac_cv_prog_BDEPS_FTP="$ac_prog"
10665 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10666 break 2
10667 fi
10668 done
10669 done
10670 IFS=$as_save_IFS
10671
10672 fi
10673 fi
10674 BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10675 if test -n "$BDEPS_FTP"; then
10676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10677 $as_echo "$BDEPS_FTP" >&6; }
10678 else
10679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10680 $as_echo "no" >&6; }
10681 fi
10682
10683
10684 test -n "$BDEPS_FTP" && break
10685 done
10686
10687
10688
10689 ###############################################################################
10690 #
10691 # Determine OpenJDK variants, options and version numbers.
10692 #
10693 ###############################################################################
10694
10695 # We need build & target for this.
10696
10697
10698 ###############################################################################
10699 #
10700 # Should we build a JDK/JVM with headful support (ie a graphical ui)?
10701 # We always build headless support.
10702 #
10703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10704 $as_echo_n "checking headful support... " >&6; }
10705 # Check whether --enable-headful was given.
10706 if test "${enable_headful+set}" = set; then :
10707 enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10708 else
10709 SUPPORT_HEADFUL=yes
10710 fi
10711
10712
10713 SUPPORT_HEADLESS=yes
10714 BUILD_HEADLESS="BUILD_HEADLESS:=true"
10715
10716 if test "x$SUPPORT_HEADFUL" = xyes; then
10717 # We are building both headful and headless.
10718 headful_msg="inlude support for both headful and headless"
10719 fi
10720
10721 if test "x$SUPPORT_HEADFUL" = xno; then
10722 # Thus we are building headless only.
10723 BUILD_HEADLESS="BUILD_HEADLESS:=true"
10724 headful_msg="headless only"
10725 fi
10726
10727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10728 $as_echo "$headful_msg" >&6; }
10729
10730
10731
10732
10733
10734 # Control wether Hotspot runs Queens test after build.
10735 # Check whether --enable-hotspot-test-in-build was given.
10736 if test "${enable_hotspot_test_in_build+set}" = set; then :
10737 enableval=$enable_hotspot_test_in_build;
10738 else
10739 enable_hotspot_test_in_build=no
10740 fi
10741
10742 if test "x$enable_hotspot_test_in_build" = "xyes"; then
10743 TEST_IN_BUILD=true
10744 else
10745 TEST_IN_BUILD=false
10746 fi
10747
10748
10749 ###############################################################################
10750 #
10751 # Choose cacerts source file
10752 #
10753
10754 # Check whether --with-cacerts-file was given.
10755 if test "${with_cacerts_file+set}" = set; then :
10756 withval=$with_cacerts_file;
10757 fi
10758
10759 if test "x$with_cacerts_file" != x; then
10760 CACERTS_FILE=$with_cacerts_file
10761 else
10762 if test "x$OPENJDK" = "xtrue"; then
10763 CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10764 else
10765 CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
10766 fi
10767 fi
10768
10769
10770 ###############################################################################
10771 #
10772 # Enable or disable unlimited crypto
10773 #
10774 # Check whether --enable-unlimited-crypto was given.
10775 if test "${enable_unlimited_crypto+set}" = set; then :
10776 enableval=$enable_unlimited_crypto;
10777 else
10778 enable_unlimited_crypto=no
10779 fi
10780
10781 if test "x$enable_unlimited_crypto" = "xyes"; then
10782 UNLIMITED_CRYPTO=true
10783 else
10784 UNLIMITED_CRYPTO=false
10785 fi
10786
10787
10788 ###############################################################################
10789 #
10790 # Enable or disable the elliptic curve crypto implementation
10791 #
10792
10793
10794 ###############################################################################
10795 #
10796 # Compress jars
10797 #
10798 COMPRESS_JARS=false
10799
10800
10801
10802
10803 # Source the version numbers
10804 . $AUTOCONF_DIR/version-numbers
10805
10806 # Get the settings from parameters
10807
10808 # Check whether --with-milestone was given.
10809 if test "${with_milestone+set}" = set; then :
10810 withval=$with_milestone;
10811 fi
10812
10813 if test "x$with_milestone" = xyes; then
10814 as_fn_error $? "Milestone must have a value" "$LINENO" 5
10815 elif test "x$with_milestone" != x; then
10816 MILESTONE="$with_milestone"
10817 fi
10818 if test "x$MILESTONE" = x; then
10819 MILESTONE=internal
10820 fi
10821
10822
10823 # Check whether --with-build-number was given.
10824 if test "${with_build_number+set}" = set; then :
10825 withval=$with_build_number;
10826 fi
10827
10828 if test "x$with_build_number" = xyes; then
10829 as_fn_error $? "Build number must have a value" "$LINENO" 5
10830 elif test "x$with_build_number" != x; then
10831 JDK_BUILD_NUMBER="$with_build_number"
10832 fi
10833 if test "x$JDK_BUILD_NUMBER" = x; then
10834 JDK_BUILD_NUMBER=b00
10835 fi
10836
10837
10838 # Check whether --with-user-release-suffix was given.
10839 if test "${with_user_release_suffix+set}" = set; then :
10840 withval=$with_user_release_suffix;
10841 fi
10842
10843 if test "x$with_user_release_suffix" = xyes; then
10844 as_fn_error $? "Release suffix must have a value" "$LINENO" 5
10845 elif test "x$with_user_release_suffix" != x; then
10846 USER_RELEASE_SUFFIX="$with_user_release_suffix"
10847 else
10848 BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
10849 # Avoid [:alnum:] since it depends on the locale.
10850 CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
10851 USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10852 fi
10853
10854
10855 # Now set the JDK version, milestone, build number etc.
10856
10857
10858
10859
10860
10861
10862
10863
10864
10865
10866
10867
10868
10869
10870 COPYRIGHT_YEAR=`date +'%Y'`
10871
10872
10873 if test "x$JDK_UPDATE_VERSION" != x; then
10874 JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
10875 else
10876 JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
10877 fi
10878
10879
10880 COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
10881
10882
10883
10884 ###############################################################################
10885 #
10886 # Setup BootJDK, used to bootstrap the build.
10887 #
10888 ###############################################################################
10889
10890
10891 BOOT_JDK_FOUND=no
10892
10893 # Check whether --with-boot-jdk was given.
10894 if test "${with_boot_jdk+set}" = set; then :
10895 withval=$with_boot_jdk;
10896 fi
10897
10898
10899 # We look for the Boot JDK through various means, going from more certain to
10900 # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
10901 # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
10902 # must check if this is indeed valid; otherwise we'll continue looking.
10903
10904 # Test: Is bootjdk explicitely set by command line arguments?
10905
10906 if test "x$BOOT_JDK_FOUND" = xno; then
10907 # Now execute the test
10908
10909 if test "x$with_boot_jdk" != x; then
10910 BOOT_JDK=$with_boot_jdk
10911 BOOT_JDK_FOUND=maybe
10912 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
10913 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
10914 fi
10915
10916
10917 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10918 if test "x$BOOT_JDK_FOUND" = xmaybe; then
10919 # Do we have a bin/java?
10920 if test ! -x "$BOOT_JDK/bin/java"; then
10921 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10922 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10923 BOOT_JDK_FOUND=no
10924 else
10925 # Do we have a bin/javac?
10926 if test ! -x "$BOOT_JDK/bin/javac"; then
10927 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10928 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10929 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
10930 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10931 BOOT_JDK_FOUND=no
10932 else
10933 # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10934 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10935 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10936 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10937 BOOT_JDK_FOUND=no
10938 else
10939 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10940 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10941
10942 # Extra M4 quote needed to protect [] in grep expression.
10943 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`
10944 if test "x$FOUND_VERSION_78" = x; then
10945 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10946 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10947 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
10948 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10949 BOOT_JDK_FOUND=no
10950 else
10951 # We're done! :-)
10952 BOOT_JDK_FOUND=yes
10953
10954 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10955
10956 # Input might be given as Windows format, start by converting to
10957 # unix format.
10958 path="$BOOT_JDK"
10959 new_path=`$CYGPATH -u "$path"`
10960
10961 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10962 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10963 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10964 # "foo.exe" is OK but "foo" is an error.
10965 #
10966 # This test is therefore slightly more accurate than "test -f" to check for file precense.
10967 # It is also a way to make sure we got the proper file name for the real test later on.
10968 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10969 if test "x$test_shortpath" = x; then
10970 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10971 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10972 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
10973 fi
10974
10975 # Call helper function which possibly converts this using DOS-style short mode.
10976 # If so, the updated path is stored in $new_path.
10977
10978 input_path="$new_path"
10979 # Check if we need to convert this using DOS-style short mode. If the path
10980 # contains just simple characters, use it. Otherwise (spaces, weird characters),
10981 # take no chances and rewrite it.
10982 # Note: m4 eats our [], so we need to use [ and ] instead.
10983 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
10984 if test "x$has_forbidden_chars" != x; then
10985 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10986 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
10987 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
10988 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
10989 # Going to short mode and back again did indeed matter. Since short mode is
10990 # case insensitive, let's make it lowercase to improve readability.
10991 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10992 # Now convert it back to Unix-stile (cygpath)
10993 input_path=`$CYGPATH -u "$shortmode_path"`
10994 new_path="$input_path"
10995 fi
10996 fi
10997
10998 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
10999 if test "x$test_cygdrive_prefix" = x; then
11000 # As a simple fix, exclude /usr/bin since it's not a real path.
11001 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11002 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11003 # a path prefixed by /cygdrive for fixpath to work.
11004 new_path="$CYGWIN_ROOT_PATH$input_path"
11005 fi
11006 fi
11007
11008
11009 if test "x$path" != "x$new_path"; then
11010 BOOT_JDK="$new_path"
11011 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11012 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11013 fi
11014
11015 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11016
11017 path="$BOOT_JDK"
11018 has_colon=`$ECHO $path | $GREP ^.:`
11019 new_path="$path"
11020 if test "x$has_colon" = x; then
11021 # Not in mixed or Windows style, start by that.
11022 new_path=`cmd //c echo $path`
11023 fi
11024
11025
11026 input_path="$new_path"
11027 # Check if we need to convert this using DOS-style short mode. If the path
11028 # contains just simple characters, use it. Otherwise (spaces, weird characters),
11029 # take no chances and rewrite it.
11030 # Note: m4 eats our [], so we need to use [ and ] instead.
11031 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11032 if test "x$has_forbidden_chars" != x; then
11033 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11034 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11035 fi
11036
11037
11038 windows_path="$new_path"
11039 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11040 unix_path=`$CYGPATH -u "$windows_path"`
11041 new_path="$unix_path"
11042 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11043 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11044 new_path="$unix_path"
11045 fi
11046
11047 if test "x$path" != "x$new_path"; then
11048 BOOT_JDK="$new_path"
11049 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11050 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11051 fi
11052
11053 # Save the first 10 bytes of this path to the storage, so fixpath can work.
11054 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11055
11056 else
11057 # We're on a posix platform. Hooray! :)
11058 path="$BOOT_JDK"
11059
11060 if test ! -f "$path" && test ! -d "$path"; then
11061 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11062 fi
11063
11064 has_space=`$ECHO "$path" | $GREP " "`
11065 if test "x$has_space" != x; then
11066 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11067 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11068 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11069 fi
11070 fi
11071
11072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11073 $as_echo_n "checking for Boot JDK... " >&6; }
11074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11075 $as_echo "$BOOT_JDK" >&6; }
11076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11077 $as_echo_n "checking Boot JDK version... " >&6; }
11078 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
11079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11080 $as_echo "$BOOT_JDK_VERSION" >&6; }
11081 fi # end check jdk version
11082 fi # end check rt.jar
11083 fi # end check javac
11084 fi # end check java
11085 fi # end check boot jdk found
11086 fi
11087
11088 if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11089 # Having specified an argument which is incorrect will produce an instant failure;
11090 # we should not go on looking
11091 as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11092 fi
11093
11094 # Test: Is bootjdk available from builddeps?
11095
11096 if test "x$BOOT_JDK_FOUND" = xno; then
11097 # Now execute the test
11098
11099
11100
11101 if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11102 # Source the builddeps file again, to make sure it uses the latest variables!
11103 . $builddepsfile
11104 # Look for a target and build machine specific resource!
11105 eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11106 if test "x$resource" = x; then
11107 # Ok, lets instead look for a target specific resource
11108 eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11109 fi
11110 if test "x$resource" = x; then
11111 # Ok, lets instead look for a build specific resource
11112 eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11113 fi
11114 if test "x$resource" = x; then
11115 # Ok, lets instead look for a generic resource
11116 # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11117 resource=${builddep_bootjdk}
11118 fi
11119 if test "x$resource" != x; then
11120 { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11121 $as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11122 # If the resource in the builddeps.conf file is an existing directory,
11123 # for example /java/linux/cups
11124 if test -d ${resource}; then
11125 depdir=${resource}
11126 else
11127
11128 # bootjdk is for example mymodule
11129 # $resource is for example libs/general/libmymod_1_2_3.zip
11130 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11131 # $with_builddeps_dir is for example /localhome/builddeps
11132 # depdir is the name of the variable into which we store the depdir, eg MYMOD
11133 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11134 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11135 filename=`basename $resource`
11136 filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11137 filebase=${filename%%.*}
11138 extension=${filename#*.}
11139 installdir=$with_builddeps_dir/$filebase
11140 if test ! -f $installdir/$filename.unpacked; then
11141 { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11142 $as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11143 if test ! -d $installdir; then
11144 mkdir -p $installdir
11145 fi
11146 if test ! -d $installdir; then
11147 as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11148 fi
11149 tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11150 touch $tmpfile
11151 if test ! -f $tmpfile; then
11152 as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11153 fi
11154
11155 # $with_builddeps_server/$resource is the ftp://abuilddeps.server.com/libs/cups.zip
11156 # $tmpfile is the local file name for the downloaded file.
11157 VALID_TOOL=no
11158 if test "x$BDEPS_FTP" = xwget; then
11159 VALID_TOOL=yes
11160 wget -O $tmpfile $with_builddeps_server/$resource
11161 fi
11162 if test "x$BDEPS_FTP" = xlftp; then
11163 VALID_TOOL=yes
11164 lftp -c "get $with_builddeps_server/$resource -o $tmpfile"
11165 fi
11166 if test "x$BDEPS_FTP" = xftp; then
11167 VALID_TOOL=yes
11168 FTPSERVER=`echo $with_builddeps_server/$resource | cut -f 3 -d '/'`
11169 FTPPATH=`echo $with_builddeps_server/$resource | cut -f 4- -d '/'`
11170 FTPUSERPWD=${FTPSERVER%%@*}
11171 if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11172 FTPUSER=${userpwd%%:*}
11173 FTPPWD=${userpwd#*@}
11174 FTPSERVER=${FTPSERVER#*@}
11175 else
11176 FTPUSER=ftp
11177 FTPPWD=ftp
11178 fi
11179 # the "pass" command does not work on some
11180 # ftp clients (read ftp.exe) but if it works,
11181 # passive mode is better!
11182 (\
11183 echo "user $FTPUSER $FTPPWD" ;\
11184 echo "pass" ;\
11185 echo "bin" ;\
11186 echo "get $FTPPATH $tmpfile" ;\
11187 ) | ftp -in $FTPSERVER
11188 fi
11189 if test "x$VALID_TOOL" != xyes; then
11190 as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11191 fi
11192
11193 mv $tmpfile $installdir/$filename
11194 if test ! -s $installdir/$filename; then
11195 as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11196 fi
11197 case "$extension" in
11198 zip) echo "Unzipping $installdir/$filename..."
11199 (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11200 ;;
11201 tar.gz) echo "Untaring $installdir/$filename..."
11202 (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11203 ;;
11204 tgz) echo "Untaring $installdir/$filename..."
11205 (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11206 ;;
11207 *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11208 ;;
11209 esac
11210 fi
11211 if test -f $installdir/$filename.unpacked; then
11212 depdir=$installdir
11213 fi
11214
11215 fi
11216 # Source the builddeps file again, because in the previous command, the depdir
11217 # was updated to point at the current build dependency install directory.
11218 . $builddepsfile
11219 # Now extract variables from the builddeps.conf files.
11220 theroot=${builddep_bootjdk_ROOT}
11221 thecflags=${builddep_bootjdk_CFLAGS}
11222 thelibs=${builddep_bootjdk_LIBS}
11223 if test "x$depdir" = x; then
11224 as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11225 fi
11226 BOOT_JDK=$depdir
11227 if test "x$theroot" != x; then
11228 BOOT_JDK="$theroot"
11229 fi
11230 if test "x$thecflags" != x; then
11231 BOOT_JDK_CFLAGS="$thecflags"
11232 fi
11233 if test "x$thelibs" != x; then
11234 BOOT_JDK_LIBS="$thelibs"
11235 fi
11236 BOOT_JDK_FOUND=maybe
11237 else BOOT_JDK_FOUND=no
11238
11239 fi
11240 else BOOT_JDK_FOUND=no
11241
11242 fi
11243
11244
11245
11246 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11247 if test "x$BOOT_JDK_FOUND" = xmaybe; then
11248 # Do we have a bin/java?
11249 if test ! -x "$BOOT_JDK/bin/java"; then
11250 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11251 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11252 BOOT_JDK_FOUND=no
11253 else
11254 # Do we have a bin/javac?
11255 if test ! -x "$BOOT_JDK/bin/javac"; then
11256 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11257 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11258 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11259 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11260 BOOT_JDK_FOUND=no
11261 else
11262 # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11263 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11264 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11265 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11266 BOOT_JDK_FOUND=no
11267 else
11268 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11269 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11270
11271 # Extra M4 quote needed to protect [] in grep expression.
11272 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`
11273 if test "x$FOUND_VERSION_78" = x; then
11274 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11275 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11276 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11277 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11278 BOOT_JDK_FOUND=no
11279 else
11280 # We're done! :-)
11281 BOOT_JDK_FOUND=yes
11282
11283 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11284
11285 # Input might be given as Windows format, start by converting to
11286 # unix format.
11287 path="$BOOT_JDK"
11288 new_path=`$CYGPATH -u "$path"`
11289
11290 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11291 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11292 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11293 # "foo.exe" is OK but "foo" is an error.
11294 #
11295 # This test is therefore slightly more accurate than "test -f" to check for file precense.
11296 # It is also a way to make sure we got the proper file name for the real test later on.
11297 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11298 if test "x$test_shortpath" = x; then
11299 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11300 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11301 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11302 fi
11303
11304 # Call helper function which possibly converts this using DOS-style short mode.
11305 # If so, the updated path is stored in $new_path.
11306
11307 input_path="$new_path"
11308 # Check if we need to convert this using DOS-style short mode. If the path
11309 # contains just simple characters, use it. Otherwise (spaces, weird characters),
11310 # take no chances and rewrite it.
11311 # Note: m4 eats our [], so we need to use [ and ] instead.
11312 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11313 if test "x$has_forbidden_chars" != x; then
11314 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11315 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11316 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11317 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11318 # Going to short mode and back again did indeed matter. Since short mode is
11319 # case insensitive, let's make it lowercase to improve readability.
11320 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11321 # Now convert it back to Unix-stile (cygpath)
11322 input_path=`$CYGPATH -u "$shortmode_path"`
11323 new_path="$input_path"
11324 fi
11325 fi
11326
11327 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11328 if test "x$test_cygdrive_prefix" = x; then
11329 # As a simple fix, exclude /usr/bin since it's not a real path.
11330 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11331 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11332 # a path prefixed by /cygdrive for fixpath to work.
11333 new_path="$CYGWIN_ROOT_PATH$input_path"
11334 fi
11335 fi
11336
11337
11338 if test "x$path" != "x$new_path"; then
11339 BOOT_JDK="$new_path"
11340 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11341 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11342 fi
11343
11344 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11345
11346 path="$BOOT_JDK"
11347 has_colon=`$ECHO $path | $GREP ^.:`
11348 new_path="$path"
11349 if test "x$has_colon" = x; then
11350 # Not in mixed or Windows style, start by that.
11351 new_path=`cmd //c echo $path`
11352 fi
11353
11354
11355 input_path="$new_path"
11356 # Check if we need to convert this using DOS-style short mode. If the path
11357 # contains just simple characters, use it. Otherwise (spaces, weird characters),
11358 # take no chances and rewrite it.
11359 # Note: m4 eats our [], so we need to use [ and ] instead.
11360 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11361 if test "x$has_forbidden_chars" != x; then
11362 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11363 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11364 fi
11365
11366
11367 windows_path="$new_path"
11368 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11369 unix_path=`$CYGPATH -u "$windows_path"`
11370 new_path="$unix_path"
11371 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11372 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11373 new_path="$unix_path"
11374 fi
11375
11376 if test "x$path" != "x$new_path"; then
11377 BOOT_JDK="$new_path"
11378 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11379 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11380 fi
11381
11382 # Save the first 10 bytes of this path to the storage, so fixpath can work.
11383 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11384
11385 else
11386 # We're on a posix platform. Hooray! :)
11387 path="$BOOT_JDK"
11388
11389 if test ! -f "$path" && test ! -d "$path"; then
11390 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11391 fi
11392
11393 has_space=`$ECHO "$path" | $GREP " "`
11394 if test "x$has_space" != x; then
11395 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11396 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11397 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11398 fi
11399 fi
11400
11401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11402 $as_echo_n "checking for Boot JDK... " >&6; }
11403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11404 $as_echo "$BOOT_JDK" >&6; }
11405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11406 $as_echo_n "checking Boot JDK version... " >&6; }
11407 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
11408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11409 $as_echo "$BOOT_JDK_VERSION" >&6; }
11410 fi # end check jdk version
11411 fi # end check rt.jar
11412 fi # end check javac
11413 fi # end check java
11414 fi # end check boot jdk found
11415 fi
11416
11417
11418 # Test: Is $JAVA_HOME set?
11419
11420 if test "x$BOOT_JDK_FOUND" = xno; then
11421 # Now execute the test
11422
11423 if test "x$JAVA_HOME" != x; then
11424 JAVA_HOME_PROCESSED="$JAVA_HOME"
11425
11426 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11427
11428 # Input might be given as Windows format, start by converting to
11429 # unix format.
11430 path="$JAVA_HOME_PROCESSED"
11431 new_path=`$CYGPATH -u "$path"`
11432
11433 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11434 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11435 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11436 # "foo.exe" is OK but "foo" is an error.
11437 #
11438 # This test is therefore slightly more accurate than "test -f" to check for file precense.
11439 # It is also a way to make sure we got the proper file name for the real test later on.
11440 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11441 if test "x$test_shortpath" = x; then
11442 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11443 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11444 as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11445 fi
11446
11447 # Call helper function which possibly converts this using DOS-style short mode.
11448 # If so, the updated path is stored in $new_path.
11449
11450 input_path="$new_path"
11451 # Check if we need to convert this using DOS-style short mode. If the path
11452 # contains just simple characters, use it. Otherwise (spaces, weird characters),
11453 # take no chances and rewrite it.
11454 # Note: m4 eats our [], so we need to use [ and ] instead.
11455 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11456 if test "x$has_forbidden_chars" != x; then
11457 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11458 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11459 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11460 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11461 # Going to short mode and back again did indeed matter. Since short mode is
11462 # case insensitive, let's make it lowercase to improve readability.
11463 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11464 # Now convert it back to Unix-stile (cygpath)
11465 input_path=`$CYGPATH -u "$shortmode_path"`
11466 new_path="$input_path"
11467 fi
11468 fi
11469
11470 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11471 if test "x$test_cygdrive_prefix" = x; then
11472 # As a simple fix, exclude /usr/bin since it's not a real path.
11473 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11474 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11475 # a path prefixed by /cygdrive for fixpath to work.
11476 new_path="$CYGWIN_ROOT_PATH$input_path"
11477 fi
11478 fi
11479
11480
11481 if test "x$path" != "x$new_path"; then
11482 JAVA_HOME_PROCESSED="$new_path"
11483 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11484 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11485 fi
11486
11487 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11488
11489 path="$JAVA_HOME_PROCESSED"
11490 has_colon=`$ECHO $path | $GREP ^.:`
11491 new_path="$path"
11492 if test "x$has_colon" = x; then
11493 # Not in mixed or Windows style, start by that.
11494 new_path=`cmd //c echo $path`
11495 fi
11496
11497
11498 input_path="$new_path"
11499 # Check if we need to convert this using DOS-style short mode. If the path
11500 # contains just simple characters, use it. Otherwise (spaces, weird characters),
11501 # take no chances and rewrite it.
11502 # Note: m4 eats our [], so we need to use [ and ] instead.
11503 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11504 if test "x$has_forbidden_chars" != x; then
11505 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11506 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11507 fi
11508
11509
11510 windows_path="$new_path"
11511 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11512 unix_path=`$CYGPATH -u "$windows_path"`
11513 new_path="$unix_path"
11514 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11515 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11516 new_path="$unix_path"
11517 fi
11518
11519 if test "x$path" != "x$new_path"; then
11520 JAVA_HOME_PROCESSED="$new_path"
11521 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11522 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11523 fi
11524
11525 # Save the first 10 bytes of this path to the storage, so fixpath can work.
11526 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11527
11528 else
11529 # We're on a posix platform. Hooray! :)
11530 path="$JAVA_HOME_PROCESSED"
11531
11532 if test ! -f "$path" && test ! -d "$path"; then
11533 as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11534 fi
11535
11536 has_space=`$ECHO "$path" | $GREP " "`
11537 if test "x$has_space" != x; then
11538 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11539 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11540 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11541 fi
11542 fi
11543
11544 if test ! -d "$JAVA_HOME_PROCESSED"; then
11545 { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11546 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11547 else
11548 # Aha, the user has set a JAVA_HOME
11549 # let us use that as the Boot JDK.
11550 BOOT_JDK="$JAVA_HOME_PROCESSED"
11551 BOOT_JDK_FOUND=maybe
11552 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11553 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11554 fi
11555 fi
11556
11557
11558 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11559 if test "x$BOOT_JDK_FOUND" = xmaybe; then
11560 # Do we have a bin/java?
11561 if test ! -x "$BOOT_JDK/bin/java"; then
11562 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11563 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11564 BOOT_JDK_FOUND=no
11565 else
11566 # Do we have a bin/javac?
11567 if test ! -x "$BOOT_JDK/bin/javac"; then
11568 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11569 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11570 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11571 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11572 BOOT_JDK_FOUND=no
11573 else
11574 # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11575 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11576 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11577 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11578 BOOT_JDK_FOUND=no
11579 else
11580 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11581 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11582
11583 # Extra M4 quote needed to protect [] in grep expression.
11584 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`
11585 if test "x$FOUND_VERSION_78" = x; then
11586 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11587 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11588 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11589 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11590 BOOT_JDK_FOUND=no
11591 else
11592 # We're done! :-)
11593 BOOT_JDK_FOUND=yes
11594
11595 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11596
11597 # Input might be given as Windows format, start by converting to
11598 # unix format.
11599 path="$BOOT_JDK"
11600 new_path=`$CYGPATH -u "$path"`
11601
11602 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11603 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11604 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11605 # "foo.exe" is OK but "foo" is an error.
11606 #
11607 # This test is therefore slightly more accurate than "test -f" to check for file precense.
11608 # It is also a way to make sure we got the proper file name for the real test later on.
11609 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11610 if test "x$test_shortpath" = x; then
11611 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11612 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11613 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11614 fi
11615
11616 # Call helper function which possibly converts this using DOS-style short mode.
11617 # If so, the updated path is stored in $new_path.
11618
11619 input_path="$new_path"
11620 # Check if we need to convert this using DOS-style short mode. If the path
11621 # contains just simple characters, use it. Otherwise (spaces, weird characters),
11622 # take no chances and rewrite it.
11623 # Note: m4 eats our [], so we need to use [ and ] instead.
11624 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11625 if test "x$has_forbidden_chars" != x; then
11626 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11627 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11628 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11629 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11630 # Going to short mode and back again did indeed matter. Since short mode is
11631 # case insensitive, let's make it lowercase to improve readability.
11632 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11633 # Now convert it back to Unix-stile (cygpath)
11634 input_path=`$CYGPATH -u "$shortmode_path"`
11635 new_path="$input_path"
11636 fi
11637 fi
11638
11639 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11640 if test "x$test_cygdrive_prefix" = x; then
11641 # As a simple fix, exclude /usr/bin since it's not a real path.
11642 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11643 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11644 # a path prefixed by /cygdrive for fixpath to work.
11645 new_path="$CYGWIN_ROOT_PATH$input_path"
11646 fi
11647 fi
11648
11649
11650 if test "x$path" != "x$new_path"; then
11651 BOOT_JDK="$new_path"
11652 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11653 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11654 fi
11655
11656 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11657
11658 path="$BOOT_JDK"
11659 has_colon=`$ECHO $path | $GREP ^.:`
11660 new_path="$path"
11661 if test "x$has_colon" = x; then
11662 # Not in mixed or Windows style, start by that.
11663 new_path=`cmd //c echo $path`
11664 fi
11665
11666
11667 input_path="$new_path"
11668 # Check if we need to convert this using DOS-style short mode. If the path
11669 # contains just simple characters, use it. Otherwise (spaces, weird characters),
11670 # take no chances and rewrite it.
11671 # Note: m4 eats our [], so we need to use [ and ] instead.
11672 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11673 if test "x$has_forbidden_chars" != x; then
11674 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11675 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11676 fi
11677
11678
11679 windows_path="$new_path"
11680 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11681 unix_path=`$CYGPATH -u "$windows_path"`
11682 new_path="$unix_path"
11683 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11684 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11685 new_path="$unix_path"
11686 fi
11687
11688 if test "x$path" != "x$new_path"; then
11689 BOOT_JDK="$new_path"
11690 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11691 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11692 fi
11693
11694 # Save the first 10 bytes of this path to the storage, so fixpath can work.
11695 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11696
11697 else
11698 # We're on a posix platform. Hooray! :)
11699 path="$BOOT_JDK"
11700
11701 if test ! -f "$path" && test ! -d "$path"; then
11702 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11703 fi
11704
11705 has_space=`$ECHO "$path" | $GREP " "`
11706 if test "x$has_space" != x; then
11707 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11708 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11709 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11710 fi
11711 fi
11712
11713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11714 $as_echo_n "checking for Boot JDK... " >&6; }
11715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11716 $as_echo "$BOOT_JDK" >&6; }
11717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11718 $as_echo_n "checking Boot JDK version... " >&6; }
11719 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
11720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11721 $as_echo "$BOOT_JDK_VERSION" >&6; }
11722 fi # end check jdk version
11723 fi # end check rt.jar
11724 fi # end check javac
11725 fi # end check java
11726 fi # end check boot jdk found
11727 fi
11728
11729
11730 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11731
11732 if test "x$BOOT_JDK_FOUND" = xno; then
11733 # Now execute the test
11734
11735 if test -x /usr/libexec/java_home; then
11736 BOOT_JDK=`/usr/libexec/java_home`
11737 BOOT_JDK_FOUND=maybe
11738 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11739 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11740 fi
11741
11742
11743 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11744 if test "x$BOOT_JDK_FOUND" = xmaybe; then
11745 # Do we have a bin/java?
11746 if test ! -x "$BOOT_JDK/bin/java"; then
11747 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11748 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11749 BOOT_JDK_FOUND=no
11750 else
11751 # Do we have a bin/javac?
11752 if test ! -x "$BOOT_JDK/bin/javac"; then
11753 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11754 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11755 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11756 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11757 BOOT_JDK_FOUND=no
11758 else
11759 # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11760 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11761 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11762 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11763 BOOT_JDK_FOUND=no
11764 else
11765 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11766 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11767
11768 # Extra M4 quote needed to protect [] in grep expression.
11769 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`
11770 if test "x$FOUND_VERSION_78" = x; then
11771 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11772 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11773 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11774 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11775 BOOT_JDK_FOUND=no
11776 else
11777 # We're done! :-)
11778 BOOT_JDK_FOUND=yes
11779
11780 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11781
11782 # Input might be given as Windows format, start by converting to
11783 # unix format.
11784 path="$BOOT_JDK"
11785 new_path=`$CYGPATH -u "$path"`
11786
11787 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11788 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11789 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11790 # "foo.exe" is OK but "foo" is an error.
11791 #
11792 # This test is therefore slightly more accurate than "test -f" to check for file precense.
11793 # It is also a way to make sure we got the proper file name for the real test later on.
11794 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11795 if test "x$test_shortpath" = x; then
11796 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11797 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11798 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11799 fi
11800
11801 # Call helper function which possibly converts this using DOS-style short mode.
11802 # If so, the updated path is stored in $new_path.
11803
11804 input_path="$new_path"
11805 # Check if we need to convert this using DOS-style short mode. If the path
11806 # contains just simple characters, use it. Otherwise (spaces, weird characters),
11807 # take no chances and rewrite it.
11808 # Note: m4 eats our [], so we need to use [ and ] instead.
11809 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11810 if test "x$has_forbidden_chars" != x; then
11811 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11812 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11813 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11814 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11815 # Going to short mode and back again did indeed matter. Since short mode is
11816 # case insensitive, let's make it lowercase to improve readability.
11817 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11818 # Now convert it back to Unix-stile (cygpath)
11819 input_path=`$CYGPATH -u "$shortmode_path"`
11820 new_path="$input_path"
11821 fi
11822 fi
11823
11824 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11825 if test "x$test_cygdrive_prefix" = x; then
11826 # As a simple fix, exclude /usr/bin since it's not a real path.
11827 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11828 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11829 # a path prefixed by /cygdrive for fixpath to work.
11830 new_path="$CYGWIN_ROOT_PATH$input_path"
11831 fi
11832 fi
11833
11834
11835 if test "x$path" != "x$new_path"; then
11836 BOOT_JDK="$new_path"
11837 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11838 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11839 fi
11840
11841 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11842
11843 path="$BOOT_JDK"
11844 has_colon=`$ECHO $path | $GREP ^.:`
11845 new_path="$path"
11846 if test "x$has_colon" = x; then
11847 # Not in mixed or Windows style, start by that.
11848 new_path=`cmd //c echo $path`
11849 fi
11850
11851
11852 input_path="$new_path"
11853 # Check if we need to convert this using DOS-style short mode. If the path
11854 # contains just simple characters, use it. Otherwise (spaces, weird characters),
11855 # take no chances and rewrite it.
11856 # Note: m4 eats our [], so we need to use [ and ] instead.
11857 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11858 if test "x$has_forbidden_chars" != x; then
11859 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11860 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11861 fi
11862
11863
11864 windows_path="$new_path"
11865 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11866 unix_path=`$CYGPATH -u "$windows_path"`
11867 new_path="$unix_path"
11868 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11869 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11870 new_path="$unix_path"
11871 fi
11872
11873 if test "x$path" != "x$new_path"; then
11874 BOOT_JDK="$new_path"
11875 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11876 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11877 fi
11878
11879 # Save the first 10 bytes of this path to the storage, so fixpath can work.
11880 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11881
11882 else
11883 # We're on a posix platform. Hooray! :)
11884 path="$BOOT_JDK"
11885
11886 if test ! -f "$path" && test ! -d "$path"; then
11887 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11888 fi
11889
11890 has_space=`$ECHO "$path" | $GREP " "`
11891 if test "x$has_space" != x; then
11892 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11893 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11894 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11895 fi
11896 fi
11897
11898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11899 $as_echo_n "checking for Boot JDK... " >&6; }
11900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11901 $as_echo "$BOOT_JDK" >&6; }
11902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11903 $as_echo_n "checking Boot JDK version... " >&6; }
11904 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
11905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11906 $as_echo "$BOOT_JDK_VERSION" >&6; }
11907 fi # end check jdk version
11908 fi # end check rt.jar
11909 fi # end check javac
11910 fi # end check java
11911 fi # end check boot jdk found
11912 fi
11913
11914
11915 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
11916
11917 if test "x$BOOT_JDK_FOUND" = xno; then
11918 # Now execute the test
11919
11920 # Extract the first word of "javac", so it can be a program name with args.
11921 set dummy javac; ac_word=$2
11922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11923 $as_echo_n "checking for $ac_word... " >&6; }
11924 if ${ac_cv_path_JAVAC_CHECK+:} false; then :
11925 $as_echo_n "(cached) " >&6
11926 else
11927 case $JAVAC_CHECK in
11928 [\\/]* | ?:[\\/]*)
11929 ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
11930 ;;
11931 *)
11932 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11933 for as_dir in $PATH
11934 do
11935 IFS=$as_save_IFS
11936 test -z "$as_dir" && as_dir=.
11937 for ac_exec_ext in '' $ac_executable_extensions; do
11938 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11939 ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
11940 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11941 break 2
11942 fi
11943 done
11944 done
11945 IFS=$as_save_IFS
11946
11947 ;;
11948 esac
11949 fi
11950 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
11951 if test -n "$JAVAC_CHECK"; then
11952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
11953 $as_echo "$JAVAC_CHECK" >&6; }
11954 else
11955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11956 $as_echo "no" >&6; }
11957 fi
11958
11959
11960 # Extract the first word of "java", so it can be a program name with args.
11961 set dummy java; ac_word=$2
11962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11963 $as_echo_n "checking for $ac_word... " >&6; }
11964 if ${ac_cv_path_JAVA_CHECK+:} false; then :
11965 $as_echo_n "(cached) " >&6
11966 else
11967 case $JAVA_CHECK in
11968 [\\/]* | ?:[\\/]*)
11969 ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
11970 ;;
11971 *)
11972 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11973 for as_dir in $PATH
11974 do
11975 IFS=$as_save_IFS
11976 test -z "$as_dir" && as_dir=.
11977 for ac_exec_ext in '' $ac_executable_extensions; do
11978 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11979 ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
11980 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11981 break 2
11982 fi
11983 done
11984 done
11985 IFS=$as_save_IFS
11986
11987 ;;
11988 esac
11989 fi
11990 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
11991 if test -n "$JAVA_CHECK"; then
11992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
11993 $as_echo "$JAVA_CHECK" >&6; }
11994 else
11995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11996 $as_echo "no" >&6; }
11997 fi
11998
11999
12000 BINARY="$JAVAC_CHECK"
12001 if test "x$JAVAC_CHECK" = x; then
12002 BINARY="$JAVA_CHECK"
12003 fi
12004 if test "x$BINARY" != x; then
12005 # So there is a java(c) binary, it might be part of a JDK.
12006 # Lets find the JDK/JRE directory by following symbolic links.
12007 # Linux/GNU systems often have links from /usr/bin/java to
12008 # /etc/alternatives/java to the real JDK binary.
12009
12010 if test "x$OPENJDK_BUILD_OS" != xwindows; then
12011 # Follow a chain of symbolic links. Use readlink
12012 # where it exists, else fall back to horribly
12013 # complicated shell code.
12014 if test "x$READLINK_TESTED" != yes; then
12015 # On MacOSX there is a readlink tool with a different
12016 # purpose than the GNU readlink tool. Check the found readlink.
12017 ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12018 if test "x$ISGNU" = x; then
12019 # A readlink that we do not know how to use.
12020 # Are there other non-GNU readlinks out there?
12021 READLINK_TESTED=yes
12022 READLINK=
12023 fi
12024 fi
12025
12026 if test "x$READLINK" != x; then
12027 BINARY=`$READLINK -f $BINARY`
12028 else
12029 # Save the current directory for restoring afterwards
12030 STARTDIR=$PWD
12031 COUNTER=0
12032 sym_link_dir=`$DIRNAME $BINARY`
12033 sym_link_file=`$BASENAME $BINARY`
12034 # Use the system pwd and not the shell builtin to resolve directory symlinks
12035 cd $sym_link_dir
12036 cd `$THEPWDCMD`
12037 sym_link_dir=`$THEPWDCMD`
12038 # Resolve file symlinks
12039 while test $COUNTER -lt 20; do
12040 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12041 if test "x$ISLINK" == x; then
12042 # This is not a symbolic link! We are done!
12043 break
12044 fi
12045 # Again resolve directory symlinks since the target of the just found
12046 # link could be in a different directory
12047 cd `$DIRNAME $ISLINK`
12048 sym_link_dir=`$THEPWDCMD`
12049 sym_link_file=`$BASENAME $ISLINK`
12050 let COUNTER=COUNTER+1
12051 done
12052 cd $STARTDIR
12053 BINARY=$sym_link_dir/$sym_link_file
12054 fi
12055 fi
12056
12057 BOOT_JDK=`dirname "$BINARY"`
12058 BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12059 if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12060 # Looks like we found ourselves an JDK
12061 BOOT_JDK_FOUND=maybe
12062 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12063 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12064 fi
12065 fi
12066
12067
12068 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12069 if test "x$BOOT_JDK_FOUND" = xmaybe; then
12070 # Do we have a bin/java?
12071 if test ! -x "$BOOT_JDK/bin/java"; then
12072 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12073 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12074 BOOT_JDK_FOUND=no
12075 else
12076 # Do we have a bin/javac?
12077 if test ! -x "$BOOT_JDK/bin/javac"; then
12078 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12079 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12080 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12081 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12082 BOOT_JDK_FOUND=no
12083 else
12084 # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12085 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12086 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12087 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12088 BOOT_JDK_FOUND=no
12089 else
12090 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12091 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12092
12093 # Extra M4 quote needed to protect [] in grep expression.
12094 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`
12095 if test "x$FOUND_VERSION_78" = x; then
12096 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12097 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12098 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12099 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12100 BOOT_JDK_FOUND=no
12101 else
12102 # We're done! :-)
12103 BOOT_JDK_FOUND=yes
12104
12105 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12106
12107 # Input might be given as Windows format, start by converting to
12108 # unix format.
12109 path="$BOOT_JDK"
12110 new_path=`$CYGPATH -u "$path"`
12111
12112 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12113 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12114 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12115 # "foo.exe" is OK but "foo" is an error.
12116 #
12117 # This test is therefore slightly more accurate than "test -f" to check for file precense.
12118 # It is also a way to make sure we got the proper file name for the real test later on.
12119 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12120 if test "x$test_shortpath" = x; then
12121 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12122 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12123 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12124 fi
12125
12126 # Call helper function which possibly converts this using DOS-style short mode.
12127 # If so, the updated path is stored in $new_path.
12128
12129 input_path="$new_path"
12130 # Check if we need to convert this using DOS-style short mode. If the path
12131 # contains just simple characters, use it. Otherwise (spaces, weird characters),
12132 # take no chances and rewrite it.
12133 # Note: m4 eats our [], so we need to use [ and ] instead.
12134 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12135 if test "x$has_forbidden_chars" != x; then
12136 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12137 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12138 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12139 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12140 # Going to short mode and back again did indeed matter. Since short mode is
12141 # case insensitive, let's make it lowercase to improve readability.
12142 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12143 # Now convert it back to Unix-stile (cygpath)
12144 input_path=`$CYGPATH -u "$shortmode_path"`
12145 new_path="$input_path"
12146 fi
12147 fi
12148
12149 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12150 if test "x$test_cygdrive_prefix" = x; then
12151 # As a simple fix, exclude /usr/bin since it's not a real path.
12152 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12153 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12154 # a path prefixed by /cygdrive for fixpath to work.
12155 new_path="$CYGWIN_ROOT_PATH$input_path"
12156 fi
12157 fi
12158
12159
12160 if test "x$path" != "x$new_path"; then
12161 BOOT_JDK="$new_path"
12162 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12163 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12164 fi
12165
12166 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12167
12168 path="$BOOT_JDK"
12169 has_colon=`$ECHO $path | $GREP ^.:`
12170 new_path="$path"
12171 if test "x$has_colon" = x; then
12172 # Not in mixed or Windows style, start by that.
12173 new_path=`cmd //c echo $path`
12174 fi
12175
12176
12177 input_path="$new_path"
12178 # Check if we need to convert this using DOS-style short mode. If the path
12179 # contains just simple characters, use it. Otherwise (spaces, weird characters),
12180 # take no chances and rewrite it.
12181 # Note: m4 eats our [], so we need to use [ and ] instead.
12182 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12183 if test "x$has_forbidden_chars" != x; then
12184 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12185 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12186 fi
12187
12188
12189 windows_path="$new_path"
12190 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12191 unix_path=`$CYGPATH -u "$windows_path"`
12192 new_path="$unix_path"
12193 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12194 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12195 new_path="$unix_path"
12196 fi
12197
12198 if test "x$path" != "x$new_path"; then
12199 BOOT_JDK="$new_path"
12200 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12201 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12202 fi
12203
12204 # Save the first 10 bytes of this path to the storage, so fixpath can work.
12205 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12206
12207 else
12208 # We're on a posix platform. Hooray! :)
12209 path="$BOOT_JDK"
12210
12211 if test ! -f "$path" && test ! -d "$path"; then
12212 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12213 fi
12214
12215 has_space=`$ECHO "$path" | $GREP " "`
12216 if test "x$has_space" != x; then
12217 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12218 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12219 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12220 fi
12221 fi
12222
12223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12224 $as_echo_n "checking for Boot JDK... " >&6; }
12225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12226 $as_echo "$BOOT_JDK" >&6; }
12227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12228 $as_echo_n "checking Boot JDK version... " >&6; }
12229 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
12230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12231 $as_echo "$BOOT_JDK_VERSION" >&6; }
12232 fi # end check jdk version
12233 fi # end check rt.jar
12234 fi # end check javac
12235 fi # end check java
12236 fi # end check boot jdk found
12237 fi
12238
12239
12240 # Test: Is there a JDK installed in default, well-known locations?
12241
12242 if test "x$BOOT_JDK_FOUND" = xno; then
12243 # Now execute the test
12244
12245 if test "x$OPENJDK_TARGET_OS" = xwindows; then
12246
12247 if test "x$BOOT_JDK_FOUND" = xno; then
12248 # Now execute the test
12249
12250 if test "x$ProgramW6432" != x; then
12251 VIRTUAL_DIR="$ProgramW6432/Java"
12252
12253 windows_path="$VIRTUAL_DIR"
12254 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12255 unix_path=`$CYGPATH -u "$windows_path"`
12256 VIRTUAL_DIR="$unix_path"
12257 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12258 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12259 VIRTUAL_DIR="$unix_path"
12260 fi
12261
12262
12263 BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12264 BOOT_JDK_SUFFIX=""
12265 ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12266 if test "x$ALL_JDKS_FOUND" != x; then
12267 for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12268
12269 if test "x$BOOT_JDK_FOUND" = xno; then
12270 # Now execute the test
12271
12272 BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12273 if test -d "$BOOT_JDK"; then
12274 BOOT_JDK_FOUND=maybe
12275 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12276 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12277 fi
12278
12279
12280 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12281 if test "x$BOOT_JDK_FOUND" = xmaybe; then
12282 # Do we have a bin/java?
12283 if test ! -x "$BOOT_JDK/bin/java"; then
12284 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12285 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12286 BOOT_JDK_FOUND=no
12287 else
12288 # Do we have a bin/javac?
12289 if test ! -x "$BOOT_JDK/bin/javac"; then
12290 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12291 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12292 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12293 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12294 BOOT_JDK_FOUND=no
12295 else
12296 # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12297 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12298 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12299 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12300 BOOT_JDK_FOUND=no
12301 else
12302 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12303 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12304
12305 # Extra M4 quote needed to protect [] in grep expression.
12306 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`
12307 if test "x$FOUND_VERSION_78" = x; then
12308 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12309 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12310 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12311 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12312 BOOT_JDK_FOUND=no
12313 else
12314 # We're done! :-)
12315 BOOT_JDK_FOUND=yes
12316
12317 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12318
12319 # Input might be given as Windows format, start by converting to
12320 # unix format.
12321 path="$BOOT_JDK"
12322 new_path=`$CYGPATH -u "$path"`
12323
12324 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12325 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12326 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12327 # "foo.exe" is OK but "foo" is an error.
12328 #
12329 # This test is therefore slightly more accurate than "test -f" to check for file precense.
12330 # It is also a way to make sure we got the proper file name for the real test later on.
12331 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12332 if test "x$test_shortpath" = x; then
12333 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12334 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12335 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12336 fi
12337
12338 # Call helper function which possibly converts this using DOS-style short mode.
12339 # If so, the updated path is stored in $new_path.
12340
12341 input_path="$new_path"
12342 # Check if we need to convert this using DOS-style short mode. If the path
12343 # contains just simple characters, use it. Otherwise (spaces, weird characters),
12344 # take no chances and rewrite it.
12345 # Note: m4 eats our [], so we need to use [ and ] instead.
12346 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12347 if test "x$has_forbidden_chars" != x; then
12348 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12349 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12350 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12351 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12352 # Going to short mode and back again did indeed matter. Since short mode is
12353 # case insensitive, let's make it lowercase to improve readability.
12354 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12355 # Now convert it back to Unix-stile (cygpath)
12356 input_path=`$CYGPATH -u "$shortmode_path"`
12357 new_path="$input_path"
12358 fi
12359 fi
12360
12361 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12362 if test "x$test_cygdrive_prefix" = x; then
12363 # As a simple fix, exclude /usr/bin since it's not a real path.
12364 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12365 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12366 # a path prefixed by /cygdrive for fixpath to work.
12367 new_path="$CYGWIN_ROOT_PATH$input_path"
12368 fi
12369 fi
12370
12371
12372 if test "x$path" != "x$new_path"; then
12373 BOOT_JDK="$new_path"
12374 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12375 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12376 fi
12377
12378 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12379
12380 path="$BOOT_JDK"
12381 has_colon=`$ECHO $path | $GREP ^.:`
12382 new_path="$path"
12383 if test "x$has_colon" = x; then
12384 # Not in mixed or Windows style, start by that.
12385 new_path=`cmd //c echo $path`
12386 fi
12387
12388
12389 input_path="$new_path"
12390 # Check if we need to convert this using DOS-style short mode. If the path
12391 # contains just simple characters, use it. Otherwise (spaces, weird characters),
12392 # take no chances and rewrite it.
12393 # Note: m4 eats our [], so we need to use [ and ] instead.
12394 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12395 if test "x$has_forbidden_chars" != x; then
12396 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12397 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12398 fi
12399
12400
12401 windows_path="$new_path"
12402 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12403 unix_path=`$CYGPATH -u "$windows_path"`
12404 new_path="$unix_path"
12405 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12406 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12407 new_path="$unix_path"
12408 fi
12409
12410 if test "x$path" != "x$new_path"; then
12411 BOOT_JDK="$new_path"
12412 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12413 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12414 fi
12415
12416 # Save the first 10 bytes of this path to the storage, so fixpath can work.
12417 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12418
12419 else
12420 # We're on a posix platform. Hooray! :)
12421 path="$BOOT_JDK"
12422
12423 if test ! -f "$path" && test ! -d "$path"; then
12424 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12425 fi
12426
12427 has_space=`$ECHO "$path" | $GREP " "`
12428 if test "x$has_space" != x; then
12429 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12430 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12431 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12432 fi
12433 fi
12434
12435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12436 $as_echo_n "checking for Boot JDK... " >&6; }
12437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12438 $as_echo "$BOOT_JDK" >&6; }
12439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12440 $as_echo_n "checking Boot JDK version... " >&6; }
12441 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
12442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12443 $as_echo "$BOOT_JDK_VERSION" >&6; }
12444 fi # end check jdk version
12445 fi # end check rt.jar
12446 fi # end check javac
12447 fi # end check java
12448 fi # end check boot jdk found
12449 fi
12450
12451 done
12452 fi
12453
12454 fi
12455
12456
12457 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12458 if test "x$BOOT_JDK_FOUND" = xmaybe; then
12459 # Do we have a bin/java?
12460 if test ! -x "$BOOT_JDK/bin/java"; then
12461 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12462 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12463 BOOT_JDK_FOUND=no
12464 else
12465 # Do we have a bin/javac?
12466 if test ! -x "$BOOT_JDK/bin/javac"; then
12467 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12468 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12469 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12470 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12471 BOOT_JDK_FOUND=no
12472 else
12473 # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12474 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12475 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12476 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12477 BOOT_JDK_FOUND=no
12478 else
12479 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12480 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12481
12482 # Extra M4 quote needed to protect [] in grep expression.
12483 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`
12484 if test "x$FOUND_VERSION_78" = x; then
12485 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12486 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12487 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12488 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12489 BOOT_JDK_FOUND=no
12490 else
12491 # We're done! :-)
12492 BOOT_JDK_FOUND=yes
12493
12494 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12495
12496 # Input might be given as Windows format, start by converting to
12497 # unix format.
12498 path="$BOOT_JDK"
12499 new_path=`$CYGPATH -u "$path"`
12500
12501 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12502 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12503 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12504 # "foo.exe" is OK but "foo" is an error.
12505 #
12506 # This test is therefore slightly more accurate than "test -f" to check for file precense.
12507 # It is also a way to make sure we got the proper file name for the real test later on.
12508 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12509 if test "x$test_shortpath" = x; then
12510 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12511 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12512 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12513 fi
12514
12515 # Call helper function which possibly converts this using DOS-style short mode.
12516 # If so, the updated path is stored in $new_path.
12517
12518 input_path="$new_path"
12519 # Check if we need to convert this using DOS-style short mode. If the path
12520 # contains just simple characters, use it. Otherwise (spaces, weird characters),
12521 # take no chances and rewrite it.
12522 # Note: m4 eats our [], so we need to use [ and ] instead.
12523 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12524 if test "x$has_forbidden_chars" != x; then
12525 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12526 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12527 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12528 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12529 # Going to short mode and back again did indeed matter. Since short mode is
12530 # case insensitive, let's make it lowercase to improve readability.
12531 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12532 # Now convert it back to Unix-stile (cygpath)
12533 input_path=`$CYGPATH -u "$shortmode_path"`
12534 new_path="$input_path"
12535 fi
12536 fi
12537
12538 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12539 if test "x$test_cygdrive_prefix" = x; then
12540 # As a simple fix, exclude /usr/bin since it's not a real path.
12541 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12542 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12543 # a path prefixed by /cygdrive for fixpath to work.
12544 new_path="$CYGWIN_ROOT_PATH$input_path"
12545 fi
12546 fi
12547
12548
12549 if test "x$path" != "x$new_path"; then
12550 BOOT_JDK="$new_path"
12551 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12552 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12553 fi
12554
12555 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12556
12557 path="$BOOT_JDK"
12558 has_colon=`$ECHO $path | $GREP ^.:`
12559 new_path="$path"
12560 if test "x$has_colon" = x; then
12561 # Not in mixed or Windows style, start by that.
12562 new_path=`cmd //c echo $path`
12563 fi
12564
12565
12566 input_path="$new_path"
12567 # Check if we need to convert this using DOS-style short mode. If the path
12568 # contains just simple characters, use it. Otherwise (spaces, weird characters),
12569 # take no chances and rewrite it.
12570 # Note: m4 eats our [], so we need to use [ and ] instead.
12571 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12572 if test "x$has_forbidden_chars" != x; then
12573 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12574 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12575 fi
12576
12577
12578 windows_path="$new_path"
12579 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12580 unix_path=`$CYGPATH -u "$windows_path"`
12581 new_path="$unix_path"
12582 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12583 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12584 new_path="$unix_path"
12585 fi
12586
12587 if test "x$path" != "x$new_path"; then
12588 BOOT_JDK="$new_path"
12589 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12590 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12591 fi
12592
12593 # Save the first 10 bytes of this path to the storage, so fixpath can work.
12594 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12595
12596 else
12597 # We're on a posix platform. Hooray! :)
12598 path="$BOOT_JDK"
12599
12600 if test ! -f "$path" && test ! -d "$path"; then
12601 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12602 fi
12603
12604 has_space=`$ECHO "$path" | $GREP " "`
12605 if test "x$has_space" != x; then
12606 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12607 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12608 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12609 fi
12610 fi
12611
12612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12613 $as_echo_n "checking for Boot JDK... " >&6; }
12614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12615 $as_echo "$BOOT_JDK" >&6; }
12616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12617 $as_echo_n "checking Boot JDK version... " >&6; }
12618 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
12619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12620 $as_echo "$BOOT_JDK_VERSION" >&6; }
12621 fi # end check jdk version
12622 fi # end check rt.jar
12623 fi # end check javac
12624 fi # end check java
12625 fi # end check boot jdk found
12626 fi
12627
12628
12629 if test "x$BOOT_JDK_FOUND" = xno; then
12630 # Now execute the test
12631
12632 if test "x$PROGRAMW6432" != x; then
12633 VIRTUAL_DIR="$PROGRAMW6432/Java"
12634
12635 windows_path="$VIRTUAL_DIR"
12636 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12637 unix_path=`$CYGPATH -u "$windows_path"`
12638 VIRTUAL_DIR="$unix_path"
12639 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12640 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12641 VIRTUAL_DIR="$unix_path"
12642 fi
12643
12644
12645 BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12646 BOOT_JDK_SUFFIX=""
12647 ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12648 if test "x$ALL_JDKS_FOUND" != x; then
12649 for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12650
12651 if test "x$BOOT_JDK_FOUND" = xno; then
12652 # Now execute the test
12653
12654 BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12655 if test -d "$BOOT_JDK"; then
12656 BOOT_JDK_FOUND=maybe
12657 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12658 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12659 fi
12660
12661
12662 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12663 if test "x$BOOT_JDK_FOUND" = xmaybe; then
12664 # Do we have a bin/java?
12665 if test ! -x "$BOOT_JDK/bin/java"; then
12666 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12667 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12668 BOOT_JDK_FOUND=no
12669 else
12670 # Do we have a bin/javac?
12671 if test ! -x "$BOOT_JDK/bin/javac"; then
12672 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12673 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12674 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12675 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12676 BOOT_JDK_FOUND=no
12677 else
12678 # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12679 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12680 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12681 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12682 BOOT_JDK_FOUND=no
12683 else
12684 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12685 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12686
12687 # Extra M4 quote needed to protect [] in grep expression.
12688 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`
12689 if test "x$FOUND_VERSION_78" = x; then
12690 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12691 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12692 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12693 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12694 BOOT_JDK_FOUND=no
12695 else
12696 # We're done! :-)
12697 BOOT_JDK_FOUND=yes
12698
12699 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12700
12701 # Input might be given as Windows format, start by converting to
12702 # unix format.
12703 path="$BOOT_JDK"
12704 new_path=`$CYGPATH -u "$path"`
12705
12706 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12707 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12708 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12709 # "foo.exe" is OK but "foo" is an error.
12710 #
12711 # This test is therefore slightly more accurate than "test -f" to check for file precense.
12712 # It is also a way to make sure we got the proper file name for the real test later on.
12713 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12714 if test "x$test_shortpath" = x; then
12715 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12716 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12717 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12718 fi
12719
12720 # Call helper function which possibly converts this using DOS-style short mode.
12721 # If so, the updated path is stored in $new_path.
12722
12723 input_path="$new_path"
12724 # Check if we need to convert this using DOS-style short mode. If the path
12725 # contains just simple characters, use it. Otherwise (spaces, weird characters),
12726 # take no chances and rewrite it.
12727 # Note: m4 eats our [], so we need to use [ and ] instead.
12728 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12729 if test "x$has_forbidden_chars" != x; then
12730 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12731 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12732 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12733 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12734 # Going to short mode and back again did indeed matter. Since short mode is
12735 # case insensitive, let's make it lowercase to improve readability.
12736 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12737 # Now convert it back to Unix-stile (cygpath)
12738 input_path=`$CYGPATH -u "$shortmode_path"`
12739 new_path="$input_path"
12740 fi
12741 fi
12742
12743 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12744 if test "x$test_cygdrive_prefix" = x; then
12745 # As a simple fix, exclude /usr/bin since it's not a real path.
12746 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12747 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12748 # a path prefixed by /cygdrive for fixpath to work.
12749 new_path="$CYGWIN_ROOT_PATH$input_path"
12750 fi
12751 fi
12752
12753
12754 if test "x$path" != "x$new_path"; then
12755 BOOT_JDK="$new_path"
12756 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12757 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12758 fi
12759
12760 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12761
12762 path="$BOOT_JDK"
12763 has_colon=`$ECHO $path | $GREP ^.:`
12764 new_path="$path"
12765 if test "x$has_colon" = x; then
12766 # Not in mixed or Windows style, start by that.
12767 new_path=`cmd //c echo $path`
12768 fi
12769
12770
12771 input_path="$new_path"
12772 # Check if we need to convert this using DOS-style short mode. If the path
12773 # contains just simple characters, use it. Otherwise (spaces, weird characters),
12774 # take no chances and rewrite it.
12775 # Note: m4 eats our [], so we need to use [ and ] instead.
12776 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12777 if test "x$has_forbidden_chars" != x; then
12778 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12779 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12780 fi
12781
12782
12783 windows_path="$new_path"
12784 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12785 unix_path=`$CYGPATH -u "$windows_path"`
12786 new_path="$unix_path"
12787 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12788 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12789 new_path="$unix_path"
12790 fi
12791
12792 if test "x$path" != "x$new_path"; then
12793 BOOT_JDK="$new_path"
12794 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12795 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12796 fi
12797
12798 # Save the first 10 bytes of this path to the storage, so fixpath can work.
12799 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12800
12801 else
12802 # We're on a posix platform. Hooray! :)
12803 path="$BOOT_JDK"
12804
12805 if test ! -f "$path" && test ! -d "$path"; then
12806 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12807 fi
12808
12809 has_space=`$ECHO "$path" | $GREP " "`
12810 if test "x$has_space" != x; then
12811 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12812 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12813 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12814 fi
12815 fi
12816
12817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12818 $as_echo_n "checking for Boot JDK... " >&6; }
12819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12820 $as_echo "$BOOT_JDK" >&6; }
12821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12822 $as_echo_n "checking Boot JDK version... " >&6; }
12823 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
12824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12825 $as_echo "$BOOT_JDK_VERSION" >&6; }
12826 fi # end check jdk version
12827 fi # end check rt.jar
12828 fi # end check javac
12829 fi # end check java
12830 fi # end check boot jdk found
12831 fi
12832
12833 done
12834 fi
12835
12836 fi
12837
12838
12839 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12840 if test "x$BOOT_JDK_FOUND" = xmaybe; then
12841 # Do we have a bin/java?
12842 if test ! -x "$BOOT_JDK/bin/java"; then
12843 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12844 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12845 BOOT_JDK_FOUND=no
12846 else
12847 # Do we have a bin/javac?
12848 if test ! -x "$BOOT_JDK/bin/javac"; then
12849 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12850 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12851 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12852 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12853 BOOT_JDK_FOUND=no
12854 else
12855 # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12856 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12857 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12858 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12859 BOOT_JDK_FOUND=no
12860 else
12861 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12862 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12863
12864 # Extra M4 quote needed to protect [] in grep expression.
12865 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`
12866 if test "x$FOUND_VERSION_78" = x; then
12867 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12868 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12869 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12870 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12871 BOOT_JDK_FOUND=no
12872 else
12873 # We're done! :-)
12874 BOOT_JDK_FOUND=yes
12875
12876 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12877
12878 # Input might be given as Windows format, start by converting to
12879 # unix format.
12880 path="$BOOT_JDK"
12881 new_path=`$CYGPATH -u "$path"`
12882
12883 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12884 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12885 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12886 # "foo.exe" is OK but "foo" is an error.
12887 #
12888 # This test is therefore slightly more accurate than "test -f" to check for file precense.
12889 # It is also a way to make sure we got the proper file name for the real test later on.
12890 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12891 if test "x$test_shortpath" = x; then
12892 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12893 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12894 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12895 fi
12896
12897 # Call helper function which possibly converts this using DOS-style short mode.
12898 # If so, the updated path is stored in $new_path.
12899
12900 input_path="$new_path"
12901 # Check if we need to convert this using DOS-style short mode. If the path
12902 # contains just simple characters, use it. Otherwise (spaces, weird characters),
12903 # take no chances and rewrite it.
12904 # Note: m4 eats our [], so we need to use [ and ] instead.
12905 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12906 if test "x$has_forbidden_chars" != x; then
12907 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12908 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12909 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12910 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12911 # Going to short mode and back again did indeed matter. Since short mode is
12912 # case insensitive, let's make it lowercase to improve readability.
12913 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12914 # Now convert it back to Unix-stile (cygpath)
12915 input_path=`$CYGPATH -u "$shortmode_path"`
12916 new_path="$input_path"
12917 fi
12918 fi
12919
12920 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12921 if test "x$test_cygdrive_prefix" = x; then
12922 # As a simple fix, exclude /usr/bin since it's not a real path.
12923 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12924 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12925 # a path prefixed by /cygdrive for fixpath to work.
12926 new_path="$CYGWIN_ROOT_PATH$input_path"
12927 fi
12928 fi
12929
12930
12931 if test "x$path" != "x$new_path"; then
12932 BOOT_JDK="$new_path"
12933 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12934 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12935 fi
12936
12937 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12938
12939 path="$BOOT_JDK"
12940 has_colon=`$ECHO $path | $GREP ^.:`
12941 new_path="$path"
12942 if test "x$has_colon" = x; then
12943 # Not in mixed or Windows style, start by that.
12944 new_path=`cmd //c echo $path`
12945 fi
12946
12947
12948 input_path="$new_path"
12949 # Check if we need to convert this using DOS-style short mode. If the path
12950 # contains just simple characters, use it. Otherwise (spaces, weird characters),
12951 # take no chances and rewrite it.
12952 # Note: m4 eats our [], so we need to use [ and ] instead.
12953 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12954 if test "x$has_forbidden_chars" != x; then
12955 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12956 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12957 fi
12958
12959
12960 windows_path="$new_path"
12961 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12962 unix_path=`$CYGPATH -u "$windows_path"`
12963 new_path="$unix_path"
12964 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12965 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12966 new_path="$unix_path"
12967 fi
12968
12969 if test "x$path" != "x$new_path"; then
12970 BOOT_JDK="$new_path"
12971 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12972 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12973 fi
12974
12975 # Save the first 10 bytes of this path to the storage, so fixpath can work.
12976 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12977
12978 else
12979 # We're on a posix platform. Hooray! :)
12980 path="$BOOT_JDK"
12981
12982 if test ! -f "$path" && test ! -d "$path"; then
12983 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12984 fi
12985
12986 has_space=`$ECHO "$path" | $GREP " "`
12987 if test "x$has_space" != x; then
12988 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12989 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12990 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12991 fi
12992 fi
12993
12994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12995 $as_echo_n "checking for Boot JDK... " >&6; }
12996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12997 $as_echo "$BOOT_JDK" >&6; }
12998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12999 $as_echo_n "checking Boot JDK version... " >&6; }
13000 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
13001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13002 $as_echo "$BOOT_JDK_VERSION" >&6; }
13003 fi # end check jdk version
13004 fi # end check rt.jar
13005 fi # end check javac
13006 fi # end check java
13007 fi # end check boot jdk found
13008 fi
13009
13010
13011 if test "x$BOOT_JDK_FOUND" = xno; then
13012 # Now execute the test
13013
13014 if test "x$PROGRAMFILES" != x; then
13015 VIRTUAL_DIR="$PROGRAMFILES/Java"
13016
13017 windows_path="$VIRTUAL_DIR"
13018 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13019 unix_path=`$CYGPATH -u "$windows_path"`
13020 VIRTUAL_DIR="$unix_path"
13021 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13022 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13023 VIRTUAL_DIR="$unix_path"
13024 fi
13025
13026
13027 BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13028 BOOT_JDK_SUFFIX=""
13029 ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13030 if test "x$ALL_JDKS_FOUND" != x; then
13031 for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13032
13033 if test "x$BOOT_JDK_FOUND" = xno; then
13034 # Now execute the test
13035
13036 BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13037 if test -d "$BOOT_JDK"; then
13038 BOOT_JDK_FOUND=maybe
13039 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13040 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13041 fi
13042
13043
13044 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13045 if test "x$BOOT_JDK_FOUND" = xmaybe; then
13046 # Do we have a bin/java?
13047 if test ! -x "$BOOT_JDK/bin/java"; then
13048 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13049 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13050 BOOT_JDK_FOUND=no
13051 else
13052 # Do we have a bin/javac?
13053 if test ! -x "$BOOT_JDK/bin/javac"; then
13054 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13055 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13056 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13057 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13058 BOOT_JDK_FOUND=no
13059 else
13060 # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13061 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13062 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13063 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13064 BOOT_JDK_FOUND=no
13065 else
13066 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13067 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13068
13069 # Extra M4 quote needed to protect [] in grep expression.
13070 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`
13071 if test "x$FOUND_VERSION_78" = x; then
13072 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13073 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13074 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13075 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13076 BOOT_JDK_FOUND=no
13077 else
13078 # We're done! :-)
13079 BOOT_JDK_FOUND=yes
13080
13081 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13082
13083 # Input might be given as Windows format, start by converting to
13084 # unix format.
13085 path="$BOOT_JDK"
13086 new_path=`$CYGPATH -u "$path"`
13087
13088 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13089 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13090 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13091 # "foo.exe" is OK but "foo" is an error.
13092 #
13093 # This test is therefore slightly more accurate than "test -f" to check for file precense.
13094 # It is also a way to make sure we got the proper file name for the real test later on.
13095 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13096 if test "x$test_shortpath" = x; then
13097 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13098 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13099 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13100 fi
13101
13102 # Call helper function which possibly converts this using DOS-style short mode.
13103 # If so, the updated path is stored in $new_path.
13104
13105 input_path="$new_path"
13106 # Check if we need to convert this using DOS-style short mode. If the path
13107 # contains just simple characters, use it. Otherwise (spaces, weird characters),
13108 # take no chances and rewrite it.
13109 # Note: m4 eats our [], so we need to use [ and ] instead.
13110 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13111 if test "x$has_forbidden_chars" != x; then
13112 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13113 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13114 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13115 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13116 # Going to short mode and back again did indeed matter. Since short mode is
13117 # case insensitive, let's make it lowercase to improve readability.
13118 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13119 # Now convert it back to Unix-stile (cygpath)
13120 input_path=`$CYGPATH -u "$shortmode_path"`
13121 new_path="$input_path"
13122 fi
13123 fi
13124
13125 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13126 if test "x$test_cygdrive_prefix" = x; then
13127 # As a simple fix, exclude /usr/bin since it's not a real path.
13128 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13129 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13130 # a path prefixed by /cygdrive for fixpath to work.
13131 new_path="$CYGWIN_ROOT_PATH$input_path"
13132 fi
13133 fi
13134
13135
13136 if test "x$path" != "x$new_path"; then
13137 BOOT_JDK="$new_path"
13138 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13139 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13140 fi
13141
13142 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13143
13144 path="$BOOT_JDK"
13145 has_colon=`$ECHO $path | $GREP ^.:`
13146 new_path="$path"
13147 if test "x$has_colon" = x; then
13148 # Not in mixed or Windows style, start by that.
13149 new_path=`cmd //c echo $path`
13150 fi
13151
13152
13153 input_path="$new_path"
13154 # Check if we need to convert this using DOS-style short mode. If the path
13155 # contains just simple characters, use it. Otherwise (spaces, weird characters),
13156 # take no chances and rewrite it.
13157 # Note: m4 eats our [], so we need to use [ and ] instead.
13158 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13159 if test "x$has_forbidden_chars" != x; then
13160 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13161 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13162 fi
13163
13164
13165 windows_path="$new_path"
13166 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13167 unix_path=`$CYGPATH -u "$windows_path"`
13168 new_path="$unix_path"
13169 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13170 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13171 new_path="$unix_path"
13172 fi
13173
13174 if test "x$path" != "x$new_path"; then
13175 BOOT_JDK="$new_path"
13176 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13177 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13178 fi
13179
13180 # Save the first 10 bytes of this path to the storage, so fixpath can work.
13181 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13182
13183 else
13184 # We're on a posix platform. Hooray! :)
13185 path="$BOOT_JDK"
13186
13187 if test ! -f "$path" && test ! -d "$path"; then
13188 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13189 fi
13190
13191 has_space=`$ECHO "$path" | $GREP " "`
13192 if test "x$has_space" != x; then
13193 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13194 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13195 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13196 fi
13197 fi
13198
13199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13200 $as_echo_n "checking for Boot JDK... " >&6; }
13201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13202 $as_echo "$BOOT_JDK" >&6; }
13203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13204 $as_echo_n "checking Boot JDK version... " >&6; }
13205 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
13206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13207 $as_echo "$BOOT_JDK_VERSION" >&6; }
13208 fi # end check jdk version
13209 fi # end check rt.jar
13210 fi # end check javac
13211 fi # end check java
13212 fi # end check boot jdk found
13213 fi
13214
13215 done
13216 fi
13217
13218 fi
13219
13220
13221 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13222 if test "x$BOOT_JDK_FOUND" = xmaybe; then
13223 # Do we have a bin/java?
13224 if test ! -x "$BOOT_JDK/bin/java"; then
13225 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13226 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13227 BOOT_JDK_FOUND=no
13228 else
13229 # Do we have a bin/javac?
13230 if test ! -x "$BOOT_JDK/bin/javac"; then
13231 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13232 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13233 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13234 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13235 BOOT_JDK_FOUND=no
13236 else
13237 # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13238 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13239 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13240 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13241 BOOT_JDK_FOUND=no
13242 else
13243 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13244 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13245
13246 # Extra M4 quote needed to protect [] in grep expression.
13247 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`
13248 if test "x$FOUND_VERSION_78" = x; then
13249 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13250 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13251 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13252 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13253 BOOT_JDK_FOUND=no
13254 else
13255 # We're done! :-)
13256 BOOT_JDK_FOUND=yes
13257
13258 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13259
13260 # Input might be given as Windows format, start by converting to
13261 # unix format.
13262 path="$BOOT_JDK"
13263 new_path=`$CYGPATH -u "$path"`
13264
13265 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13266 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13267 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13268 # "foo.exe" is OK but "foo" is an error.
13269 #
13270 # This test is therefore slightly more accurate than "test -f" to check for file precense.
13271 # It is also a way to make sure we got the proper file name for the real test later on.
13272 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13273 if test "x$test_shortpath" = x; then
13274 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13275 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13276 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13277 fi
13278
13279 # Call helper function which possibly converts this using DOS-style short mode.
13280 # If so, the updated path is stored in $new_path.
13281
13282 input_path="$new_path"
13283 # Check if we need to convert this using DOS-style short mode. If the path
13284 # contains just simple characters, use it. Otherwise (spaces, weird characters),
13285 # take no chances and rewrite it.
13286 # Note: m4 eats our [], so we need to use [ and ] instead.
13287 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13288 if test "x$has_forbidden_chars" != x; then
13289 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13290 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13291 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13292 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13293 # Going to short mode and back again did indeed matter. Since short mode is
13294 # case insensitive, let's make it lowercase to improve readability.
13295 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13296 # Now convert it back to Unix-stile (cygpath)
13297 input_path=`$CYGPATH -u "$shortmode_path"`
13298 new_path="$input_path"
13299 fi
13300 fi
13301
13302 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13303 if test "x$test_cygdrive_prefix" = x; then
13304 # As a simple fix, exclude /usr/bin since it's not a real path.
13305 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13306 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13307 # a path prefixed by /cygdrive for fixpath to work.
13308 new_path="$CYGWIN_ROOT_PATH$input_path"
13309 fi
13310 fi
13311
13312
13313 if test "x$path" != "x$new_path"; then
13314 BOOT_JDK="$new_path"
13315 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13316 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13317 fi
13318
13319 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13320
13321 path="$BOOT_JDK"
13322 has_colon=`$ECHO $path | $GREP ^.:`
13323 new_path="$path"
13324 if test "x$has_colon" = x; then
13325 # Not in mixed or Windows style, start by that.
13326 new_path=`cmd //c echo $path`
13327 fi
13328
13329
13330 input_path="$new_path"
13331 # Check if we need to convert this using DOS-style short mode. If the path
13332 # contains just simple characters, use it. Otherwise (spaces, weird characters),
13333 # take no chances and rewrite it.
13334 # Note: m4 eats our [], so we need to use [ and ] instead.
13335 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13336 if test "x$has_forbidden_chars" != x; then
13337 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13338 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13339 fi
13340
13341
13342 windows_path="$new_path"
13343 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13344 unix_path=`$CYGPATH -u "$windows_path"`
13345 new_path="$unix_path"
13346 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13347 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13348 new_path="$unix_path"
13349 fi
13350
13351 if test "x$path" != "x$new_path"; then
13352 BOOT_JDK="$new_path"
13353 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13354 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13355 fi
13356
13357 # Save the first 10 bytes of this path to the storage, so fixpath can work.
13358 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13359
13360 else
13361 # We're on a posix platform. Hooray! :)
13362 path="$BOOT_JDK"
13363
13364 if test ! -f "$path" && test ! -d "$path"; then
13365 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13366 fi
13367
13368 has_space=`$ECHO "$path" | $GREP " "`
13369 if test "x$has_space" != x; then
13370 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13371 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13372 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13373 fi
13374 fi
13375
13376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13377 $as_echo_n "checking for Boot JDK... " >&6; }
13378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13379 $as_echo "$BOOT_JDK" >&6; }
13380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13381 $as_echo_n "checking Boot JDK version... " >&6; }
13382 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
13383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13384 $as_echo "$BOOT_JDK_VERSION" >&6; }
13385 fi # end check jdk version
13386 fi # end check rt.jar
13387 fi # end check javac
13388 fi # end check java
13389 fi # end check boot jdk found
13390 fi
13391
13392
13393 if test "x$BOOT_JDK_FOUND" = xno; then
13394 # Now execute the test
13395
13396 if test "x$ProgramFiles" != x; then
13397 VIRTUAL_DIR="$ProgramFiles/Java"
13398
13399 windows_path="$VIRTUAL_DIR"
13400 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13401 unix_path=`$CYGPATH -u "$windows_path"`
13402 VIRTUAL_DIR="$unix_path"
13403 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13404 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13405 VIRTUAL_DIR="$unix_path"
13406 fi
13407
13408
13409 BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13410 BOOT_JDK_SUFFIX=""
13411 ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13412 if test "x$ALL_JDKS_FOUND" != x; then
13413 for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13414
13415 if test "x$BOOT_JDK_FOUND" = xno; then
13416 # Now execute the test
13417
13418 BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13419 if test -d "$BOOT_JDK"; then
13420 BOOT_JDK_FOUND=maybe
13421 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13422 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13423 fi
13424
13425
13426 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13427 if test "x$BOOT_JDK_FOUND" = xmaybe; then
13428 # Do we have a bin/java?
13429 if test ! -x "$BOOT_JDK/bin/java"; then
13430 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13431 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13432 BOOT_JDK_FOUND=no
13433 else
13434 # Do we have a bin/javac?
13435 if test ! -x "$BOOT_JDK/bin/javac"; then
13436 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13437 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13438 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13439 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13440 BOOT_JDK_FOUND=no
13441 else
13442 # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13443 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13444 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13445 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13446 BOOT_JDK_FOUND=no
13447 else
13448 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13449 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13450
13451 # Extra M4 quote needed to protect [] in grep expression.
13452 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`
13453 if test "x$FOUND_VERSION_78" = x; then
13454 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13455 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13456 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13457 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13458 BOOT_JDK_FOUND=no
13459 else
13460 # We're done! :-)
13461 BOOT_JDK_FOUND=yes
13462
13463 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13464
13465 # Input might be given as Windows format, start by converting to
13466 # unix format.
13467 path="$BOOT_JDK"
13468 new_path=`$CYGPATH -u "$path"`
13469
13470 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13471 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13472 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13473 # "foo.exe" is OK but "foo" is an error.
13474 #
13475 # This test is therefore slightly more accurate than "test -f" to check for file precense.
13476 # It is also a way to make sure we got the proper file name for the real test later on.
13477 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13478 if test "x$test_shortpath" = x; then
13479 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13480 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13481 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13482 fi
13483
13484 # Call helper function which possibly converts this using DOS-style short mode.
13485 # If so, the updated path is stored in $new_path.
13486
13487 input_path="$new_path"
13488 # Check if we need to convert this using DOS-style short mode. If the path
13489 # contains just simple characters, use it. Otherwise (spaces, weird characters),
13490 # take no chances and rewrite it.
13491 # Note: m4 eats our [], so we need to use [ and ] instead.
13492 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13493 if test "x$has_forbidden_chars" != x; then
13494 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13495 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13496 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13497 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13498 # Going to short mode and back again did indeed matter. Since short mode is
13499 # case insensitive, let's make it lowercase to improve readability.
13500 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13501 # Now convert it back to Unix-stile (cygpath)
13502 input_path=`$CYGPATH -u "$shortmode_path"`
13503 new_path="$input_path"
13504 fi
13505 fi
13506
13507 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13508 if test "x$test_cygdrive_prefix" = x; then
13509 # As a simple fix, exclude /usr/bin since it's not a real path.
13510 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13511 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13512 # a path prefixed by /cygdrive for fixpath to work.
13513 new_path="$CYGWIN_ROOT_PATH$input_path"
13514 fi
13515 fi
13516
13517
13518 if test "x$path" != "x$new_path"; then
13519 BOOT_JDK="$new_path"
13520 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13521 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13522 fi
13523
13524 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13525
13526 path="$BOOT_JDK"
13527 has_colon=`$ECHO $path | $GREP ^.:`
13528 new_path="$path"
13529 if test "x$has_colon" = x; then
13530 # Not in mixed or Windows style, start by that.
13531 new_path=`cmd //c echo $path`
13532 fi
13533
13534
13535 input_path="$new_path"
13536 # Check if we need to convert this using DOS-style short mode. If the path
13537 # contains just simple characters, use it. Otherwise (spaces, weird characters),
13538 # take no chances and rewrite it.
13539 # Note: m4 eats our [], so we need to use [ and ] instead.
13540 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13541 if test "x$has_forbidden_chars" != x; then
13542 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13543 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13544 fi
13545
13546
13547 windows_path="$new_path"
13548 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13549 unix_path=`$CYGPATH -u "$windows_path"`
13550 new_path="$unix_path"
13551 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13552 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13553 new_path="$unix_path"
13554 fi
13555
13556 if test "x$path" != "x$new_path"; then
13557 BOOT_JDK="$new_path"
13558 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13559 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13560 fi
13561
13562 # Save the first 10 bytes of this path to the storage, so fixpath can work.
13563 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13564
13565 else
13566 # We're on a posix platform. Hooray! :)
13567 path="$BOOT_JDK"
13568
13569 if test ! -f "$path" && test ! -d "$path"; then
13570 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13571 fi
13572
13573 has_space=`$ECHO "$path" | $GREP " "`
13574 if test "x$has_space" != x; then
13575 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13576 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13577 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13578 fi
13579 fi
13580
13581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13582 $as_echo_n "checking for Boot JDK... " >&6; }
13583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13584 $as_echo "$BOOT_JDK" >&6; }
13585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13586 $as_echo_n "checking Boot JDK version... " >&6; }
13587 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
13588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13589 $as_echo "$BOOT_JDK_VERSION" >&6; }
13590 fi # end check jdk version
13591 fi # end check rt.jar
13592 fi # end check javac
13593 fi # end check java
13594 fi # end check boot jdk found
13595 fi
13596
13597 done
13598 fi
13599
13600 fi
13601
13602
13603 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13604 if test "x$BOOT_JDK_FOUND" = xmaybe; then
13605 # Do we have a bin/java?
13606 if test ! -x "$BOOT_JDK/bin/java"; then
13607 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13608 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13609 BOOT_JDK_FOUND=no
13610 else
13611 # Do we have a bin/javac?
13612 if test ! -x "$BOOT_JDK/bin/javac"; then
13613 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13614 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13615 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13616 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13617 BOOT_JDK_FOUND=no
13618 else
13619 # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13620 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13621 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13622 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13623 BOOT_JDK_FOUND=no
13624 else
13625 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13626 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13627
13628 # Extra M4 quote needed to protect [] in grep expression.
13629 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`
13630 if test "x$FOUND_VERSION_78" = x; then
13631 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13632 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13633 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13634 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13635 BOOT_JDK_FOUND=no
13636 else
13637 # We're done! :-)
13638 BOOT_JDK_FOUND=yes
13639
13640 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13641
13642 # Input might be given as Windows format, start by converting to
13643 # unix format.
13644 path="$BOOT_JDK"
13645 new_path=`$CYGPATH -u "$path"`
13646
13647 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13648 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13649 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13650 # "foo.exe" is OK but "foo" is an error.
13651 #
13652 # This test is therefore slightly more accurate than "test -f" to check for file precense.
13653 # It is also a way to make sure we got the proper file name for the real test later on.
13654 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13655 if test "x$test_shortpath" = x; then
13656 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13657 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13658 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13659 fi
13660
13661 # Call helper function which possibly converts this using DOS-style short mode.
13662 # If so, the updated path is stored in $new_path.
13663
13664 input_path="$new_path"
13665 # Check if we need to convert this using DOS-style short mode. If the path
13666 # contains just simple characters, use it. Otherwise (spaces, weird characters),
13667 # take no chances and rewrite it.
13668 # Note: m4 eats our [], so we need to use [ and ] instead.
13669 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13670 if test "x$has_forbidden_chars" != x; then
13671 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13672 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13673 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13674 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13675 # Going to short mode and back again did indeed matter. Since short mode is
13676 # case insensitive, let's make it lowercase to improve readability.
13677 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13678 # Now convert it back to Unix-stile (cygpath)
13679 input_path=`$CYGPATH -u "$shortmode_path"`
13680 new_path="$input_path"
13681 fi
13682 fi
13683
13684 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13685 if test "x$test_cygdrive_prefix" = x; then
13686 # As a simple fix, exclude /usr/bin since it's not a real path.
13687 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13688 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13689 # a path prefixed by /cygdrive for fixpath to work.
13690 new_path="$CYGWIN_ROOT_PATH$input_path"
13691 fi
13692 fi
13693
13694
13695 if test "x$path" != "x$new_path"; then
13696 BOOT_JDK="$new_path"
13697 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13698 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13699 fi
13700
13701 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13702
13703 path="$BOOT_JDK"
13704 has_colon=`$ECHO $path | $GREP ^.:`
13705 new_path="$path"
13706 if test "x$has_colon" = x; then
13707 # Not in mixed or Windows style, start by that.
13708 new_path=`cmd //c echo $path`
13709 fi
13710
13711
13712 input_path="$new_path"
13713 # Check if we need to convert this using DOS-style short mode. If the path
13714 # contains just simple characters, use it. Otherwise (spaces, weird characters),
13715 # take no chances and rewrite it.
13716 # Note: m4 eats our [], so we need to use [ and ] instead.
13717 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13718 if test "x$has_forbidden_chars" != x; then
13719 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13720 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13721 fi
13722
13723
13724 windows_path="$new_path"
13725 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13726 unix_path=`$CYGPATH -u "$windows_path"`
13727 new_path="$unix_path"
13728 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13729 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13730 new_path="$unix_path"
13731 fi
13732
13733 if test "x$path" != "x$new_path"; then
13734 BOOT_JDK="$new_path"
13735 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13736 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13737 fi
13738
13739 # Save the first 10 bytes of this path to the storage, so fixpath can work.
13740 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13741
13742 else
13743 # We're on a posix platform. Hooray! :)
13744 path="$BOOT_JDK"
13745
13746 if test ! -f "$path" && test ! -d "$path"; then
13747 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13748 fi
13749
13750 has_space=`$ECHO "$path" | $GREP " "`
13751 if test "x$has_space" != x; then
13752 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13753 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13754 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13755 fi
13756 fi
13757
13758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13759 $as_echo_n "checking for Boot JDK... " >&6; }
13760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13761 $as_echo "$BOOT_JDK" >&6; }
13762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13763 $as_echo_n "checking Boot JDK version... " >&6; }
13764 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
13765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13766 $as_echo "$BOOT_JDK_VERSION" >&6; }
13767 fi # end check jdk version
13768 fi # end check rt.jar
13769 fi # end check javac
13770 fi # end check java
13771 fi # end check boot jdk found
13772 fi
13773
13774
13775 if test "x$BOOT_JDK_FOUND" = xno; then
13776 # Now execute the test
13777
13778 BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13779 BOOT_JDK_SUFFIX=""
13780 ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13781 if test "x$ALL_JDKS_FOUND" != x; then
13782 for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13783
13784 if test "x$BOOT_JDK_FOUND" = xno; then
13785 # Now execute the test
13786
13787 BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13788 if test -d "$BOOT_JDK"; then
13789 BOOT_JDK_FOUND=maybe
13790 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13791 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13792 fi
13793
13794
13795 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13796 if test "x$BOOT_JDK_FOUND" = xmaybe; then
13797 # Do we have a bin/java?
13798 if test ! -x "$BOOT_JDK/bin/java"; then
13799 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13800 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13801 BOOT_JDK_FOUND=no
13802 else
13803 # Do we have a bin/javac?
13804 if test ! -x "$BOOT_JDK/bin/javac"; then
13805 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13806 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13807 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13808 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13809 BOOT_JDK_FOUND=no
13810 else
13811 # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13812 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13813 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13814 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13815 BOOT_JDK_FOUND=no
13816 else
13817 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13818 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13819
13820 # Extra M4 quote needed to protect [] in grep expression.
13821 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`
13822 if test "x$FOUND_VERSION_78" = x; then
13823 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13824 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13825 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13826 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13827 BOOT_JDK_FOUND=no
13828 else
13829 # We're done! :-)
13830 BOOT_JDK_FOUND=yes
13831
13832 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13833
13834 # Input might be given as Windows format, start by converting to
13835 # unix format.
13836 path="$BOOT_JDK"
13837 new_path=`$CYGPATH -u "$path"`
13838
13839 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13840 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13841 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13842 # "foo.exe" is OK but "foo" is an error.
13843 #
13844 # This test is therefore slightly more accurate than "test -f" to check for file precense.
13845 # It is also a way to make sure we got the proper file name for the real test later on.
13846 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13847 if test "x$test_shortpath" = x; then
13848 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13849 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13850 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13851 fi
13852
13853 # Call helper function which possibly converts this using DOS-style short mode.
13854 # If so, the updated path is stored in $new_path.
13855
13856 input_path="$new_path"
13857 # Check if we need to convert this using DOS-style short mode. If the path
13858 # contains just simple characters, use it. Otherwise (spaces, weird characters),
13859 # take no chances and rewrite it.
13860 # Note: m4 eats our [], so we need to use [ and ] instead.
13861 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13862 if test "x$has_forbidden_chars" != x; then
13863 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13864 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13865 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13866 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13867 # Going to short mode and back again did indeed matter. Since short mode is
13868 # case insensitive, let's make it lowercase to improve readability.
13869 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13870 # Now convert it back to Unix-stile (cygpath)
13871 input_path=`$CYGPATH -u "$shortmode_path"`
13872 new_path="$input_path"
13873 fi
13874 fi
13875
13876 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13877 if test "x$test_cygdrive_prefix" = x; then
13878 # As a simple fix, exclude /usr/bin since it's not a real path.
13879 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13880 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13881 # a path prefixed by /cygdrive for fixpath to work.
13882 new_path="$CYGWIN_ROOT_PATH$input_path"
13883 fi
13884 fi
13885
13886
13887 if test "x$path" != "x$new_path"; then
13888 BOOT_JDK="$new_path"
13889 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13890 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13891 fi
13892
13893 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13894
13895 path="$BOOT_JDK"
13896 has_colon=`$ECHO $path | $GREP ^.:`
13897 new_path="$path"
13898 if test "x$has_colon" = x; then
13899 # Not in mixed or Windows style, start by that.
13900 new_path=`cmd //c echo $path`
13901 fi
13902
13903
13904 input_path="$new_path"
13905 # Check if we need to convert this using DOS-style short mode. If the path
13906 # contains just simple characters, use it. Otherwise (spaces, weird characters),
13907 # take no chances and rewrite it.
13908 # Note: m4 eats our [], so we need to use [ and ] instead.
13909 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13910 if test "x$has_forbidden_chars" != x; then
13911 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13912 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13913 fi
13914
13915
13916 windows_path="$new_path"
13917 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13918 unix_path=`$CYGPATH -u "$windows_path"`
13919 new_path="$unix_path"
13920 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13921 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13922 new_path="$unix_path"
13923 fi
13924
13925 if test "x$path" != "x$new_path"; then
13926 BOOT_JDK="$new_path"
13927 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13928 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13929 fi
13930
13931 # Save the first 10 bytes of this path to the storage, so fixpath can work.
13932 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13933
13934 else
13935 # We're on a posix platform. Hooray! :)
13936 path="$BOOT_JDK"
13937
13938 if test ! -f "$path" && test ! -d "$path"; then
13939 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13940 fi
13941
13942 has_space=`$ECHO "$path" | $GREP " "`
13943 if test "x$has_space" != x; then
13944 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13945 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13946 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13947 fi
13948 fi
13949
13950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13951 $as_echo_n "checking for Boot JDK... " >&6; }
13952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13953 $as_echo "$BOOT_JDK" >&6; }
13954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13955 $as_echo_n "checking Boot JDK version... " >&6; }
13956 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
13957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13958 $as_echo "$BOOT_JDK_VERSION" >&6; }
13959 fi # end check jdk version
13960 fi # end check rt.jar
13961 fi # end check javac
13962 fi # end check java
13963 fi # end check boot jdk found
13964 fi
13965
13966 done
13967 fi
13968
13969
13970 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13971 if test "x$BOOT_JDK_FOUND" = xmaybe; then
13972 # Do we have a bin/java?
13973 if test ! -x "$BOOT_JDK/bin/java"; then
13974 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13975 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13976 BOOT_JDK_FOUND=no
13977 else
13978 # Do we have a bin/javac?
13979 if test ! -x "$BOOT_JDK/bin/javac"; then
13980 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13981 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13982 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13983 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13984 BOOT_JDK_FOUND=no
13985 else
13986 # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13987 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13988 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13989 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13990 BOOT_JDK_FOUND=no
13991 else
13992 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13993 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13994
13995 # Extra M4 quote needed to protect [] in grep expression.
13996 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`
13997 if test "x$FOUND_VERSION_78" = x; then
13998 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13999 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14000 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14001 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14002 BOOT_JDK_FOUND=no
14003 else
14004 # We're done! :-)
14005 BOOT_JDK_FOUND=yes
14006
14007 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14008
14009 # Input might be given as Windows format, start by converting to
14010 # unix format.
14011 path="$BOOT_JDK"
14012 new_path=`$CYGPATH -u "$path"`
14013
14014 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14015 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14016 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14017 # "foo.exe" is OK but "foo" is an error.
14018 #
14019 # This test is therefore slightly more accurate than "test -f" to check for file precense.
14020 # It is also a way to make sure we got the proper file name for the real test later on.
14021 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14022 if test "x$test_shortpath" = x; then
14023 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14024 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14025 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14026 fi
14027
14028 # Call helper function which possibly converts this using DOS-style short mode.
14029 # If so, the updated path is stored in $new_path.
14030
14031 input_path="$new_path"
14032 # Check if we need to convert this using DOS-style short mode. If the path
14033 # contains just simple characters, use it. Otherwise (spaces, weird characters),
14034 # take no chances and rewrite it.
14035 # Note: m4 eats our [], so we need to use [ and ] instead.
14036 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14037 if test "x$has_forbidden_chars" != x; then
14038 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14039 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14040 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14041 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14042 # Going to short mode and back again did indeed matter. Since short mode is
14043 # case insensitive, let's make it lowercase to improve readability.
14044 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14045 # Now convert it back to Unix-stile (cygpath)
14046 input_path=`$CYGPATH -u "$shortmode_path"`
14047 new_path="$input_path"
14048 fi
14049 fi
14050
14051 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14052 if test "x$test_cygdrive_prefix" = x; then
14053 # As a simple fix, exclude /usr/bin since it's not a real path.
14054 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14055 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14056 # a path prefixed by /cygdrive for fixpath to work.
14057 new_path="$CYGWIN_ROOT_PATH$input_path"
14058 fi
14059 fi
14060
14061
14062 if test "x$path" != "x$new_path"; then
14063 BOOT_JDK="$new_path"
14064 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14065 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14066 fi
14067
14068 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14069
14070 path="$BOOT_JDK"
14071 has_colon=`$ECHO $path | $GREP ^.:`
14072 new_path="$path"
14073 if test "x$has_colon" = x; then
14074 # Not in mixed or Windows style, start by that.
14075 new_path=`cmd //c echo $path`
14076 fi
14077
14078
14079 input_path="$new_path"
14080 # Check if we need to convert this using DOS-style short mode. If the path
14081 # contains just simple characters, use it. Otherwise (spaces, weird characters),
14082 # take no chances and rewrite it.
14083 # Note: m4 eats our [], so we need to use [ and ] instead.
14084 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14085 if test "x$has_forbidden_chars" != x; then
14086 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14087 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14088 fi
14089
14090
14091 windows_path="$new_path"
14092 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14093 unix_path=`$CYGPATH -u "$windows_path"`
14094 new_path="$unix_path"
14095 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14096 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14097 new_path="$unix_path"
14098 fi
14099
14100 if test "x$path" != "x$new_path"; then
14101 BOOT_JDK="$new_path"
14102 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14103 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14104 fi
14105
14106 # Save the first 10 bytes of this path to the storage, so fixpath can work.
14107 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14108
14109 else
14110 # We're on a posix platform. Hooray! :)
14111 path="$BOOT_JDK"
14112
14113 if test ! -f "$path" && test ! -d "$path"; then
14114 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14115 fi
14116
14117 has_space=`$ECHO "$path" | $GREP " "`
14118 if test "x$has_space" != x; then
14119 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14120 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14121 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14122 fi
14123 fi
14124
14125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14126 $as_echo_n "checking for Boot JDK... " >&6; }
14127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14128 $as_echo "$BOOT_JDK" >&6; }
14129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14130 $as_echo_n "checking Boot JDK version... " >&6; }
14131 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
14132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14133 $as_echo "$BOOT_JDK_VERSION" >&6; }
14134 fi # end check jdk version
14135 fi # end check rt.jar
14136 fi # end check javac
14137 fi # end check java
14138 fi # end check boot jdk found
14139 fi
14140
14141 elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14142
14143 if test "x$BOOT_JDK_FOUND" = xno; then
14144 # Now execute the test
14145
14146 BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14147 BOOT_JDK_SUFFIX="/Contents/Home"
14148 ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14149 if test "x$ALL_JDKS_FOUND" != x; then
14150 for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14151
14152 if test "x$BOOT_JDK_FOUND" = xno; then
14153 # Now execute the test
14154
14155 BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14156 if test -d "$BOOT_JDK"; then
14157 BOOT_JDK_FOUND=maybe
14158 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14159 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14160 fi
14161
14162
14163 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14164 if test "x$BOOT_JDK_FOUND" = xmaybe; then
14165 # Do we have a bin/java?
14166 if test ! -x "$BOOT_JDK/bin/java"; then
14167 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14168 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14169 BOOT_JDK_FOUND=no
14170 else
14171 # Do we have a bin/javac?
14172 if test ! -x "$BOOT_JDK/bin/javac"; then
14173 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14174 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14175 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14176 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14177 BOOT_JDK_FOUND=no
14178 else
14179 # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14180 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14181 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14182 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14183 BOOT_JDK_FOUND=no
14184 else
14185 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14186 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14187
14188 # Extra M4 quote needed to protect [] in grep expression.
14189 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`
14190 if test "x$FOUND_VERSION_78" = x; then
14191 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14192 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14193 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14194 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14195 BOOT_JDK_FOUND=no
14196 else
14197 # We're done! :-)
14198 BOOT_JDK_FOUND=yes
14199
14200 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14201
14202 # Input might be given as Windows format, start by converting to
14203 # unix format.
14204 path="$BOOT_JDK"
14205 new_path=`$CYGPATH -u "$path"`
14206
14207 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14208 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14209 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14210 # "foo.exe" is OK but "foo" is an error.
14211 #
14212 # This test is therefore slightly more accurate than "test -f" to check for file precense.
14213 # It is also a way to make sure we got the proper file name for the real test later on.
14214 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14215 if test "x$test_shortpath" = x; then
14216 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14217 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14218 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14219 fi
14220
14221 # Call helper function which possibly converts this using DOS-style short mode.
14222 # If so, the updated path is stored in $new_path.
14223
14224 input_path="$new_path"
14225 # Check if we need to convert this using DOS-style short mode. If the path
14226 # contains just simple characters, use it. Otherwise (spaces, weird characters),
14227 # take no chances and rewrite it.
14228 # Note: m4 eats our [], so we need to use [ and ] instead.
14229 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14230 if test "x$has_forbidden_chars" != x; then
14231 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14232 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14233 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14234 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14235 # Going to short mode and back again did indeed matter. Since short mode is
14236 # case insensitive, let's make it lowercase to improve readability.
14237 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14238 # Now convert it back to Unix-stile (cygpath)
14239 input_path=`$CYGPATH -u "$shortmode_path"`
14240 new_path="$input_path"
14241 fi
14242 fi
14243
14244 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14245 if test "x$test_cygdrive_prefix" = x; then
14246 # As a simple fix, exclude /usr/bin since it's not a real path.
14247 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14248 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14249 # a path prefixed by /cygdrive for fixpath to work.
14250 new_path="$CYGWIN_ROOT_PATH$input_path"
14251 fi
14252 fi
14253
14254
14255 if test "x$path" != "x$new_path"; then
14256 BOOT_JDK="$new_path"
14257 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14258 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14259 fi
14260
14261 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14262
14263 path="$BOOT_JDK"
14264 has_colon=`$ECHO $path | $GREP ^.:`
14265 new_path="$path"
14266 if test "x$has_colon" = x; then
14267 # Not in mixed or Windows style, start by that.
14268 new_path=`cmd //c echo $path`
14269 fi
14270
14271
14272 input_path="$new_path"
14273 # Check if we need to convert this using DOS-style short mode. If the path
14274 # contains just simple characters, use it. Otherwise (spaces, weird characters),
14275 # take no chances and rewrite it.
14276 # Note: m4 eats our [], so we need to use [ and ] instead.
14277 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14278 if test "x$has_forbidden_chars" != x; then
14279 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14280 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14281 fi
14282
14283
14284 windows_path="$new_path"
14285 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14286 unix_path=`$CYGPATH -u "$windows_path"`
14287 new_path="$unix_path"
14288 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14289 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14290 new_path="$unix_path"
14291 fi
14292
14293 if test "x$path" != "x$new_path"; then
14294 BOOT_JDK="$new_path"
14295 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14296 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14297 fi
14298
14299 # Save the first 10 bytes of this path to the storage, so fixpath can work.
14300 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14301
14302 else
14303 # We're on a posix platform. Hooray! :)
14304 path="$BOOT_JDK"
14305
14306 if test ! -f "$path" && test ! -d "$path"; then
14307 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14308 fi
14309
14310 has_space=`$ECHO "$path" | $GREP " "`
14311 if test "x$has_space" != x; then
14312 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14313 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14314 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14315 fi
14316 fi
14317
14318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14319 $as_echo_n "checking for Boot JDK... " >&6; }
14320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14321 $as_echo "$BOOT_JDK" >&6; }
14322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14323 $as_echo_n "checking Boot JDK version... " >&6; }
14324 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
14325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14326 $as_echo "$BOOT_JDK_VERSION" >&6; }
14327 fi # end check jdk version
14328 fi # end check rt.jar
14329 fi # end check javac
14330 fi # end check java
14331 fi # end check boot jdk found
14332 fi
14333
14334 done
14335 fi
14336
14337
14338 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14339 if test "x$BOOT_JDK_FOUND" = xmaybe; then
14340 # Do we have a bin/java?
14341 if test ! -x "$BOOT_JDK/bin/java"; then
14342 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14343 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14344 BOOT_JDK_FOUND=no
14345 else
14346 # Do we have a bin/javac?
14347 if test ! -x "$BOOT_JDK/bin/javac"; then
14348 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14349 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14350 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14351 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14352 BOOT_JDK_FOUND=no
14353 else
14354 # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14355 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14356 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14357 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14358 BOOT_JDK_FOUND=no
14359 else
14360 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14361 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14362
14363 # Extra M4 quote needed to protect [] in grep expression.
14364 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`
14365 if test "x$FOUND_VERSION_78" = x; then
14366 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14367 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14368 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14369 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14370 BOOT_JDK_FOUND=no
14371 else
14372 # We're done! :-)
14373 BOOT_JDK_FOUND=yes
14374
14375 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14376
14377 # Input might be given as Windows format, start by converting to
14378 # unix format.
14379 path="$BOOT_JDK"
14380 new_path=`$CYGPATH -u "$path"`
14381
14382 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14383 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14384 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14385 # "foo.exe" is OK but "foo" is an error.
14386 #
14387 # This test is therefore slightly more accurate than "test -f" to check for file precense.
14388 # It is also a way to make sure we got the proper file name for the real test later on.
14389 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14390 if test "x$test_shortpath" = x; then
14391 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14392 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14393 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14394 fi
14395
14396 # Call helper function which possibly converts this using DOS-style short mode.
14397 # If so, the updated path is stored in $new_path.
14398
14399 input_path="$new_path"
14400 # Check if we need to convert this using DOS-style short mode. If the path
14401 # contains just simple characters, use it. Otherwise (spaces, weird characters),
14402 # take no chances and rewrite it.
14403 # Note: m4 eats our [], so we need to use [ and ] instead.
14404 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14405 if test "x$has_forbidden_chars" != x; then
14406 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14407 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14408 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14409 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14410 # Going to short mode and back again did indeed matter. Since short mode is
14411 # case insensitive, let's make it lowercase to improve readability.
14412 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14413 # Now convert it back to Unix-stile (cygpath)
14414 input_path=`$CYGPATH -u "$shortmode_path"`
14415 new_path="$input_path"
14416 fi
14417 fi
14418
14419 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14420 if test "x$test_cygdrive_prefix" = x; then
14421 # As a simple fix, exclude /usr/bin since it's not a real path.
14422 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14423 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14424 # a path prefixed by /cygdrive for fixpath to work.
14425 new_path="$CYGWIN_ROOT_PATH$input_path"
14426 fi
14427 fi
14428
14429
14430 if test "x$path" != "x$new_path"; then
14431 BOOT_JDK="$new_path"
14432 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14433 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14434 fi
14435
14436 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14437
14438 path="$BOOT_JDK"
14439 has_colon=`$ECHO $path | $GREP ^.:`
14440 new_path="$path"
14441 if test "x$has_colon" = x; then
14442 # Not in mixed or Windows style, start by that.
14443 new_path=`cmd //c echo $path`
14444 fi
14445
14446
14447 input_path="$new_path"
14448 # Check if we need to convert this using DOS-style short mode. If the path
14449 # contains just simple characters, use it. Otherwise (spaces, weird characters),
14450 # take no chances and rewrite it.
14451 # Note: m4 eats our [], so we need to use [ and ] instead.
14452 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14453 if test "x$has_forbidden_chars" != x; then
14454 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14455 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14456 fi
14457
14458
14459 windows_path="$new_path"
14460 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14461 unix_path=`$CYGPATH -u "$windows_path"`
14462 new_path="$unix_path"
14463 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14464 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14465 new_path="$unix_path"
14466 fi
14467
14468 if test "x$path" != "x$new_path"; then
14469 BOOT_JDK="$new_path"
14470 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14471 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14472 fi
14473
14474 # Save the first 10 bytes of this path to the storage, so fixpath can work.
14475 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14476
14477 else
14478 # We're on a posix platform. Hooray! :)
14479 path="$BOOT_JDK"
14480
14481 if test ! -f "$path" && test ! -d "$path"; then
14482 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14483 fi
14484
14485 has_space=`$ECHO "$path" | $GREP " "`
14486 if test "x$has_space" != x; then
14487 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14488 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14489 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14490 fi
14491 fi
14492
14493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14494 $as_echo_n "checking for Boot JDK... " >&6; }
14495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14496 $as_echo "$BOOT_JDK" >&6; }
14497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14498 $as_echo_n "checking Boot JDK version... " >&6; }
14499 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
14500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14501 $as_echo "$BOOT_JDK_VERSION" >&6; }
14502 fi # end check jdk version
14503 fi # end check rt.jar
14504 fi # end check javac
14505 fi # end check java
14506 fi # end check boot jdk found
14507 fi
14508
14509
14510 if test "x$BOOT_JDK_FOUND" = xno; then
14511 # Now execute the test
14512
14513 BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14514 BOOT_JDK_SUFFIX="/Contents/Home"
14515 ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14516 if test "x$ALL_JDKS_FOUND" != x; then
14517 for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14518
14519 if test "x$BOOT_JDK_FOUND" = xno; then
14520 # Now execute the test
14521
14522 BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14523 if test -d "$BOOT_JDK"; then
14524 BOOT_JDK_FOUND=maybe
14525 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14526 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14527 fi
14528
14529
14530 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14531 if test "x$BOOT_JDK_FOUND" = xmaybe; then
14532 # Do we have a bin/java?
14533 if test ! -x "$BOOT_JDK/bin/java"; then
14534 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14535 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14536 BOOT_JDK_FOUND=no
14537 else
14538 # Do we have a bin/javac?
14539 if test ! -x "$BOOT_JDK/bin/javac"; then
14540 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14541 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14542 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14543 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14544 BOOT_JDK_FOUND=no
14545 else
14546 # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14547 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14548 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14549 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14550 BOOT_JDK_FOUND=no
14551 else
14552 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14553 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14554
14555 # Extra M4 quote needed to protect [] in grep expression.
14556 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`
14557 if test "x$FOUND_VERSION_78" = x; then
14558 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14559 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14560 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14561 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14562 BOOT_JDK_FOUND=no
14563 else
14564 # We're done! :-)
14565 BOOT_JDK_FOUND=yes
14566
14567 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14568
14569 # Input might be given as Windows format, start by converting to
14570 # unix format.
14571 path="$BOOT_JDK"
14572 new_path=`$CYGPATH -u "$path"`
14573
14574 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14575 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14576 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14577 # "foo.exe" is OK but "foo" is an error.
14578 #
14579 # This test is therefore slightly more accurate than "test -f" to check for file precense.
14580 # It is also a way to make sure we got the proper file name for the real test later on.
14581 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14582 if test "x$test_shortpath" = x; then
14583 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14584 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14585 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14586 fi
14587
14588 # Call helper function which possibly converts this using DOS-style short mode.
14589 # If so, the updated path is stored in $new_path.
14590
14591 input_path="$new_path"
14592 # Check if we need to convert this using DOS-style short mode. If the path
14593 # contains just simple characters, use it. Otherwise (spaces, weird characters),
14594 # take no chances and rewrite it.
14595 # Note: m4 eats our [], so we need to use [ and ] instead.
14596 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14597 if test "x$has_forbidden_chars" != x; then
14598 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14599 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14600 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14601 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14602 # Going to short mode and back again did indeed matter. Since short mode is
14603 # case insensitive, let's make it lowercase to improve readability.
14604 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14605 # Now convert it back to Unix-stile (cygpath)
14606 input_path=`$CYGPATH -u "$shortmode_path"`
14607 new_path="$input_path"
14608 fi
14609 fi
14610
14611 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14612 if test "x$test_cygdrive_prefix" = x; then
14613 # As a simple fix, exclude /usr/bin since it's not a real path.
14614 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14615 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14616 # a path prefixed by /cygdrive for fixpath to work.
14617 new_path="$CYGWIN_ROOT_PATH$input_path"
14618 fi
14619 fi
14620
14621
14622 if test "x$path" != "x$new_path"; then
14623 BOOT_JDK="$new_path"
14624 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14625 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14626 fi
14627
14628 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14629
14630 path="$BOOT_JDK"
14631 has_colon=`$ECHO $path | $GREP ^.:`
14632 new_path="$path"
14633 if test "x$has_colon" = x; then
14634 # Not in mixed or Windows style, start by that.
14635 new_path=`cmd //c echo $path`
14636 fi
14637
14638
14639 input_path="$new_path"
14640 # Check if we need to convert this using DOS-style short mode. If the path
14641 # contains just simple characters, use it. Otherwise (spaces, weird characters),
14642 # take no chances and rewrite it.
14643 # Note: m4 eats our [], so we need to use [ and ] instead.
14644 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14645 if test "x$has_forbidden_chars" != x; then
14646 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14647 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14648 fi
14649
14650
14651 windows_path="$new_path"
14652 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14653 unix_path=`$CYGPATH -u "$windows_path"`
14654 new_path="$unix_path"
14655 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14656 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14657 new_path="$unix_path"
14658 fi
14659
14660 if test "x$path" != "x$new_path"; then
14661 BOOT_JDK="$new_path"
14662 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14663 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14664 fi
14665
14666 # Save the first 10 bytes of this path to the storage, so fixpath can work.
14667 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14668
14669 else
14670 # We're on a posix platform. Hooray! :)
14671 path="$BOOT_JDK"
14672
14673 if test ! -f "$path" && test ! -d "$path"; then
14674 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14675 fi
14676
14677 has_space=`$ECHO "$path" | $GREP " "`
14678 if test "x$has_space" != x; then
14679 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14680 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14681 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14682 fi
14683 fi
14684
14685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14686 $as_echo_n "checking for Boot JDK... " >&6; }
14687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14688 $as_echo "$BOOT_JDK" >&6; }
14689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14690 $as_echo_n "checking Boot JDK version... " >&6; }
14691 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
14692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14693 $as_echo "$BOOT_JDK_VERSION" >&6; }
14694 fi # end check jdk version
14695 fi # end check rt.jar
14696 fi # end check javac
14697 fi # end check java
14698 fi # end check boot jdk found
14699 fi
14700
14701 done
14702 fi
14703
14704
14705 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14706 if test "x$BOOT_JDK_FOUND" = xmaybe; then
14707 # Do we have a bin/java?
14708 if test ! -x "$BOOT_JDK/bin/java"; then
14709 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14710 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14711 BOOT_JDK_FOUND=no
14712 else
14713 # Do we have a bin/javac?
14714 if test ! -x "$BOOT_JDK/bin/javac"; then
14715 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14716 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14717 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14718 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14719 BOOT_JDK_FOUND=no
14720 else
14721 # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14722 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14723 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14724 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14725 BOOT_JDK_FOUND=no
14726 else
14727 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14728 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14729
14730 # Extra M4 quote needed to protect [] in grep expression.
14731 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`
14732 if test "x$FOUND_VERSION_78" = x; then
14733 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14734 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14735 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14736 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14737 BOOT_JDK_FOUND=no
14738 else
14739 # We're done! :-)
14740 BOOT_JDK_FOUND=yes
14741
14742 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14743
14744 # Input might be given as Windows format, start by converting to
14745 # unix format.
14746 path="$BOOT_JDK"
14747 new_path=`$CYGPATH -u "$path"`
14748
14749 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14750 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14751 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14752 # "foo.exe" is OK but "foo" is an error.
14753 #
14754 # This test is therefore slightly more accurate than "test -f" to check for file precense.
14755 # It is also a way to make sure we got the proper file name for the real test later on.
14756 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14757 if test "x$test_shortpath" = x; then
14758 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14759 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14760 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14761 fi
14762
14763 # Call helper function which possibly converts this using DOS-style short mode.
14764 # If so, the updated path is stored in $new_path.
14765
14766 input_path="$new_path"
14767 # Check if we need to convert this using DOS-style short mode. If the path
14768 # contains just simple characters, use it. Otherwise (spaces, weird characters),
14769 # take no chances and rewrite it.
14770 # Note: m4 eats our [], so we need to use [ and ] instead.
14771 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14772 if test "x$has_forbidden_chars" != x; then
14773 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14774 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14775 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14776 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14777 # Going to short mode and back again did indeed matter. Since short mode is
14778 # case insensitive, let's make it lowercase to improve readability.
14779 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14780 # Now convert it back to Unix-stile (cygpath)
14781 input_path=`$CYGPATH -u "$shortmode_path"`
14782 new_path="$input_path"
14783 fi
14784 fi
14785
14786 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14787 if test "x$test_cygdrive_prefix" = x; then
14788 # As a simple fix, exclude /usr/bin since it's not a real path.
14789 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14790 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14791 # a path prefixed by /cygdrive for fixpath to work.
14792 new_path="$CYGWIN_ROOT_PATH$input_path"
14793 fi
14794 fi
14795
14796
14797 if test "x$path" != "x$new_path"; then
14798 BOOT_JDK="$new_path"
14799 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14800 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14801 fi
14802
14803 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14804
14805 path="$BOOT_JDK"
14806 has_colon=`$ECHO $path | $GREP ^.:`
14807 new_path="$path"
14808 if test "x$has_colon" = x; then
14809 # Not in mixed or Windows style, start by that.
14810 new_path=`cmd //c echo $path`
14811 fi
14812
14813
14814 input_path="$new_path"
14815 # Check if we need to convert this using DOS-style short mode. If the path
14816 # contains just simple characters, use it. Otherwise (spaces, weird characters),
14817 # take no chances and rewrite it.
14818 # Note: m4 eats our [], so we need to use [ and ] instead.
14819 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14820 if test "x$has_forbidden_chars" != x; then
14821 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14822 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14823 fi
14824
14825
14826 windows_path="$new_path"
14827 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14828 unix_path=`$CYGPATH -u "$windows_path"`
14829 new_path="$unix_path"
14830 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14831 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14832 new_path="$unix_path"
14833 fi
14834
14835 if test "x$path" != "x$new_path"; then
14836 BOOT_JDK="$new_path"
14837 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14838 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14839 fi
14840
14841 # Save the first 10 bytes of this path to the storage, so fixpath can work.
14842 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14843
14844 else
14845 # We're on a posix platform. Hooray! :)
14846 path="$BOOT_JDK"
14847
14848 if test ! -f "$path" && test ! -d "$path"; then
14849 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14850 fi
14851
14852 has_space=`$ECHO "$path" | $GREP " "`
14853 if test "x$has_space" != x; then
14854 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14855 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14856 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14857 fi
14858 fi
14859
14860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14861 $as_echo_n "checking for Boot JDK... " >&6; }
14862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14863 $as_echo "$BOOT_JDK" >&6; }
14864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14865 $as_echo_n "checking Boot JDK version... " >&6; }
14866 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
14867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14868 $as_echo "$BOOT_JDK_VERSION" >&6; }
14869 fi # end check jdk version
14870 fi # end check rt.jar
14871 fi # end check javac
14872 fi # end check java
14873 fi # end check boot jdk found
14874 fi
14875
14876 elif test "x$OPENJDK_TARGET_OS" = xlinux; then
14877
14878 if test "x$BOOT_JDK_FOUND" = xno; then
14879 # Now execute the test
14880
14881 BOOT_JDK_PREFIX="/usr/lib/jvm"
14882 BOOT_JDK_SUFFIX=""
14883 ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14884 if test "x$ALL_JDKS_FOUND" != x; then
14885 for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14886
14887 if test "x$BOOT_JDK_FOUND" = xno; then
14888 # Now execute the test
14889
14890 BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14891 if test -d "$BOOT_JDK"; then
14892 BOOT_JDK_FOUND=maybe
14893 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14894 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14895 fi
14896
14897
14898 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14899 if test "x$BOOT_JDK_FOUND" = xmaybe; then
14900 # Do we have a bin/java?
14901 if test ! -x "$BOOT_JDK/bin/java"; then
14902 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14903 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14904 BOOT_JDK_FOUND=no
14905 else
14906 # Do we have a bin/javac?
14907 if test ! -x "$BOOT_JDK/bin/javac"; then
14908 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14909 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14910 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14911 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14912 BOOT_JDK_FOUND=no
14913 else
14914 # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14915 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14916 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14917 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14918 BOOT_JDK_FOUND=no
14919 else
14920 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14921 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14922
14923 # Extra M4 quote needed to protect [] in grep expression.
14924 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`
14925 if test "x$FOUND_VERSION_78" = x; then
14926 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14927 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14928 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14929 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14930 BOOT_JDK_FOUND=no
14931 else
14932 # We're done! :-)
14933 BOOT_JDK_FOUND=yes
14934
14935 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14936
14937 # Input might be given as Windows format, start by converting to
14938 # unix format.
14939 path="$BOOT_JDK"
14940 new_path=`$CYGPATH -u "$path"`
14941
14942 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14943 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14944 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14945 # "foo.exe" is OK but "foo" is an error.
14946 #
14947 # This test is therefore slightly more accurate than "test -f" to check for file precense.
14948 # It is also a way to make sure we got the proper file name for the real test later on.
14949 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14950 if test "x$test_shortpath" = x; then
14951 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14952 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14953 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14954 fi
14955
14956 # Call helper function which possibly converts this using DOS-style short mode.
14957 # If so, the updated path is stored in $new_path.
14958
14959 input_path="$new_path"
14960 # Check if we need to convert this using DOS-style short mode. If the path
14961 # contains just simple characters, use it. Otherwise (spaces, weird characters),
14962 # take no chances and rewrite it.
14963 # Note: m4 eats our [], so we need to use [ and ] instead.
14964 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14965 if test "x$has_forbidden_chars" != x; then
14966 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14967 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14968 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14969 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14970 # Going to short mode and back again did indeed matter. Since short mode is
14971 # case insensitive, let's make it lowercase to improve readability.
14972 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14973 # Now convert it back to Unix-stile (cygpath)
14974 input_path=`$CYGPATH -u "$shortmode_path"`
14975 new_path="$input_path"
14976 fi
14977 fi
14978
14979 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14980 if test "x$test_cygdrive_prefix" = x; then
14981 # As a simple fix, exclude /usr/bin since it's not a real path.
14982 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14983 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14984 # a path prefixed by /cygdrive for fixpath to work.
14985 new_path="$CYGWIN_ROOT_PATH$input_path"
14986 fi
14987 fi
14988
14989
14990 if test "x$path" != "x$new_path"; then
14991 BOOT_JDK="$new_path"
14992 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14993 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14994 fi
14995
14996 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14997
14998 path="$BOOT_JDK"
14999 has_colon=`$ECHO $path | $GREP ^.:`
15000 new_path="$path"
15001 if test "x$has_colon" = x; then
15002 # Not in mixed or Windows style, start by that.
15003 new_path=`cmd //c echo $path`
15004 fi
15005
15006
15007 input_path="$new_path"
15008 # Check if we need to convert this using DOS-style short mode. If the path
15009 # contains just simple characters, use it. Otherwise (spaces, weird characters),
15010 # take no chances and rewrite it.
15011 # Note: m4 eats our [], so we need to use [ and ] instead.
15012 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15013 if test "x$has_forbidden_chars" != x; then
15014 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15015 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15016 fi
15017
15018
15019 windows_path="$new_path"
15020 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15021 unix_path=`$CYGPATH -u "$windows_path"`
15022 new_path="$unix_path"
15023 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15024 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15025 new_path="$unix_path"
15026 fi
15027
15028 if test "x$path" != "x$new_path"; then
15029 BOOT_JDK="$new_path"
15030 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15031 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15032 fi
15033
15034 # Save the first 10 bytes of this path to the storage, so fixpath can work.
15035 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15036
15037 else
15038 # We're on a posix platform. Hooray! :)
15039 path="$BOOT_JDK"
15040
15041 if test ! -f "$path" && test ! -d "$path"; then
15042 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15043 fi
15044
15045 has_space=`$ECHO "$path" | $GREP " "`
15046 if test "x$has_space" != x; then
15047 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15048 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15049 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15050 fi
15051 fi
15052
15053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15054 $as_echo_n "checking for Boot JDK... " >&6; }
15055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15056 $as_echo "$BOOT_JDK" >&6; }
15057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15058 $as_echo_n "checking Boot JDK version... " >&6; }
15059 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
15060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15061 $as_echo "$BOOT_JDK_VERSION" >&6; }
15062 fi # end check jdk version
15063 fi # end check rt.jar
15064 fi # end check javac
15065 fi # end check java
15066 fi # end check boot jdk found
15067 fi
15068
15069 done
15070 fi
15071
15072
15073 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15074 if test "x$BOOT_JDK_FOUND" = xmaybe; then
15075 # Do we have a bin/java?
15076 if test ! -x "$BOOT_JDK/bin/java"; then
15077 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15078 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15079 BOOT_JDK_FOUND=no
15080 else
15081 # Do we have a bin/javac?
15082 if test ! -x "$BOOT_JDK/bin/javac"; then
15083 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15084 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15085 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15086 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15087 BOOT_JDK_FOUND=no
15088 else
15089 # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15090 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15091 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15092 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15093 BOOT_JDK_FOUND=no
15094 else
15095 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15096 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15097
15098 # Extra M4 quote needed to protect [] in grep expression.
15099 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`
15100 if test "x$FOUND_VERSION_78" = x; then
15101 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15102 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15103 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15104 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15105 BOOT_JDK_FOUND=no
15106 else
15107 # We're done! :-)
15108 BOOT_JDK_FOUND=yes
15109
15110 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15111
15112 # Input might be given as Windows format, start by converting to
15113 # unix format.
15114 path="$BOOT_JDK"
15115 new_path=`$CYGPATH -u "$path"`
15116
15117 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15118 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15119 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15120 # "foo.exe" is OK but "foo" is an error.
15121 #
15122 # This test is therefore slightly more accurate than "test -f" to check for file precense.
15123 # It is also a way to make sure we got the proper file name for the real test later on.
15124 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15125 if test "x$test_shortpath" = x; then
15126 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15127 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15128 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15129 fi
15130
15131 # Call helper function which possibly converts this using DOS-style short mode.
15132 # If so, the updated path is stored in $new_path.
15133
15134 input_path="$new_path"
15135 # Check if we need to convert this using DOS-style short mode. If the path
15136 # contains just simple characters, use it. Otherwise (spaces, weird characters),
15137 # take no chances and rewrite it.
15138 # Note: m4 eats our [], so we need to use [ and ] instead.
15139 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15140 if test "x$has_forbidden_chars" != x; then
15141 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15142 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15143 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15144 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15145 # Going to short mode and back again did indeed matter. Since short mode is
15146 # case insensitive, let's make it lowercase to improve readability.
15147 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15148 # Now convert it back to Unix-stile (cygpath)
15149 input_path=`$CYGPATH -u "$shortmode_path"`
15150 new_path="$input_path"
15151 fi
15152 fi
15153
15154 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15155 if test "x$test_cygdrive_prefix" = x; then
15156 # As a simple fix, exclude /usr/bin since it's not a real path.
15157 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15158 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15159 # a path prefixed by /cygdrive for fixpath to work.
15160 new_path="$CYGWIN_ROOT_PATH$input_path"
15161 fi
15162 fi
15163
15164
15165 if test "x$path" != "x$new_path"; then
15166 BOOT_JDK="$new_path"
15167 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15168 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15169 fi
15170
15171 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15172
15173 path="$BOOT_JDK"
15174 has_colon=`$ECHO $path | $GREP ^.:`
15175 new_path="$path"
15176 if test "x$has_colon" = x; then
15177 # Not in mixed or Windows style, start by that.
15178 new_path=`cmd //c echo $path`
15179 fi
15180
15181
15182 input_path="$new_path"
15183 # Check if we need to convert this using DOS-style short mode. If the path
15184 # contains just simple characters, use it. Otherwise (spaces, weird characters),
15185 # take no chances and rewrite it.
15186 # Note: m4 eats our [], so we need to use [ and ] instead.
15187 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15188 if test "x$has_forbidden_chars" != x; then
15189 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15190 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15191 fi
15192
15193
15194 windows_path="$new_path"
15195 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15196 unix_path=`$CYGPATH -u "$windows_path"`
15197 new_path="$unix_path"
15198 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15199 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15200 new_path="$unix_path"
15201 fi
15202
15203 if test "x$path" != "x$new_path"; then
15204 BOOT_JDK="$new_path"
15205 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15206 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15207 fi
15208
15209 # Save the first 10 bytes of this path to the storage, so fixpath can work.
15210 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15211
15212 else
15213 # We're on a posix platform. Hooray! :)
15214 path="$BOOT_JDK"
15215
15216 if test ! -f "$path" && test ! -d "$path"; then
15217 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15218 fi
15219
15220 has_space=`$ECHO "$path" | $GREP " "`
15221 if test "x$has_space" != x; then
15222 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15223 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15224 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15225 fi
15226 fi
15227
15228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15229 $as_echo_n "checking for Boot JDK... " >&6; }
15230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15231 $as_echo "$BOOT_JDK" >&6; }
15232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15233 $as_echo_n "checking Boot JDK version... " >&6; }
15234 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
15235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15236 $as_echo "$BOOT_JDK_VERSION" >&6; }
15237 fi # end check jdk version
15238 fi # end check rt.jar
15239 fi # end check javac
15240 fi # end check java
15241 fi # end check boot jdk found
15242 fi
15243
15244 fi
15245
15246
15247 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15248 if test "x$BOOT_JDK_FOUND" = xmaybe; then
15249 # Do we have a bin/java?
15250 if test ! -x "$BOOT_JDK/bin/java"; then
15251 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15252 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15253 BOOT_JDK_FOUND=no
15254 else
15255 # Do we have a bin/javac?
15256 if test ! -x "$BOOT_JDK/bin/javac"; then
15257 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15258 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15259 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15260 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15261 BOOT_JDK_FOUND=no
15262 else
15263 # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15264 if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15265 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15266 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15267 BOOT_JDK_FOUND=no
15268 else
15269 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15270 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15271
15272 # Extra M4 quote needed to protect [] in grep expression.
15273 FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`
15274 if test "x$FOUND_VERSION_78" = x; then
15275 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15276 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15277 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15278 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15279 BOOT_JDK_FOUND=no
15280 else
15281 # We're done! :-)
15282 BOOT_JDK_FOUND=yes
15283
15284 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15285
15286 # Input might be given as Windows format, start by converting to
15287 # unix format.
15288 path="$BOOT_JDK"
15289 new_path=`$CYGPATH -u "$path"`
15290
15291 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15292 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15293 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15294 # "foo.exe" is OK but "foo" is an error.
15295 #
15296 # This test is therefore slightly more accurate than "test -f" to check for file precense.
15297 # It is also a way to make sure we got the proper file name for the real test later on.
15298 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15299 if test "x$test_shortpath" = x; then
15300 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15301 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15302 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15303 fi
15304
15305 # Call helper function which possibly converts this using DOS-style short mode.
15306 # If so, the updated path is stored in $new_path.
15307
15308 input_path="$new_path"
15309 # Check if we need to convert this using DOS-style short mode. If the path
15310 # contains just simple characters, use it. Otherwise (spaces, weird characters),
15311 # take no chances and rewrite it.
15312 # Note: m4 eats our [], so we need to use [ and ] instead.
15313 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15314 if test "x$has_forbidden_chars" != x; then
15315 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15316 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15317 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15318 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15319 # Going to short mode and back again did indeed matter. Since short mode is
15320 # case insensitive, let's make it lowercase to improve readability.
15321 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15322 # Now convert it back to Unix-stile (cygpath)
15323 input_path=`$CYGPATH -u "$shortmode_path"`
15324 new_path="$input_path"
15325 fi
15326 fi
15327
15328 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15329 if test "x$test_cygdrive_prefix" = x; then
15330 # As a simple fix, exclude /usr/bin since it's not a real path.
15331 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15332 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15333 # a path prefixed by /cygdrive for fixpath to work.
15334 new_path="$CYGWIN_ROOT_PATH$input_path"
15335 fi
15336 fi
15337
15338
15339 if test "x$path" != "x$new_path"; then
15340 BOOT_JDK="$new_path"
15341 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15342 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15343 fi
15344
15345 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15346
15347 path="$BOOT_JDK"
15348 has_colon=`$ECHO $path | $GREP ^.:`
15349 new_path="$path"
15350 if test "x$has_colon" = x; then
15351 # Not in mixed or Windows style, start by that.
15352 new_path=`cmd //c echo $path`
15353 fi
15354
15355
15356 input_path="$new_path"
15357 # Check if we need to convert this using DOS-style short mode. If the path
15358 # contains just simple characters, use it. Otherwise (spaces, weird characters),
15359 # take no chances and rewrite it.
15360 # Note: m4 eats our [], so we need to use [ and ] instead.
15361 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15362 if test "x$has_forbidden_chars" != x; then
15363 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15364 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15365 fi
15366
15367
15368 windows_path="$new_path"
15369 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15370 unix_path=`$CYGPATH -u "$windows_path"`
15371 new_path="$unix_path"
15372 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15373 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15374 new_path="$unix_path"
15375 fi
15376
15377 if test "x$path" != "x$new_path"; then
15378 BOOT_JDK="$new_path"
15379 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15380 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15381 fi
15382
15383 # Save the first 10 bytes of this path to the storage, so fixpath can work.
15384 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15385
15386 else
15387 # We're on a posix platform. Hooray! :)
15388 path="$BOOT_JDK"
15389
15390 if test ! -f "$path" && test ! -d "$path"; then
15391 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15392 fi
15393
15394 has_space=`$ECHO "$path" | $GREP " "`
15395 if test "x$has_space" != x; then
15396 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15397 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15398 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15399 fi
15400 fi
15401
15402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15403 $as_echo_n "checking for Boot JDK... " >&6; }
15404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15405 $as_echo "$BOOT_JDK" >&6; }
15406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15407 $as_echo_n "checking Boot JDK version... " >&6; }
15408 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
15409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15410 $as_echo "$BOOT_JDK_VERSION" >&6; }
15411 fi # end check jdk version
15412 fi # end check rt.jar
15413 fi # end check javac
15414 fi # end check java
15415 fi # end check boot jdk found
15416 fi
15417
15418
15419 # If we haven't found anything yet, we've truly lost. Give up.
15420 if test "x$BOOT_JDK_FOUND" = xno; then
15421
15422 # Print a helpful message on how to acquire the necessary build dependency.
15423 # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15424 MISSING_DEPENDENCY=openjdk
15425 PKGHANDLER_COMMAND=
15426
15427 case $PKGHANDLER in
15428 apt-get)
15429 apt_help $MISSING_DEPENDENCY ;;
15430 yum)
15431 yum_help $MISSING_DEPENDENCY ;;
15432 port)
15433 port_help $MISSING_DEPENDENCY ;;
15434 pkgutil)
15435 pkgutil_help $MISSING_DEPENDENCY ;;
15436 pkgadd)
15437 pkgadd_help $MISSING_DEPENDENCY ;;
15438 * )
15439 break ;;
15440 esac
15441
15442 if test "x$PKGHANDLER_COMMAND" != x; then
15443 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15444 fi
15445
15446 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15447 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15448 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15449 $as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15450 as_fn_error $? "Cannot continue" "$LINENO" 5
15451 fi
15452
15453 # Setup proper paths for what we found
15454 BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15455 if test ! -f "$BOOT_RTJAR"; then
15456 # On MacOSX it is called classes.jar
15457 BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15458 if test -f "$BOOT_RTJAR"; then
15459 # Remove the ..
15460 BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15461 fi
15462 fi
15463 BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15464 BOOT_JDK="$BOOT_JDK"
15465
15466
15467
15468
15469 # Setup tools from the Boot JDK.
15470
15471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15472 $as_echo_n "checking for java in Boot JDK... " >&6; }
15473 JAVA=$BOOT_JDK/bin/java
15474 if test ! -x $JAVA; then
15475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15476 $as_echo "not found" >&6; }
15477 { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15478 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15479 as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15480 fi
15481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15482 $as_echo "ok" >&6; }
15483
15484
15485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15486 $as_echo_n "checking for javac in Boot JDK... " >&6; }
15487 JAVAC=$BOOT_JDK/bin/javac
15488 if test ! -x $JAVAC; then
15489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15490 $as_echo "not found" >&6; }
15491 { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15492 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15493 as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15494 fi
15495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15496 $as_echo "ok" >&6; }
15497
15498
15499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15500 $as_echo_n "checking for javah in Boot JDK... " >&6; }
15501 JAVAH=$BOOT_JDK/bin/javah
15502 if test ! -x $JAVAH; then
15503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15504 $as_echo "not found" >&6; }
15505 { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15506 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15507 as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15508 fi
15509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15510 $as_echo "ok" >&6; }
15511
15512
15513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15514 $as_echo_n "checking for javap in Boot JDK... " >&6; }
15515 JAVAP=$BOOT_JDK/bin/javap
15516 if test ! -x $JAVAP; then
15517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15518 $as_echo "not found" >&6; }
15519 { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15520 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15521 as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15522 fi
15523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15524 $as_echo "ok" >&6; }
15525
15526
15527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15528 $as_echo_n "checking for jar in Boot JDK... " >&6; }
15529 JAR=$BOOT_JDK/bin/jar
15530 if test ! -x $JAR; then
15531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15532 $as_echo "not found" >&6; }
15533 { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15534 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15535 as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15536 fi
15537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15538 $as_echo "ok" >&6; }
15539
15540
15541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15542 $as_echo_n "checking for rmic in Boot JDK... " >&6; }
15543 RMIC=$BOOT_JDK/bin/rmic
15544 if test ! -x $RMIC; then
15545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15546 $as_echo "not found" >&6; }
15547 { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15548 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15549 as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15550 fi
15551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15552 $as_echo "ok" >&6; }
15553
15554
15555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15556 $as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15557 NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15558 if test ! -x $NATIVE2ASCII; then
15559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15560 $as_echo "not found" >&6; }
15561 { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15562 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15563 as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15564 fi
15565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15566 $as_echo "ok" >&6; }
15567
15568
15569 # Finally, set some other options...
15570
15571 # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15572 BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15573
15574
15575
15576
15577 ##############################################################################
15578 #
15579 # Specify options for anything that is run with the Boot JDK.
15580 #
15581
15582 # Check whether --with-boot-jdk-jvmargs was given.
15583 if test "${with_boot_jdk_jvmargs+set}" = set; then :
15584 withval=$with_boot_jdk_jvmargs;
15585 fi
15586
15587
15588 if test "x$with_boot_jdk_jvmargs" = x; then
15589 # Not all JVM:s accept the same arguments on the command line.
15590 # OpenJDK specific increase in thread stack for JDK build,
15591 # well more specifically, when running javac.
15592 if test "x$BUILD_NUM_BITS" = x32; then
15593 STACK_SIZE=768
15594 else
15595 # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15596 # since 64-bit pointers are pushed on the stach. Apparently, we need
15597 # to increase the stack space when javacing the JDK....
15598 STACK_SIZE=1536
15599 fi
15600
15601 # Minimum amount of heap memory.
15602
15603 # Test if -Xms64M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15604 # If so, then append -Xms64M to boot_jdk_jvmargs
15605 FOUND_WARN=`$JAVA -Xms64M -version 2>&1 | grep -i warn`
15606 FOUND_VERSION=`$JAVA -Xms64M -version 2>&1 | grep " version \""`
15607 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15608 boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15609 fi
15610
15611 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15612 # Why does macosx need more heap? Its the huge JDK batch.
15613
15614 # Test if -Xmx1600M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15615 # If so, then append -Xmx1600M to boot_jdk_jvmargs
15616 FOUND_WARN=`$JAVA -Xmx1600M -version 2>&1 | grep -i warn`
15617 FOUND_VERSION=`$JAVA -Xmx1600M -version 2>&1 | grep " version \""`
15618 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15619 boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15620 fi
15621
15622 else
15623
15624 # Test if -Xmx1100M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15625 # If so, then append -Xmx1100M to boot_jdk_jvmargs
15626 FOUND_WARN=`$JAVA -Xmx1100M -version 2>&1 | grep -i warn`
15627 FOUND_VERSION=`$JAVA -Xmx1100M -version 2>&1 | grep " version \""`
15628 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15629 boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15630 fi
15631
15632 fi
15633 # When is adding -client something that speeds up the JVM?
15634 # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15635
15636 # Test if -XX:PermSize=32m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15637 # If so, then append -XX:PermSize=32m to boot_jdk_jvmargs
15638 FOUND_WARN=`$JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
15639 FOUND_VERSION=`$JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
15640 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15641 boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15642 fi
15643
15644
15645 # Test if -XX:MaxPermSize=160m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15646 # If so, then append -XX:MaxPermSize=160m to boot_jdk_jvmargs
15647 FOUND_WARN=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
15648 FOUND_VERSION=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
15649 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15650 boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15651 fi
15652
15653
15654 # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15655 # If so, then append -XX:ThreadStackSize=$STACK_SIZE to boot_jdk_jvmargs
15656 FOUND_WARN=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
15657 FOUND_VERSION=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
15658 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15659 boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15660 fi
15661
15662 # Disable special log output when a debug build is used as Boot JDK...
15663
15664 # Test if -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15665 # If so, then append -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput to boot_jdk_jvmargs
15666 FOUND_WARN=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep -i warn`
15667 FOUND_VERSION=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep " version \""`
15668 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15669 boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15670 fi
15671
15672 fi
15673
15674 BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15675
15676
15677
15678 ###############################################################################
15679 #
15680 # Configure the sources to use. We can add or override individual directories.
15681 #
15682 ###############################################################################
15683
15684
15685
15686 # Where are the sources. Any of these can be overridden
15687 # using --with-override-corba and the likes.
15688 LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15689 CORBA_TOPDIR="$SRC_ROOT/corba"
15690 JAXP_TOPDIR="$SRC_ROOT/jaxp"
15691 JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15692 HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15693 NASHORN_TOPDIR="$SRC_ROOT/nashorn"
15694 JDK_TOPDIR="$SRC_ROOT/jdk"
15695
15696
15697
15698
15699
15700
15701
15702
15703
15704
15705 ###############################################################################
15706 #
15707 # Pickup additional source for a component from outside of the source root
15708 # or override source for a component.
15709 #
15710
15711 # Check whether --with-add-source-root was given.
15712 if test "${with_add_source_root+set}" = set; then :
15713 withval=$with_add_source_root;
15714 fi
15715
15716
15717
15718 # Check whether --with-override-source-root was given.
15719 if test "${with_override_source_root+set}" = set; then :
15720 withval=$with_override_source_root;
15721 fi
15722
15723
15724
15725 # Check whether --with-adds-and-overrides was given.
15726 if test "${with_adds_and_overrides+set}" = set; then :
15727 withval=$with_adds_and_overrides;
15728 fi
15729
15730
15731 if test "x$with_adds_and_overrides" != x; then
15732 with_add_source_root="$with_adds_and_overrides/adds"
15733 with_override_source_root="$with_adds_and_overrides/overrides"
15734 fi
15735
15736 if test "x$with_add_source_root" != x; then
15737 if ! test -d $with_add_source_root; then
15738 as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
15739 fi
15740 CURDIR="$PWD"
15741 cd "$with_add_source_root"
15742 ADD_SRC_ROOT="`pwd`"
15743 cd "$CURDIR"
15744 # Verify that the addon source root does not have any root makefiles.
15745 # If it does, then it is usually an error, prevent this.
15746 if test -f $with_add_source_root/langtools/makefiles/Makefile || \
15747 test -f $with_add_source_root/langtools/make/Makefile; then
15748 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
15749 fi
15750 if test -f $with_add_source_root/corba/makefiles/Makefile || \
15751 test -f $with_add_source_root/corba/make/Makefile; then
15752 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
15753 fi
15754 if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
15755 test -f $with_add_source_root/jaxp/make/Makefile; then
15756 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
15757 fi
15758 if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
15759 test -f $with_add_source_root/jaxws/make/Makefile; then
15760 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
15761 fi
15762 if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
15763 test -f $with_add_source_root/hotspot/make/Makefile; then
15764 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
15765 fi
15766 if test -f $with_add_source_root/jdk/makefiles/Makefile || \
15767 test -f $with_add_source_root/jdk/make/Makefile; then
15768 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
15769 fi
15770 fi
15771
15772
15773 if test "x$with_override_source_root" != x; then
15774 if ! test -d $with_override_source_root; then
15775 as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
15776 fi
15777 CURDIR="$PWD"
15778 cd "$with_override_source_root"
15779 OVERRIDE_SRC_ROOT="`pwd`"
15780 cd "$CURDIR"
15781 if test -f $with_override_source_root/langtools/makefiles/Makefile || \
15782 test -f $with_override_source_root/langtools/make/Makefile; then
15783 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
15784 fi
15785 if test -f $with_override_source_root/corba/makefiles/Makefile || \
15786 test -f $with_override_source_root/corba/make/Makefile; then
15787 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
15788 fi
15789 if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
15790 test -f $with_override_source_root/jaxp/make/Makefile; then
15791 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
15792 fi
15793 if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
15794 test -f $with_override_source_root/jaxws/make/Makefile; then
15795 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
15796 fi
15797 if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
15798 test -f $with_override_source_root/hotspot/make/Makefile; then
15799 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
15800 fi
15801 if test -f $with_override_source_root/jdk/makefiles/Makefile || \
15802 test -f $with_override_source_root/jdk/make/Makefile; then
15803 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
15804 fi
15805 fi
15806
15807
15808 ###############################################################################
15809 #
15810 # Override a repo completely, this is used for example when you have 3 small
15811 # development sandboxes of the langtools sources and want to avoid having 3 full
15812 # OpenJDK sources checked out on disk.
15813 #
15814 # Assuming that the 3 langtools sandboxes are located here:
15815 # /home/fredrik/sandbox1/langtools
15816 # /home/fredrik/sandbox2/langtools
15817 # /home/fredrik/sandbox3/langtools
15818 #
15819 # From the source root you create build subdirs manually:
15820 # mkdir -p build1 build2 build3
15821 # in each build directory run:
15822 # (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
15823 # (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
15824 # (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
15825 #
15826
15827
15828 # Check whether --with-override-langtools was given.
15829 if test "${with_override_langtools+set}" = set; then :
15830 withval=$with_override_langtools;
15831 fi
15832
15833
15834
15835 # Check whether --with-override-corba was given.
15836 if test "${with_override_corba+set}" = set; then :
15837 withval=$with_override_corba;
15838 fi
15839
15840
15841
15842 # Check whether --with-override-jaxp was given.
15843 if test "${with_override_jaxp+set}" = set; then :
15844 withval=$with_override_jaxp;
15845 fi
15846
15847
15848
15849 # Check whether --with-override-jaxws was given.
15850 if test "${with_override_jaxws+set}" = set; then :
15851 withval=$with_override_jaxws;
15852 fi
15853
15854
15855
15856 # Check whether --with-override-hotspot was given.
15857 if test "${with_override_hotspot+set}" = set; then :
15858 withval=$with_override_hotspot;
15859 fi
15860
15861
15862
15863 # Check whether --with-override-jdk was given.
15864 if test "${with_override_jdk+set}" = set; then :
15865 withval=$with_override_jdk;
15866 fi
15867
15868
15869 if test "x$with_override_langtools" != x; then
15870 CURDIR="$PWD"
15871 cd "$with_override_langtools"
15872 LANGTOOLS_TOPDIR="`pwd`"
15873 cd "$CURDIR"
15874 if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
15875 as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
15876 fi
15877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
15878 $as_echo_n "checking if langtools should be overridden... " >&6; }
15879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
15880 $as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
15881 fi
15882 if test "x$with_override_corba" != x; then
15883 CURDIR="$PWD"
15884 cd "$with_override_corba"
15885 CORBA_TOPDIR="`pwd`"
15886 cd "$CURDIR"
15887 if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
15888 as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
15889 fi
15890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
15891 $as_echo_n "checking if corba should be overridden... " >&6; }
15892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
15893 $as_echo "yes with $CORBA_TOPDIR" >&6; }
15894 fi
15895 if test "x$with_override_jaxp" != x; then
15896 CURDIR="$PWD"
15897 cd "$with_override_jaxp"
15898 JAXP_TOPDIR="`pwd`"
15899 cd "$CURDIR"
15900 if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
15901 as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
15902 fi
15903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
15904 $as_echo_n "checking if jaxp should be overridden... " >&6; }
15905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
15906 $as_echo "yes with $JAXP_TOPDIR" >&6; }
15907 fi
15908 if test "x$with_override_jaxws" != x; then
15909 CURDIR="$PWD"
15910 cd "$with_override_jaxws"
15911 JAXWS_TOPDIR="`pwd`"
15912 cd "$CURDIR"
15913 if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
15914 as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
15915 fi
15916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
15917 $as_echo_n "checking if jaxws should be overridden... " >&6; }
15918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
15919 $as_echo "yes with $JAXWS_TOPDIR" >&6; }
15920 fi
15921 if test "x$with_override_hotspot" != x; then
15922 CURDIR="$PWD"
15923 cd "$with_override_hotspot"
15924 HOTSPOT_TOPDIR="`pwd`"
15925 cd "$CURDIR"
15926 if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
15927 ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
15928 as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
15929 fi
15930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
15931 $as_echo_n "checking if hotspot should be overridden... " >&6; }
15932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
15933 $as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
15934 fi
15935 if test "x$with_override_nashorn" != x; then
15936 CURDIR="$PWD"
15937 cd "$with_override_nashorn"
15938 NASHORN_TOPDIR="`pwd`"
15939 cd "$CURDIR"
15940 if ! test -f $NASHORN_TOPDIR/makefiles/BuildNashorn.gmk; then
15941 as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
15942 fi
15943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
15944 $as_echo_n "checking if nashorn should be overridden... " >&6; }
15945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
15946 $as_echo "yes with $NASHORN_TOPDIR" >&6; }
15947 fi
15948 if test "x$with_override_jdk" != x; then
15949 CURDIR="$PWD"
15950 cd "$with_override_jdk"
15951 JDK_TOPDIR="`pwd`"
15952 cd "$CURDIR"
15953 if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
15954 as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
15955 fi
15956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
15957 $as_echo_n "checking if JDK should be overridden... " >&6; }
15958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
15959 $as_echo "yes with $JDK_TOPDIR" >&6; }
15960 fi
15961
15962
15963
15964 BUILD_OUTPUT="$OUTPUT_ROOT"
15965
15966
15967 HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
15968 BUILD_HOTSPOT=true
15969
15970
15971
15972 # Check whether --with-import-hotspot was given.
15973 if test "${with_import_hotspot+set}" = set; then :
15974 withval=$with_import_hotspot;
15975 fi
15976
15977 if test "x$with_import_hotspot" != x; then
15978 CURDIR="$PWD"
15979 cd "$with_import_hotspot"
15980 HOTSPOT_DIST="`pwd`"
15981 cd "$CURDIR"
15982 if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
15983 as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
15984 fi
15985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
15986 $as_echo_n "checking if hotspot should be imported... " >&6; }
15987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
15988 $as_echo "yes from $HOTSPOT_DIST" >&6; }
15989 BUILD_HOTSPOT=false
15990 fi
15991
15992 JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
15993
15994
15995 ###############################################################################
15996 #
15997 # Setup the toolchain (compilers etc), i.e. the tools that need to be
15998 # cross-compilation aware.
15999 #
16000 ###############################################################################
16001
16002
16003 ###############################################################################
16004 #
16005 # Configure the development tool paths and potential sysroot.
16006 #
16007 ac_ext=cpp
16008 ac_cpp='$CXXCPP $CPPFLAGS'
16009 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16010 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16011 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16012
16013
16014 # The option used to specify the target .o,.a or .so file.
16015 # When compiling, how to specify the to be created object file.
16016 CC_OUT_OPTION='-o$(SPACE)'
16017 # When linking, how to specify the to be created executable.
16018 EXE_OUT_OPTION='-o$(SPACE)'
16019 # When linking, how to specify the to be created dynamically linkable library.
16020 LD_OUT_OPTION='-o$(SPACE)'
16021 # When archiving, how to specify the to be create static archive for object files.
16022 AR_OUT_OPTION='rcs$(SPACE)'
16023
16024
16025
16026
16027
16028 # Locate the actual tools
16029
16030 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16031
16032 # Store path to cygwin link.exe to help excluding it when searching for
16033 # VS linker. This must be done before changing the PATH when looking for VS.
16034 # Extract the first word of "link", so it can be a program name with args.
16035 set dummy link; ac_word=$2
16036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16037 $as_echo_n "checking for $ac_word... " >&6; }
16038 if ${ac_cv_path_CYGWIN_LINK+:} false; then :
16039 $as_echo_n "(cached) " >&6
16040 else
16041 case $CYGWIN_LINK in
16042 [\\/]* | ?:[\\/]*)
16043 ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16044 ;;
16045 *)
16046 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16047 for as_dir in $PATH
16048 do
16049 IFS=$as_save_IFS
16050 test -z "$as_dir" && as_dir=.
16051 for ac_exec_ext in '' $ac_executable_extensions; do
16052 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16053 ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16054 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16055 break 2
16056 fi
16057 done
16058 done
16059 IFS=$as_save_IFS
16060
16061 ;;
16062 esac
16063 fi
16064 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16065 if test -n "$CYGWIN_LINK"; then
16066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16067 $as_echo "$CYGWIN_LINK" >&6; }
16068 else
16069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16070 $as_echo "no" >&6; }
16071 fi
16072
16073
16074 if test "x$CYGWIN_LINK" != x; then
16075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16076 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16077 "$CYGWIN_LINK" --version > /dev/null
16078 if test $? -eq 0 ; then
16079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16080 $as_echo "yes" >&6; }
16081 else
16082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16083 $as_echo "no" >&6; }
16084 # This might be the VS linker. Don't exclude it later on.
16085 CYGWIN_LINK=""
16086 fi
16087 fi
16088
16089 # First-hand choice is to locate and run the vsvars bat file.
16090
16091 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16092 VCVARSFILE="vc/bin/vcvars32.bat"
16093 else
16094 VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16095 fi
16096
16097 VS_ENV_CMD=""
16098 VS_ENV_ARGS=""
16099 if test "x$with_toolsdir" != x; then
16100
16101 if test "x$VS_ENV_CMD" = x; then
16102 VS100BASE="$with_toolsdir/../.."
16103 METHOD="--with-tools-dir"
16104
16105 windows_path="$VS100BASE"
16106 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16107 unix_path=`$CYGPATH -u "$windows_path"`
16108 VS100BASE="$unix_path"
16109 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16110 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16111 VS100BASE="$unix_path"
16112 fi
16113
16114 if test -d "$VS100BASE"; then
16115 if test -f "$VS100BASE/$VCVARSFILE"; then
16116 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16117 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16118 VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16119 else
16120 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16121 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16122 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16123 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16124 fi
16125 fi
16126 fi
16127
16128 fi
16129
16130 if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16131 # Having specified an argument which is incorrect will produce an instant failure;
16132 # we should not go on looking
16133 { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16134 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16135 { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16136 $as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16137 as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16138 fi
16139
16140 if test "x$ProgramW6432" != x; then
16141
16142 if test "x$VS_ENV_CMD" = x; then
16143 WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16144 METHOD="well-known name"
16145
16146 windows_path="$WIN_SDK_BASE"
16147 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16148 unix_path=`$CYGPATH -u "$windows_path"`
16149 WIN_SDK_BASE="$unix_path"
16150 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16151 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16152 WIN_SDK_BASE="$unix_path"
16153 fi
16154
16155 if test -d "$WIN_SDK_BASE"; then
16156 # There have been cases of partial or broken SDK installations. A missing
16157 # lib dir is not going to work.
16158 if test ! -d "$WIN_SDK_BASE/../lib"; then
16159 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16160 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16161 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16162 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16163 elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16164 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16165 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16166 VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16167 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16168 VS_ENV_ARGS="/x86"
16169 else
16170 VS_ENV_ARGS="/x64"
16171 fi
16172 else
16173 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16174 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16175 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16176 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16177 fi
16178 fi
16179 fi
16180
16181 fi
16182 if test "x$PROGRAMW6432" != x; then
16183
16184 if test "x$VS_ENV_CMD" = x; then
16185 WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16186 METHOD="well-known name"
16187
16188 windows_path="$WIN_SDK_BASE"
16189 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16190 unix_path=`$CYGPATH -u "$windows_path"`
16191 WIN_SDK_BASE="$unix_path"
16192 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16193 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16194 WIN_SDK_BASE="$unix_path"
16195 fi
16196
16197 if test -d "$WIN_SDK_BASE"; then
16198 # There have been cases of partial or broken SDK installations. A missing
16199 # lib dir is not going to work.
16200 if test ! -d "$WIN_SDK_BASE/../lib"; then
16201 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16202 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16203 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16204 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16205 elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16206 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16207 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16208 VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16209 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16210 VS_ENV_ARGS="/x86"
16211 else
16212 VS_ENV_ARGS="/x64"
16213 fi
16214 else
16215 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16216 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16217 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16218 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16219 fi
16220 fi
16221 fi
16222
16223 fi
16224 if test "x$PROGRAMFILES" != x; then
16225
16226 if test "x$VS_ENV_CMD" = x; then
16227 WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16228 METHOD="well-known name"
16229
16230 windows_path="$WIN_SDK_BASE"
16231 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16232 unix_path=`$CYGPATH -u "$windows_path"`
16233 WIN_SDK_BASE="$unix_path"
16234 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16235 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16236 WIN_SDK_BASE="$unix_path"
16237 fi
16238
16239 if test -d "$WIN_SDK_BASE"; then
16240 # There have been cases of partial or broken SDK installations. A missing
16241 # lib dir is not going to work.
16242 if test ! -d "$WIN_SDK_BASE/../lib"; then
16243 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16244 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16245 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16246 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16247 elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16248 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16249 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16250 VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16251 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16252 VS_ENV_ARGS="/x86"
16253 else
16254 VS_ENV_ARGS="/x64"
16255 fi
16256 else
16257 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16258 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16259 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16260 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16261 fi
16262 fi
16263 fi
16264
16265 fi
16266
16267 if test "x$VS_ENV_CMD" = x; then
16268 WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16269 METHOD="well-known name"
16270
16271 windows_path="$WIN_SDK_BASE"
16272 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16273 unix_path=`$CYGPATH -u "$windows_path"`
16274 WIN_SDK_BASE="$unix_path"
16275 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16276 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16277 WIN_SDK_BASE="$unix_path"
16278 fi
16279
16280 if test -d "$WIN_SDK_BASE"; then
16281 # There have been cases of partial or broken SDK installations. A missing
16282 # lib dir is not going to work.
16283 if test ! -d "$WIN_SDK_BASE/../lib"; then
16284 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16285 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16286 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16287 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16288 elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16289 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16290 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16291 VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16292 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16293 VS_ENV_ARGS="/x86"
16294 else
16295 VS_ENV_ARGS="/x64"
16296 fi
16297 else
16298 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16299 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16300 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16301 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16302 fi
16303 fi
16304 fi
16305
16306
16307 if test "x$VS_ENV_CMD" = x; then
16308 WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
16309 METHOD="well-known name"
16310
16311 windows_path="$WIN_SDK_BASE"
16312 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16313 unix_path=`$CYGPATH -u "$windows_path"`
16314 WIN_SDK_BASE="$unix_path"
16315 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16316 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16317 WIN_SDK_BASE="$unix_path"
16318 fi
16319
16320 if test -d "$WIN_SDK_BASE"; then
16321 # There have been cases of partial or broken SDK installations. A missing
16322 # lib dir is not going to work.
16323 if test ! -d "$WIN_SDK_BASE/../lib"; then
16324 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16325 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16326 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16327 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16328 elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16329 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16330 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16331 VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16332 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16333 VS_ENV_ARGS="/x86"
16334 else
16335 VS_ENV_ARGS="/x64"
16336 fi
16337 else
16338 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16339 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16340 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16341 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16342 fi
16343 fi
16344 fi
16345
16346
16347 if test "x$VS100COMNTOOLS" != x; then
16348
16349 if test "x$VS_ENV_CMD" = x; then
16350 VS100BASE="$VS100COMNTOOLS/../.."
16351 METHOD="VS100COMNTOOLS variable"
16352
16353 windows_path="$VS100BASE"
16354 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16355 unix_path=`$CYGPATH -u "$windows_path"`
16356 VS100BASE="$unix_path"
16357 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16358 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16359 VS100BASE="$unix_path"
16360 fi
16361
16362 if test -d "$VS100BASE"; then
16363 if test -f "$VS100BASE/$VCVARSFILE"; then
16364 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16365 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16366 VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16367 else
16368 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16369 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16370 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16371 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16372 fi
16373 fi
16374 fi
16375
16376 fi
16377 if test "x$PROGRAMFILES" != x; then
16378
16379 if test "x$VS_ENV_CMD" = x; then
16380 VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16381 METHOD="well-known name"
16382
16383 windows_path="$VS100BASE"
16384 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16385 unix_path=`$CYGPATH -u "$windows_path"`
16386 VS100BASE="$unix_path"
16387 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16388 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16389 VS100BASE="$unix_path"
16390 fi
16391
16392 if test -d "$VS100BASE"; then
16393 if test -f "$VS100BASE/$VCVARSFILE"; then
16394 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16395 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16396 VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16397 else
16398 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16399 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16400 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16401 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16402 fi
16403 fi
16404 fi
16405
16406 fi
16407
16408 if test "x$VS_ENV_CMD" = x; then
16409 VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16410 METHOD="well-known name"
16411
16412 windows_path="$VS100BASE"
16413 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16414 unix_path=`$CYGPATH -u "$windows_path"`
16415 VS100BASE="$unix_path"
16416 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16417 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16418 VS100BASE="$unix_path"
16419 fi
16420
16421 if test -d "$VS100BASE"; then
16422 if test -f "$VS100BASE/$VCVARSFILE"; then
16423 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16424 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16425 VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16426 else
16427 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16428 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16429 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16430 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16431 fi
16432 fi
16433 fi
16434
16435
16436 if test "x$VS_ENV_CMD" = x; then
16437 VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16438 METHOD="well-known name"
16439
16440 windows_path="$VS100BASE"
16441 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16442 unix_path=`$CYGPATH -u "$windows_path"`
16443 VS100BASE="$unix_path"
16444 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16445 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16446 VS100BASE="$unix_path"
16447 fi
16448
16449 if test -d "$VS100BASE"; then
16450 if test -f "$VS100BASE/$VCVARSFILE"; then
16451 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16452 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16453 VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16454 else
16455 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16456 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16457 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16458 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16459 fi
16460 fi
16461 fi
16462
16463
16464 if test "x$VS_ENV_CMD" != x; then
16465 # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
16466
16467 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16468
16469 # First separate the path from the arguments. This will split at the first
16470 # space.
16471 complete="$VS_ENV_CMD"
16472 path="${complete%% *}"
16473 tmp="$complete EOL"
16474 arguments="${tmp#* }"
16475
16476 # Input might be given as Windows format, start by converting to
16477 # unix format.
16478 new_path=`$CYGPATH -u "$path"`
16479
16480 # Now try to locate executable using which
16481 new_path=`$WHICH "$new_path" 2> /dev/null`
16482 # bat and cmd files are not always considered executable in cygwin causing which
16483 # to not find them
16484 if test "x$new_path" = x \
16485 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16486 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16487 new_path=`$CYGPATH -u "$path"`
16488 fi
16489 if test "x$new_path" = x; then
16490 # Oops. Which didn't find the executable.
16491 # The splitting of arguments from the executable at a space might have been incorrect,
16492 # since paths with space are more likely in Windows. Give it another try with the whole
16493 # argument.
16494 path="$complete"
16495 arguments="EOL"
16496 new_path=`$CYGPATH -u "$path"`
16497 new_path=`$WHICH "$new_path" 2> /dev/null`
16498 # bat and cmd files are not always considered executable in cygwin causing which
16499 # to not find them
16500 if test "x$new_path" = x \
16501 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16502 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16503 new_path=`$CYGPATH -u "$path"`
16504 fi
16505 if test "x$new_path" = x; then
16506 # It's still not found. Now this is an unrecoverable error.
16507 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16508 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16509 has_space=`$ECHO "$complete" | $GREP " "`
16510 if test "x$has_space" != x; then
16511 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16512 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16513 fi
16514 as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16515 fi
16516 fi
16517
16518 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16519 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16520 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16521 # "foo.exe" is OK but "foo" is an error.
16522 #
16523 # This test is therefore slightly more accurate than "test -f" to check for file precense.
16524 # It is also a way to make sure we got the proper file name for the real test later on.
16525 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16526 if test "x$test_shortpath" = x; then
16527 # Short path failed, file does not exist as specified.
16528 # Try adding .exe or .cmd
16529 if test -f "${new_path}.exe"; then
16530 input_to_shortpath="${new_path}.exe"
16531 elif test -f "${new_path}.cmd"; then
16532 input_to_shortpath="${new_path}.cmd"
16533 else
16534 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
16535 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
16536 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16537 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16538 as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16539 fi
16540 else
16541 input_to_shortpath="$new_path"
16542 fi
16543
16544 # Call helper function which possibly converts this using DOS-style short mode.
16545 # If so, the updated path is stored in $new_path.
16546 new_path="$input_to_shortpath"
16547
16548 input_path="$input_to_shortpath"
16549 # Check if we need to convert this using DOS-style short mode. If the path
16550 # contains just simple characters, use it. Otherwise (spaces, weird characters),
16551 # take no chances and rewrite it.
16552 # Note: m4 eats our [], so we need to use [ and ] instead.
16553 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16554 if test "x$has_forbidden_chars" != x; then
16555 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16556 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16557 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16558 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16559 # Going to short mode and back again did indeed matter. Since short mode is
16560 # case insensitive, let's make it lowercase to improve readability.
16561 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16562 # Now convert it back to Unix-stile (cygpath)
16563 input_path=`$CYGPATH -u "$shortmode_path"`
16564 new_path="$input_path"
16565 fi
16566 fi
16567
16568 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16569 if test "x$test_cygdrive_prefix" = x; then
16570 # As a simple fix, exclude /usr/bin since it's not a real path.
16571 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16572 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16573 # a path prefixed by /cygdrive for fixpath to work.
16574 new_path="$CYGWIN_ROOT_PATH$input_path"
16575 fi
16576 fi
16577
16578 # remove trailing .exe if any
16579 new_path="${new_path/%.exe/}"
16580
16581 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16582
16583 # First separate the path from the arguments. This will split at the first
16584 # space.
16585 complete="$VS_ENV_CMD"
16586 path="${complete%% *}"
16587 tmp="$complete EOL"
16588 arguments="${tmp#* }"
16589
16590 # Input might be given as Windows format, start by converting to
16591 # unix format.
16592 new_path="$path"
16593
16594 windows_path="$new_path"
16595 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16596 unix_path=`$CYGPATH -u "$windows_path"`
16597 new_path="$unix_path"
16598 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16599 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16600 new_path="$unix_path"
16601 fi
16602
16603
16604 # Now try to locate executable using which
16605 new_path=`$WHICH "$new_path" 2> /dev/null`
16606
16607 if test "x$new_path" = x; then
16608 # Oops. Which didn't find the executable.
16609 # The splitting of arguments from the executable at a space might have been incorrect,
16610 # since paths with space are more likely in Windows. Give it another try with the whole
16611 # argument.
16612 path="$complete"
16613 arguments="EOL"
16614 new_path="$path"
16615
16616 windows_path="$new_path"
16617 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16618 unix_path=`$CYGPATH -u "$windows_path"`
16619 new_path="$unix_path"
16620 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16621 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16622 new_path="$unix_path"
16623 fi
16624
16625
16626 new_path=`$WHICH "$new_path" 2> /dev/null`
16627
16628 if test "x$new_path" = x; then
16629 # It's still not found. Now this is an unrecoverable error.
16630 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16631 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16632 has_space=`$ECHO "$complete" | $GREP " "`
16633 if test "x$has_space" != x; then
16634 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16635 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16636 fi
16637 as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16638 fi
16639 fi
16640
16641 # Now new_path has a complete unix path to the binary
16642 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16643 # Keep paths in /bin as-is, but remove trailing .exe if any
16644 new_path="${new_path/%.exe/}"
16645 # Do not save /bin paths to all_fixpath_prefixes!
16646 else
16647 # Not in mixed or Windows style, start by that.
16648 new_path=`cmd //c echo $new_path`
16649
16650 input_path="$new_path"
16651 # Check if we need to convert this using DOS-style short mode. If the path
16652 # contains just simple characters, use it. Otherwise (spaces, weird characters),
16653 # take no chances and rewrite it.
16654 # Note: m4 eats our [], so we need to use [ and ] instead.
16655 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16656 if test "x$has_forbidden_chars" != x; then
16657 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16658 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16659 fi
16660
16661 # Output is in $new_path
16662
16663 windows_path="$new_path"
16664 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16665 unix_path=`$CYGPATH -u "$windows_path"`
16666 new_path="$unix_path"
16667 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16668 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16669 new_path="$unix_path"
16670 fi
16671
16672 # remove trailing .exe if any
16673 new_path="${new_path/%.exe/}"
16674
16675 # Save the first 10 bytes of this path to the storage, so fixpath can work.
16676 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16677 fi
16678
16679 else
16680 # We're on a posix platform. Hooray! :)
16681 # First separate the path from the arguments. This will split at the first
16682 # space.
16683 complete="$VS_ENV_CMD"
16684 path="${complete%% *}"
16685 tmp="$complete EOL"
16686 arguments="${tmp#* }"
16687
16688 # Cannot rely on the command "which" here since it doesn't always work.
16689 is_absolute_path=`$ECHO "$path" | $GREP ^/`
16690 if test -z "$is_absolute_path"; then
16691 # Path to executable is not absolute. Find it.
16692 IFS_save="$IFS"
16693 IFS=:
16694 for p in $PATH; do
16695 if test -f "$p/$path" && test -x "$p/$path"; then
16696 new_path="$p/$path"
16697 break
16698 fi
16699 done
16700 IFS="$IFS_save"
16701 else
16702 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
16703 $as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
16704 new_path="$path"
16705 fi
16706
16707 if test "x$new_path" = x; then
16708 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16709 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16710 has_space=`$ECHO "$complete" | $GREP " "`
16711 if test "x$has_space" != x; then
16712 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16713 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16714 fi
16715 as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16716 fi
16717 fi
16718
16719 # Now join together the path and the arguments once again
16720 if test "x$arguments" != xEOL; then
16721 new_complete="$new_path ${arguments% *}"
16722 else
16723 new_complete="$new_path"
16724 fi
16725
16726 if test "x$complete" != "x$new_complete"; then
16727 VS_ENV_CMD="$new_complete"
16728 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
16729 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
16730 fi
16731
16732
16733 # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
16734 { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
16735 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
16736 cd $OUTPUT_ROOT
16737 # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
16738 # to autoconf standards.
16739
16740 #----
16741
16742 # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
16743 # but calculate the difference in Cygwin environment before/after running it and then
16744 # apply the diff.
16745
16746 if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
16747 _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
16748 _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
16749 _dosbash=`cygpath -a -w -s \`which bash\`.*`
16750 else
16751 _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
16752 _dosbash=`cmd //c echo \`which bash\``
16753 fi
16754
16755 # generate the set of exported vars before/after the vs10 setup
16756 $ECHO "@echo off" > localdevenvtmp.bat
16757 $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
16758 $ECHO "call $_dosvs10varsall $VS_ENV_ARGS" >> localdevenvtmp.bat
16759 $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
16760
16761 # Now execute the newly created bat file.
16762 # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
16763 cmd /c localdevenvtmp.bat | cat
16764
16765 # apply the diff (less some non-vs10 vars named by "!")
16766 $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
16767 $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
16768 $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
16769
16770 # cleanup
16771 $RM localdevenvtmp*
16772 #----
16773 cd $CURDIR
16774 if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
16775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16776 $as_echo "no" >&6; }
16777 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
16778 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
16779 { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16780 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16781 { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16782 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16783 as_fn_error $? "Cannot continue" "$LINENO" 5
16784 fi
16785
16786 # Now set all paths and other env variables. This will allow the rest of
16787 # the configure script to find and run the compiler in the proper way.
16788 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
16789 $as_echo "$as_me: Setting extracted environment variables" >&6;}
16790 . $OUTPUT_ROOT/localdevenv.sh
16791 else
16792 # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
16793 { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
16794 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
16795 fi
16796
16797 # At this point, we should have corrent variables in the environment, or we can't continue.
16798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
16799 $as_echo_n "checking for Visual Studio variables... " >&6; }
16800
16801 if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
16802 if test "x$INCLUDE" = x || test "x$LIB" = x; then
16803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
16804 $as_echo "present but broken" >&6; }
16805 as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
16806 else
16807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16808 $as_echo "ok" >&6; }
16809 # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
16810 VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
16811 VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
16812 VS_PATH="$PATH"
16813
16814
16815
16816 fi
16817 else
16818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16819 $as_echo "not found" >&6; }
16820
16821 if test "x$VS_ENV_CMD" = x; then
16822 { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
16823 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
16824 { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
16825 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
16826 else
16827 { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
16828 $as_echo "$as_me: Running the extraction script failed." >&6;}
16829 fi
16830 { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16831 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16832 { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16833 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16834 as_fn_error $? "Cannot continue" "$LINENO" 5
16835 fi
16836
16837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
16838 $as_echo_n "checking for msvcr100.dll... " >&6; }
16839
16840 # Check whether --with-msvcr-dll was given.
16841 if test "${with_msvcr_dll+set}" = set; then :
16842 withval=$with_msvcr_dll;
16843 fi
16844
16845 if test "x$with_msvcr_dll" != x; then
16846 MSVCR_DLL="$with_msvcr_dll"
16847 else
16848 if test "x$VCINSTALLDIR" != x; then
16849 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16850 MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
16851 else
16852 MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
16853 if test "x$MSVCR_DLL" = x; then
16854 MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
16855 fi
16856 fi
16857 if test "x$MSVCR_DLL" != x; then
16858 { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16859 $as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16860 else
16861 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16862 $as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16863 fi
16864 fi
16865 if test "x$MSVCR_DLL" = x; then
16866 if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
16867 { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
16868 $as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
16869 MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
16870 fi
16871 fi
16872 fi
16873 if test "x$MSVCR_DLL" = x; then
16874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16875 $as_echo "no" >&6; }
16876 as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
16877 fi
16878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
16879 $as_echo "$MSVCR_DLL" >&6; }
16880
16881 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16882
16883 # Input might be given as Windows format, start by converting to
16884 # unix format.
16885 path="$MSVCR_DLL"
16886 new_path=`$CYGPATH -u "$path"`
16887
16888 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16889 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16890 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16891 # "foo.exe" is OK but "foo" is an error.
16892 #
16893 # This test is therefore slightly more accurate than "test -f" to check for file precense.
16894 # It is also a way to make sure we got the proper file name for the real test later on.
16895 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16896 if test "x$test_shortpath" = x; then
16897 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16898 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16899 as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
16900 fi
16901
16902 # Call helper function which possibly converts this using DOS-style short mode.
16903 # If so, the updated path is stored in $new_path.
16904
16905 input_path="$new_path"
16906 # Check if we need to convert this using DOS-style short mode. If the path
16907 # contains just simple characters, use it. Otherwise (spaces, weird characters),
16908 # take no chances and rewrite it.
16909 # Note: m4 eats our [], so we need to use [ and ] instead.
16910 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16911 if test "x$has_forbidden_chars" != x; then
16912 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16913 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16914 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16915 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16916 # Going to short mode and back again did indeed matter. Since short mode is
16917 # case insensitive, let's make it lowercase to improve readability.
16918 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16919 # Now convert it back to Unix-stile (cygpath)
16920 input_path=`$CYGPATH -u "$shortmode_path"`
16921 new_path="$input_path"
16922 fi
16923 fi
16924
16925 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16926 if test "x$test_cygdrive_prefix" = x; then
16927 # As a simple fix, exclude /usr/bin since it's not a real path.
16928 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16929 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16930 # a path prefixed by /cygdrive for fixpath to work.
16931 new_path="$CYGWIN_ROOT_PATH$input_path"
16932 fi
16933 fi
16934
16935
16936 if test "x$path" != "x$new_path"; then
16937 MSVCR_DLL="$new_path"
16938 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16939 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16940 fi
16941
16942 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16943
16944 path="$MSVCR_DLL"
16945 has_colon=`$ECHO $path | $GREP ^.:`
16946 new_path="$path"
16947 if test "x$has_colon" = x; then
16948 # Not in mixed or Windows style, start by that.
16949 new_path=`cmd //c echo $path`
16950 fi
16951
16952
16953 input_path="$new_path"
16954 # Check if we need to convert this using DOS-style short mode. If the path
16955 # contains just simple characters, use it. Otherwise (spaces, weird characters),
16956 # take no chances and rewrite it.
16957 # Note: m4 eats our [], so we need to use [ and ] instead.
16958 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16959 if test "x$has_forbidden_chars" != x; then
16960 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16961 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16962 fi
16963
16964
16965 windows_path="$new_path"
16966 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16967 unix_path=`$CYGPATH -u "$windows_path"`
16968 new_path="$unix_path"
16969 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16970 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16971 new_path="$unix_path"
16972 fi
16973
16974 if test "x$path" != "x$new_path"; then
16975 MSVCR_DLL="$new_path"
16976 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16977 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16978 fi
16979
16980 # Save the first 10 bytes of this path to the storage, so fixpath can work.
16981 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16982
16983 else
16984 # We're on a posix platform. Hooray! :)
16985 path="$MSVCR_DLL"
16986
16987 if test ! -f "$path" && test ! -d "$path"; then
16988 as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
16989 fi
16990
16991 has_space=`$ECHO "$path" | $GREP " "`
16992 if test "x$has_space" != x; then
16993 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16994 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16995 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16996 fi
16997 fi
16998
16999
17000
17001
17002 # Check whether --with-dxsdk was given.
17003 if test "${with_dxsdk+set}" = set; then :
17004 withval=$with_dxsdk;
17005 fi
17006
17007
17008 # Check whether --with-dxsdk-lib was given.
17009 if test "${with_dxsdk_lib+set}" = set; then :
17010 withval=$with_dxsdk_lib;
17011 fi
17012
17013
17014 # Check whether --with-dxsdk-include was given.
17015 if test "${with_dxsdk_include+set}" = set; then :
17016 withval=$with_dxsdk_include;
17017 fi
17018
17019
17020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK" >&5
17021 $as_echo_n "checking for DirectX SDK... " >&6; }
17022
17023 if test "x$with_dxsdk" != x; then
17024 dxsdk_path="$with_dxsdk"
17025 elif test "x$DXSDK_DIR" != x; then
17026 dxsdk_path="$DXSDK_DIR"
17027 elif test -d "C:/DXSDK"; then
17028 dxsdk_path="C:/DXSDK"
17029 else
17030 as_fn_error $? "Could not find the DirectX SDK" "$LINENO" 5
17031 fi
17032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dxsdk_path" >&5
17033 $as_echo "$dxsdk_path" >&6; }
17034
17035 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17036
17037 # Input might be given as Windows format, start by converting to
17038 # unix format.
17039 path="$dxsdk_path"
17040 new_path=`$CYGPATH -u "$path"`
17041
17042 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17043 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17044 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17045 # "foo.exe" is OK but "foo" is an error.
17046 #
17047 # This test is therefore slightly more accurate than "test -f" to check for file precense.
17048 # It is also a way to make sure we got the proper file name for the real test later on.
17049 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17050 if test "x$test_shortpath" = x; then
17051 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17052 $as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17053 as_fn_error $? "Cannot locate the the path of dxsdk_path" "$LINENO" 5
17054 fi
17055
17056 # Call helper function which possibly converts this using DOS-style short mode.
17057 # If so, the updated path is stored in $new_path.
17058
17059 input_path="$new_path"
17060 # Check if we need to convert this using DOS-style short mode. If the path
17061 # contains just simple characters, use it. Otherwise (spaces, weird characters),
17062 # take no chances and rewrite it.
17063 # Note: m4 eats our [], so we need to use [ and ] instead.
17064 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17065 if test "x$has_forbidden_chars" != x; then
17066 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17067 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17068 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17069 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17070 # Going to short mode and back again did indeed matter. Since short mode is
17071 # case insensitive, let's make it lowercase to improve readability.
17072 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17073 # Now convert it back to Unix-stile (cygpath)
17074 input_path=`$CYGPATH -u "$shortmode_path"`
17075 new_path="$input_path"
17076 fi
17077 fi
17078
17079 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17080 if test "x$test_cygdrive_prefix" = x; then
17081 # As a simple fix, exclude /usr/bin since it's not a real path.
17082 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17083 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17084 # a path prefixed by /cygdrive for fixpath to work.
17085 new_path="$CYGWIN_ROOT_PATH$input_path"
17086 fi
17087 fi
17088
17089
17090 if test "x$path" != "x$new_path"; then
17091 dxsdk_path="$new_path"
17092 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17093 $as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17094 fi
17095
17096 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17097
17098 path="$dxsdk_path"
17099 has_colon=`$ECHO $path | $GREP ^.:`
17100 new_path="$path"
17101 if test "x$has_colon" = x; then
17102 # Not in mixed or Windows style, start by that.
17103 new_path=`cmd //c echo $path`
17104 fi
17105
17106
17107 input_path="$new_path"
17108 # Check if we need to convert this using DOS-style short mode. If the path
17109 # contains just simple characters, use it. Otherwise (spaces, weird characters),
17110 # take no chances and rewrite it.
17111 # Note: m4 eats our [], so we need to use [ and ] instead.
17112 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17113 if test "x$has_forbidden_chars" != x; then
17114 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17115 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17116 fi
17117
17118
17119 windows_path="$new_path"
17120 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17121 unix_path=`$CYGPATH -u "$windows_path"`
17122 new_path="$unix_path"
17123 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17124 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17125 new_path="$unix_path"
17126 fi
17127
17128 if test "x$path" != "x$new_path"; then
17129 dxsdk_path="$new_path"
17130 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17131 $as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17132 fi
17133
17134 # Save the first 10 bytes of this path to the storage, so fixpath can work.
17135 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17136
17137 else
17138 # We're on a posix platform. Hooray! :)
17139 path="$dxsdk_path"
17140
17141 if test ! -f "$path" && test ! -d "$path"; then
17142 as_fn_error $? "The path of dxsdk_path, which resolves as \"$path\", is not found." "$LINENO" 5
17143 fi
17144
17145 has_space=`$ECHO "$path" | $GREP " "`
17146 if test "x$has_space" != x; then
17147 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17148 $as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17149 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17150 fi
17151 fi
17152
17153
17154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK lib dir" >&5
17155 $as_echo_n "checking for DirectX SDK lib dir... " >&6; }
17156 if test "x$with_dxsdk_lib" != x; then
17157 DXSDK_LIB_PATH="$with_dxsdk_lib"
17158 elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
17159 DXSDK_LIB_PATH="$dxsdk_path/Lib/x64"
17160 else
17161 DXSDK_LIB_PATH="$dxsdk_path/Lib"
17162 fi
17163 # dsound.lib is linked to in jsoundds
17164 if test ! -f "$DXSDK_LIB_PATH/dsound.lib"; then
17165 as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17166 fi
17167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_LIB_PATH" >&5
17168 $as_echo "$DXSDK_LIB_PATH" >&6; }
17169
17170 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17171
17172 # Input might be given as Windows format, start by converting to
17173 # unix format.
17174 path="$DXSDK_LIB_PATH"
17175 new_path=`$CYGPATH -u "$path"`
17176
17177 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17178 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17179 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17180 # "foo.exe" is OK but "foo" is an error.
17181 #
17182 # This test is therefore slightly more accurate than "test -f" to check for file precense.
17183 # It is also a way to make sure we got the proper file name for the real test later on.
17184 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17185 if test "x$test_shortpath" = x; then
17186 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17187 $as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17188 as_fn_error $? "Cannot locate the the path of DXSDK_LIB_PATH" "$LINENO" 5
17189 fi
17190
17191 # Call helper function which possibly converts this using DOS-style short mode.
17192 # If so, the updated path is stored in $new_path.
17193
17194 input_path="$new_path"
17195 # Check if we need to convert this using DOS-style short mode. If the path
17196 # contains just simple characters, use it. Otherwise (spaces, weird characters),
17197 # take no chances and rewrite it.
17198 # Note: m4 eats our [], so we need to use [ and ] instead.
17199 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17200 if test "x$has_forbidden_chars" != x; then
17201 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17202 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17203 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17204 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17205 # Going to short mode and back again did indeed matter. Since short mode is
17206 # case insensitive, let's make it lowercase to improve readability.
17207 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17208 # Now convert it back to Unix-stile (cygpath)
17209 input_path=`$CYGPATH -u "$shortmode_path"`
17210 new_path="$input_path"
17211 fi
17212 fi
17213
17214 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17215 if test "x$test_cygdrive_prefix" = x; then
17216 # As a simple fix, exclude /usr/bin since it's not a real path.
17217 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17218 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17219 # a path prefixed by /cygdrive for fixpath to work.
17220 new_path="$CYGWIN_ROOT_PATH$input_path"
17221 fi
17222 fi
17223
17224
17225 if test "x$path" != "x$new_path"; then
17226 DXSDK_LIB_PATH="$new_path"
17227 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17228 $as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17229 fi
17230
17231 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17232
17233 path="$DXSDK_LIB_PATH"
17234 has_colon=`$ECHO $path | $GREP ^.:`
17235 new_path="$path"
17236 if test "x$has_colon" = x; then
17237 # Not in mixed or Windows style, start by that.
17238 new_path=`cmd //c echo $path`
17239 fi
17240
17241
17242 input_path="$new_path"
17243 # Check if we need to convert this using DOS-style short mode. If the path
17244 # contains just simple characters, use it. Otherwise (spaces, weird characters),
17245 # take no chances and rewrite it.
17246 # Note: m4 eats our [], so we need to use [ and ] instead.
17247 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17248 if test "x$has_forbidden_chars" != x; then
17249 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17250 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17251 fi
17252
17253
17254 windows_path="$new_path"
17255 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17256 unix_path=`$CYGPATH -u "$windows_path"`
17257 new_path="$unix_path"
17258 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17259 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17260 new_path="$unix_path"
17261 fi
17262
17263 if test "x$path" != "x$new_path"; then
17264 DXSDK_LIB_PATH="$new_path"
17265 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17266 $as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17267 fi
17268
17269 # Save the first 10 bytes of this path to the storage, so fixpath can work.
17270 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17271
17272 else
17273 # We're on a posix platform. Hooray! :)
17274 path="$DXSDK_LIB_PATH"
17275
17276 if test ! -f "$path" && test ! -d "$path"; then
17277 as_fn_error $? "The path of DXSDK_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17278 fi
17279
17280 has_space=`$ECHO "$path" | $GREP " "`
17281 if test "x$has_space" != x; then
17282 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17283 $as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17284 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17285 fi
17286 fi
17287
17288
17289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK include dir" >&5
17290 $as_echo_n "checking for DirectX SDK include dir... " >&6; }
17291 if test "x$with_dxsdk_include" != x; then
17292 DXSDK_INCLUDE_PATH="$with_dxsdk_include"
17293 else
17294 DXSDK_INCLUDE_PATH="$dxsdk_path/Include"
17295 fi
17296 # dsound.h is included in jsoundds
17297 if test ! -f "$DXSDK_INCLUDE_PATH/dsound.h"; then
17298 as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17299 fi
17300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_INCLUDE_PATH" >&5
17301 $as_echo "$DXSDK_INCLUDE_PATH" >&6; }
17302
17303 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17304
17305 # Input might be given as Windows format, start by converting to
17306 # unix format.
17307 path="$DXSDK_INCLUDE_PATH"
17308 new_path=`$CYGPATH -u "$path"`
17309
17310 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17311 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17312 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17313 # "foo.exe" is OK but "foo" is an error.
17314 #
17315 # This test is therefore slightly more accurate than "test -f" to check for file precense.
17316 # It is also a way to make sure we got the proper file name for the real test later on.
17317 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17318 if test "x$test_shortpath" = x; then
17319 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17320 $as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17321 as_fn_error $? "Cannot locate the the path of DXSDK_INCLUDE_PATH" "$LINENO" 5
17322 fi
17323
17324 # Call helper function which possibly converts this using DOS-style short mode.
17325 # If so, the updated path is stored in $new_path.
17326
17327 input_path="$new_path"
17328 # Check if we need to convert this using DOS-style short mode. If the path
17329 # contains just simple characters, use it. Otherwise (spaces, weird characters),
17330 # take no chances and rewrite it.
17331 # Note: m4 eats our [], so we need to use [ and ] instead.
17332 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17333 if test "x$has_forbidden_chars" != x; then
17334 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17335 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17336 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17337 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17338 # Going to short mode and back again did indeed matter. Since short mode is
17339 # case insensitive, let's make it lowercase to improve readability.
17340 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17341 # Now convert it back to Unix-stile (cygpath)
17342 input_path=`$CYGPATH -u "$shortmode_path"`
17343 new_path="$input_path"
17344 fi
17345 fi
17346
17347 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17348 if test "x$test_cygdrive_prefix" = x; then
17349 # As a simple fix, exclude /usr/bin since it's not a real path.
17350 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17351 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17352 # a path prefixed by /cygdrive for fixpath to work.
17353 new_path="$CYGWIN_ROOT_PATH$input_path"
17354 fi
17355 fi
17356
17357
17358 if test "x$path" != "x$new_path"; then
17359 DXSDK_INCLUDE_PATH="$new_path"
17360 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17361 $as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17362 fi
17363
17364 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17365
17366 path="$DXSDK_INCLUDE_PATH"
17367 has_colon=`$ECHO $path | $GREP ^.:`
17368 new_path="$path"
17369 if test "x$has_colon" = x; then
17370 # Not in mixed or Windows style, start by that.
17371 new_path=`cmd //c echo $path`
17372 fi
17373
17374
17375 input_path="$new_path"
17376 # Check if we need to convert this using DOS-style short mode. If the path
17377 # contains just simple characters, use it. Otherwise (spaces, weird characters),
17378 # take no chances and rewrite it.
17379 # Note: m4 eats our [], so we need to use [ and ] instead.
17380 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17381 if test "x$has_forbidden_chars" != x; then
17382 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17383 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17384 fi
17385
17386
17387 windows_path="$new_path"
17388 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17389 unix_path=`$CYGPATH -u "$windows_path"`
17390 new_path="$unix_path"
17391 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17392 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17393 new_path="$unix_path"
17394 fi
17395
17396 if test "x$path" != "x$new_path"; then
17397 DXSDK_INCLUDE_PATH="$new_path"
17398 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17399 $as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17400 fi
17401
17402 # Save the first 10 bytes of this path to the storage, so fixpath can work.
17403 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17404
17405 else
17406 # We're on a posix platform. Hooray! :)
17407 path="$DXSDK_INCLUDE_PATH"
17408
17409 if test ! -f "$path" && test ! -d "$path"; then
17410 as_fn_error $? "The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17411 fi
17412
17413 has_space=`$ECHO "$path" | $GREP " "`
17414 if test "x$has_space" != x; then
17415 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17416 $as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17417 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17418 fi
17419 fi
17420
17421
17422
17423
17424 LDFLAGS_JDK="$LDFLAGS_JDK -libpath:$DXSDK_LIB_PATH"
17425
17426 fi
17427
17428
17429
17430 # If --build AND --host is set, then the configure script will find any
17431 # cross compilation tools in the PATH. Cross compilation tools
17432 # follows the cross compilation standard where they are prefixed with ${host}.
17433 # For example the binary i686-sun-solaris2.10-gcc
17434 # will cross compile for i686-sun-solaris2.10
17435 # If neither of build and host is not set, then build=host and the
17436 # default compiler found in the path will be used.
17437 # Setting only --host, does not seem to be really supported.
17438 # Please set both --build and --host if you want to cross compile.
17439
17440 if test "x$COMPILE_TYPE" = "xcross"; then
17441 # Now we to find a C/C++ compiler that can build executables for the build
17442 # platform. We can't use the AC_PROG_CC macro, since it can only be used
17443 # once. Also, we need to do this before adding a tools dir to the path,
17444 # otherwise we might pick up cross-compilers which don't use standard naming.
17445 # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
17446 # to wait until they are properly discovered.
17447 for ac_prog in cl cc gcc
17448 do
17449 # Extract the first word of "$ac_prog", so it can be a program name with args.
17450 set dummy $ac_prog; ac_word=$2
17451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17452 $as_echo_n "checking for $ac_word... " >&6; }
17453 if ${ac_cv_path_BUILD_CC+:} false; then :
17454 $as_echo_n "(cached) " >&6
17455 else
17456 case $BUILD_CC in
17457 [\\/]* | ?:[\\/]*)
17458 ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
17459 ;;
17460 *)
17461 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17462 for as_dir in $PATH
17463 do
17464 IFS=$as_save_IFS
17465 test -z "$as_dir" && as_dir=.
17466 for ac_exec_ext in '' $ac_executable_extensions; do
17467 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17468 ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
17469 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17470 break 2
17471 fi
17472 done
17473 done
17474 IFS=$as_save_IFS
17475
17476 ;;
17477 esac
17478 fi
17479 BUILD_CC=$ac_cv_path_BUILD_CC
17480 if test -n "$BUILD_CC"; then
17481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
17482 $as_echo "$BUILD_CC" >&6; }
17483 else
17484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17485 $as_echo "no" >&6; }
17486 fi
17487
17488
17489 test -n "$BUILD_CC" && break
17490 done
17491
17492
17493 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17494
17495 # First separate the path from the arguments. This will split at the first
17496 # space.
17497 complete="$BUILD_CC"
17498 path="${complete%% *}"
17499 tmp="$complete EOL"
17500 arguments="${tmp#* }"
17501
17502 # Input might be given as Windows format, start by converting to
17503 # unix format.
17504 new_path=`$CYGPATH -u "$path"`
17505
17506 # Now try to locate executable using which
17507 new_path=`$WHICH "$new_path" 2> /dev/null`
17508 # bat and cmd files are not always considered executable in cygwin causing which
17509 # to not find them
17510 if test "x$new_path" = x \
17511 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17512 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17513 new_path=`$CYGPATH -u "$path"`
17514 fi
17515 if test "x$new_path" = x; then
17516 # Oops. Which didn't find the executable.
17517 # The splitting of arguments from the executable at a space might have been incorrect,
17518 # since paths with space are more likely in Windows. Give it another try with the whole
17519 # argument.
17520 path="$complete"
17521 arguments="EOL"
17522 new_path=`$CYGPATH -u "$path"`
17523 new_path=`$WHICH "$new_path" 2> /dev/null`
17524 # bat and cmd files are not always considered executable in cygwin causing which
17525 # to not find them
17526 if test "x$new_path" = x \
17527 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17528 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17529 new_path=`$CYGPATH -u "$path"`
17530 fi
17531 if test "x$new_path" = x; then
17532 # It's still not found. Now this is an unrecoverable error.
17533 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17534 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17535 has_space=`$ECHO "$complete" | $GREP " "`
17536 if test "x$has_space" != x; then
17537 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17538 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17539 fi
17540 as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17541 fi
17542 fi
17543
17544 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17545 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17546 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17547 # "foo.exe" is OK but "foo" is an error.
17548 #
17549 # This test is therefore slightly more accurate than "test -f" to check for file precense.
17550 # It is also a way to make sure we got the proper file name for the real test later on.
17551 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17552 if test "x$test_shortpath" = x; then
17553 # Short path failed, file does not exist as specified.
17554 # Try adding .exe or .cmd
17555 if test -f "${new_path}.exe"; then
17556 input_to_shortpath="${new_path}.exe"
17557 elif test -f "${new_path}.cmd"; then
17558 input_to_shortpath="${new_path}.cmd"
17559 else
17560 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
17561 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
17562 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17563 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17564 as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17565 fi
17566 else
17567 input_to_shortpath="$new_path"
17568 fi
17569
17570 # Call helper function which possibly converts this using DOS-style short mode.
17571 # If so, the updated path is stored in $new_path.
17572 new_path="$input_to_shortpath"
17573
17574 input_path="$input_to_shortpath"
17575 # Check if we need to convert this using DOS-style short mode. If the path
17576 # contains just simple characters, use it. Otherwise (spaces, weird characters),
17577 # take no chances and rewrite it.
17578 # Note: m4 eats our [], so we need to use [ and ] instead.
17579 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17580 if test "x$has_forbidden_chars" != x; then
17581 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17582 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17583 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17584 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17585 # Going to short mode and back again did indeed matter. Since short mode is
17586 # case insensitive, let's make it lowercase to improve readability.
17587 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17588 # Now convert it back to Unix-stile (cygpath)
17589 input_path=`$CYGPATH -u "$shortmode_path"`
17590 new_path="$input_path"
17591 fi
17592 fi
17593
17594 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17595 if test "x$test_cygdrive_prefix" = x; then
17596 # As a simple fix, exclude /usr/bin since it's not a real path.
17597 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17598 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17599 # a path prefixed by /cygdrive for fixpath to work.
17600 new_path="$CYGWIN_ROOT_PATH$input_path"
17601 fi
17602 fi
17603
17604 # remove trailing .exe if any
17605 new_path="${new_path/%.exe/}"
17606
17607 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17608
17609 # First separate the path from the arguments. This will split at the first
17610 # space.
17611 complete="$BUILD_CC"
17612 path="${complete%% *}"
17613 tmp="$complete EOL"
17614 arguments="${tmp#* }"
17615
17616 # Input might be given as Windows format, start by converting to
17617 # unix format.
17618 new_path="$path"
17619
17620 windows_path="$new_path"
17621 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17622 unix_path=`$CYGPATH -u "$windows_path"`
17623 new_path="$unix_path"
17624 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17625 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17626 new_path="$unix_path"
17627 fi
17628
17629
17630 # Now try to locate executable using which
17631 new_path=`$WHICH "$new_path" 2> /dev/null`
17632
17633 if test "x$new_path" = x; then
17634 # Oops. Which didn't find the executable.
17635 # The splitting of arguments from the executable at a space might have been incorrect,
17636 # since paths with space are more likely in Windows. Give it another try with the whole
17637 # argument.
17638 path="$complete"
17639 arguments="EOL"
17640 new_path="$path"
17641
17642 windows_path="$new_path"
17643 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17644 unix_path=`$CYGPATH -u "$windows_path"`
17645 new_path="$unix_path"
17646 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17647 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17648 new_path="$unix_path"
17649 fi
17650
17651
17652 new_path=`$WHICH "$new_path" 2> /dev/null`
17653
17654 if test "x$new_path" = x; then
17655 # It's still not found. Now this is an unrecoverable error.
17656 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17657 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17658 has_space=`$ECHO "$complete" | $GREP " "`
17659 if test "x$has_space" != x; then
17660 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17661 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17662 fi
17663 as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17664 fi
17665 fi
17666
17667 # Now new_path has a complete unix path to the binary
17668 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17669 # Keep paths in /bin as-is, but remove trailing .exe if any
17670 new_path="${new_path/%.exe/}"
17671 # Do not save /bin paths to all_fixpath_prefixes!
17672 else
17673 # Not in mixed or Windows style, start by that.
17674 new_path=`cmd //c echo $new_path`
17675
17676 input_path="$new_path"
17677 # Check if we need to convert this using DOS-style short mode. If the path
17678 # contains just simple characters, use it. Otherwise (spaces, weird characters),
17679 # take no chances and rewrite it.
17680 # Note: m4 eats our [], so we need to use [ and ] instead.
17681 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17682 if test "x$has_forbidden_chars" != x; then
17683 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17684 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17685 fi
17686
17687 # Output is in $new_path
17688
17689 windows_path="$new_path"
17690 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17691 unix_path=`$CYGPATH -u "$windows_path"`
17692 new_path="$unix_path"
17693 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17694 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17695 new_path="$unix_path"
17696 fi
17697
17698 # remove trailing .exe if any
17699 new_path="${new_path/%.exe/}"
17700
17701 # Save the first 10 bytes of this path to the storage, so fixpath can work.
17702 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17703 fi
17704
17705 else
17706 # We're on a posix platform. Hooray! :)
17707 # First separate the path from the arguments. This will split at the first
17708 # space.
17709 complete="$BUILD_CC"
17710 path="${complete%% *}"
17711 tmp="$complete EOL"
17712 arguments="${tmp#* }"
17713
17714 # Cannot rely on the command "which" here since it doesn't always work.
17715 is_absolute_path=`$ECHO "$path" | $GREP ^/`
17716 if test -z "$is_absolute_path"; then
17717 # Path to executable is not absolute. Find it.
17718 IFS_save="$IFS"
17719 IFS=:
17720 for p in $PATH; do
17721 if test -f "$p/$path" && test -x "$p/$path"; then
17722 new_path="$p/$path"
17723 break
17724 fi
17725 done
17726 IFS="$IFS_save"
17727 else
17728 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
17729 $as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
17730 new_path="$path"
17731 fi
17732
17733 if test "x$new_path" = x; then
17734 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17735 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17736 has_space=`$ECHO "$complete" | $GREP " "`
17737 if test "x$has_space" != x; then
17738 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17739 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17740 fi
17741 as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17742 fi
17743 fi
17744
17745 # Now join together the path and the arguments once again
17746 if test "x$arguments" != xEOL; then
17747 new_complete="$new_path ${arguments% *}"
17748 else
17749 new_complete="$new_path"
17750 fi
17751
17752 if test "x$complete" != "x$new_complete"; then
17753 BUILD_CC="$new_complete"
17754 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
17755 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
17756 fi
17757
17758 for ac_prog in cl CC g++
17759 do
17760 # Extract the first word of "$ac_prog", so it can be a program name with args.
17761 set dummy $ac_prog; ac_word=$2
17762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17763 $as_echo_n "checking for $ac_word... " >&6; }
17764 if ${ac_cv_path_BUILD_CXX+:} false; then :
17765 $as_echo_n "(cached) " >&6
17766 else
17767 case $BUILD_CXX in
17768 [\\/]* | ?:[\\/]*)
17769 ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
17770 ;;
17771 *)
17772 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17773 for as_dir in $PATH
17774 do
17775 IFS=$as_save_IFS
17776 test -z "$as_dir" && as_dir=.
17777 for ac_exec_ext in '' $ac_executable_extensions; do
17778 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17779 ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
17780 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17781 break 2
17782 fi
17783 done
17784 done
17785 IFS=$as_save_IFS
17786
17787 ;;
17788 esac
17789 fi
17790 BUILD_CXX=$ac_cv_path_BUILD_CXX
17791 if test -n "$BUILD_CXX"; then
17792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
17793 $as_echo "$BUILD_CXX" >&6; }
17794 else
17795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17796 $as_echo "no" >&6; }
17797 fi
17798
17799
17800 test -n "$BUILD_CXX" && break
17801 done
17802
17803
17804 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17805
17806 # First separate the path from the arguments. This will split at the first
17807 # space.
17808 complete="$BUILD_CXX"
17809 path="${complete%% *}"
17810 tmp="$complete EOL"
17811 arguments="${tmp#* }"
17812
17813 # Input might be given as Windows format, start by converting to
17814 # unix format.
17815 new_path=`$CYGPATH -u "$path"`
17816
17817 # Now try to locate executable using which
17818 new_path=`$WHICH "$new_path" 2> /dev/null`
17819 # bat and cmd files are not always considered executable in cygwin causing which
17820 # to not find them
17821 if test "x$new_path" = x \
17822 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17823 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17824 new_path=`$CYGPATH -u "$path"`
17825 fi
17826 if test "x$new_path" = x; then
17827 # Oops. Which didn't find the executable.
17828 # The splitting of arguments from the executable at a space might have been incorrect,
17829 # since paths with space are more likely in Windows. Give it another try with the whole
17830 # argument.
17831 path="$complete"
17832 arguments="EOL"
17833 new_path=`$CYGPATH -u "$path"`
17834 new_path=`$WHICH "$new_path" 2> /dev/null`
17835 # bat and cmd files are not always considered executable in cygwin causing which
17836 # to not find them
17837 if test "x$new_path" = x \
17838 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17839 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17840 new_path=`$CYGPATH -u "$path"`
17841 fi
17842 if test "x$new_path" = x; then
17843 # It's still not found. Now this is an unrecoverable error.
17844 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17845 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17846 has_space=`$ECHO "$complete" | $GREP " "`
17847 if test "x$has_space" != x; then
17848 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17849 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17850 fi
17851 as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17852 fi
17853 fi
17854
17855 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17856 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17857 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17858 # "foo.exe" is OK but "foo" is an error.
17859 #
17860 # This test is therefore slightly more accurate than "test -f" to check for file precense.
17861 # It is also a way to make sure we got the proper file name for the real test later on.
17862 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17863 if test "x$test_shortpath" = x; then
17864 # Short path failed, file does not exist as specified.
17865 # Try adding .exe or .cmd
17866 if test -f "${new_path}.exe"; then
17867 input_to_shortpath="${new_path}.exe"
17868 elif test -f "${new_path}.cmd"; then
17869 input_to_shortpath="${new_path}.cmd"
17870 else
17871 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
17872 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
17873 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17874 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17875 as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17876 fi
17877 else
17878 input_to_shortpath="$new_path"
17879 fi
17880
17881 # Call helper function which possibly converts this using DOS-style short mode.
17882 # If so, the updated path is stored in $new_path.
17883 new_path="$input_to_shortpath"
17884
17885 input_path="$input_to_shortpath"
17886 # Check if we need to convert this using DOS-style short mode. If the path
17887 # contains just simple characters, use it. Otherwise (spaces, weird characters),
17888 # take no chances and rewrite it.
17889 # Note: m4 eats our [], so we need to use [ and ] instead.
17890 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17891 if test "x$has_forbidden_chars" != x; then
17892 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17893 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17894 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17895 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17896 # Going to short mode and back again did indeed matter. Since short mode is
17897 # case insensitive, let's make it lowercase to improve readability.
17898 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17899 # Now convert it back to Unix-stile (cygpath)
17900 input_path=`$CYGPATH -u "$shortmode_path"`
17901 new_path="$input_path"
17902 fi
17903 fi
17904
17905 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17906 if test "x$test_cygdrive_prefix" = x; then
17907 # As a simple fix, exclude /usr/bin since it's not a real path.
17908 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17909 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17910 # a path prefixed by /cygdrive for fixpath to work.
17911 new_path="$CYGWIN_ROOT_PATH$input_path"
17912 fi
17913 fi
17914
17915 # remove trailing .exe if any
17916 new_path="${new_path/%.exe/}"
17917
17918 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17919
17920 # First separate the path from the arguments. This will split at the first
17921 # space.
17922 complete="$BUILD_CXX"
17923 path="${complete%% *}"
17924 tmp="$complete EOL"
17925 arguments="${tmp#* }"
17926
17927 # Input might be given as Windows format, start by converting to
17928 # unix format.
17929 new_path="$path"
17930
17931 windows_path="$new_path"
17932 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17933 unix_path=`$CYGPATH -u "$windows_path"`
17934 new_path="$unix_path"
17935 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17936 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17937 new_path="$unix_path"
17938 fi
17939
17940
17941 # Now try to locate executable using which
17942 new_path=`$WHICH "$new_path" 2> /dev/null`
17943
17944 if test "x$new_path" = x; then
17945 # Oops. Which didn't find the executable.
17946 # The splitting of arguments from the executable at a space might have been incorrect,
17947 # since paths with space are more likely in Windows. Give it another try with the whole
17948 # argument.
17949 path="$complete"
17950 arguments="EOL"
17951 new_path="$path"
17952
17953 windows_path="$new_path"
17954 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17955 unix_path=`$CYGPATH -u "$windows_path"`
17956 new_path="$unix_path"
17957 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17958 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17959 new_path="$unix_path"
17960 fi
17961
17962
17963 new_path=`$WHICH "$new_path" 2> /dev/null`
17964
17965 if test "x$new_path" = x; then
17966 # It's still not found. Now this is an unrecoverable error.
17967 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17968 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17969 has_space=`$ECHO "$complete" | $GREP " "`
17970 if test "x$has_space" != x; then
17971 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17972 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17973 fi
17974 as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17975 fi
17976 fi
17977
17978 # Now new_path has a complete unix path to the binary
17979 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17980 # Keep paths in /bin as-is, but remove trailing .exe if any
17981 new_path="${new_path/%.exe/}"
17982 # Do not save /bin paths to all_fixpath_prefixes!
17983 else
17984 # Not in mixed or Windows style, start by that.
17985 new_path=`cmd //c echo $new_path`
17986
17987 input_path="$new_path"
17988 # Check if we need to convert this using DOS-style short mode. If the path
17989 # contains just simple characters, use it. Otherwise (spaces, weird characters),
17990 # take no chances and rewrite it.
17991 # Note: m4 eats our [], so we need to use [ and ] instead.
17992 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17993 if test "x$has_forbidden_chars" != x; then
17994 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17995 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17996 fi
17997
17998 # Output is in $new_path
17999
18000 windows_path="$new_path"
18001 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18002 unix_path=`$CYGPATH -u "$windows_path"`
18003 new_path="$unix_path"
18004 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18005 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18006 new_path="$unix_path"
18007 fi
18008
18009 # remove trailing .exe if any
18010 new_path="${new_path/%.exe/}"
18011
18012 # Save the first 10 bytes of this path to the storage, so fixpath can work.
18013 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18014 fi
18015
18016 else
18017 # We're on a posix platform. Hooray! :)
18018 # First separate the path from the arguments. This will split at the first
18019 # space.
18020 complete="$BUILD_CXX"
18021 path="${complete%% *}"
18022 tmp="$complete EOL"
18023 arguments="${tmp#* }"
18024
18025 # Cannot rely on the command "which" here since it doesn't always work.
18026 is_absolute_path=`$ECHO "$path" | $GREP ^/`
18027 if test -z "$is_absolute_path"; then
18028 # Path to executable is not absolute. Find it.
18029 IFS_save="$IFS"
18030 IFS=:
18031 for p in $PATH; do
18032 if test -f "$p/$path" && test -x "$p/$path"; then
18033 new_path="$p/$path"
18034 break
18035 fi
18036 done
18037 IFS="$IFS_save"
18038 else
18039 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18040 $as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18041 new_path="$path"
18042 fi
18043
18044 if test "x$new_path" = x; then
18045 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18046 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18047 has_space=`$ECHO "$complete" | $GREP " "`
18048 if test "x$has_space" != x; then
18049 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18050 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18051 fi
18052 as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18053 fi
18054 fi
18055
18056 # Now join together the path and the arguments once again
18057 if test "x$arguments" != xEOL; then
18058 new_complete="$new_path ${arguments% *}"
18059 else
18060 new_complete="$new_path"
18061 fi
18062
18063 if test "x$complete" != "x$new_complete"; then
18064 BUILD_CXX="$new_complete"
18065 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18066 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18067 fi
18068
18069 # Extract the first word of "ld", so it can be a program name with args.
18070 set dummy ld; ac_word=$2
18071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18072 $as_echo_n "checking for $ac_word... " >&6; }
18073 if ${ac_cv_path_BUILD_LD+:} false; then :
18074 $as_echo_n "(cached) " >&6
18075 else
18076 case $BUILD_LD in
18077 [\\/]* | ?:[\\/]*)
18078 ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18079 ;;
18080 *)
18081 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18082 for as_dir in $PATH
18083 do
18084 IFS=$as_save_IFS
18085 test -z "$as_dir" && as_dir=.
18086 for ac_exec_ext in '' $ac_executable_extensions; do
18087 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18088 ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18089 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18090 break 2
18091 fi
18092 done
18093 done
18094 IFS=$as_save_IFS
18095
18096 ;;
18097 esac
18098 fi
18099 BUILD_LD=$ac_cv_path_BUILD_LD
18100 if test -n "$BUILD_LD"; then
18101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18102 $as_echo "$BUILD_LD" >&6; }
18103 else
18104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18105 $as_echo "no" >&6; }
18106 fi
18107
18108
18109
18110 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18111
18112 # First separate the path from the arguments. This will split at the first
18113 # space.
18114 complete="$BUILD_LD"
18115 path="${complete%% *}"
18116 tmp="$complete EOL"
18117 arguments="${tmp#* }"
18118
18119 # Input might be given as Windows format, start by converting to
18120 # unix format.
18121 new_path=`$CYGPATH -u "$path"`
18122
18123 # Now try to locate executable using which
18124 new_path=`$WHICH "$new_path" 2> /dev/null`
18125 # bat and cmd files are not always considered executable in cygwin causing which
18126 # to not find them
18127 if test "x$new_path" = x \
18128 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18129 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18130 new_path=`$CYGPATH -u "$path"`
18131 fi
18132 if test "x$new_path" = x; then
18133 # Oops. Which didn't find the executable.
18134 # The splitting of arguments from the executable at a space might have been incorrect,
18135 # since paths with space are more likely in Windows. Give it another try with the whole
18136 # argument.
18137 path="$complete"
18138 arguments="EOL"
18139 new_path=`$CYGPATH -u "$path"`
18140 new_path=`$WHICH "$new_path" 2> /dev/null`
18141 # bat and cmd files are not always considered executable in cygwin causing which
18142 # to not find them
18143 if test "x$new_path" = x \
18144 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18145 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18146 new_path=`$CYGPATH -u "$path"`
18147 fi
18148 if test "x$new_path" = x; then
18149 # It's still not found. Now this is an unrecoverable error.
18150 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18151 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18152 has_space=`$ECHO "$complete" | $GREP " "`
18153 if test "x$has_space" != x; then
18154 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18155 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18156 fi
18157 as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18158 fi
18159 fi
18160
18161 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18162 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18163 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18164 # "foo.exe" is OK but "foo" is an error.
18165 #
18166 # This test is therefore slightly more accurate than "test -f" to check for file precense.
18167 # It is also a way to make sure we got the proper file name for the real test later on.
18168 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18169 if test "x$test_shortpath" = x; then
18170 # Short path failed, file does not exist as specified.
18171 # Try adding .exe or .cmd
18172 if test -f "${new_path}.exe"; then
18173 input_to_shortpath="${new_path}.exe"
18174 elif test -f "${new_path}.cmd"; then
18175 input_to_shortpath="${new_path}.cmd"
18176 else
18177 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18178 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18179 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18180 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18181 as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18182 fi
18183 else
18184 input_to_shortpath="$new_path"
18185 fi
18186
18187 # Call helper function which possibly converts this using DOS-style short mode.
18188 # If so, the updated path is stored in $new_path.
18189 new_path="$input_to_shortpath"
18190
18191 input_path="$input_to_shortpath"
18192 # Check if we need to convert this using DOS-style short mode. If the path
18193 # contains just simple characters, use it. Otherwise (spaces, weird characters),
18194 # take no chances and rewrite it.
18195 # Note: m4 eats our [], so we need to use [ and ] instead.
18196 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18197 if test "x$has_forbidden_chars" != x; then
18198 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18199 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18200 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18201 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18202 # Going to short mode and back again did indeed matter. Since short mode is
18203 # case insensitive, let's make it lowercase to improve readability.
18204 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18205 # Now convert it back to Unix-stile (cygpath)
18206 input_path=`$CYGPATH -u "$shortmode_path"`
18207 new_path="$input_path"
18208 fi
18209 fi
18210
18211 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18212 if test "x$test_cygdrive_prefix" = x; then
18213 # As a simple fix, exclude /usr/bin since it's not a real path.
18214 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18215 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18216 # a path prefixed by /cygdrive for fixpath to work.
18217 new_path="$CYGWIN_ROOT_PATH$input_path"
18218 fi
18219 fi
18220
18221 # remove trailing .exe if any
18222 new_path="${new_path/%.exe/}"
18223
18224 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18225
18226 # First separate the path from the arguments. This will split at the first
18227 # space.
18228 complete="$BUILD_LD"
18229 path="${complete%% *}"
18230 tmp="$complete EOL"
18231 arguments="${tmp#* }"
18232
18233 # Input might be given as Windows format, start by converting to
18234 # unix format.
18235 new_path="$path"
18236
18237 windows_path="$new_path"
18238 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18239 unix_path=`$CYGPATH -u "$windows_path"`
18240 new_path="$unix_path"
18241 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18242 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18243 new_path="$unix_path"
18244 fi
18245
18246
18247 # Now try to locate executable using which
18248 new_path=`$WHICH "$new_path" 2> /dev/null`
18249
18250 if test "x$new_path" = x; then
18251 # Oops. Which didn't find the executable.
18252 # The splitting of arguments from the executable at a space might have been incorrect,
18253 # since paths with space are more likely in Windows. Give it another try with the whole
18254 # argument.
18255 path="$complete"
18256 arguments="EOL"
18257 new_path="$path"
18258
18259 windows_path="$new_path"
18260 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18261 unix_path=`$CYGPATH -u "$windows_path"`
18262 new_path="$unix_path"
18263 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18264 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18265 new_path="$unix_path"
18266 fi
18267
18268
18269 new_path=`$WHICH "$new_path" 2> /dev/null`
18270
18271 if test "x$new_path" = x; then
18272 # It's still not found. Now this is an unrecoverable error.
18273 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18274 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18275 has_space=`$ECHO "$complete" | $GREP " "`
18276 if test "x$has_space" != x; then
18277 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18278 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18279 fi
18280 as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18281 fi
18282 fi
18283
18284 # Now new_path has a complete unix path to the binary
18285 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18286 # Keep paths in /bin as-is, but remove trailing .exe if any
18287 new_path="${new_path/%.exe/}"
18288 # Do not save /bin paths to all_fixpath_prefixes!
18289 else
18290 # Not in mixed or Windows style, start by that.
18291 new_path=`cmd //c echo $new_path`
18292
18293 input_path="$new_path"
18294 # Check if we need to convert this using DOS-style short mode. If the path
18295 # contains just simple characters, use it. Otherwise (spaces, weird characters),
18296 # take no chances and rewrite it.
18297 # Note: m4 eats our [], so we need to use [ and ] instead.
18298 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18299 if test "x$has_forbidden_chars" != x; then
18300 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18301 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18302 fi
18303
18304 # Output is in $new_path
18305
18306 windows_path="$new_path"
18307 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18308 unix_path=`$CYGPATH -u "$windows_path"`
18309 new_path="$unix_path"
18310 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18311 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18312 new_path="$unix_path"
18313 fi
18314
18315 # remove trailing .exe if any
18316 new_path="${new_path/%.exe/}"
18317
18318 # Save the first 10 bytes of this path to the storage, so fixpath can work.
18319 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18320 fi
18321
18322 else
18323 # We're on a posix platform. Hooray! :)
18324 # First separate the path from the arguments. This will split at the first
18325 # space.
18326 complete="$BUILD_LD"
18327 path="${complete%% *}"
18328 tmp="$complete EOL"
18329 arguments="${tmp#* }"
18330
18331 # Cannot rely on the command "which" here since it doesn't always work.
18332 is_absolute_path=`$ECHO "$path" | $GREP ^/`
18333 if test -z "$is_absolute_path"; then
18334 # Path to executable is not absolute. Find it.
18335 IFS_save="$IFS"
18336 IFS=:
18337 for p in $PATH; do
18338 if test -f "$p/$path" && test -x "$p/$path"; then
18339 new_path="$p/$path"
18340 break
18341 fi
18342 done
18343 IFS="$IFS_save"
18344 else
18345 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
18346 $as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
18347 new_path="$path"
18348 fi
18349
18350 if test "x$new_path" = x; then
18351 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18352 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18353 has_space=`$ECHO "$complete" | $GREP " "`
18354 if test "x$has_space" != x; then
18355 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18356 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18357 fi
18358 as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18359 fi
18360 fi
18361
18362 # Now join together the path and the arguments once again
18363 if test "x$arguments" != xEOL; then
18364 new_complete="$new_path ${arguments% *}"
18365 else
18366 new_complete="$new_path"
18367 fi
18368
18369 if test "x$complete" != "x$new_complete"; then
18370 BUILD_LD="$new_complete"
18371 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
18372 $as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
18373 fi
18374
18375 fi
18376
18377
18378
18379
18380 # If a devkit is found on the builddeps server, then prepend its path to the
18381 # PATH variable. If there are cross compilers available in the devkit, these
18382 # will be found by AC_PROG_CC et al.
18383 DEVKIT=
18384
18385
18386 if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
18387 # Source the builddeps file again, to make sure it uses the latest variables!
18388 . $builddepsfile
18389 # Look for a target and build machine specific resource!
18390 eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
18391 if test "x$resource" = x; then
18392 # Ok, lets instead look for a target specific resource
18393 eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
18394 fi
18395 if test "x$resource" = x; then
18396 # Ok, lets instead look for a build specific resource
18397 eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
18398 fi
18399 if test "x$resource" = x; then
18400 # Ok, lets instead look for a generic resource
18401 # (The devkit comes from M4 and not the shell, thus no need for eval here.)
18402 resource=${builddep_devkit}
18403 fi
18404 if test "x$resource" != x; then
18405 { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
18406 $as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
18407 # If the resource in the builddeps.conf file is an existing directory,
18408 # for example /java/linux/cups
18409 if test -d ${resource}; then
18410 depdir=${resource}
18411 else
18412
18413 # devkit is for example mymodule
18414 # $resource is for example libs/general/libmymod_1_2_3.zip
18415 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
18416 # $with_builddeps_dir is for example /localhome/builddeps
18417 # depdir is the name of the variable into which we store the depdir, eg MYMOD
18418 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
18419 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
18420 filename=`basename $resource`
18421 filebase=`echo $filename | sed 's/\.[^\.]*$//'`
18422 filebase=${filename%%.*}
18423 extension=${filename#*.}
18424 installdir=$with_builddeps_dir/$filebase
18425 if test ! -f $installdir/$filename.unpacked; then
18426 { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
18427 $as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
18428 if test ! -d $installdir; then
18429 mkdir -p $installdir
18430 fi
18431 if test ! -d $installdir; then
18432 as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
18433 fi
18434 tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
18435 touch $tmpfile
18436 if test ! -f $tmpfile; then
18437 as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
18438 fi
18439
18440 # $with_builddeps_server/$resource is the ftp://abuilddeps.server.com/libs/cups.zip
18441 # $tmpfile is the local file name for the downloaded file.
18442 VALID_TOOL=no
18443 if test "x$BDEPS_FTP" = xwget; then
18444 VALID_TOOL=yes
18445 wget -O $tmpfile $with_builddeps_server/$resource
18446 fi
18447 if test "x$BDEPS_FTP" = xlftp; then
18448 VALID_TOOL=yes
18449 lftp -c "get $with_builddeps_server/$resource -o $tmpfile"
18450 fi
18451 if test "x$BDEPS_FTP" = xftp; then
18452 VALID_TOOL=yes
18453 FTPSERVER=`echo $with_builddeps_server/$resource | cut -f 3 -d '/'`
18454 FTPPATH=`echo $with_builddeps_server/$resource | cut -f 4- -d '/'`
18455 FTPUSERPWD=${FTPSERVER%%@*}
18456 if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
18457 FTPUSER=${userpwd%%:*}
18458 FTPPWD=${userpwd#*@}
18459 FTPSERVER=${FTPSERVER#*@}
18460 else
18461 FTPUSER=ftp
18462 FTPPWD=ftp
18463 fi
18464 # the "pass" command does not work on some
18465 # ftp clients (read ftp.exe) but if it works,
18466 # passive mode is better!
18467 (\
18468 echo "user $FTPUSER $FTPPWD" ;\
18469 echo "pass" ;\
18470 echo "bin" ;\
18471 echo "get $FTPPATH $tmpfile" ;\
18472 ) | ftp -in $FTPSERVER
18473 fi
18474 if test "x$VALID_TOOL" != xyes; then
18475 as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
18476 fi
18477
18478 mv $tmpfile $installdir/$filename
18479 if test ! -s $installdir/$filename; then
18480 as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
18481 fi
18482 case "$extension" in
18483 zip) echo "Unzipping $installdir/$filename..."
18484 (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
18485 ;;
18486 tar.gz) echo "Untaring $installdir/$filename..."
18487 (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18488 ;;
18489 tgz) echo "Untaring $installdir/$filename..."
18490 (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18491 ;;
18492 *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
18493 ;;
18494 esac
18495 fi
18496 if test -f $installdir/$filename.unpacked; then
18497 depdir=$installdir
18498 fi
18499
18500 fi
18501 # Source the builddeps file again, because in the previous command, the depdir
18502 # was updated to point at the current build dependency install directory.
18503 . $builddepsfile
18504 # Now extract variables from the builddeps.conf files.
18505 theroot=${builddep_devkit_ROOT}
18506 thecflags=${builddep_devkit_CFLAGS}
18507 thelibs=${builddep_devkit_LIBS}
18508 if test "x$depdir" = x; then
18509 as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
18510 fi
18511 DEVKIT=$depdir
18512 if test "x$theroot" != x; then
18513 DEVKIT="$theroot"
18514 fi
18515 if test "x$thecflags" != x; then
18516 DEVKIT_CFLAGS="$thecflags"
18517 fi
18518 if test "x$thelibs" != x; then
18519 DEVKIT_LIBS="$thelibs"
18520 fi
18521 # Found devkit
18522 PATH="$DEVKIT/bin:$PATH"
18523 SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
18524 if test "x$x_includes" = "xNONE"; then
18525 x_includes="$SYS_ROOT/usr/include/X11"
18526 fi
18527 if test "x$x_libraries" = "xNONE"; then
18528 x_libraries="$SYS_ROOT/usr/lib"
18529 fi
18530
18531
18532 fi
18533
18534 fi
18535
18536
18537 if test "x$SYS_ROOT" != "x/" ; then
18538 CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
18539 CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
18540 OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18541 OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18542 CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
18543 LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
18544 fi
18545
18546 # Store the CFLAGS etal passed to the configure script.
18547 ORG_CFLAGS="$CFLAGS"
18548 ORG_CXXFLAGS="$CXXFLAGS"
18549 ORG_OBJCFLAGS="$OBJCFLAGS"
18550
18551 # autoconf magic only relies on PATH, so update it if tools dir is specified
18552 OLD_PATH="$PATH"
18553 if test "x$TOOLS_DIR" != x; then
18554 PATH=$TOOLS_DIR:$PATH
18555 fi
18556
18557
18558 ### Locate C compiler (CC)
18559
18560 # On windows, only cl.exe is supported.
18561 # On Solaris, cc is preferred to gcc.
18562 # Elsewhere, gcc is preferred to cc.
18563
18564 if test "x$CC" != x; then
18565 COMPILER_CHECK_LIST="$CC"
18566 elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18567 COMPILER_CHECK_LIST="cl"
18568 elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
18569 COMPILER_CHECK_LIST="cc gcc"
18570 else
18571 COMPILER_CHECK_LIST="gcc cc"
18572 fi
18573
18574
18575 COMPILER_NAME=C
18576
18577 CC=
18578 # If TOOLS_DIR is set, check for all compiler names in there first
18579 # before checking the rest of the PATH.
18580 if test -n "$TOOLS_DIR"; then
18581 PATH_save="$PATH"
18582 PATH="$TOOLS_DIR"
18583 for ac_prog in $COMPILER_CHECK_LIST
18584 do
18585 # Extract the first word of "$ac_prog", so it can be a program name with args.
18586 set dummy $ac_prog; ac_word=$2
18587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18588 $as_echo_n "checking for $ac_word... " >&6; }
18589 if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
18590 $as_echo_n "(cached) " >&6
18591 else
18592 case $TOOLS_DIR_CC in
18593 [\\/]* | ?:[\\/]*)
18594 ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
18595 ;;
18596 *)
18597 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18598 for as_dir in $PATH
18599 do
18600 IFS=$as_save_IFS
18601 test -z "$as_dir" && as_dir=.
18602 for ac_exec_ext in '' $ac_executable_extensions; do
18603 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18604 ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
18605 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18606 break 2
18607 fi
18608 done
18609 done
18610 IFS=$as_save_IFS
18611
18612 ;;
18613 esac
18614 fi
18615 TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
18616 if test -n "$TOOLS_DIR_CC"; then
18617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
18618 $as_echo "$TOOLS_DIR_CC" >&6; }
18619 else
18620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18621 $as_echo "no" >&6; }
18622 fi
18623
18624
18625 test -n "$TOOLS_DIR_CC" && break
18626 done
18627
18628 CC=$TOOLS_DIR_CC
18629 PATH="$PATH_save"
18630 fi
18631
18632 # AC_PATH_PROGS can't be run multiple times with the same variable,
18633 # so create a new name for this run.
18634 if test "x$CC" = x; then
18635 for ac_prog in $COMPILER_CHECK_LIST
18636 do
18637 # Extract the first word of "$ac_prog", so it can be a program name with args.
18638 set dummy $ac_prog; ac_word=$2
18639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18640 $as_echo_n "checking for $ac_word... " >&6; }
18641 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
18642 $as_echo_n "(cached) " >&6
18643 else
18644 case $POTENTIAL_CC in
18645 [\\/]* | ?:[\\/]*)
18646 ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
18647 ;;
18648 *)
18649 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18650 for as_dir in $PATH
18651 do
18652 IFS=$as_save_IFS
18653 test -z "$as_dir" && as_dir=.
18654 for ac_exec_ext in '' $ac_executable_extensions; do
18655 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18656 ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
18657 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18658 break 2
18659 fi
18660 done
18661 done
18662 IFS=$as_save_IFS
18663
18664 ;;
18665 esac
18666 fi
18667 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
18668 if test -n "$POTENTIAL_CC"; then
18669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
18670 $as_echo "$POTENTIAL_CC" >&6; }
18671 else
18672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18673 $as_echo "no" >&6; }
18674 fi
18675
18676
18677 test -n "$POTENTIAL_CC" && break
18678 done
18679
18680 CC=$POTENTIAL_CC
18681 fi
18682
18683 if test "x$CC" = x; then
18684
18685 # Print a helpful message on how to acquire the necessary build dependency.
18686 # devkit is the help tag: freetyp2, cups, pulse, alsa etc
18687 MISSING_DEPENDENCY=devkit
18688 PKGHANDLER_COMMAND=
18689
18690 case $PKGHANDLER in
18691 apt-get)
18692 apt_help $MISSING_DEPENDENCY ;;
18693 yum)
18694 yum_help $MISSING_DEPENDENCY ;;
18695 port)
18696 port_help $MISSING_DEPENDENCY ;;
18697 pkgutil)
18698 pkgutil_help $MISSING_DEPENDENCY ;;
18699 pkgadd)
18700 pkgadd_help $MISSING_DEPENDENCY ;;
18701 * )
18702 break ;;
18703 esac
18704
18705 if test "x$PKGHANDLER_COMMAND" != x; then
18706 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
18707 fi
18708
18709 as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
18710 fi
18711
18712 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18713
18714 # First separate the path from the arguments. This will split at the first
18715 # space.
18716 complete="$CC"
18717 path="${complete%% *}"
18718 tmp="$complete EOL"
18719 arguments="${tmp#* }"
18720
18721 # Input might be given as Windows format, start by converting to
18722 # unix format.
18723 new_path=`$CYGPATH -u "$path"`
18724
18725 # Now try to locate executable using which
18726 new_path=`$WHICH "$new_path" 2> /dev/null`
18727 # bat and cmd files are not always considered executable in cygwin causing which
18728 # to not find them
18729 if test "x$new_path" = x \
18730 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18731 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18732 new_path=`$CYGPATH -u "$path"`
18733 fi
18734 if test "x$new_path" = x; then
18735 # Oops. Which didn't find the executable.
18736 # The splitting of arguments from the executable at a space might have been incorrect,
18737 # since paths with space are more likely in Windows. Give it another try with the whole
18738 # argument.
18739 path="$complete"
18740 arguments="EOL"
18741 new_path=`$CYGPATH -u "$path"`
18742 new_path=`$WHICH "$new_path" 2> /dev/null`
18743 # bat and cmd files are not always considered executable in cygwin causing which
18744 # to not find them
18745 if test "x$new_path" = x \
18746 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18747 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18748 new_path=`$CYGPATH -u "$path"`
18749 fi
18750 if test "x$new_path" = x; then
18751 # It's still not found. Now this is an unrecoverable error.
18752 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18753 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18754 has_space=`$ECHO "$complete" | $GREP " "`
18755 if test "x$has_space" != x; then
18756 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18757 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18758 fi
18759 as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18760 fi
18761 fi
18762
18763 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18764 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18765 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18766 # "foo.exe" is OK but "foo" is an error.
18767 #
18768 # This test is therefore slightly more accurate than "test -f" to check for file precense.
18769 # It is also a way to make sure we got the proper file name for the real test later on.
18770 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18771 if test "x$test_shortpath" = x; then
18772 # Short path failed, file does not exist as specified.
18773 # Try adding .exe or .cmd
18774 if test -f "${new_path}.exe"; then
18775 input_to_shortpath="${new_path}.exe"
18776 elif test -f "${new_path}.cmd"; then
18777 input_to_shortpath="${new_path}.cmd"
18778 else
18779 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
18780 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
18781 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18782 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18783 as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18784 fi
18785 else
18786 input_to_shortpath="$new_path"
18787 fi
18788
18789 # Call helper function which possibly converts this using DOS-style short mode.
18790 # If so, the updated path is stored in $new_path.
18791 new_path="$input_to_shortpath"
18792
18793 input_path="$input_to_shortpath"
18794 # Check if we need to convert this using DOS-style short mode. If the path
18795 # contains just simple characters, use it. Otherwise (spaces, weird characters),
18796 # take no chances and rewrite it.
18797 # Note: m4 eats our [], so we need to use [ and ] instead.
18798 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18799 if test "x$has_forbidden_chars" != x; then
18800 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18801 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18802 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18803 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18804 # Going to short mode and back again did indeed matter. Since short mode is
18805 # case insensitive, let's make it lowercase to improve readability.
18806 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18807 # Now convert it back to Unix-stile (cygpath)
18808 input_path=`$CYGPATH -u "$shortmode_path"`
18809 new_path="$input_path"
18810 fi
18811 fi
18812
18813 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18814 if test "x$test_cygdrive_prefix" = x; then
18815 # As a simple fix, exclude /usr/bin since it's not a real path.
18816 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18817 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18818 # a path prefixed by /cygdrive for fixpath to work.
18819 new_path="$CYGWIN_ROOT_PATH$input_path"
18820 fi
18821 fi
18822
18823 # remove trailing .exe if any
18824 new_path="${new_path/%.exe/}"
18825
18826 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18827
18828 # First separate the path from the arguments. This will split at the first
18829 # space.
18830 complete="$CC"
18831 path="${complete%% *}"
18832 tmp="$complete EOL"
18833 arguments="${tmp#* }"
18834
18835 # Input might be given as Windows format, start by converting to
18836 # unix format.
18837 new_path="$path"
18838
18839 windows_path="$new_path"
18840 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18841 unix_path=`$CYGPATH -u "$windows_path"`
18842 new_path="$unix_path"
18843 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18844 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18845 new_path="$unix_path"
18846 fi
18847
18848
18849 # Now try to locate executable using which
18850 new_path=`$WHICH "$new_path" 2> /dev/null`
18851
18852 if test "x$new_path" = x; then
18853 # Oops. Which didn't find the executable.
18854 # The splitting of arguments from the executable at a space might have been incorrect,
18855 # since paths with space are more likely in Windows. Give it another try with the whole
18856 # argument.
18857 path="$complete"
18858 arguments="EOL"
18859 new_path="$path"
18860
18861 windows_path="$new_path"
18862 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18863 unix_path=`$CYGPATH -u "$windows_path"`
18864 new_path="$unix_path"
18865 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18866 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18867 new_path="$unix_path"
18868 fi
18869
18870
18871 new_path=`$WHICH "$new_path" 2> /dev/null`
18872
18873 if test "x$new_path" = x; then
18874 # It's still not found. Now this is an unrecoverable error.
18875 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18876 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18877 has_space=`$ECHO "$complete" | $GREP " "`
18878 if test "x$has_space" != x; then
18879 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18880 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18881 fi
18882 as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18883 fi
18884 fi
18885
18886 # Now new_path has a complete unix path to the binary
18887 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18888 # Keep paths in /bin as-is, but remove trailing .exe if any
18889 new_path="${new_path/%.exe/}"
18890 # Do not save /bin paths to all_fixpath_prefixes!
18891 else
18892 # Not in mixed or Windows style, start by that.
18893 new_path=`cmd //c echo $new_path`
18894
18895 input_path="$new_path"
18896 # Check if we need to convert this using DOS-style short mode. If the path
18897 # contains just simple characters, use it. Otherwise (spaces, weird characters),
18898 # take no chances and rewrite it.
18899 # Note: m4 eats our [], so we need to use [ and ] instead.
18900 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18901 if test "x$has_forbidden_chars" != x; then
18902 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18903 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18904 fi
18905
18906 # Output is in $new_path
18907
18908 windows_path="$new_path"
18909 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18910 unix_path=`$CYGPATH -u "$windows_path"`
18911 new_path="$unix_path"
18912 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18913 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18914 new_path="$unix_path"
18915 fi
18916
18917 # remove trailing .exe if any
18918 new_path="${new_path/%.exe/}"
18919
18920 # Save the first 10 bytes of this path to the storage, so fixpath can work.
18921 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18922 fi
18923
18924 else
18925 # We're on a posix platform. Hooray! :)
18926 # First separate the path from the arguments. This will split at the first
18927 # space.
18928 complete="$CC"
18929 path="${complete%% *}"
18930 tmp="$complete EOL"
18931 arguments="${tmp#* }"
18932
18933 # Cannot rely on the command "which" here since it doesn't always work.
18934 is_absolute_path=`$ECHO "$path" | $GREP ^/`
18935 if test -z "$is_absolute_path"; then
18936 # Path to executable is not absolute. Find it.
18937 IFS_save="$IFS"
18938 IFS=:
18939 for p in $PATH; do
18940 if test -f "$p/$path" && test -x "$p/$path"; then
18941 new_path="$p/$path"
18942 break
18943 fi
18944 done
18945 IFS="$IFS_save"
18946 else
18947 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
18948 $as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
18949 new_path="$path"
18950 fi
18951
18952 if test "x$new_path" = x; then
18953 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18954 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18955 has_space=`$ECHO "$complete" | $GREP " "`
18956 if test "x$has_space" != x; then
18957 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18958 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18959 fi
18960 as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18961 fi
18962 fi
18963
18964 # Now join together the path and the arguments once again
18965 if test "x$arguments" != xEOL; then
18966 new_complete="$new_path ${arguments% *}"
18967 else
18968 new_complete="$new_path"
18969 fi
18970
18971 if test "x$complete" != "x$new_complete"; then
18972 CC="$new_complete"
18973 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
18974 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
18975 fi
18976
18977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
18978 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
18979 TEST_COMPILER="$CC"
18980
18981 if test "x$OPENJDK_BUILD_OS" != xwindows; then
18982 # Follow a chain of symbolic links. Use readlink
18983 # where it exists, else fall back to horribly
18984 # complicated shell code.
18985 if test "x$READLINK_TESTED" != yes; then
18986 # On MacOSX there is a readlink tool with a different
18987 # purpose than the GNU readlink tool. Check the found readlink.
18988 ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
18989 if test "x$ISGNU" = x; then
18990 # A readlink that we do not know how to use.
18991 # Are there other non-GNU readlinks out there?
18992 READLINK_TESTED=yes
18993 READLINK=
18994 fi
18995 fi
18996
18997 if test "x$READLINK" != x; then
18998 TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
18999 else
19000 # Save the current directory for restoring afterwards
19001 STARTDIR=$PWD
19002 COUNTER=0
19003 sym_link_dir=`$DIRNAME $TEST_COMPILER`
19004 sym_link_file=`$BASENAME $TEST_COMPILER`
19005 # Use the system pwd and not the shell builtin to resolve directory symlinks
19006 cd $sym_link_dir
19007 cd `$THEPWDCMD`
19008 sym_link_dir=`$THEPWDCMD`
19009 # Resolve file symlinks
19010 while test $COUNTER -lt 20; do
19011 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19012 if test "x$ISLINK" == x; then
19013 # This is not a symbolic link! We are done!
19014 break
19015 fi
19016 # Again resolve directory symlinks since the target of the just found
19017 # link could be in a different directory
19018 cd `$DIRNAME $ISLINK`
19019 sym_link_dir=`$THEPWDCMD`
19020 sym_link_file=`$BASENAME $ISLINK`
19021 let COUNTER=COUNTER+1
19022 done
19023 cd $STARTDIR
19024 TEST_COMPILER=$sym_link_dir/$sym_link_file
19025 fi
19026 fi
19027
19028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19029 $as_echo "$TEST_COMPILER" >&6; }
19030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19031 $as_echo_n "checking if CC is disguised ccache... " >&6; }
19032
19033 COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19034 if test "x$COMPILER_BASENAME" = "xccache"; then
19035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19036 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19037 # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19038 # We want to control ccache invocation ourselves, so ignore this cc and try
19039 # searching again.
19040
19041 # Remove the path to the fake ccache cc from the PATH
19042 RETRY_COMPILER_SAVED_PATH="$PATH"
19043 COMPILER_DIRNAME=`$DIRNAME $CC`
19044 PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19045
19046 # Try again looking for our compiler
19047 if test -n "$ac_tool_prefix"; then
19048 for ac_prog in $COMPILER_CHECK_LIST
19049 do
19050 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19051 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19053 $as_echo_n "checking for $ac_word... " >&6; }
19054 if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
19055 $as_echo_n "(cached) " >&6
19056 else
19057 if test -n "$PROPER_COMPILER_CC"; then
19058 ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19059 else
19060 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19061 for as_dir in $PATH
19062 do
19063 IFS=$as_save_IFS
19064 test -z "$as_dir" && as_dir=.
19065 for ac_exec_ext in '' $ac_executable_extensions; do
19066 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19067 ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19068 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19069 break 2
19070 fi
19071 done
19072 done
19073 IFS=$as_save_IFS
19074
19075 fi
19076 fi
19077 PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19078 if test -n "$PROPER_COMPILER_CC"; then
19079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19080 $as_echo "$PROPER_COMPILER_CC" >&6; }
19081 else
19082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19083 $as_echo "no" >&6; }
19084 fi
19085
19086
19087 test -n "$PROPER_COMPILER_CC" && break
19088 done
19089 fi
19090 if test -z "$PROPER_COMPILER_CC"; then
19091 ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19092 for ac_prog in $COMPILER_CHECK_LIST
19093 do
19094 # Extract the first word of "$ac_prog", so it can be a program name with args.
19095 set dummy $ac_prog; ac_word=$2
19096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19097 $as_echo_n "checking for $ac_word... " >&6; }
19098 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
19099 $as_echo_n "(cached) " >&6
19100 else
19101 if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19102 ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19103 else
19104 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19105 for as_dir in $PATH
19106 do
19107 IFS=$as_save_IFS
19108 test -z "$as_dir" && as_dir=.
19109 for ac_exec_ext in '' $ac_executable_extensions; do
19110 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19111 ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19112 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19113 break 2
19114 fi
19115 done
19116 done
19117 IFS=$as_save_IFS
19118
19119 fi
19120 fi
19121 ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19122 if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19124 $as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19125 else
19126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19127 $as_echo "no" >&6; }
19128 fi
19129
19130
19131 test -n "$ac_ct_PROPER_COMPILER_CC" && break
19132 done
19133
19134 if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19135 PROPER_COMPILER_CC=""
19136 else
19137 case $cross_compiling:$ac_tool_warned in
19138 yes:)
19139 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19140 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19141 ac_tool_warned=yes ;;
19142 esac
19143 PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19144 fi
19145 fi
19146
19147
19148 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19149
19150 # First separate the path from the arguments. This will split at the first
19151 # space.
19152 complete="$PROPER_COMPILER_CC"
19153 path="${complete%% *}"
19154 tmp="$complete EOL"
19155 arguments="${tmp#* }"
19156
19157 # Input might be given as Windows format, start by converting to
19158 # unix format.
19159 new_path=`$CYGPATH -u "$path"`
19160
19161 # Now try to locate executable using which
19162 new_path=`$WHICH "$new_path" 2> /dev/null`
19163 # bat and cmd files are not always considered executable in cygwin causing which
19164 # to not find them
19165 if test "x$new_path" = x \
19166 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19167 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19168 new_path=`$CYGPATH -u "$path"`
19169 fi
19170 if test "x$new_path" = x; then
19171 # Oops. Which didn't find the executable.
19172 # The splitting of arguments from the executable at a space might have been incorrect,
19173 # since paths with space are more likely in Windows. Give it another try with the whole
19174 # argument.
19175 path="$complete"
19176 arguments="EOL"
19177 new_path=`$CYGPATH -u "$path"`
19178 new_path=`$WHICH "$new_path" 2> /dev/null`
19179 # bat and cmd files are not always considered executable in cygwin causing which
19180 # to not find them
19181 if test "x$new_path" = x \
19182 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19183 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19184 new_path=`$CYGPATH -u "$path"`
19185 fi
19186 if test "x$new_path" = x; then
19187 # It's still not found. Now this is an unrecoverable error.
19188 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19189 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19190 has_space=`$ECHO "$complete" | $GREP " "`
19191 if test "x$has_space" != x; then
19192 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19193 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19194 fi
19195 as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19196 fi
19197 fi
19198
19199 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19200 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19201 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19202 # "foo.exe" is OK but "foo" is an error.
19203 #
19204 # This test is therefore slightly more accurate than "test -f" to check for file precense.
19205 # It is also a way to make sure we got the proper file name for the real test later on.
19206 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19207 if test "x$test_shortpath" = x; then
19208 # Short path failed, file does not exist as specified.
19209 # Try adding .exe or .cmd
19210 if test -f "${new_path}.exe"; then
19211 input_to_shortpath="${new_path}.exe"
19212 elif test -f "${new_path}.cmd"; then
19213 input_to_shortpath="${new_path}.cmd"
19214 else
19215 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19216 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19217 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19218 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19219 as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19220 fi
19221 else
19222 input_to_shortpath="$new_path"
19223 fi
19224
19225 # Call helper function which possibly converts this using DOS-style short mode.
19226 # If so, the updated path is stored in $new_path.
19227 new_path="$input_to_shortpath"
19228
19229 input_path="$input_to_shortpath"
19230 # Check if we need to convert this using DOS-style short mode. If the path
19231 # contains just simple characters, use it. Otherwise (spaces, weird characters),
19232 # take no chances and rewrite it.
19233 # Note: m4 eats our [], so we need to use [ and ] instead.
19234 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19235 if test "x$has_forbidden_chars" != x; then
19236 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19237 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19238 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19239 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19240 # Going to short mode and back again did indeed matter. Since short mode is
19241 # case insensitive, let's make it lowercase to improve readability.
19242 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19243 # Now convert it back to Unix-stile (cygpath)
19244 input_path=`$CYGPATH -u "$shortmode_path"`
19245 new_path="$input_path"
19246 fi
19247 fi
19248
19249 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19250 if test "x$test_cygdrive_prefix" = x; then
19251 # As a simple fix, exclude /usr/bin since it's not a real path.
19252 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19253 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19254 # a path prefixed by /cygdrive for fixpath to work.
19255 new_path="$CYGWIN_ROOT_PATH$input_path"
19256 fi
19257 fi
19258
19259 # remove trailing .exe if any
19260 new_path="${new_path/%.exe/}"
19261
19262 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19263
19264 # First separate the path from the arguments. This will split at the first
19265 # space.
19266 complete="$PROPER_COMPILER_CC"
19267 path="${complete%% *}"
19268 tmp="$complete EOL"
19269 arguments="${tmp#* }"
19270
19271 # Input might be given as Windows format, start by converting to
19272 # unix format.
19273 new_path="$path"
19274
19275 windows_path="$new_path"
19276 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19277 unix_path=`$CYGPATH -u "$windows_path"`
19278 new_path="$unix_path"
19279 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19280 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19281 new_path="$unix_path"
19282 fi
19283
19284
19285 # Now try to locate executable using which
19286 new_path=`$WHICH "$new_path" 2> /dev/null`
19287
19288 if test "x$new_path" = x; then
19289 # Oops. Which didn't find the executable.
19290 # The splitting of arguments from the executable at a space might have been incorrect,
19291 # since paths with space are more likely in Windows. Give it another try with the whole
19292 # argument.
19293 path="$complete"
19294 arguments="EOL"
19295 new_path="$path"
19296
19297 windows_path="$new_path"
19298 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19299 unix_path=`$CYGPATH -u "$windows_path"`
19300 new_path="$unix_path"
19301 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19302 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19303 new_path="$unix_path"
19304 fi
19305
19306
19307 new_path=`$WHICH "$new_path" 2> /dev/null`
19308
19309 if test "x$new_path" = x; then
19310 # It's still not found. Now this is an unrecoverable error.
19311 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19312 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19313 has_space=`$ECHO "$complete" | $GREP " "`
19314 if test "x$has_space" != x; then
19315 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19316 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19317 fi
19318 as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19319 fi
19320 fi
19321
19322 # Now new_path has a complete unix path to the binary
19323 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19324 # Keep paths in /bin as-is, but remove trailing .exe if any
19325 new_path="${new_path/%.exe/}"
19326 # Do not save /bin paths to all_fixpath_prefixes!
19327 else
19328 # Not in mixed or Windows style, start by that.
19329 new_path=`cmd //c echo $new_path`
19330
19331 input_path="$new_path"
19332 # Check if we need to convert this using DOS-style short mode. If the path
19333 # contains just simple characters, use it. Otherwise (spaces, weird characters),
19334 # take no chances and rewrite it.
19335 # Note: m4 eats our [], so we need to use [ and ] instead.
19336 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19337 if test "x$has_forbidden_chars" != x; then
19338 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19339 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19340 fi
19341
19342 # Output is in $new_path
19343
19344 windows_path="$new_path"
19345 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19346 unix_path=`$CYGPATH -u "$windows_path"`
19347 new_path="$unix_path"
19348 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19349 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19350 new_path="$unix_path"
19351 fi
19352
19353 # remove trailing .exe if any
19354 new_path="${new_path/%.exe/}"
19355
19356 # Save the first 10 bytes of this path to the storage, so fixpath can work.
19357 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19358 fi
19359
19360 else
19361 # We're on a posix platform. Hooray! :)
19362 # First separate the path from the arguments. This will split at the first
19363 # space.
19364 complete="$PROPER_COMPILER_CC"
19365 path="${complete%% *}"
19366 tmp="$complete EOL"
19367 arguments="${tmp#* }"
19368
19369 # Cannot rely on the command "which" here since it doesn't always work.
19370 is_absolute_path=`$ECHO "$path" | $GREP ^/`
19371 if test -z "$is_absolute_path"; then
19372 # Path to executable is not absolute. Find it.
19373 IFS_save="$IFS"
19374 IFS=:
19375 for p in $PATH; do
19376 if test -f "$p/$path" && test -x "$p/$path"; then
19377 new_path="$p/$path"
19378 break
19379 fi
19380 done
19381 IFS="$IFS_save"
19382 else
19383 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
19384 $as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
19385 new_path="$path"
19386 fi
19387
19388 if test "x$new_path" = x; then
19389 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19390 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19391 has_space=`$ECHO "$complete" | $GREP " "`
19392 if test "x$has_space" != x; then
19393 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19394 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19395 fi
19396 as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19397 fi
19398 fi
19399
19400 # Now join together the path and the arguments once again
19401 if test "x$arguments" != xEOL; then
19402 new_complete="$new_path ${arguments% *}"
19403 else
19404 new_complete="$new_path"
19405 fi
19406
19407 if test "x$complete" != "x$new_complete"; then
19408 PROPER_COMPILER_CC="$new_complete"
19409 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
19410 $as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
19411 fi
19412
19413 PATH="$RETRY_COMPILER_SAVED_PATH"
19414
19415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
19416 $as_echo_n "checking for resolved symbolic links for CC... " >&6; }
19417
19418 if test "x$OPENJDK_BUILD_OS" != xwindows; then
19419 # Follow a chain of symbolic links. Use readlink
19420 # where it exists, else fall back to horribly
19421 # complicated shell code.
19422 if test "x$READLINK_TESTED" != yes; then
19423 # On MacOSX there is a readlink tool with a different
19424 # purpose than the GNU readlink tool. Check the found readlink.
19425 ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19426 if test "x$ISGNU" = x; then
19427 # A readlink that we do not know how to use.
19428 # Are there other non-GNU readlinks out there?
19429 READLINK_TESTED=yes
19430 READLINK=
19431 fi
19432 fi
19433
19434 if test "x$READLINK" != x; then
19435 PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
19436 else
19437 # Save the current directory for restoring afterwards
19438 STARTDIR=$PWD
19439 COUNTER=0
19440 sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
19441 sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
19442 # Use the system pwd and not the shell builtin to resolve directory symlinks
19443 cd $sym_link_dir
19444 cd `$THEPWDCMD`
19445 sym_link_dir=`$THEPWDCMD`
19446 # Resolve file symlinks
19447 while test $COUNTER -lt 20; do
19448 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19449 if test "x$ISLINK" == x; then
19450 # This is not a symbolic link! We are done!
19451 break
19452 fi
19453 # Again resolve directory symlinks since the target of the just found
19454 # link could be in a different directory
19455 cd `$DIRNAME $ISLINK`
19456 sym_link_dir=`$THEPWDCMD`
19457 sym_link_file=`$BASENAME $ISLINK`
19458 let COUNTER=COUNTER+1
19459 done
19460 cd $STARTDIR
19461 PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
19462 fi
19463 fi
19464
19465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19466 $as_echo "$PROPER_COMPILER_CC" >&6; }
19467 CC="$PROPER_COMPILER_CC"
19468 else
19469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
19470 $as_echo "no, keeping CC" >&6; }
19471 CC="$TEST_COMPILER"
19472 fi
19473
19474 COMPILER=$CC
19475 COMPILER_NAME=$COMPILER_NAME
19476
19477 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
19478 # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
19479 COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
19480 $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
19481 if test $? -ne 0; then
19482 GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19483
19484 { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&5
19485 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
19486 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
19487 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
19488 as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19489 else
19490 COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
19491 COMPILER_VENDOR="Sun Studio"
19492 fi
19493 elif test "x$OPENJDK_TARGET_OS" = xwindows; then
19494 # First line typically looks something like:
19495 # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
19496 COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
19497 COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
19498 COMPILER_VENDOR="Microsoft CL.EXE"
19499 COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
19500 if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
19501 if test "x$COMPILER_CPU_TEST" != "x80x86"; then
19502 as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
19503 fi
19504 elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
19505 if test "x$COMPILER_CPU_TEST" != "xx64"; then
19506 as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
19507 fi
19508 fi
19509 else
19510 COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19511 # Check that this is likely to be GCC.
19512 $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
19513 if test $? -ne 0; then
19514 { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
19515 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
19516 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
19517 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
19518 as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19519 fi
19520
19521 # First line typically looks something like:
19522 # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
19523 COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
19524 COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
19525 fi
19526 # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
19527 CC_VERSION="$COMPILER_VERSION"
19528 # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
19529 CC_VENDOR="$COMPILER_VENDOR"
19530
19531 { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
19532 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
19533
19534
19535 # Now that we have resolved CC ourself, let autoconf have its go at it
19536 ac_ext=c
19537 ac_cpp='$CPP $CPPFLAGS'
19538 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19539 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19540 ac_compiler_gnu=$ac_cv_c_compiler_gnu
19541 if test -n "$ac_tool_prefix"; then
19542 for ac_prog in $CC
19543 do
19544 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19545 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19547 $as_echo_n "checking for $ac_word... " >&6; }
19548 if ${ac_cv_prog_CC+:} false; then :
19549 $as_echo_n "(cached) " >&6
19550 else
19551 if test -n "$CC"; then
19552 ac_cv_prog_CC="$CC" # Let the user override the test.
19553 else
19554 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19555 for as_dir in $PATH
19556 do
19557 IFS=$as_save_IFS
19558 test -z "$as_dir" && as_dir=.
19559 for ac_exec_ext in '' $ac_executable_extensions; do
19560 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19561 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
19562 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19563 break 2
19564 fi
19565 done
19566 done
19567 IFS=$as_save_IFS
19568
19569 fi
19570 fi
19571 CC=$ac_cv_prog_CC
19572 if test -n "$CC"; then
19573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
19574 $as_echo "$CC" >&6; }
19575 else
19576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19577 $as_echo "no" >&6; }
19578 fi
19579
19580
19581 test -n "$CC" && break
19582 done
19583 fi
19584 if test -z "$CC"; then
19585 ac_ct_CC=$CC
19586 for ac_prog in $CC
19587 do
19588 # Extract the first word of "$ac_prog", so it can be a program name with args.
19589 set dummy $ac_prog; ac_word=$2
19590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19591 $as_echo_n "checking for $ac_word... " >&6; }
19592 if ${ac_cv_prog_ac_ct_CC+:} false; then :
19593 $as_echo_n "(cached) " >&6
19594 else
19595 if test -n "$ac_ct_CC"; then
19596 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
19597 else
19598 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19599 for as_dir in $PATH
19600 do
19601 IFS=$as_save_IFS
19602 test -z "$as_dir" && as_dir=.
19603 for ac_exec_ext in '' $ac_executable_extensions; do
19604 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19605 ac_cv_prog_ac_ct_CC="$ac_prog"
19606 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19607 break 2
19608 fi
19609 done
19610 done
19611 IFS=$as_save_IFS
19612
19613 fi
19614 fi
19615 ac_ct_CC=$ac_cv_prog_ac_ct_CC
19616 if test -n "$ac_ct_CC"; then
19617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
19618 $as_echo "$ac_ct_CC" >&6; }
19619 else
19620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19621 $as_echo "no" >&6; }
19622 fi
19623
19624
19625 test -n "$ac_ct_CC" && break
19626 done
19627
19628 if test "x$ac_ct_CC" = x; then
19629 CC=""
19630 else
19631 case $cross_compiling:$ac_tool_warned in
19632 yes:)
19633 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19634 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19635 ac_tool_warned=yes ;;
19636 esac
19637 CC=$ac_ct_CC
19638 fi
19639 fi
19640
19641
19642 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19643 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19644 as_fn_error $? "no acceptable C compiler found in \$PATH
19645 See \`config.log' for more details" "$LINENO" 5; }
19646
19647 # Provide some information about the compiler.
19648 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
19649 set X $ac_compile
19650 ac_compiler=$2
19651 for ac_option in --version -v -V -qversion; do
19652 { { ac_try="$ac_compiler $ac_option >&5"
19653 case "(($ac_try" in
19654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19655 *) ac_try_echo=$ac_try;;
19656 esac
19657 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19658 $as_echo "$ac_try_echo"; } >&5
19659 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
19660 ac_status=$?
19661 if test -s conftest.err; then
19662 sed '10a\
19663 ... rest of stderr output deleted ...
19664 10q' conftest.err >conftest.er1
19665 cat conftest.er1 >&5
19666 fi
19667 rm -f conftest.er1 conftest.err
19668 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19669 test $ac_status = 0; }
19670 done
19671
19672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19673 /* end confdefs.h. */
19674
19675 int
19676 main ()
19677 {
19678
19679 ;
19680 return 0;
19681 }
19682 _ACEOF
19683 ac_clean_files_save=$ac_clean_files
19684 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
19685 # Try to create an executable without -o first, disregard a.out.
19686 # It will help us diagnose broken compilers, and finding out an intuition
19687 # of exeext.
19688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
19689 $as_echo_n "checking whether the C compiler works... " >&6; }
19690 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
19691
19692 # The possible output files:
19693 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
19694
19695 ac_rmfiles=
19696 for ac_file in $ac_files
19697 do
19698 case $ac_file in
19699 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19700 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
19701 esac
19702 done
19703 rm -f $ac_rmfiles
19704
19705 if { { ac_try="$ac_link_default"
19706 case "(($ac_try" in
19707 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19708 *) ac_try_echo=$ac_try;;
19709 esac
19710 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19711 $as_echo "$ac_try_echo"; } >&5
19712 (eval "$ac_link_default") 2>&5
19713 ac_status=$?
19714 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19715 test $ac_status = 0; }; then :
19716 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
19717 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
19718 # in a Makefile. We should not override ac_cv_exeext if it was cached,
19719 # so that the user can short-circuit this test for compilers unknown to
19720 # Autoconf.
19721 for ac_file in $ac_files ''
19722 do
19723 test -f "$ac_file" || continue
19724 case $ac_file in
19725 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
19726 ;;
19727 [ab].out )
19728 # We found the default executable, but exeext='' is most
19729 # certainly right.
19730 break;;
19731 *.* )
19732 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
19733 then :; else
19734 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19735 fi
19736 # We set ac_cv_exeext here because the later test for it is not
19737 # safe: cross compilers may not add the suffix if given an `-o'
19738 # argument, so we may need to know it at that point already.
19739 # Even if this section looks crufty: it has the advantage of
19740 # actually working.
19741 break;;
19742 * )
19743 break;;
19744 esac
19745 done
19746 test "$ac_cv_exeext" = no && ac_cv_exeext=
19747
19748 else
19749 ac_file=''
19750 fi
19751 if test -z "$ac_file"; then :
19752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19753 $as_echo "no" >&6; }
19754 $as_echo "$as_me: failed program was:" >&5
19755 sed 's/^/| /' conftest.$ac_ext >&5
19756
19757 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19758 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19759 as_fn_error 77 "C compiler cannot create executables
19760 See \`config.log' for more details" "$LINENO" 5; }
19761 else
19762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19763 $as_echo "yes" >&6; }
19764 fi
19765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
19766 $as_echo_n "checking for C compiler default output file name... " >&6; }
19767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
19768 $as_echo "$ac_file" >&6; }
19769 ac_exeext=$ac_cv_exeext
19770
19771 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
19772 ac_clean_files=$ac_clean_files_save
19773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
19774 $as_echo_n "checking for suffix of executables... " >&6; }
19775 if { { ac_try="$ac_link"
19776 case "(($ac_try" in
19777 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19778 *) ac_try_echo=$ac_try;;
19779 esac
19780 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19781 $as_echo "$ac_try_echo"; } >&5
19782 (eval "$ac_link") 2>&5
19783 ac_status=$?
19784 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19785 test $ac_status = 0; }; then :
19786 # If both `conftest.exe' and `conftest' are `present' (well, observable)
19787 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
19788 # work properly (i.e., refer to `conftest.exe'), while it won't with
19789 # `rm'.
19790 for ac_file in conftest.exe conftest conftest.*; do
19791 test -f "$ac_file" || continue
19792 case $ac_file in
19793 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19794 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19795 break;;
19796 * ) break;;
19797 esac
19798 done
19799 else
19800 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19801 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19802 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
19803 See \`config.log' for more details" "$LINENO" 5; }
19804 fi
19805 rm -f conftest conftest$ac_cv_exeext
19806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
19807 $as_echo "$ac_cv_exeext" >&6; }
19808
19809 rm -f conftest.$ac_ext
19810 EXEEXT=$ac_cv_exeext
19811 ac_exeext=$EXEEXT
19812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19813 /* end confdefs.h. */
19814 #include <stdio.h>
19815 int
19816 main ()
19817 {
19818 FILE *f = fopen ("conftest.out", "w");
19819 return ferror (f) || fclose (f) != 0;
19820
19821 ;
19822 return 0;
19823 }
19824 _ACEOF
19825 ac_clean_files="$ac_clean_files conftest.out"
19826 # Check that the compiler produces executables we can run. If not, either
19827 # the compiler is broken, or we cross compile.
19828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
19829 $as_echo_n "checking whether we are cross compiling... " >&6; }
19830 if test "$cross_compiling" != yes; then
19831 { { ac_try="$ac_link"
19832 case "(($ac_try" in
19833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19834 *) ac_try_echo=$ac_try;;
19835 esac
19836 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19837 $as_echo "$ac_try_echo"; } >&5
19838 (eval "$ac_link") 2>&5
19839 ac_status=$?
19840 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19841 test $ac_status = 0; }
19842 if { ac_try='./conftest$ac_cv_exeext'
19843 { { case "(($ac_try" in
19844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19845 *) ac_try_echo=$ac_try;;
19846 esac
19847 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19848 $as_echo "$ac_try_echo"; } >&5
19849 (eval "$ac_try") 2>&5
19850 ac_status=$?
19851 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19852 test $ac_status = 0; }; }; then
19853 cross_compiling=no
19854 else
19855 if test "$cross_compiling" = maybe; then
19856 cross_compiling=yes
19857 else
19858 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19859 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19860 as_fn_error $? "cannot run C compiled programs.
19861 If you meant to cross compile, use \`--host'.
19862 See \`config.log' for more details" "$LINENO" 5; }
19863 fi
19864 fi
19865 fi
19866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
19867 $as_echo "$cross_compiling" >&6; }
19868
19869 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
19870 ac_clean_files=$ac_clean_files_save
19871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
19872 $as_echo_n "checking for suffix of object files... " >&6; }
19873 if ${ac_cv_objext+:} false; then :
19874 $as_echo_n "(cached) " >&6
19875 else
19876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19877 /* end confdefs.h. */
19878
19879 int
19880 main ()
19881 {
19882
19883 ;
19884 return 0;
19885 }
19886 _ACEOF
19887 rm -f conftest.o conftest.obj
19888 if { { ac_try="$ac_compile"
19889 case "(($ac_try" in
19890 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19891 *) ac_try_echo=$ac_try;;
19892 esac
19893 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19894 $as_echo "$ac_try_echo"; } >&5
19895 (eval "$ac_compile") 2>&5
19896 ac_status=$?
19897 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19898 test $ac_status = 0; }; then :
19899 for ac_file in conftest.o conftest.obj conftest.*; do
19900 test -f "$ac_file" || continue;
19901 case $ac_file in
19902 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
19903 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
19904 break;;
19905 esac
19906 done
19907 else
19908 $as_echo "$as_me: failed program was:" >&5
19909 sed 's/^/| /' conftest.$ac_ext >&5
19910
19911 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19912 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19913 as_fn_error $? "cannot compute suffix of object files: cannot compile
19914 See \`config.log' for more details" "$LINENO" 5; }
19915 fi
19916 rm -f conftest.$ac_cv_objext conftest.$ac_ext
19917 fi
19918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
19919 $as_echo "$ac_cv_objext" >&6; }
19920 OBJEXT=$ac_cv_objext
19921 ac_objext=$OBJEXT
19922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
19923 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
19924 if ${ac_cv_c_compiler_gnu+:} false; then :
19925 $as_echo_n "(cached) " >&6
19926 else
19927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19928 /* end confdefs.h. */
19929
19930 int
19931 main ()
19932 {
19933 #ifndef __GNUC__
19934 choke me
19935 #endif
19936
19937 ;
19938 return 0;
19939 }
19940 _ACEOF
19941 if ac_fn_c_try_compile "$LINENO"; then :
19942 ac_compiler_gnu=yes
19943 else
19944 ac_compiler_gnu=no
19945 fi
19946 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19947 ac_cv_c_compiler_gnu=$ac_compiler_gnu
19948
19949 fi
19950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
19951 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
19952 if test $ac_compiler_gnu = yes; then
19953 GCC=yes
19954 else
19955 GCC=
19956 fi
19957 ac_test_CFLAGS=${CFLAGS+set}
19958 ac_save_CFLAGS=$CFLAGS
19959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
19960 $as_echo_n "checking whether $CC accepts -g... " >&6; }
19961 if ${ac_cv_prog_cc_g+:} false; then :
19962 $as_echo_n "(cached) " >&6
19963 else
19964 ac_save_c_werror_flag=$ac_c_werror_flag
19965 ac_c_werror_flag=yes
19966 ac_cv_prog_cc_g=no
19967 CFLAGS="-g"
19968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19969 /* end confdefs.h. */
19970
19971 int
19972 main ()
19973 {
19974
19975 ;
19976 return 0;
19977 }
19978 _ACEOF
19979 if ac_fn_c_try_compile "$LINENO"; then :
19980 ac_cv_prog_cc_g=yes
19981 else
19982 CFLAGS=""
19983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19984 /* end confdefs.h. */
19985
19986 int
19987 main ()
19988 {
19989
19990 ;
19991 return 0;
19992 }
19993 _ACEOF
19994 if ac_fn_c_try_compile "$LINENO"; then :
19995
19996 else
19997 ac_c_werror_flag=$ac_save_c_werror_flag
19998 CFLAGS="-g"
19999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20000 /* end confdefs.h. */
20001
20002 int
20003 main ()
20004 {
20005
20006 ;
20007 return 0;
20008 }
20009 _ACEOF
20010 if ac_fn_c_try_compile "$LINENO"; then :
20011 ac_cv_prog_cc_g=yes
20012 fi
20013 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20014 fi
20015 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20016 fi
20017 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20018 ac_c_werror_flag=$ac_save_c_werror_flag
20019 fi
20020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20021 $as_echo "$ac_cv_prog_cc_g" >&6; }
20022 if test "$ac_test_CFLAGS" = set; then
20023 CFLAGS=$ac_save_CFLAGS
20024 elif test $ac_cv_prog_cc_g = yes; then
20025 if test "$GCC" = yes; then
20026 CFLAGS="-g -O2"
20027 else
20028 CFLAGS="-g"
20029 fi
20030 else
20031 if test "$GCC" = yes; then
20032 CFLAGS="-O2"
20033 else
20034 CFLAGS=
20035 fi
20036 fi
20037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20038 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20039 if ${ac_cv_prog_cc_c89+:} false; then :
20040 $as_echo_n "(cached) " >&6
20041 else
20042 ac_cv_prog_cc_c89=no
20043 ac_save_CC=$CC
20044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20045 /* end confdefs.h. */
20046 #include <stdarg.h>
20047 #include <stdio.h>
20048 #include <sys/types.h>
20049 #include <sys/stat.h>
20050 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
20051 struct buf { int x; };
20052 FILE * (*rcsopen) (struct buf *, struct stat *, int);
20053 static char *e (p, i)
20054 char **p;
20055 int i;
20056 {
20057 return p[i];
20058 }
20059 static char *f (char * (*g) (char **, int), char **p, ...)
20060 {
20061 char *s;
20062 va_list v;
20063 va_start (v,p);
20064 s = g (p, va_arg (v,int));
20065 va_end (v);
20066 return s;
20067 }
20068
20069 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
20070 function prototypes and stuff, but not '\xHH' hex character constants.
20071 These don't provoke an error unfortunately, instead are silently treated
20072 as 'x'. The following induces an error, until -std is added to get
20073 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
20074 array size at least. It's necessary to write '\x00'==0 to get something
20075 that's true only with -std. */
20076 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20077
20078 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20079 inside strings and character constants. */
20080 #define FOO(x) 'x'
20081 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20082
20083 int test (int i, double x);
20084 struct s1 {int (*f) (int a);};
20085 struct s2 {int (*f) (double a);};
20086 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20087 int argc;
20088 char **argv;
20089 int
20090 main ()
20091 {
20092 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
20093 ;
20094 return 0;
20095 }
20096 _ACEOF
20097 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20098 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20099 do
20100 CC="$ac_save_CC $ac_arg"
20101 if ac_fn_c_try_compile "$LINENO"; then :
20102 ac_cv_prog_cc_c89=$ac_arg
20103 fi
20104 rm -f core conftest.err conftest.$ac_objext
20105 test "x$ac_cv_prog_cc_c89" != "xno" && break
20106 done
20107 rm -f conftest.$ac_ext
20108 CC=$ac_save_CC
20109
20110 fi
20111 # AC_CACHE_VAL
20112 case "x$ac_cv_prog_cc_c89" in
20113 x)
20114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20115 $as_echo "none needed" >&6; } ;;
20116 xno)
20117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20118 $as_echo "unsupported" >&6; } ;;
20119 *)
20120 CC="$CC $ac_cv_prog_cc_c89"
20121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20122 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20123 esac
20124 if test "x$ac_cv_prog_cc_c89" != xno; then :
20125
20126 fi
20127
20128 ac_ext=cpp
20129 ac_cpp='$CXXCPP $CPPFLAGS'
20130 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20131 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20132 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20133
20134
20135 ### Locate C++ compiler (CXX)
20136
20137 if test "x$CXX" != x; then
20138 COMPILER_CHECK_LIST="$CXX"
20139 elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20140 COMPILER_CHECK_LIST="cl"
20141 elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20142 COMPILER_CHECK_LIST="CC g++"
20143 else
20144 COMPILER_CHECK_LIST="g++ CC"
20145 fi
20146
20147
20148 COMPILER_NAME=C++
20149
20150 CXX=
20151 # If TOOLS_DIR is set, check for all compiler names in there first
20152 # before checking the rest of the PATH.
20153 if test -n "$TOOLS_DIR"; then
20154 PATH_save="$PATH"
20155 PATH="$TOOLS_DIR"
20156 for ac_prog in $COMPILER_CHECK_LIST
20157 do
20158 # Extract the first word of "$ac_prog", so it can be a program name with args.
20159 set dummy $ac_prog; ac_word=$2
20160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20161 $as_echo_n "checking for $ac_word... " >&6; }
20162 if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
20163 $as_echo_n "(cached) " >&6
20164 else
20165 case $TOOLS_DIR_CXX in
20166 [\\/]* | ?:[\\/]*)
20167 ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20168 ;;
20169 *)
20170 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20171 for as_dir in $PATH
20172 do
20173 IFS=$as_save_IFS
20174 test -z "$as_dir" && as_dir=.
20175 for ac_exec_ext in '' $ac_executable_extensions; do
20176 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20177 ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20178 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20179 break 2
20180 fi
20181 done
20182 done
20183 IFS=$as_save_IFS
20184
20185 ;;
20186 esac
20187 fi
20188 TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20189 if test -n "$TOOLS_DIR_CXX"; then
20190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20191 $as_echo "$TOOLS_DIR_CXX" >&6; }
20192 else
20193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20194 $as_echo "no" >&6; }
20195 fi
20196
20197
20198 test -n "$TOOLS_DIR_CXX" && break
20199 done
20200
20201 CXX=$TOOLS_DIR_CXX
20202 PATH="$PATH_save"
20203 fi
20204
20205 # AC_PATH_PROGS can't be run multiple times with the same variable,
20206 # so create a new name for this run.
20207 if test "x$CXX" = x; then
20208 for ac_prog in $COMPILER_CHECK_LIST
20209 do
20210 # Extract the first word of "$ac_prog", so it can be a program name with args.
20211 set dummy $ac_prog; ac_word=$2
20212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20213 $as_echo_n "checking for $ac_word... " >&6; }
20214 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
20215 $as_echo_n "(cached) " >&6
20216 else
20217 case $POTENTIAL_CXX in
20218 [\\/]* | ?:[\\/]*)
20219 ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20220 ;;
20221 *)
20222 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20223 for as_dir in $PATH
20224 do
20225 IFS=$as_save_IFS
20226 test -z "$as_dir" && as_dir=.
20227 for ac_exec_ext in '' $ac_executable_extensions; do
20228 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20229 ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20230 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20231 break 2
20232 fi
20233 done
20234 done
20235 IFS=$as_save_IFS
20236
20237 ;;
20238 esac
20239 fi
20240 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20241 if test -n "$POTENTIAL_CXX"; then
20242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20243 $as_echo "$POTENTIAL_CXX" >&6; }
20244 else
20245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20246 $as_echo "no" >&6; }
20247 fi
20248
20249
20250 test -n "$POTENTIAL_CXX" && break
20251 done
20252
20253 CXX=$POTENTIAL_CXX
20254 fi
20255
20256 if test "x$CXX" = x; then
20257
20258 # Print a helpful message on how to acquire the necessary build dependency.
20259 # devkit is the help tag: freetyp2, cups, pulse, alsa etc
20260 MISSING_DEPENDENCY=devkit
20261 PKGHANDLER_COMMAND=
20262
20263 case $PKGHANDLER in
20264 apt-get)
20265 apt_help $MISSING_DEPENDENCY ;;
20266 yum)
20267 yum_help $MISSING_DEPENDENCY ;;
20268 port)
20269 port_help $MISSING_DEPENDENCY ;;
20270 pkgutil)
20271 pkgutil_help $MISSING_DEPENDENCY ;;
20272 pkgadd)
20273 pkgadd_help $MISSING_DEPENDENCY ;;
20274 * )
20275 break ;;
20276 esac
20277
20278 if test "x$PKGHANDLER_COMMAND" != x; then
20279 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20280 fi
20281
20282 as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20283 fi
20284
20285 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20286
20287 # First separate the path from the arguments. This will split at the first
20288 # space.
20289 complete="$CXX"
20290 path="${complete%% *}"
20291 tmp="$complete EOL"
20292 arguments="${tmp#* }"
20293
20294 # Input might be given as Windows format, start by converting to
20295 # unix format.
20296 new_path=`$CYGPATH -u "$path"`
20297
20298 # Now try to locate executable using which
20299 new_path=`$WHICH "$new_path" 2> /dev/null`
20300 # bat and cmd files are not always considered executable in cygwin causing which
20301 # to not find them
20302 if test "x$new_path" = x \
20303 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20304 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20305 new_path=`$CYGPATH -u "$path"`
20306 fi
20307 if test "x$new_path" = x; then
20308 # Oops. Which didn't find the executable.
20309 # The splitting of arguments from the executable at a space might have been incorrect,
20310 # since paths with space are more likely in Windows. Give it another try with the whole
20311 # argument.
20312 path="$complete"
20313 arguments="EOL"
20314 new_path=`$CYGPATH -u "$path"`
20315 new_path=`$WHICH "$new_path" 2> /dev/null`
20316 # bat and cmd files are not always considered executable in cygwin causing which
20317 # to not find them
20318 if test "x$new_path" = x \
20319 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20320 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20321 new_path=`$CYGPATH -u "$path"`
20322 fi
20323 if test "x$new_path" = x; then
20324 # It's still not found. Now this is an unrecoverable error.
20325 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20326 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20327 has_space=`$ECHO "$complete" | $GREP " "`
20328 if test "x$has_space" != x; then
20329 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20330 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20331 fi
20332 as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20333 fi
20334 fi
20335
20336 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20337 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20338 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20339 # "foo.exe" is OK but "foo" is an error.
20340 #
20341 # This test is therefore slightly more accurate than "test -f" to check for file precense.
20342 # It is also a way to make sure we got the proper file name for the real test later on.
20343 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20344 if test "x$test_shortpath" = x; then
20345 # Short path failed, file does not exist as specified.
20346 # Try adding .exe or .cmd
20347 if test -f "${new_path}.exe"; then
20348 input_to_shortpath="${new_path}.exe"
20349 elif test -f "${new_path}.cmd"; then
20350 input_to_shortpath="${new_path}.cmd"
20351 else
20352 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
20353 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
20354 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20355 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20356 as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20357 fi
20358 else
20359 input_to_shortpath="$new_path"
20360 fi
20361
20362 # Call helper function which possibly converts this using DOS-style short mode.
20363 # If so, the updated path is stored in $new_path.
20364 new_path="$input_to_shortpath"
20365
20366 input_path="$input_to_shortpath"
20367 # Check if we need to convert this using DOS-style short mode. If the path
20368 # contains just simple characters, use it. Otherwise (spaces, weird characters),
20369 # take no chances and rewrite it.
20370 # Note: m4 eats our [], so we need to use [ and ] instead.
20371 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20372 if test "x$has_forbidden_chars" != x; then
20373 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20374 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20375 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20376 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20377 # Going to short mode and back again did indeed matter. Since short mode is
20378 # case insensitive, let's make it lowercase to improve readability.
20379 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20380 # Now convert it back to Unix-stile (cygpath)
20381 input_path=`$CYGPATH -u "$shortmode_path"`
20382 new_path="$input_path"
20383 fi
20384 fi
20385
20386 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20387 if test "x$test_cygdrive_prefix" = x; then
20388 # As a simple fix, exclude /usr/bin since it's not a real path.
20389 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20390 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20391 # a path prefixed by /cygdrive for fixpath to work.
20392 new_path="$CYGWIN_ROOT_PATH$input_path"
20393 fi
20394 fi
20395
20396 # remove trailing .exe if any
20397 new_path="${new_path/%.exe/}"
20398
20399 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20400
20401 # First separate the path from the arguments. This will split at the first
20402 # space.
20403 complete="$CXX"
20404 path="${complete%% *}"
20405 tmp="$complete EOL"
20406 arguments="${tmp#* }"
20407
20408 # Input might be given as Windows format, start by converting to
20409 # unix format.
20410 new_path="$path"
20411
20412 windows_path="$new_path"
20413 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20414 unix_path=`$CYGPATH -u "$windows_path"`
20415 new_path="$unix_path"
20416 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20417 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20418 new_path="$unix_path"
20419 fi
20420
20421
20422 # Now try to locate executable using which
20423 new_path=`$WHICH "$new_path" 2> /dev/null`
20424
20425 if test "x$new_path" = x; then
20426 # Oops. Which didn't find the executable.
20427 # The splitting of arguments from the executable at a space might have been incorrect,
20428 # since paths with space are more likely in Windows. Give it another try with the whole
20429 # argument.
20430 path="$complete"
20431 arguments="EOL"
20432 new_path="$path"
20433
20434 windows_path="$new_path"
20435 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20436 unix_path=`$CYGPATH -u "$windows_path"`
20437 new_path="$unix_path"
20438 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20439 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20440 new_path="$unix_path"
20441 fi
20442
20443
20444 new_path=`$WHICH "$new_path" 2> /dev/null`
20445
20446 if test "x$new_path" = x; then
20447 # It's still not found. Now this is an unrecoverable error.
20448 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20449 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20450 has_space=`$ECHO "$complete" | $GREP " "`
20451 if test "x$has_space" != x; then
20452 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20453 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20454 fi
20455 as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20456 fi
20457 fi
20458
20459 # Now new_path has a complete unix path to the binary
20460 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20461 # Keep paths in /bin as-is, but remove trailing .exe if any
20462 new_path="${new_path/%.exe/}"
20463 # Do not save /bin paths to all_fixpath_prefixes!
20464 else
20465 # Not in mixed or Windows style, start by that.
20466 new_path=`cmd //c echo $new_path`
20467
20468 input_path="$new_path"
20469 # Check if we need to convert this using DOS-style short mode. If the path
20470 # contains just simple characters, use it. Otherwise (spaces, weird characters),
20471 # take no chances and rewrite it.
20472 # Note: m4 eats our [], so we need to use [ and ] instead.
20473 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20474 if test "x$has_forbidden_chars" != x; then
20475 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20476 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20477 fi
20478
20479 # Output is in $new_path
20480
20481 windows_path="$new_path"
20482 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20483 unix_path=`$CYGPATH -u "$windows_path"`
20484 new_path="$unix_path"
20485 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20486 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20487 new_path="$unix_path"
20488 fi
20489
20490 # remove trailing .exe if any
20491 new_path="${new_path/%.exe/}"
20492
20493 # Save the first 10 bytes of this path to the storage, so fixpath can work.
20494 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20495 fi
20496
20497 else
20498 # We're on a posix platform. Hooray! :)
20499 # First separate the path from the arguments. This will split at the first
20500 # space.
20501 complete="$CXX"
20502 path="${complete%% *}"
20503 tmp="$complete EOL"
20504 arguments="${tmp#* }"
20505
20506 # Cannot rely on the command "which" here since it doesn't always work.
20507 is_absolute_path=`$ECHO "$path" | $GREP ^/`
20508 if test -z "$is_absolute_path"; then
20509 # Path to executable is not absolute. Find it.
20510 IFS_save="$IFS"
20511 IFS=:
20512 for p in $PATH; do
20513 if test -f "$p/$path" && test -x "$p/$path"; then
20514 new_path="$p/$path"
20515 break
20516 fi
20517 done
20518 IFS="$IFS_save"
20519 else
20520 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
20521 $as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
20522 new_path="$path"
20523 fi
20524
20525 if test "x$new_path" = x; then
20526 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20527 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20528 has_space=`$ECHO "$complete" | $GREP " "`
20529 if test "x$has_space" != x; then
20530 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20531 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20532 fi
20533 as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20534 fi
20535 fi
20536
20537 # Now join together the path and the arguments once again
20538 if test "x$arguments" != xEOL; then
20539 new_complete="$new_path ${arguments% *}"
20540 else
20541 new_complete="$new_path"
20542 fi
20543
20544 if test "x$complete" != "x$new_complete"; then
20545 CXX="$new_complete"
20546 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
20547 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
20548 fi
20549
20550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
20551 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
20552 TEST_COMPILER="$CXX"
20553
20554 if test "x$OPENJDK_BUILD_OS" != xwindows; then
20555 # Follow a chain of symbolic links. Use readlink
20556 # where it exists, else fall back to horribly
20557 # complicated shell code.
20558 if test "x$READLINK_TESTED" != yes; then
20559 # On MacOSX there is a readlink tool with a different
20560 # purpose than the GNU readlink tool. Check the found readlink.
20561 ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20562 if test "x$ISGNU" = x; then
20563 # A readlink that we do not know how to use.
20564 # Are there other non-GNU readlinks out there?
20565 READLINK_TESTED=yes
20566 READLINK=
20567 fi
20568 fi
20569
20570 if test "x$READLINK" != x; then
20571 TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
20572 else
20573 # Save the current directory for restoring afterwards
20574 STARTDIR=$PWD
20575 COUNTER=0
20576 sym_link_dir=`$DIRNAME $TEST_COMPILER`
20577 sym_link_file=`$BASENAME $TEST_COMPILER`
20578 # Use the system pwd and not the shell builtin to resolve directory symlinks
20579 cd $sym_link_dir
20580 cd `$THEPWDCMD`
20581 sym_link_dir=`$THEPWDCMD`
20582 # Resolve file symlinks
20583 while test $COUNTER -lt 20; do
20584 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20585 if test "x$ISLINK" == x; then
20586 # This is not a symbolic link! We are done!
20587 break
20588 fi
20589 # Again resolve directory symlinks since the target of the just found
20590 # link could be in a different directory
20591 cd `$DIRNAME $ISLINK`
20592 sym_link_dir=`$THEPWDCMD`
20593 sym_link_file=`$BASENAME $ISLINK`
20594 let COUNTER=COUNTER+1
20595 done
20596 cd $STARTDIR
20597 TEST_COMPILER=$sym_link_dir/$sym_link_file
20598 fi
20599 fi
20600
20601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
20602 $as_echo "$TEST_COMPILER" >&6; }
20603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
20604 $as_echo_n "checking if CXX is disguised ccache... " >&6; }
20605
20606 COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
20607 if test "x$COMPILER_BASENAME" = "xccache"; then
20608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
20609 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
20610 # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
20611 # We want to control ccache invocation ourselves, so ignore this cc and try
20612 # searching again.
20613
20614 # Remove the path to the fake ccache cc from the PATH
20615 RETRY_COMPILER_SAVED_PATH="$PATH"
20616 COMPILER_DIRNAME=`$DIRNAME $CXX`
20617 PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
20618
20619 # Try again looking for our compiler
20620 if test -n "$ac_tool_prefix"; then
20621 for ac_prog in $COMPILER_CHECK_LIST
20622 do
20623 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20624 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20626 $as_echo_n "checking for $ac_word... " >&6; }
20627 if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
20628 $as_echo_n "(cached) " >&6
20629 else
20630 if test -n "$PROPER_COMPILER_CXX"; then
20631 ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
20632 else
20633 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20634 for as_dir in $PATH
20635 do
20636 IFS=$as_save_IFS
20637 test -z "$as_dir" && as_dir=.
20638 for ac_exec_ext in '' $ac_executable_extensions; do
20639 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20640 ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
20641 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20642 break 2
20643 fi
20644 done
20645 done
20646 IFS=$as_save_IFS
20647
20648 fi
20649 fi
20650 PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
20651 if test -n "$PROPER_COMPILER_CXX"; then
20652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20653 $as_echo "$PROPER_COMPILER_CXX" >&6; }
20654 else
20655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20656 $as_echo "no" >&6; }
20657 fi
20658
20659
20660 test -n "$PROPER_COMPILER_CXX" && break
20661 done
20662 fi
20663 if test -z "$PROPER_COMPILER_CXX"; then
20664 ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
20665 for ac_prog in $COMPILER_CHECK_LIST
20666 do
20667 # Extract the first word of "$ac_prog", so it can be a program name with args.
20668 set dummy $ac_prog; ac_word=$2
20669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20670 $as_echo_n "checking for $ac_word... " >&6; }
20671 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
20672 $as_echo_n "(cached) " >&6
20673 else
20674 if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20675 ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
20676 else
20677 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20678 for as_dir in $PATH
20679 do
20680 IFS=$as_save_IFS
20681 test -z "$as_dir" && as_dir=.
20682 for ac_exec_ext in '' $ac_executable_extensions; do
20683 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20684 ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
20685 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20686 break 2
20687 fi
20688 done
20689 done
20690 IFS=$as_save_IFS
20691
20692 fi
20693 fi
20694 ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
20695 if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
20697 $as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
20698 else
20699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20700 $as_echo "no" >&6; }
20701 fi
20702
20703
20704 test -n "$ac_ct_PROPER_COMPILER_CXX" && break
20705 done
20706
20707 if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
20708 PROPER_COMPILER_CXX=""
20709 else
20710 case $cross_compiling:$ac_tool_warned in
20711 yes:)
20712 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20713 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20714 ac_tool_warned=yes ;;
20715 esac
20716 PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
20717 fi
20718 fi
20719
20720
20721 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20722
20723 # First separate the path from the arguments. This will split at the first
20724 # space.
20725 complete="$PROPER_COMPILER_CXX"
20726 path="${complete%% *}"
20727 tmp="$complete EOL"
20728 arguments="${tmp#* }"
20729
20730 # Input might be given as Windows format, start by converting to
20731 # unix format.
20732 new_path=`$CYGPATH -u "$path"`
20733
20734 # Now try to locate executable using which
20735 new_path=`$WHICH "$new_path" 2> /dev/null`
20736 # bat and cmd files are not always considered executable in cygwin causing which
20737 # to not find them
20738 if test "x$new_path" = x \
20739 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20740 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20741 new_path=`$CYGPATH -u "$path"`
20742 fi
20743 if test "x$new_path" = x; then
20744 # Oops. Which didn't find the executable.
20745 # The splitting of arguments from the executable at a space might have been incorrect,
20746 # since paths with space are more likely in Windows. Give it another try with the whole
20747 # argument.
20748 path="$complete"
20749 arguments="EOL"
20750 new_path=`$CYGPATH -u "$path"`
20751 new_path=`$WHICH "$new_path" 2> /dev/null`
20752 # bat and cmd files are not always considered executable in cygwin causing which
20753 # to not find them
20754 if test "x$new_path" = x \
20755 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20756 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20757 new_path=`$CYGPATH -u "$path"`
20758 fi
20759 if test "x$new_path" = x; then
20760 # It's still not found. Now this is an unrecoverable error.
20761 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20762 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20763 has_space=`$ECHO "$complete" | $GREP " "`
20764 if test "x$has_space" != x; then
20765 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20766 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20767 fi
20768 as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20769 fi
20770 fi
20771
20772 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20773 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20774 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20775 # "foo.exe" is OK but "foo" is an error.
20776 #
20777 # This test is therefore slightly more accurate than "test -f" to check for file precense.
20778 # It is also a way to make sure we got the proper file name for the real test later on.
20779 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20780 if test "x$test_shortpath" = x; then
20781 # Short path failed, file does not exist as specified.
20782 # Try adding .exe or .cmd
20783 if test -f "${new_path}.exe"; then
20784 input_to_shortpath="${new_path}.exe"
20785 elif test -f "${new_path}.cmd"; then
20786 input_to_shortpath="${new_path}.cmd"
20787 else
20788 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
20789 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
20790 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20791 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20792 as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20793 fi
20794 else
20795 input_to_shortpath="$new_path"
20796 fi
20797
20798 # Call helper function which possibly converts this using DOS-style short mode.
20799 # If so, the updated path is stored in $new_path.
20800 new_path="$input_to_shortpath"
20801
20802 input_path="$input_to_shortpath"
20803 # Check if we need to convert this using DOS-style short mode. If the path
20804 # contains just simple characters, use it. Otherwise (spaces, weird characters),
20805 # take no chances and rewrite it.
20806 # Note: m4 eats our [], so we need to use [ and ] instead.
20807 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20808 if test "x$has_forbidden_chars" != x; then
20809 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20810 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20811 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20812 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20813 # Going to short mode and back again did indeed matter. Since short mode is
20814 # case insensitive, let's make it lowercase to improve readability.
20815 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20816 # Now convert it back to Unix-stile (cygpath)
20817 input_path=`$CYGPATH -u "$shortmode_path"`
20818 new_path="$input_path"
20819 fi
20820 fi
20821
20822 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20823 if test "x$test_cygdrive_prefix" = x; then
20824 # As a simple fix, exclude /usr/bin since it's not a real path.
20825 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20826 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20827 # a path prefixed by /cygdrive for fixpath to work.
20828 new_path="$CYGWIN_ROOT_PATH$input_path"
20829 fi
20830 fi
20831
20832 # remove trailing .exe if any
20833 new_path="${new_path/%.exe/}"
20834
20835 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20836
20837 # First separate the path from the arguments. This will split at the first
20838 # space.
20839 complete="$PROPER_COMPILER_CXX"
20840 path="${complete%% *}"
20841 tmp="$complete EOL"
20842 arguments="${tmp#* }"
20843
20844 # Input might be given as Windows format, start by converting to
20845 # unix format.
20846 new_path="$path"
20847
20848 windows_path="$new_path"
20849 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20850 unix_path=`$CYGPATH -u "$windows_path"`
20851 new_path="$unix_path"
20852 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20853 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20854 new_path="$unix_path"
20855 fi
20856
20857
20858 # Now try to locate executable using which
20859 new_path=`$WHICH "$new_path" 2> /dev/null`
20860
20861 if test "x$new_path" = x; then
20862 # Oops. Which didn't find the executable.
20863 # The splitting of arguments from the executable at a space might have been incorrect,
20864 # since paths with space are more likely in Windows. Give it another try with the whole
20865 # argument.
20866 path="$complete"
20867 arguments="EOL"
20868 new_path="$path"
20869
20870 windows_path="$new_path"
20871 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20872 unix_path=`$CYGPATH -u "$windows_path"`
20873 new_path="$unix_path"
20874 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20875 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20876 new_path="$unix_path"
20877 fi
20878
20879
20880 new_path=`$WHICH "$new_path" 2> /dev/null`
20881
20882 if test "x$new_path" = x; then
20883 # It's still not found. Now this is an unrecoverable error.
20884 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20885 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20886 has_space=`$ECHO "$complete" | $GREP " "`
20887 if test "x$has_space" != x; then
20888 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20889 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20890 fi
20891 as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20892 fi
20893 fi
20894
20895 # Now new_path has a complete unix path to the binary
20896 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20897 # Keep paths in /bin as-is, but remove trailing .exe if any
20898 new_path="${new_path/%.exe/}"
20899 # Do not save /bin paths to all_fixpath_prefixes!
20900 else
20901 # Not in mixed or Windows style, start by that.
20902 new_path=`cmd //c echo $new_path`
20903
20904 input_path="$new_path"
20905 # Check if we need to convert this using DOS-style short mode. If the path
20906 # contains just simple characters, use it. Otherwise (spaces, weird characters),
20907 # take no chances and rewrite it.
20908 # Note: m4 eats our [], so we need to use [ and ] instead.
20909 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20910 if test "x$has_forbidden_chars" != x; then
20911 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20912 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20913 fi
20914
20915 # Output is in $new_path
20916
20917 windows_path="$new_path"
20918 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20919 unix_path=`$CYGPATH -u "$windows_path"`
20920 new_path="$unix_path"
20921 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20922 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20923 new_path="$unix_path"
20924 fi
20925
20926 # remove trailing .exe if any
20927 new_path="${new_path/%.exe/}"
20928
20929 # Save the first 10 bytes of this path to the storage, so fixpath can work.
20930 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20931 fi
20932
20933 else
20934 # We're on a posix platform. Hooray! :)
20935 # First separate the path from the arguments. This will split at the first
20936 # space.
20937 complete="$PROPER_COMPILER_CXX"
20938 path="${complete%% *}"
20939 tmp="$complete EOL"
20940 arguments="${tmp#* }"
20941
20942 # Cannot rely on the command "which" here since it doesn't always work.
20943 is_absolute_path=`$ECHO "$path" | $GREP ^/`
20944 if test -z "$is_absolute_path"; then
20945 # Path to executable is not absolute. Find it.
20946 IFS_save="$IFS"
20947 IFS=:
20948 for p in $PATH; do
20949 if test -f "$p/$path" && test -x "$p/$path"; then
20950 new_path="$p/$path"
20951 break
20952 fi
20953 done
20954 IFS="$IFS_save"
20955 else
20956 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
20957 $as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
20958 new_path="$path"
20959 fi
20960
20961 if test "x$new_path" = x; then
20962 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20963 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20964 has_space=`$ECHO "$complete" | $GREP " "`
20965 if test "x$has_space" != x; then
20966 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20967 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20968 fi
20969 as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20970 fi
20971 fi
20972
20973 # Now join together the path and the arguments once again
20974 if test "x$arguments" != xEOL; then
20975 new_complete="$new_path ${arguments% *}"
20976 else
20977 new_complete="$new_path"
20978 fi
20979
20980 if test "x$complete" != "x$new_complete"; then
20981 PROPER_COMPILER_CXX="$new_complete"
20982 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
20983 $as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
20984 fi
20985
20986 PATH="$RETRY_COMPILER_SAVED_PATH"
20987
20988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
20989 $as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
20990
20991 if test "x$OPENJDK_BUILD_OS" != xwindows; then
20992 # Follow a chain of symbolic links. Use readlink
20993 # where it exists, else fall back to horribly
20994 # complicated shell code.
20995 if test "x$READLINK_TESTED" != yes; then
20996 # On MacOSX there is a readlink tool with a different
20997 # purpose than the GNU readlink tool. Check the found readlink.
20998 ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20999 if test "x$ISGNU" = x; then
21000 # A readlink that we do not know how to use.
21001 # Are there other non-GNU readlinks out there?
21002 READLINK_TESTED=yes
21003 READLINK=
21004 fi
21005 fi
21006
21007 if test "x$READLINK" != x; then
21008 PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21009 else
21010 # Save the current directory for restoring afterwards
21011 STARTDIR=$PWD
21012 COUNTER=0
21013 sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21014 sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21015 # Use the system pwd and not the shell builtin to resolve directory symlinks
21016 cd $sym_link_dir
21017 cd `$THEPWDCMD`
21018 sym_link_dir=`$THEPWDCMD`
21019 # Resolve file symlinks
21020 while test $COUNTER -lt 20; do
21021 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21022 if test "x$ISLINK" == x; then
21023 # This is not a symbolic link! We are done!
21024 break
21025 fi
21026 # Again resolve directory symlinks since the target of the just found
21027 # link could be in a different directory
21028 cd `$DIRNAME $ISLINK`
21029 sym_link_dir=`$THEPWDCMD`
21030 sym_link_file=`$BASENAME $ISLINK`
21031 let COUNTER=COUNTER+1
21032 done
21033 cd $STARTDIR
21034 PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21035 fi
21036 fi
21037
21038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21039 $as_echo "$PROPER_COMPILER_CXX" >&6; }
21040 CXX="$PROPER_COMPILER_CXX"
21041 else
21042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21043 $as_echo "no, keeping CXX" >&6; }
21044 CXX="$TEST_COMPILER"
21045 fi
21046
21047 COMPILER=$CXX
21048 COMPILER_NAME=$COMPILER_NAME
21049
21050 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21051 # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21052 COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21053 $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21054 if test $? -ne 0; then
21055 GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21056
21057 { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&5
21058 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21059 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21060 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21061 as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21062 else
21063 COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21064 COMPILER_VENDOR="Sun Studio"
21065 fi
21066 elif test "x$OPENJDK_TARGET_OS" = xwindows; then
21067 # First line typically looks something like:
21068 # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
21069 COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
21070 COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21071 COMPILER_VENDOR="Microsoft CL.EXE"
21072 COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21073 if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21074 if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21075 as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21076 fi
21077 elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21078 if test "x$COMPILER_CPU_TEST" != "xx64"; then
21079 as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21080 fi
21081 fi
21082 else
21083 COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21084 # Check that this is likely to be GCC.
21085 $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21086 if test $? -ne 0; then
21087 { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21088 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21089 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21090 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21091 as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21092 fi
21093
21094 # First line typically looks something like:
21095 # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21096 COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21097 COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21098 fi
21099 # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21100 CXX_VERSION="$COMPILER_VERSION"
21101 # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21102 CXX_VENDOR="$COMPILER_VENDOR"
21103
21104 { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21105 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21106
21107
21108 # Now that we have resolved CXX ourself, let autoconf have its go at it
21109 ac_ext=cpp
21110 ac_cpp='$CXXCPP $CPPFLAGS'
21111 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21112 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21113 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21114 if test -z "$CXX"; then
21115 if test -n "$CCC"; then
21116 CXX=$CCC
21117 else
21118 if test -n "$ac_tool_prefix"; then
21119 for ac_prog in $CXX
21120 do
21121 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21122 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21124 $as_echo_n "checking for $ac_word... " >&6; }
21125 if ${ac_cv_prog_CXX+:} false; then :
21126 $as_echo_n "(cached) " >&6
21127 else
21128 if test -n "$CXX"; then
21129 ac_cv_prog_CXX="$CXX" # Let the user override the test.
21130 else
21131 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21132 for as_dir in $PATH
21133 do
21134 IFS=$as_save_IFS
21135 test -z "$as_dir" && as_dir=.
21136 for ac_exec_ext in '' $ac_executable_extensions; do
21137 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21138 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21139 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21140 break 2
21141 fi
21142 done
21143 done
21144 IFS=$as_save_IFS
21145
21146 fi
21147 fi
21148 CXX=$ac_cv_prog_CXX
21149 if test -n "$CXX"; then
21150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21151 $as_echo "$CXX" >&6; }
21152 else
21153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21154 $as_echo "no" >&6; }
21155 fi
21156
21157
21158 test -n "$CXX" && break
21159 done
21160 fi
21161 if test -z "$CXX"; then
21162 ac_ct_CXX=$CXX
21163 for ac_prog in $CXX
21164 do
21165 # Extract the first word of "$ac_prog", so it can be a program name with args.
21166 set dummy $ac_prog; ac_word=$2
21167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21168 $as_echo_n "checking for $ac_word... " >&6; }
21169 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
21170 $as_echo_n "(cached) " >&6
21171 else
21172 if test -n "$ac_ct_CXX"; then
21173 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21174 else
21175 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21176 for as_dir in $PATH
21177 do
21178 IFS=$as_save_IFS
21179 test -z "$as_dir" && as_dir=.
21180 for ac_exec_ext in '' $ac_executable_extensions; do
21181 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21182 ac_cv_prog_ac_ct_CXX="$ac_prog"
21183 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21184 break 2
21185 fi
21186 done
21187 done
21188 IFS=$as_save_IFS
21189
21190 fi
21191 fi
21192 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21193 if test -n "$ac_ct_CXX"; then
21194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21195 $as_echo "$ac_ct_CXX" >&6; }
21196 else
21197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21198 $as_echo "no" >&6; }
21199 fi
21200
21201
21202 test -n "$ac_ct_CXX" && break
21203 done
21204
21205 if test "x$ac_ct_CXX" = x; then
21206 CXX="g++"
21207 else
21208 case $cross_compiling:$ac_tool_warned in
21209 yes:)
21210 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21211 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21212 ac_tool_warned=yes ;;
21213 esac
21214 CXX=$ac_ct_CXX
21215 fi
21216 fi
21217
21218 fi
21219 fi
21220 # Provide some information about the compiler.
21221 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21222 set X $ac_compile
21223 ac_compiler=$2
21224 for ac_option in --version -v -V -qversion; do
21225 { { ac_try="$ac_compiler $ac_option >&5"
21226 case "(($ac_try" in
21227 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21228 *) ac_try_echo=$ac_try;;
21229 esac
21230 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21231 $as_echo "$ac_try_echo"; } >&5
21232 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21233 ac_status=$?
21234 if test -s conftest.err; then
21235 sed '10a\
21236 ... rest of stderr output deleted ...
21237 10q' conftest.err >conftest.er1
21238 cat conftest.er1 >&5
21239 fi
21240 rm -f conftest.er1 conftest.err
21241 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21242 test $ac_status = 0; }
21243 done
21244
21245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21246 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21247 if ${ac_cv_cxx_compiler_gnu+:} false; then :
21248 $as_echo_n "(cached) " >&6
21249 else
21250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21251 /* end confdefs.h. */
21252
21253 int
21254 main ()
21255 {
21256 #ifndef __GNUC__
21257 choke me
21258 #endif
21259
21260 ;
21261 return 0;
21262 }
21263 _ACEOF
21264 if ac_fn_cxx_try_compile "$LINENO"; then :
21265 ac_compiler_gnu=yes
21266 else
21267 ac_compiler_gnu=no
21268 fi
21269 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21270 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21271
21272 fi
21273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21274 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21275 if test $ac_compiler_gnu = yes; then
21276 GXX=yes
21277 else
21278 GXX=
21279 fi
21280 ac_test_CXXFLAGS=${CXXFLAGS+set}
21281 ac_save_CXXFLAGS=$CXXFLAGS
21282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21283 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
21284 if ${ac_cv_prog_cxx_g+:} false; then :
21285 $as_echo_n "(cached) " >&6
21286 else
21287 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21288 ac_cxx_werror_flag=yes
21289 ac_cv_prog_cxx_g=no
21290 CXXFLAGS="-g"
21291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21292 /* end confdefs.h. */
21293
21294 int
21295 main ()
21296 {
21297
21298 ;
21299 return 0;
21300 }
21301 _ACEOF
21302 if ac_fn_cxx_try_compile "$LINENO"; then :
21303 ac_cv_prog_cxx_g=yes
21304 else
21305 CXXFLAGS=""
21306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21307 /* end confdefs.h. */
21308
21309 int
21310 main ()
21311 {
21312
21313 ;
21314 return 0;
21315 }
21316 _ACEOF
21317 if ac_fn_cxx_try_compile "$LINENO"; then :
21318
21319 else
21320 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21321 CXXFLAGS="-g"
21322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21323 /* end confdefs.h. */
21324
21325 int
21326 main ()
21327 {
21328
21329 ;
21330 return 0;
21331 }
21332 _ACEOF
21333 if ac_fn_cxx_try_compile "$LINENO"; then :
21334 ac_cv_prog_cxx_g=yes
21335 fi
21336 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21337 fi
21338 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21339 fi
21340 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21341 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21342 fi
21343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
21344 $as_echo "$ac_cv_prog_cxx_g" >&6; }
21345 if test "$ac_test_CXXFLAGS" = set; then
21346 CXXFLAGS=$ac_save_CXXFLAGS
21347 elif test $ac_cv_prog_cxx_g = yes; then
21348 if test "$GXX" = yes; then
21349 CXXFLAGS="-g -O2"
21350 else
21351 CXXFLAGS="-g"
21352 fi
21353 else
21354 if test "$GXX" = yes; then
21355 CXXFLAGS="-O2"
21356 else
21357 CXXFLAGS=
21358 fi
21359 fi
21360 ac_ext=cpp
21361 ac_cpp='$CXXCPP $CPPFLAGS'
21362 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21363 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21364 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21365
21366
21367 ### Locate other tools
21368
21369 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21370 ac_ext=m
21371 ac_cpp='$OBJCPP $CPPFLAGS'
21372 ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21373 ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21374 ac_compiler_gnu=$ac_cv_objc_compiler_gnu
21375 if test -n "$ac_tool_prefix"; then
21376 for ac_prog in gcc objcc objc cc CC
21377 do
21378 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21379 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21381 $as_echo_n "checking for $ac_word... " >&6; }
21382 if ${ac_cv_prog_OBJC+:} false; then :
21383 $as_echo_n "(cached) " >&6
21384 else
21385 if test -n "$OBJC"; then
21386 ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
21387 else
21388 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21389 for as_dir in $PATH
21390 do
21391 IFS=$as_save_IFS
21392 test -z "$as_dir" && as_dir=.
21393 for ac_exec_ext in '' $ac_executable_extensions; do
21394 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21395 ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
21396 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21397 break 2
21398 fi
21399 done
21400 done
21401 IFS=$as_save_IFS
21402
21403 fi
21404 fi
21405 OBJC=$ac_cv_prog_OBJC
21406 if test -n "$OBJC"; then
21407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
21408 $as_echo "$OBJC" >&6; }
21409 else
21410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21411 $as_echo "no" >&6; }
21412 fi
21413
21414
21415 test -n "$OBJC" && break
21416 done
21417 fi
21418 if test -z "$OBJC"; then
21419 ac_ct_OBJC=$OBJC
21420 for ac_prog in gcc objcc objc cc CC
21421 do
21422 # Extract the first word of "$ac_prog", so it can be a program name with args.
21423 set dummy $ac_prog; ac_word=$2
21424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21425 $as_echo_n "checking for $ac_word... " >&6; }
21426 if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
21427 $as_echo_n "(cached) " >&6
21428 else
21429 if test -n "$ac_ct_OBJC"; then
21430 ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
21431 else
21432 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21433 for as_dir in $PATH
21434 do
21435 IFS=$as_save_IFS
21436 test -z "$as_dir" && as_dir=.
21437 for ac_exec_ext in '' $ac_executable_extensions; do
21438 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21439 ac_cv_prog_ac_ct_OBJC="$ac_prog"
21440 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21441 break 2
21442 fi
21443 done
21444 done
21445 IFS=$as_save_IFS
21446
21447 fi
21448 fi
21449 ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
21450 if test -n "$ac_ct_OBJC"; then
21451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
21452 $as_echo "$ac_ct_OBJC" >&6; }
21453 else
21454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21455 $as_echo "no" >&6; }
21456 fi
21457
21458
21459 test -n "$ac_ct_OBJC" && break
21460 done
21461
21462 if test "x$ac_ct_OBJC" = x; then
21463 OBJC="gcc"
21464 else
21465 case $cross_compiling:$ac_tool_warned in
21466 yes:)
21467 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21468 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21469 ac_tool_warned=yes ;;
21470 esac
21471 OBJC=$ac_ct_OBJC
21472 fi
21473 fi
21474
21475 # Provide some information about the compiler.
21476 $as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
21477 set X $ac_compile
21478 ac_compiler=$2
21479 for ac_option in --version -v -V -qversion; do
21480 { { ac_try="$ac_compiler $ac_option >&5"
21481 case "(($ac_try" in
21482 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21483 *) ac_try_echo=$ac_try;;
21484 esac
21485 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21486 $as_echo "$ac_try_echo"; } >&5
21487 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21488 ac_status=$?
21489 if test -s conftest.err; then
21490 sed '10a\
21491 ... rest of stderr output deleted ...
21492 10q' conftest.err >conftest.er1
21493 cat conftest.er1 >&5
21494 fi
21495 rm -f conftest.er1 conftest.err
21496 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21497 test $ac_status = 0; }
21498 done
21499
21500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
21501 $as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
21502 if ${ac_cv_objc_compiler_gnu+:} false; then :
21503 $as_echo_n "(cached) " >&6
21504 else
21505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21506 /* end confdefs.h. */
21507
21508 int
21509 main ()
21510 {
21511 #ifndef __GNUC__
21512 choke me
21513 #endif
21514
21515 ;
21516 return 0;
21517 }
21518 _ACEOF
21519 if ac_fn_objc_try_compile "$LINENO"; then :
21520 ac_compiler_gnu=yes
21521 else
21522 ac_compiler_gnu=no
21523 fi
21524 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21525 ac_cv_objc_compiler_gnu=$ac_compiler_gnu
21526
21527 fi
21528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
21529 $as_echo "$ac_cv_objc_compiler_gnu" >&6; }
21530 if test $ac_compiler_gnu = yes; then
21531 GOBJC=yes
21532 else
21533 GOBJC=
21534 fi
21535 ac_test_OBJCFLAGS=${OBJCFLAGS+set}
21536 ac_save_OBJCFLAGS=$OBJCFLAGS
21537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
21538 $as_echo_n "checking whether $OBJC accepts -g... " >&6; }
21539 if ${ac_cv_prog_objc_g+:} false; then :
21540 $as_echo_n "(cached) " >&6
21541 else
21542 ac_save_objc_werror_flag=$ac_objc_werror_flag
21543 ac_objc_werror_flag=yes
21544 ac_cv_prog_objc_g=no
21545 OBJCFLAGS="-g"
21546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21547 /* end confdefs.h. */
21548
21549 int
21550 main ()
21551 {
21552
21553 ;
21554 return 0;
21555 }
21556 _ACEOF
21557 if ac_fn_objc_try_compile "$LINENO"; then :
21558 ac_cv_prog_objc_g=yes
21559 else
21560 OBJCFLAGS=""
21561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21562 /* end confdefs.h. */
21563
21564 int
21565 main ()
21566 {
21567
21568 ;
21569 return 0;
21570 }
21571 _ACEOF
21572 if ac_fn_objc_try_compile "$LINENO"; then :
21573
21574 else
21575 ac_objc_werror_flag=$ac_save_objc_werror_flag
21576 OBJCFLAGS="-g"
21577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21578 /* end confdefs.h. */
21579
21580 int
21581 main ()
21582 {
21583
21584 ;
21585 return 0;
21586 }
21587 _ACEOF
21588 if ac_fn_objc_try_compile "$LINENO"; then :
21589 ac_cv_prog_objc_g=yes
21590 fi
21591 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21592 fi
21593 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21594 fi
21595 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21596 ac_objc_werror_flag=$ac_save_objc_werror_flag
21597 fi
21598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
21599 $as_echo "$ac_cv_prog_objc_g" >&6; }
21600 if test "$ac_test_OBJCFLAGS" = set; then
21601 OBJCFLAGS=$ac_save_OBJCFLAGS
21602 elif test $ac_cv_prog_objc_g = yes; then
21603 if test "$GOBJC" = yes; then
21604 OBJCFLAGS="-g -O2"
21605 else
21606 OBJCFLAGS="-g"
21607 fi
21608 else
21609 if test "$GOBJC" = yes; then
21610 OBJCFLAGS="-O2"
21611 else
21612 OBJCFLAGS=
21613 fi
21614 fi
21615 ac_ext=cpp
21616 ac_cpp='$CXXCPP $CPPFLAGS'
21617 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21618 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21619 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21620
21621
21622 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21623
21624 # First separate the path from the arguments. This will split at the first
21625 # space.
21626 complete="$OBJC"
21627 path="${complete%% *}"
21628 tmp="$complete EOL"
21629 arguments="${tmp#* }"
21630
21631 # Input might be given as Windows format, start by converting to
21632 # unix format.
21633 new_path=`$CYGPATH -u "$path"`
21634
21635 # Now try to locate executable using which
21636 new_path=`$WHICH "$new_path" 2> /dev/null`
21637 # bat and cmd files are not always considered executable in cygwin causing which
21638 # to not find them
21639 if test "x$new_path" = x \
21640 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21641 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21642 new_path=`$CYGPATH -u "$path"`
21643 fi
21644 if test "x$new_path" = x; then
21645 # Oops. Which didn't find the executable.
21646 # The splitting of arguments from the executable at a space might have been incorrect,
21647 # since paths with space are more likely in Windows. Give it another try with the whole
21648 # argument.
21649 path="$complete"
21650 arguments="EOL"
21651 new_path=`$CYGPATH -u "$path"`
21652 new_path=`$WHICH "$new_path" 2> /dev/null`
21653 # bat and cmd files are not always considered executable in cygwin causing which
21654 # to not find them
21655 if test "x$new_path" = x \
21656 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21657 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21658 new_path=`$CYGPATH -u "$path"`
21659 fi
21660 if test "x$new_path" = x; then
21661 # It's still not found. Now this is an unrecoverable error.
21662 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21663 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21664 has_space=`$ECHO "$complete" | $GREP " "`
21665 if test "x$has_space" != x; then
21666 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21667 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21668 fi
21669 as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21670 fi
21671 fi
21672
21673 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21674 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21675 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21676 # "foo.exe" is OK but "foo" is an error.
21677 #
21678 # This test is therefore slightly more accurate than "test -f" to check for file precense.
21679 # It is also a way to make sure we got the proper file name for the real test later on.
21680 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21681 if test "x$test_shortpath" = x; then
21682 # Short path failed, file does not exist as specified.
21683 # Try adding .exe or .cmd
21684 if test -f "${new_path}.exe"; then
21685 input_to_shortpath="${new_path}.exe"
21686 elif test -f "${new_path}.cmd"; then
21687 input_to_shortpath="${new_path}.cmd"
21688 else
21689 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
21690 $as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
21691 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21692 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21693 as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21694 fi
21695 else
21696 input_to_shortpath="$new_path"
21697 fi
21698
21699 # Call helper function which possibly converts this using DOS-style short mode.
21700 # If so, the updated path is stored in $new_path.
21701 new_path="$input_to_shortpath"
21702
21703 input_path="$input_to_shortpath"
21704 # Check if we need to convert this using DOS-style short mode. If the path
21705 # contains just simple characters, use it. Otherwise (spaces, weird characters),
21706 # take no chances and rewrite it.
21707 # Note: m4 eats our [], so we need to use [ and ] instead.
21708 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21709 if test "x$has_forbidden_chars" != x; then
21710 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21711 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21712 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21713 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21714 # Going to short mode and back again did indeed matter. Since short mode is
21715 # case insensitive, let's make it lowercase to improve readability.
21716 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21717 # Now convert it back to Unix-stile (cygpath)
21718 input_path=`$CYGPATH -u "$shortmode_path"`
21719 new_path="$input_path"
21720 fi
21721 fi
21722
21723 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21724 if test "x$test_cygdrive_prefix" = x; then
21725 # As a simple fix, exclude /usr/bin since it's not a real path.
21726 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21727 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21728 # a path prefixed by /cygdrive for fixpath to work.
21729 new_path="$CYGWIN_ROOT_PATH$input_path"
21730 fi
21731 fi
21732
21733 # remove trailing .exe if any
21734 new_path="${new_path/%.exe/}"
21735
21736 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21737
21738 # First separate the path from the arguments. This will split at the first
21739 # space.
21740 complete="$OBJC"
21741 path="${complete%% *}"
21742 tmp="$complete EOL"
21743 arguments="${tmp#* }"
21744
21745 # Input might be given as Windows format, start by converting to
21746 # unix format.
21747 new_path="$path"
21748
21749 windows_path="$new_path"
21750 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21751 unix_path=`$CYGPATH -u "$windows_path"`
21752 new_path="$unix_path"
21753 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21754 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21755 new_path="$unix_path"
21756 fi
21757
21758
21759 # Now try to locate executable using which
21760 new_path=`$WHICH "$new_path" 2> /dev/null`
21761
21762 if test "x$new_path" = x; then
21763 # Oops. Which didn't find the executable.
21764 # The splitting of arguments from the executable at a space might have been incorrect,
21765 # since paths with space are more likely in Windows. Give it another try with the whole
21766 # argument.
21767 path="$complete"
21768 arguments="EOL"
21769 new_path="$path"
21770
21771 windows_path="$new_path"
21772 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21773 unix_path=`$CYGPATH -u "$windows_path"`
21774 new_path="$unix_path"
21775 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21776 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21777 new_path="$unix_path"
21778 fi
21779
21780
21781 new_path=`$WHICH "$new_path" 2> /dev/null`
21782
21783 if test "x$new_path" = x; then
21784 # It's still not found. Now this is an unrecoverable error.
21785 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21786 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21787 has_space=`$ECHO "$complete" | $GREP " "`
21788 if test "x$has_space" != x; then
21789 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21790 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21791 fi
21792 as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21793 fi
21794 fi
21795
21796 # Now new_path has a complete unix path to the binary
21797 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21798 # Keep paths in /bin as-is, but remove trailing .exe if any
21799 new_path="${new_path/%.exe/}"
21800 # Do not save /bin paths to all_fixpath_prefixes!
21801 else
21802 # Not in mixed or Windows style, start by that.
21803 new_path=`cmd //c echo $new_path`
21804
21805 input_path="$new_path"
21806 # Check if we need to convert this using DOS-style short mode. If the path
21807 # contains just simple characters, use it. Otherwise (spaces, weird characters),
21808 # take no chances and rewrite it.
21809 # Note: m4 eats our [], so we need to use [ and ] instead.
21810 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21811 if test "x$has_forbidden_chars" != x; then
21812 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21813 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21814 fi
21815
21816 # Output is in $new_path
21817
21818 windows_path="$new_path"
21819 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21820 unix_path=`$CYGPATH -u "$windows_path"`
21821 new_path="$unix_path"
21822 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21823 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21824 new_path="$unix_path"
21825 fi
21826
21827 # remove trailing .exe if any
21828 new_path="${new_path/%.exe/}"
21829
21830 # Save the first 10 bytes of this path to the storage, so fixpath can work.
21831 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21832 fi
21833
21834 else
21835 # We're on a posix platform. Hooray! :)
21836 # First separate the path from the arguments. This will split at the first
21837 # space.
21838 complete="$OBJC"
21839 path="${complete%% *}"
21840 tmp="$complete EOL"
21841 arguments="${tmp#* }"
21842
21843 # Cannot rely on the command "which" here since it doesn't always work.
21844 is_absolute_path=`$ECHO "$path" | $GREP ^/`
21845 if test -z "$is_absolute_path"; then
21846 # Path to executable is not absolute. Find it.
21847 IFS_save="$IFS"
21848 IFS=:
21849 for p in $PATH; do
21850 if test -f "$p/$path" && test -x "$p/$path"; then
21851 new_path="$p/$path"
21852 break
21853 fi
21854 done
21855 IFS="$IFS_save"
21856 else
21857 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
21858 $as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
21859 new_path="$path"
21860 fi
21861
21862 if test "x$new_path" = x; then
21863 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21864 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21865 has_space=`$ECHO "$complete" | $GREP " "`
21866 if test "x$has_space" != x; then
21867 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21868 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21869 fi
21870 as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21871 fi
21872 fi
21873
21874 # Now join together the path and the arguments once again
21875 if test "x$arguments" != xEOL; then
21876 new_complete="$new_path ${arguments% *}"
21877 else
21878 new_complete="$new_path"
21879 fi
21880
21881 if test "x$complete" != "x$new_complete"; then
21882 OBJC="$new_complete"
21883 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
21884 $as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
21885 fi
21886
21887 else
21888 OBJC=
21889 fi
21890
21891 # Restore the flags to the user specified values.
21892 # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
21893 CFLAGS="$ORG_CFLAGS"
21894 CXXFLAGS="$ORG_CXXFLAGS"
21895 OBJCFLAGS="$ORG_OBJCFLAGS"
21896
21897 LD="$CC"
21898 LDEXE="$CC"
21899 LDCXX="$CXX"
21900 LDEXECXX="$CXX"
21901
21902 # LDEXE is the linker to use, when creating executables.
21903
21904 # Linking C++ libraries.
21905
21906 # Linking C++ executables.
21907
21908
21909 if test "x$OPENJDK_TARGET_OS" != xwindows; then
21910 if test -n "$ac_tool_prefix"; then
21911 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
21912 set dummy ${ac_tool_prefix}ar; ac_word=$2
21913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21914 $as_echo_n "checking for $ac_word... " >&6; }
21915 if ${ac_cv_prog_AR+:} false; then :
21916 $as_echo_n "(cached) " >&6
21917 else
21918 if test -n "$AR"; then
21919 ac_cv_prog_AR="$AR" # Let the user override the test.
21920 else
21921 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21922 for as_dir in $PATH
21923 do
21924 IFS=$as_save_IFS
21925 test -z "$as_dir" && as_dir=.
21926 for ac_exec_ext in '' $ac_executable_extensions; do
21927 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21928 ac_cv_prog_AR="${ac_tool_prefix}ar"
21929 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21930 break 2
21931 fi
21932 done
21933 done
21934 IFS=$as_save_IFS
21935
21936 fi
21937 fi
21938 AR=$ac_cv_prog_AR
21939 if test -n "$AR"; then
21940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
21941 $as_echo "$AR" >&6; }
21942 else
21943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21944 $as_echo "no" >&6; }
21945 fi
21946
21947
21948 fi
21949 if test -z "$ac_cv_prog_AR"; then
21950 ac_ct_AR=$AR
21951 # Extract the first word of "ar", so it can be a program name with args.
21952 set dummy ar; ac_word=$2
21953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21954 $as_echo_n "checking for $ac_word... " >&6; }
21955 if ${ac_cv_prog_ac_ct_AR+:} false; then :
21956 $as_echo_n "(cached) " >&6
21957 else
21958 if test -n "$ac_ct_AR"; then
21959 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
21960 else
21961 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21962 for as_dir in $PATH
21963 do
21964 IFS=$as_save_IFS
21965 test -z "$as_dir" && as_dir=.
21966 for ac_exec_ext in '' $ac_executable_extensions; do
21967 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21968 ac_cv_prog_ac_ct_AR="ar"
21969 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21970 break 2
21971 fi
21972 done
21973 done
21974 IFS=$as_save_IFS
21975
21976 fi
21977 fi
21978 ac_ct_AR=$ac_cv_prog_ac_ct_AR
21979 if test -n "$ac_ct_AR"; then
21980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
21981 $as_echo "$ac_ct_AR" >&6; }
21982 else
21983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21984 $as_echo "no" >&6; }
21985 fi
21986
21987 if test "x$ac_ct_AR" = x; then
21988 AR=""
21989 else
21990 case $cross_compiling:$ac_tool_warned in
21991 yes:)
21992 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21993 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21994 ac_tool_warned=yes ;;
21995 esac
21996 AR=$ac_ct_AR
21997 fi
21998 else
21999 AR="$ac_cv_prog_AR"
22000 fi
22001
22002
22003 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22004
22005 # First separate the path from the arguments. This will split at the first
22006 # space.
22007 complete="$AR"
22008 path="${complete%% *}"
22009 tmp="$complete EOL"
22010 arguments="${tmp#* }"
22011
22012 # Input might be given as Windows format, start by converting to
22013 # unix format.
22014 new_path=`$CYGPATH -u "$path"`
22015
22016 # Now try to locate executable using which
22017 new_path=`$WHICH "$new_path" 2> /dev/null`
22018 # bat and cmd files are not always considered executable in cygwin causing which
22019 # to not find them
22020 if test "x$new_path" = x \
22021 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22022 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22023 new_path=`$CYGPATH -u "$path"`
22024 fi
22025 if test "x$new_path" = x; then
22026 # Oops. Which didn't find the executable.
22027 # The splitting of arguments from the executable at a space might have been incorrect,
22028 # since paths with space are more likely in Windows. Give it another try with the whole
22029 # argument.
22030 path="$complete"
22031 arguments="EOL"
22032 new_path=`$CYGPATH -u "$path"`
22033 new_path=`$WHICH "$new_path" 2> /dev/null`
22034 # bat and cmd files are not always considered executable in cygwin causing which
22035 # to not find them
22036 if test "x$new_path" = x \
22037 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22038 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22039 new_path=`$CYGPATH -u "$path"`
22040 fi
22041 if test "x$new_path" = x; then
22042 # It's still not found. Now this is an unrecoverable error.
22043 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22044 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22045 has_space=`$ECHO "$complete" | $GREP " "`
22046 if test "x$has_space" != x; then
22047 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22048 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22049 fi
22050 as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22051 fi
22052 fi
22053
22054 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22055 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22056 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22057 # "foo.exe" is OK but "foo" is an error.
22058 #
22059 # This test is therefore slightly more accurate than "test -f" to check for file precense.
22060 # It is also a way to make sure we got the proper file name for the real test later on.
22061 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22062 if test "x$test_shortpath" = x; then
22063 # Short path failed, file does not exist as specified.
22064 # Try adding .exe or .cmd
22065 if test -f "${new_path}.exe"; then
22066 input_to_shortpath="${new_path}.exe"
22067 elif test -f "${new_path}.cmd"; then
22068 input_to_shortpath="${new_path}.cmd"
22069 else
22070 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22071 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22072 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22073 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22074 as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22075 fi
22076 else
22077 input_to_shortpath="$new_path"
22078 fi
22079
22080 # Call helper function which possibly converts this using DOS-style short mode.
22081 # If so, the updated path is stored in $new_path.
22082 new_path="$input_to_shortpath"
22083
22084 input_path="$input_to_shortpath"
22085 # Check if we need to convert this using DOS-style short mode. If the path
22086 # contains just simple characters, use it. Otherwise (spaces, weird characters),
22087 # take no chances and rewrite it.
22088 # Note: m4 eats our [], so we need to use [ and ] instead.
22089 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22090 if test "x$has_forbidden_chars" != x; then
22091 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22092 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22093 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22094 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22095 # Going to short mode and back again did indeed matter. Since short mode is
22096 # case insensitive, let's make it lowercase to improve readability.
22097 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22098 # Now convert it back to Unix-stile (cygpath)
22099 input_path=`$CYGPATH -u "$shortmode_path"`
22100 new_path="$input_path"
22101 fi
22102 fi
22103
22104 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22105 if test "x$test_cygdrive_prefix" = x; then
22106 # As a simple fix, exclude /usr/bin since it's not a real path.
22107 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22108 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22109 # a path prefixed by /cygdrive for fixpath to work.
22110 new_path="$CYGWIN_ROOT_PATH$input_path"
22111 fi
22112 fi
22113
22114 # remove trailing .exe if any
22115 new_path="${new_path/%.exe/}"
22116
22117 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22118
22119 # First separate the path from the arguments. This will split at the first
22120 # space.
22121 complete="$AR"
22122 path="${complete%% *}"
22123 tmp="$complete EOL"
22124 arguments="${tmp#* }"
22125
22126 # Input might be given as Windows format, start by converting to
22127 # unix format.
22128 new_path="$path"
22129
22130 windows_path="$new_path"
22131 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22132 unix_path=`$CYGPATH -u "$windows_path"`
22133 new_path="$unix_path"
22134 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22135 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22136 new_path="$unix_path"
22137 fi
22138
22139
22140 # Now try to locate executable using which
22141 new_path=`$WHICH "$new_path" 2> /dev/null`
22142
22143 if test "x$new_path" = x; then
22144 # Oops. Which didn't find the executable.
22145 # The splitting of arguments from the executable at a space might have been incorrect,
22146 # since paths with space are more likely in Windows. Give it another try with the whole
22147 # argument.
22148 path="$complete"
22149 arguments="EOL"
22150 new_path="$path"
22151
22152 windows_path="$new_path"
22153 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22154 unix_path=`$CYGPATH -u "$windows_path"`
22155 new_path="$unix_path"
22156 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22157 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22158 new_path="$unix_path"
22159 fi
22160
22161
22162 new_path=`$WHICH "$new_path" 2> /dev/null`
22163
22164 if test "x$new_path" = x; then
22165 # It's still not found. Now this is an unrecoverable error.
22166 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22167 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22168 has_space=`$ECHO "$complete" | $GREP " "`
22169 if test "x$has_space" != x; then
22170 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22171 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22172 fi
22173 as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22174 fi
22175 fi
22176
22177 # Now new_path has a complete unix path to the binary
22178 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22179 # Keep paths in /bin as-is, but remove trailing .exe if any
22180 new_path="${new_path/%.exe/}"
22181 # Do not save /bin paths to all_fixpath_prefixes!
22182 else
22183 # Not in mixed or Windows style, start by that.
22184 new_path=`cmd //c echo $new_path`
22185
22186 input_path="$new_path"
22187 # Check if we need to convert this using DOS-style short mode. If the path
22188 # contains just simple characters, use it. Otherwise (spaces, weird characters),
22189 # take no chances and rewrite it.
22190 # Note: m4 eats our [], so we need to use [ and ] instead.
22191 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22192 if test "x$has_forbidden_chars" != x; then
22193 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22194 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22195 fi
22196
22197 # Output is in $new_path
22198
22199 windows_path="$new_path"
22200 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22201 unix_path=`$CYGPATH -u "$windows_path"`
22202 new_path="$unix_path"
22203 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22204 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22205 new_path="$unix_path"
22206 fi
22207
22208 # remove trailing .exe if any
22209 new_path="${new_path/%.exe/}"
22210
22211 # Save the first 10 bytes of this path to the storage, so fixpath can work.
22212 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22213 fi
22214
22215 else
22216 # We're on a posix platform. Hooray! :)
22217 # First separate the path from the arguments. This will split at the first
22218 # space.
22219 complete="$AR"
22220 path="${complete%% *}"
22221 tmp="$complete EOL"
22222 arguments="${tmp#* }"
22223
22224 # Cannot rely on the command "which" here since it doesn't always work.
22225 is_absolute_path=`$ECHO "$path" | $GREP ^/`
22226 if test -z "$is_absolute_path"; then
22227 # Path to executable is not absolute. Find it.
22228 IFS_save="$IFS"
22229 IFS=:
22230 for p in $PATH; do
22231 if test -f "$p/$path" && test -x "$p/$path"; then
22232 new_path="$p/$path"
22233 break
22234 fi
22235 done
22236 IFS="$IFS_save"
22237 else
22238 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22239 $as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22240 new_path="$path"
22241 fi
22242
22243 if test "x$new_path" = x; then
22244 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22245 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22246 has_space=`$ECHO "$complete" | $GREP " "`
22247 if test "x$has_space" != x; then
22248 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22249 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22250 fi
22251 as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22252 fi
22253 fi
22254
22255 # Now join together the path and the arguments once again
22256 if test "x$arguments" != xEOL; then
22257 new_complete="$new_path ${arguments% *}"
22258 else
22259 new_complete="$new_path"
22260 fi
22261
22262 if test "x$complete" != "x$new_complete"; then
22263 AR="$new_complete"
22264 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22265 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22266 fi
22267
22268 fi
22269 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22270 ARFLAGS="-r"
22271 else
22272 ARFLAGS=""
22273 fi
22274
22275
22276 # For hotspot, we need these in Windows mixed path; other platforms keep them the same
22277 HOTSPOT_CXX="$CXX"
22278 HOTSPOT_LD="$LD"
22279
22280
22281
22282 COMPILER_NAME=gcc
22283 COMPILER_TYPE=CC
22284 if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22285
22286 # For now, assume that we are always compiling using cl.exe.
22287 CC_OUT_OPTION=-Fo
22288 EXE_OUT_OPTION=-out:
22289 LD_OUT_OPTION=-out:
22290 AR_OUT_OPTION=-out:
22291 # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22292 # program for something completely different.
22293 # Extract the first word of "link", so it can be a program name with args.
22294 set dummy link; ac_word=$2
22295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22296 $as_echo_n "checking for $ac_word... " >&6; }
22297 if ${ac_cv_prog_WINLD+:} false; then :
22298 $as_echo_n "(cached) " >&6
22299 else
22300 if test -n "$WINLD"; then
22301 ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22302 else
22303 ac_prog_rejected=no
22304 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22305 for as_dir in $PATH
22306 do
22307 IFS=$as_save_IFS
22308 test -z "$as_dir" && as_dir=.
22309 for ac_exec_ext in '' $ac_executable_extensions; do
22310 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22311 if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22312 ac_prog_rejected=yes
22313 continue
22314 fi
22315 ac_cv_prog_WINLD="link"
22316 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22317 break 2
22318 fi
22319 done
22320 done
22321 IFS=$as_save_IFS
22322
22323 if test $ac_prog_rejected = yes; then
22324 # We found a bogon in the path, so make sure we never use it.
22325 set dummy $ac_cv_prog_WINLD
22326 shift
22327 if test $# != 0; then
22328 # We chose a different compiler from the bogus one.
22329 # However, it has the same basename, so the bogon will be chosen
22330 # first if we set WINLD to just the basename; use the full file name.
22331 shift
22332 ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
22333 fi
22334 fi
22335 fi
22336 fi
22337 WINLD=$ac_cv_prog_WINLD
22338 if test -n "$WINLD"; then
22339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
22340 $as_echo "$WINLD" >&6; }
22341 else
22342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22343 $as_echo "no" >&6; }
22344 fi
22345
22346
22347 # Since we must ignore the first found link, WINLD will contain
22348 # the full path to the link.exe program.
22349
22350 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22351
22352 # First separate the path from the arguments. This will split at the first
22353 # space.
22354 complete="$WINLD"
22355 path="${complete%% *}"
22356 tmp="$complete EOL"
22357 arguments="${tmp#* }"
22358
22359 # Input might be given as Windows format, start by converting to
22360 # unix format.
22361 new_path=`$CYGPATH -u "$path"`
22362
22363 # Now try to locate executable using which
22364 new_path=`$WHICH "$new_path" 2> /dev/null`
22365 # bat and cmd files are not always considered executable in cygwin causing which
22366 # to not find them
22367 if test "x$new_path" = x \
22368 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22369 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22370 new_path=`$CYGPATH -u "$path"`
22371 fi
22372 if test "x$new_path" = x; then
22373 # Oops. Which didn't find the executable.
22374 # The splitting of arguments from the executable at a space might have been incorrect,
22375 # since paths with space are more likely in Windows. Give it another try with the whole
22376 # argument.
22377 path="$complete"
22378 arguments="EOL"
22379 new_path=`$CYGPATH -u "$path"`
22380 new_path=`$WHICH "$new_path" 2> /dev/null`
22381 # bat and cmd files are not always considered executable in cygwin causing which
22382 # to not find them
22383 if test "x$new_path" = x \
22384 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22385 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22386 new_path=`$CYGPATH -u "$path"`
22387 fi
22388 if test "x$new_path" = x; then
22389 # It's still not found. Now this is an unrecoverable error.
22390 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22391 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22392 has_space=`$ECHO "$complete" | $GREP " "`
22393 if test "x$has_space" != x; then
22394 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22395 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22396 fi
22397 as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22398 fi
22399 fi
22400
22401 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22402 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22403 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22404 # "foo.exe" is OK but "foo" is an error.
22405 #
22406 # This test is therefore slightly more accurate than "test -f" to check for file precense.
22407 # It is also a way to make sure we got the proper file name for the real test later on.
22408 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22409 if test "x$test_shortpath" = x; then
22410 # Short path failed, file does not exist as specified.
22411 # Try adding .exe or .cmd
22412 if test -f "${new_path}.exe"; then
22413 input_to_shortpath="${new_path}.exe"
22414 elif test -f "${new_path}.cmd"; then
22415 input_to_shortpath="${new_path}.cmd"
22416 else
22417 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
22418 $as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
22419 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22420 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22421 as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22422 fi
22423 else
22424 input_to_shortpath="$new_path"
22425 fi
22426
22427 # Call helper function which possibly converts this using DOS-style short mode.
22428 # If so, the updated path is stored in $new_path.
22429 new_path="$input_to_shortpath"
22430
22431 input_path="$input_to_shortpath"
22432 # Check if we need to convert this using DOS-style short mode. If the path
22433 # contains just simple characters, use it. Otherwise (spaces, weird characters),
22434 # take no chances and rewrite it.
22435 # Note: m4 eats our [], so we need to use [ and ] instead.
22436 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22437 if test "x$has_forbidden_chars" != x; then
22438 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22439 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22440 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22441 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22442 # Going to short mode and back again did indeed matter. Since short mode is
22443 # case insensitive, let's make it lowercase to improve readability.
22444 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22445 # Now convert it back to Unix-stile (cygpath)
22446 input_path=`$CYGPATH -u "$shortmode_path"`
22447 new_path="$input_path"
22448 fi
22449 fi
22450
22451 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22452 if test "x$test_cygdrive_prefix" = x; then
22453 # As a simple fix, exclude /usr/bin since it's not a real path.
22454 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22455 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22456 # a path prefixed by /cygdrive for fixpath to work.
22457 new_path="$CYGWIN_ROOT_PATH$input_path"
22458 fi
22459 fi
22460
22461 # remove trailing .exe if any
22462 new_path="${new_path/%.exe/}"
22463
22464 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22465
22466 # First separate the path from the arguments. This will split at the first
22467 # space.
22468 complete="$WINLD"
22469 path="${complete%% *}"
22470 tmp="$complete EOL"
22471 arguments="${tmp#* }"
22472
22473 # Input might be given as Windows format, start by converting to
22474 # unix format.
22475 new_path="$path"
22476
22477 windows_path="$new_path"
22478 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22479 unix_path=`$CYGPATH -u "$windows_path"`
22480 new_path="$unix_path"
22481 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22482 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22483 new_path="$unix_path"
22484 fi
22485
22486
22487 # Now try to locate executable using which
22488 new_path=`$WHICH "$new_path" 2> /dev/null`
22489
22490 if test "x$new_path" = x; then
22491 # Oops. Which didn't find the executable.
22492 # The splitting of arguments from the executable at a space might have been incorrect,
22493 # since paths with space are more likely in Windows. Give it another try with the whole
22494 # argument.
22495 path="$complete"
22496 arguments="EOL"
22497 new_path="$path"
22498
22499 windows_path="$new_path"
22500 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22501 unix_path=`$CYGPATH -u "$windows_path"`
22502 new_path="$unix_path"
22503 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22504 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22505 new_path="$unix_path"
22506 fi
22507
22508
22509 new_path=`$WHICH "$new_path" 2> /dev/null`
22510
22511 if test "x$new_path" = x; then
22512 # It's still not found. Now this is an unrecoverable error.
22513 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22514 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22515 has_space=`$ECHO "$complete" | $GREP " "`
22516 if test "x$has_space" != x; then
22517 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22518 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22519 fi
22520 as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22521 fi
22522 fi
22523
22524 # Now new_path has a complete unix path to the binary
22525 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22526 # Keep paths in /bin as-is, but remove trailing .exe if any
22527 new_path="${new_path/%.exe/}"
22528 # Do not save /bin paths to all_fixpath_prefixes!
22529 else
22530 # Not in mixed or Windows style, start by that.
22531 new_path=`cmd //c echo $new_path`
22532
22533 input_path="$new_path"
22534 # Check if we need to convert this using DOS-style short mode. If the path
22535 # contains just simple characters, use it. Otherwise (spaces, weird characters),
22536 # take no chances and rewrite it.
22537 # Note: m4 eats our [], so we need to use [ and ] instead.
22538 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22539 if test "x$has_forbidden_chars" != x; then
22540 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22541 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22542 fi
22543
22544 # Output is in $new_path
22545
22546 windows_path="$new_path"
22547 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22548 unix_path=`$CYGPATH -u "$windows_path"`
22549 new_path="$unix_path"
22550 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22551 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22552 new_path="$unix_path"
22553 fi
22554
22555 # remove trailing .exe if any
22556 new_path="${new_path/%.exe/}"
22557
22558 # Save the first 10 bytes of this path to the storage, so fixpath can work.
22559 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22560 fi
22561
22562 else
22563 # We're on a posix platform. Hooray! :)
22564 # First separate the path from the arguments. This will split at the first
22565 # space.
22566 complete="$WINLD"
22567 path="${complete%% *}"
22568 tmp="$complete EOL"
22569 arguments="${tmp#* }"
22570
22571 # Cannot rely on the command "which" here since it doesn't always work.
22572 is_absolute_path=`$ECHO "$path" | $GREP ^/`
22573 if test -z "$is_absolute_path"; then
22574 # Path to executable is not absolute. Find it.
22575 IFS_save="$IFS"
22576 IFS=:
22577 for p in $PATH; do
22578 if test -f "$p/$path" && test -x "$p/$path"; then
22579 new_path="$p/$path"
22580 break
22581 fi
22582 done
22583 IFS="$IFS_save"
22584 else
22585 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
22586 $as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
22587 new_path="$path"
22588 fi
22589
22590 if test "x$new_path" = x; then
22591 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22592 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22593 has_space=`$ECHO "$complete" | $GREP " "`
22594 if test "x$has_space" != x; then
22595 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22596 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22597 fi
22598 as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22599 fi
22600 fi
22601
22602 # Now join together the path and the arguments once again
22603 if test "x$arguments" != xEOL; then
22604 new_complete="$new_path ${arguments% *}"
22605 else
22606 new_complete="$new_path"
22607 fi
22608
22609 if test "x$complete" != "x$new_complete"; then
22610 WINLD="$new_complete"
22611 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
22612 $as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
22613 fi
22614
22615 printf "Windows linker was found at $WINLD\n"
22616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
22617 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
22618 "$WINLD" --version > /dev/null
22619 if test $? -eq 0 ; then
22620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22621 $as_echo "no" >&6; }
22622 as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
22623 else
22624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22625 $as_echo "yes" >&6; }
22626 fi
22627 LD="$WINLD"
22628 LDEXE="$WINLD"
22629 LDCXX="$WINLD"
22630 LDEXECXX="$WINLD"
22631
22632 # Extract the first word of "mt", so it can be a program name with args.
22633 set dummy mt; ac_word=$2
22634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22635 $as_echo_n "checking for $ac_word... " >&6; }
22636 if ${ac_cv_prog_MT+:} false; then :
22637 $as_echo_n "(cached) " >&6
22638 else
22639 if test -n "$MT"; then
22640 ac_cv_prog_MT="$MT" # Let the user override the test.
22641 else
22642 ac_prog_rejected=no
22643 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22644 for as_dir in $PATH
22645 do
22646 IFS=$as_save_IFS
22647 test -z "$as_dir" && as_dir=.
22648 for ac_exec_ext in '' $ac_executable_extensions; do
22649 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22650 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
22651 ac_prog_rejected=yes
22652 continue
22653 fi
22654 ac_cv_prog_MT="mt"
22655 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22656 break 2
22657 fi
22658 done
22659 done
22660 IFS=$as_save_IFS
22661
22662 if test $ac_prog_rejected = yes; then
22663 # We found a bogon in the path, so make sure we never use it.
22664 set dummy $ac_cv_prog_MT
22665 shift
22666 if test $# != 0; then
22667 # We chose a different compiler from the bogus one.
22668 # However, it has the same basename, so the bogon will be chosen
22669 # first if we set MT to just the basename; use the full file name.
22670 shift
22671 ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
22672 fi
22673 fi
22674 fi
22675 fi
22676 MT=$ac_cv_prog_MT
22677 if test -n "$MT"; then
22678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
22679 $as_echo "$MT" >&6; }
22680 else
22681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22682 $as_echo "no" >&6; }
22683 fi
22684
22685
22686
22687 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22688
22689 # First separate the path from the arguments. This will split at the first
22690 # space.
22691 complete="$MT"
22692 path="${complete%% *}"
22693 tmp="$complete EOL"
22694 arguments="${tmp#* }"
22695
22696 # Input might be given as Windows format, start by converting to
22697 # unix format.
22698 new_path=`$CYGPATH -u "$path"`
22699
22700 # Now try to locate executable using which
22701 new_path=`$WHICH "$new_path" 2> /dev/null`
22702 # bat and cmd files are not always considered executable in cygwin causing which
22703 # to not find them
22704 if test "x$new_path" = x \
22705 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22706 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22707 new_path=`$CYGPATH -u "$path"`
22708 fi
22709 if test "x$new_path" = x; then
22710 # Oops. Which didn't find the executable.
22711 # The splitting of arguments from the executable at a space might have been incorrect,
22712 # since paths with space are more likely in Windows. Give it another try with the whole
22713 # argument.
22714 path="$complete"
22715 arguments="EOL"
22716 new_path=`$CYGPATH -u "$path"`
22717 new_path=`$WHICH "$new_path" 2> /dev/null`
22718 # bat and cmd files are not always considered executable in cygwin causing which
22719 # to not find them
22720 if test "x$new_path" = x \
22721 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22722 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22723 new_path=`$CYGPATH -u "$path"`
22724 fi
22725 if test "x$new_path" = x; then
22726 # It's still not found. Now this is an unrecoverable error.
22727 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22728 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22729 has_space=`$ECHO "$complete" | $GREP " "`
22730 if test "x$has_space" != x; then
22731 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22732 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22733 fi
22734 as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22735 fi
22736 fi
22737
22738 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22739 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22740 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22741 # "foo.exe" is OK but "foo" is an error.
22742 #
22743 # This test is therefore slightly more accurate than "test -f" to check for file precense.
22744 # It is also a way to make sure we got the proper file name for the real test later on.
22745 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22746 if test "x$test_shortpath" = x; then
22747 # Short path failed, file does not exist as specified.
22748 # Try adding .exe or .cmd
22749 if test -f "${new_path}.exe"; then
22750 input_to_shortpath="${new_path}.exe"
22751 elif test -f "${new_path}.cmd"; then
22752 input_to_shortpath="${new_path}.cmd"
22753 else
22754 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
22755 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
22756 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22757 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22758 as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22759 fi
22760 else
22761 input_to_shortpath="$new_path"
22762 fi
22763
22764 # Call helper function which possibly converts this using DOS-style short mode.
22765 # If so, the updated path is stored in $new_path.
22766 new_path="$input_to_shortpath"
22767
22768 input_path="$input_to_shortpath"
22769 # Check if we need to convert this using DOS-style short mode. If the path
22770 # contains just simple characters, use it. Otherwise (spaces, weird characters),
22771 # take no chances and rewrite it.
22772 # Note: m4 eats our [], so we need to use [ and ] instead.
22773 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22774 if test "x$has_forbidden_chars" != x; then
22775 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22776 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22777 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22778 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22779 # Going to short mode and back again did indeed matter. Since short mode is
22780 # case insensitive, let's make it lowercase to improve readability.
22781 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22782 # Now convert it back to Unix-stile (cygpath)
22783 input_path=`$CYGPATH -u "$shortmode_path"`
22784 new_path="$input_path"
22785 fi
22786 fi
22787
22788 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22789 if test "x$test_cygdrive_prefix" = x; then
22790 # As a simple fix, exclude /usr/bin since it's not a real path.
22791 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22792 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22793 # a path prefixed by /cygdrive for fixpath to work.
22794 new_path="$CYGWIN_ROOT_PATH$input_path"
22795 fi
22796 fi
22797
22798 # remove trailing .exe if any
22799 new_path="${new_path/%.exe/}"
22800
22801 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22802
22803 # First separate the path from the arguments. This will split at the first
22804 # space.
22805 complete="$MT"
22806 path="${complete%% *}"
22807 tmp="$complete EOL"
22808 arguments="${tmp#* }"
22809
22810 # Input might be given as Windows format, start by converting to
22811 # unix format.
22812 new_path="$path"
22813
22814 windows_path="$new_path"
22815 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22816 unix_path=`$CYGPATH -u "$windows_path"`
22817 new_path="$unix_path"
22818 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22819 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22820 new_path="$unix_path"
22821 fi
22822
22823
22824 # Now try to locate executable using which
22825 new_path=`$WHICH "$new_path" 2> /dev/null`
22826
22827 if test "x$new_path" = x; then
22828 # Oops. Which didn't find the executable.
22829 # The splitting of arguments from the executable at a space might have been incorrect,
22830 # since paths with space are more likely in Windows. Give it another try with the whole
22831 # argument.
22832 path="$complete"
22833 arguments="EOL"
22834 new_path="$path"
22835
22836 windows_path="$new_path"
22837 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22838 unix_path=`$CYGPATH -u "$windows_path"`
22839 new_path="$unix_path"
22840 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22841 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22842 new_path="$unix_path"
22843 fi
22844
22845
22846 new_path=`$WHICH "$new_path" 2> /dev/null`
22847
22848 if test "x$new_path" = x; then
22849 # It's still not found. Now this is an unrecoverable error.
22850 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22851 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22852 has_space=`$ECHO "$complete" | $GREP " "`
22853 if test "x$has_space" != x; then
22854 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22855 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22856 fi
22857 as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22858 fi
22859 fi
22860
22861 # Now new_path has a complete unix path to the binary
22862 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22863 # Keep paths in /bin as-is, but remove trailing .exe if any
22864 new_path="${new_path/%.exe/}"
22865 # Do not save /bin paths to all_fixpath_prefixes!
22866 else
22867 # Not in mixed or Windows style, start by that.
22868 new_path=`cmd //c echo $new_path`
22869
22870 input_path="$new_path"
22871 # Check if we need to convert this using DOS-style short mode. If the path
22872 # contains just simple characters, use it. Otherwise (spaces, weird characters),
22873 # take no chances and rewrite it.
22874 # Note: m4 eats our [], so we need to use [ and ] instead.
22875 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22876 if test "x$has_forbidden_chars" != x; then
22877 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22878 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22879 fi
22880
22881 # Output is in $new_path
22882
22883 windows_path="$new_path"
22884 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22885 unix_path=`$CYGPATH -u "$windows_path"`
22886 new_path="$unix_path"
22887 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22888 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22889 new_path="$unix_path"
22890 fi
22891
22892 # remove trailing .exe if any
22893 new_path="${new_path/%.exe/}"
22894
22895 # Save the first 10 bytes of this path to the storage, so fixpath can work.
22896 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22897 fi
22898
22899 else
22900 # We're on a posix platform. Hooray! :)
22901 # First separate the path from the arguments. This will split at the first
22902 # space.
22903 complete="$MT"
22904 path="${complete%% *}"
22905 tmp="$complete EOL"
22906 arguments="${tmp#* }"
22907
22908 # Cannot rely on the command "which" here since it doesn't always work.
22909 is_absolute_path=`$ECHO "$path" | $GREP ^/`
22910 if test -z "$is_absolute_path"; then
22911 # Path to executable is not absolute. Find it.
22912 IFS_save="$IFS"
22913 IFS=:
22914 for p in $PATH; do
22915 if test -f "$p/$path" && test -x "$p/$path"; then
22916 new_path="$p/$path"
22917 break
22918 fi
22919 done
22920 IFS="$IFS_save"
22921 else
22922 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
22923 $as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
22924 new_path="$path"
22925 fi
22926
22927 if test "x$new_path" = x; then
22928 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22929 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22930 has_space=`$ECHO "$complete" | $GREP " "`
22931 if test "x$has_space" != x; then
22932 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22933 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22934 fi
22935 as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22936 fi
22937 fi
22938
22939 # Now join together the path and the arguments once again
22940 if test "x$arguments" != xEOL; then
22941 new_complete="$new_path ${arguments% *}"
22942 else
22943 new_complete="$new_path"
22944 fi
22945
22946 if test "x$complete" != "x$new_complete"; then
22947 MT="$new_complete"
22948 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
22949 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
22950 fi
22951
22952 # The resource compiler
22953 # Extract the first word of "rc", so it can be a program name with args.
22954 set dummy rc; ac_word=$2
22955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22956 $as_echo_n "checking for $ac_word... " >&6; }
22957 if ${ac_cv_prog_RC+:} false; then :
22958 $as_echo_n "(cached) " >&6
22959 else
22960 if test -n "$RC"; then
22961 ac_cv_prog_RC="$RC" # Let the user override the test.
22962 else
22963 ac_prog_rejected=no
22964 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22965 for as_dir in $PATH
22966 do
22967 IFS=$as_save_IFS
22968 test -z "$as_dir" && as_dir=.
22969 for ac_exec_ext in '' $ac_executable_extensions; do
22970 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22971 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
22972 ac_prog_rejected=yes
22973 continue
22974 fi
22975 ac_cv_prog_RC="rc"
22976 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22977 break 2
22978 fi
22979 done
22980 done
22981 IFS=$as_save_IFS
22982
22983 if test $ac_prog_rejected = yes; then
22984 # We found a bogon in the path, so make sure we never use it.
22985 set dummy $ac_cv_prog_RC
22986 shift
22987 if test $# != 0; then
22988 # We chose a different compiler from the bogus one.
22989 # However, it has the same basename, so the bogon will be chosen
22990 # first if we set RC to just the basename; use the full file name.
22991 shift
22992 ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
22993 fi
22994 fi
22995 fi
22996 fi
22997 RC=$ac_cv_prog_RC
22998 if test -n "$RC"; then
22999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23000 $as_echo "$RC" >&6; }
23001 else
23002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23003 $as_echo "no" >&6; }
23004 fi
23005
23006
23007
23008 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23009
23010 # First separate the path from the arguments. This will split at the first
23011 # space.
23012 complete="$RC"
23013 path="${complete%% *}"
23014 tmp="$complete EOL"
23015 arguments="${tmp#* }"
23016
23017 # Input might be given as Windows format, start by converting to
23018 # unix format.
23019 new_path=`$CYGPATH -u "$path"`
23020
23021 # Now try to locate executable using which
23022 new_path=`$WHICH "$new_path" 2> /dev/null`
23023 # bat and cmd files are not always considered executable in cygwin causing which
23024 # to not find them
23025 if test "x$new_path" = x \
23026 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23027 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23028 new_path=`$CYGPATH -u "$path"`
23029 fi
23030 if test "x$new_path" = x; then
23031 # Oops. Which didn't find the executable.
23032 # The splitting of arguments from the executable at a space might have been incorrect,
23033 # since paths with space are more likely in Windows. Give it another try with the whole
23034 # argument.
23035 path="$complete"
23036 arguments="EOL"
23037 new_path=`$CYGPATH -u "$path"`
23038 new_path=`$WHICH "$new_path" 2> /dev/null`
23039 # bat and cmd files are not always considered executable in cygwin causing which
23040 # to not find them
23041 if test "x$new_path" = x \
23042 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23043 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23044 new_path=`$CYGPATH -u "$path"`
23045 fi
23046 if test "x$new_path" = x; then
23047 # It's still not found. Now this is an unrecoverable error.
23048 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23049 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23050 has_space=`$ECHO "$complete" | $GREP " "`
23051 if test "x$has_space" != x; then
23052 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23053 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23054 fi
23055 as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23056 fi
23057 fi
23058
23059 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23060 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23061 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23062 # "foo.exe" is OK but "foo" is an error.
23063 #
23064 # This test is therefore slightly more accurate than "test -f" to check for file precense.
23065 # It is also a way to make sure we got the proper file name for the real test later on.
23066 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23067 if test "x$test_shortpath" = x; then
23068 # Short path failed, file does not exist as specified.
23069 # Try adding .exe or .cmd
23070 if test -f "${new_path}.exe"; then
23071 input_to_shortpath="${new_path}.exe"
23072 elif test -f "${new_path}.cmd"; then
23073 input_to_shortpath="${new_path}.cmd"
23074 else
23075 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23076 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23077 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23078 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23079 as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23080 fi
23081 else
23082 input_to_shortpath="$new_path"
23083 fi
23084
23085 # Call helper function which possibly converts this using DOS-style short mode.
23086 # If so, the updated path is stored in $new_path.
23087 new_path="$input_to_shortpath"
23088
23089 input_path="$input_to_shortpath"
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 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23098 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23099 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23100 # Going to short mode and back again did indeed matter. Since short mode is
23101 # case insensitive, let's make it lowercase to improve readability.
23102 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23103 # Now convert it back to Unix-stile (cygpath)
23104 input_path=`$CYGPATH -u "$shortmode_path"`
23105 new_path="$input_path"
23106 fi
23107 fi
23108
23109 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23110 if test "x$test_cygdrive_prefix" = x; then
23111 # As a simple fix, exclude /usr/bin since it's not a real path.
23112 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23113 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23114 # a path prefixed by /cygdrive for fixpath to work.
23115 new_path="$CYGWIN_ROOT_PATH$input_path"
23116 fi
23117 fi
23118
23119 # remove trailing .exe if any
23120 new_path="${new_path/%.exe/}"
23121
23122 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23123
23124 # First separate the path from the arguments. This will split at the first
23125 # space.
23126 complete="$RC"
23127 path="${complete%% *}"
23128 tmp="$complete EOL"
23129 arguments="${tmp#* }"
23130
23131 # Input might be given as Windows format, start by converting to
23132 # unix format.
23133 new_path="$path"
23134
23135 windows_path="$new_path"
23136 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23137 unix_path=`$CYGPATH -u "$windows_path"`
23138 new_path="$unix_path"
23139 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23140 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23141 new_path="$unix_path"
23142 fi
23143
23144
23145 # Now try to locate executable using which
23146 new_path=`$WHICH "$new_path" 2> /dev/null`
23147
23148 if test "x$new_path" = x; then
23149 # Oops. Which didn't find the executable.
23150 # The splitting of arguments from the executable at a space might have been incorrect,
23151 # since paths with space are more likely in Windows. Give it another try with the whole
23152 # argument.
23153 path="$complete"
23154 arguments="EOL"
23155 new_path="$path"
23156
23157 windows_path="$new_path"
23158 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23159 unix_path=`$CYGPATH -u "$windows_path"`
23160 new_path="$unix_path"
23161 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23162 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23163 new_path="$unix_path"
23164 fi
23165
23166
23167 new_path=`$WHICH "$new_path" 2> /dev/null`
23168
23169 if test "x$new_path" = x; then
23170 # It's still not found. Now this is an unrecoverable error.
23171 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23172 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23173 has_space=`$ECHO "$complete" | $GREP " "`
23174 if test "x$has_space" != x; then
23175 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23176 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23177 fi
23178 as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23179 fi
23180 fi
23181
23182 # Now new_path has a complete unix path to the binary
23183 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23184 # Keep paths in /bin as-is, but remove trailing .exe if any
23185 new_path="${new_path/%.exe/}"
23186 # Do not save /bin paths to all_fixpath_prefixes!
23187 else
23188 # Not in mixed or Windows style, start by that.
23189 new_path=`cmd //c echo $new_path`
23190
23191 input_path="$new_path"
23192 # Check if we need to convert this using DOS-style short mode. If the path
23193 # contains just simple characters, use it. Otherwise (spaces, weird characters),
23194 # take no chances and rewrite it.
23195 # Note: m4 eats our [], so we need to use [ and ] instead.
23196 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23197 if test "x$has_forbidden_chars" != x; then
23198 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23199 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23200 fi
23201
23202 # Output is in $new_path
23203
23204 windows_path="$new_path"
23205 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23206 unix_path=`$CYGPATH -u "$windows_path"`
23207 new_path="$unix_path"
23208 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23209 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23210 new_path="$unix_path"
23211 fi
23212
23213 # remove trailing .exe if any
23214 new_path="${new_path/%.exe/}"
23215
23216 # Save the first 10 bytes of this path to the storage, so fixpath can work.
23217 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23218 fi
23219
23220 else
23221 # We're on a posix platform. Hooray! :)
23222 # First separate the path from the arguments. This will split at the first
23223 # space.
23224 complete="$RC"
23225 path="${complete%% *}"
23226 tmp="$complete EOL"
23227 arguments="${tmp#* }"
23228
23229 # Cannot rely on the command "which" here since it doesn't always work.
23230 is_absolute_path=`$ECHO "$path" | $GREP ^/`
23231 if test -z "$is_absolute_path"; then
23232 # Path to executable is not absolute. Find it.
23233 IFS_save="$IFS"
23234 IFS=:
23235 for p in $PATH; do
23236 if test -f "$p/$path" && test -x "$p/$path"; then
23237 new_path="$p/$path"
23238 break
23239 fi
23240 done
23241 IFS="$IFS_save"
23242 else
23243 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23244 $as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23245 new_path="$path"
23246 fi
23247
23248 if test "x$new_path" = x; then
23249 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23250 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23251 has_space=`$ECHO "$complete" | $GREP " "`
23252 if test "x$has_space" != x; then
23253 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23254 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23255 fi
23256 as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23257 fi
23258 fi
23259
23260 # Now join together the path and the arguments once again
23261 if test "x$arguments" != xEOL; then
23262 new_complete="$new_path ${arguments% *}"
23263 else
23264 new_complete="$new_path"
23265 fi
23266
23267 if test "x$complete" != "x$new_complete"; then
23268 RC="$new_complete"
23269 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23270 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23271 fi
23272
23273
23274 # For hotspot, we need these in Windows mixed path,
23275 # so rewrite them all. Need added .exe suffix.
23276 HOTSPOT_CXX="$CXX.exe"
23277 HOTSPOT_LD="$LD.exe"
23278 HOTSPOT_MT="$MT.exe"
23279 HOTSPOT_RC="$RC.exe"
23280
23281 unix_path="$HOTSPOT_CXX"
23282 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23283 windows_path=`$CYGPATH -m "$unix_path"`
23284 HOTSPOT_CXX="$windows_path"
23285 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23286 windows_path=`cmd //c echo $unix_path`
23287 HOTSPOT_CXX="$windows_path"
23288 fi
23289
23290
23291 unix_path="$HOTSPOT_LD"
23292 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23293 windows_path=`$CYGPATH -m "$unix_path"`
23294 HOTSPOT_LD="$windows_path"
23295 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23296 windows_path=`cmd //c echo $unix_path`
23297 HOTSPOT_LD="$windows_path"
23298 fi
23299
23300
23301 unix_path="$HOTSPOT_MT"
23302 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23303 windows_path=`$CYGPATH -m "$unix_path"`
23304 HOTSPOT_MT="$windows_path"
23305 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23306 windows_path=`cmd //c echo $unix_path`
23307 HOTSPOT_MT="$windows_path"
23308 fi
23309
23310
23311 unix_path="$HOTSPOT_RC"
23312 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23313 windows_path=`$CYGPATH -m "$unix_path"`
23314 HOTSPOT_RC="$windows_path"
23315 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23316 windows_path=`cmd //c echo $unix_path`
23317 HOTSPOT_RC="$windows_path"
23318 fi
23319
23320
23321
23322
23323 RC_FLAGS="-nologo -l 0x409 -r"
23324 if test "x$VARIANT" = xOPT; then :
23325
23326 RC_FLAGS="$RC_FLAGS -d NDEBUG"
23327
23328 fi
23329 JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
23330 if test "x$JDK_UPDATE_VERSION" = x; then :
23331
23332 JDK_UPDATE_VERSION_NOTNULL=0
23333
23334 fi
23335 RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
23336 RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
23337 RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
23338 RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
23339 RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
23340 RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
23341 RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
23342
23343 # lib.exe is used to create static libraries.
23344 # Extract the first word of "lib", so it can be a program name with args.
23345 set dummy lib; ac_word=$2
23346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23347 $as_echo_n "checking for $ac_word... " >&6; }
23348 if ${ac_cv_prog_WINAR+:} false; then :
23349 $as_echo_n "(cached) " >&6
23350 else
23351 if test -n "$WINAR"; then
23352 ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
23353 else
23354 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23355 for as_dir in $PATH
23356 do
23357 IFS=$as_save_IFS
23358 test -z "$as_dir" && as_dir=.
23359 for ac_exec_ext in '' $ac_executable_extensions; do
23360 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23361 ac_cv_prog_WINAR="lib"
23362 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23363 break 2
23364 fi
23365 done
23366 done
23367 IFS=$as_save_IFS
23368
23369 fi
23370 fi
23371 WINAR=$ac_cv_prog_WINAR
23372 if test -n "$WINAR"; then
23373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
23374 $as_echo "$WINAR" >&6; }
23375 else
23376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23377 $as_echo "no" >&6; }
23378 fi
23379
23380
23381
23382 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23383
23384 # First separate the path from the arguments. This will split at the first
23385 # space.
23386 complete="$WINAR"
23387 path="${complete%% *}"
23388 tmp="$complete EOL"
23389 arguments="${tmp#* }"
23390
23391 # Input might be given as Windows format, start by converting to
23392 # unix format.
23393 new_path=`$CYGPATH -u "$path"`
23394
23395 # Now try to locate executable using which
23396 new_path=`$WHICH "$new_path" 2> /dev/null`
23397 # bat and cmd files are not always considered executable in cygwin causing which
23398 # to not find them
23399 if test "x$new_path" = x \
23400 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23401 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23402 new_path=`$CYGPATH -u "$path"`
23403 fi
23404 if test "x$new_path" = x; then
23405 # Oops. Which didn't find the executable.
23406 # The splitting of arguments from the executable at a space might have been incorrect,
23407 # since paths with space are more likely in Windows. Give it another try with the whole
23408 # argument.
23409 path="$complete"
23410 arguments="EOL"
23411 new_path=`$CYGPATH -u "$path"`
23412 new_path=`$WHICH "$new_path" 2> /dev/null`
23413 # bat and cmd files are not always considered executable in cygwin causing which
23414 # to not find them
23415 if test "x$new_path" = x \
23416 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23417 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23418 new_path=`$CYGPATH -u "$path"`
23419 fi
23420 if test "x$new_path" = x; then
23421 # It's still not found. Now this is an unrecoverable error.
23422 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23423 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23424 has_space=`$ECHO "$complete" | $GREP " "`
23425 if test "x$has_space" != x; then
23426 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23427 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23428 fi
23429 as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23430 fi
23431 fi
23432
23433 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23434 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23435 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23436 # "foo.exe" is OK but "foo" is an error.
23437 #
23438 # This test is therefore slightly more accurate than "test -f" to check for file precense.
23439 # It is also a way to make sure we got the proper file name for the real test later on.
23440 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23441 if test "x$test_shortpath" = x; then
23442 # Short path failed, file does not exist as specified.
23443 # Try adding .exe or .cmd
23444 if test -f "${new_path}.exe"; then
23445 input_to_shortpath="${new_path}.exe"
23446 elif test -f "${new_path}.cmd"; then
23447 input_to_shortpath="${new_path}.cmd"
23448 else
23449 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
23450 $as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
23451 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23452 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23453 as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23454 fi
23455 else
23456 input_to_shortpath="$new_path"
23457 fi
23458
23459 # Call helper function which possibly converts this using DOS-style short mode.
23460 # If so, the updated path is stored in $new_path.
23461 new_path="$input_to_shortpath"
23462
23463 input_path="$input_to_shortpath"
23464 # Check if we need to convert this using DOS-style short mode. If the path
23465 # contains just simple characters, use it. Otherwise (spaces, weird characters),
23466 # take no chances and rewrite it.
23467 # Note: m4 eats our [], so we need to use [ and ] instead.
23468 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23469 if test "x$has_forbidden_chars" != x; then
23470 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23471 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23472 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23473 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23474 # Going to short mode and back again did indeed matter. Since short mode is
23475 # case insensitive, let's make it lowercase to improve readability.
23476 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23477 # Now convert it back to Unix-stile (cygpath)
23478 input_path=`$CYGPATH -u "$shortmode_path"`
23479 new_path="$input_path"
23480 fi
23481 fi
23482
23483 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23484 if test "x$test_cygdrive_prefix" = x; then
23485 # As a simple fix, exclude /usr/bin since it's not a real path.
23486 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23487 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23488 # a path prefixed by /cygdrive for fixpath to work.
23489 new_path="$CYGWIN_ROOT_PATH$input_path"
23490 fi
23491 fi
23492
23493 # remove trailing .exe if any
23494 new_path="${new_path/%.exe/}"
23495
23496 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23497
23498 # First separate the path from the arguments. This will split at the first
23499 # space.
23500 complete="$WINAR"
23501 path="${complete%% *}"
23502 tmp="$complete EOL"
23503 arguments="${tmp#* }"
23504
23505 # Input might be given as Windows format, start by converting to
23506 # unix format.
23507 new_path="$path"
23508
23509 windows_path="$new_path"
23510 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23511 unix_path=`$CYGPATH -u "$windows_path"`
23512 new_path="$unix_path"
23513 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23514 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23515 new_path="$unix_path"
23516 fi
23517
23518
23519 # Now try to locate executable using which
23520 new_path=`$WHICH "$new_path" 2> /dev/null`
23521
23522 if test "x$new_path" = x; then
23523 # Oops. Which didn't find the executable.
23524 # The splitting of arguments from the executable at a space might have been incorrect,
23525 # since paths with space are more likely in Windows. Give it another try with the whole
23526 # argument.
23527 path="$complete"
23528 arguments="EOL"
23529 new_path="$path"
23530
23531 windows_path="$new_path"
23532 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23533 unix_path=`$CYGPATH -u "$windows_path"`
23534 new_path="$unix_path"
23535 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23536 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23537 new_path="$unix_path"
23538 fi
23539
23540
23541 new_path=`$WHICH "$new_path" 2> /dev/null`
23542
23543 if test "x$new_path" = x; then
23544 # It's still not found. Now this is an unrecoverable error.
23545 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23546 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23547 has_space=`$ECHO "$complete" | $GREP " "`
23548 if test "x$has_space" != x; then
23549 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23550 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23551 fi
23552 as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23553 fi
23554 fi
23555
23556 # Now new_path has a complete unix path to the binary
23557 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23558 # Keep paths in /bin as-is, but remove trailing .exe if any
23559 new_path="${new_path/%.exe/}"
23560 # Do not save /bin paths to all_fixpath_prefixes!
23561 else
23562 # Not in mixed or Windows style, start by that.
23563 new_path=`cmd //c echo $new_path`
23564
23565 input_path="$new_path"
23566 # Check if we need to convert this using DOS-style short mode. If the path
23567 # contains just simple characters, use it. Otherwise (spaces, weird characters),
23568 # take no chances and rewrite it.
23569 # Note: m4 eats our [], so we need to use [ and ] instead.
23570 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23571 if test "x$has_forbidden_chars" != x; then
23572 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23573 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23574 fi
23575
23576 # Output is in $new_path
23577
23578 windows_path="$new_path"
23579 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23580 unix_path=`$CYGPATH -u "$windows_path"`
23581 new_path="$unix_path"
23582 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23583 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23584 new_path="$unix_path"
23585 fi
23586
23587 # remove trailing .exe if any
23588 new_path="${new_path/%.exe/}"
23589
23590 # Save the first 10 bytes of this path to the storage, so fixpath can work.
23591 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23592 fi
23593
23594 else
23595 # We're on a posix platform. Hooray! :)
23596 # First separate the path from the arguments. This will split at the first
23597 # space.
23598 complete="$WINAR"
23599 path="${complete%% *}"
23600 tmp="$complete EOL"
23601 arguments="${tmp#* }"
23602
23603 # Cannot rely on the command "which" here since it doesn't always work.
23604 is_absolute_path=`$ECHO "$path" | $GREP ^/`
23605 if test -z "$is_absolute_path"; then
23606 # Path to executable is not absolute. Find it.
23607 IFS_save="$IFS"
23608 IFS=:
23609 for p in $PATH; do
23610 if test -f "$p/$path" && test -x "$p/$path"; then
23611 new_path="$p/$path"
23612 break
23613 fi
23614 done
23615 IFS="$IFS_save"
23616 else
23617 { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
23618 $as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
23619 new_path="$path"
23620 fi
23621
23622 if test "x$new_path" = x; then
23623 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23624 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23625 has_space=`$ECHO "$complete" | $GREP " "`
23626 if test "x$has_space" != x; then
23627 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23628 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23629 fi
23630 as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23631 fi
23632 fi
23633
23634 # Now join together the path and the arguments once again
23635 if test "x$arguments" != xEOL; then
23636 new_complete="$new_path ${arguments% *}"
23637 else
23638 new_complete="$new_path"
23639 fi
23640
23641 if test "x$complete" != "x$new_complete"; then
23642 WINAR="$new_complete"
23643 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
23644 $as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
23645 fi
23646
23647 AR="$WINAR"
23648 ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
23649
23650 # Extract the first word of "dumpbin", so it can be a program name with args.
23651 set dummy dumpbin; ac_word=$2
23652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23653 $as_echo_n "checking for $ac_word... " >&6; }
23654 if ${ac_cv_prog_DUMPBIN+:} false; then :
23655 $as_echo_n "(cached) " >&6
23656 else
23657 if test -n "$DUMPBIN"; then
23658 ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
23659 else
23660 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23661 for as_dir in $PATH
23662 do
23663 IFS=$as_save_IFS
23664 test -z "$as_dir" && as_dir=.
23665 for ac_exec_ext in '' $ac_executable_extensions; do
23666 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23667 ac_cv_prog_DUMPBIN="dumpbin"
23668 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23669 break 2
23670 fi
23671 done
23672 done
23673 IFS=$as_save_IFS
23674
23675 fi
23676 fi
23677 DUMPBIN=$ac_cv_prog_DUMPBIN
23678 if test -n "$DUMPBIN"; then
23679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
23680 $as_echo "$DUMPBIN" >&6; }
23681 else
23682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23683 $as_echo "no" >&6; }
23684 fi
23685
23686
23687
23688 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23689
23690 # First separate the path from the arguments. This will split at the first
23691 # space.
23692 complete="$DUMPBIN"
23693 path="${complete%% *}"
23694 tmp="$complete EOL"
23695 arguments="${tmp#* }"
23696
23697 # Input might be given as Windows format, start by converting to
23698 # unix format.
23699 new_path=`$CYGPATH -u "$path"`
23700
23701 # Now try to locate executable using which
23702 new_path=`$WHICH "$new_path" 2> /dev/null`
23703 # bat and cmd files are not always considered executable in cygwin causing which
23704 # to not find them
23705 if test "x$new_path" = x \
23706 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23707 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23708 new_path=`$CYGPATH -u "$path"`
23709 fi
23710 if test "x$new_path" = x; then
23711 # Oops. Which didn't find the executable.
23712 # The splitting of arguments from the executable at a space might have been incorrect,
23713 # since paths with space are more likely in Windows. Give it another try with the whole
23714 # argument.
23715 path="$complete"
23716 arguments="EOL"
23717 new_path=`$CYGPATH -u "$path"`
23718 new_path=`$WHICH "$new_path" 2> /dev/null`
23719 # bat and cmd files are not always considered executable in cygwin causing which
23720 # to not find them
23721 if test "x$new_path" = x \
23722 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23723 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23724 new_path=`$CYGPATH -u "$path"`
23725 fi
23726 if test "x$new_path" = x; then
23727 # It's still not found. Now this is an unrecoverable error.
23728 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23729 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23730 has_space=`$ECHO "$complete" | $GREP " "`
23731 if test "x$has_space" != x; then
23732 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23733 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23734 fi
23735 as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23736 fi
23737 fi
23738
23739 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23740 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23741 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23742 # "foo.exe" is OK but "foo" is an error.
23743 #
23744 # This test is therefore slightly more accurate than "test -f" to check for file precense.
23745 # It is also a way to make sure we got the proper file name for the real test later on.
23746 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23747 if test "x$test_shortpath" = x; then
23748 # Short path failed, file does not exist as specified.
23749 # Try adding .exe or .cmd
23750 if test -f "${new_path}.exe"; then
23751 input_to_shortpath="${new_path}.exe"
23752 elif test -f "${new_path}.cmd"; then
23753 input_to_shortpath="${new_path}.cmd"
23754 else
23755 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
23756 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
23757 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23758 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23759 as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23760 fi
23761 else
23762 input_to_shortpath="$new_path"
23763 fi
23764
23765 # Call helper function which possibly converts this using DOS-style short mode.
23766 # If so, the updated path is stored in $new_path.
23767 new_path="$input_to_shortpath"
23768
23769 input_path="$input_to_shortpath"
23770 # Check if we need to convert this using DOS-style short mode. If the path
23771 # contains just simple characters, use it. Otherwise (spaces, weird characters),
23772 # take no chances and rewrite it.
23773 # Note: m4 eats our [], so we need to use [ and ] instead.
23774 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23775 if test "x$has_forbidden_chars" != x; then
23776 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23777 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23778 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23779 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23780 # Going to short mode and back again did indeed matter. Since short mode is
23781 # case insensitive, let's make it lowercase to improve readability.
23782 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23783 # Now convert it back to Unix-stile (cygpath)
23784 input_path=`$CYGPATH -u "$shortmode_path"`
23785 new_path="$input_path"
23786 fi
23787 fi
23788
23789 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23790 if test "x$test_cygdrive_prefix" = x; then
23791 # As a simple fix, exclude /usr/bin since it's not a real path.
23792 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23793 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23794 # a path prefixed by /cygdrive for fixpath to work.
23795 new_path="$CYGWIN_ROOT_PATH$input_path"
23796 fi
23797 fi
23798
23799 # remove trailing .exe if any
23800 new_path="${new_path/%.exe/}"
23801
23802 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23803
23804 # First separate the path from the arguments. This will split at the first
23805 # space.
23806 complete="$DUMPBIN"
23807 path="${complete%% *}"
23808 tmp="$complete EOL"
23809 arguments="${tmp#* }"
23810
23811 # Input might be given as Windows format, start by converting to
23812 # unix format.
23813 new_path="$path"
23814
23815 windows_path="$new_path"
23816 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23817 unix_path=`$CYGPATH -u "$windows_path"`
23818 new_path="$unix_path"
23819 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23820 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23821 new_path="$unix_path"
23822 fi
23823
23824
23825 # Now try to loca