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 LLVM_LIBS
 621 LLVM_LDFLAGS
 622 LLVM_CFLAGS
 623 LLVM_CONFIG
 624 LIBFFI_LIBS
 625 LIBFFI_CFLAGS
 626 STATIC_CXX_SETTING
 627 LIBDL
 628 LIBM
 629 LIBZIP_CAN_USE_MMAP
 630 USE_EXTERNAL_LIBZ
 631 USE_EXTERNAL_LIBGIF
 632 USE_EXTERNAL_LIBJPEG
 633 ALSA_LIBS
 634 ALSA_CFLAGS
 635 FREETYPE2_LIB_PATH
 636 USING_SYSTEM_FT_LIB
 637 FREETYPE2_LIBS
 638 FREETYPE2_CFLAGS
 639 CUPS_CFLAGS
 640 OPENWIN_HOME
 641 X_EXTRA_LIBS
 642 X_LIBS
 643 X_PRE_LIBS
 644 X_CFLAGS
 645 XMKMF
 646 CXXFLAGS_DEBUG_SYMBOLS
 647 CFLAGS_DEBUG_SYMBOLS
 648 ZIP_DEBUGINFO_FILES
 649 ENABLE_DEBUG_SYMBOLS
 650 LDFLAGS_CXX_JDK
 651 LDFLAGS_JDKEXE_SUFFIX
 652 LDFLAGS_JDKLIB_SUFFIX
 653 LDFLAGS_JDKEXE
 654 LDFLAGS_JDKLIB
 655 CXXFLAGS_JDKEXE
 656 CXXFLAGS_JDKLIB
 657 CFLAGS_JDKEXE
 658 CFLAGS_JDKLIB
 659 MACOSX_VERSION_MIN
 660 PACKAGE_PATH
 661 LEGACY_EXTRA_LDFLAGS
 662 LEGACY_EXTRA_CXXFLAGS
 663 LEGACY_EXTRA_CFLAGS
 664 CXX_FLAG_DEPS
 665 C_FLAG_DEPS
 666 CXX_O_FLAG_NONE
 667 CXX_O_FLAG_NORM
 668 CXX_O_FLAG_HI
 669 CXX_O_FLAG_HIGHEST
 670 C_O_FLAG_NONE
 671 C_O_FLAG_NORM
 672 C_O_FLAG_HI
 673 C_O_FLAG_HIGHEST
 674 POST_MCS_CMD
 675 POST_STRIP_CMD
 676 SET_EXECUTABLE_ORIGIN
 677 SET_SHARED_LIBRARY_ORIGIN
 678 CXX_FLAG_REORDER
 679 C_FLAG_REORDER
 680 SET_SHARED_LIBRARY_MAPFILE
 681 SET_SHARED_LIBRARY_NAME
 682 SHARED_LIBRARY_FLAGS
 683 EXE_SUFFIX
 684 STATIC_LIBRARY_SUFFIX
 685 SHARED_LIBRARY_SUFFIX
 686 LIBRARY_PREFIX
 687 STATIC_LIBRARY
 688 SHARED_LIBRARY
 689 OBJ_SUFFIX
 690 LIPO
 691 ac_ct_OBJDUMP
 692 OBJDUMP
 693 ac_ct_OBJCOPY
 694 OBJCOPY
 695 MCS
 696 STRIP
 697 NM
 698 AS
 699 CXXCPP
 700 CPP
 701 COMPILER_TYPE
 702 RC_FLAGS
 703 DUMPBIN
 704 WINAR
 705 HOTSPOT_RC
 706 HOTSPOT_MT
 707 RC
 708 MT
 709 WINLD
 710 HOTSPOT_LD
 711 HOTSPOT_CXX
 712 ARFLAGS
 713 AR
 714 LDEXECXX
 715 LDCXX
 716 LDEXE
 717 LD
 718 ac_ct_OBJC
 719 OBJCFLAGS
 720 OBJC
 721 ac_ct_CXX
 722 CXXFLAGS
 723 CXX
 724 ac_ct_PROPER_COMPILER_CXX
 725 PROPER_COMPILER_CXX
 726 POTENTIAL_CXX
 727 TOOLS_DIR_CXX
 728 OBJEXT
 729 EXEEXT
 730 ac_ct_CC
 731 CPPFLAGS
 732 LDFLAGS
 733 CFLAGS
 734 CC
 735 ac_ct_PROPER_COMPILER_CC
 736 PROPER_COMPILER_CC
 737 POTENTIAL_CC
 738 TOOLS_DIR_CC
 739 BUILD_LD
 740 BUILD_CXX
 741 BUILD_CC
 742 MSVCR_DLL
 743 DXSDK_INCLUDE_PATH
 744 DXSDK_LIB_PATH
 745 VS_PATH
 746 VS_LIB
 747 VS_INCLUDE
 748 CYGWIN_LINK
 749 AR_OUT_OPTION
 750 LD_OUT_OPTION
 751 EXE_OUT_OPTION
 752 CC_OUT_OPTION
 753 BUILD_HOTSPOT
 754 HOTSPOT_DIST
 755 BUILD_OUTPUT
 756 OVERRIDE_SRC_ROOT
 757 ADD_SRC_ROOT
 758 JDK_TOPDIR
 759 NASHORN_TOPDIR
 760 HOTSPOT_TOPDIR
 761 JAXWS_TOPDIR
 762 JAXP_TOPDIR
 763 CORBA_TOPDIR
 764 LANGTOOLS_TOPDIR
 765 BOOT_JDK_JVMARGS
 766 JAVAC_FLAGS
 767 BOOT_JDK_SOURCETARGET
 768 BOOT_JDK
 769 BOOT_TOOLSJAR
 770 BOOT_RTJAR
 771 JAVA_CHECK
 772 JAVAC_CHECK
 773 COOKED_BUILD_NUMBER
 774 JDK_VERSION
 775 COPYRIGHT_YEAR
 776 MACOSX_BUNDLE_ID_BASE
 777 MACOSX_BUNDLE_NAME_BASE
 778 COMPANY_NAME
 779 JDK_RC_PLATFORM_NAME
 780 PRODUCT_SUFFIX
 781 PRODUCT_NAME
 782 LAUNCHER_NAME
 783 MILESTONE
 784 JDK_BUILD_NUMBER
 785 JDK_UPDATE_VERSION
 786 JDK_MICRO_VERSION
 787 JDK_MINOR_VERSION
 788 JDK_MAJOR_VERSION
 789 USER_RELEASE_SUFFIX
 790 COMPRESS_JARS
 791 UNLIMITED_CRYPTO
 792 CACERTS_FILE
 793 TEST_IN_BUILD
 794 BUILD_HEADLESS
 795 SUPPORT_HEADFUL
 796 SUPPORT_HEADLESS
 797 BDEPS_FTP
 798 BDEPS_UNZIP
 799 OS_VERSION_MICRO
 800 OS_VERSION_MINOR
 801 OS_VERSION_MAJOR
 802 PKG_CONFIG
 803 TIME
 804 STAT
 805 HG
 806 READELF
 807 OTOOL
 808 LDD
 809 ZIP
 810 UNZIP
 811 FIND_DELETE
 812 MAKE
 813 CHECK_TOOLSDIR_MAKE
 814 CHECK_TOOLSDIR_GMAKE
 815 CHECK_MAKE
 816 CHECK_GMAKE
 817 PKGHANDLER
 818 OUTPUT_ROOT
 819 CONF_NAME
 820 SPEC
 821 BUILD_VARIANT_RELEASE
 822 DEBUG_CLASSFILES
 823 FASTDEBUG
 824 VARIANT
 825 DEBUG_LEVEL
 826 MACOSX_UNIVERSAL
 827 JVM_VARIANT_ZEROSHARK
 828 JVM_VARIANT_ZERO
 829 JVM_VARIANT_KERNEL
 830 JVM_VARIANT_MINIMAL1
 831 JVM_VARIANT_CLIENT
 832 JVM_VARIANT_SERVER
 833 JVM_VARIANTS
 834 JDK_VARIANT
 835 SET_OPENJDK
 836 BUILD_LOG_WRAPPER
 837 BUILD_LOG_PREVIOUS
 838 BUILD_LOG
 839 SYS_ROOT
 840 PATH_SEP
 841 SRC_ROOT
 842 ZERO_ARCHDEF
 843 ZERO_ARCHFLAG
 844 DEFINE_CROSS_COMPILE_ARCH
 845 LP64
 846 OPENJDK_TARGET_OS_API_DIR
 847 OPENJDK_TARGET_CPU_JLI_CFLAGS
 848 OPENJDK_TARGET_CPU_OSARCH
 849 OPENJDK_TARGET_CPU_ISADIR
 850 OPENJDK_TARGET_CPU_LIBDIR
 851 OPENJDK_TARGET_CPU_LEGACY_LIB
 852 OPENJDK_TARGET_CPU_LEGACY
 853 REQUIRED_OS_VERSION
 854 REQUIRED_OS_NAME
 855 COMPILE_TYPE
 856 OPENJDK_TARGET_CPU_ENDIAN
 857 OPENJDK_TARGET_CPU_BITS
 858 OPENJDK_TARGET_CPU_ARCH
 859 OPENJDK_TARGET_CPU
 860 OPENJDK_TARGET_OS_API
 861 OPENJDK_TARGET_OS
 862 OPENJDK_BUILD_CPU_ENDIAN
 863 OPENJDK_BUILD_CPU_BITS
 864 OPENJDK_BUILD_CPU_ARCH
 865 OPENJDK_BUILD_CPU
 866 OPENJDK_BUILD_OS_API
 867 OPENJDK_BUILD_OS
 868 OPENJDK_BUILD_AUTOCONF_NAME
 869 OPENJDK_TARGET_AUTOCONF_NAME
 870 target_os
 871 target_vendor
 872 target_cpu
 873 target
 874 host_os
 875 host_vendor
 876 host_cpu
 877 host
 878 build_os
 879 build_vendor
 880 build_cpu
 881 build
 882 SETFILE
 883 DF
 884 READLINK
 885 CYGPATH
 886 NAWK
 887 SED
 888 FGREP
 889 EGREP
 890 GREP
 891 AWK
 892 XARGS
 893 WHICH
 894 WC
 895 UNIQ
 896 UNAME
 897 TR
 898 TOUCH
 899 TEE
 900 TAR
 901 TAIL
 902 SORT
 903 SH
 904 RM
 905 THEPWDCMD
 906 PRINTF
 907 MV
 908 MKTEMP
 909 MKDIR
 910 LS
 911 LN
 912 HEAD
 913 FIND
 914 FILE
 915 EXPR
 916 ECHO
 917 DIRNAME
 918 DIFF
 919 DATE
 920 CUT
 921 CPIO
 922 CP
 923 COMM
 924 CMP
 925 CHMOD
 926 CAT
 927 BASH
 928 BASENAME
 929 DATE_WHEN_CONFIGURED
 930 CONFIGURE_COMMAND_LINE
 931 CUSTOM_MAKE_DIR
 932 target_alias
 933 host_alias
 934 build_alias
 935 LIBS
 936 ECHO_T
 937 ECHO_N
 938 ECHO_C
 939 DEFS
 940 mandir
 941 localedir
 942 libdir
 943 psdir
 944 pdfdir
 945 dvidir
 946 htmldir
 947 infodir
 948 docdir
 949 oldincludedir
 950 includedir
 951 localstatedir
 952 sharedstatedir
 953 sysconfdir
 954 datadir
 955 datarootdir
 956 libexecdir
 957 sbindir
 958 bindir
 959 program_transform_name
 960 prefix
 961 exec_prefix
 962 PACKAGE_URL
 963 PACKAGE_BUGREPORT
 964 PACKAGE_STRING
 965 PACKAGE_VERSION
 966 PACKAGE_TARNAME
 967 PACKAGE_NAME
 968 PATH_SEPARATOR
 969 SHELL'
 970 ac_subst_files=''
 971 ac_user_opts='
 972 enable_option_checking
 973 with_custom_make_dir
 974 with_target_bits
 975 with_sys_root
 976 with_tools_dir
 977 with_devkit
 978 enable_openjdk_only
 979 with_jdk_variant
 980 with_jvm_variants
 981 enable_debug
 982 with_debug_level
 983 with_conf_name
 984 with_builddeps_conf
 985 with_builddeps_server
 986 with_builddeps_dir
 987 with_builddeps_group
 988 enable_headful
 989 enable_hotspot_test_in_build
 990 with_cacerts_file
 991 enable_unlimited_crypto
 992 with_milestone
 993 with_build_number
 994 with_user_release_suffix
 995 with_boot_jdk
 996 with_boot_jdk_jvmargs
 997 with_add_source_root
 998 with_override_source_root
 999 with_adds_and_overrides
1000 with_override_langtools
1001 with_override_corba
1002 with_override_jaxp
1003 with_override_jaxws
1004 with_override_hotspot
1005 with_override_jdk
1006 with_import_hotspot
1007 with_msvcr_dll
1008 with_dxsdk
1009 with_dxsdk_lib
1010 with_dxsdk_include
1011 with_extra_cflags
1012 with_extra_cxxflags
1013 with_extra_ldflags
1014 enable_debug_symbols
1015 enable_zip_debug_info
1016 enable_macosx_runtime_support
1017 with_x
1018 with_cups
1019 with_cups_include
1020 with_freetype
1021 with_alsa
1022 with_alsa_include
1023 with_alsa_lib
1024 with_zlib
1025 with_stdc__lib
1026 with_num_cores
1027 with_memory_size
1028 with_jobs
1029 with_sjavac_server_java
1030 with_sjavac_server_cores
1031 enable_sjavac
1032 enable_precompiled_headers
1033 enable_ccache
1034 with_ccache_dir
1035 '
1036       ac_precious_vars='build_alias
1037 host_alias
1038 target_alias
1039 PKG_CONFIG
1040 CC
1041 CFLAGS
1042 LDFLAGS
1043 LIBS
1044 CPPFLAGS
1045 CXX
1046 CXXFLAGS
1047 CCC
1048 OBJC
1049 OBJCFLAGS
1050 CPP
1051 CXXCPP
1052 XMKMF
1053 FREETYPE2_CFLAGS
1054 FREETYPE2_LIBS
1055 ALSA_CFLAGS
1056 ALSA_LIBS
1057 LIBFFI_CFLAGS
1058 LIBFFI_LIBS'
1059 
1060 
1061 # Initialize some variables set by options.
1062 ac_init_help=
1063 ac_init_version=false
1064 ac_unrecognized_opts=
1065 ac_unrecognized_sep=
1066 # The variables have the same names as the options, with
1067 # dashes changed to underlines.
1068 cache_file=/dev/null
1069 exec_prefix=NONE
1070 no_create=
1071 no_recursion=
1072 prefix=NONE
1073 program_prefix=NONE
1074 program_suffix=NONE
1075 program_transform_name=s,x,x,
1076 silent=
1077 site=
1078 srcdir=
1079 verbose=
1080 x_includes=NONE
1081 x_libraries=NONE
1082 
1083 # Installation directory options.
1084 # These are left unexpanded so users can "make install exec_prefix=/foo"
1085 # and all the variables that are supposed to be based on exec_prefix
1086 # by default will actually change.
1087 # Use braces instead of parens because sh, perl, etc. also accept them.
1088 # (The list follows the same order as the GNU Coding Standards.)
1089 bindir='${exec_prefix}/bin'
1090 sbindir='${exec_prefix}/sbin'
1091 libexecdir='${exec_prefix}/libexec'
1092 datarootdir='${prefix}/share'
1093 datadir='${datarootdir}'
1094 sysconfdir='${prefix}/etc'
1095 sharedstatedir='${prefix}/com'
1096 localstatedir='${prefix}/var'
1097 includedir='${prefix}/include'
1098 oldincludedir='/usr/include'
1099 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1100 infodir='${datarootdir}/info'
1101 htmldir='${docdir}'
1102 dvidir='${docdir}'
1103 pdfdir='${docdir}'
1104 psdir='${docdir}'
1105 libdir='${exec_prefix}/lib'
1106 localedir='${datarootdir}/locale'
1107 mandir='${datarootdir}/man'
1108 
1109 ac_prev=
1110 ac_dashdash=
1111 for ac_option
1112 do
1113   # If the previous option needs an argument, assign it.
1114   if test -n "$ac_prev"; then
1115     eval $ac_prev=\$ac_option
1116     ac_prev=
1117     continue
1118   fi
1119 
1120   case $ac_option in
1121   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1122   *=)   ac_optarg= ;;
1123   *)    ac_optarg=yes ;;
1124   esac
1125 
1126   # Accept the important Cygnus configure options, so we can diagnose typos.
1127 
1128   case $ac_dashdash$ac_option in
1129   --)
1130     ac_dashdash=yes ;;
1131 
1132   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1133     ac_prev=bindir ;;
1134   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1135     bindir=$ac_optarg ;;
1136 
1137   -build | --build | --buil | --bui | --bu)
1138     ac_prev=build_alias ;;
1139   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1140     build_alias=$ac_optarg ;;
1141 
1142   -cache-file | --cache-file | --cache-fil | --cache-fi \
1143   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1144     ac_prev=cache_file ;;
1145   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1146   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1147     cache_file=$ac_optarg ;;
1148 
1149   --config-cache | -C)
1150     cache_file=config.cache ;;
1151 
1152   -datadir | --datadir | --datadi | --datad)
1153     ac_prev=datadir ;;
1154   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1155     datadir=$ac_optarg ;;
1156 
1157   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1158   | --dataroo | --dataro | --datar)
1159     ac_prev=datarootdir ;;
1160   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1161   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1162     datarootdir=$ac_optarg ;;
1163 
1164   -disable-* | --disable-*)
1165     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1166     # Reject names that are not valid shell variable names.
1167     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1168       as_fn_error $? "invalid feature name: $ac_useropt"
1169     ac_useropt_orig=$ac_useropt
1170     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1171     case $ac_user_opts in
1172       *"
1173 "enable_$ac_useropt"
1174 "*) ;;
1175       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1176          ac_unrecognized_sep=', ';;
1177     esac
1178     eval enable_$ac_useropt=no ;;
1179 
1180   -docdir | --docdir | --docdi | --doc | --do)
1181     ac_prev=docdir ;;
1182   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1183     docdir=$ac_optarg ;;
1184 
1185   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1186     ac_prev=dvidir ;;
1187   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1188     dvidir=$ac_optarg ;;
1189 
1190   -enable-* | --enable-*)
1191     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1192     # Reject names that are not valid shell variable names.
1193     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1194       as_fn_error $? "invalid feature name: $ac_useropt"
1195     ac_useropt_orig=$ac_useropt
1196     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1197     case $ac_user_opts in
1198       *"
1199 "enable_$ac_useropt"
1200 "*) ;;
1201       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1202          ac_unrecognized_sep=', ';;
1203     esac
1204     eval enable_$ac_useropt=\$ac_optarg ;;
1205 
1206   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1207   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1208   | --exec | --exe | --ex)
1209     ac_prev=exec_prefix ;;
1210   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1211   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1212   | --exec=* | --exe=* | --ex=*)
1213     exec_prefix=$ac_optarg ;;
1214 
1215   -gas | --gas | --ga | --g)
1216     # Obsolete; use --with-gas.
1217     with_gas=yes ;;
1218 
1219   -help | --help | --hel | --he | -h)
1220     ac_init_help=long ;;
1221   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1222     ac_init_help=recursive ;;
1223   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1224     ac_init_help=short ;;
1225 
1226   -host | --host | --hos | --ho)
1227     ac_prev=host_alias ;;
1228   -host=* | --host=* | --hos=* | --ho=*)
1229     host_alias=$ac_optarg ;;
1230 
1231   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1232     ac_prev=htmldir ;;
1233   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1234   | --ht=*)
1235     htmldir=$ac_optarg ;;
1236 
1237   -includedir | --includedir | --includedi | --included | --include \
1238   | --includ | --inclu | --incl | --inc)
1239     ac_prev=includedir ;;
1240   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1241   | --includ=* | --inclu=* | --incl=* | --inc=*)
1242     includedir=$ac_optarg ;;
1243 
1244   -infodir | --infodir | --infodi | --infod | --info | --inf)
1245     ac_prev=infodir ;;
1246   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1247     infodir=$ac_optarg ;;
1248 
1249   -libdir | --libdir | --libdi | --libd)
1250     ac_prev=libdir ;;
1251   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1252     libdir=$ac_optarg ;;
1253 
1254   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1255   | --libexe | --libex | --libe)
1256     ac_prev=libexecdir ;;
1257   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1258   | --libexe=* | --libex=* | --libe=*)
1259     libexecdir=$ac_optarg ;;
1260 
1261   -localedir | --localedir | --localedi | --localed | --locale)
1262     ac_prev=localedir ;;
1263   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1264     localedir=$ac_optarg ;;
1265 
1266   -localstatedir | --localstatedir | --localstatedi | --localstated \
1267   | --localstate | --localstat | --localsta | --localst | --locals)
1268     ac_prev=localstatedir ;;
1269   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1270   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1271     localstatedir=$ac_optarg ;;
1272 
1273   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1274     ac_prev=mandir ;;
1275   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1276     mandir=$ac_optarg ;;
1277 
1278   -nfp | --nfp | --nf)
1279     # Obsolete; use --without-fp.
1280     with_fp=no ;;
1281 
1282   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1283   | --no-cr | --no-c | -n)
1284     no_create=yes ;;
1285 
1286   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1287   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1288     no_recursion=yes ;;
1289 
1290   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1291   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1292   | --oldin | --oldi | --old | --ol | --o)
1293     ac_prev=oldincludedir ;;
1294   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1295   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1296   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1297     oldincludedir=$ac_optarg ;;
1298 
1299   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1300     ac_prev=prefix ;;
1301   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1302     prefix=$ac_optarg ;;
1303 
1304   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1305   | --program-pre | --program-pr | --program-p)
1306     ac_prev=program_prefix ;;
1307   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1308   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1309     program_prefix=$ac_optarg ;;
1310 
1311   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1312   | --program-suf | --program-su | --program-s)
1313     ac_prev=program_suffix ;;
1314   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1315   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1316     program_suffix=$ac_optarg ;;
1317 
1318   -program-transform-name | --program-transform-name \
1319   | --program-transform-nam | --program-transform-na \
1320   | --program-transform-n | --program-transform- \
1321   | --program-transform | --program-transfor \
1322   | --program-transfo | --program-transf \
1323   | --program-trans | --program-tran \
1324   | --progr-tra | --program-tr | --program-t)
1325     ac_prev=program_transform_name ;;
1326   -program-transform-name=* | --program-transform-name=* \
1327   | --program-transform-nam=* | --program-transform-na=* \
1328   | --program-transform-n=* | --program-transform-=* \
1329   | --program-transform=* | --program-transfor=* \
1330   | --program-transfo=* | --program-transf=* \
1331   | --program-trans=* | --program-tran=* \
1332   | --progr-tra=* | --program-tr=* | --program-t=*)
1333     program_transform_name=$ac_optarg ;;
1334 
1335   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1336     ac_prev=pdfdir ;;
1337   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1338     pdfdir=$ac_optarg ;;
1339 
1340   -psdir | --psdir | --psdi | --psd | --ps)
1341     ac_prev=psdir ;;
1342   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1343     psdir=$ac_optarg ;;
1344 
1345   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1346   | -silent | --silent | --silen | --sile | --sil)
1347     silent=yes ;;
1348 
1349   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1350     ac_prev=sbindir ;;
1351   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1352   | --sbi=* | --sb=*)
1353     sbindir=$ac_optarg ;;
1354 
1355   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1356   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1357   | --sharedst | --shareds | --shared | --share | --shar \
1358   | --sha | --sh)
1359     ac_prev=sharedstatedir ;;
1360   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1361   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1362   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1363   | --sha=* | --sh=*)
1364     sharedstatedir=$ac_optarg ;;
1365 
1366   -site | --site | --sit)
1367     ac_prev=site ;;
1368   -site=* | --site=* | --sit=*)
1369     site=$ac_optarg ;;
1370 
1371   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1372     ac_prev=srcdir ;;
1373   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1374     srcdir=$ac_optarg ;;
1375 
1376   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1377   | --syscon | --sysco | --sysc | --sys | --sy)
1378     ac_prev=sysconfdir ;;
1379   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1380   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1381     sysconfdir=$ac_optarg ;;
1382 
1383   -target | --target | --targe | --targ | --tar | --ta | --t)
1384     ac_prev=target_alias ;;
1385   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1386     target_alias=$ac_optarg ;;
1387 
1388   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1389     verbose=yes ;;
1390 
1391   -version | --version | --versio | --versi | --vers | -V)
1392     ac_init_version=: ;;
1393 
1394   -with-* | --with-*)
1395     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1396     # Reject names that are not valid shell variable names.
1397     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1398       as_fn_error $? "invalid package name: $ac_useropt"
1399     ac_useropt_orig=$ac_useropt
1400     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1401     case $ac_user_opts in
1402       *"
1403 "with_$ac_useropt"
1404 "*) ;;
1405       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1406          ac_unrecognized_sep=', ';;
1407     esac
1408     eval with_$ac_useropt=\$ac_optarg ;;
1409 
1410   -without-* | --without-*)
1411     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1412     # Reject names that are not valid shell variable names.
1413     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1414       as_fn_error $? "invalid package name: $ac_useropt"
1415     ac_useropt_orig=$ac_useropt
1416     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1417     case $ac_user_opts in
1418       *"
1419 "with_$ac_useropt"
1420 "*) ;;
1421       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1422          ac_unrecognized_sep=', ';;
1423     esac
1424     eval with_$ac_useropt=no ;;
1425 
1426   --x)
1427     # Obsolete; use --with-x.
1428     with_x=yes ;;
1429 
1430   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1431   | --x-incl | --x-inc | --x-in | --x-i)
1432     ac_prev=x_includes ;;
1433   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1434   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1435     x_includes=$ac_optarg ;;
1436 
1437   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1438   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1439     ac_prev=x_libraries ;;
1440   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1441   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1442     x_libraries=$ac_optarg ;;
1443 
1444   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1445 Try \`$0 --help' for more information"
1446     ;;
1447 
1448   *=*)
1449     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1450     # Reject names that are not valid shell variable names.
1451     case $ac_envvar in #(
1452       '' | [0-9]* | *[!_$as_cr_alnum]* )
1453       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1454     esac
1455     eval $ac_envvar=\$ac_optarg
1456     export $ac_envvar ;;
1457 
1458   *)
1459     # FIXME: should be removed in autoconf 3.0.
1460     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1461     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1462       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1463     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1464     ;;
1465 
1466   esac
1467 done
1468 
1469 if test -n "$ac_prev"; then
1470   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1471   as_fn_error $? "missing argument to $ac_option"
1472 fi
1473 
1474 if test -n "$ac_unrecognized_opts"; then
1475   case $enable_option_checking in
1476     no) ;;
1477     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1478     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1479   esac
1480 fi
1481 
1482 # Check all directory arguments for consistency.
1483 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1484                 datadir sysconfdir sharedstatedir localstatedir includedir \
1485                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1486                 libdir localedir mandir
1487 do
1488   eval ac_val=\$$ac_var
1489   # Remove trailing slashes.
1490   case $ac_val in
1491     */ )
1492       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1493       eval $ac_var=\$ac_val;;
1494   esac
1495   # Be sure to have absolute directory names.
1496   case $ac_val in
1497     [\\/$]* | ?:[\\/]* )  continue;;
1498     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1499   esac
1500   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1501 done
1502 
1503 # There might be people who depend on the old broken behavior: `$host'
1504 # used to hold the argument of --host etc.
1505 # FIXME: To remove some day.
1506 build=$build_alias
1507 host=$host_alias
1508 target=$target_alias
1509 
1510 # FIXME: To remove some day.
1511 if test "x$host_alias" != x; then
1512   if test "x$build_alias" = x; then
1513     cross_compiling=maybe
1514     $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1515     If a cross compiler is detected then cross compile mode will be used" >&2
1516   elif test "x$build_alias" != "x$host_alias"; then
1517     cross_compiling=yes
1518   fi
1519 fi
1520 
1521 ac_tool_prefix=
1522 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1523 
1524 test "$silent" = yes && exec 6>/dev/null
1525 
1526 
1527 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1528 ac_ls_di=`ls -di .` &&
1529 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1530   as_fn_error $? "working directory cannot be determined"
1531 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1532   as_fn_error $? "pwd does not report name of working directory"
1533 
1534 
1535 # Find the source files, if location was not specified.
1536 if test -z "$srcdir"; then
1537   ac_srcdir_defaulted=yes
1538   # Try the directory containing this script, then the parent directory.
1539   ac_confdir=`$as_dirname -- "$as_myself" ||
1540 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1541          X"$as_myself" : 'X\(//\)[^/]' \| \
1542          X"$as_myself" : 'X\(//\)$' \| \
1543          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1544 $as_echo X"$as_myself" |
1545     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1546             s//\1/
1547             q
1548           }
1549           /^X\(\/\/\)[^/].*/{
1550             s//\1/
1551             q
1552           }
1553           /^X\(\/\/\)$/{
1554             s//\1/
1555             q
1556           }
1557           /^X\(\/\).*/{
1558             s//\1/
1559             q
1560           }
1561           s/.*/./; q'`
1562   srcdir=$ac_confdir
1563   if test ! -r "$srcdir/$ac_unique_file"; then
1564     srcdir=..
1565   fi
1566 else
1567   ac_srcdir_defaulted=no
1568 fi
1569 if test ! -r "$srcdir/$ac_unique_file"; then
1570   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1571   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1572 fi
1573 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1574 ac_abs_confdir=`(
1575         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1576         pwd)`
1577 # When building in place, set srcdir=.
1578 if test "$ac_abs_confdir" = "$ac_pwd"; then
1579   srcdir=.
1580 fi
1581 # Remove unnecessary trailing slashes from srcdir.
1582 # Double slashes in file names in object file debugging info
1583 # mess up M-x gdb in Emacs.
1584 case $srcdir in
1585 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1586 esac
1587 for ac_var in $ac_precious_vars; do
1588   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1589   eval ac_env_${ac_var}_value=\$${ac_var}
1590   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1591   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1592 done
1593 
1594 #
1595 # Report the --help message.
1596 #
1597 if test "$ac_init_help" = "long"; then
1598   # Omit some internal or obsolete options to make the list less imposing.
1599   # This message is too long to be a string in the A/UX 3.1 sh.
1600   cat <<_ACEOF
1601 \`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1602 
1603 Usage: $0 [OPTION]... [VAR=VALUE]...
1604 
1605 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1606 VAR=VALUE.  See below for descriptions of some of the useful variables.
1607 
1608 Defaults for the options are specified in brackets.
1609 
1610 Configuration:
1611   -h, --help              display this help and exit
1612       --help=short        display options specific to this package
1613       --help=recursive    display the short help of all the included packages
1614   -V, --version           display version information and exit
1615   -q, --quiet, --silent   do not print \`checking ...' messages
1616       --cache-file=FILE   cache test results in FILE [disabled]
1617   -C, --config-cache      alias for \`--cache-file=config.cache'
1618   -n, --no-create         do not create output files
1619       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1620 
1621 Installation directories:
1622   --prefix=PREFIX         install architecture-independent files in PREFIX
1623                           [$ac_default_prefix]
1624   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1625                           [PREFIX]
1626 
1627 By default, \`make install' will install all the files in
1628 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1629 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1630 for instance \`--prefix=\$HOME'.
1631 
1632 For better control, use the options below.
1633 
1634 Fine tuning of the installation directories:
1635   --bindir=DIR            user executables [EPREFIX/bin]
1636   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1637   --libexecdir=DIR        program executables [EPREFIX/libexec]
1638   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1639   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1640   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1641   --libdir=DIR            object code libraries [EPREFIX/lib]
1642   --includedir=DIR        C header files [PREFIX/include]
1643   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1644   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1645   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1646   --infodir=DIR           info documentation [DATAROOTDIR/info]
1647   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1648   --mandir=DIR            man documentation [DATAROOTDIR/man]
1649   --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1650   --htmldir=DIR           html documentation [DOCDIR]
1651   --dvidir=DIR            dvi documentation [DOCDIR]
1652   --pdfdir=DIR            pdf documentation [DOCDIR]
1653   --psdir=DIR             ps documentation [DOCDIR]
1654 _ACEOF
1655 
1656   cat <<\_ACEOF
1657 
1658 X features:
1659   --x-includes=DIR    X include files are in DIR
1660   --x-libraries=DIR   X library files are in DIR
1661 
1662 System types:
1663   --build=BUILD     configure for building on BUILD [guessed]
1664   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1665   --target=TARGET   configure for building compilers for TARGET [HOST]
1666 _ACEOF
1667 fi
1668 
1669 if test -n "$ac_init_help"; then
1670   case $ac_init_help in
1671      short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1672    esac
1673   cat <<\_ACEOF
1674 
1675 Optional Features:
1676   --disable-option-checking  ignore unrecognized --enable/--with options
1677   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1678   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1679   --enable-openjdk-only   suppress building custom source even if present
1680                           [disabled]
1681   --enable-debug          set the debug level to fastdebug (shorthand for
1682                           --with-debug-level=fastdebug) [disabled]
1683   --disable-headful       disable building headful support (graphical UI
1684                           support) [enabled]
1685   --enable-hotspot-test-in-build
1686                           run the Queens test after Hotspot build [disabled]
1687   --enable-unlimited-crypto
1688                           Enable unlimited crypto policy [disabled]
1689   --disable-debug-symbols disable generation of debug symbols [enabled]
1690   --disable-zip-debug-info
1691                           disable zipping of debug-info files [enabled]
1692   --disable-macosx-runtime-support
1693                           disable the use of MacOSX Java runtime support
1694                           framework [enabled]
1695   --enable-sjavac         use sjavac to do fast incremental compiles
1696                           [disabled]
1697   --disable-precompiled-headers
1698                           disable using precompiled headers when compiling C++
1699                           [enabled]
1700   --disable-ccache        disable using ccache to speed up recompilations
1701                           [enabled]
1702 
1703 Optional Packages:
1704   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1705   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1706   --with-custom-make-dir  use this directory for custom build/make files
1707   --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1708                           support it), e.g. --with-target-bits=32 [guessed]
1709   --with-sys-root         pass this sys-root to the compilers and tools (for
1710                           cross-compiling)
1711   --with-tools-dir        search this directory for compilers and tools (for
1712                           cross-compiling)
1713   --with-devkit           use this directory as base for tools-dir and
1714                           sys-root (for cross-compiling)
1715   --with-jdk-variant      JDK variant to build (normal) [normal]
1716   --with-jvm-variants     JVM variants (separated by commas) to build (server,
1717                           client, minimal1, kernel, zero, zeroshark) [server]
1718   --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1719                           [release]
1720   --with-conf-name        use this as the name of the configuration [generated
1721                           from important configuration options]
1722   --with-builddeps-conf   use this configuration file for the builddeps
1723   --with-builddeps-server download and use build dependencies from this server
1724                           url
1725   --with-builddeps-dir    store downloaded build dependencies here
1726                           [/localhome/builddeps]
1727   --with-builddeps-group  chgrp the downloaded build dependencies to this
1728                           group
1729   --with-cacerts-file     specify alternative cacerts file
1730   --with-milestone        Set milestone value for build [internal]
1731   --with-build-number     Set build number value for build [b00]
1732   --with-user-release-suffix
1733                           Add a custom string to the version string if build
1734                           number isn't set.[username_builddateb00]
1735   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1736   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1737                           invocations of the Boot JDK, overriding the default
1738                           values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1739                           -enableassertions"
1740   --with-add-source-root  for each and every source directory, look in this
1741                           additional source root for the same directory; if it
1742                           exists and have files in it, include it in the build
1743   --with-override-source-root
1744                           for each and every source directory, look in this
1745                           override source root for the same directory; if it
1746                           exists, use that directory instead and ignore the
1747                           directory in the original source root
1748   --with-adds-and-overrides
1749                           use the subdirs 'adds' and 'overrides' in the
1750                           specified directory as add-source-root and
1751                           override-source-root
1752   --with-override-langtools
1753                           use this langtools dir for the build
1754   --with-override-corba   use this corba dir for the build
1755   --with-override-jaxp    use this jaxp dir for the build
1756   --with-override-jaxws   use this jaxws dir for the build
1757   --with-override-hotspot use this hotspot dir for the build
1758   --with-override-jdk     use this jdk dir for the build
1759   --with-import-hotspot   import hotspot binaries from this jdk image or
1760                           hotspot build dist dir instead of building from
1761                           source
1762   --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1763                           only) [probed]
1764   --with-dxsdk            the DirectX SDK (Windows only) [probed]
1765   --with-dxsdk-lib        the DirectX SDK lib directory (Windows only)
1766                           [probed]
1767   --with-dxsdk-include    the DirectX SDK include directory (Windows only)
1768                           [probed]
1769   --with-extra-cflags     extra flags to be used when compiling jdk c-files
1770   --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1771   --with-extra-ldflags    extra flags to be used when linking jdk
1772   --with-x                use the X Window System
1773   --with-cups             specify prefix directory for the cups package
1774                           (expecting the headers under PATH/include)
1775   --with-cups-include     specify directory for the cups include files
1776   --with-freetype         specify prefix directory for the freetype2 package
1777                           (expecting the libraries under PATH/lib and the
1778                           headers under PATH/include)
1779   --with-alsa             specify prefix directory for the alsa package
1780                           (expecting the libraries under PATH/lib and the
1781                           headers under PATH/include)
1782   --with-alsa-include     specify directory for the alsa include files
1783   --with-alsa-lib         specify directory for the alsa library
1784   --with-zlib             use zlib from build system or OpenJDK source
1785                           (system, bundled) [bundled]
1786   --with-stdc++lib=<static>,<dynamic>,<default>
1787                           force linking of the C++ runtime on Linux to either
1788                           static or dynamic, default is static with dynamic as
1789                           fallback
1790   --with-num-cores        number of cores in the build system, e.g.
1791                           --with-num-cores=8 [probed]
1792   --with-memory-size      memory (in MB) available in the build system, e.g.
1793                           --with-memory-size=1024 [probed]
1794   --with-jobs             number of parallel jobs to let make run [calculated
1795                           based on cores and memory]
1796   --with-sjavac-server-java
1797                           use this java binary for running the sjavac
1798                           background server [Boot JDK java]
1799   --with-sjavac-server-cores
1800                           use at most this number of concurrent threads on the
1801                           sjavac server [probed]
1802   --with-ccache-dir       where to store ccache files [~/.ccache]
1803 
1804 Some influential environment variables:
1805   PKG_CONFIG  path to pkg-config utility
1806   CC          C compiler command
1807   CFLAGS      C compiler flags
1808   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1809               nonstandard directory <lib dir>
1810   LIBS        libraries to pass to the linker, e.g. -l<library>
1811   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1812               you have headers in a nonstandard directory <include dir>
1813   CXX         C++ compiler command
1814   CXXFLAGS    C++ compiler flags
1815   OBJC        Objective C compiler command
1816   OBJCFLAGS   Objective C compiler flags
1817   CPP         C preprocessor
1818   CXXCPP      C++ preprocessor
1819   XMKMF       Path to xmkmf, Makefile generator for X Window System
1820   FREETYPE2_CFLAGS
1821               C compiler flags for FREETYPE2, overriding pkg-config
1822   FREETYPE2_LIBS
1823               linker flags for FREETYPE2, overriding pkg-config
1824   ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1825   ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1826   LIBFFI_CFLAGS
1827               C compiler flags for LIBFFI, overriding pkg-config
1828   LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
1829 
1830 Use these variables to override the choices made by `configure' or to help
1831 it to find libraries and programs with nonstandard names/locations.
1832 
1833 Report bugs to <build-dev@openjdk.java.net>.
1834 OpenJDK home page: <http://openjdk.java.net>.
1835 _ACEOF
1836 ac_status=$?
1837 fi
1838 
1839 if test "$ac_init_help" = "recursive"; then
1840   # If there are subdirs, report their specific --help.
1841   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1842     test -d "$ac_dir" ||
1843       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1844       continue
1845     ac_builddir=.
1846 
1847 case "$ac_dir" in
1848 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1849 *)
1850   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1851   # A ".." for each directory in $ac_dir_suffix.
1852   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1853   case $ac_top_builddir_sub in
1854   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1855   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1856   esac ;;
1857 esac
1858 ac_abs_top_builddir=$ac_pwd
1859 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1860 # for backward compatibility:
1861 ac_top_builddir=$ac_top_build_prefix
1862 
1863 case $srcdir in
1864   .)  # We are building in place.
1865     ac_srcdir=.
1866     ac_top_srcdir=$ac_top_builddir_sub
1867     ac_abs_top_srcdir=$ac_pwd ;;
1868   [\\/]* | ?:[\\/]* )  # Absolute name.
1869     ac_srcdir=$srcdir$ac_dir_suffix;
1870     ac_top_srcdir=$srcdir
1871     ac_abs_top_srcdir=$srcdir ;;
1872   *) # Relative name.
1873     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1874     ac_top_srcdir=$ac_top_build_prefix$srcdir
1875     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1876 esac
1877 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1878 
1879     cd "$ac_dir" || { ac_status=$?; continue; }
1880     # Check for guested configure.
1881     if test -f "$ac_srcdir/configure.gnu"; then
1882       echo &&
1883       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1884     elif test -f "$ac_srcdir/configure"; then
1885       echo &&
1886       $SHELL "$ac_srcdir/configure" --help=recursive
1887     else
1888       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1889     fi || ac_status=$?
1890     cd "$ac_pwd" || { ac_status=$?; break; }
1891   done
1892 fi
1893 
1894 test -n "$ac_init_help" && exit $ac_status
1895 if $ac_init_version; then
1896   cat <<\_ACEOF
1897 OpenJDK configure jdk8
1898 generated by GNU Autoconf 2.68
1899 
1900 Copyright (C) 2010 Free Software Foundation, Inc.
1901 This configure script is free software; the Free Software Foundation
1902 gives unlimited permission to copy, distribute and modify it.
1903 _ACEOF
1904   exit
1905 fi
1906 
1907 ## ------------------------ ##
1908 ## Autoconf initialization. ##
1909 ## ------------------------ ##
1910 
1911 # ac_fn_c_try_compile LINENO
1912 # --------------------------
1913 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1914 ac_fn_c_try_compile ()
1915 {
1916   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1917   rm -f conftest.$ac_objext
1918   if { { ac_try="$ac_compile"
1919 case "(($ac_try" in
1920   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1921   *) ac_try_echo=$ac_try;;
1922 esac
1923 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1924 $as_echo "$ac_try_echo"; } >&5
1925   (eval "$ac_compile") 2>conftest.err
1926   ac_status=$?
1927   if test -s conftest.err; then
1928     grep -v '^ *+' conftest.err >conftest.er1
1929     cat conftest.er1 >&5
1930     mv -f conftest.er1 conftest.err
1931   fi
1932   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1933   test $ac_status = 0; } && {
1934          test -z "$ac_c_werror_flag" ||
1935          test ! -s conftest.err
1936        } && test -s conftest.$ac_objext; then :
1937   ac_retval=0
1938 else
1939   $as_echo "$as_me: failed program was:" >&5
1940 sed 's/^/| /' conftest.$ac_ext >&5
1941 
1942         ac_retval=1
1943 fi
1944   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1945   as_fn_set_status $ac_retval
1946 
1947 } # ac_fn_c_try_compile
1948 
1949 # ac_fn_cxx_try_compile LINENO
1950 # ----------------------------
1951 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1952 ac_fn_cxx_try_compile ()
1953 {
1954   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1955   rm -f conftest.$ac_objext
1956   if { { ac_try="$ac_compile"
1957 case "(($ac_try" in
1958   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1959   *) ac_try_echo=$ac_try;;
1960 esac
1961 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1962 $as_echo "$ac_try_echo"; } >&5
1963   (eval "$ac_compile") 2>conftest.err
1964   ac_status=$?
1965   if test -s conftest.err; then
1966     grep -v '^ *+' conftest.err >conftest.er1
1967     cat conftest.er1 >&5
1968     mv -f conftest.er1 conftest.err
1969   fi
1970   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1971   test $ac_status = 0; } && {
1972          test -z "$ac_cxx_werror_flag" ||
1973          test ! -s conftest.err
1974        } && test -s conftest.$ac_objext; then :
1975   ac_retval=0
1976 else
1977   $as_echo "$as_me: failed program was:" >&5
1978 sed 's/^/| /' conftest.$ac_ext >&5
1979 
1980         ac_retval=1
1981 fi
1982   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1983   as_fn_set_status $ac_retval
1984 
1985 } # ac_fn_cxx_try_compile
1986 
1987 # ac_fn_objc_try_compile LINENO
1988 # -----------------------------
1989 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1990 ac_fn_objc_try_compile ()
1991 {
1992   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1993   rm -f conftest.$ac_objext
1994   if { { ac_try="$ac_compile"
1995 case "(($ac_try" in
1996   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1997   *) ac_try_echo=$ac_try;;
1998 esac
1999 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2000 $as_echo "$ac_try_echo"; } >&5
2001   (eval "$ac_compile") 2>conftest.err
2002   ac_status=$?
2003   if test -s conftest.err; then
2004     grep -v '^ *+' conftest.err >conftest.er1
2005     cat conftest.er1 >&5
2006     mv -f conftest.er1 conftest.err
2007   fi
2008   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2009   test $ac_status = 0; } && {
2010          test -z "$ac_objc_werror_flag" ||
2011          test ! -s conftest.err
2012        } && test -s conftest.$ac_objext; then :
2013   ac_retval=0
2014 else
2015   $as_echo "$as_me: failed program was:" >&5
2016 sed 's/^/| /' conftest.$ac_ext >&5
2017 
2018         ac_retval=1
2019 fi
2020   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2021   as_fn_set_status $ac_retval
2022 
2023 } # ac_fn_objc_try_compile
2024 
2025 # ac_fn_c_try_cpp LINENO
2026 # ----------------------
2027 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2028 ac_fn_c_try_cpp ()
2029 {
2030   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2031   if { { ac_try="$ac_cpp conftest.$ac_ext"
2032 case "(($ac_try" in
2033   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2034   *) ac_try_echo=$ac_try;;
2035 esac
2036 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2037 $as_echo "$ac_try_echo"; } >&5
2038   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2039   ac_status=$?
2040   if test -s conftest.err; then
2041     grep -v '^ *+' conftest.err >conftest.er1
2042     cat conftest.er1 >&5
2043     mv -f conftest.er1 conftest.err
2044   fi
2045   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2046   test $ac_status = 0; } > conftest.i && {
2047          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2048          test ! -s conftest.err
2049        }; then :
2050   ac_retval=0
2051 else
2052   $as_echo "$as_me: failed program was:" >&5
2053 sed 's/^/| /' conftest.$ac_ext >&5
2054 
2055     ac_retval=1
2056 fi
2057   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2058   as_fn_set_status $ac_retval
2059 
2060 } # ac_fn_c_try_cpp
2061 
2062 # ac_fn_cxx_try_cpp LINENO
2063 # ------------------------
2064 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2065 ac_fn_cxx_try_cpp ()
2066 {
2067   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2068   if { { ac_try="$ac_cpp conftest.$ac_ext"
2069 case "(($ac_try" in
2070   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2071   *) ac_try_echo=$ac_try;;
2072 esac
2073 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2074 $as_echo "$ac_try_echo"; } >&5
2075   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2076   ac_status=$?
2077   if test -s conftest.err; then
2078     grep -v '^ *+' conftest.err >conftest.er1
2079     cat conftest.er1 >&5
2080     mv -f conftest.er1 conftest.err
2081   fi
2082   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2083   test $ac_status = 0; } > conftest.i && {
2084          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2085          test ! -s conftest.err
2086        }; then :
2087   ac_retval=0
2088 else
2089   $as_echo "$as_me: failed program was:" >&5
2090 sed 's/^/| /' conftest.$ac_ext >&5
2091 
2092     ac_retval=1
2093 fi
2094   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2095   as_fn_set_status $ac_retval
2096 
2097 } # ac_fn_cxx_try_cpp
2098 
2099 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2100 # ---------------------------------------------------------
2101 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2102 # the include files in INCLUDES and setting the cache variable VAR
2103 # accordingly.
2104 ac_fn_cxx_check_header_mongrel ()
2105 {
2106   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2107   if eval \${$3+:} false; then :
2108   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2109 $as_echo_n "checking for $2... " >&6; }
2110 if eval \${$3+:} false; then :
2111   $as_echo_n "(cached) " >&6
2112 fi
2113 eval ac_res=\$$3
2114                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2115 $as_echo "$ac_res" >&6; }
2116 else
2117   # Is the header compilable?
2118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2119 $as_echo_n "checking $2 usability... " >&6; }
2120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2121 /* end confdefs.h.  */
2122 $4
2123 #include <$2>
2124 _ACEOF
2125 if ac_fn_cxx_try_compile "$LINENO"; then :
2126   ac_header_compiler=yes
2127 else
2128   ac_header_compiler=no
2129 fi
2130 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2132 $as_echo "$ac_header_compiler" >&6; }
2133 
2134 # Is the header present?
2135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2136 $as_echo_n "checking $2 presence... " >&6; }
2137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2138 /* end confdefs.h.  */
2139 #include <$2>
2140 _ACEOF
2141 if ac_fn_cxx_try_cpp "$LINENO"; then :
2142   ac_header_preproc=yes
2143 else
2144   ac_header_preproc=no
2145 fi
2146 rm -f conftest.err conftest.i conftest.$ac_ext
2147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2148 $as_echo "$ac_header_preproc" >&6; }
2149 
2150 # So?  What about this header?
2151 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2152   yes:no: )
2153     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2154 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2155     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2156 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2157     ;;
2158   no:yes:* )
2159     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2160 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2161     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2162 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2163     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2164 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2165     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2166 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2167     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2168 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2169 ( $as_echo "## ----------------------------------------- ##
2170 ## Report this to build-dev@openjdk.java.net ##
2171 ## ----------------------------------------- ##"
2172      ) | sed "s/^/$as_me: WARNING:     /" >&2
2173     ;;
2174 esac
2175   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2176 $as_echo_n "checking for $2... " >&6; }
2177 if eval \${$3+:} false; then :
2178   $as_echo_n "(cached) " >&6
2179 else
2180   eval "$3=\$ac_header_compiler"
2181 fi
2182 eval ac_res=\$$3
2183                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2184 $as_echo "$ac_res" >&6; }
2185 fi
2186   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2187 
2188 } # ac_fn_cxx_check_header_mongrel
2189 
2190 # ac_fn_cxx_try_run LINENO
2191 # ------------------------
2192 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2193 # that executables *can* be run.
2194 ac_fn_cxx_try_run ()
2195 {
2196   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2197   if { { ac_try="$ac_link"
2198 case "(($ac_try" in
2199   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2200   *) ac_try_echo=$ac_try;;
2201 esac
2202 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2203 $as_echo "$ac_try_echo"; } >&5
2204   (eval "$ac_link") 2>&5
2205   ac_status=$?
2206   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2207   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2208   { { case "(($ac_try" in
2209   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2210   *) ac_try_echo=$ac_try;;
2211 esac
2212 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2213 $as_echo "$ac_try_echo"; } >&5
2214   (eval "$ac_try") 2>&5
2215   ac_status=$?
2216   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2217   test $ac_status = 0; }; }; then :
2218   ac_retval=0
2219 else
2220   $as_echo "$as_me: program exited with status $ac_status" >&5
2221        $as_echo "$as_me: failed program was:" >&5
2222 sed 's/^/| /' conftest.$ac_ext >&5
2223 
2224        ac_retval=$ac_status
2225 fi
2226   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2227   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2228   as_fn_set_status $ac_retval
2229 
2230 } # ac_fn_cxx_try_run
2231 
2232 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2233 # ---------------------------------------------------------
2234 # Tests whether HEADER exists and can be compiled using the include files in
2235 # INCLUDES, setting the cache variable VAR accordingly.
2236 ac_fn_cxx_check_header_compile ()
2237 {
2238   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2239   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2240 $as_echo_n "checking for $2... " >&6; }
2241 if eval \${$3+:} false; then :
2242   $as_echo_n "(cached) " >&6
2243 else
2244   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2245 /* end confdefs.h.  */
2246 $4
2247 #include <$2>
2248 _ACEOF
2249 if ac_fn_cxx_try_compile "$LINENO"; then :
2250   eval "$3=yes"
2251 else
2252   eval "$3=no"
2253 fi
2254 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2255 fi
2256 eval ac_res=\$$3
2257                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2258 $as_echo "$ac_res" >&6; }
2259   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2260 
2261 } # ac_fn_cxx_check_header_compile
2262 
2263 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2264 # ----------------------------------------------
2265 # Tries to find the compile-time value of EXPR in a program that includes
2266 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2267 # computed
2268 ac_fn_cxx_compute_int ()
2269 {
2270   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2271   if test "$cross_compiling" = yes; then
2272     # Depending upon the size, compute the lo and hi bounds.
2273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2274 /* end confdefs.h.  */
2275 $4
2276 int
2277 main ()
2278 {
2279 static int test_array [1 - 2 * !(($2) >= 0)];
2280 test_array [0] = 0
2281 
2282   ;
2283   return 0;
2284 }
2285 _ACEOF
2286 if ac_fn_cxx_try_compile "$LINENO"; then :
2287   ac_lo=0 ac_mid=0
2288   while :; do
2289     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2290 /* end confdefs.h.  */
2291 $4
2292 int
2293 main ()
2294 {
2295 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2296 test_array [0] = 0
2297 
2298   ;
2299   return 0;
2300 }
2301 _ACEOF
2302 if ac_fn_cxx_try_compile "$LINENO"; then :
2303   ac_hi=$ac_mid; break
2304 else
2305   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2306                         if test $ac_lo -le $ac_mid; then
2307                           ac_lo= ac_hi=
2308                           break
2309                         fi
2310                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2311 fi
2312 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2313   done
2314 else
2315   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2316 /* end confdefs.h.  */
2317 $4
2318 int
2319 main ()
2320 {
2321 static int test_array [1 - 2 * !(($2) < 0)];
2322 test_array [0] = 0
2323 
2324   ;
2325   return 0;
2326 }
2327 _ACEOF
2328 if ac_fn_cxx_try_compile "$LINENO"; then :
2329   ac_hi=-1 ac_mid=-1
2330   while :; do
2331     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2332 /* end confdefs.h.  */
2333 $4
2334 int
2335 main ()
2336 {
2337 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2338 test_array [0] = 0
2339 
2340   ;
2341   return 0;
2342 }
2343 _ACEOF
2344 if ac_fn_cxx_try_compile "$LINENO"; then :
2345   ac_lo=$ac_mid; break
2346 else
2347   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2348                         if test $ac_mid -le $ac_hi; then
2349                           ac_lo= ac_hi=
2350                           break
2351                         fi
2352                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2353 fi
2354 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2355   done
2356 else
2357   ac_lo= ac_hi=
2358 fi
2359 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2360 fi
2361 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2362 # Binary search between lo and hi bounds.
2363 while test "x$ac_lo" != "x$ac_hi"; do
2364   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2365   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2366 /* end confdefs.h.  */
2367 $4
2368 int
2369 main ()
2370 {
2371 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2372 test_array [0] = 0
2373 
2374   ;
2375   return 0;
2376 }
2377 _ACEOF
2378 if ac_fn_cxx_try_compile "$LINENO"; then :
2379   ac_hi=$ac_mid
2380 else
2381   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2382 fi
2383 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2384 done
2385 case $ac_lo in #((
2386 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2387 '') ac_retval=1 ;;
2388 esac
2389   else
2390     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2391 /* end confdefs.h.  */
2392 $4
2393 static long int longval () { return $2; }
2394 static unsigned long int ulongval () { return $2; }
2395 #include <stdio.h>
2396 #include <stdlib.h>
2397 int
2398 main ()
2399 {
2400 
2401   FILE *f = fopen ("conftest.val", "w");
2402   if (! f)
2403     return 1;
2404   if (($2) < 0)
2405     {
2406       long int i = longval ();
2407       if (i != ($2))
2408         return 1;
2409       fprintf (f, "%ld", i);
2410     }
2411   else
2412     {
2413       unsigned long int i = ulongval ();
2414       if (i != ($2))
2415         return 1;
2416       fprintf (f, "%lu", i);
2417     }
2418   /* Do not output a trailing newline, as this causes \r\n confusion
2419      on some platforms.  */
2420   return ferror (f) || fclose (f) != 0;
2421 
2422   ;
2423   return 0;
2424 }
2425 _ACEOF
2426 if ac_fn_cxx_try_run "$LINENO"; then :
2427   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2428 else
2429   ac_retval=1
2430 fi
2431 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2432   conftest.$ac_objext conftest.beam conftest.$ac_ext
2433 rm -f conftest.val
2434 
2435   fi
2436   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2437   as_fn_set_status $ac_retval
2438 
2439 } # ac_fn_cxx_compute_int
2440 
2441 # ac_fn_cxx_try_link LINENO
2442 # -------------------------
2443 # Try to link conftest.$ac_ext, and return whether this succeeded.
2444 ac_fn_cxx_try_link ()
2445 {
2446   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2447   rm -f conftest.$ac_objext conftest$ac_exeext
2448   if { { ac_try="$ac_link"
2449 case "(($ac_try" in
2450   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2451   *) ac_try_echo=$ac_try;;
2452 esac
2453 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2454 $as_echo "$ac_try_echo"; } >&5
2455   (eval "$ac_link") 2>conftest.err
2456   ac_status=$?
2457   if test -s conftest.err; then
2458     grep -v '^ *+' conftest.err >conftest.er1
2459     cat conftest.er1 >&5
2460     mv -f conftest.er1 conftest.err
2461   fi
2462   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2463   test $ac_status = 0; } && {
2464          test -z "$ac_cxx_werror_flag" ||
2465          test ! -s conftest.err
2466        } && test -s conftest$ac_exeext && {
2467          test "$cross_compiling" = yes ||
2468          $as_test_x conftest$ac_exeext
2469        }; then :
2470   ac_retval=0
2471 else
2472   $as_echo "$as_me: failed program was:" >&5
2473 sed 's/^/| /' conftest.$ac_ext >&5
2474 
2475         ac_retval=1
2476 fi
2477   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2478   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2479   # interfere with the next link command; also delete a directory that is
2480   # left behind by Apple's compiler.  We do this before executing the actions.
2481   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2482   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2483   as_fn_set_status $ac_retval
2484 
2485 } # ac_fn_cxx_try_link
2486 
2487 # ac_fn_cxx_check_func LINENO FUNC VAR
2488 # ------------------------------------
2489 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2490 ac_fn_cxx_check_func ()
2491 {
2492   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2493   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2494 $as_echo_n "checking for $2... " >&6; }
2495 if eval \${$3+:} false; then :
2496   $as_echo_n "(cached) " >&6
2497 else
2498   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2499 /* end confdefs.h.  */
2500 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2501    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2502 #define $2 innocuous_$2
2503 
2504 /* System header to define __stub macros and hopefully few prototypes,
2505     which can conflict with char $2 (); below.
2506     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2507     <limits.h> exists even on freestanding compilers.  */
2508 
2509 #ifdef __STDC__
2510 # include <limits.h>
2511 #else
2512 # include <assert.h>
2513 #endif
2514 
2515 #undef $2
2516 
2517 /* Override any GCC internal prototype to avoid an error.
2518    Use char because int might match the return type of a GCC
2519    builtin and then its argument prototype would still apply.  */
2520 #ifdef __cplusplus
2521 extern "C"
2522 #endif
2523 char $2 ();
2524 /* The GNU C library defines this for functions which it implements
2525     to always fail with ENOSYS.  Some functions are actually named
2526     something starting with __ and the normal name is an alias.  */
2527 #if defined __stub_$2 || defined __stub___$2
2528 choke me
2529 #endif
2530 
2531 int
2532 main ()
2533 {
2534 return $2 ();
2535   ;
2536   return 0;
2537 }
2538 _ACEOF
2539 if ac_fn_cxx_try_link "$LINENO"; then :
2540   eval "$3=yes"
2541 else
2542   eval "$3=no"
2543 fi
2544 rm -f core conftest.err conftest.$ac_objext \
2545     conftest$ac_exeext conftest.$ac_ext
2546 fi
2547 eval ac_res=\$$3
2548                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2549 $as_echo "$ac_res" >&6; }
2550   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2551 
2552 } # ac_fn_cxx_check_func
2553 
2554 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2555 # -------------------------------------------------------
2556 # Tests whether HEADER exists and can be compiled using the include files in
2557 # INCLUDES, setting the cache variable VAR accordingly.
2558 ac_fn_c_check_header_compile ()
2559 {
2560   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2561   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2562 $as_echo_n "checking for $2... " >&6; }
2563 if eval \${$3+:} false; then :
2564   $as_echo_n "(cached) " >&6
2565 else
2566   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2567 /* end confdefs.h.  */
2568 $4
2569 #include <$2>
2570 _ACEOF
2571 if ac_fn_c_try_compile "$LINENO"; then :
2572   eval "$3=yes"
2573 else
2574   eval "$3=no"
2575 fi
2576 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2577 fi
2578 eval ac_res=\$$3
2579                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2580 $as_echo "$ac_res" >&6; }
2581   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2582 
2583 } # ac_fn_c_check_header_compile
2584 cat >config.log <<_ACEOF
2585 This file contains any messages produced by compilers while
2586 running configure, to aid debugging if configure makes a mistake.
2587 
2588 It was created by OpenJDK $as_me jdk8, which was
2589 generated by GNU Autoconf 2.68.  Invocation command line was
2590 
2591   $ $0 $@
2592 
2593 _ACEOF
2594 exec 5>>config.log
2595 {
2596 cat <<_ASUNAME
2597 ## --------- ##
2598 ## Platform. ##
2599 ## --------- ##
2600 
2601 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2602 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2603 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2604 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2605 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2606 
2607 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2608 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2609 
2610 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2611 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2612 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2613 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2614 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2615 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2616 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2617 
2618 _ASUNAME
2619 
2620 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2621 for as_dir in $PATH
2622 do
2623   IFS=$as_save_IFS
2624   test -z "$as_dir" && as_dir=.
2625     $as_echo "PATH: $as_dir"
2626   done
2627 IFS=$as_save_IFS
2628 
2629 } >&5
2630 
2631 cat >&5 <<_ACEOF
2632 
2633 
2634 ## ----------- ##
2635 ## Core tests. ##
2636 ## ----------- ##
2637 
2638 _ACEOF
2639 
2640 
2641 # Keep a trace of the command line.
2642 # Strip out --no-create and --no-recursion so they do not pile up.
2643 # Strip out --silent because we don't want to record it for future runs.
2644 # Also quote any args containing shell meta-characters.
2645 # Make two passes to allow for proper duplicate-argument suppression.
2646 ac_configure_args=
2647 ac_configure_args0=
2648 ac_configure_args1=
2649 ac_must_keep_next=false
2650 for ac_pass in 1 2
2651 do
2652   for ac_arg
2653   do
2654     case $ac_arg in
2655     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2656     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2657     | -silent | --silent | --silen | --sile | --sil)
2658       continue ;;
2659     *\'*)
2660       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2661     esac
2662     case $ac_pass in
2663     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2664     2)
2665       as_fn_append ac_configure_args1 " '$ac_arg'"
2666       if test $ac_must_keep_next = true; then
2667         ac_must_keep_next=false # Got value, back to normal.
2668       else
2669         case $ac_arg in
2670           *=* | --config-cache | -C | -disable-* | --disable-* \
2671           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2672           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2673           | -with-* | --with-* | -without-* | --without-* | --x)
2674             case "$ac_configure_args0 " in
2675               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2676             esac
2677             ;;
2678           -* ) ac_must_keep_next=true ;;
2679         esac
2680       fi
2681       as_fn_append ac_configure_args " '$ac_arg'"
2682       ;;
2683     esac
2684   done
2685 done
2686 { ac_configure_args0=; unset ac_configure_args0;}
2687 { ac_configure_args1=; unset ac_configure_args1;}
2688 
2689 # When interrupted or exit'd, cleanup temporary files, and complete
2690 # config.log.  We remove comments because anyway the quotes in there
2691 # would cause problems or look ugly.
2692 # WARNING: Use '\'' to represent an apostrophe within the trap.
2693 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2694 trap 'exit_status=$?
2695   # Save into config.log some information that might help in debugging.
2696   {
2697     echo
2698 
2699     $as_echo "## ---------------- ##
2700 ## Cache variables. ##
2701 ## ---------------- ##"
2702     echo
2703     # The following way of writing the cache mishandles newlines in values,
2704 (
2705   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2706     eval ac_val=\$$ac_var
2707     case $ac_val in #(
2708     *${as_nl}*)
2709       case $ac_var in #(
2710       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2711 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2712       esac
2713       case $ac_var in #(
2714       _ | IFS | as_nl) ;; #(
2715       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2716       *) { eval $ac_var=; unset $ac_var;} ;;
2717       esac ;;
2718     esac
2719   done
2720   (set) 2>&1 |
2721     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2722     *${as_nl}ac_space=\ *)
2723       sed -n \
2724         "s/'\''/'\''\\\\'\'''\''/g;
2725           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2726       ;; #(
2727     *)
2728       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2729       ;;
2730     esac |
2731     sort
2732 )
2733     echo
2734 
2735     $as_echo "## ----------------- ##
2736 ## Output variables. ##
2737 ## ----------------- ##"
2738     echo
2739     for ac_var in $ac_subst_vars
2740     do
2741       eval ac_val=\$$ac_var
2742       case $ac_val in
2743       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2744       esac
2745       $as_echo "$ac_var='\''$ac_val'\''"
2746     done | sort
2747     echo
2748 
2749     if test -n "$ac_subst_files"; then
2750       $as_echo "## ------------------- ##
2751 ## File substitutions. ##
2752 ## ------------------- ##"
2753       echo
2754       for ac_var in $ac_subst_files
2755       do
2756         eval ac_val=\$$ac_var
2757         case $ac_val in
2758         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2759         esac
2760         $as_echo "$ac_var='\''$ac_val'\''"
2761       done | sort
2762       echo
2763     fi
2764 
2765     if test -s confdefs.h; then
2766       $as_echo "## ----------- ##
2767 ## confdefs.h. ##
2768 ## ----------- ##"
2769       echo
2770       cat confdefs.h
2771       echo
2772     fi
2773     test "$ac_signal" != 0 &&
2774       $as_echo "$as_me: caught signal $ac_signal"
2775     $as_echo "$as_me: exit $exit_status"
2776   } >&5
2777   rm -f core *.core core.conftest.* &&
2778     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2779     exit $exit_status
2780 ' 0
2781 for ac_signal in 1 2 13 15; do
2782   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2783 done
2784 ac_signal=0
2785 
2786 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2787 rm -f -r conftest* confdefs.h
2788 
2789 $as_echo "/* confdefs.h */" > confdefs.h
2790 
2791 # Predefined preprocessor variables.
2792 
2793 cat >>confdefs.h <<_ACEOF
2794 #define PACKAGE_NAME "$PACKAGE_NAME"
2795 _ACEOF
2796 
2797 cat >>confdefs.h <<_ACEOF
2798 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2799 _ACEOF
2800 
2801 cat >>confdefs.h <<_ACEOF
2802 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2803 _ACEOF
2804 
2805 cat >>confdefs.h <<_ACEOF
2806 #define PACKAGE_STRING "$PACKAGE_STRING"
2807 _ACEOF
2808 
2809 cat >>confdefs.h <<_ACEOF
2810 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2811 _ACEOF
2812 
2813 cat >>confdefs.h <<_ACEOF
2814 #define PACKAGE_URL "$PACKAGE_URL"
2815 _ACEOF
2816 
2817 
2818 # Let the site file select an alternate cache file if it wants to.
2819 # Prefer an explicitly selected file to automatically selected ones.
2820 ac_site_file1=NONE
2821 ac_site_file2=NONE
2822 if test -n "$CONFIG_SITE"; then
2823   # We do not want a PATH search for config.site.
2824   case $CONFIG_SITE in #((
2825     -*)  ac_site_file1=./$CONFIG_SITE;;
2826     */*) ac_site_file1=$CONFIG_SITE;;
2827     *)   ac_site_file1=./$CONFIG_SITE;;
2828   esac
2829 elif test "x$prefix" != xNONE; then
2830   ac_site_file1=$prefix/share/config.site
2831   ac_site_file2=$prefix/etc/config.site
2832 else
2833   ac_site_file1=$ac_default_prefix/share/config.site
2834   ac_site_file2=$ac_default_prefix/etc/config.site
2835 fi
2836 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2837 do
2838   test "x$ac_site_file" = xNONE && continue
2839   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2840     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2841 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2842     sed 's/^/| /' "$ac_site_file" >&5
2843     . "$ac_site_file" \
2844       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2845 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2846 as_fn_error $? "failed to load site script $ac_site_file
2847 See \`config.log' for more details" "$LINENO" 5; }
2848   fi
2849 done
2850 
2851 if test -r "$cache_file"; then
2852   # Some versions of bash will fail to source /dev/null (special files
2853   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2854   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2855     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2856 $as_echo "$as_me: loading cache $cache_file" >&6;}
2857     case $cache_file in
2858       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2859       *)                      . "./$cache_file";;
2860     esac
2861   fi
2862 else
2863   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2864 $as_echo "$as_me: creating cache $cache_file" >&6;}
2865   >$cache_file
2866 fi
2867 
2868 # Check that the precious variables saved in the cache have kept the same
2869 # value.
2870 ac_cache_corrupted=false
2871 for ac_var in $ac_precious_vars; do
2872   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2873   eval ac_new_set=\$ac_env_${ac_var}_set
2874   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2875   eval ac_new_val=\$ac_env_${ac_var}_value
2876   case $ac_old_set,$ac_new_set in
2877     set,)
2878       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2879 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2880       ac_cache_corrupted=: ;;
2881     ,set)
2882       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2883 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2884       ac_cache_corrupted=: ;;
2885     ,);;
2886     *)
2887       if test "x$ac_old_val" != "x$ac_new_val"; then
2888         # differences in whitespace do not lead to failure.
2889         ac_old_val_w=`echo x $ac_old_val`
2890         ac_new_val_w=`echo x $ac_new_val`
2891         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2892           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2893 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2894           ac_cache_corrupted=:
2895         else
2896           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2897 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2898           eval $ac_var=\$ac_old_val
2899         fi
2900         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2901 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2902         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2903 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2904       fi;;
2905   esac
2906   # Pass precious variables to config.status.
2907   if test "$ac_new_set" = set; then
2908     case $ac_new_val in
2909     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2910     *) ac_arg=$ac_var=$ac_new_val ;;
2911     esac
2912     case " $ac_configure_args " in
2913       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2914       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2915     esac
2916   fi
2917 done
2918 if $ac_cache_corrupted; then
2919   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2920 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2921   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2922 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2923   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2924 fi
2925 ## -------------------- ##
2926 ## Main body of script. ##
2927 ## -------------------- ##
2928 
2929 ac_ext=c
2930 ac_cpp='$CPP $CPPFLAGS'
2931 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2932 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2933 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2934 
2935 
2936 
2937 ac_aux_dir=
2938 for ac_dir in build-aux "$srcdir"/build-aux; do
2939   if test -f "$ac_dir/install-sh"; then
2940     ac_aux_dir=$ac_dir
2941     ac_install_sh="$ac_aux_dir/install-sh -c"
2942     break
2943   elif test -f "$ac_dir/install.sh"; then
2944     ac_aux_dir=$ac_dir
2945     ac_install_sh="$ac_aux_dir/install.sh -c"
2946     break
2947   elif test -f "$ac_dir/shtool"; then
2948     ac_aux_dir=$ac_dir
2949     ac_install_sh="$ac_aux_dir/shtool install -c"
2950     break
2951   fi
2952 done
2953 if test -z "$ac_aux_dir"; then
2954   as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2955 fi
2956 
2957 # These three variables are undocumented and unsupported,
2958 # and are intended to be withdrawn in a future Autoconf release.
2959 # They can cause serious problems if a builder's source tree is in a directory
2960 # whose full name contains unusual characters.
2961 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2962 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2963 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2964 
2965 
2966 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2967 
2968 #
2969 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
2970 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2971 #
2972 # This code is free software; you can redistribute it and/or modify it
2973 # under the terms of the GNU General Public License version 2 only, as
2974 # published by the Free Software Foundation.  Oracle designates this
2975 # particular file as subject to the "Classpath" exception as provided
2976 # by Oracle in the LICENSE file that accompanied this code.
2977 #
2978 # This code is distributed in the hope that it will be useful, but WITHOUT
2979 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2980 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2981 # version 2 for more details (a copy is included in the LICENSE file that
2982 # accompanied this code).
2983 #
2984 # You should have received a copy of the GNU General Public License version
2985 # 2 along with this work; if not, write to the Free Software Foundation,
2986 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2987 #
2988 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2989 # or visit www.oracle.com if you need additional information or have any
2990 # questions.
2991 #
2992 
2993 #
2994 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
2995 #
2996 # This program is free software; you can redistribute it and/or modify
2997 # it under the terms of the GNU General Public License as published by
2998 # the Free Software Foundation; either version 2 of the License, or
2999 # (at your option) any later version.
3000 #
3001 # This program is distributed in the hope that it will be useful, but
3002 # WITHOUT ANY WARRANTY; without even the implied warranty of
3003 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3004 # General Public License for more details.
3005 #
3006 # You should have received a copy of the GNU General Public License
3007 # along with this program; if not, write to the Free Software
3008 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3009 #
3010 # As a special exception to the GNU General Public License, if you
3011 # distribute this file as part of a program that contains a
3012 # configuration script generated by Autoconf, you may include it under
3013 # the same distribution terms that you use for the rest of that program.
3014 
3015 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
3016 # ----------------------------------
3017 # PKG_PROG_PKG_CONFIG
3018 
3019 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3020 #
3021 # Check to see whether a particular set of modules exists.  Similar
3022 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
3023 #
3024 #
3025 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
3026 # this or PKG_CHECK_MODULES is called, or make sure to call
3027 # PKG_CHECK_EXISTS manually
3028 # --------------------------------------------------------------
3029 
3030 
3031 
3032 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3033 # ---------------------------------------------
3034 # _PKG_CONFIG
3035 
3036 # _PKG_SHORT_ERRORS_SUPPORTED
3037 # -----------------------------
3038 # _PKG_SHORT_ERRORS_SUPPORTED
3039 
3040 
3041 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3042 # [ACTION-IF-NOT-FOUND])
3043 #
3044 #
3045 # Note that if there is a possibility the first call to
3046 # PKG_CHECK_MODULES might not happen, you should be sure to include an
3047 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3048 #
3049 #
3050 # --------------------------------------------------------------
3051 # PKG_CHECK_MODULES
3052 
3053 
3054 # Include these first...
3055 #
3056 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3057 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3058 #
3059 # This code is free software; you can redistribute it and/or modify it
3060 # under the terms of the GNU General Public License version 2 only, as
3061 # published by the Free Software Foundation.  Oracle designates this
3062 # particular file as subject to the "Classpath" exception as provided
3063 # by Oracle in the LICENSE file that accompanied this code.
3064 #
3065 # This code is distributed in the hope that it will be useful, but WITHOUT
3066 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3067 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3068 # version 2 for more details (a copy is included in the LICENSE file that
3069 # accompanied this code).
3070 #
3071 # You should have received a copy of the GNU General Public License version
3072 # 2 along with this work; if not, write to the Free Software Foundation,
3073 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3074 #
3075 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3076 # or visit www.oracle.com if you need additional information or have any
3077 # questions.
3078 #
3079 
3080 
3081 
3082 # This will make sure the given variable points to a full and proper
3083 # path. This means:
3084 # 1) There will be no spaces in the path. On posix platforms,
3085 #    spaces in the path will result in an error. On Windows,
3086 #    the path will be rewritten using short-style to be space-free.
3087 # 2) The path will be absolute, and it will be in unix-style (on
3088 #     cygwin).
3089 # $1: The name of the variable to fix
3090 
3091 
3092 # This will make sure the given variable points to a executable
3093 # with a full and proper path. This means:
3094 # 1) There will be no spaces in the path. On posix platforms,
3095 #    spaces in the path will result in an error. On Windows,
3096 #    the path will be rewritten using short-style to be space-free.
3097 # 2) The path will be absolute, and it will be in unix-style (on
3098 #     cygwin).
3099 # Any arguments given to the executable is preserved.
3100 # If the input variable does not have a directory specification, then
3101 # it need to be in the PATH.
3102 # $1: The name of the variable to fix
3103 
3104 
3105 
3106 
3107 
3108 
3109 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3110 # $1: variable to check
3111 # $2: executable name to print in warning (optional)
3112 
3113 
3114 # Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3115 # Arguments as AC_PATH_PROG:
3116 # $1: variable to set
3117 # $2: executable name to look for
3118 
3119 
3120 # Setup the most fundamental tools that relies on not much else to set up,
3121 # but is used by much of the early bootstrap code.
3122 
3123 
3124 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3125 
3126 
3127 
3128 
3129 
3130 
3131 
3132 #%%% Simple tools %%%
3133 
3134 # Check if we have found a usable version of make
3135 # $1: the path to a potential make binary (or empty)
3136 # $2: the description on how we found this
3137 
3138 
3139 # Goes looking for a usable version of GNU make.
3140 
3141 
3142 
3143 
3144 
3145 
3146 # Check if build directory is on local disk. If not possible to determine,
3147 # we prefer to claim it's local.
3148 # Argument 1: directory to test
3149 # Argument 2: what to do if it is on local disk
3150 # Argument 3: what to do otherwise (remote disk or failure)
3151 
3152 
3153 # Check that source files have basic read permissions set. This might
3154 # not be the case in cygwin in certain conditions.
3155 
3156 
3157 
3158 
3159 #
3160 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3161 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3162 #
3163 # This code is free software; you can redistribute it and/or modify it
3164 # under the terms of the GNU General Public License version 2 only, as
3165 # published by the Free Software Foundation.  Oracle designates this
3166 # particular file as subject to the "Classpath" exception as provided
3167 # by Oracle in the LICENSE file that accompanied this code.
3168 #
3169 # This code is distributed in the hope that it will be useful, but WITHOUT
3170 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3171 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3172 # version 2 for more details (a copy is included in the LICENSE file that
3173 # accompanied this code).
3174 #
3175 # You should have received a copy of the GNU General Public License version
3176 # 2 along with this work; if not, write to the Free Software Foundation,
3177 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3178 #
3179 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3180 # or visit www.oracle.com if you need additional information or have any
3181 # questions.
3182 #
3183 
3184 
3185 
3186 
3187 
3188 # Helper function which possibly converts a path using DOS-style short mode.
3189 # If so, the updated path is stored in $new_path.
3190 # $1: The path to check
3191 
3192 
3193 # Helper function which possibly converts a path using DOS-style short mode.
3194 # If so, the updated path is stored in $new_path.
3195 # $1: The path to check
3196 
3197 
3198 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3199 # and could probably be heavily simplified. However, all changes in this
3200 # area tend to need lot of testing in different scenarios, and in lack of
3201 # proper unit testing, cleaning this up has not been deemed worth the effort
3202 # at the moment.
3203 
3204 
3205 
3206 
3207 
3208 
3209 
3210 
3211 
3212 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3213 
3214 
3215 
3216 
3217 #
3218 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3219 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3220 #
3221 # This code is free software; you can redistribute it and/or modify it
3222 # under the terms of the GNU General Public License version 2 only, as
3223 # published by the Free Software Foundation.  Oracle designates this
3224 # particular file as subject to the "Classpath" exception as provided
3225 # by Oracle in the LICENSE file that accompanied this code.
3226 #
3227 # This code is distributed in the hope that it will be useful, but WITHOUT
3228 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3229 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3230 # version 2 for more details (a copy is included in the LICENSE file that
3231 # accompanied this code).
3232 #
3233 # You should have received a copy of the GNU General Public License version
3234 # 2 along with this work; if not, write to the Free Software Foundation,
3235 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3236 #
3237 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3238 # or visit www.oracle.com if you need additional information or have any
3239 # questions.
3240 #
3241 
3242 
3243 
3244 
3245 
3246 
3247 
3248 
3249 
3250 
3251 
3252 # ... then the rest
3253 #
3254 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3255 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3256 #
3257 # This code is free software; you can redistribute it and/or modify it
3258 # under the terms of the GNU General Public License version 2 only, as
3259 # published by the Free Software Foundation.  Oracle designates this
3260 # particular file as subject to the "Classpath" exception as provided
3261 # by Oracle in the LICENSE file that accompanied this code.
3262 #
3263 # This code is distributed in the hope that it will be useful, but WITHOUT
3264 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3265 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3266 # version 2 for more details (a copy is included in the LICENSE file that
3267 # accompanied this code).
3268 #
3269 # You should have received a copy of the GNU General Public License version
3270 # 2 along with this work; if not, write to the Free Software Foundation,
3271 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3272 #
3273 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3274 # or visit www.oracle.com if you need additional information or have any
3275 # questions.
3276 #
3277 
3278 # Execute the check given as argument, and verify the result
3279 # If the Boot JDK was previously found, do nothing
3280 # $1 A command line (typically autoconf macro) to execute
3281 
3282 
3283 # Test: Is bootjdk explicitely set by command line arguments?
3284 
3285 
3286 # Test: Is bootjdk available from builddeps?
3287 
3288 
3289 # Test: Is $JAVA_HOME set?
3290 
3291 
3292 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3293 
3294 
3295 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3296 
3297 
3298 # Look for a jdk in the given path. If there are multiple, try to select the newest.
3299 # If found, set BOOT_JDK and BOOT_JDK_FOUND.
3300 # $1 = Path to directory containing jdk installations.
3301 # $2 = String to append to the found JDK directory to get the proper JDK home
3302 
3303 
3304 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3305 # environmental variable as base for where to look.
3306 # $1 Name of an environmal variable, assumed to point to the Program Files directory.
3307 
3308 
3309 # Test: Is there a JDK installed in default, well-known locations?
3310 
3311 
3312 # Check that a command-line tool in the Boot JDK is correct
3313 # $1 = name of variable to assign
3314 # $2 = name of binary
3315 
3316 
3317 ###############################################################################
3318 #
3319 # We need a Boot JDK to bootstrap the build.
3320 #
3321 
3322 
3323 
3324 
3325 
3326 #
3327 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3328 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3329 #
3330 # This code is free software; you can redistribute it and/or modify it
3331 # under the terms of the GNU General Public License version 2 only, as
3332 # published by the Free Software Foundation.  Oracle designates this
3333 # particular file as subject to the "Classpath" exception as provided
3334 # by Oracle in the LICENSE file that accompanied this code.
3335 #
3336 # This code is distributed in the hope that it will be useful, but WITHOUT
3337 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3338 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3339 # version 2 for more details (a copy is included in the LICENSE file that
3340 # accompanied this code).
3341 #
3342 # You should have received a copy of the GNU General Public License version
3343 # 2 along with this work; if not, write to the Free Software Foundation,
3344 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3345 #
3346 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3347 # or visit www.oracle.com if you need additional information or have any
3348 # questions.
3349 #
3350 
3351 
3352 
3353 
3354 
3355 
3356 
3357 
3358 
3359 
3360 
3361 
3362 
3363 
3364 
3365 
3366 
3367 
3368 
3369 
3370 #
3371 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3372 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3373 #
3374 # This code is free software; you can redistribute it and/or modify it
3375 # under the terms of the GNU General Public License version 2 only, as
3376 # published by the Free Software Foundation.  Oracle designates this
3377 # particular file as subject to the "Classpath" exception as provided
3378 # by Oracle in the LICENSE file that accompanied this code.
3379 #
3380 # This code is distributed in the hope that it will be useful, but WITHOUT
3381 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3382 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3383 # version 2 for more details (a copy is included in the LICENSE file that
3384 # accompanied this code).
3385 #
3386 # You should have received a copy of the GNU General Public License version
3387 # 2 along with this work; if not, write to the Free Software Foundation,
3388 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3389 #
3390 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3391 # or visit www.oracle.com if you need additional information or have any
3392 # questions.
3393 #
3394 
3395 
3396 
3397 
3398 
3399 cygwin_help() {
3400     case $1 in
3401     unzip)
3402         PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3403     zip)
3404         PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3405     make)
3406         PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3407     * )
3408        break ;;
3409     esac
3410 }
3411 
3412 apt_help() {
3413     case $1 in
3414     devkit)
3415         PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3416     openjdk)
3417         PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3418     alsa)
3419         PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3420     cups)
3421         PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3422     freetype2)
3423         PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3424     pulse)
3425         PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3426     x11)
3427         PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3428     ccache)
3429         PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3430     * )
3431        break ;;
3432     esac
3433 }
3434 
3435 yum_help() {
3436     case $1 in
3437     devkit)
3438         PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3439     openjdk)
3440         PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3441     alsa)
3442         PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3443     cups)
3444         PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3445     freetype2)
3446         PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3447     pulse)
3448         PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3449     x11)
3450         PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3451     ccache)
3452         PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3453     * )
3454        break ;;
3455     esac
3456 }
3457 
3458 port_help() {
3459     PKGHANDLER_COMMAND=""
3460 }
3461 
3462 pkgutil_help() {
3463     PKGHANDLER_COMMAND=""
3464 }
3465 
3466 pkgadd_help() {
3467     PKGHANDLER_COMMAND=""
3468 }
3469 
3470 
3471 
3472 #
3473 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3474 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3475 #
3476 # This code is free software; you can redistribute it and/or modify it
3477 # under the terms of the GNU General Public License version 2 only, as
3478 # published by the Free Software Foundation.  Oracle designates this
3479 # particular file as subject to the "Classpath" exception as provided
3480 # by Oracle in the LICENSE file that accompanied this code.
3481 #
3482 # This code is distributed in the hope that it will be useful, but WITHOUT
3483 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3484 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3485 # version 2 for more details (a copy is included in the LICENSE file that
3486 # accompanied this code).
3487 #
3488 # You should have received a copy of the GNU General Public License version
3489 # 2 along with this work; if not, write to the Free Software Foundation,
3490 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3491 #
3492 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3493 # or visit www.oracle.com if you need additional information or have any
3494 # questions.
3495 #
3496 
3497 
3498 
3499 
3500 
3501 
3502 
3503 
3504 ###############################################################################
3505 #
3506 # Should we build only OpenJDK even if closed sources are present?
3507 #
3508 
3509 
3510 
3511 
3512 ###############################################################################
3513 #
3514 # Setup version numbers
3515 #
3516 
3517 
3518 
3519 
3520 
3521 
3522 # Support for customization of the build process. Some build files
3523 # will include counterparts from this location, if they exist. This allows
3524 # for a degree of customization of the build targets and the rules/recipes
3525 # to create them
3526 
3527 # Check whether --with-custom-make-dir was given.
3528 if test "${with_custom_make_dir+set}" = set; then :
3529   withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3530 fi
3531 
3532 
3533 
3534 #
3535 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3536 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3537 #
3538 # This code is free software; you can redistribute it and/or modify it
3539 # under the terms of the GNU General Public License version 2 only, as
3540 # published by the Free Software Foundation.  Oracle designates this
3541 # particular file as subject to the "Classpath" exception as provided
3542 # by Oracle in the LICENSE file that accompanied this code.
3543 #
3544 # This code is distributed in the hope that it will be useful, but WITHOUT
3545 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3546 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3547 # version 2 for more details (a copy is included in the LICENSE file that
3548 # accompanied this code).
3549 #
3550 # You should have received a copy of the GNU General Public License version
3551 # 2 along with this work; if not, write to the Free Software Foundation,
3552 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3553 #
3554 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3555 # or visit www.oracle.com if you need additional information or have any
3556 # questions.
3557 #
3558 
3559 
3560 
3561 
3562 
3563 
3564 
3565 
3566 
3567 
3568 
3569 
3570 
3571 
3572 
3573 #
3574 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3575 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3576 #
3577 # This code is free software; you can redistribute it and/or modify it
3578 # under the terms of the GNU General Public License version 2 only, as
3579 # published by the Free Software Foundation.  Oracle designates this
3580 # particular file as subject to the "Classpath" exception as provided
3581 # by Oracle in the LICENSE file that accompanied this code.
3582 #
3583 # This code is distributed in the hope that it will be useful, but WITHOUT
3584 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3585 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3586 # version 2 for more details (a copy is included in the LICENSE file that
3587 # accompanied this code).
3588 #
3589 # You should have received a copy of the GNU General Public License version
3590 # 2 along with this work; if not, write to the Free Software Foundation,
3591 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3592 #
3593 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3594 # or visit www.oracle.com if you need additional information or have any
3595 # questions.
3596 #
3597 
3598 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3599 # Converts autoconf style CPU name to OpenJDK style, into
3600 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3601 
3602 
3603 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3604 # Converts autoconf style OS name to OpenJDK style, into
3605 # VAR_OS and VAR_OS_API.
3606 
3607 
3608 # Expects $host_os $host_cpu $build_os and $build_cpu
3609 # and $with_target_bits to have been setup!
3610 #
3611 # Translate the standard triplet(quadruplet) definition
3612 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3613 # OPENJDK_BUILD_OS, etc.
3614 
3615 
3616 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3617 # accordingly. Must be done after setting up build and target system, but before
3618 # doing anything else with these values.
3619 
3620 
3621     # Setup the legacy variables, for controlling the old makefiles.
3622     #
3623 
3624 
3625 
3626 
3627 #%%% Build and target systems %%%
3628 
3629 
3630 
3631 
3632 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3633 # Add -mX to various FLAGS variables.
3634 
3635 
3636 
3637 
3638 
3639 
3640 #
3641 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3642 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3643 #
3644 # This code is free software; you can redistribute it and/or modify it
3645 # under the terms of the GNU General Public License version 2 only, as
3646 # published by the Free Software Foundation.  Oracle designates this
3647 # particular file as subject to the "Classpath" exception as provided
3648 # by Oracle in the LICENSE file that accompanied this code.
3649 #
3650 # This code is distributed in the hope that it will be useful, but WITHOUT
3651 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3652 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3653 # version 2 for more details (a copy is included in the LICENSE file that
3654 # accompanied this code).
3655 #
3656 # You should have received a copy of the GNU General Public License version
3657 # 2 along with this work; if not, write to the Free Software Foundation,
3658 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3659 #
3660 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3661 # or visit www.oracle.com if you need additional information or have any
3662 # questions.
3663 #
3664 
3665 
3666 
3667 
3668 
3669 
3670 
3671 
3672 #
3673 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3674 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3675 #
3676 # This code is free software; you can redistribute it and/or modify it
3677 # under the terms of the GNU General Public License version 2 only, as
3678 # published by the Free Software Foundation.  Oracle designates this
3679 # particular file as subject to the "Classpath" exception as provided
3680 # by Oracle in the LICENSE file that accompanied this code.
3681 #
3682 # This code is distributed in the hope that it will be useful, but WITHOUT
3683 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3684 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3685 # version 2 for more details (a copy is included in the LICENSE file that
3686 # accompanied this code).
3687 #
3688 # You should have received a copy of the GNU General Public License version
3689 # 2 along with this work; if not, write to the Free Software Foundation,
3690 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3691 #
3692 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3693 # or visit www.oracle.com if you need additional information or have any
3694 # questions.
3695 #
3696 
3697 # $1 = compiler to test (CC or CXX)
3698 # $2 = human readable name of compiler (C or C++)
3699 
3700 
3701 
3702 
3703 
3704 # $1 = compiler to test (CC or CXX)
3705 # $2 = human readable name of compiler (C or C++)
3706 # $3 = list of compiler names to search for
3707 
3708 
3709 
3710 
3711 
3712 
3713 
3714 
3715 
3716 
3717 
3718 
3719 #
3720 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3721 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3722 #
3723 # This code is free software; you can redistribute it and/or modify it
3724 # under the terms of the GNU General Public License version 2 only, as
3725 # published by the Free Software Foundation.  Oracle designates this
3726 # particular file as subject to the "Classpath" exception as provided
3727 # by Oracle in the LICENSE file that accompanied this code.
3728 #
3729 # This code is distributed in the hope that it will be useful, but WITHOUT
3730 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3731 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3732 # version 2 for more details (a copy is included in the LICENSE file that
3733 # accompanied this code).
3734 #
3735 # You should have received a copy of the GNU General Public License version
3736 # 2 along with this work; if not, write to the Free Software Foundation,
3737 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3738 #
3739 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3740 # or visit www.oracle.com if you need additional information or have any
3741 # questions.
3742 #
3743 
3744 
3745 
3746 
3747 
3748 
3749 
3750 # Check if the VS env variables were setup prior to running configure.
3751 # If not, then find vcvarsall.bat and run it automatically, and integrate
3752 # the set env variables into the spec file.
3753 
3754 
3755 
3756 # Setup the DXSDK paths
3757 
3758 
3759 
3760 
3761 
3762 
3763 # This line needs to be here, verbatim, after all includes and the dummy hook
3764 # definitions. It is replaced with custom functionality when building
3765 # custom sources.
3766 #CUSTOM_AUTOCONF_INCLUDE
3767 
3768 # Do not change or remove the following line, it is needed for consistency checks:
3769 DATE_WHEN_GENERATED=1364406721
3770 
3771 ###############################################################################
3772 #
3773 # Initialization / Boot-strapping
3774 #
3775 # The bootstrapping process needs to solve the "chicken or the egg" problem,
3776 # thus it jumps back and forth, each time gaining something needed later on.
3777 #
3778 ###############################################################################
3779 
3780 # Basic initialization that must happen first of all
3781 
3782 # Save the original command line. This is passed to us by the wrapper configure script.
3783 
3784 DATE_WHEN_CONFIGURED=`LANG=C date`
3785 
3786 { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3787 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3788 { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3789 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3790 
3791 
3792 
3793 # Start with tools that do not need have cross compilation support
3794 # and can be expected to be found in the default PATH. These tools are
3795 # used by configure. Nor are these tools expected to be found in the
3796 # devkit from the builddeps server either, since they are
3797 # needed to download the devkit.
3798 
3799 # First are all the simple required tools.
3800 
3801     for ac_prog in basename
3802 do
3803   # Extract the first word of "$ac_prog", so it can be a program name with args.
3804 set dummy $ac_prog; ac_word=$2
3805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3806 $as_echo_n "checking for $ac_word... " >&6; }
3807 if ${ac_cv_path_BASENAME+:} false; then :
3808   $as_echo_n "(cached) " >&6
3809 else
3810   case $BASENAME in
3811   [\\/]* | ?:[\\/]*)
3812   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3813   ;;
3814   *)
3815   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3816 for as_dir in $PATH
3817 do
3818   IFS=$as_save_IFS
3819   test -z "$as_dir" && as_dir=.
3820     for ac_exec_ext in '' $ac_executable_extensions; do
3821   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3822     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3823     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3824     break 2
3825   fi
3826 done
3827   done
3828 IFS=$as_save_IFS
3829 
3830   ;;
3831 esac
3832 fi
3833 BASENAME=$ac_cv_path_BASENAME
3834 if test -n "$BASENAME"; then
3835   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3836 $as_echo "$BASENAME" >&6; }
3837 else
3838   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3839 $as_echo "no" >&6; }
3840 fi
3841 
3842 
3843   test -n "$BASENAME" && break
3844 done
3845 
3846 
3847     if test "x$BASENAME" = x; then
3848         if test "xbasename" = x; then
3849           PROG_NAME=basename
3850         else
3851           PROG_NAME=basename
3852         fi
3853         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3854 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3855         as_fn_error $? "Cannot continue" "$LINENO" 5
3856     fi
3857 
3858 
3859 
3860     for ac_prog in bash
3861 do
3862   # Extract the first word of "$ac_prog", so it can be a program name with args.
3863 set dummy $ac_prog; ac_word=$2
3864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3865 $as_echo_n "checking for $ac_word... " >&6; }
3866 if ${ac_cv_path_BASH+:} false; then :
3867   $as_echo_n "(cached) " >&6
3868 else
3869   case $BASH in
3870   [\\/]* | ?:[\\/]*)
3871   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3872   ;;
3873   *)
3874   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3875 for as_dir in $PATH
3876 do
3877   IFS=$as_save_IFS
3878   test -z "$as_dir" && as_dir=.
3879     for ac_exec_ext in '' $ac_executable_extensions; do
3880   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3881     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3882     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3883     break 2
3884   fi
3885 done
3886   done
3887 IFS=$as_save_IFS
3888 
3889   ;;
3890 esac
3891 fi
3892 BASH=$ac_cv_path_BASH
3893 if test -n "$BASH"; then
3894   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3895 $as_echo "$BASH" >&6; }
3896 else
3897   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3898 $as_echo "no" >&6; }
3899 fi
3900 
3901 
3902   test -n "$BASH" && break
3903 done
3904 
3905 
3906     if test "x$BASH" = x; then
3907         if test "xbash" = x; then
3908           PROG_NAME=bash
3909         else
3910           PROG_NAME=bash
3911         fi
3912         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3913 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3914         as_fn_error $? "Cannot continue" "$LINENO" 5
3915     fi
3916 
3917 
3918 
3919     for ac_prog in cat
3920 do
3921   # Extract the first word of "$ac_prog", so it can be a program name with args.
3922 set dummy $ac_prog; ac_word=$2
3923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3924 $as_echo_n "checking for $ac_word... " >&6; }
3925 if ${ac_cv_path_CAT+:} false; then :
3926   $as_echo_n "(cached) " >&6
3927 else
3928   case $CAT in
3929   [\\/]* | ?:[\\/]*)
3930   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3931   ;;
3932   *)
3933   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3934 for as_dir in $PATH
3935 do
3936   IFS=$as_save_IFS
3937   test -z "$as_dir" && as_dir=.
3938     for ac_exec_ext in '' $ac_executable_extensions; do
3939   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3940     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3941     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3942     break 2
3943   fi
3944 done
3945   done
3946 IFS=$as_save_IFS
3947 
3948   ;;
3949 esac
3950 fi
3951 CAT=$ac_cv_path_CAT
3952 if test -n "$CAT"; then
3953   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3954 $as_echo "$CAT" >&6; }
3955 else
3956   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3957 $as_echo "no" >&6; }
3958 fi
3959 
3960 
3961   test -n "$CAT" && break
3962 done
3963 
3964 
3965     if test "x$CAT" = x; then
3966         if test "xcat" = x; then
3967           PROG_NAME=cat
3968         else
3969           PROG_NAME=cat
3970         fi
3971         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3972 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3973         as_fn_error $? "Cannot continue" "$LINENO" 5
3974     fi
3975 
3976 
3977 
3978     for ac_prog in chmod
3979 do
3980   # Extract the first word of "$ac_prog", so it can be a program name with args.
3981 set dummy $ac_prog; ac_word=$2
3982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3983 $as_echo_n "checking for $ac_word... " >&6; }
3984 if ${ac_cv_path_CHMOD+:} false; then :
3985   $as_echo_n "(cached) " >&6
3986 else
3987   case $CHMOD in
3988   [\\/]* | ?:[\\/]*)
3989   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
3990   ;;
3991   *)
3992   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3993 for as_dir in $PATH
3994 do
3995   IFS=$as_save_IFS
3996   test -z "$as_dir" && as_dir=.
3997     for ac_exec_ext in '' $ac_executable_extensions; do
3998   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3999     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4000     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4001     break 2
4002   fi
4003 done
4004   done
4005 IFS=$as_save_IFS
4006 
4007   ;;
4008 esac
4009 fi
4010 CHMOD=$ac_cv_path_CHMOD
4011 if test -n "$CHMOD"; then
4012   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4013 $as_echo "$CHMOD" >&6; }
4014 else
4015   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4016 $as_echo "no" >&6; }
4017 fi
4018 
4019 
4020   test -n "$CHMOD" && break
4021 done
4022 
4023 
4024     if test "x$CHMOD" = x; then
4025         if test "xchmod" = x; then
4026           PROG_NAME=chmod
4027         else
4028           PROG_NAME=chmod
4029         fi
4030         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4031 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4032         as_fn_error $? "Cannot continue" "$LINENO" 5
4033     fi
4034 
4035 
4036 
4037     for ac_prog in cmp
4038 do
4039   # Extract the first word of "$ac_prog", so it can be a program name with args.
4040 set dummy $ac_prog; ac_word=$2
4041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4042 $as_echo_n "checking for $ac_word... " >&6; }
4043 if ${ac_cv_path_CMP+:} false; then :
4044   $as_echo_n "(cached) " >&6
4045 else
4046   case $CMP in
4047   [\\/]* | ?:[\\/]*)
4048   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4049   ;;
4050   *)
4051   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4052 for as_dir in $PATH
4053 do
4054   IFS=$as_save_IFS
4055   test -z "$as_dir" && as_dir=.
4056     for ac_exec_ext in '' $ac_executable_extensions; do
4057   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4058     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4059     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4060     break 2
4061   fi
4062 done
4063   done
4064 IFS=$as_save_IFS
4065 
4066   ;;
4067 esac
4068 fi
4069 CMP=$ac_cv_path_CMP
4070 if test -n "$CMP"; then
4071   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4072 $as_echo "$CMP" >&6; }
4073 else
4074   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4075 $as_echo "no" >&6; }
4076 fi
4077 
4078 
4079   test -n "$CMP" && break
4080 done
4081 
4082 
4083     if test "x$CMP" = x; then
4084         if test "xcmp" = x; then
4085           PROG_NAME=cmp
4086         else
4087           PROG_NAME=cmp
4088         fi
4089         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4090 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4091         as_fn_error $? "Cannot continue" "$LINENO" 5
4092     fi
4093 
4094 
4095 
4096     for ac_prog in comm
4097 do
4098   # Extract the first word of "$ac_prog", so it can be a program name with args.
4099 set dummy $ac_prog; ac_word=$2
4100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4101 $as_echo_n "checking for $ac_word... " >&6; }
4102 if ${ac_cv_path_COMM+:} false; then :
4103   $as_echo_n "(cached) " >&6
4104 else
4105   case $COMM in
4106   [\\/]* | ?:[\\/]*)
4107   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4108   ;;
4109   *)
4110   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4111 for as_dir in $PATH
4112 do
4113   IFS=$as_save_IFS
4114   test -z "$as_dir" && as_dir=.
4115     for ac_exec_ext in '' $ac_executable_extensions; do
4116   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4117     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4118     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4119     break 2
4120   fi
4121 done
4122   done
4123 IFS=$as_save_IFS
4124 
4125   ;;
4126 esac
4127 fi
4128 COMM=$ac_cv_path_COMM
4129 if test -n "$COMM"; then
4130   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4131 $as_echo "$COMM" >&6; }
4132 else
4133   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4134 $as_echo "no" >&6; }
4135 fi
4136 
4137 
4138   test -n "$COMM" && break
4139 done
4140 
4141 
4142     if test "x$COMM" = x; then
4143         if test "xcomm" = x; then
4144           PROG_NAME=comm
4145         else
4146           PROG_NAME=comm
4147         fi
4148         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4149 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4150         as_fn_error $? "Cannot continue" "$LINENO" 5
4151     fi
4152 
4153 
4154 
4155     for ac_prog in cp
4156 do
4157   # Extract the first word of "$ac_prog", so it can be a program name with args.
4158 set dummy $ac_prog; ac_word=$2
4159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4160 $as_echo_n "checking for $ac_word... " >&6; }
4161 if ${ac_cv_path_CP+:} false; then :
4162   $as_echo_n "(cached) " >&6
4163 else
4164   case $CP in
4165   [\\/]* | ?:[\\/]*)
4166   ac_cv_path_CP="$CP" # Let the user override the test with a path.
4167   ;;
4168   *)
4169   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4170 for as_dir in $PATH
4171 do
4172   IFS=$as_save_IFS
4173   test -z "$as_dir" && as_dir=.
4174     for ac_exec_ext in '' $ac_executable_extensions; do
4175   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4176     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4177     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4178     break 2
4179   fi
4180 done
4181   done
4182 IFS=$as_save_IFS
4183 
4184   ;;
4185 esac
4186 fi
4187 CP=$ac_cv_path_CP
4188 if test -n "$CP"; then
4189   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4190 $as_echo "$CP" >&6; }
4191 else
4192   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4193 $as_echo "no" >&6; }
4194 fi
4195 
4196 
4197   test -n "$CP" && break
4198 done
4199 
4200 
4201     if test "x$CP" = x; then
4202         if test "xcp" = x; then
4203           PROG_NAME=cp
4204         else
4205           PROG_NAME=cp
4206         fi
4207         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4208 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4209         as_fn_error $? "Cannot continue" "$LINENO" 5
4210     fi
4211 
4212 
4213 
4214     for ac_prog in cpio
4215 do
4216   # Extract the first word of "$ac_prog", so it can be a program name with args.
4217 set dummy $ac_prog; ac_word=$2
4218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4219 $as_echo_n "checking for $ac_word... " >&6; }
4220 if ${ac_cv_path_CPIO+:} false; then :
4221   $as_echo_n "(cached) " >&6
4222 else
4223   case $CPIO in
4224   [\\/]* | ?:[\\/]*)
4225   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4226   ;;
4227   *)
4228   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4229 for as_dir in $PATH
4230 do
4231   IFS=$as_save_IFS
4232   test -z "$as_dir" && as_dir=.
4233     for ac_exec_ext in '' $ac_executable_extensions; do
4234   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4235     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4236     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4237     break 2
4238   fi
4239 done
4240   done
4241 IFS=$as_save_IFS
4242 
4243   ;;
4244 esac
4245 fi
4246 CPIO=$ac_cv_path_CPIO
4247 if test -n "$CPIO"; then
4248   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4249 $as_echo "$CPIO" >&6; }
4250 else
4251   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4252 $as_echo "no" >&6; }
4253 fi
4254 
4255 
4256   test -n "$CPIO" && break
4257 done
4258 
4259 
4260     if test "x$CPIO" = x; then
4261         if test "xcpio" = x; then
4262           PROG_NAME=cpio
4263         else
4264           PROG_NAME=cpio
4265         fi
4266         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4267 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4268         as_fn_error $? "Cannot continue" "$LINENO" 5
4269     fi
4270 
4271 
4272 
4273     for ac_prog in cut
4274 do
4275   # Extract the first word of "$ac_prog", so it can be a program name with args.
4276 set dummy $ac_prog; ac_word=$2
4277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4278 $as_echo_n "checking for $ac_word... " >&6; }
4279 if ${ac_cv_path_CUT+:} false; then :
4280   $as_echo_n "(cached) " >&6
4281 else
4282   case $CUT in
4283   [\\/]* | ?:[\\/]*)
4284   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4285   ;;
4286   *)
4287   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4288 for as_dir in $PATH
4289 do
4290   IFS=$as_save_IFS
4291   test -z "$as_dir" && as_dir=.
4292     for ac_exec_ext in '' $ac_executable_extensions; do
4293   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4294     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4295     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4296     break 2
4297   fi
4298 done
4299   done
4300 IFS=$as_save_IFS
4301 
4302   ;;
4303 esac
4304 fi
4305 CUT=$ac_cv_path_CUT
4306 if test -n "$CUT"; then
4307   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4308 $as_echo "$CUT" >&6; }
4309 else
4310   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4311 $as_echo "no" >&6; }
4312 fi
4313 
4314 
4315   test -n "$CUT" && break
4316 done
4317 
4318 
4319     if test "x$CUT" = x; then
4320         if test "xcut" = x; then
4321           PROG_NAME=cut
4322         else
4323           PROG_NAME=cut
4324         fi
4325         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4326 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4327         as_fn_error $? "Cannot continue" "$LINENO" 5
4328     fi
4329 
4330 
4331 
4332     for ac_prog in date
4333 do
4334   # Extract the first word of "$ac_prog", so it can be a program name with args.
4335 set dummy $ac_prog; ac_word=$2
4336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4337 $as_echo_n "checking for $ac_word... " >&6; }
4338 if ${ac_cv_path_DATE+:} false; then :
4339   $as_echo_n "(cached) " >&6
4340 else
4341   case $DATE in
4342   [\\/]* | ?:[\\/]*)
4343   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4344   ;;
4345   *)
4346   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4347 for as_dir in $PATH
4348 do
4349   IFS=$as_save_IFS
4350   test -z "$as_dir" && as_dir=.
4351     for ac_exec_ext in '' $ac_executable_extensions; do
4352   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4353     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4354     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4355     break 2
4356   fi
4357 done
4358   done
4359 IFS=$as_save_IFS
4360 
4361   ;;
4362 esac
4363 fi
4364 DATE=$ac_cv_path_DATE
4365 if test -n "$DATE"; then
4366   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4367 $as_echo "$DATE" >&6; }
4368 else
4369   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4370 $as_echo "no" >&6; }
4371 fi
4372 
4373 
4374   test -n "$DATE" && break
4375 done
4376 
4377 
4378     if test "x$DATE" = x; then
4379         if test "xdate" = x; then
4380           PROG_NAME=date
4381         else
4382           PROG_NAME=date
4383         fi
4384         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4385 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4386         as_fn_error $? "Cannot continue" "$LINENO" 5
4387     fi
4388 
4389 
4390 
4391     for ac_prog in gdiff diff
4392 do
4393   # Extract the first word of "$ac_prog", so it can be a program name with args.
4394 set dummy $ac_prog; ac_word=$2
4395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4396 $as_echo_n "checking for $ac_word... " >&6; }
4397 if ${ac_cv_path_DIFF+:} false; then :
4398   $as_echo_n "(cached) " >&6
4399 else
4400   case $DIFF in
4401   [\\/]* | ?:[\\/]*)
4402   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4403   ;;
4404   *)
4405   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4406 for as_dir in $PATH
4407 do
4408   IFS=$as_save_IFS
4409   test -z "$as_dir" && as_dir=.
4410     for ac_exec_ext in '' $ac_executable_extensions; do
4411   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4412     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4413     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4414     break 2
4415   fi
4416 done
4417   done
4418 IFS=$as_save_IFS
4419 
4420   ;;
4421 esac
4422 fi
4423 DIFF=$ac_cv_path_DIFF
4424 if test -n "$DIFF"; then
4425   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4426 $as_echo "$DIFF" >&6; }
4427 else
4428   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4429 $as_echo "no" >&6; }
4430 fi
4431 
4432 
4433   test -n "$DIFF" && break
4434 done
4435 
4436 
4437     if test "x$DIFF" = x; then
4438         if test "xgdiff diff" = x; then
4439           PROG_NAME=diff
4440         else
4441           PROG_NAME=gdiff diff
4442         fi
4443         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4444 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4445         as_fn_error $? "Cannot continue" "$LINENO" 5
4446     fi
4447 
4448 
4449 
4450     for ac_prog in dirname
4451 do
4452   # Extract the first word of "$ac_prog", so it can be a program name with args.
4453 set dummy $ac_prog; ac_word=$2
4454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4455 $as_echo_n "checking for $ac_word... " >&6; }
4456 if ${ac_cv_path_DIRNAME+:} false; then :
4457   $as_echo_n "(cached) " >&6
4458 else
4459   case $DIRNAME in
4460   [\\/]* | ?:[\\/]*)
4461   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4462   ;;
4463   *)
4464   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4465 for as_dir in $PATH
4466 do
4467   IFS=$as_save_IFS
4468   test -z "$as_dir" && as_dir=.
4469     for ac_exec_ext in '' $ac_executable_extensions; do
4470   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4471     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4472     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4473     break 2
4474   fi
4475 done
4476   done
4477 IFS=$as_save_IFS
4478 
4479   ;;
4480 esac
4481 fi
4482 DIRNAME=$ac_cv_path_DIRNAME
4483 if test -n "$DIRNAME"; then
4484   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4485 $as_echo "$DIRNAME" >&6; }
4486 else
4487   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4488 $as_echo "no" >&6; }
4489 fi
4490 
4491 
4492   test -n "$DIRNAME" && break
4493 done
4494 
4495 
4496     if test "x$DIRNAME" = x; then
4497         if test "xdirname" = x; then
4498           PROG_NAME=dirname
4499         else
4500           PROG_NAME=dirname
4501         fi
4502         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4503 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4504         as_fn_error $? "Cannot continue" "$LINENO" 5
4505     fi
4506 
4507 
4508 
4509     for ac_prog in echo
4510 do
4511   # Extract the first word of "$ac_prog", so it can be a program name with args.
4512 set dummy $ac_prog; ac_word=$2
4513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4514 $as_echo_n "checking for $ac_word... " >&6; }
4515 if ${ac_cv_path_ECHO+:} false; then :
4516   $as_echo_n "(cached) " >&6
4517 else
4518   case $ECHO in
4519   [\\/]* | ?:[\\/]*)
4520   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4521   ;;
4522   *)
4523   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4524 for as_dir in $PATH
4525 do
4526   IFS=$as_save_IFS
4527   test -z "$as_dir" && as_dir=.
4528     for ac_exec_ext in '' $ac_executable_extensions; do
4529   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4530     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4531     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4532     break 2
4533   fi
4534 done
4535   done
4536 IFS=$as_save_IFS
4537 
4538   ;;
4539 esac
4540 fi
4541 ECHO=$ac_cv_path_ECHO
4542 if test -n "$ECHO"; then
4543   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4544 $as_echo "$ECHO" >&6; }
4545 else
4546   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4547 $as_echo "no" >&6; }
4548 fi
4549 
4550 
4551   test -n "$ECHO" && break
4552 done
4553 
4554 
4555     if test "x$ECHO" = x; then
4556         if test "xecho" = x; then
4557           PROG_NAME=echo
4558         else
4559           PROG_NAME=echo
4560         fi
4561         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4562 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4563         as_fn_error $? "Cannot continue" "$LINENO" 5
4564     fi
4565 
4566 
4567 
4568     for ac_prog in expr
4569 do
4570   # Extract the first word of "$ac_prog", so it can be a program name with args.
4571 set dummy $ac_prog; ac_word=$2
4572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4573 $as_echo_n "checking for $ac_word... " >&6; }
4574 if ${ac_cv_path_EXPR+:} false; then :
4575   $as_echo_n "(cached) " >&6
4576 else
4577   case $EXPR in
4578   [\\/]* | ?:[\\/]*)
4579   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4580   ;;
4581   *)
4582   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4583 for as_dir in $PATH
4584 do
4585   IFS=$as_save_IFS
4586   test -z "$as_dir" && as_dir=.
4587     for ac_exec_ext in '' $ac_executable_extensions; do
4588   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4589     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4590     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4591     break 2
4592   fi
4593 done
4594   done
4595 IFS=$as_save_IFS
4596 
4597   ;;
4598 esac
4599 fi
4600 EXPR=$ac_cv_path_EXPR
4601 if test -n "$EXPR"; then
4602   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4603 $as_echo "$EXPR" >&6; }
4604 else
4605   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4606 $as_echo "no" >&6; }
4607 fi
4608 
4609 
4610   test -n "$EXPR" && break
4611 done
4612 
4613 
4614     if test "x$EXPR" = x; then
4615         if test "xexpr" = x; then
4616           PROG_NAME=expr
4617         else
4618           PROG_NAME=expr
4619         fi
4620         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4621 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4622         as_fn_error $? "Cannot continue" "$LINENO" 5
4623     fi
4624 
4625 
4626 
4627     for ac_prog in file
4628 do
4629   # Extract the first word of "$ac_prog", so it can be a program name with args.
4630 set dummy $ac_prog; ac_word=$2
4631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4632 $as_echo_n "checking for $ac_word... " >&6; }
4633 if ${ac_cv_path_FILE+:} false; then :
4634   $as_echo_n "(cached) " >&6
4635 else
4636   case $FILE in
4637   [\\/]* | ?:[\\/]*)
4638   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4639   ;;
4640   *)
4641   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4642 for as_dir in $PATH
4643 do
4644   IFS=$as_save_IFS
4645   test -z "$as_dir" && as_dir=.
4646     for ac_exec_ext in '' $ac_executable_extensions; do
4647   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4648     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4649     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4650     break 2
4651   fi
4652 done
4653   done
4654 IFS=$as_save_IFS
4655 
4656   ;;
4657 esac
4658 fi
4659 FILE=$ac_cv_path_FILE
4660 if test -n "$FILE"; then
4661   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4662 $as_echo "$FILE" >&6; }
4663 else
4664   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4665 $as_echo "no" >&6; }
4666 fi
4667 
4668 
4669   test -n "$FILE" && break
4670 done
4671 
4672 
4673     if test "x$FILE" = x; then
4674         if test "xfile" = x; then
4675           PROG_NAME=file
4676         else
4677           PROG_NAME=file
4678         fi
4679         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4680 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4681         as_fn_error $? "Cannot continue" "$LINENO" 5
4682     fi
4683 
4684 
4685 
4686     for ac_prog in find
4687 do
4688   # Extract the first word of "$ac_prog", so it can be a program name with args.
4689 set dummy $ac_prog; ac_word=$2
4690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4691 $as_echo_n "checking for $ac_word... " >&6; }
4692 if ${ac_cv_path_FIND+:} false; then :
4693   $as_echo_n "(cached) " >&6
4694 else
4695   case $FIND in
4696   [\\/]* | ?:[\\/]*)
4697   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4698   ;;
4699   *)
4700   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4701 for as_dir in $PATH
4702 do
4703   IFS=$as_save_IFS
4704   test -z "$as_dir" && as_dir=.
4705     for ac_exec_ext in '' $ac_executable_extensions; do
4706   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4707     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4708     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4709     break 2
4710   fi
4711 done
4712   done
4713 IFS=$as_save_IFS
4714 
4715   ;;
4716 esac
4717 fi
4718 FIND=$ac_cv_path_FIND
4719 if test -n "$FIND"; then
4720   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4721 $as_echo "$FIND" >&6; }
4722 else
4723   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4724 $as_echo "no" >&6; }
4725 fi
4726 
4727 
4728   test -n "$FIND" && break
4729 done
4730 
4731 
4732     if test "x$FIND" = x; then
4733         if test "xfind" = x; then
4734           PROG_NAME=find
4735         else
4736           PROG_NAME=find
4737         fi
4738         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4739 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4740         as_fn_error $? "Cannot continue" "$LINENO" 5
4741     fi
4742 
4743 
4744 
4745     for ac_prog in head
4746 do
4747   # Extract the first word of "$ac_prog", so it can be a program name with args.
4748 set dummy $ac_prog; ac_word=$2
4749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4750 $as_echo_n "checking for $ac_word... " >&6; }
4751 if ${ac_cv_path_HEAD+:} false; then :
4752   $as_echo_n "(cached) " >&6
4753 else
4754   case $HEAD in
4755   [\\/]* | ?:[\\/]*)
4756   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4757   ;;
4758   *)
4759   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4760 for as_dir in $PATH
4761 do
4762   IFS=$as_save_IFS
4763   test -z "$as_dir" && as_dir=.
4764     for ac_exec_ext in '' $ac_executable_extensions; do
4765   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4766     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4767     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4768     break 2
4769   fi
4770 done
4771   done
4772 IFS=$as_save_IFS
4773 
4774   ;;
4775 esac
4776 fi
4777 HEAD=$ac_cv_path_HEAD
4778 if test -n "$HEAD"; then
4779   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4780 $as_echo "$HEAD" >&6; }
4781 else
4782   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4783 $as_echo "no" >&6; }
4784 fi
4785 
4786 
4787   test -n "$HEAD" && break
4788 done
4789 
4790 
4791     if test "x$HEAD" = x; then
4792         if test "xhead" = x; then
4793           PROG_NAME=head
4794         else
4795           PROG_NAME=head
4796         fi
4797         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4798 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4799         as_fn_error $? "Cannot continue" "$LINENO" 5
4800     fi
4801 
4802 
4803 
4804     for ac_prog in ln
4805 do
4806   # Extract the first word of "$ac_prog", so it can be a program name with args.
4807 set dummy $ac_prog; ac_word=$2
4808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4809 $as_echo_n "checking for $ac_word... " >&6; }
4810 if ${ac_cv_path_LN+:} false; then :
4811   $as_echo_n "(cached) " >&6
4812 else
4813   case $LN in
4814   [\\/]* | ?:[\\/]*)
4815   ac_cv_path_LN="$LN" # Let the user override the test with a path.
4816   ;;
4817   *)
4818   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4819 for as_dir in $PATH
4820 do
4821   IFS=$as_save_IFS
4822   test -z "$as_dir" && as_dir=.
4823     for ac_exec_ext in '' $ac_executable_extensions; do
4824   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4825     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4826     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4827     break 2
4828   fi
4829 done
4830   done
4831 IFS=$as_save_IFS
4832 
4833   ;;
4834 esac
4835 fi
4836 LN=$ac_cv_path_LN
4837 if test -n "$LN"; then
4838   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4839 $as_echo "$LN" >&6; }
4840 else
4841   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4842 $as_echo "no" >&6; }
4843 fi
4844 
4845 
4846   test -n "$LN" && break
4847 done
4848 
4849 
4850     if test "x$LN" = x; then
4851         if test "xln" = x; then
4852           PROG_NAME=ln
4853         else
4854           PROG_NAME=ln
4855         fi
4856         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4857 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4858         as_fn_error $? "Cannot continue" "$LINENO" 5
4859     fi
4860 
4861 
4862 
4863     for ac_prog in ls
4864 do
4865   # Extract the first word of "$ac_prog", so it can be a program name with args.
4866 set dummy $ac_prog; ac_word=$2
4867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4868 $as_echo_n "checking for $ac_word... " >&6; }
4869 if ${ac_cv_path_LS+:} false; then :
4870   $as_echo_n "(cached) " >&6
4871 else
4872   case $LS in
4873   [\\/]* | ?:[\\/]*)
4874   ac_cv_path_LS="$LS" # Let the user override the test with a path.
4875   ;;
4876   *)
4877   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4878 for as_dir in $PATH
4879 do
4880   IFS=$as_save_IFS
4881   test -z "$as_dir" && as_dir=.
4882     for ac_exec_ext in '' $ac_executable_extensions; do
4883   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4884     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4885     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4886     break 2
4887   fi
4888 done
4889   done
4890 IFS=$as_save_IFS
4891 
4892   ;;
4893 esac
4894 fi
4895 LS=$ac_cv_path_LS
4896 if test -n "$LS"; then
4897   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4898 $as_echo "$LS" >&6; }
4899 else
4900   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4901 $as_echo "no" >&6; }
4902 fi
4903 
4904 
4905   test -n "$LS" && break
4906 done
4907 
4908 
4909     if test "x$LS" = x; then
4910         if test "xls" = x; then
4911           PROG_NAME=ls
4912         else
4913           PROG_NAME=ls
4914         fi
4915         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4916 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4917         as_fn_error $? "Cannot continue" "$LINENO" 5
4918     fi
4919 
4920 
4921 
4922     for ac_prog in mkdir
4923 do
4924   # Extract the first word of "$ac_prog", so it can be a program name with args.
4925 set dummy $ac_prog; ac_word=$2
4926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4927 $as_echo_n "checking for $ac_word... " >&6; }
4928 if ${ac_cv_path_MKDIR+:} false; then :
4929   $as_echo_n "(cached) " >&6
4930 else
4931   case $MKDIR in
4932   [\\/]* | ?:[\\/]*)
4933   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4934   ;;
4935   *)
4936   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4937 for as_dir in $PATH
4938 do
4939   IFS=$as_save_IFS
4940   test -z "$as_dir" && as_dir=.
4941     for ac_exec_ext in '' $ac_executable_extensions; do
4942   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4943     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4944     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4945     break 2
4946   fi
4947 done
4948   done
4949 IFS=$as_save_IFS
4950 
4951   ;;
4952 esac
4953 fi
4954 MKDIR=$ac_cv_path_MKDIR
4955 if test -n "$MKDIR"; then
4956   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4957 $as_echo "$MKDIR" >&6; }
4958 else
4959   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4960 $as_echo "no" >&6; }
4961 fi
4962 
4963 
4964   test -n "$MKDIR" && break
4965 done
4966 
4967 
4968     if test "x$MKDIR" = x; then
4969         if test "xmkdir" = x; then
4970           PROG_NAME=mkdir
4971         else
4972           PROG_NAME=mkdir
4973         fi
4974         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4975 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4976         as_fn_error $? "Cannot continue" "$LINENO" 5
4977     fi
4978 
4979 
4980 
4981     for ac_prog in mktemp
4982 do
4983   # Extract the first word of "$ac_prog", so it can be a program name with args.
4984 set dummy $ac_prog; ac_word=$2
4985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4986 $as_echo_n "checking for $ac_word... " >&6; }
4987 if ${ac_cv_path_MKTEMP+:} false; then :
4988   $as_echo_n "(cached) " >&6
4989 else
4990   case $MKTEMP in
4991   [\\/]* | ?:[\\/]*)
4992   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
4993   ;;
4994   *)
4995   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4996 for as_dir in $PATH
4997 do
4998   IFS=$as_save_IFS
4999   test -z "$as_dir" && as_dir=.
5000     for ac_exec_ext in '' $ac_executable_extensions; do
5001   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5002     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
5003     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5004     break 2
5005   fi
5006 done
5007   done
5008 IFS=$as_save_IFS
5009 
5010   ;;
5011 esac
5012 fi
5013 MKTEMP=$ac_cv_path_MKTEMP
5014 if test -n "$MKTEMP"; then
5015   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5016 $as_echo "$MKTEMP" >&6; }
5017 else
5018   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5019 $as_echo "no" >&6; }
5020 fi
5021 
5022 
5023   test -n "$MKTEMP" && break
5024 done
5025 
5026 
5027     if test "x$MKTEMP" = x; then
5028         if test "xmktemp" = x; then
5029           PROG_NAME=mktemp
5030         else
5031           PROG_NAME=mktemp
5032         fi
5033         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5034 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5035         as_fn_error $? "Cannot continue" "$LINENO" 5
5036     fi
5037 
5038 
5039 
5040     for ac_prog in mv
5041 do
5042   # Extract the first word of "$ac_prog", so it can be a program name with args.
5043 set dummy $ac_prog; ac_word=$2
5044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5045 $as_echo_n "checking for $ac_word... " >&6; }
5046 if ${ac_cv_path_MV+:} false; then :
5047   $as_echo_n "(cached) " >&6
5048 else
5049   case $MV in
5050   [\\/]* | ?:[\\/]*)
5051   ac_cv_path_MV="$MV" # Let the user override the test with a path.
5052   ;;
5053   *)
5054   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5055 for as_dir in $PATH
5056 do
5057   IFS=$as_save_IFS
5058   test -z "$as_dir" && as_dir=.
5059     for ac_exec_ext in '' $ac_executable_extensions; do
5060   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5061     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5062     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5063     break 2
5064   fi
5065 done
5066   done
5067 IFS=$as_save_IFS
5068 
5069   ;;
5070 esac
5071 fi
5072 MV=$ac_cv_path_MV
5073 if test -n "$MV"; then
5074   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5075 $as_echo "$MV" >&6; }
5076 else
5077   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5078 $as_echo "no" >&6; }
5079 fi
5080 
5081 
5082   test -n "$MV" && break
5083 done
5084 
5085 
5086     if test "x$MV" = x; then
5087         if test "xmv" = x; then
5088           PROG_NAME=mv
5089         else
5090           PROG_NAME=mv
5091         fi
5092         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5093 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5094         as_fn_error $? "Cannot continue" "$LINENO" 5
5095     fi
5096 
5097 
5098 
5099     for ac_prog in printf
5100 do
5101   # Extract the first word of "$ac_prog", so it can be a program name with args.
5102 set dummy $ac_prog; ac_word=$2
5103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5104 $as_echo_n "checking for $ac_word... " >&6; }
5105 if ${ac_cv_path_PRINTF+:} false; then :
5106   $as_echo_n "(cached) " >&6
5107 else
5108   case $PRINTF in
5109   [\\/]* | ?:[\\/]*)
5110   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5111   ;;
5112   *)
5113   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5114 for as_dir in $PATH
5115 do
5116   IFS=$as_save_IFS
5117   test -z "$as_dir" && as_dir=.
5118     for ac_exec_ext in '' $ac_executable_extensions; do
5119   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5120     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5121     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5122     break 2
5123   fi
5124 done
5125   done
5126 IFS=$as_save_IFS
5127 
5128   ;;
5129 esac
5130 fi
5131 PRINTF=$ac_cv_path_PRINTF
5132 if test -n "$PRINTF"; then
5133   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5134 $as_echo "$PRINTF" >&6; }
5135 else
5136   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5137 $as_echo "no" >&6; }
5138 fi
5139 
5140 
5141   test -n "$PRINTF" && break
5142 done
5143 
5144 
5145     if test "x$PRINTF" = x; then
5146         if test "xprintf" = x; then
5147           PROG_NAME=printf
5148         else
5149           PROG_NAME=printf
5150         fi
5151         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5152 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5153         as_fn_error $? "Cannot continue" "$LINENO" 5
5154     fi
5155 
5156 
5157 
5158     for ac_prog in pwd
5159 do
5160   # Extract the first word of "$ac_prog", so it can be a program name with args.
5161 set dummy $ac_prog; ac_word=$2
5162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5163 $as_echo_n "checking for $ac_word... " >&6; }
5164 if ${ac_cv_path_THEPWDCMD+:} false; then :
5165   $as_echo_n "(cached) " >&6
5166 else
5167   case $THEPWDCMD in
5168   [\\/]* | ?:[\\/]*)
5169   ac_cv_path_THEPWDCMD="$THEPWDCMD" # Let the user override the test with a path.
5170   ;;
5171   *)
5172   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5173 for as_dir in $PATH
5174 do
5175   IFS=$as_save_IFS
5176   test -z "$as_dir" && as_dir=.
5177     for ac_exec_ext in '' $ac_executable_extensions; do
5178   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5179     ac_cv_path_THEPWDCMD="$as_dir/$ac_word$ac_exec_ext"
5180     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5181     break 2
5182   fi
5183 done
5184   done
5185 IFS=$as_save_IFS
5186 
5187   ;;
5188 esac
5189 fi
5190 THEPWDCMD=$ac_cv_path_THEPWDCMD
5191 if test -n "$THEPWDCMD"; then
5192   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $THEPWDCMD" >&5
5193 $as_echo "$THEPWDCMD" >&6; }
5194 else
5195   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5196 $as_echo "no" >&6; }
5197 fi
5198 
5199 
5200   test -n "$THEPWDCMD" && break
5201 done
5202 
5203 
5204     if test "x$THEPWDCMD" = x; then
5205         if test "xpwd" = x; then
5206           PROG_NAME=thepwdcmd
5207         else
5208           PROG_NAME=pwd
5209         fi
5210         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5211 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5212         as_fn_error $? "Cannot continue" "$LINENO" 5
5213     fi
5214 
5215 
5216 
5217     for ac_prog in rm
5218 do
5219   # Extract the first word of "$ac_prog", so it can be a program name with args.
5220 set dummy $ac_prog; ac_word=$2
5221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5222 $as_echo_n "checking for $ac_word... " >&6; }
5223 if ${ac_cv_path_RM+:} false; then :
5224   $as_echo_n "(cached) " >&6
5225 else
5226   case $RM in
5227   [\\/]* | ?:[\\/]*)
5228   ac_cv_path_RM="$RM" # Let the user override the test with a path.
5229   ;;
5230   *)
5231   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5232 for as_dir in $PATH
5233 do
5234   IFS=$as_save_IFS
5235   test -z "$as_dir" && as_dir=.
5236     for ac_exec_ext in '' $ac_executable_extensions; do
5237   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5238     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5239     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5240     break 2
5241   fi
5242 done
5243   done
5244 IFS=$as_save_IFS
5245 
5246   ;;
5247 esac
5248 fi
5249 RM=$ac_cv_path_RM
5250 if test -n "$RM"; then
5251   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5252 $as_echo "$RM" >&6; }
5253 else
5254   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5255 $as_echo "no" >&6; }
5256 fi
5257 
5258 
5259   test -n "$RM" && break
5260 done
5261 
5262 
5263     if test "x$RM" = x; then
5264         if test "xrm" = x; then
5265           PROG_NAME=rm
5266         else
5267           PROG_NAME=rm
5268         fi
5269         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5270 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5271         as_fn_error $? "Cannot continue" "$LINENO" 5
5272     fi
5273 
5274 
5275 
5276     for ac_prog in sh
5277 do
5278   # Extract the first word of "$ac_prog", so it can be a program name with args.
5279 set dummy $ac_prog; ac_word=$2
5280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5281 $as_echo_n "checking for $ac_word... " >&6; }
5282 if ${ac_cv_path_SH+:} false; then :
5283   $as_echo_n "(cached) " >&6
5284 else
5285   case $SH in
5286   [\\/]* | ?:[\\/]*)
5287   ac_cv_path_SH="$SH" # Let the user override the test with a path.
5288   ;;
5289   *)
5290   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5291 for as_dir in $PATH
5292 do
5293   IFS=$as_save_IFS
5294   test -z "$as_dir" && as_dir=.
5295     for ac_exec_ext in '' $ac_executable_extensions; do
5296   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5297     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5298     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5299     break 2
5300   fi
5301 done
5302   done
5303 IFS=$as_save_IFS
5304 
5305   ;;
5306 esac
5307 fi
5308 SH=$ac_cv_path_SH
5309 if test -n "$SH"; then
5310   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5311 $as_echo "$SH" >&6; }
5312 else
5313   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5314 $as_echo "no" >&6; }
5315 fi
5316 
5317 
5318   test -n "$SH" && break
5319 done
5320 
5321 
5322     if test "x$SH" = x; then
5323         if test "xsh" = x; then
5324           PROG_NAME=sh
5325         else
5326           PROG_NAME=sh
5327         fi
5328         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5329 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5330         as_fn_error $? "Cannot continue" "$LINENO" 5
5331     fi
5332 
5333 
5334 
5335     for ac_prog in sort
5336 do
5337   # Extract the first word of "$ac_prog", so it can be a program name with args.
5338 set dummy $ac_prog; ac_word=$2
5339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5340 $as_echo_n "checking for $ac_word... " >&6; }
5341 if ${ac_cv_path_SORT+:} false; then :
5342   $as_echo_n "(cached) " >&6
5343 else
5344   case $SORT in
5345   [\\/]* | ?:[\\/]*)
5346   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5347   ;;
5348   *)
5349   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5350 for as_dir in $PATH
5351 do
5352   IFS=$as_save_IFS
5353   test -z "$as_dir" && as_dir=.
5354     for ac_exec_ext in '' $ac_executable_extensions; do
5355   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5356     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5357     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5358     break 2
5359   fi
5360 done
5361   done
5362 IFS=$as_save_IFS
5363 
5364   ;;
5365 esac
5366 fi
5367 SORT=$ac_cv_path_SORT
5368 if test -n "$SORT"; then
5369   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5370 $as_echo "$SORT" >&6; }
5371 else
5372   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5373 $as_echo "no" >&6; }
5374 fi
5375 
5376 
5377   test -n "$SORT" && break
5378 done
5379 
5380 
5381     if test "x$SORT" = x; then
5382         if test "xsort" = x; then
5383           PROG_NAME=sort
5384         else
5385           PROG_NAME=sort
5386         fi
5387         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5388 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5389         as_fn_error $? "Cannot continue" "$LINENO" 5
5390     fi
5391 
5392 
5393 
5394     for ac_prog in tail
5395 do
5396   # Extract the first word of "$ac_prog", so it can be a program name with args.
5397 set dummy $ac_prog; ac_word=$2
5398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5399 $as_echo_n "checking for $ac_word... " >&6; }
5400 if ${ac_cv_path_TAIL+:} false; then :
5401   $as_echo_n "(cached) " >&6
5402 else
5403   case $TAIL in
5404   [\\/]* | ?:[\\/]*)
5405   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5406   ;;
5407   *)
5408   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5409 for as_dir in $PATH
5410 do
5411   IFS=$as_save_IFS
5412   test -z "$as_dir" && as_dir=.
5413     for ac_exec_ext in '' $ac_executable_extensions; do
5414   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5415     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5416     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5417     break 2
5418   fi
5419 done
5420   done
5421 IFS=$as_save_IFS
5422 
5423   ;;
5424 esac
5425 fi
5426 TAIL=$ac_cv_path_TAIL
5427 if test -n "$TAIL"; then
5428   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5429 $as_echo "$TAIL" >&6; }
5430 else
5431   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5432 $as_echo "no" >&6; }
5433 fi
5434 
5435 
5436   test -n "$TAIL" && break
5437 done
5438 
5439 
5440     if test "x$TAIL" = x; then
5441         if test "xtail" = x; then
5442           PROG_NAME=tail
5443         else
5444           PROG_NAME=tail
5445         fi
5446         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5447 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5448         as_fn_error $? "Cannot continue" "$LINENO" 5
5449     fi
5450 
5451 
5452 
5453     for ac_prog in tar
5454 do
5455   # Extract the first word of "$ac_prog", so it can be a program name with args.
5456 set dummy $ac_prog; ac_word=$2
5457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5458 $as_echo_n "checking for $ac_word... " >&6; }
5459 if ${ac_cv_path_TAR+:} false; then :
5460   $as_echo_n "(cached) " >&6
5461 else
5462   case $TAR in
5463   [\\/]* | ?:[\\/]*)
5464   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5465   ;;
5466   *)
5467   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5468 for as_dir in $PATH
5469 do
5470   IFS=$as_save_IFS
5471   test -z "$as_dir" && as_dir=.
5472     for ac_exec_ext in '' $ac_executable_extensions; do
5473   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5474     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5475     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5476     break 2
5477   fi
5478 done
5479   done
5480 IFS=$as_save_IFS
5481 
5482   ;;
5483 esac
5484 fi
5485 TAR=$ac_cv_path_TAR
5486 if test -n "$TAR"; then
5487   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5488 $as_echo "$TAR" >&6; }
5489 else
5490   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5491 $as_echo "no" >&6; }
5492 fi
5493 
5494 
5495   test -n "$TAR" && break
5496 done
5497 
5498 
5499     if test "x$TAR" = x; then
5500         if test "xtar" = x; then
5501           PROG_NAME=tar
5502         else
5503           PROG_NAME=tar
5504         fi
5505         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5506 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5507         as_fn_error $? "Cannot continue" "$LINENO" 5
5508     fi
5509 
5510 
5511 
5512     for ac_prog in tee
5513 do
5514   # Extract the first word of "$ac_prog", so it can be a program name with args.
5515 set dummy $ac_prog; ac_word=$2
5516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5517 $as_echo_n "checking for $ac_word... " >&6; }
5518 if ${ac_cv_path_TEE+:} false; then :
5519   $as_echo_n "(cached) " >&6
5520 else
5521   case $TEE in
5522   [\\/]* | ?:[\\/]*)
5523   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5524   ;;
5525   *)
5526   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5527 for as_dir in $PATH
5528 do
5529   IFS=$as_save_IFS
5530   test -z "$as_dir" && as_dir=.
5531     for ac_exec_ext in '' $ac_executable_extensions; do
5532   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5533     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5534     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5535     break 2
5536   fi
5537 done
5538   done
5539 IFS=$as_save_IFS
5540 
5541   ;;
5542 esac
5543 fi
5544 TEE=$ac_cv_path_TEE
5545 if test -n "$TEE"; then
5546   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5547 $as_echo "$TEE" >&6; }
5548 else
5549   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5550 $as_echo "no" >&6; }
5551 fi
5552 
5553 
5554   test -n "$TEE" && break
5555 done
5556 
5557 
5558     if test "x$TEE" = x; then
5559         if test "xtee" = x; then
5560           PROG_NAME=tee
5561         else
5562           PROG_NAME=tee
5563         fi
5564         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5565 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5566         as_fn_error $? "Cannot continue" "$LINENO" 5
5567     fi
5568 
5569 
5570 
5571     for ac_prog in touch
5572 do
5573   # Extract the first word of "$ac_prog", so it can be a program name with args.
5574 set dummy $ac_prog; ac_word=$2
5575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5576 $as_echo_n "checking for $ac_word... " >&6; }
5577 if ${ac_cv_path_TOUCH+:} false; then :
5578   $as_echo_n "(cached) " >&6
5579 else
5580   case $TOUCH in
5581   [\\/]* | ?:[\\/]*)
5582   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5583   ;;
5584   *)
5585   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5586 for as_dir in $PATH
5587 do
5588   IFS=$as_save_IFS
5589   test -z "$as_dir" && as_dir=.
5590     for ac_exec_ext in '' $ac_executable_extensions; do
5591   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5592     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5593     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5594     break 2
5595   fi
5596 done
5597   done
5598 IFS=$as_save_IFS
5599 
5600   ;;
5601 esac
5602 fi
5603 TOUCH=$ac_cv_path_TOUCH
5604 if test -n "$TOUCH"; then
5605   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5606 $as_echo "$TOUCH" >&6; }
5607 else
5608   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5609 $as_echo "no" >&6; }
5610 fi
5611 
5612 
5613   test -n "$TOUCH" && break
5614 done
5615 
5616 
5617     if test "x$TOUCH" = x; then
5618         if test "xtouch" = x; then
5619           PROG_NAME=touch
5620         else
5621           PROG_NAME=touch
5622         fi
5623         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5624 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5625         as_fn_error $? "Cannot continue" "$LINENO" 5
5626     fi
5627 
5628 
5629 
5630     for ac_prog in tr
5631 do
5632   # Extract the first word of "$ac_prog", so it can be a program name with args.
5633 set dummy $ac_prog; ac_word=$2
5634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5635 $as_echo_n "checking for $ac_word... " >&6; }
5636 if ${ac_cv_path_TR+:} false; then :
5637   $as_echo_n "(cached) " >&6
5638 else
5639   case $TR in
5640   [\\/]* | ?:[\\/]*)
5641   ac_cv_path_TR="$TR" # Let the user override the test with a path.
5642   ;;
5643   *)
5644   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5645 for as_dir in $PATH
5646 do
5647   IFS=$as_save_IFS
5648   test -z "$as_dir" && as_dir=.
5649     for ac_exec_ext in '' $ac_executable_extensions; do
5650   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5651     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5652     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5653     break 2
5654   fi
5655 done
5656   done
5657 IFS=$as_save_IFS
5658 
5659   ;;
5660 esac
5661 fi
5662 TR=$ac_cv_path_TR
5663 if test -n "$TR"; then
5664   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5665 $as_echo "$TR" >&6; }
5666 else
5667   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5668 $as_echo "no" >&6; }
5669 fi
5670 
5671 
5672   test -n "$TR" && break
5673 done
5674 
5675 
5676     if test "x$TR" = x; then
5677         if test "xtr" = x; then
5678           PROG_NAME=tr
5679         else
5680           PROG_NAME=tr
5681         fi
5682         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5683 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5684         as_fn_error $? "Cannot continue" "$LINENO" 5
5685     fi
5686 
5687 
5688 
5689     for ac_prog in uname
5690 do
5691   # Extract the first word of "$ac_prog", so it can be a program name with args.
5692 set dummy $ac_prog; ac_word=$2
5693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5694 $as_echo_n "checking for $ac_word... " >&6; }
5695 if ${ac_cv_path_UNAME+:} false; then :
5696   $as_echo_n "(cached) " >&6
5697 else
5698   case $UNAME in
5699   [\\/]* | ?:[\\/]*)
5700   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5701   ;;
5702   *)
5703   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5704 for as_dir in $PATH
5705 do
5706   IFS=$as_save_IFS
5707   test -z "$as_dir" && as_dir=.
5708     for ac_exec_ext in '' $ac_executable_extensions; do
5709   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5710     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5711     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5712     break 2
5713   fi
5714 done
5715   done
5716 IFS=$as_save_IFS
5717 
5718   ;;
5719 esac
5720 fi
5721 UNAME=$ac_cv_path_UNAME
5722 if test -n "$UNAME"; then
5723   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5724 $as_echo "$UNAME" >&6; }
5725 else
5726   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5727 $as_echo "no" >&6; }
5728 fi
5729 
5730 
5731   test -n "$UNAME" && break
5732 done
5733 
5734 
5735     if test "x$UNAME" = x; then
5736         if test "xuname" = x; then
5737           PROG_NAME=uname
5738         else
5739           PROG_NAME=uname
5740         fi
5741         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5742 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5743         as_fn_error $? "Cannot continue" "$LINENO" 5
5744     fi
5745 
5746 
5747 
5748     for ac_prog in uniq
5749 do
5750   # Extract the first word of "$ac_prog", so it can be a program name with args.
5751 set dummy $ac_prog; ac_word=$2
5752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5753 $as_echo_n "checking for $ac_word... " >&6; }
5754 if ${ac_cv_path_UNIQ+:} false; then :
5755   $as_echo_n "(cached) " >&6
5756 else
5757   case $UNIQ in
5758   [\\/]* | ?:[\\/]*)
5759   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5760   ;;
5761   *)
5762   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5763 for as_dir in $PATH
5764 do
5765   IFS=$as_save_IFS
5766   test -z "$as_dir" && as_dir=.
5767     for ac_exec_ext in '' $ac_executable_extensions; do
5768   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5769     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5770     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5771     break 2
5772   fi
5773 done
5774   done
5775 IFS=$as_save_IFS
5776 
5777   ;;
5778 esac
5779 fi
5780 UNIQ=$ac_cv_path_UNIQ
5781 if test -n "$UNIQ"; then
5782   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5783 $as_echo "$UNIQ" >&6; }
5784 else
5785   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5786 $as_echo "no" >&6; }
5787 fi
5788 
5789 
5790   test -n "$UNIQ" && break
5791 done
5792 
5793 
5794     if test "x$UNIQ" = x; then
5795         if test "xuniq" = x; then
5796           PROG_NAME=uniq
5797         else
5798           PROG_NAME=uniq
5799         fi
5800         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5801 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5802         as_fn_error $? "Cannot continue" "$LINENO" 5
5803     fi
5804 
5805 
5806 
5807     for ac_prog in wc
5808 do
5809   # Extract the first word of "$ac_prog", so it can be a program name with args.
5810 set dummy $ac_prog; ac_word=$2
5811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5812 $as_echo_n "checking for $ac_word... " >&6; }
5813 if ${ac_cv_path_WC+:} false; then :
5814   $as_echo_n "(cached) " >&6
5815 else
5816   case $WC in
5817   [\\/]* | ?:[\\/]*)
5818   ac_cv_path_WC="$WC" # Let the user override the test with a path.
5819   ;;
5820   *)
5821   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5822 for as_dir in $PATH
5823 do
5824   IFS=$as_save_IFS
5825   test -z "$as_dir" && as_dir=.
5826     for ac_exec_ext in '' $ac_executable_extensions; do
5827   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5828     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5829     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5830     break 2
5831   fi
5832 done
5833   done
5834 IFS=$as_save_IFS
5835 
5836   ;;
5837 esac
5838 fi
5839 WC=$ac_cv_path_WC
5840 if test -n "$WC"; then
5841   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5842 $as_echo "$WC" >&6; }
5843 else
5844   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5845 $as_echo "no" >&6; }
5846 fi
5847 
5848 
5849   test -n "$WC" && break
5850 done
5851 
5852 
5853     if test "x$WC" = x; then
5854         if test "xwc" = x; then
5855           PROG_NAME=wc
5856         else
5857           PROG_NAME=wc
5858         fi
5859         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5860 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5861         as_fn_error $? "Cannot continue" "$LINENO" 5
5862     fi
5863 
5864 
5865 
5866     for ac_prog in which
5867 do
5868   # Extract the first word of "$ac_prog", so it can be a program name with args.
5869 set dummy $ac_prog; ac_word=$2
5870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5871 $as_echo_n "checking for $ac_word... " >&6; }
5872 if ${ac_cv_path_WHICH+:} false; then :
5873   $as_echo_n "(cached) " >&6
5874 else
5875   case $WHICH in
5876   [\\/]* | ?:[\\/]*)
5877   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5878   ;;
5879   *)
5880   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5881 for as_dir in $PATH
5882 do
5883   IFS=$as_save_IFS
5884   test -z "$as_dir" && as_dir=.
5885     for ac_exec_ext in '' $ac_executable_extensions; do
5886   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5887     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5888     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5889     break 2
5890   fi
5891 done
5892   done
5893 IFS=$as_save_IFS
5894 
5895   ;;
5896 esac
5897 fi
5898 WHICH=$ac_cv_path_WHICH
5899 if test -n "$WHICH"; then
5900   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5901 $as_echo "$WHICH" >&6; }
5902 else
5903   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5904 $as_echo "no" >&6; }
5905 fi
5906 
5907 
5908   test -n "$WHICH" && break
5909 done
5910 
5911 
5912     if test "x$WHICH" = x; then
5913         if test "xwhich" = x; then
5914           PROG_NAME=which
5915         else
5916           PROG_NAME=which
5917         fi
5918         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5919 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5920         as_fn_error $? "Cannot continue" "$LINENO" 5
5921     fi
5922 
5923 
5924 
5925     for ac_prog in xargs
5926 do
5927   # Extract the first word of "$ac_prog", so it can be a program name with args.
5928 set dummy $ac_prog; ac_word=$2
5929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5930 $as_echo_n "checking for $ac_word... " >&6; }
5931 if ${ac_cv_path_XARGS+:} false; then :
5932   $as_echo_n "(cached) " >&6
5933 else
5934   case $XARGS in
5935   [\\/]* | ?:[\\/]*)
5936   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5937   ;;
5938   *)
5939   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5940 for as_dir in $PATH
5941 do
5942   IFS=$as_save_IFS
5943   test -z "$as_dir" && as_dir=.
5944     for ac_exec_ext in '' $ac_executable_extensions; do
5945   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5946     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5947     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5948     break 2
5949   fi
5950 done
5951   done
5952 IFS=$as_save_IFS
5953 
5954   ;;
5955 esac
5956 fi
5957 XARGS=$ac_cv_path_XARGS
5958 if test -n "$XARGS"; then
5959   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5960 $as_echo "$XARGS" >&6; }
5961 else
5962   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5963 $as_echo "no" >&6; }
5964 fi
5965 
5966 
5967   test -n "$XARGS" && break
5968 done
5969 
5970 
5971     if test "x$XARGS" = x; then
5972         if test "xxargs" = x; then
5973           PROG_NAME=xargs
5974         else
5975           PROG_NAME=xargs
5976         fi
5977         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5978 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5979         as_fn_error $? "Cannot continue" "$LINENO" 5
5980     fi
5981 
5982 
5983 
5984 # Then required tools that require some special treatment.
5985 for ac_prog in gawk mawk nawk awk
5986 do
5987   # Extract the first word of "$ac_prog", so it can be a program name with args.
5988 set dummy $ac_prog; ac_word=$2
5989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5990 $as_echo_n "checking for $ac_word... " >&6; }
5991 if ${ac_cv_prog_AWK+:} false; then :
5992   $as_echo_n "(cached) " >&6
5993 else
5994   if test -n "$AWK"; then
5995   ac_cv_prog_AWK="$AWK" # Let the user override the test.
5996 else
5997 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5998 for as_dir in $PATH
5999 do
6000   IFS=$as_save_IFS
6001   test -z "$as_dir" && as_dir=.
6002     for ac_exec_ext in '' $ac_executable_extensions; do
6003   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6004     ac_cv_prog_AWK="$ac_prog"
6005     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6006     break 2
6007   fi
6008 done
6009   done
6010 IFS=$as_save_IFS
6011 
6012 fi
6013 fi
6014 AWK=$ac_cv_prog_AWK
6015 if test -n "$AWK"; then
6016   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6017 $as_echo "$AWK" >&6; }
6018 else
6019   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6020 $as_echo "no" >&6; }
6021 fi
6022 
6023 
6024   test -n "$AWK" && break
6025 done
6026 
6027 
6028     if test "x$AWK" = x; then
6029         if test "x" = x; then
6030           PROG_NAME=awk
6031         else
6032           PROG_NAME=
6033         fi
6034         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6035 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6036         as_fn_error $? "Cannot continue" "$LINENO" 5
6037     fi
6038 
6039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6040 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6041 if ${ac_cv_path_GREP+:} false; then :
6042   $as_echo_n "(cached) " >&6
6043 else
6044   if test -z "$GREP"; then
6045   ac_path_GREP_found=false
6046   # Loop through the user's path and test for each of PROGNAME-LIST
6047   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6048 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6049 do
6050   IFS=$as_save_IFS
6051   test -z "$as_dir" && as_dir=.
6052     for ac_prog in grep ggrep; do
6053     for ac_exec_ext in '' $ac_executable_extensions; do
6054       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6055       { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6056 # Check for GNU ac_path_GREP and select it if it is found.
6057   # Check for GNU $ac_path_GREP
6058 case `"$ac_path_GREP" --version 2>&1` in
6059 *GNU*)
6060   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6061 *)
6062   ac_count=0
6063   $as_echo_n 0123456789 >"conftest.in"
6064   while :
6065   do
6066     cat "conftest.in" "conftest.in" >"conftest.tmp"
6067     mv "conftest.tmp" "conftest.in"
6068     cp "conftest.in" "conftest.nl"
6069     $as_echo 'GREP' >> "conftest.nl"
6070     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6071     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6072     as_fn_arith $ac_count + 1 && ac_count=$as_val
6073     if test $ac_count -gt ${ac_path_GREP_max-0}; then
6074       # Best one so far, save it but keep looking for a better one
6075       ac_cv_path_GREP="$ac_path_GREP"
6076       ac_path_GREP_max=$ac_count
6077     fi
6078     # 10*(2^10) chars as input seems more than enough
6079     test $ac_count -gt 10 && break
6080   done
6081   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6082 esac
6083 
6084       $ac_path_GREP_found && break 3
6085     done
6086   done
6087   done
6088 IFS=$as_save_IFS
6089   if test -z "$ac_cv_path_GREP"; then
6090     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6091   fi
6092 else
6093   ac_cv_path_GREP=$GREP
6094 fi
6095 
6096 fi
6097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6098 $as_echo "$ac_cv_path_GREP" >&6; }
6099  GREP="$ac_cv_path_GREP"
6100 
6101 
6102 
6103     if test "x$GREP" = x; then
6104         if test "x" = x; then
6105           PROG_NAME=grep
6106         else
6107           PROG_NAME=
6108         fi
6109         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6110 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6111         as_fn_error $? "Cannot continue" "$LINENO" 5
6112     fi
6113 
6114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6115 $as_echo_n "checking for egrep... " >&6; }
6116 if ${ac_cv_path_EGREP+:} false; then :
6117   $as_echo_n "(cached) " >&6
6118 else
6119   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6120    then ac_cv_path_EGREP="$GREP -E"
6121    else
6122      if test -z "$EGREP"; then
6123   ac_path_EGREP_found=false
6124   # Loop through the user's path and test for each of PROGNAME-LIST
6125   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6126 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6127 do
6128   IFS=$as_save_IFS
6129   test -z "$as_dir" && as_dir=.
6130     for ac_prog in egrep; do
6131     for ac_exec_ext in '' $ac_executable_extensions; do
6132       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6133       { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6134 # Check for GNU ac_path_EGREP and select it if it is found.
6135   # Check for GNU $ac_path_EGREP
6136 case `"$ac_path_EGREP" --version 2>&1` in
6137 *GNU*)
6138   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6139 *)
6140   ac_count=0
6141   $as_echo_n 0123456789 >"conftest.in"
6142   while :
6143   do
6144     cat "conftest.in" "conftest.in" >"conftest.tmp"
6145     mv "conftest.tmp" "conftest.in"
6146     cp "conftest.in" "conftest.nl"
6147     $as_echo 'EGREP' >> "conftest.nl"
6148     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6149     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6150     as_fn_arith $ac_count + 1 && ac_count=$as_val
6151     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6152       # Best one so far, save it but keep looking for a better one
6153       ac_cv_path_EGREP="$ac_path_EGREP"
6154       ac_path_EGREP_max=$ac_count
6155     fi
6156     # 10*(2^10) chars as input seems more than enough
6157     test $ac_count -gt 10 && break
6158   done
6159   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6160 esac
6161 
6162       $ac_path_EGREP_found && break 3
6163     done
6164   done
6165   done
6166 IFS=$as_save_IFS
6167   if test -z "$ac_cv_path_EGREP"; then
6168     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6169   fi
6170 else
6171   ac_cv_path_EGREP=$EGREP
6172 fi
6173 
6174    fi
6175 fi
6176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6177 $as_echo "$ac_cv_path_EGREP" >&6; }
6178  EGREP="$ac_cv_path_EGREP"
6179 
6180 
6181 
6182     if test "x$EGREP" = x; then
6183         if test "x" = x; then
6184           PROG_NAME=egrep
6185         else
6186           PROG_NAME=
6187         fi
6188         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6189 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6190         as_fn_error $? "Cannot continue" "$LINENO" 5
6191     fi
6192 
6193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6194 $as_echo_n "checking for fgrep... " >&6; }
6195 if ${ac_cv_path_FGREP+:} false; then :
6196   $as_echo_n "(cached) " >&6
6197 else
6198   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6199    then ac_cv_path_FGREP="$GREP -F"
6200    else
6201      if test -z "$FGREP"; then
6202   ac_path_FGREP_found=false
6203   # Loop through the user's path and test for each of PROGNAME-LIST
6204   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6205 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6206 do
6207   IFS=$as_save_IFS
6208   test -z "$as_dir" && as_dir=.
6209     for ac_prog in fgrep; do
6210     for ac_exec_ext in '' $ac_executable_extensions; do
6211       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6212       { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6213 # Check for GNU ac_path_FGREP and select it if it is found.
6214   # Check for GNU $ac_path_FGREP
6215 case `"$ac_path_FGREP" --version 2>&1` in
6216 *GNU*)
6217   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6218 *)
6219   ac_count=0
6220   $as_echo_n 0123456789 >"conftest.in"
6221   while :
6222   do
6223     cat "conftest.in" "conftest.in" >"conftest.tmp"
6224     mv "conftest.tmp" "conftest.in"
6225     cp "conftest.in" "conftest.nl"
6226     $as_echo 'FGREP' >> "conftest.nl"
6227     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6228     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6229     as_fn_arith $ac_count + 1 && ac_count=$as_val
6230     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6231       # Best one so far, save it but keep looking for a better one
6232       ac_cv_path_FGREP="$ac_path_FGREP"
6233       ac_path_FGREP_max=$ac_count
6234     fi
6235     # 10*(2^10) chars as input seems more than enough
6236     test $ac_count -gt 10 && break
6237   done
6238   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6239 esac
6240 
6241       $ac_path_FGREP_found && break 3
6242     done
6243   done
6244   done
6245 IFS=$as_save_IFS
6246   if test -z "$ac_cv_path_FGREP"; then
6247     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6248   fi
6249 else
6250   ac_cv_path_FGREP=$FGREP
6251 fi
6252 
6253    fi
6254 fi
6255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6256 $as_echo "$ac_cv_path_FGREP" >&6; }
6257  FGREP="$ac_cv_path_FGREP"
6258 
6259 
6260 
6261     if test "x$FGREP" = x; then
6262         if test "x" = x; then
6263           PROG_NAME=fgrep
6264         else
6265           PROG_NAME=
6266         fi
6267         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6268 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6269         as_fn_error $? "Cannot continue" "$LINENO" 5
6270     fi
6271 
6272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6273 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
6274 if ${ac_cv_path_SED+:} false; then :
6275   $as_echo_n "(cached) " >&6
6276 else
6277             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6278      for ac_i in 1 2 3 4 5 6 7; do
6279        ac_script="$ac_script$as_nl$ac_script"
6280      done
6281      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6282      { ac_script=; unset ac_script;}
6283      if test -z "$SED"; then
6284   ac_path_SED_found=false
6285   # Loop through the user's path and test for each of PROGNAME-LIST
6286   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6287 for as_dir in $PATH
6288 do
6289   IFS=$as_save_IFS
6290   test -z "$as_dir" && as_dir=.
6291     for ac_prog in sed gsed; do
6292     for ac_exec_ext in '' $ac_executable_extensions; do
6293       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6294       { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6295 # Check for GNU ac_path_SED and select it if it is found.
6296   # Check for GNU $ac_path_SED
6297 case `"$ac_path_SED" --version 2>&1` in
6298 *GNU*)
6299   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6300 *)
6301   ac_count=0
6302   $as_echo_n 0123456789 >"conftest.in"
6303   while :
6304   do
6305     cat "conftest.in" "conftest.in" >"conftest.tmp"
6306     mv "conftest.tmp" "conftest.in"
6307     cp "conftest.in" "conftest.nl"
6308     $as_echo '' >> "conftest.nl"
6309     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6310     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6311     as_fn_arith $ac_count + 1 && ac_count=$as_val
6312     if test $ac_count -gt ${ac_path_SED_max-0}; then
6313       # Best one so far, save it but keep looking for a better one
6314       ac_cv_path_SED="$ac_path_SED"
6315       ac_path_SED_max=$ac_count
6316     fi
6317     # 10*(2^10) chars as input seems more than enough
6318     test $ac_count -gt 10 && break
6319   done
6320   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6321 esac
6322 
6323       $ac_path_SED_found && break 3
6324     done
6325   done
6326   done
6327 IFS=$as_save_IFS
6328   if test -z "$ac_cv_path_SED"; then
6329     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6330   fi
6331 else
6332   ac_cv_path_SED=$SED
6333 fi
6334 
6335 fi
6336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6337 $as_echo "$ac_cv_path_SED" >&6; }
6338  SED="$ac_cv_path_SED"
6339   rm -f conftest.sed
6340 
6341 
6342     if test "x$SED" = x; then
6343         if test "x" = x; then
6344           PROG_NAME=sed
6345         else
6346           PROG_NAME=
6347         fi
6348         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6349 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6350         as_fn_error $? "Cannot continue" "$LINENO" 5
6351     fi
6352 
6353 
6354 for ac_prog in nawk gawk awk
6355 do
6356   # Extract the first word of "$ac_prog", so it can be a program name with args.
6357 set dummy $ac_prog; ac_word=$2
6358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6359 $as_echo_n "checking for $ac_word... " >&6; }
6360 if ${ac_cv_path_NAWK+:} false; then :
6361   $as_echo_n "(cached) " >&6
6362 else
6363   case $NAWK in
6364   [\\/]* | ?:[\\/]*)
6365   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6366   ;;
6367   *)
6368   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6369 for as_dir in $PATH
6370 do
6371   IFS=$as_save_IFS
6372   test -z "$as_dir" && as_dir=.
6373     for ac_exec_ext in '' $ac_executable_extensions; do
6374   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6375     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6376     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6377     break 2
6378   fi
6379 done
6380   done
6381 IFS=$as_save_IFS
6382 
6383   ;;
6384 esac
6385 fi
6386 NAWK=$ac_cv_path_NAWK
6387 if test -n "$NAWK"; then
6388   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6389 $as_echo "$NAWK" >&6; }
6390 else
6391   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6392 $as_echo "no" >&6; }
6393 fi
6394 
6395 
6396   test -n "$NAWK" && break
6397 done
6398 
6399 
6400     if test "x$NAWK" = x; then
6401         if test "x" = x; then
6402           PROG_NAME=nawk
6403         else
6404           PROG_NAME=
6405         fi
6406         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6407 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6408         as_fn_error $? "Cannot continue" "$LINENO" 5
6409     fi
6410 
6411 
6412 # Always force rm.
6413 RM="$RM -f"
6414 
6415 # These are not required on all platforms
6416 # Extract the first word of "cygpath", so it can be a program name with args.
6417 set dummy cygpath; ac_word=$2
6418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6419 $as_echo_n "checking for $ac_word... " >&6; }
6420 if ${ac_cv_path_CYGPATH+:} false; then :
6421   $as_echo_n "(cached) " >&6
6422 else
6423   case $CYGPATH in
6424   [\\/]* | ?:[\\/]*)
6425   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6426   ;;
6427   *)
6428   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6429 for as_dir in $PATH
6430 do
6431   IFS=$as_save_IFS
6432   test -z "$as_dir" && as_dir=.
6433     for ac_exec_ext in '' $ac_executable_extensions; do
6434   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6435     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6436     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6437     break 2
6438   fi
6439 done
6440   done
6441 IFS=$as_save_IFS
6442 
6443   ;;
6444 esac
6445 fi
6446 CYGPATH=$ac_cv_path_CYGPATH
6447 if test -n "$CYGPATH"; then
6448   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6449 $as_echo "$CYGPATH" >&6; }
6450 else
6451   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6452 $as_echo "no" >&6; }
6453 fi
6454 
6455 
6456 # Extract the first word of "readlink", so it can be a program name with args.
6457 set dummy readlink; ac_word=$2
6458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6459 $as_echo_n "checking for $ac_word... " >&6; }
6460 if ${ac_cv_path_READLINK+:} false; then :
6461   $as_echo_n "(cached) " >&6
6462 else
6463   case $READLINK in
6464   [\\/]* | ?:[\\/]*)
6465   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6466   ;;
6467   *)
6468   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6469 for as_dir in $PATH
6470 do
6471   IFS=$as_save_IFS
6472   test -z "$as_dir" && as_dir=.
6473     for ac_exec_ext in '' $ac_executable_extensions; do
6474   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6475     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6476     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6477     break 2
6478   fi
6479 done
6480   done
6481 IFS=$as_save_IFS
6482 
6483   ;;
6484 esac
6485 fi
6486 READLINK=$ac_cv_path_READLINK
6487 if test -n "$READLINK"; then
6488   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6489 $as_echo "$READLINK" >&6; }
6490 else
6491   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6492 $as_echo "no" >&6; }
6493 fi
6494 
6495 
6496 # Extract the first word of "df", so it can be a program name with args.
6497 set dummy df; ac_word=$2
6498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6499 $as_echo_n "checking for $ac_word... " >&6; }
6500 if ${ac_cv_path_DF+:} false; then :
6501   $as_echo_n "(cached) " >&6
6502 else
6503   case $DF in
6504   [\\/]* | ?:[\\/]*)
6505   ac_cv_path_DF="$DF" # Let the user override the test with a path.
6506   ;;
6507   *)
6508   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6509 for as_dir in $PATH
6510 do
6511   IFS=$as_save_IFS
6512   test -z "$as_dir" && as_dir=.
6513     for ac_exec_ext in '' $ac_executable_extensions; do
6514   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6515     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6516     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6517     break 2
6518   fi
6519 done
6520   done
6521 IFS=$as_save_IFS
6522 
6523   ;;
6524 esac
6525 fi
6526 DF=$ac_cv_path_DF
6527 if test -n "$DF"; then
6528   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6529 $as_echo "$DF" >&6; }
6530 else
6531   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6532 $as_echo "no" >&6; }
6533 fi
6534 
6535 
6536 # Extract the first word of "SetFile", so it can be a program name with args.
6537 set dummy SetFile; ac_word=$2
6538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6539 $as_echo_n "checking for $ac_word... " >&6; }
6540 if ${ac_cv_path_SETFILE+:} false; then :
6541   $as_echo_n "(cached) " >&6
6542 else
6543   case $SETFILE in
6544   [\\/]* | ?:[\\/]*)
6545   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6546   ;;
6547   *)
6548   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6549 for as_dir in $PATH
6550 do
6551   IFS=$as_save_IFS
6552   test -z "$as_dir" && as_dir=.
6553     for ac_exec_ext in '' $ac_executable_extensions; do
6554   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6555     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6556     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6557     break 2
6558   fi
6559 done
6560   done
6561 IFS=$as_save_IFS
6562 
6563   ;;
6564 esac
6565 fi
6566 SETFILE=$ac_cv_path_SETFILE
6567 if test -n "$SETFILE"; then
6568   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6569 $as_echo "$SETFILE" >&6; }
6570 else
6571   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6572 $as_echo "no" >&6; }
6573 fi
6574 
6575 
6576 
6577 
6578 # Now we can determine OpenJDK build and target platforms. This is required to
6579 # have early on.
6580 # Make sure we can run config.sub.
6581 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6582   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6583 
6584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6585 $as_echo_n "checking build system type... " >&6; }
6586 if ${ac_cv_build+:} false; then :
6587   $as_echo_n "(cached) " >&6
6588 else
6589   ac_build_alias=$build_alias
6590 test "x$ac_build_alias" = x &&
6591   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6592 test "x$ac_build_alias" = x &&
6593   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6594 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6595   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6596 
6597 fi
6598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6599 $as_echo "$ac_cv_build" >&6; }
6600 case $ac_cv_build in
6601 *-*-*) ;;
6602 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6603 esac
6604 build=$ac_cv_build
6605 ac_save_IFS=$IFS; IFS='-'
6606 set x $ac_cv_build
6607 shift
6608 build_cpu=$1
6609 build_vendor=$2
6610 shift; shift
6611 # Remember, the first character of IFS is used to create $*,
6612 # except with old shells:
6613 build_os=$*
6614 IFS=$ac_save_IFS
6615 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6616 
6617 
6618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6619 $as_echo_n "checking host system type... " >&6; }
6620 if ${ac_cv_host+:} false; then :
6621   $as_echo_n "(cached) " >&6
6622 else
6623   if test "x$host_alias" = x; then
6624   ac_cv_host=$ac_cv_build
6625 else
6626   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6627     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6628 fi
6629 
6630 fi
6631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6632 $as_echo "$ac_cv_host" >&6; }
6633 case $ac_cv_host in
6634 *-*-*) ;;
6635 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6636 esac
6637 host=$ac_cv_host
6638 ac_save_IFS=$IFS; IFS='-'
6639 set x $ac_cv_host
6640 shift
6641 host_cpu=$1
6642 host_vendor=$2
6643 shift; shift
6644 # Remember, the first character of IFS is used to create $*,
6645 # except with old shells:
6646 host_os=$*
6647 IFS=$ac_save_IFS
6648 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6649 
6650 
6651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6652 $as_echo_n "checking target system type... " >&6; }
6653 if ${ac_cv_target+:} false; then :
6654   $as_echo_n "(cached) " >&6
6655 else
6656   if test "x$target_alias" = x; then
6657   ac_cv_target=$ac_cv_host
6658 else
6659   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6660     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6661 fi
6662 
6663 fi
6664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6665 $as_echo "$ac_cv_target" >&6; }
6666 case $ac_cv_target in
6667 *-*-*) ;;
6668 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6669 esac
6670 target=$ac_cv_target
6671 ac_save_IFS=$IFS; IFS='-'
6672 set x $ac_cv_target
6673 shift
6674 target_cpu=$1
6675 target_vendor=$2
6676 shift; shift
6677 # Remember, the first character of IFS is used to create $*,
6678 # except with old shells:
6679 target_os=$*
6680 IFS=$ac_save_IFS
6681 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6682 
6683 
6684 # The aliases save the names the user supplied, while $host etc.
6685 # will get canonicalized.
6686 test -n "$target_alias" &&
6687   test "$program_prefix$program_suffix$program_transform_name" = \
6688     NONENONEs,x,x, &&
6689   program_prefix=${target_alias}-
6690 
6691 # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6692 # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6693 # product you're building. The target of this build is called "host". Since this is confusing to most people, we
6694 # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6695 # to use the configure naming style.
6696 
6697 
6698 
6699 
6700 
6701     # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6702     # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6703     # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6704     # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6705     OPENJDK_TARGET_AUTOCONF_NAME="$host"
6706     OPENJDK_BUILD_AUTOCONF_NAME="$build"
6707 
6708 
6709 
6710     # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6711 
6712   case "$build_os" in
6713     *linux*)
6714       VAR_OS=linux
6715       VAR_OS_API=posix
6716       VAR_OS_ENV=linux
6717       ;;
6718     *solaris*)
6719       VAR_OS=solaris
6720       VAR_OS_API=posix
6721       VAR_OS_ENV=solaris
6722       ;;
6723     *darwin*)
6724       VAR_OS=macosx
6725       VAR_OS_API=posix
6726       VAR_OS_ENV=macosx
6727       ;;
6728     *bsd*)
6729       VAR_OS=bsd
6730       VAR_OS_API=posix
6731       VAR_OS_ENV=bsd
6732       ;;
6733     *cygwin*)
6734       VAR_OS=windows
6735       VAR_OS_API=winapi
6736       VAR_OS_ENV=windows.cygwin
6737       ;;
6738     *mingw*)
6739       VAR_OS=windows
6740       VAR_OS_API=winapi
6741       VAR_OS_ENV=windows.msys
6742       ;;
6743     *)
6744       as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6745       ;;
6746   esac
6747 
6748 
6749   # First argument is the cpu name from the trip/quad
6750   case "$build_cpu" in
6751     x86_64)
6752       VAR_CPU=x86_64
6753       VAR_CPU_ARCH=x86
6754       VAR_CPU_BITS=64
6755       VAR_CPU_ENDIAN=little
6756       ;;
6757     i?86)
6758       VAR_CPU=x86
6759       VAR_CPU_ARCH=x86
6760       VAR_CPU_BITS=32
6761       VAR_CPU_ENDIAN=little
6762       ;;
6763     arm*)
6764       VAR_CPU=arm
6765       VAR_CPU_ARCH=arm
6766       VAR_CPU_BITS=32
6767       VAR_CPU_ENDIAN=little
6768       ;;
6769     powerpc)
6770       VAR_CPU=ppc
6771       VAR_CPU_ARCH=ppc
6772       VAR_CPU_BITS=32
6773       VAR_CPU_ENDIAN=big
6774        ;;
6775     powerpc64)
6776       VAR_CPU=ppc64
6777       VAR_CPU_ARCH=ppc
6778       VAR_CPU_BITS=64
6779       VAR_CPU_ENDIAN=big
6780        ;;
6781     sparc)
6782       VAR_CPU=sparc
6783       VAR_CPU_ARCH=sparc
6784       VAR_CPU_BITS=32
6785       VAR_CPU_ENDIAN=big
6786        ;;
6787     sparcv9)
6788       VAR_CPU=sparcv9
6789       VAR_CPU_ARCH=sparc
6790       VAR_CPU_BITS=64
6791       VAR_CPU_ENDIAN=big
6792        ;;
6793     *)
6794       as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6795       ;;
6796   esac
6797 
6798     # ..and setup our own variables. (Do this explicitely to facilitate searching)
6799     OPENJDK_BUILD_OS="$VAR_OS"
6800     OPENJDK_BUILD_OS_API="$VAR_OS_API"
6801     OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6802     OPENJDK_BUILD_CPU="$VAR_CPU"
6803     OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6804     OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6805     OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6806 
6807 
6808 
6809 
6810 
6811 
6812 
6813     { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6814 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
6815     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6816 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6817 
6818     # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6819 
6820   case "$host_os" in
6821     *linux*)
6822       VAR_OS=linux
6823       VAR_OS_API=posix
6824       VAR_OS_ENV=linux
6825       ;;
6826     *solaris*)
6827       VAR_OS=solaris
6828       VAR_OS_API=posix
6829       VAR_OS_ENV=solaris
6830       ;;
6831     *darwin*)
6832       VAR_OS=macosx
6833       VAR_OS_API=posix
6834       VAR_OS_ENV=macosx
6835       ;;
6836     *bsd*)
6837       VAR_OS=bsd
6838       VAR_OS_API=posix
6839       VAR_OS_ENV=bsd
6840       ;;
6841     *cygwin*)
6842       VAR_OS=windows
6843       VAR_OS_API=winapi
6844       VAR_OS_ENV=windows.cygwin
6845       ;;
6846     *mingw*)
6847       VAR_OS=windows
6848       VAR_OS_API=winapi
6849       VAR_OS_ENV=windows.msys
6850       ;;
6851     *)
6852       as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6853       ;;
6854   esac
6855 
6856 
6857   # First argument is the cpu name from the trip/quad
6858   case "$host_cpu" in
6859     x86_64)
6860       VAR_CPU=x86_64
6861       VAR_CPU_ARCH=x86
6862       VAR_CPU_BITS=64
6863       VAR_CPU_ENDIAN=little
6864       ;;
6865     i?86)
6866       VAR_CPU=x86
6867       VAR_CPU_ARCH=x86
6868       VAR_CPU_BITS=32
6869       VAR_CPU_ENDIAN=little
6870       ;;
6871     arm*)
6872       VAR_CPU=arm
6873       VAR_CPU_ARCH=arm
6874       VAR_CPU_BITS=32
6875       VAR_CPU_ENDIAN=little
6876       ;;
6877     powerpc)
6878       VAR_CPU=ppc
6879       VAR_CPU_ARCH=ppc
6880       VAR_CPU_BITS=32
6881       VAR_CPU_ENDIAN=big
6882        ;;
6883     powerpc64)
6884       VAR_CPU=ppc64
6885       VAR_CPU_ARCH=ppc
6886       VAR_CPU_BITS=64
6887       VAR_CPU_ENDIAN=big
6888        ;;
6889     sparc)
6890       VAR_CPU=sparc
6891       VAR_CPU_ARCH=sparc
6892       VAR_CPU_BITS=32
6893       VAR_CPU_ENDIAN=big
6894        ;;
6895     sparcv9)
6896       VAR_CPU=sparcv9
6897       VAR_CPU_ARCH=sparc
6898       VAR_CPU_BITS=64
6899       VAR_CPU_ENDIAN=big
6900        ;;
6901     *)
6902       as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6903       ;;
6904   esac
6905 
6906     # ... and setup our own variables. (Do this explicitely to facilitate searching)
6907     OPENJDK_TARGET_OS="$VAR_OS"
6908     OPENJDK_TARGET_OS_API="$VAR_OS_API"
6909     OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6910     OPENJDK_TARGET_CPU="$VAR_CPU"
6911     OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6912     OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6913     OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6914 
6915 
6916 
6917 
6918 
6919 
6920 
6921     { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6922 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
6923     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6924 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6925 
6926 
6927 
6928 # Check whether --with-target-bits was given.
6929 if test "${with_target_bits+set}" = set; then :
6930   withval=$with_target_bits;
6931 fi
6932 
6933 
6934   # We have three types of compiles:
6935   # native  == normal compilation, target system == build system
6936   # cross   == traditional cross compilation, target system != build system; special toolchain needed
6937   # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6938   #
6939   if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6940     # We're doing a proper cross-compilation
6941     COMPILE_TYPE="cross"
6942   else
6943     COMPILE_TYPE="native"
6944   fi
6945 
6946   if test "x$with_target_bits" != x; then
6947     if test "x$COMPILE_TYPE" = "xcross"; then
6948       as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6949     fi
6950 
6951     if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6952       # A reduced build is requested
6953       COMPILE_TYPE="reduced"
6954       OPENJDK_TARGET_CPU_BITS=32
6955       if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6956         OPENJDK_TARGET_CPU=x86
6957       elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6958         OPENJDK_TARGET_CPU=sparc
6959       else
6960         as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6961       fi
6962     elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6963       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
6964     elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6965       { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6966 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6967     else
6968       as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6969     fi
6970   fi
6971 
6972 
6973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6974 $as_echo_n "checking compilation type... " >&6; }
6975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6976 $as_echo "$COMPILE_TYPE" >&6; }
6977 
6978 
6979     if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6980        REQUIRED_OS_NAME=SunOS
6981        REQUIRED_OS_VERSION=5.10
6982     fi
6983     if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6984        REQUIRED_OS_NAME=Linux
6985        REQUIRED_OS_VERSION=2.6
6986     fi
6987     if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6988         REQUIRED_OS_NAME=Windows
6989         if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6990             REQUIRED_OS_VERSION=5.2
6991         else
6992             REQUIRED_OS_VERSION=5.1
6993         fi
6994     fi
6995     if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
6996         REQUIRED_OS_NAME=Darwin
6997         REQUIRED_OS_VERSION=11.2
6998     fi
6999 
7000 
7001 
7002 
7003 
7004     # Also store the legacy naming of the cpu.
7005     # Ie i586 and amd64 instead of x86 and x86_64
7006     OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
7007     if test "x$OPENJDK_TARGET_CPU" = xx86; then
7008       OPENJDK_TARGET_CPU_LEGACY="i586"
7009     elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7010       # On all platforms except MacOSX replace x86_64 with amd64.
7011       OPENJDK_TARGET_CPU_LEGACY="amd64"
7012     fi
7013 
7014 
7015     # And the second legacy naming of the cpu.
7016     # Ie i386 and amd64 instead of x86 and x86_64.
7017     OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
7018     if test "x$OPENJDK_TARGET_CPU" = xx86; then
7019       OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
7020     elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7021       OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
7022     fi
7023 
7024 
7025     # This is the name of the cpu (but using i386 and amd64 instead of
7026     # x86 and x86_64, respectively), preceeded by a /, to be used when
7027     # locating libraries. On macosx, it's empty, though.
7028     OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
7029     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7030         OPENJDK_TARGET_CPU_LIBDIR=""
7031     fi
7032 
7033 
7034     # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
7035     # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7036     # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7037     OPENJDK_TARGET_CPU_ISADIR=""
7038     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7039       if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7040           OPENJDK_TARGET_CPU_ISADIR="/amd64"
7041       elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7042           OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7043       fi
7044     fi
7045 
7046 
7047     # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7048     OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7049     if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7050       # On linux only, we replace x86 with i386.
7051       OPENJDK_TARGET_CPU_OSARCH="i386"
7052     elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7053       # On all platforms except macosx, we replace x86_64 with amd64.
7054       OPENJDK_TARGET_CPU_OSARCH="amd64"
7055     fi
7056 
7057 
7058     OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7059     if test "x$OPENJDK_TARGET_CPU" = xx86; then
7060       OPENJDK_TARGET_CPU_JLI="i386"
7061     elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7062       # On all platforms except macosx, we replace x86_64 with amd64.
7063       OPENJDK_TARGET_CPU_JLI="amd64"
7064     fi
7065     # Now setup the -D flags for building libjli.
7066     OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7067     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7068       if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7069         OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7070       elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7071         OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7072       fi
7073     fi
7074 
7075 
7076     # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7077     if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7078         OPENJDK_TARGET_OS_API_DIR="solaris"
7079     fi
7080     if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7081         OPENJDK_TARGET_OS_API_DIR="windows"
7082     fi
7083 
7084 
7085     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7086         A_LP64="LP64:="
7087         # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7088         # unpack200.exe
7089         if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7090             ADD_LP64="-D_LP64=1"
7091         fi
7092     fi
7093     LP64=$A_LP64
7094 
7095 
7096     if test "x$COMPILE_TYPE" = "xcross"; then
7097       # FIXME: ... or should this include reduced builds..?
7098       DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7099     else
7100       DEFINE_CROSS_COMPILE_ARCH=""
7101     fi
7102 
7103 
7104     # Some Zero and Shark settings.
7105     # ZERO_ARCHFLAG tells the compiler which mode to build for
7106     case "${OPENJDK_TARGET_CPU}" in
7107       s390)
7108         ZERO_ARCHFLAG="-m31"
7109         ;;
7110       *)
7111         ZERO_ARCHFLAG="-m${OPENJDK_TARGET_CPU_BITS}"
7112     esac
7113 
7114 
7115     # ZERO_ARCHDEF is used to enable architecture-specific code
7116     case "${OPENJDK_TARGET_CPU}" in
7117       ppc*)    ZERO_ARCHDEF=PPC   ;;
7118       s390*)   ZERO_ARCHDEF=S390  ;;
7119       sparc*)  ZERO_ARCHDEF=SPARC ;;
7120       x86_64*) ZERO_ARCHDEF=AMD64 ;;
7121       x86)     ZERO_ARCHDEF=IA32  ;;
7122       *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
7123     esac
7124 
7125 
7126 
7127 
7128 
7129 # Continue setting up basic stuff. Most remaining code require fundamental tools.
7130 
7131 # Locate the directory of this script.
7132 SCRIPT="$0"
7133 
7134     if test "x$OPENJDK_BUILD_OS" != xwindows; then
7135         # Follow a chain of symbolic links. Use readlink
7136         # where it exists, else fall back to horribly
7137         # complicated shell code.
7138         if test "x$READLINK_TESTED" != yes; then
7139             # On MacOSX there is a readlink tool with a different
7140             # purpose than the GNU readlink tool. Check the found readlink.
7141             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7142             if test "x$ISGNU" = x; then
7143                  # A readlink that we do not know how to use.
7144                  # Are there other non-GNU readlinks out there?
7145                  READLINK_TESTED=yes
7146                  READLINK=
7147             fi
7148         fi
7149 
7150         if test "x$READLINK" != x; then
7151             SCRIPT=`$READLINK -f $SCRIPT`
7152         else
7153             # Save the current directory for restoring afterwards
7154             STARTDIR=$PWD
7155             COUNTER=0
7156             sym_link_dir=`$DIRNAME $SCRIPT`
7157             sym_link_file=`$BASENAME $SCRIPT`
7158             # Use the system pwd and not the shell builtin to resolve directory symlinks
7159             cd $sym_link_dir
7160             cd `$THEPWDCMD`
7161             sym_link_dir=`$THEPWDCMD`
7162             # Resolve file symlinks
7163             while test $COUNTER -lt 20; do
7164                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7165                 if test "x$ISLINK" == x; then
7166                     # This is not a symbolic link! We are done!
7167                     break
7168                 fi
7169                 # Again resolve directory symlinks since the target of the just found
7170                 # link could be in a different directory
7171                 cd `$DIRNAME $ISLINK`
7172                 sym_link_dir=`$THEPWDCMD`
7173                 sym_link_file=`$BASENAME $ISLINK`
7174                 let COUNTER=COUNTER+1
7175             done
7176             cd $STARTDIR
7177             SCRIPT=$sym_link_dir/$sym_link_file
7178         fi
7179     fi
7180 
7181 AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD`
7182 
7183 # Where is the source? It is located two levels above the configure script.
7184 CURDIR="$PWD"
7185 cd "$AUTOCONF_DIR/../.."
7186 SRC_ROOT="`$THEPWDCMD`"
7187 
7188 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7189   PATH_SEP=";"
7190 
7191   SRC_ROOT_LENGTH=`$THEPWDCMD|$WC -m`
7192   if test $SRC_ROOT_LENGTH -gt 100; then
7193       as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7194   fi
7195 
7196   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7197     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7198 $as_echo_n "checking cygwin release... " >&6; }
7199     CYGWIN_VERSION=`$UNAME -r`
7200     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7201 $as_echo "$CYGWIN_VERSION" >&6; }
7202     WINDOWS_ENV_VENDOR='cygwin'
7203     WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7204 
7205     CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7206     if test "x$CYGWIN_VERSION_OK" = x; then
7207       { $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
7208 $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;}
7209       as_fn_error $? "Cannot continue" "$LINENO" 5
7210     fi
7211     if test "x$CYGPATH" = x; then
7212         as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7213     fi
7214     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7215 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7216     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7217     cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7218     # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7219     CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7220     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7221 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
7222     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7223     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7224     if test "x$test_cygdrive_prefix" = x; then
7225         as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7226     fi
7227   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7228     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7229 $as_echo_n "checking msys release... " >&6; }
7230     MSYS_VERSION=`$UNAME -r`
7231     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7232 $as_echo "$MSYS_VERSION" >&6; }
7233 
7234     WINDOWS_ENV_VENDOR='msys'
7235     WINDOWS_ENV_VERSION="$MSYS_VERSION"
7236 
7237     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7238 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
7239     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7240     MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7241 
7242   windows_path="$MSYS_ROOT_PATH"
7243   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7244     unix_path=`$CYGPATH -u "$windows_path"`
7245     MSYS_ROOT_PATH="$unix_path"
7246   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7247     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7248     MSYS_ROOT_PATH="$unix_path"
7249   fi
7250 
7251     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7252 $as_echo "$MSYS_ROOT_PATH" >&6; }
7253     WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7254   else
7255     as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7256   fi
7257 
7258   # Test if windows or unix (cygwin/msys) find is first in path.
7259   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7260 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7261   FIND_BINARY_OUTPUT=`find --version 2>&1`
7262   if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7263     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7264 $as_echo "unix style" >&6; }
7265   elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7266     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7267 $as_echo "Windows" >&6; }
7268     { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7269 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7270     { $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
7271 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7272     as_fn_error $? "Cannot continue" "$LINENO" 5
7273   else
7274     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7275 $as_echo "unknown" >&6; }
7276     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7277 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7278   fi
7279 
7280 else
7281   PATH_SEP=":"
7282 fi
7283 
7284 
7285 
7286 cd "$CURDIR"
7287 
7288 
7289   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7290 
7291   # Input might be given as Windows format, start by converting to
7292   # unix format.
7293   path="$SRC_ROOT"
7294   new_path=`$CYGPATH -u "$path"`
7295 
7296   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7297   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7298   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7299   # "foo.exe" is OK but "foo" is an error.
7300   #
7301   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7302   # It is also a way to make sure we got the proper file name for the real test later on.
7303   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7304   if test "x$test_shortpath" = x; then
7305     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7306 $as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7307     as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7308   fi
7309 
7310   # Call helper function which possibly converts this using DOS-style short mode.
7311   # If so, the updated path is stored in $new_path.
7312 
7313   input_path="$new_path"
7314   # Check if we need to convert this using DOS-style short mode. If the path
7315   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7316   # take no chances and rewrite it.
7317   # Note: m4 eats our [], so we need to use [ and ] instead.
7318   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7319   if test "x$has_forbidden_chars" != x; then
7320     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7321     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7322     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7323     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7324       # Going to short mode and back again did indeed matter. Since short mode is
7325       # case insensitive, let's make it lowercase to improve readability.
7326       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7327       # Now convert it back to Unix-stile (cygpath)
7328       input_path=`$CYGPATH -u "$shortmode_path"`
7329       new_path="$input_path"
7330     fi
7331   fi
7332 
7333   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7334   if test "x$test_cygdrive_prefix" = x; then
7335     # As a simple fix, exclude /usr/bin since it's not a real path.
7336     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7337       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7338       # a path prefixed by /cygdrive for fixpath to work.
7339       new_path="$CYGWIN_ROOT_PATH$input_path"
7340     fi
7341   fi
7342 
7343 
7344   if test "x$path" != "x$new_path"; then
7345     SRC_ROOT="$new_path"
7346     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7347 $as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7348   fi
7349 
7350   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7351 
7352   path="$SRC_ROOT"
7353   has_colon=`$ECHO $path | $GREP ^.:`
7354   new_path="$path"
7355   if test "x$has_colon" = x; then
7356     # Not in mixed or Windows style, start by that.
7357     new_path=`cmd //c echo $path`
7358   fi
7359 
7360 
7361   input_path="$new_path"
7362   # Check if we need to convert this using DOS-style short mode. If the path
7363   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7364   # take no chances and rewrite it.
7365   # Note: m4 eats our [], so we need to use [ and ] instead.
7366   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7367   if test "x$has_forbidden_chars" != x; then
7368     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7369     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7370   fi
7371 
7372 
7373   windows_path="$new_path"
7374   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7375     unix_path=`$CYGPATH -u "$windows_path"`
7376     new_path="$unix_path"
7377   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7378     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7379     new_path="$unix_path"
7380   fi
7381 
7382   if test "x$path" != "x$new_path"; then
7383     SRC_ROOT="$new_path"
7384     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7385 $as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7386   fi
7387 
7388   # Save the first 10 bytes of this path to the storage, so fixpath can work.
7389   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7390 
7391   else
7392     # We're on a posix platform. Hooray! :)
7393     path="$SRC_ROOT"
7394 
7395     if test ! -f "$path" && test ! -d "$path"; then
7396       as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7397     fi
7398 
7399     has_space=`$ECHO "$path" | $GREP " "`
7400     if test "x$has_space" != x; then
7401       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7402 $as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7403       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7404     fi
7405   fi
7406 
7407 
7408   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7409 
7410   # Input might be given as Windows format, start by converting to
7411   # unix format.
7412   path="$CURDIR"
7413   new_path=`$CYGPATH -u "$path"`
7414 
7415   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7416   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7417   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7418   # "foo.exe" is OK but "foo" is an error.
7419   #
7420   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7421   # It is also a way to make sure we got the proper file name for the real test later on.
7422   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7423   if test "x$test_shortpath" = x; then
7424     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7425 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7426     as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7427   fi
7428 
7429   # Call helper function which possibly converts this using DOS-style short mode.
7430   # If so, the updated path is stored in $new_path.
7431 
7432   input_path="$new_path"
7433   # Check if we need to convert this using DOS-style short mode. If the path
7434   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7435   # take no chances and rewrite it.
7436   # Note: m4 eats our [], so we need to use [ and ] instead.
7437   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7438   if test "x$has_forbidden_chars" != x; then
7439     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7440     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7441     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7442     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7443       # Going to short mode and back again did indeed matter. Since short mode is
7444       # case insensitive, let's make it lowercase to improve readability.
7445       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7446       # Now convert it back to Unix-stile (cygpath)
7447       input_path=`$CYGPATH -u "$shortmode_path"`
7448       new_path="$input_path"
7449     fi
7450   fi
7451 
7452   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7453   if test "x$test_cygdrive_prefix" = x; then
7454     # As a simple fix, exclude /usr/bin since it's not a real path.
7455     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7456       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7457       # a path prefixed by /cygdrive for fixpath to work.
7458       new_path="$CYGWIN_ROOT_PATH$input_path"
7459     fi
7460   fi
7461 
7462 
7463   if test "x$path" != "x$new_path"; then
7464     CURDIR="$new_path"
7465     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7466 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7467   fi
7468 
7469   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7470 
7471   path="$CURDIR"
7472   has_colon=`$ECHO $path | $GREP ^.:`
7473   new_path="$path"
7474   if test "x$has_colon" = x; then
7475     # Not in mixed or Windows style, start by that.
7476     new_path=`cmd //c echo $path`
7477   fi
7478 
7479 
7480   input_path="$new_path"
7481   # Check if we need to convert this using DOS-style short mode. If the path
7482   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7483   # take no chances and rewrite it.
7484   # Note: m4 eats our [], so we need to use [ and ] instead.
7485   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7486   if test "x$has_forbidden_chars" != x; then
7487     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7488     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7489   fi
7490 
7491 
7492   windows_path="$new_path"
7493   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7494     unix_path=`$CYGPATH -u "$windows_path"`
7495     new_path="$unix_path"
7496   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7497     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7498     new_path="$unix_path"
7499   fi
7500 
7501   if test "x$path" != "x$new_path"; then
7502     CURDIR="$new_path"
7503     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7504 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7505   fi
7506 
7507   # Save the first 10 bytes of this path to the storage, so fixpath can work.
7508   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7509 
7510   else
7511     # We're on a posix platform. Hooray! :)
7512     path="$CURDIR"
7513 
7514     if test ! -f "$path" && test ! -d "$path"; then
7515       as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7516     fi
7517 
7518     has_space=`$ECHO "$path" | $GREP " "`
7519     if test "x$has_space" != x; then
7520       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7521 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7522       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7523     fi
7524   fi
7525 
7526 
7527 if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7528     # Add extra search paths on solaris for utilities like ar and as etc...
7529     PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7530 fi
7531 
7532 # You can force the sys-root if the sys-root encoded into the cross compiler tools
7533 # is not correct.
7534 
7535 # Check whether --with-sys-root was given.
7536 if test "${with_sys_root+set}" = set; then :
7537   withval=$with_sys_root;
7538 fi
7539 
7540 
7541 if test "x$with_sys_root" != x; then
7542   SYS_ROOT=$with_sys_root
7543 else
7544   SYS_ROOT=/
7545 fi
7546 
7547 
7548 
7549 # Check whether --with-tools-dir was given.
7550 if test "${with_tools_dir+set}" = set; then :
7551   withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7552 fi
7553 
7554 
7555 
7556 # Check whether --with-devkit was given.
7557 if test "${with_devkit+set}" = set; then :
7558   withval=$with_devkit;
7559     if test "x$with_sys_root" != x; then
7560       as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7561     fi
7562     if test "x$with_tools_dir" != x; then
7563       as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
7564     fi
7565     TOOLS_DIR=$with_devkit/bin
7566     SYS_ROOT=$with_devkit/$host_alias/libc
7567 
7568 fi
7569 
7570 
7571 
7572 
7573 # Setup default logging of stdout and stderr to build.log in the output root.
7574 BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7575 BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7576 BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7577 
7578 
7579 
7580 
7581 
7582 # Check if it's a pure open build or if custom sources are to be used.
7583 
7584   # Check whether --enable-openjdk-only was given.
7585 if test "${enable_openjdk_only+set}" = set; then :
7586   enableval=$enable_openjdk_only;
7587 else
7588   enable_openjdk_only="no"
7589 fi
7590 
7591 
7592   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7593 $as_echo_n "checking for presence of closed sources... " >&6; }
7594   if test -d "$SRC_ROOT/jdk/src/closed"; then
7595     CLOSED_SOURCE_PRESENT=yes
7596   else
7597     CLOSED_SOURCE_PRESENT=no
7598   fi
7599   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7600 $as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7601 
7602   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7603 $as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7604   SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7605   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7606 $as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7607 
7608   if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7609     OPENJDK=true
7610     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7611       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7612 $as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7613     fi
7614   else
7615     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7616       OPENJDK=true
7617     else
7618       OPENJDK=false
7619     fi
7620   fi
7621 
7622   if test "x$OPENJDK" = "xtrue"; then
7623     SET_OPENJDK="OPENJDK=true"
7624   fi
7625 
7626 
7627 
7628 
7629 # These are needed to be able to create a configuration name (and thus the output directory)
7630 
7631 ###############################################################################
7632 #
7633 # Check which variant of the JDK that we want to build.
7634 # Currently we have:
7635 #    normal:   standard edition
7636 # but the custom make system may add other variants
7637 #
7638 # Effectively the JDK variant gives a name to a specific set of
7639 # modules to compile into the JDK. In the future, these modules
7640 # might even be Jigsaw modules.
7641 #
7642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7643 $as_echo_n "checking which variant of the JDK to build... " >&6; }
7644 
7645 # Check whether --with-jdk-variant was given.
7646 if test "${with_jdk_variant+set}" = set; then :
7647   withval=$with_jdk_variant;
7648 fi
7649 
7650 
7651 if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7652     JDK_VARIANT="normal"
7653 else
7654     as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7655 fi
7656 
7657 
7658 
7659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7660 $as_echo "$JDK_VARIANT" >&6; }
7661 
7662 
7663 
7664 ###############################################################################
7665 #
7666 # Check which variants of the JVM that we want to build.
7667 # Currently we have:
7668 #    server: normal interpreter and a tiered C1/C2 compiler
7669 #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7670 #    minimal1: reduced form of client with optional VM services and features stripped out
7671 #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7672 #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7673 #    zero: no machine code interpreter, no compiler
7674 #    zeroshark: zero interpreter and shark/llvm compiler backend
7675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7676 $as_echo_n "checking which variants of the JVM to build... " >&6; }
7677 
7678 # Check whether --with-jvm-variants was given.
7679 if test "${with_jvm_variants+set}" = set; then :
7680   withval=$with_jvm_variants;
7681 fi
7682 
7683 
7684 if test "x$with_jvm_variants" = x; then
7685      with_jvm_variants="server"
7686 fi
7687 
7688 JVM_VARIANTS=",$with_jvm_variants,"
7689 TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7690 
7691 if test "x$TEST_VARIANTS" != "x,"; then
7692    as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7693 fi
7694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7695 $as_echo "$with_jvm_variants" >&6; }
7696 
7697 JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7698 JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7699 JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7700 JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7701 JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7702 JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7703 
7704 if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7705     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7706         as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7707     fi
7708 fi
7709 if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7710     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7711         as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7712     fi
7713 fi
7714 if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7715     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7716         as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7717     fi
7718 fi
7719 
7720 # Replace the commas with AND for use in the build directory name.
7721 ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7722 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/'`
7723 if test "x$COUNT_VARIANTS" != "x,1"; then
7724     BUILDING_MULTIPLE_JVM_VARIANTS=yes
7725 else
7726     BUILDING_MULTIPLE_JVM_VARIANTS=no
7727 fi
7728 
7729 
7730 
7731 
7732 
7733 
7734 
7735 
7736 
7737 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7738    MACOSX_UNIVERSAL="true"
7739 fi
7740 
7741 
7742 
7743 
7744 
7745 ###############################################################################
7746 #
7747 # Set the debug level
7748 #    release: no debug information, all optimizations, no asserts.
7749 #    fastdebug: debug information (-g), all optimizations, all asserts
7750 #    slowdebug: debug information (-g), no optimizations, all asserts
7751 #
7752 DEBUG_LEVEL="release"
7753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7754 $as_echo_n "checking which debug level to use... " >&6; }
7755 # Check whether --enable-debug was given.
7756 if test "${enable_debug+set}" = set; then :
7757   enableval=$enable_debug;
7758         ENABLE_DEBUG="${enableval}"
7759         DEBUG_LEVEL="fastdebug"
7760 
7761 else
7762   ENABLE_DEBUG="no"
7763 fi
7764 
7765 
7766 
7767 # Check whether --with-debug-level was given.
7768 if test "${with_debug_level+set}" = set; then :
7769   withval=$with_debug_level;
7770         DEBUG_LEVEL="${withval}"
7771         if test "x$ENABLE_DEBUG" = xyes; then
7772                         as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7773         fi
7774 
7775 fi
7776 
7777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7778 $as_echo "$DEBUG_LEVEL" >&6; }
7779 
7780 if test "x$DEBUG_LEVEL" != xrelease && \
7781    test "x$DEBUG_LEVEL" != xfastdebug && \
7782    test "x$DEBUG_LEVEL" != xslowdebug; then
7783    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7784 fi
7785 
7786 
7787 ###############################################################################
7788 #
7789 # Setup legacy vars/targets and new vars to deal with different debug levels.
7790 #
7791 
7792 case $DEBUG_LEVEL in
7793       release )
7794           VARIANT="OPT"
7795           FASTDEBUG="false"
7796           DEBUG_CLASSFILES="false"
7797           BUILD_VARIANT_RELEASE=""
7798           HOTSPOT_DEBUG_LEVEL="product"
7799           HOTSPOT_EXPORT="product"
7800            ;;
7801       fastdebug )
7802           VARIANT="DBG"
7803           FASTDEBUG="true"
7804           DEBUG_CLASSFILES="true"
7805           BUILD_VARIANT_RELEASE="-fastdebug"
7806           HOTSPOT_DEBUG_LEVEL="fastdebug"
7807           HOTSPOT_EXPORT="fastdebug"
7808            ;;
7809       slowdebug )
7810           VARIANT="DBG"
7811           FASTDEBUG="false"
7812           DEBUG_CLASSFILES="true"
7813           BUILD_VARIANT_RELEASE="-debug"
7814           HOTSPOT_DEBUG_LEVEL="jvmg"
7815           HOTSPOT_EXPORT="debug"
7816            ;;
7817 esac
7818 
7819 #####
7820 # Generate the legacy makefile targets for hotspot.
7821 # The hotspot api for selecting the build artifacts, really, needs to be improved.
7822 # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7823 # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7824 # But until then ...
7825 HOTSPOT_TARGET=""
7826 
7827 if test "x$JVM_VARIANT_SERVER" = xtrue; then
7828     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7829 fi
7830 
7831 if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7832     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7833 fi
7834 
7835 if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7836     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7837 fi
7838 
7839 if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7840     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7841 fi
7842 
7843 if test "x$JVM_VARIANT_ZERO" = xtrue; then
7844     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7845 fi
7846 
7847 if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7848     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7849 fi
7850 
7851 HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7852 
7853 # On Macosx universal binaries are produced, but they only contain
7854 # 64 bit intel. This invalidates control of which jvms are built
7855 # from configure, but only server is valid anyway. Fix this
7856 # when hotspot makefiles are rewritten.
7857 if test "x$MACOSX_UNIVERSAL" = xtrue; then
7858     HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7859 fi
7860 
7861 #####
7862 
7863 
7864 
7865 
7866 
7867 
7868 
7869 
7870 # With basic setup done, call the custom early hook.
7871 
7872 
7873 # To properly create a configuration name, we need to have the OpenJDK target
7874 # and options (variants and debug level) parsed.
7875 
7876 
7877 
7878 # Check whether --with-conf-name was given.
7879 if test "${with_conf_name+set}" = set; then :
7880   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7881 fi
7882 
7883 
7884 # Test from where we are running configure, in or outside of src root.
7885 # To enable comparison of directories, CURDIR needs to be symlink free
7886 # just like SRC_ROOT already is
7887 NOSYM_CURDIR="$CURDIR"
7888 
7889     if test "x$OPENJDK_BUILD_OS" != xwindows; then
7890         # Follow a chain of symbolic links. Use readlink
7891         # where it exists, else fall back to horribly
7892         # complicated shell code.
7893         if test "x$READLINK_TESTED" != yes; then
7894             # On MacOSX there is a readlink tool with a different
7895             # purpose than the GNU readlink tool. Check the found readlink.
7896             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7897             if test "x$ISGNU" = x; then
7898                  # A readlink that we do not know how to use.
7899                  # Are there other non-GNU readlinks out there?
7900                  READLINK_TESTED=yes
7901                  READLINK=
7902             fi
7903         fi
7904 
7905         if test "x$READLINK" != x; then
7906             NOSYM_CURDIR=`$READLINK -f $NOSYM_CURDIR`
7907         else
7908             # Save the current directory for restoring afterwards
7909             STARTDIR=$PWD
7910             COUNTER=0
7911             sym_link_dir=`$DIRNAME $NOSYM_CURDIR`
7912             sym_link_file=`$BASENAME $NOSYM_CURDIR`
7913             # Use the system pwd and not the shell builtin to resolve directory symlinks
7914             cd $sym_link_dir
7915             cd `$THEPWDCMD`
7916             sym_link_dir=`$THEPWDCMD`
7917             # Resolve file symlinks
7918             while test $COUNTER -lt 20; do
7919                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7920                 if test "x$ISLINK" == x; then
7921                     # This is not a symbolic link! We are done!
7922                     break
7923                 fi
7924                 # Again resolve directory symlinks since the target of the just found
7925                 # link could be in a different directory
7926                 cd `$DIRNAME $ISLINK`
7927                 sym_link_dir=`$THEPWDCMD`
7928                 sym_link_file=`$BASENAME $ISLINK`
7929                 let COUNTER=COUNTER+1
7930             done
7931             cd $STARTDIR
7932             NOSYM_CURDIR=$sym_link_dir/$sym_link_file
7933         fi
7934     fi
7935 
7936 if test "x$NOSYM_CURDIR" = "x$SRC_ROOT" || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common" \
7937         || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/autoconf" \
7938         || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7939     # We are running configure from the src root.
7940     # Create a default ./build/target-variant-debuglevel output root.
7941     if test "x${CONF_NAME}" = x; then
7942         CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7943     fi
7944     OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7945     $MKDIR -p "$OUTPUT_ROOT"
7946     if test ! -d "$OUTPUT_ROOT"; then
7947         as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7948     fi
7949 else
7950     # We are running configure from outside of the src dir.
7951     # Then use the current directory as output dir!
7952     # If configuration is situated in normal build directory, just use the build
7953     # directory name as configuration name, otherwise use the complete path.
7954     if test "x${CONF_NAME}" = x; then
7955         CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7956     fi
7957     OUTPUT_ROOT="$CURDIR"
7958 
7959     # WARNING: This might be a bad thing to do. You need to be sure you want to
7960     # have a configuration in this directory. Do some sanity checks!
7961 
7962     if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7963       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7964       # other files
7965       files_present=`$LS $OUTPUT_ROOT`
7966       # Configure has already touched config.log and confdefs.h in the current dir when this check
7967       # is performed.
7968       filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
7969                                              | $TR -d '\n'`
7970       if test "x$filtered_files" != x; then
7971         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
7972 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
7973         { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
7974 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7975         { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7976 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7977         { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
7978 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7979         { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
7980 $as_echo "$as_me: seriously mess up just about everything." >&6;}
7981         { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
7982 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
7983         { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
7984 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
7985         as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
7986       fi
7987     fi
7988 fi
7989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
7990 $as_echo_n "checking what configuration name to use... " >&6; }
7991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
7992 $as_echo "$CONF_NAME" >&6; }
7993 
7994 
7995   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7996 
7997   # Input might be given as Windows format, start by converting to
7998   # unix format.
7999   path="$OUTPUT_ROOT"
8000   new_path=`$CYGPATH -u "$path"`
8001 
8002   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8003   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8004   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8005   # "foo.exe" is OK but "foo" is an error.
8006   #
8007   # This test is therefore slightly more accurate than "test -f" to check for file precense.
8008   # It is also a way to make sure we got the proper file name for the real test later on.
8009   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8010   if test "x$test_shortpath" = x; then
8011     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8012 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8013     as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
8014   fi
8015 
8016   # Call helper function which possibly converts this using DOS-style short mode.
8017   # If so, the updated path is stored in $new_path.
8018 
8019   input_path="$new_path"
8020   # Check if we need to convert this using DOS-style short mode. If the path
8021   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8022   # take no chances and rewrite it.
8023   # Note: m4 eats our [], so we need to use [ and ] instead.
8024   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8025   if test "x$has_forbidden_chars" != x; then
8026     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8027     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8028     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8029     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8030       # Going to short mode and back again did indeed matter. Since short mode is
8031       # case insensitive, let's make it lowercase to improve readability.
8032       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8033       # Now convert it back to Unix-stile (cygpath)
8034       input_path=`$CYGPATH -u "$shortmode_path"`
8035       new_path="$input_path"
8036     fi
8037   fi
8038 
8039   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8040   if test "x$test_cygdrive_prefix" = x; then
8041     # As a simple fix, exclude /usr/bin since it's not a real path.
8042     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
8043       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8044       # a path prefixed by /cygdrive for fixpath to work.
8045       new_path="$CYGWIN_ROOT_PATH$input_path"
8046     fi
8047   fi
8048 
8049 
8050   if test "x$path" != "x$new_path"; then
8051     OUTPUT_ROOT="$new_path"
8052     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8053 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8054   fi
8055 
8056   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8057 
8058   path="$OUTPUT_ROOT"
8059   has_colon=`$ECHO $path | $GREP ^.:`
8060   new_path="$path"
8061   if test "x$has_colon" = x; then
8062     # Not in mixed or Windows style, start by that.
8063     new_path=`cmd //c echo $path`
8064   fi
8065 
8066 
8067   input_path="$new_path"
8068   # Check if we need to convert this using DOS-style short mode. If the path
8069   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8070   # take no chances and rewrite it.
8071   # Note: m4 eats our [], so we need to use [ and ] instead.
8072   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8073   if test "x$has_forbidden_chars" != x; then
8074     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8075     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8076   fi
8077 
8078 
8079   windows_path="$new_path"
8080   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8081     unix_path=`$CYGPATH -u "$windows_path"`
8082     new_path="$unix_path"
8083   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8084     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8085     new_path="$unix_path"
8086   fi
8087 
8088   if test "x$path" != "x$new_path"; then
8089     OUTPUT_ROOT="$new_path"
8090     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8091 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8092   fi
8093 
8094   # Save the first 10 bytes of this path to the storage, so fixpath can work.
8095   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8096 
8097   else
8098     # We're on a posix platform. Hooray! :)
8099     path="$OUTPUT_ROOT"
8100 
8101     if test ! -f "$path" && test ! -d "$path"; then
8102       as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8103     fi
8104 
8105     has_space=`$ECHO "$path" | $GREP " "`
8106     if test "x$has_space" != x; then
8107       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8108 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8109       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8110     fi
8111   fi
8112 
8113 
8114 SPEC=$OUTPUT_ROOT/spec.gmk
8115 
8116 CONF_NAME=$CONF_NAME
8117 
8118 OUTPUT_ROOT=$OUTPUT_ROOT
8119 
8120 
8121 # Most of the probed defines are put into config.h
8122 ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8123 
8124 # The spec.gmk file contains all variables for the make system.
8125 ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8126 
8127 # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8128 ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8129 
8130 # The bootcycle-spec.gmk file contains support for boot cycle builds.
8131 ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8132 
8133 # The compare.sh is used to compare the build output to other builds.
8134 ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8135 
8136 # Spec.sh is currently used by compare-objects.sh
8137 ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8138 
8139 # The generated Makefile knows where the spec.gmk is and where the source is.
8140 # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8141 # which will look for generated configurations
8142 ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8143 
8144 
8145 # Save the arguments given to us
8146 echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8147 
8148 
8149 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8150 
8151     for ac_prog in apt-get yum port pkgutil pkgadd
8152 do
8153   # Extract the first word of "$ac_prog", so it can be a program name with args.
8154 set dummy $ac_prog; ac_word=$2
8155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8156 $as_echo_n "checking for $ac_word... " >&6; }
8157 if ${ac_cv_prog_PKGHANDLER+:} false; then :
8158   $as_echo_n "(cached) " >&6
8159 else
8160   if test -n "$PKGHANDLER"; then
8161   ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8162 else
8163 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8164 for as_dir in $PATH
8165 do
8166   IFS=$as_save_IFS
8167   test -z "$as_dir" && as_dir=.
8168     for ac_exec_ext in '' $ac_executable_extensions; do
8169   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8170     ac_cv_prog_PKGHANDLER="$ac_prog"
8171     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8172     break 2
8173   fi
8174 done
8175   done
8176 IFS=$as_save_IFS
8177 
8178 fi
8179 fi
8180 PKGHANDLER=$ac_cv_prog_PKGHANDLER
8181 if test -n "$PKGHANDLER"; then
8182   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8183 $as_echo "$PKGHANDLER" >&6; }
8184 else
8185   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8186 $as_echo "no" >&6; }
8187 fi
8188 
8189 
8190   test -n "$PKGHANDLER" && break
8191 done
8192 
8193 
8194 
8195 # Setup tools that requires more complex handling, or that is not needed by the configure script.
8196 
8197 
8198   # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8199   if test "x$MAKE" != x; then
8200     # User has supplied a make, test it.
8201     if test ! -f "$MAKE"; then
8202       as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8203     fi
8204 
8205   MAKE_CANDIDATE=""$MAKE""
8206   DESCRIPTION="user supplied MAKE=$MAKE"
8207   if test "x$MAKE_CANDIDATE" != x; then
8208     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8209 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8210     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8211     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8212     if test "x$IS_GNU_MAKE" = x; then
8213       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8214 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8215     else
8216       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8217       if test "x$IS_MODERN_MAKE" = x; then
8218         { $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
8219 $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;}
8220       else
8221         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8222           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8223             MAKE_EXPECTED_ENV='cygwin'
8224           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8225             MAKE_EXPECTED_ENV='msys'
8226           else
8227             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8228           fi
8229           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8230           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8231         else
8232           # Not relevant for non-Windows
8233           IS_MAKE_CORRECT_ENV=true
8234         fi
8235         if test "x$IS_MAKE_CORRECT_ENV" = x; then
8236           { $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
8237 $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;}
8238         else
8239           FOUND_MAKE=$MAKE_CANDIDATE
8240 
8241   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8242 
8243   # First separate the path from the arguments. This will split at the first
8244   # space.
8245   complete="$FOUND_MAKE"
8246   path="${complete%% *}"
8247   tmp="$complete EOL"
8248   arguments="${tmp#* }"
8249 
8250   # Input might be given as Windows format, start by converting to
8251   # unix format.
8252   new_path=`$CYGPATH -u "$path"`
8253 
8254   # Now try to locate executable using which
8255   new_path=`$WHICH "$new_path" 2> /dev/null`
8256   # bat and cmd files are not always considered executable in cygwin causing which
8257   # to not find them
8258   if test "x$new_path" = x \
8259            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8260            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8261     new_path=`$CYGPATH -u "$path"`
8262   fi
8263   if test "x$new_path" = x; then
8264     # Oops. Which didn't find the executable.
8265     # The splitting of arguments from the executable at a space might have been incorrect,
8266     # since paths with space are more likely in Windows. Give it another try with the whole
8267     # argument.
8268     path="$complete"
8269     arguments="EOL"
8270     new_path=`$CYGPATH -u "$path"`
8271     new_path=`$WHICH "$new_path" 2> /dev/null`
8272     # bat and cmd files are not always considered executable in cygwin causing which
8273     # to not find them
8274     if test "x$new_path" = x \
8275              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8276              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8277       new_path=`$CYGPATH -u "$path"`
8278     fi
8279     if test "x$new_path" = x; then
8280       # It's still not found. Now this is an unrecoverable error.
8281       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8282 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8283       has_space=`$ECHO "$complete" | $GREP " "`
8284       if test "x$has_space" != x; then
8285         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8286 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8287       fi
8288       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8289     fi
8290   fi
8291 
8292   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8293   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8294   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8295   # "foo.exe" is OK but "foo" is an error.
8296   #
8297   # This test is therefore slightly more accurate than "test -f" to check for file precense.
8298   # It is also a way to make sure we got the proper file name for the real test later on.
8299   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8300   if test "x$test_shortpath" = x; then
8301     # Short path failed, file does not exist as specified.
8302     # Try adding .exe or .cmd
8303     if test -f "${new_path}.exe"; then
8304        input_to_shortpath="${new_path}.exe"
8305     elif test -f "${new_path}.cmd"; then
8306        input_to_shortpath="${new_path}.cmd"
8307     else
8308       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8309 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8310       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8311 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8312       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8313     fi
8314   else
8315     input_to_shortpath="$new_path"
8316   fi
8317 
8318   # Call helper function which possibly converts this using DOS-style short mode.
8319   # If so, the updated path is stored in $new_path.
8320   new_path="$input_to_shortpath"
8321 
8322   input_path="$input_to_shortpath"
8323   # Check if we need to convert this using DOS-style short mode. If the path
8324   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8325   # take no chances and rewrite it.
8326   # Note: m4 eats our [], so we need to use [ and ] instead.
8327   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8328   if test "x$has_forbidden_chars" != x; then
8329     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8330     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8331     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8332     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8333       # Going to short mode and back again did indeed matter. Since short mode is
8334       # case insensitive, let's make it lowercase to improve readability.
8335       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8336       # Now convert it back to Unix-stile (cygpath)
8337       input_path=`$CYGPATH -u "$shortmode_path"`
8338       new_path="$input_path"
8339     fi
8340   fi
8341 
8342   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8343   if test "x$test_cygdrive_prefix" = x; then
8344     # As a simple fix, exclude /usr/bin since it's not a real path.
8345     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8346       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8347       # a path prefixed by /cygdrive for fixpath to work.
8348       new_path="$CYGWIN_ROOT_PATH$input_path"
8349     fi
8350   fi
8351 
8352   # remove trailing .exe if any
8353   new_path="${new_path/%.exe/}"
8354 
8355   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8356 
8357   # First separate the path from the arguments. This will split at the first
8358   # space.
8359   complete="$FOUND_MAKE"
8360   path="${complete%% *}"
8361   tmp="$complete EOL"
8362   arguments="${tmp#* }"
8363 
8364   # Input might be given as Windows format, start by converting to
8365   # unix format.
8366   new_path="$path"
8367 
8368   windows_path="$new_path"
8369   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8370     unix_path=`$CYGPATH -u "$windows_path"`
8371     new_path="$unix_path"
8372   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8373     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8374     new_path="$unix_path"
8375   fi
8376 
8377 
8378   # Now try to locate executable using which
8379   new_path=`$WHICH "$new_path" 2> /dev/null`
8380 
8381   if test "x$new_path" = x; then
8382     # Oops. Which didn't find the executable.
8383     # The splitting of arguments from the executable at a space might have been incorrect,
8384     # since paths with space are more likely in Windows. Give it another try with the whole
8385     # argument.
8386     path="$complete"
8387     arguments="EOL"
8388     new_path="$path"
8389 
8390   windows_path="$new_path"
8391   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8392     unix_path=`$CYGPATH -u "$windows_path"`
8393     new_path="$unix_path"
8394   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8395     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8396     new_path="$unix_path"
8397   fi
8398 
8399 
8400     new_path=`$WHICH "$new_path" 2> /dev/null`
8401 
8402     if test "x$new_path" = x; then
8403       # It's still not found. Now this is an unrecoverable error.
8404       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8405 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8406       has_space=`$ECHO "$complete" | $GREP " "`
8407       if test "x$has_space" != x; then
8408         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8409 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8410       fi
8411       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8412     fi
8413   fi
8414 
8415   # Now new_path has a complete unix path to the binary
8416   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8417     # Keep paths in /bin as-is, but remove trailing .exe if any
8418     new_path="${new_path/%.exe/}"
8419     # Do not save /bin paths to all_fixpath_prefixes!
8420   else
8421     # Not in mixed or Windows style, start by that.
8422     new_path=`cmd //c echo $new_path`
8423 
8424   input_path="$new_path"
8425   # Check if we need to convert this using DOS-style short mode. If the path
8426   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8427   # take no chances and rewrite it.
8428   # Note: m4 eats our [], so we need to use [ and ] instead.
8429   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8430   if test "x$has_forbidden_chars" != x; then
8431     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8432     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8433   fi
8434 
8435     # Output is in $new_path
8436 
8437   windows_path="$new_path"
8438   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8439     unix_path=`$CYGPATH -u "$windows_path"`
8440     new_path="$unix_path"
8441   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8442     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8443     new_path="$unix_path"
8444   fi
8445 
8446     # remove trailing .exe if any
8447     new_path="${new_path/%.exe/}"
8448 
8449     # Save the first 10 bytes of this path to the storage, so fixpath can work.
8450     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8451   fi
8452 
8453   else
8454     # We're on a posix platform. Hooray! :)
8455     # First separate the path from the arguments. This will split at the first
8456     # space.
8457     complete="$FOUND_MAKE"
8458     path="${complete%% *}"
8459     tmp="$complete EOL"
8460     arguments="${tmp#* }"
8461 
8462     # Cannot rely on the command "which" here since it doesn't always work.
8463     is_absolute_path=`$ECHO "$path" | $GREP ^/`
8464     if test -z "$is_absolute_path"; then
8465       # Path to executable is not absolute. Find it.
8466       IFS_save="$IFS"
8467       IFS=:
8468       for p in $PATH; do
8469         if test -f "$p/$path" && test -x "$p/$path"; then
8470           new_path="$p/$path"
8471           break
8472         fi
8473       done
8474       IFS="$IFS_save"
8475     else
8476       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8477 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8478       new_path="$path"
8479     fi
8480 
8481     if test "x$new_path" = x; then
8482         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8483 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8484         has_space=`$ECHO "$complete" | $GREP " "`
8485         if test "x$has_space" != x; then
8486           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8487 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8488         fi
8489         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8490       fi
8491   fi
8492 
8493       # Now join together the path and the arguments once again
8494       if test "x$arguments" != xEOL; then
8495         new_complete="$new_path ${arguments% *}"
8496       else
8497         new_complete="$new_path"
8498       fi
8499 
8500   if test "x$complete" != "x$new_complete"; then
8501       FOUND_MAKE="$new_complete"
8502       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8503 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8504     fi
8505 
8506         fi
8507       fi
8508     fi
8509   fi
8510 
8511     if test "x$FOUND_MAKE" = x; then
8512       as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8513     fi
8514   else
8515     # Try our hardest to locate a correct version of GNU make
8516     for ac_prog in gmake
8517 do
8518   # Extract the first word of "$ac_prog", so it can be a program name with args.
8519 set dummy $ac_prog; ac_word=$2
8520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8521 $as_echo_n "checking for $ac_word... " >&6; }
8522 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
8523   $as_echo_n "(cached) " >&6
8524 else
8525   case $CHECK_GMAKE in
8526   [\\/]* | ?:[\\/]*)
8527   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8528   ;;
8529   *)
8530   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8531 for as_dir in $PATH
8532 do
8533   IFS=$as_save_IFS
8534   test -z "$as_dir" && as_dir=.
8535     for ac_exec_ext in '' $ac_executable_extensions; do
8536   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8537     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8538     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8539     break 2
8540   fi
8541 done
8542   done
8543 IFS=$as_save_IFS
8544 
8545   ;;
8546 esac
8547 fi
8548 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8549 if test -n "$CHECK_GMAKE"; then
8550   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8551 $as_echo "$CHECK_GMAKE" >&6; }
8552 else
8553   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8554 $as_echo "no" >&6; }
8555 fi
8556 
8557 
8558   test -n "$CHECK_GMAKE" && break
8559 done
8560 
8561 
8562   MAKE_CANDIDATE=""$CHECK_GMAKE""
8563   DESCRIPTION="gmake in PATH"
8564   if test "x$MAKE_CANDIDATE" != x; then
8565     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8566 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8567     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8568     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8569     if test "x$IS_GNU_MAKE" = x; then
8570       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8571 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8572     else
8573       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8574       if test "x$IS_MODERN_MAKE" = x; then
8575         { $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
8576 $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;}
8577       else
8578         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8579           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8580             MAKE_EXPECTED_ENV='cygwin'
8581           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8582             MAKE_EXPECTED_ENV='msys'
8583           else
8584             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8585           fi
8586           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8587           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8588         else
8589           # Not relevant for non-Windows
8590           IS_MAKE_CORRECT_ENV=true
8591         fi
8592         if test "x$IS_MAKE_CORRECT_ENV" = x; then
8593           { $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
8594 $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;}
8595         else
8596           FOUND_MAKE=$MAKE_CANDIDATE
8597 
8598   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8599 
8600   # First separate the path from the arguments. This will split at the first
8601   # space.
8602   complete="$FOUND_MAKE"
8603   path="${complete%% *}"
8604   tmp="$complete EOL"
8605   arguments="${tmp#* }"
8606 
8607   # Input might be given as Windows format, start by converting to
8608   # unix format.
8609   new_path=`$CYGPATH -u "$path"`
8610 
8611   # Now try to locate executable using which
8612   new_path=`$WHICH "$new_path" 2> /dev/null`
8613   # bat and cmd files are not always considered executable in cygwin causing which
8614   # to not find them
8615   if test "x$new_path" = x \
8616            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8617            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8618     new_path=`$CYGPATH -u "$path"`
8619   fi
8620   if test "x$new_path" = x; then
8621     # Oops. Which didn't find the executable.
8622     # The splitting of arguments from the executable at a space might have been incorrect,
8623     # since paths with space are more likely in Windows. Give it another try with the whole
8624     # argument.
8625     path="$complete"
8626     arguments="EOL"
8627     new_path=`$CYGPATH -u "$path"`
8628     new_path=`$WHICH "$new_path" 2> /dev/null`
8629     # bat and cmd files are not always considered executable in cygwin causing which
8630     # to not find them
8631     if test "x$new_path" = x \
8632              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8633              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8634       new_path=`$CYGPATH -u "$path"`
8635     fi
8636     if test "x$new_path" = x; then
8637       # It's still not found. Now this is an unrecoverable error.
8638       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8639 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8640       has_space=`$ECHO "$complete" | $GREP " "`
8641       if test "x$has_space" != x; then
8642         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8643 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8644       fi
8645       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8646     fi
8647   fi
8648 
8649   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8650   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8651   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8652   # "foo.exe" is OK but "foo" is an error.
8653   #
8654   # This test is therefore slightly more accurate than "test -f" to check for file precense.
8655   # It is also a way to make sure we got the proper file name for the real test later on.
8656   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8657   if test "x$test_shortpath" = x; then
8658     # Short path failed, file does not exist as specified.
8659     # Try adding .exe or .cmd
8660     if test -f "${new_path}.exe"; then
8661        input_to_shortpath="${new_path}.exe"
8662     elif test -f "${new_path}.cmd"; then
8663        input_to_shortpath="${new_path}.cmd"
8664     else
8665       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8666 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8667       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8668 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8669       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8670     fi
8671   else
8672     input_to_shortpath="$new_path"
8673   fi
8674 
8675   # Call helper function which possibly converts this using DOS-style short mode.
8676   # If so, the updated path is stored in $new_path.
8677   new_path="$input_to_shortpath"
8678 
8679   input_path="$input_to_shortpath"
8680   # Check if we need to convert this using DOS-style short mode. If the path
8681   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8682   # take no chances and rewrite it.
8683   # Note: m4 eats our [], so we need to use [ and ] instead.
8684   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8685   if test "x$has_forbidden_chars" != x; then
8686     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8687     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8688     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8689     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8690       # Going to short mode and back again did indeed matter. Since short mode is
8691       # case insensitive, let's make it lowercase to improve readability.
8692       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8693       # Now convert it back to Unix-stile (cygpath)
8694       input_path=`$CYGPATH -u "$shortmode_path"`
8695       new_path="$input_path"
8696     fi
8697   fi
8698 
8699   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8700   if test "x$test_cygdrive_prefix" = x; then
8701     # As a simple fix, exclude /usr/bin since it's not a real path.
8702     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8703       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8704       # a path prefixed by /cygdrive for fixpath to work.
8705       new_path="$CYGWIN_ROOT_PATH$input_path"
8706     fi
8707   fi
8708 
8709   # remove trailing .exe if any
8710   new_path="${new_path/%.exe/}"
8711 
8712   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8713 
8714   # First separate the path from the arguments. This will split at the first
8715   # space.
8716   complete="$FOUND_MAKE"
8717   path="${complete%% *}"
8718   tmp="$complete EOL"
8719   arguments="${tmp#* }"
8720 
8721   # Input might be given as Windows format, start by converting to
8722   # unix format.
8723   new_path="$path"
8724 
8725   windows_path="$new_path"
8726   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8727     unix_path=`$CYGPATH -u "$windows_path"`
8728     new_path="$unix_path"
8729   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8730     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8731     new_path="$unix_path"
8732   fi
8733 
8734 
8735   # Now try to locate executable using which
8736   new_path=`$WHICH "$new_path" 2> /dev/null`
8737 
8738   if test "x$new_path" = x; then
8739     # Oops. Which didn't find the executable.
8740     # The splitting of arguments from the executable at a space might have been incorrect,
8741     # since paths with space are more likely in Windows. Give it another try with the whole
8742     # argument.
8743     path="$complete"
8744     arguments="EOL"
8745     new_path="$path"
8746 
8747   windows_path="$new_path"
8748   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8749     unix_path=`$CYGPATH -u "$windows_path"`
8750     new_path="$unix_path"
8751   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8752     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8753     new_path="$unix_path"
8754   fi
8755 
8756 
8757     new_path=`$WHICH "$new_path" 2> /dev/null`
8758 
8759     if test "x$new_path" = x; then
8760       # It's still not found. Now this is an unrecoverable error.
8761       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8762 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8763       has_space=`$ECHO "$complete" | $GREP " "`
8764       if test "x$has_space" != x; then
8765         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8766 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8767       fi
8768       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8769     fi
8770   fi
8771 
8772   # Now new_path has a complete unix path to the binary
8773   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8774     # Keep paths in /bin as-is, but remove trailing .exe if any
8775     new_path="${new_path/%.exe/}"
8776     # Do not save /bin paths to all_fixpath_prefixes!
8777   else
8778     # Not in mixed or Windows style, start by that.
8779     new_path=`cmd //c echo $new_path`
8780 
8781   input_path="$new_path"
8782   # Check if we need to convert this using DOS-style short mode. If the path
8783   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8784   # take no chances and rewrite it.
8785   # Note: m4 eats our [], so we need to use [ and ] instead.
8786   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8787   if test "x$has_forbidden_chars" != x; then
8788     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8789     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8790   fi
8791 
8792     # Output is in $new_path
8793 
8794   windows_path="$new_path"
8795   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8796     unix_path=`$CYGPATH -u "$windows_path"`
8797     new_path="$unix_path"
8798   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8799     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8800     new_path="$unix_path"
8801   fi
8802 
8803     # remove trailing .exe if any
8804     new_path="${new_path/%.exe/}"
8805 
8806     # Save the first 10 bytes of this path to the storage, so fixpath can work.
8807     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8808   fi
8809 
8810   else
8811     # We're on a posix platform. Hooray! :)
8812     # First separate the path from the arguments. This will split at the first
8813     # space.
8814     complete="$FOUND_MAKE"
8815     path="${complete%% *}"
8816     tmp="$complete EOL"
8817     arguments="${tmp#* }"
8818 
8819     # Cannot rely on the command "which" here since it doesn't always work.
8820     is_absolute_path=`$ECHO "$path" | $GREP ^/`
8821     if test -z "$is_absolute_path"; then
8822       # Path to executable is not absolute. Find it.
8823       IFS_save="$IFS"
8824       IFS=:
8825       for p in $PATH; do
8826         if test -f "$p/$path" && test -x "$p/$path"; then
8827           new_path="$p/$path"
8828           break
8829         fi
8830       done
8831       IFS="$IFS_save"
8832     else
8833       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8834 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8835       new_path="$path"
8836     fi
8837 
8838     if test "x$new_path" = x; then
8839         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8840 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8841         has_space=`$ECHO "$complete" | $GREP " "`
8842         if test "x$has_space" != x; then
8843           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8844 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8845         fi
8846         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8847       fi
8848   fi
8849 
8850       # Now join together the path and the arguments once again
8851       if test "x$arguments" != xEOL; then
8852         new_complete="$new_path ${arguments% *}"
8853       else
8854         new_complete="$new_path"
8855       fi
8856 
8857   if test "x$complete" != "x$new_complete"; then
8858       FOUND_MAKE="$new_complete"
8859       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8860 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8861     fi
8862 
8863         fi
8864       fi
8865     fi
8866   fi
8867 
8868 
8869     if test "x$FOUND_MAKE" = x; then
8870       for ac_prog in make
8871 do
8872   # Extract the first word of "$ac_prog", so it can be a program name with args.
8873 set dummy $ac_prog; ac_word=$2
8874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8875 $as_echo_n "checking for $ac_word... " >&6; }
8876 if ${ac_cv_path_CHECK_MAKE+:} false; then :
8877   $as_echo_n "(cached) " >&6
8878 else
8879   case $CHECK_MAKE in
8880   [\\/]* | ?:[\\/]*)
8881   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8882   ;;
8883   *)
8884   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8885 for as_dir in $PATH
8886 do
8887   IFS=$as_save_IFS
8888   test -z "$as_dir" && as_dir=.
8889     for ac_exec_ext in '' $ac_executable_extensions; do
8890   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8891     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8892     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8893     break 2
8894   fi
8895 done
8896   done
8897 IFS=$as_save_IFS
8898 
8899   ;;
8900 esac
8901 fi
8902 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8903 if test -n "$CHECK_MAKE"; then
8904   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8905 $as_echo "$CHECK_MAKE" >&6; }
8906 else
8907   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8908 $as_echo "no" >&6; }
8909 fi
8910 
8911 
8912   test -n "$CHECK_MAKE" && break
8913 done
8914 
8915 
8916   MAKE_CANDIDATE=""$CHECK_MAKE""
8917   DESCRIPTION="make in PATH"
8918   if test "x$MAKE_CANDIDATE" != x; then
8919     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8920 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8921     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8922     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8923     if test "x$IS_GNU_MAKE" = x; then
8924       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8925 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8926     else
8927       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8928       if test "x$IS_MODERN_MAKE" = x; then
8929         { $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
8930 $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;}
8931       else
8932         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8933           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8934             MAKE_EXPECTED_ENV='cygwin'
8935           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8936             MAKE_EXPECTED_ENV='msys'
8937           else
8938             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8939           fi
8940           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8941           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8942         else
8943           # Not relevant for non-Windows
8944           IS_MAKE_CORRECT_ENV=true
8945         fi
8946         if test "x$IS_MAKE_CORRECT_ENV" = x; then
8947           { $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
8948 $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;}
8949         else
8950           FOUND_MAKE=$MAKE_CANDIDATE
8951 
8952   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8953 
8954   # First separate the path from the arguments. This will split at the first
8955   # space.
8956   complete="$FOUND_MAKE"
8957   path="${complete%% *}"
8958   tmp="$complete EOL"
8959   arguments="${tmp#* }"
8960 
8961   # Input might be given as Windows format, start by converting to
8962   # unix format.
8963   new_path=`$CYGPATH -u "$path"`
8964 
8965   # Now try to locate executable using which
8966   new_path=`$WHICH "$new_path" 2> /dev/null`
8967   # bat and cmd files are not always considered executable in cygwin causing which
8968   # to not find them
8969   if test "x$new_path" = x \
8970            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8971            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8972     new_path=`$CYGPATH -u "$path"`
8973   fi
8974   if test "x$new_path" = x; then
8975     # Oops. Which didn't find the executable.
8976     # The splitting of arguments from the executable at a space might have been incorrect,
8977     # since paths with space are more likely in Windows. Give it another try with the whole
8978     # argument.
8979     path="$complete"
8980     arguments="EOL"
8981     new_path=`$CYGPATH -u "$path"`
8982     new_path=`$WHICH "$new_path" 2> /dev/null`
8983     # bat and cmd files are not always considered executable in cygwin causing which
8984     # to not find them
8985     if test "x$new_path" = x \
8986              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8987              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8988       new_path=`$CYGPATH -u "$path"`
8989     fi
8990     if test "x$new_path" = x; then
8991       # It's still not found. Now this is an unrecoverable error.
8992       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8993 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8994       has_space=`$ECHO "$complete" | $GREP " "`
8995       if test "x$has_space" != x; then
8996         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8997 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8998       fi
8999       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9000     fi
9001   fi
9002 
9003   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9004   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9005   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9006   # "foo.exe" is OK but "foo" is an error.
9007   #
9008   # This test is therefore slightly more accurate than "test -f" to check for file precense.
9009   # It is also a way to make sure we got the proper file name for the real test later on.
9010   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9011   if test "x$test_shortpath" = x; then
9012     # Short path failed, file does not exist as specified.
9013     # Try adding .exe or .cmd
9014     if test -f "${new_path}.exe"; then
9015        input_to_shortpath="${new_path}.exe"
9016     elif test -f "${new_path}.cmd"; then
9017        input_to_shortpath="${new_path}.cmd"
9018     else
9019       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9020 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9021       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9022 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9023       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9024     fi
9025   else
9026     input_to_shortpath="$new_path"
9027   fi
9028 
9029   # Call helper function which possibly converts this using DOS-style short mode.
9030   # If so, the updated path is stored in $new_path.
9031   new_path="$input_to_shortpath"
9032 
9033   input_path="$input_to_shortpath"
9034   # Check if we need to convert this using DOS-style short mode. If the path
9035   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9036   # take no chances and rewrite it.
9037   # Note: m4 eats our [], so we need to use [ and ] instead.
9038   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9039   if test "x$has_forbidden_chars" != x; then
9040     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9041     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9042     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9043     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9044       # Going to short mode and back again did indeed matter. Since short mode is
9045       # case insensitive, let's make it lowercase to improve readability.
9046       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9047       # Now convert it back to Unix-stile (cygpath)
9048       input_path=`$CYGPATH -u "$shortmode_path"`
9049       new_path="$input_path"
9050     fi
9051   fi
9052 
9053   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9054   if test "x$test_cygdrive_prefix" = x; then
9055     # As a simple fix, exclude /usr/bin since it's not a real path.
9056     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9057       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9058       # a path prefixed by /cygdrive for fixpath to work.
9059       new_path="$CYGWIN_ROOT_PATH$input_path"
9060     fi
9061   fi
9062 
9063   # remove trailing .exe if any
9064   new_path="${new_path/%.exe/}"
9065 
9066   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9067 
9068   # First separate the path from the arguments. This will split at the first
9069   # space.
9070   complete="$FOUND_MAKE"
9071   path="${complete%% *}"
9072   tmp="$complete EOL"
9073   arguments="${tmp#* }"
9074 
9075   # Input might be given as Windows format, start by converting to
9076   # unix format.
9077   new_path="$path"
9078 
9079   windows_path="$new_path"
9080   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9081     unix_path=`$CYGPATH -u "$windows_path"`
9082     new_path="$unix_path"
9083   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9084     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9085     new_path="$unix_path"
9086   fi
9087 
9088 
9089   # Now try to locate executable using which
9090   new_path=`$WHICH "$new_path" 2> /dev/null`
9091 
9092   if test "x$new_path" = x; then
9093     # Oops. Which didn't find the executable.
9094     # The splitting of arguments from the executable at a space might have been incorrect,
9095     # since paths with space are more likely in Windows. Give it another try with the whole
9096     # argument.
9097     path="$complete"
9098     arguments="EOL"
9099     new_path="$path"
9100 
9101   windows_path="$new_path"
9102   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9103     unix_path=`$CYGPATH -u "$windows_path"`
9104     new_path="$unix_path"
9105   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9106     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9107     new_path="$unix_path"
9108   fi
9109 
9110 
9111     new_path=`$WHICH "$new_path" 2> /dev/null`
9112 
9113     if test "x$new_path" = x; then
9114       # It's still not found. Now this is an unrecoverable error.
9115       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9116 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9117       has_space=`$ECHO "$complete" | $GREP " "`
9118       if test "x$has_space" != x; then
9119         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9120 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9121       fi
9122       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9123     fi
9124   fi
9125 
9126   # Now new_path has a complete unix path to the binary
9127   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9128     # Keep paths in /bin as-is, but remove trailing .exe if any
9129     new_path="${new_path/%.exe/}"
9130     # Do not save /bin paths to all_fixpath_prefixes!
9131   else
9132     # Not in mixed or Windows style, start by that.
9133     new_path=`cmd //c echo $new_path`
9134 
9135   input_path="$new_path"
9136   # Check if we need to convert this using DOS-style short mode. If the path
9137   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9138   # take no chances and rewrite it.
9139   # Note: m4 eats our [], so we need to use [ and ] instead.
9140   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9141   if test "x$has_forbidden_chars" != x; then
9142     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9143     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9144   fi
9145 
9146     # Output is in $new_path
9147 
9148   windows_path="$new_path"
9149   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9150     unix_path=`$CYGPATH -u "$windows_path"`
9151     new_path="$unix_path"
9152   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9153     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9154     new_path="$unix_path"
9155   fi
9156 
9157     # remove trailing .exe if any
9158     new_path="${new_path/%.exe/}"
9159 
9160     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9161     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9162   fi
9163 
9164   else
9165     # We're on a posix platform. Hooray! :)
9166     # First separate the path from the arguments. This will split at the first
9167     # space.
9168     complete="$FOUND_MAKE"
9169     path="${complete%% *}"
9170     tmp="$complete EOL"
9171     arguments="${tmp#* }"
9172 
9173     # Cannot rely on the command "which" here since it doesn't always work.
9174     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9175     if test -z "$is_absolute_path"; then
9176       # Path to executable is not absolute. Find it.
9177       IFS_save="$IFS"
9178       IFS=:
9179       for p in $PATH; do
9180         if test -f "$p/$path" && test -x "$p/$path"; then
9181           new_path="$p/$path"
9182           break
9183         fi
9184       done
9185       IFS="$IFS_save"
9186     else
9187       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9188 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9189       new_path="$path"
9190     fi
9191 
9192     if test "x$new_path" = x; then
9193         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9194 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9195         has_space=`$ECHO "$complete" | $GREP " "`
9196         if test "x$has_space" != x; then
9197           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9198 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9199         fi
9200         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9201       fi
9202   fi
9203 
9204       # Now join together the path and the arguments once again
9205       if test "x$arguments" != xEOL; then
9206         new_complete="$new_path ${arguments% *}"
9207       else
9208         new_complete="$new_path"
9209       fi
9210 
9211   if test "x$complete" != "x$new_complete"; then
9212       FOUND_MAKE="$new_complete"
9213       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9214 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9215     fi
9216 
9217         fi
9218       fi
9219     fi
9220   fi
9221 
9222     fi
9223 
9224     if test "x$FOUND_MAKE" = x; then
9225       if test "x$TOOLS_DIR" != x; then
9226         # We have a tools-dir, check that as well before giving up.
9227         OLD_PATH=$PATH
9228         PATH=$TOOLS_DIR:$PATH
9229         for ac_prog in gmake
9230 do
9231   # Extract the first word of "$ac_prog", so it can be a program name with args.
9232 set dummy $ac_prog; ac_word=$2
9233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9234 $as_echo_n "checking for $ac_word... " >&6; }
9235 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
9236   $as_echo_n "(cached) " >&6
9237 else
9238   case $CHECK_TOOLSDIR_GMAKE in
9239   [\\/]* | ?:[\\/]*)
9240   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9241   ;;
9242   *)
9243   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9244 for as_dir in $PATH
9245 do
9246   IFS=$as_save_IFS
9247   test -z "$as_dir" && as_dir=.
9248     for ac_exec_ext in '' $ac_executable_extensions; do
9249   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9250     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9251     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9252     break 2
9253   fi
9254 done
9255   done
9256 IFS=$as_save_IFS
9257 
9258   ;;
9259 esac
9260 fi
9261 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9262 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9263   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9264 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9265 else
9266   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9267 $as_echo "no" >&6; }
9268 fi
9269 
9270 
9271   test -n "$CHECK_TOOLSDIR_GMAKE" && break
9272 done
9273 
9274 
9275   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9276   DESCRIPTION="gmake in tools-dir"
9277   if test "x$MAKE_CANDIDATE" != x; then
9278     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9279 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9280     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9281     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9282     if test "x$IS_GNU_MAKE" = x; then
9283       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9284 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9285     else
9286       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9287       if test "x$IS_MODERN_MAKE" = x; then
9288         { $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
9289 $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;}
9290       else
9291         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9292           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9293             MAKE_EXPECTED_ENV='cygwin'
9294           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9295             MAKE_EXPECTED_ENV='msys'
9296           else
9297             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9298           fi
9299           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9300           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9301         else
9302           # Not relevant for non-Windows
9303           IS_MAKE_CORRECT_ENV=true
9304         fi
9305         if test "x$IS_MAKE_CORRECT_ENV" = x; then
9306           { $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
9307 $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;}
9308         else
9309           FOUND_MAKE=$MAKE_CANDIDATE
9310 
9311   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9312 
9313   # First separate the path from the arguments. This will split at the first
9314   # space.
9315   complete="$FOUND_MAKE"
9316   path="${complete%% *}"
9317   tmp="$complete EOL"
9318   arguments="${tmp#* }"
9319 
9320   # Input might be given as Windows format, start by converting to
9321   # unix format.
9322   new_path=`$CYGPATH -u "$path"`
9323 
9324   # Now try to locate executable using which
9325   new_path=`$WHICH "$new_path" 2> /dev/null`
9326   # bat and cmd files are not always considered executable in cygwin causing which
9327   # to not find them
9328   if test "x$new_path" = x \
9329            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9330            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9331     new_path=`$CYGPATH -u "$path"`
9332   fi
9333   if test "x$new_path" = x; then
9334     # Oops. Which didn't find the executable.
9335     # The splitting of arguments from the executable at a space might have been incorrect,
9336     # since paths with space are more likely in Windows. Give it another try with the whole
9337     # argument.
9338     path="$complete"
9339     arguments="EOL"
9340     new_path=`$CYGPATH -u "$path"`
9341     new_path=`$WHICH "$new_path" 2> /dev/null`
9342     # bat and cmd files are not always considered executable in cygwin causing which
9343     # to not find them
9344     if test "x$new_path" = x \
9345              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9346              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9347       new_path=`$CYGPATH -u "$path"`
9348     fi
9349     if test "x$new_path" = x; then
9350       # It's still not found. Now this is an unrecoverable error.
9351       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9352 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9353       has_space=`$ECHO "$complete" | $GREP " "`
9354       if test "x$has_space" != x; then
9355         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9356 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9357       fi
9358       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9359     fi
9360   fi
9361 
9362   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9363   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9364   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9365   # "foo.exe" is OK but "foo" is an error.
9366   #
9367   # This test is therefore slightly more accurate than "test -f" to check for file precense.
9368   # It is also a way to make sure we got the proper file name for the real test later on.
9369   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9370   if test "x$test_shortpath" = x; then
9371     # Short path failed, file does not exist as specified.
9372     # Try adding .exe or .cmd
9373     if test -f "${new_path}.exe"; then
9374        input_to_shortpath="${new_path}.exe"
9375     elif test -f "${new_path}.cmd"; then
9376        input_to_shortpath="${new_path}.cmd"
9377     else
9378       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9379 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9380       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9381 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9382       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9383     fi
9384   else
9385     input_to_shortpath="$new_path"
9386   fi
9387 
9388   # Call helper function which possibly converts this using DOS-style short mode.
9389   # If so, the updated path is stored in $new_path.
9390   new_path="$input_to_shortpath"
9391 
9392   input_path="$input_to_shortpath"
9393   # Check if we need to convert this using DOS-style short mode. If the path
9394   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9395   # take no chances and rewrite it.
9396   # Note: m4 eats our [], so we need to use [ and ] instead.
9397   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9398   if test "x$has_forbidden_chars" != x; then
9399     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9400     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9401     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9402     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9403       # Going to short mode and back again did indeed matter. Since short mode is
9404       # case insensitive, let's make it lowercase to improve readability.
9405       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9406       # Now convert it back to Unix-stile (cygpath)
9407       input_path=`$CYGPATH -u "$shortmode_path"`
9408       new_path="$input_path"
9409     fi
9410   fi
9411 
9412   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9413   if test "x$test_cygdrive_prefix" = x; then
9414     # As a simple fix, exclude /usr/bin since it's not a real path.
9415     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9416       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9417       # a path prefixed by /cygdrive for fixpath to work.
9418       new_path="$CYGWIN_ROOT_PATH$input_path"
9419     fi
9420   fi
9421 
9422   # remove trailing .exe if any
9423   new_path="${new_path/%.exe/}"
9424 
9425   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9426 
9427   # First separate the path from the arguments. This will split at the first
9428   # space.
9429   complete="$FOUND_MAKE"
9430   path="${complete%% *}"
9431   tmp="$complete EOL"
9432   arguments="${tmp#* }"
9433 
9434   # Input might be given as Windows format, start by converting to
9435   # unix format.
9436   new_path="$path"
9437 
9438   windows_path="$new_path"
9439   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9440     unix_path=`$CYGPATH -u "$windows_path"`
9441     new_path="$unix_path"
9442   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9443     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9444     new_path="$unix_path"
9445   fi
9446 
9447 
9448   # Now try to locate executable using which
9449   new_path=`$WHICH "$new_path" 2> /dev/null`
9450 
9451   if test "x$new_path" = x; then
9452     # Oops. Which didn't find the executable.
9453     # The splitting of arguments from the executable at a space might have been incorrect,
9454     # since paths with space are more likely in Windows. Give it another try with the whole
9455     # argument.
9456     path="$complete"
9457     arguments="EOL"
9458     new_path="$path"
9459 
9460   windows_path="$new_path"
9461   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9462     unix_path=`$CYGPATH -u "$windows_path"`
9463     new_path="$unix_path"
9464   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9465     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9466     new_path="$unix_path"
9467   fi
9468 
9469 
9470     new_path=`$WHICH "$new_path" 2> /dev/null`
9471 
9472     if test "x$new_path" = x; then
9473       # It's still not found. Now this is an unrecoverable error.
9474       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9475 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9476       has_space=`$ECHO "$complete" | $GREP " "`
9477       if test "x$has_space" != x; then
9478         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9479 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9480       fi
9481       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9482     fi
9483   fi
9484 
9485   # Now new_path has a complete unix path to the binary
9486   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9487     # Keep paths in /bin as-is, but remove trailing .exe if any
9488     new_path="${new_path/%.exe/}"
9489     # Do not save /bin paths to all_fixpath_prefixes!
9490   else
9491     # Not in mixed or Windows style, start by that.
9492     new_path=`cmd //c echo $new_path`
9493 
9494   input_path="$new_path"
9495   # Check if we need to convert this using DOS-style short mode. If the path
9496   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9497   # take no chances and rewrite it.
9498   # Note: m4 eats our [], so we need to use [ and ] instead.
9499   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9500   if test "x$has_forbidden_chars" != x; then
9501     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9502     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9503   fi
9504 
9505     # Output is in $new_path
9506 
9507   windows_path="$new_path"
9508   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9509     unix_path=`$CYGPATH -u "$windows_path"`
9510     new_path="$unix_path"
9511   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9512     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9513     new_path="$unix_path"
9514   fi
9515 
9516     # remove trailing .exe if any
9517     new_path="${new_path/%.exe/}"
9518 
9519     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9520     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9521   fi
9522 
9523   else
9524     # We're on a posix platform. Hooray! :)
9525     # First separate the path from the arguments. This will split at the first
9526     # space.
9527     complete="$FOUND_MAKE"
9528     path="${complete%% *}"
9529     tmp="$complete EOL"
9530     arguments="${tmp#* }"
9531 
9532     # Cannot rely on the command "which" here since it doesn't always work.
9533     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9534     if test -z "$is_absolute_path"; then
9535       # Path to executable is not absolute. Find it.
9536       IFS_save="$IFS"
9537       IFS=:
9538       for p in $PATH; do
9539         if test -f "$p/$path" && test -x "$p/$path"; then
9540           new_path="$p/$path"
9541           break
9542         fi
9543       done
9544       IFS="$IFS_save"
9545     else
9546       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9547 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9548       new_path="$path"
9549     fi
9550 
9551     if test "x$new_path" = x; then
9552         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9553 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9554         has_space=`$ECHO "$complete" | $GREP " "`
9555         if test "x$has_space" != x; then
9556           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9557 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9558         fi
9559         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9560       fi
9561   fi
9562 
9563       # Now join together the path and the arguments once again
9564       if test "x$arguments" != xEOL; then
9565         new_complete="$new_path ${arguments% *}"
9566       else
9567         new_complete="$new_path"
9568       fi
9569 
9570   if test "x$complete" != "x$new_complete"; then
9571       FOUND_MAKE="$new_complete"
9572       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9573 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9574     fi
9575 
9576         fi
9577       fi
9578     fi
9579   fi
9580 
9581         if test "x$FOUND_MAKE" = x; then
9582           for ac_prog in make
9583 do
9584   # Extract the first word of "$ac_prog", so it can be a program name with args.
9585 set dummy $ac_prog; ac_word=$2
9586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9587 $as_echo_n "checking for $ac_word... " >&6; }
9588 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
9589   $as_echo_n "(cached) " >&6
9590 else
9591   case $CHECK_TOOLSDIR_MAKE in
9592   [\\/]* | ?:[\\/]*)
9593   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9594   ;;
9595   *)
9596   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9597 for as_dir in $PATH
9598 do
9599   IFS=$as_save_IFS
9600   test -z "$as_dir" && as_dir=.
9601     for ac_exec_ext in '' $ac_executable_extensions; do
9602   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9603     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9604     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9605     break 2
9606   fi
9607 done
9608   done
9609 IFS=$as_save_IFS
9610 
9611   ;;
9612 esac
9613 fi
9614 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9615 if test -n "$CHECK_TOOLSDIR_MAKE"; then
9616   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9617 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9618 else
9619   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9620 $as_echo "no" >&6; }
9621 fi
9622 
9623 
9624   test -n "$CHECK_TOOLSDIR_MAKE" && break
9625 done
9626 
9627 
9628   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9629   DESCRIPTION="make in tools-dir"
9630   if test "x$MAKE_CANDIDATE" != x; then
9631     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9632 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9633     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9634     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9635     if test "x$IS_GNU_MAKE" = x; then
9636       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9637 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9638     else
9639       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9640       if test "x$IS_MODERN_MAKE" = x; then
9641         { $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
9642 $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;}
9643       else
9644         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9645           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9646             MAKE_EXPECTED_ENV='cygwin'
9647           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9648             MAKE_EXPECTED_ENV='msys'
9649           else
9650             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9651           fi
9652           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9653           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9654         else
9655           # Not relevant for non-Windows
9656           IS_MAKE_CORRECT_ENV=true
9657         fi
9658         if test "x$IS_MAKE_CORRECT_ENV" = x; then
9659           { $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
9660 $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;}
9661         else
9662           FOUND_MAKE=$MAKE_CANDIDATE
9663 
9664   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9665 
9666   # First separate the path from the arguments. This will split at the first
9667   # space.
9668   complete="$FOUND_MAKE"
9669   path="${complete%% *}"
9670   tmp="$complete EOL"
9671   arguments="${tmp#* }"
9672 
9673   # Input might be given as Windows format, start by converting to
9674   # unix format.
9675   new_path=`$CYGPATH -u "$path"`
9676 
9677   # Now try to locate executable using which
9678   new_path=`$WHICH "$new_path" 2> /dev/null`
9679   # bat and cmd files are not always considered executable in cygwin causing which
9680   # to not find them
9681   if test "x$new_path" = x \
9682            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9683            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9684     new_path=`$CYGPATH -u "$path"`
9685   fi
9686   if test "x$new_path" = x; then
9687     # Oops. Which didn't find the executable.
9688     # The splitting of arguments from the executable at a space might have been incorrect,
9689     # since paths with space are more likely in Windows. Give it another try with the whole
9690     # argument.
9691     path="$complete"
9692     arguments="EOL"
9693     new_path=`$CYGPATH -u "$path"`
9694     new_path=`$WHICH "$new_path" 2> /dev/null`
9695     # bat and cmd files are not always considered executable in cygwin causing which
9696     # to not find them
9697     if test "x$new_path" = x \
9698              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9699              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9700       new_path=`$CYGPATH -u "$path"`
9701     fi
9702     if test "x$new_path" = x; then
9703       # It's still not found. Now this is an unrecoverable error.
9704       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9705 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9706       has_space=`$ECHO "$complete" | $GREP " "`
9707       if test "x$has_space" != x; then
9708         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9709 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9710       fi
9711       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9712     fi
9713   fi
9714 
9715   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9716   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9717   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9718   # "foo.exe" is OK but "foo" is an error.
9719   #
9720   # This test is therefore slightly more accurate than "test -f" to check for file precense.
9721   # It is also a way to make sure we got the proper file name for the real test later on.
9722   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9723   if test "x$test_shortpath" = x; then
9724     # Short path failed, file does not exist as specified.
9725     # Try adding .exe or .cmd
9726     if test -f "${new_path}.exe"; then
9727        input_to_shortpath="${new_path}.exe"
9728     elif test -f "${new_path}.cmd"; then
9729        input_to_shortpath="${new_path}.cmd"
9730     else
9731       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9732 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9733       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9734 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9735       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9736     fi
9737   else
9738     input_to_shortpath="$new_path"
9739   fi
9740 
9741   # Call helper function which possibly converts this using DOS-style short mode.
9742   # If so, the updated path is stored in $new_path.
9743   new_path="$input_to_shortpath"
9744 
9745   input_path="$input_to_shortpath"
9746   # Check if we need to convert this using DOS-style short mode. If the path
9747   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9748   # take no chances and rewrite it.
9749   # Note: m4 eats our [], so we need to use [ and ] instead.
9750   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9751   if test "x$has_forbidden_chars" != x; then
9752     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9753     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9754     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9755     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9756       # Going to short mode and back again did indeed matter. Since short mode is
9757       # case insensitive, let's make it lowercase to improve readability.
9758       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9759       # Now convert it back to Unix-stile (cygpath)
9760       input_path=`$CYGPATH -u "$shortmode_path"`
9761       new_path="$input_path"
9762     fi
9763   fi
9764 
9765   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9766   if test "x$test_cygdrive_prefix" = x; then
9767     # As a simple fix, exclude /usr/bin since it's not a real path.
9768     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9769       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9770       # a path prefixed by /cygdrive for fixpath to work.
9771       new_path="$CYGWIN_ROOT_PATH$input_path"
9772     fi
9773   fi
9774 
9775   # remove trailing .exe if any
9776   new_path="${new_path/%.exe/}"
9777 
9778   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9779 
9780   # First separate the path from the arguments. This will split at the first
9781   # space.
9782   complete="$FOUND_MAKE"
9783   path="${complete%% *}"
9784   tmp="$complete EOL"
9785   arguments="${tmp#* }"
9786 
9787   # Input might be given as Windows format, start by converting to
9788   # unix format.
9789   new_path="$path"
9790 
9791   windows_path="$new_path"
9792   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9793     unix_path=`$CYGPATH -u "$windows_path"`
9794     new_path="$unix_path"
9795   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9796     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9797     new_path="$unix_path"
9798   fi
9799 
9800 
9801   # Now try to locate executable using which
9802   new_path=`$WHICH "$new_path" 2> /dev/null`
9803 
9804   if test "x$new_path" = x; then
9805     # Oops. Which didn't find the executable.
9806     # The splitting of arguments from the executable at a space might have been incorrect,
9807     # since paths with space are more likely in Windows. Give it another try with the whole
9808     # argument.
9809     path="$complete"
9810     arguments="EOL"
9811     new_path="$path"
9812 
9813   windows_path="$new_path"
9814   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9815     unix_path=`$CYGPATH -u "$windows_path"`
9816     new_path="$unix_path"
9817   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9818     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9819     new_path="$unix_path"
9820   fi
9821 
9822 
9823     new_path=`$WHICH "$new_path" 2> /dev/null`
9824 
9825     if test "x$new_path" = x; then
9826       # It's still not found. Now this is an unrecoverable error.
9827       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9828 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9829       has_space=`$ECHO "$complete" | $GREP " "`
9830       if test "x$has_space" != x; then
9831         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9832 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9833       fi
9834       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9835     fi
9836   fi
9837 
9838   # Now new_path has a complete unix path to the binary
9839   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9840     # Keep paths in /bin as-is, but remove trailing .exe if any
9841     new_path="${new_path/%.exe/}"
9842     # Do not save /bin paths to all_fixpath_prefixes!
9843   else
9844     # Not in mixed or Windows style, start by that.
9845     new_path=`cmd //c echo $new_path`
9846 
9847   input_path="$new_path"
9848   # Check if we need to convert this using DOS-style short mode. If the path
9849   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9850   # take no chances and rewrite it.
9851   # Note: m4 eats our [], so we need to use [ and ] instead.
9852   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9853   if test "x$has_forbidden_chars" != x; then
9854     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9855     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9856   fi
9857 
9858     # Output is in $new_path
9859 
9860   windows_path="$new_path"
9861   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9862     unix_path=`$CYGPATH -u "$windows_path"`
9863     new_path="$unix_path"
9864   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9865     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9866     new_path="$unix_path"
9867   fi
9868 
9869     # remove trailing .exe if any
9870     new_path="${new_path/%.exe/}"
9871 
9872     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9873     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9874   fi
9875 
9876   else
9877     # We're on a posix platform. Hooray! :)
9878     # First separate the path from the arguments. This will split at the first
9879     # space.
9880     complete="$FOUND_MAKE"
9881     path="${complete%% *}"
9882     tmp="$complete EOL"
9883     arguments="${tmp#* }"
9884 
9885     # Cannot rely on the command "which" here since it doesn't always work.
9886     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9887     if test -z "$is_absolute_path"; then
9888       # Path to executable is not absolute. Find it.
9889       IFS_save="$IFS"
9890       IFS=:
9891       for p in $PATH; do
9892         if test -f "$p/$path" && test -x "$p/$path"; then
9893           new_path="$p/$path"
9894           break
9895         fi
9896       done
9897       IFS="$IFS_save"
9898     else
9899       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9900 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9901       new_path="$path"
9902     fi
9903 
9904     if test "x$new_path" = x; then
9905         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9906 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9907         has_space=`$ECHO "$complete" | $GREP " "`
9908         if test "x$has_space" != x; then
9909           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9910 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9911         fi
9912         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9913       fi
9914   fi
9915 
9916       # Now join together the path and the arguments once again
9917       if test "x$arguments" != xEOL; then
9918         new_complete="$new_path ${arguments% *}"
9919       else
9920         new_complete="$new_path"
9921       fi
9922 
9923   if test "x$complete" != "x$new_complete"; then
9924       FOUND_MAKE="$new_complete"
9925       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9926 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9927     fi
9928 
9929         fi
9930       fi
9931     fi
9932   fi
9933 
9934         fi
9935         PATH=$OLD_PATH
9936       fi
9937     fi
9938 
9939     if test "x$FOUND_MAKE" = x; then
9940       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
9941     fi
9942   fi
9943 
9944   MAKE=$FOUND_MAKE
9945 
9946   { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9947 $as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9948 
9949 
9950 
9951     # Test if find supports -delete
9952     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9953 $as_echo_n "checking if find supports -delete... " >&6; }
9954     FIND_DELETE="-delete"
9955 
9956     DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9957 
9958     echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9959 
9960     TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9961     if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9962         # No, it does not.
9963         rm $DELETEDIR/TestIfFindSupportsDelete
9964         FIND_DELETE="-exec rm \{\} \+"
9965         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9966 $as_echo "no" >&6; }
9967     else
9968         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9969 $as_echo "yes" >&6; }
9970     fi
9971     rmdir $DELETEDIR
9972 
9973 
9974 
9975 # These tools might not be installed by default,
9976 # need hint on how to install them.
9977 
9978     for ac_prog in unzip
9979 do
9980   # Extract the first word of "$ac_prog", so it can be a program name with args.
9981 set dummy $ac_prog; ac_word=$2
9982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9983 $as_echo_n "checking for $ac_word... " >&6; }
9984 if ${ac_cv_path_UNZIP+:} false; then :
9985   $as_echo_n "(cached) " >&6
9986 else
9987   case $UNZIP in
9988   [\\/]* | ?:[\\/]*)
9989   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
9990   ;;
9991   *)
9992   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9993 for as_dir in $PATH
9994 do
9995   IFS=$as_save_IFS
9996   test -z "$as_dir" && as_dir=.
9997     for ac_exec_ext in '' $ac_executable_extensions; do
9998   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9999     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
10000     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10001     break 2
10002   fi
10003 done
10004   done
10005 IFS=$as_save_IFS
10006 
10007   ;;
10008 esac
10009 fi
10010 UNZIP=$ac_cv_path_UNZIP
10011 if test -n "$UNZIP"; then
10012   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
10013 $as_echo "$UNZIP" >&6; }
10014 else
10015   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10016 $as_echo "no" >&6; }
10017 fi
10018 
10019 
10020   test -n "$UNZIP" && break
10021 done
10022 
10023 
10024     if test "x$UNZIP" = x; then
10025         if test "xunzip" = x; then
10026           PROG_NAME=unzip
10027         else
10028           PROG_NAME=unzip
10029         fi
10030         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10031 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10032         as_fn_error $? "Cannot continue" "$LINENO" 5
10033     fi
10034 
10035 
10036 
10037     for ac_prog in zip
10038 do
10039   # Extract the first word of "$ac_prog", so it can be a program name with args.
10040 set dummy $ac_prog; ac_word=$2
10041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10042 $as_echo_n "checking for $ac_word... " >&6; }
10043 if ${ac_cv_path_ZIP+:} false; then :
10044   $as_echo_n "(cached) " >&6
10045 else
10046   case $ZIP in
10047   [\\/]* | ?:[\\/]*)
10048   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
10049   ;;
10050   *)
10051   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10052 for as_dir in $PATH
10053 do
10054   IFS=$as_save_IFS
10055   test -z "$as_dir" && as_dir=.
10056     for ac_exec_ext in '' $ac_executable_extensions; do
10057   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10058     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
10059     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10060     break 2
10061   fi
10062 done
10063   done
10064 IFS=$as_save_IFS
10065 
10066   ;;
10067 esac
10068 fi
10069 ZIP=$ac_cv_path_ZIP
10070 if test -n "$ZIP"; then
10071   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10072 $as_echo "$ZIP" >&6; }
10073 else
10074   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10075 $as_echo "no" >&6; }
10076 fi
10077 
10078 
10079   test -n "$ZIP" && break
10080 done
10081 
10082 
10083     if test "x$ZIP" = x; then
10084         if test "xzip" = x; then
10085           PROG_NAME=zip
10086         else
10087           PROG_NAME=zip
10088         fi
10089         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10090 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10091         as_fn_error $? "Cannot continue" "$LINENO" 5
10092     fi
10093 
10094 
10095 
10096 # Non-required basic tools
10097 
10098 # Extract the first word of "ldd", so it can be a program name with args.
10099 set dummy ldd; ac_word=$2
10100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10101 $as_echo_n "checking for $ac_word... " >&6; }
10102 if ${ac_cv_path_LDD+:} false; then :
10103   $as_echo_n "(cached) " >&6
10104 else
10105   case $LDD in
10106   [\\/]* | ?:[\\/]*)
10107   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10108   ;;
10109   *)
10110   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10111 for as_dir in $PATH
10112 do
10113   IFS=$as_save_IFS
10114   test -z "$as_dir" && as_dir=.
10115     for ac_exec_ext in '' $ac_executable_extensions; do
10116   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10117     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10118     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10119     break 2
10120   fi
10121 done
10122   done
10123 IFS=$as_save_IFS
10124 
10125   ;;
10126 esac
10127 fi
10128 LDD=$ac_cv_path_LDD
10129 if test -n "$LDD"; then
10130   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10131 $as_echo "$LDD" >&6; }
10132 else
10133   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10134 $as_echo "no" >&6; }
10135 fi
10136 
10137 
10138 if test "x$LDD" = "x"; then
10139     # List shared lib dependencies is used for
10140     # debug output and checking for forbidden dependencies.
10141     # We can build without it.
10142     LDD="true"
10143 fi
10144 # Extract the first word of "otool", so it can be a program name with args.
10145 set dummy otool; ac_word=$2
10146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10147 $as_echo_n "checking for $ac_word... " >&6; }
10148 if ${ac_cv_path_OTOOL+:} false; then :
10149   $as_echo_n "(cached) " >&6
10150 else
10151   case $OTOOL in
10152   [\\/]* | ?:[\\/]*)
10153   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10154   ;;
10155   *)
10156   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10157 for as_dir in $PATH
10158 do
10159   IFS=$as_save_IFS
10160   test -z "$as_dir" && as_dir=.
10161     for ac_exec_ext in '' $ac_executable_extensions; do
10162   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10163     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10164     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10165     break 2
10166   fi
10167 done
10168   done
10169 IFS=$as_save_IFS
10170 
10171   ;;
10172 esac
10173 fi
10174 OTOOL=$ac_cv_path_OTOOL
10175 if test -n "$OTOOL"; then
10176   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10177 $as_echo "$OTOOL" >&6; }
10178 else
10179   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10180 $as_echo "no" >&6; }
10181 fi
10182 
10183 
10184 if test "x$OTOOL" = "x"; then
10185    OTOOL="true"
10186 fi
10187 for ac_prog in readelf greadelf
10188 do
10189   # Extract the first word of "$ac_prog", so it can be a program name with args.
10190 set dummy $ac_prog; ac_word=$2
10191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10192 $as_echo_n "checking for $ac_word... " >&6; }
10193 if ${ac_cv_path_READELF+:} false; then :
10194   $as_echo_n "(cached) " >&6
10195 else
10196   case $READELF in
10197   [\\/]* | ?:[\\/]*)
10198   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10199   ;;
10200   *)
10201   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10202 for as_dir in $PATH
10203 do
10204   IFS=$as_save_IFS
10205   test -z "$as_dir" && as_dir=.
10206     for ac_exec_ext in '' $ac_executable_extensions; do
10207   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10208     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10209     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10210     break 2
10211   fi
10212 done
10213   done
10214 IFS=$as_save_IFS
10215 
10216   ;;
10217 esac
10218 fi
10219 READELF=$ac_cv_path_READELF
10220 if test -n "$READELF"; then
10221   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10222 $as_echo "$READELF" >&6; }
10223 else
10224   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10225 $as_echo "no" >&6; }
10226 fi
10227 
10228 
10229   test -n "$READELF" && break
10230 done
10231 
10232 # Extract the first word of "hg", so it can be a program name with args.
10233 set dummy hg; ac_word=$2
10234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10235 $as_echo_n "checking for $ac_word... " >&6; }
10236 if ${ac_cv_path_HG+:} false; then :
10237   $as_echo_n "(cached) " >&6
10238 else
10239   case $HG in
10240   [\\/]* | ?:[\\/]*)
10241   ac_cv_path_HG="$HG" # Let the user override the test with a path.
10242   ;;
10243   *)
10244   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10245 for as_dir in $PATH
10246 do
10247   IFS=$as_save_IFS
10248   test -z "$as_dir" && as_dir=.
10249     for ac_exec_ext in '' $ac_executable_extensions; do
10250   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10251     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10252     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10253     break 2
10254   fi
10255 done
10256   done
10257 IFS=$as_save_IFS
10258 
10259   ;;
10260 esac
10261 fi
10262 HG=$ac_cv_path_HG
10263 if test -n "$HG"; then
10264   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10265 $as_echo "$HG" >&6; }
10266 else
10267   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10268 $as_echo "no" >&6; }
10269 fi
10270 
10271 
10272 # Extract the first word of "stat", so it can be a program name with args.
10273 set dummy stat; ac_word=$2
10274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10275 $as_echo_n "checking for $ac_word... " >&6; }
10276 if ${ac_cv_path_STAT+:} false; then :
10277   $as_echo_n "(cached) " >&6
10278 else
10279   case $STAT in
10280   [\\/]* | ?:[\\/]*)
10281   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10282   ;;
10283   *)
10284   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10285 for as_dir in $PATH
10286 do
10287   IFS=$as_save_IFS
10288   test -z "$as_dir" && as_dir=.
10289     for ac_exec_ext in '' $ac_executable_extensions; do
10290   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10291     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10292     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10293     break 2
10294   fi
10295 done
10296   done
10297 IFS=$as_save_IFS
10298 
10299   ;;
10300 esac
10301 fi
10302 STAT=$ac_cv_path_STAT
10303 if test -n "$STAT"; then
10304   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10305 $as_echo "$STAT" >&6; }
10306 else
10307   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10308 $as_echo "no" >&6; }
10309 fi
10310 
10311 
10312 # Extract the first word of "time", so it can be a program name with args.
10313 set dummy time; ac_word=$2
10314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10315 $as_echo_n "checking for $ac_word... " >&6; }
10316 if ${ac_cv_path_TIME+:} false; then :
10317   $as_echo_n "(cached) " >&6
10318 else
10319   case $TIME in
10320   [\\/]* | ?:[\\/]*)
10321   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10322   ;;
10323   *)
10324   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10325 for as_dir in $PATH
10326 do
10327   IFS=$as_save_IFS
10328   test -z "$as_dir" && as_dir=.
10329     for ac_exec_ext in '' $ac_executable_extensions; do
10330   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10331     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10332     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10333     break 2
10334   fi
10335 done
10336   done
10337 IFS=$as_save_IFS
10338 
10339   ;;
10340 esac
10341 fi
10342 TIME=$ac_cv_path_TIME
10343 if test -n "$TIME"; then
10344   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10345 $as_echo "$TIME" >&6; }
10346 else
10347   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10348 $as_echo "no" >&6; }
10349 fi
10350 
10351 
10352 
10353 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10354 
10355     for ac_prog in comm
10356 do
10357   # Extract the first word of "$ac_prog", so it can be a program name with args.
10358 set dummy $ac_prog; ac_word=$2
10359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10360 $as_echo_n "checking for $ac_word... " >&6; }
10361 if ${ac_cv_path_COMM+:} false; then :
10362   $as_echo_n "(cached) " >&6
10363 else
10364   case $COMM in
10365   [\\/]* | ?:[\\/]*)
10366   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10367   ;;
10368   *)
10369   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10370 for as_dir in $PATH
10371 do
10372   IFS=$as_save_IFS
10373   test -z "$as_dir" && as_dir=.
10374     for ac_exec_ext in '' $ac_executable_extensions; do
10375   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10376     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10377     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10378     break 2
10379   fi
10380 done
10381   done
10382 IFS=$as_save_IFS
10383 
10384   ;;
10385 esac
10386 fi
10387 COMM=$ac_cv_path_COMM
10388 if test -n "$COMM"; then
10389   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10390 $as_echo "$COMM" >&6; }
10391 else
10392   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10393 $as_echo "no" >&6; }
10394 fi
10395 
10396 
10397   test -n "$COMM" && break
10398 done
10399 
10400 
10401     if test "x$COMM" = x; then
10402         if test "xcomm" = x; then
10403           PROG_NAME=comm
10404         else
10405           PROG_NAME=comm
10406         fi
10407         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10408 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10409         as_fn_error $? "Cannot continue" "$LINENO" 5
10410     fi
10411 
10412 
10413 fi
10414 
10415 
10416 # Check if pkg-config is available.
10417 
10418 
10419 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10420         if test -n "$ac_tool_prefix"; then
10421   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10422 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10424 $as_echo_n "checking for $ac_word... " >&6; }
10425 if ${ac_cv_path_PKG_CONFIG+:} false; then :
10426   $as_echo_n "(cached) " >&6
10427 else
10428   case $PKG_CONFIG in
10429   [\\/]* | ?:[\\/]*)
10430   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10431   ;;
10432   *)
10433   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10434 for as_dir in $PATH
10435 do
10436   IFS=$as_save_IFS
10437   test -z "$as_dir" && as_dir=.
10438     for ac_exec_ext in '' $ac_executable_extensions; do
10439   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10440     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10441     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10442     break 2
10443   fi
10444 done
10445   done
10446 IFS=$as_save_IFS
10447 
10448   ;;
10449 esac
10450 fi
10451 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10452 if test -n "$PKG_CONFIG"; then
10453   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10454 $as_echo "$PKG_CONFIG" >&6; }
10455 else
10456   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10457 $as_echo "no" >&6; }
10458 fi
10459 
10460 
10461 fi
10462 if test -z "$ac_cv_path_PKG_CONFIG"; then
10463   ac_pt_PKG_CONFIG=$PKG_CONFIG
10464   # Extract the first word of "pkg-config", so it can be a program name with args.
10465 set dummy pkg-config; ac_word=$2
10466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10467 $as_echo_n "checking for $ac_word... " >&6; }
10468 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10469   $as_echo_n "(cached) " >&6
10470 else
10471   case $ac_pt_PKG_CONFIG in
10472   [\\/]* | ?:[\\/]*)
10473   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10474   ;;
10475   *)
10476   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10477 for as_dir in $PATH
10478 do
10479   IFS=$as_save_IFS
10480   test -z "$as_dir" && as_dir=.
10481     for ac_exec_ext in '' $ac_executable_extensions; do
10482   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10483     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10484     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10485     break 2
10486   fi
10487 done
10488   done
10489 IFS=$as_save_IFS
10490 
10491   ;;
10492 esac
10493 fi
10494 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10495 if test -n "$ac_pt_PKG_CONFIG"; then
10496   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10497 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
10498 else
10499   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10500 $as_echo "no" >&6; }
10501 fi
10502 
10503   if test "x$ac_pt_PKG_CONFIG" = x; then
10504     PKG_CONFIG=""
10505   else
10506     case $cross_compiling:$ac_tool_warned in
10507 yes:)
10508 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10509 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10510 ac_tool_warned=yes ;;
10511 esac
10512     PKG_CONFIG=$ac_pt_PKG_CONFIG
10513   fi
10514 else
10515   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10516 fi
10517 
10518 fi
10519 if test -n "$PKG_CONFIG"; then
10520         _pkg_min_version=0.9.0
10521         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10522 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10523         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10524                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10525 $as_echo "yes" >&6; }
10526         else
10527                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10528 $as_echo "no" >&6; }
10529                 PKG_CONFIG=""
10530         fi
10531 
10532 fi
10533 
10534 # After basic tools have been setup, we can check build os specific details.
10535 
10536 ###############################################################################
10537 
10538 # Note that this is the build platform OS version!
10539 
10540 OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10541 OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10542 OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10543 OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10544 
10545 
10546 
10547 
10548 
10549 # Setup builddeps, for automatic downloading of tools we need.
10550 # This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10551 # boot-jdk setup, but we need to have basic tools setup first.
10552 
10553 
10554 # Check whether --with-builddeps-conf was given.
10555 if test "${with_builddeps_conf+set}" = set; then :
10556   withval=$with_builddeps_conf;
10557 fi
10558 
10559 
10560 
10561 # Check whether --with-builddeps-server was given.
10562 if test "${with_builddeps_server+set}" = set; then :
10563   withval=$with_builddeps_server;
10564 fi
10565 
10566 
10567 
10568 # Check whether --with-builddeps-dir was given.
10569 if test "${with_builddeps_dir+set}" = set; then :
10570   withval=$with_builddeps_dir;
10571 else
10572   with_builddeps_dir=/localhome/builddeps
10573 fi
10574 
10575 
10576 
10577 # Check whether --with-builddeps-group was given.
10578 if test "${with_builddeps_group+set}" = set; then :
10579   withval=$with_builddeps_group;
10580 fi
10581 
10582 
10583 
10584 
10585     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10586         if test "x$with_builddeps_conf" != x; then
10587             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10588 $as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10589             builddepsfile=$with_builddeps_conf
10590             if test -s $builddepsfile; then
10591                 . $builddepsfile
10592                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10593 $as_echo "loaded!" >&6; }
10594             else
10595                as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10596            fi
10597         else
10598             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10599 $as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10600             builddepsfile=`mktemp`
10601             touch $builddepsfile
10602             # Put all found confs into a single file.
10603             find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10604             # Source the file to acquire the variables
10605             if test -s $builddepsfile; then
10606                 . $builddepsfile
10607                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10608 $as_echo "found at least one!" >&6; }
10609             else
10610                as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10611            fi
10612         fi
10613         # Create build and target names that use _ instead of "-" and ".".
10614         # This is necessary to use them in variable names.
10615         build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10616         target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10617         # Extract rewrite information for build and target
10618         eval rewritten_build=\${REWRITE_${build_var}}
10619         if test "x$rewritten_build" = x; then
10620             rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10621             echo Build stays the same $rewritten_build
10622         else
10623             echo Rewriting build for builddeps into $rewritten_build
10624         fi
10625         eval rewritten_target=\${REWRITE_${target_var}}
10626         if test "x$rewritten_target" = x; then
10627             rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10628             echo Target stays the same $rewritten_target
10629         else
10630             echo Rewriting target for builddeps into $rewritten_target
10631         fi
10632         rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10633         rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10634     fi
10635     for ac_prog in 7z unzip
10636 do
10637   # Extract the first word of "$ac_prog", so it can be a program name with args.
10638 set dummy $ac_prog; ac_word=$2
10639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10640 $as_echo_n "checking for $ac_word... " >&6; }
10641 if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
10642   $as_echo_n "(cached) " >&6
10643 else
10644   if test -n "$BDEPS_UNZIP"; then
10645   ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10646 else
10647 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10648 for as_dir in $PATH
10649 do
10650   IFS=$as_save_IFS
10651   test -z "$as_dir" && as_dir=.
10652     for ac_exec_ext in '' $ac_executable_extensions; do
10653   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10654     ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10655     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10656     break 2
10657   fi
10658 done
10659   done
10660 IFS=$as_save_IFS
10661 
10662 fi
10663 fi
10664 BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10665 if test -n "$BDEPS_UNZIP"; then
10666   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10667 $as_echo "$BDEPS_UNZIP" >&6; }
10668 else
10669   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10670 $as_echo "no" >&6; }
10671 fi
10672 
10673 
10674   test -n "$BDEPS_UNZIP" && break
10675 done
10676 
10677     if test "x$BDEPS_UNZIP" = x7z; then
10678         BDEPS_UNZIP="7z x"
10679     fi
10680 
10681     for ac_prog in wget lftp ftp
10682 do
10683   # Extract the first word of "$ac_prog", so it can be a program name with args.
10684 set dummy $ac_prog; ac_word=$2
10685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10686 $as_echo_n "checking for $ac_word... " >&6; }
10687 if ${ac_cv_prog_BDEPS_FTP+:} false; then :
10688   $as_echo_n "(cached) " >&6
10689 else
10690   if test -n "$BDEPS_FTP"; then
10691   ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10692 else
10693 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10694 for as_dir in $PATH
10695 do
10696   IFS=$as_save_IFS
10697   test -z "$as_dir" && as_dir=.
10698     for ac_exec_ext in '' $ac_executable_extensions; do
10699   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10700     ac_cv_prog_BDEPS_FTP="$ac_prog"
10701     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10702     break 2
10703   fi
10704 done
10705   done
10706 IFS=$as_save_IFS
10707 
10708 fi
10709 fi
10710 BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10711 if test -n "$BDEPS_FTP"; then
10712   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10713 $as_echo "$BDEPS_FTP" >&6; }
10714 else
10715   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10716 $as_echo "no" >&6; }
10717 fi
10718 
10719 
10720   test -n "$BDEPS_FTP" && break
10721 done
10722 
10723 
10724 
10725 ###############################################################################
10726 #
10727 # Determine OpenJDK variants, options and version numbers.
10728 #
10729 ###############################################################################
10730 
10731 # We need build & target for this.
10732 
10733 
10734 ###############################################################################
10735 #
10736 # Should we build a JDK/JVM with headful support (ie a graphical ui)?
10737 # We always build headless support.
10738 #
10739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10740 $as_echo_n "checking headful support... " >&6; }
10741 # Check whether --enable-headful was given.
10742 if test "${enable_headful+set}" = set; then :
10743   enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10744 else
10745   SUPPORT_HEADFUL=yes
10746 fi
10747 
10748 
10749 SUPPORT_HEADLESS=yes
10750 BUILD_HEADLESS="BUILD_HEADLESS:=true"
10751 
10752 if test "x$SUPPORT_HEADFUL" = xyes; then
10753     # We are building both headful and headless.
10754     headful_msg="inlude support for both headful and headless"
10755 fi
10756 
10757 if test "x$SUPPORT_HEADFUL" = xno; then
10758     # Thus we are building headless only.
10759     BUILD_HEADLESS="BUILD_HEADLESS:=true"
10760     headful_msg="headless only"
10761 fi
10762 
10763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10764 $as_echo "$headful_msg" >&6; }
10765 
10766 
10767 
10768 
10769 
10770 # Control wether Hotspot runs Queens test after build.
10771 # Check whether --enable-hotspot-test-in-build was given.
10772 if test "${enable_hotspot_test_in_build+set}" = set; then :
10773   enableval=$enable_hotspot_test_in_build;
10774 else
10775   enable_hotspot_test_in_build=no
10776 fi
10777 
10778 if test "x$enable_hotspot_test_in_build" = "xyes"; then
10779     TEST_IN_BUILD=true
10780 else
10781     TEST_IN_BUILD=false
10782 fi
10783 
10784 
10785 ###############################################################################
10786 #
10787 # Choose cacerts source file
10788 #
10789 
10790 # Check whether --with-cacerts-file was given.
10791 if test "${with_cacerts_file+set}" = set; then :
10792   withval=$with_cacerts_file;
10793 fi
10794 
10795 if test "x$with_cacerts_file" != x; then
10796     CACERTS_FILE=$with_cacerts_file
10797 else
10798     if test "x$OPENJDK" = "xtrue"; then
10799         CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10800     else
10801         CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
10802     fi
10803 fi
10804 
10805 
10806 ###############################################################################
10807 #
10808 # Enable or disable unlimited crypto
10809 #
10810 # Check whether --enable-unlimited-crypto was given.
10811 if test "${enable_unlimited_crypto+set}" = set; then :
10812   enableval=$enable_unlimited_crypto;
10813 else
10814   enable_unlimited_crypto=no
10815 fi
10816 
10817 if test "x$enable_unlimited_crypto" = "xyes"; then
10818     UNLIMITED_CRYPTO=true
10819 else
10820     UNLIMITED_CRYPTO=false
10821 fi
10822 
10823 
10824 ###############################################################################
10825 #
10826 # Enable or disable the elliptic curve crypto implementation
10827 #
10828 
10829 
10830 ###############################################################################
10831 #
10832 # Compress jars
10833 #
10834 COMPRESS_JARS=false
10835 
10836 
10837 
10838 
10839 # Source the version numbers
10840 . $AUTOCONF_DIR/version-numbers
10841 
10842 # Get the settings from parameters
10843 
10844 # Check whether --with-milestone was given.
10845 if test "${with_milestone+set}" = set; then :
10846   withval=$with_milestone;
10847 fi
10848 
10849 if test "x$with_milestone" = xyes; then
10850   as_fn_error $? "Milestone must have a value" "$LINENO" 5
10851 elif test "x$with_milestone" != x; then
10852     MILESTONE="$with_milestone"
10853 fi
10854 if test "x$MILESTONE" = x; then
10855   MILESTONE=internal
10856 fi
10857 
10858 
10859 # Check whether --with-build-number was given.
10860 if test "${with_build_number+set}" = set; then :
10861   withval=$with_build_number;
10862 fi
10863 
10864 if test "x$with_build_number" = xyes; then
10865   as_fn_error $? "Build number must have a value" "$LINENO" 5
10866 elif test "x$with_build_number" != x; then
10867   JDK_BUILD_NUMBER="$with_build_number"
10868 fi
10869 if test "x$JDK_BUILD_NUMBER" = x; then
10870   JDK_BUILD_NUMBER=b00
10871 fi
10872 
10873 
10874 # Check whether --with-user-release-suffix was given.
10875 if test "${with_user_release_suffix+set}" = set; then :
10876   withval=$with_user_release_suffix;
10877 fi
10878 
10879 if test "x$with_user_release_suffix" = xyes; then
10880   as_fn_error $? "Release suffix must have a value" "$LINENO" 5
10881 elif test "x$with_user_release_suffix" != x; then
10882   USER_RELEASE_SUFFIX="$with_user_release_suffix"
10883 else
10884   BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
10885   # Avoid [:alnum:] since it depends on the locale.
10886   CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
10887   USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10888 fi
10889 
10890 
10891 # Now set the JDK version, milestone, build number etc.
10892 
10893 
10894 
10895 
10896 
10897 
10898 
10899 
10900 
10901 
10902 
10903 
10904 
10905 
10906 COPYRIGHT_YEAR=`date +'%Y'`
10907 
10908 
10909 if test "x$JDK_UPDATE_VERSION" != x; then
10910   JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
10911 else
10912   JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
10913 fi
10914 
10915 
10916 COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
10917 
10918 
10919 
10920 ###############################################################################
10921 #
10922 # Setup BootJDK, used to bootstrap the build.
10923 #
10924 ###############################################################################
10925 
10926 
10927 BOOT_JDK_FOUND=no
10928 
10929 # Check whether --with-boot-jdk was given.
10930 if test "${with_boot_jdk+set}" = set; then :
10931   withval=$with_boot_jdk;
10932 fi
10933 
10934 
10935 # We look for the Boot JDK through various means, going from more certain to
10936 # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
10937 # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
10938 # must check if this is indeed valid; otherwise we'll continue looking.
10939 
10940 # Test: Is bootjdk explicitely set by command line arguments?
10941 
10942   if test "x$BOOT_JDK_FOUND" = xno; then
10943     # Now execute the test
10944 
10945 if test "x$with_boot_jdk" != x; then
10946     BOOT_JDK=$with_boot_jdk
10947     BOOT_JDK_FOUND=maybe
10948     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
10949 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
10950 fi
10951 
10952 
10953     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10954     if test "x$BOOT_JDK_FOUND" = xmaybe; then
10955       # Do we have a bin/java?
10956       if test ! -x "$BOOT_JDK/bin/java"; then
10957         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10958 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10959         BOOT_JDK_FOUND=no
10960       else
10961         # Do we have a bin/javac?
10962         if test ! -x "$BOOT_JDK/bin/javac"; then
10963           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10964 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10965           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
10966 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10967           BOOT_JDK_FOUND=no
10968         else
10969           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10970           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10971             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10972 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10973             BOOT_JDK_FOUND=no
10974           else
10975             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10976             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10977 
10978             # Extra M4 quote needed to protect [] in grep expression.
10979             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10980             if test "x$FOUND_VERSION_78" = x; then
10981               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10982 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10983               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
10984 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10985               BOOT_JDK_FOUND=no
10986             else
10987               # We're done! :-)
10988               BOOT_JDK_FOUND=yes
10989 
10990   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10991 
10992   # Input might be given as Windows format, start by converting to
10993   # unix format.
10994   path="$BOOT_JDK"
10995   new_path=`$CYGPATH -u "$path"`
10996 
10997   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10998   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10999   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11000   # "foo.exe" is OK but "foo" is an error.
11001   #
11002   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11003   # It is also a way to make sure we got the proper file name for the real test later on.
11004   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11005   if test "x$test_shortpath" = x; then
11006     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11007 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11008     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11009   fi
11010 
11011   # Call helper function which possibly converts this using DOS-style short mode.
11012   # If so, the updated path is stored in $new_path.
11013 
11014   input_path="$new_path"
11015   # Check if we need to convert this using DOS-style short mode. If the path
11016   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11017   # take no chances and rewrite it.
11018   # Note: m4 eats our [], so we need to use [ and ] instead.
11019   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11020   if test "x$has_forbidden_chars" != x; then
11021     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11022     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11023     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11024     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11025       # Going to short mode and back again did indeed matter. Since short mode is
11026       # case insensitive, let's make it lowercase to improve readability.
11027       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11028       # Now convert it back to Unix-stile (cygpath)
11029       input_path=`$CYGPATH -u "$shortmode_path"`
11030       new_path="$input_path"
11031     fi
11032   fi
11033 
11034   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11035   if test "x$test_cygdrive_prefix" = x; then
11036     # As a simple fix, exclude /usr/bin since it's not a real path.
11037     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11038       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11039       # a path prefixed by /cygdrive for fixpath to work.
11040       new_path="$CYGWIN_ROOT_PATH$input_path"
11041     fi
11042   fi
11043 
11044 
11045   if test "x$path" != "x$new_path"; then
11046     BOOT_JDK="$new_path"
11047     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11048 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11049   fi
11050 
11051   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11052 
11053   path="$BOOT_JDK"
11054   has_colon=`$ECHO $path | $GREP ^.:`
11055   new_path="$path"
11056   if test "x$has_colon" = x; then
11057     # Not in mixed or Windows style, start by that.
11058     new_path=`cmd //c echo $path`
11059   fi
11060 
11061 
11062   input_path="$new_path"
11063   # Check if we need to convert this using DOS-style short mode. If the path
11064   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11065   # take no chances and rewrite it.
11066   # Note: m4 eats our [], so we need to use [ and ] instead.
11067   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11068   if test "x$has_forbidden_chars" != x; then
11069     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11070     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11071   fi
11072 
11073 
11074   windows_path="$new_path"
11075   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11076     unix_path=`$CYGPATH -u "$windows_path"`
11077     new_path="$unix_path"
11078   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11079     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11080     new_path="$unix_path"
11081   fi
11082 
11083   if test "x$path" != "x$new_path"; then
11084     BOOT_JDK="$new_path"
11085     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11086 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11087   fi
11088 
11089   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11090   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11091 
11092   else
11093     # We're on a posix platform. Hooray! :)
11094     path="$BOOT_JDK"
11095 
11096     if test ! -f "$path" && test ! -d "$path"; then
11097       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11098     fi
11099 
11100     has_space=`$ECHO "$path" | $GREP " "`
11101     if test "x$has_space" != x; then
11102       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11103 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11104       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11105     fi
11106   fi
11107 
11108               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11109 $as_echo_n "checking for Boot JDK... " >&6; }
11110               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11111 $as_echo "$BOOT_JDK" >&6; }
11112               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11113 $as_echo_n "checking Boot JDK version... " >&6; }
11114               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11115               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11116 $as_echo "$BOOT_JDK_VERSION" >&6; }
11117             fi # end check jdk version
11118           fi # end check rt.jar
11119         fi # end check javac
11120       fi # end check java
11121     fi # end check boot jdk found
11122   fi
11123 
11124 if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11125   # Having specified an argument which is incorrect will produce an instant failure;
11126   # we should not go on looking
11127   as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11128 fi
11129 
11130 # Test: Is bootjdk available from builddeps?
11131 
11132   if test "x$BOOT_JDK_FOUND" = xno; then
11133     # Now execute the test
11134 
11135 
11136 
11137     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11138         # Source the builddeps file again, to make sure it uses the latest variables!
11139         . $builddepsfile
11140         # Look for a target and build machine specific resource!
11141         eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11142         if test "x$resource" = x; then
11143             # Ok, lets instead look for a target specific resource
11144             eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11145         fi
11146         if test "x$resource" = x; then
11147             # Ok, lets instead look for a build specific resource
11148             eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11149         fi
11150         if test "x$resource" = x; then
11151             # Ok, lets instead look for a generic resource
11152             # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11153             resource=${builddep_bootjdk}
11154         fi
11155         if test "x$resource" != x; then
11156             { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11157 $as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11158             # If the resource in the builddeps.conf file is an existing directory,
11159             # for example /java/linux/cups
11160             if test -d ${resource}; then
11161                depdir=${resource}
11162             else
11163 
11164 # bootjdk is for example mymodule
11165 # $resource is for example libs/general/libmymod_1_2_3.zip
11166 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11167 # $with_builddeps_dir is for example /localhome/builddeps
11168 # depdir is the name of the variable into which we store the depdir, eg MYMOD
11169 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11170 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11171     filename=`basename $resource`
11172     filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11173     filebase=${filename%%.*}
11174     extension=${filename#*.}
11175     installdir=$with_builddeps_dir/$filebase
11176     if test ! -f $installdir/$filename.unpacked; then
11177         { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11178 $as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11179         if test ! -d $installdir; then
11180             mkdir -p $installdir
11181         fi
11182         if test ! -d $installdir; then
11183             as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11184         fi
11185         tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11186         touch $tmpfile
11187         if test ! -f $tmpfile; then
11188             as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11189         fi
11190 
11191     # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11192     # $tmpfile is the local file name for the downloaded file.
11193     VALID_TOOL=no
11194     if test "x$BDEPS_FTP" = xwget; then
11195        VALID_TOOL=yes
11196        wget -O $tmpfile $with_builddeps_server/$resource
11197     fi
11198     if test "x$BDEPS_FTP" = xlftp; then
11199        VALID_TOOL=yes
11200        lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11201     fi
11202     if test "x$BDEPS_FTP" = xftp; then
11203         VALID_TOOL=yes
11204         FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11205         FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11206         FTPUSERPWD=${FTPSERVER%%@*}
11207         if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11208             FTPUSER=${userpwd%%:*}
11209             FTPPWD=${userpwd#*@}
11210             FTPSERVER=${FTPSERVER#*@}
11211         else
11212             FTPUSER=ftp
11213             FTPPWD=ftp
11214         fi
11215         # the "pass" command does not work on some
11216         # ftp clients (read ftp.exe) but if it works,
11217         # passive mode is better!
11218         (\
11219             echo "user $FTPUSER $FTPPWD"        ;\
11220             echo "pass"                         ;\
11221             echo "bin"                          ;\
11222             echo "get $FTPPATH $tmpfile"              ;\
11223         ) | ftp -in $FTPSERVER
11224     fi
11225     if test "x$VALID_TOOL" != xyes; then
11226        as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11227     fi
11228 
11229         mv $tmpfile $installdir/$filename
11230         if test ! -s $installdir/$filename; then
11231             as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11232         fi
11233         case "$extension" in
11234             zip)  echo "Unzipping $installdir/$filename..."
11235                (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11236             ;;
11237             tar.gz) echo "Untaring $installdir/$filename..."
11238                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11239             ;;
11240             tgz) echo "Untaring $installdir/$filename..."
11241                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11242             ;;
11243             *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11244             ;;
11245         esac
11246     fi
11247     if test -f $installdir/$filename.unpacked; then
11248         depdir=$installdir
11249     fi
11250 
11251             fi
11252             # Source the builddeps file again, because in the previous command, the depdir
11253             # was updated to point at the current build dependency install directory.
11254             . $builddepsfile
11255             # Now extract variables from the builddeps.conf files.
11256             theroot=${builddep_bootjdk_ROOT}
11257             thecflags=${builddep_bootjdk_CFLAGS}
11258             thelibs=${builddep_bootjdk_LIBS}
11259             if test "x$depdir" = x; then
11260                 as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11261             fi
11262             BOOT_JDK=$depdir
11263             if test "x$theroot" != x; then
11264                BOOT_JDK="$theroot"
11265             fi
11266             if test "x$thecflags" != x; then
11267                BOOT_JDK_CFLAGS="$thecflags"
11268             fi
11269             if test "x$thelibs" != x; then
11270                BOOT_JDK_LIBS="$thelibs"
11271             fi
11272             BOOT_JDK_FOUND=maybe
11273             else BOOT_JDK_FOUND=no
11274 
11275         fi
11276         else BOOT_JDK_FOUND=no
11277 
11278     fi
11279 
11280 
11281 
11282     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11283     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11284       # Do we have a bin/java?
11285       if test ! -x "$BOOT_JDK/bin/java"; then
11286         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11287 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11288         BOOT_JDK_FOUND=no
11289       else
11290         # Do we have a bin/javac?
11291         if test ! -x "$BOOT_JDK/bin/javac"; then
11292           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11293 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11294           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11295 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11296           BOOT_JDK_FOUND=no
11297         else
11298           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11299           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11300             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11301 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11302             BOOT_JDK_FOUND=no
11303           else
11304             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11305             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11306 
11307             # Extra M4 quote needed to protect [] in grep expression.
11308             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11309             if test "x$FOUND_VERSION_78" = x; then
11310               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11311 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11312               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11313 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11314               BOOT_JDK_FOUND=no
11315             else
11316               # We're done! :-)
11317               BOOT_JDK_FOUND=yes
11318 
11319   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11320 
11321   # Input might be given as Windows format, start by converting to
11322   # unix format.
11323   path="$BOOT_JDK"
11324   new_path=`$CYGPATH -u "$path"`
11325 
11326   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11327   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11328   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11329   # "foo.exe" is OK but "foo" is an error.
11330   #
11331   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11332   # It is also a way to make sure we got the proper file name for the real test later on.
11333   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11334   if test "x$test_shortpath" = x; then
11335     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11336 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11337     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11338   fi
11339 
11340   # Call helper function which possibly converts this using DOS-style short mode.
11341   # If so, the updated path is stored in $new_path.
11342 
11343   input_path="$new_path"
11344   # Check if we need to convert this using DOS-style short mode. If the path
11345   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11346   # take no chances and rewrite it.
11347   # Note: m4 eats our [], so we need to use [ and ] instead.
11348   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11349   if test "x$has_forbidden_chars" != x; then
11350     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11351     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11352     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11353     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11354       # Going to short mode and back again did indeed matter. Since short mode is
11355       # case insensitive, let's make it lowercase to improve readability.
11356       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11357       # Now convert it back to Unix-stile (cygpath)
11358       input_path=`$CYGPATH -u "$shortmode_path"`
11359       new_path="$input_path"
11360     fi
11361   fi
11362 
11363   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11364   if test "x$test_cygdrive_prefix" = x; then
11365     # As a simple fix, exclude /usr/bin since it's not a real path.
11366     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11367       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11368       # a path prefixed by /cygdrive for fixpath to work.
11369       new_path="$CYGWIN_ROOT_PATH$input_path"
11370     fi
11371   fi
11372 
11373 
11374   if test "x$path" != "x$new_path"; then
11375     BOOT_JDK="$new_path"
11376     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11377 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11378   fi
11379 
11380   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11381 
11382   path="$BOOT_JDK"
11383   has_colon=`$ECHO $path | $GREP ^.:`
11384   new_path="$path"
11385   if test "x$has_colon" = x; then
11386     # Not in mixed or Windows style, start by that.
11387     new_path=`cmd //c echo $path`
11388   fi
11389 
11390 
11391   input_path="$new_path"
11392   # Check if we need to convert this using DOS-style short mode. If the path
11393   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11394   # take no chances and rewrite it.
11395   # Note: m4 eats our [], so we need to use [ and ] instead.
11396   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11397   if test "x$has_forbidden_chars" != x; then
11398     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11399     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11400   fi
11401 
11402 
11403   windows_path="$new_path"
11404   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11405     unix_path=`$CYGPATH -u "$windows_path"`
11406     new_path="$unix_path"
11407   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11408     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11409     new_path="$unix_path"
11410   fi
11411 
11412   if test "x$path" != "x$new_path"; then
11413     BOOT_JDK="$new_path"
11414     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11415 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11416   fi
11417 
11418   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11419   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11420 
11421   else
11422     # We're on a posix platform. Hooray! :)
11423     path="$BOOT_JDK"
11424 
11425     if test ! -f "$path" && test ! -d "$path"; then
11426       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11427     fi
11428 
11429     has_space=`$ECHO "$path" | $GREP " "`
11430     if test "x$has_space" != x; then
11431       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11432 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11433       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11434     fi
11435   fi
11436 
11437               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11438 $as_echo_n "checking for Boot JDK... " >&6; }
11439               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11440 $as_echo "$BOOT_JDK" >&6; }
11441               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11442 $as_echo_n "checking Boot JDK version... " >&6; }
11443               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11444               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11445 $as_echo "$BOOT_JDK_VERSION" >&6; }
11446             fi # end check jdk version
11447           fi # end check rt.jar
11448         fi # end check javac
11449       fi # end check java
11450     fi # end check boot jdk found
11451   fi
11452 
11453 
11454 # Test: Is $JAVA_HOME set?
11455 
11456   if test "x$BOOT_JDK_FOUND" = xno; then
11457     # Now execute the test
11458 
11459     if test "x$JAVA_HOME" != x; then
11460         JAVA_HOME_PROCESSED="$JAVA_HOME"
11461 
11462   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11463 
11464   # Input might be given as Windows format, start by converting to
11465   # unix format.
11466   path="$JAVA_HOME_PROCESSED"
11467   new_path=`$CYGPATH -u "$path"`
11468 
11469   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11470   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11471   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11472   # "foo.exe" is OK but "foo" is an error.
11473   #
11474   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11475   # It is also a way to make sure we got the proper file name for the real test later on.
11476   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11477   if test "x$test_shortpath" = x; then
11478     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11479 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11480     as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11481   fi
11482 
11483   # Call helper function which possibly converts this using DOS-style short mode.
11484   # If so, the updated path is stored in $new_path.
11485 
11486   input_path="$new_path"
11487   # Check if we need to convert this using DOS-style short mode. If the path
11488   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11489   # take no chances and rewrite it.
11490   # Note: m4 eats our [], so we need to use [ and ] instead.
11491   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11492   if test "x$has_forbidden_chars" != x; then
11493     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11494     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11495     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11496     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11497       # Going to short mode and back again did indeed matter. Since short mode is
11498       # case insensitive, let's make it lowercase to improve readability.
11499       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11500       # Now convert it back to Unix-stile (cygpath)
11501       input_path=`$CYGPATH -u "$shortmode_path"`
11502       new_path="$input_path"
11503     fi
11504   fi
11505 
11506   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11507   if test "x$test_cygdrive_prefix" = x; then
11508     # As a simple fix, exclude /usr/bin since it's not a real path.
11509     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11510       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11511       # a path prefixed by /cygdrive for fixpath to work.
11512       new_path="$CYGWIN_ROOT_PATH$input_path"
11513     fi
11514   fi
11515 
11516 
11517   if test "x$path" != "x$new_path"; then
11518     JAVA_HOME_PROCESSED="$new_path"
11519     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11520 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11521   fi
11522 
11523   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11524 
11525   path="$JAVA_HOME_PROCESSED"
11526   has_colon=`$ECHO $path | $GREP ^.:`
11527   new_path="$path"
11528   if test "x$has_colon" = x; then
11529     # Not in mixed or Windows style, start by that.
11530     new_path=`cmd //c echo $path`
11531   fi
11532 
11533 
11534   input_path="$new_path"
11535   # Check if we need to convert this using DOS-style short mode. If the path
11536   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11537   # take no chances and rewrite it.
11538   # Note: m4 eats our [], so we need to use [ and ] instead.
11539   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11540   if test "x$has_forbidden_chars" != x; then
11541     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11542     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11543   fi
11544 
11545 
11546   windows_path="$new_path"
11547   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11548     unix_path=`$CYGPATH -u "$windows_path"`
11549     new_path="$unix_path"
11550   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11551     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11552     new_path="$unix_path"
11553   fi
11554 
11555   if test "x$path" != "x$new_path"; then
11556     JAVA_HOME_PROCESSED="$new_path"
11557     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11558 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11559   fi
11560 
11561   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11562   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11563 
11564   else
11565     # We're on a posix platform. Hooray! :)
11566     path="$JAVA_HOME_PROCESSED"
11567 
11568     if test ! -f "$path" && test ! -d "$path"; then
11569       as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11570     fi
11571 
11572     has_space=`$ECHO "$path" | $GREP " "`
11573     if test "x$has_space" != x; then
11574       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11575 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11576       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11577     fi
11578   fi
11579 
11580         if test ! -d "$JAVA_HOME_PROCESSED"; then
11581             { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11582 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11583         else
11584           # Aha, the user has set a JAVA_HOME
11585           # let us use that as the Boot JDK.
11586           BOOT_JDK="$JAVA_HOME_PROCESSED"
11587           BOOT_JDK_FOUND=maybe
11588           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11589 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11590         fi
11591     fi
11592 
11593 
11594     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11595     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11596       # Do we have a bin/java?
11597       if test ! -x "$BOOT_JDK/bin/java"; then
11598         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11599 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11600         BOOT_JDK_FOUND=no
11601       else
11602         # Do we have a bin/javac?
11603         if test ! -x "$BOOT_JDK/bin/javac"; then
11604           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11605 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11606           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11607 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11608           BOOT_JDK_FOUND=no
11609         else
11610           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11611           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11612             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11613 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11614             BOOT_JDK_FOUND=no
11615           else
11616             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11617             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11618 
11619             # Extra M4 quote needed to protect [] in grep expression.
11620             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11621             if test "x$FOUND_VERSION_78" = x; then
11622               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11623 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11624               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11625 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11626               BOOT_JDK_FOUND=no
11627             else
11628               # We're done! :-)
11629               BOOT_JDK_FOUND=yes
11630 
11631   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11632 
11633   # Input might be given as Windows format, start by converting to
11634   # unix format.
11635   path="$BOOT_JDK"
11636   new_path=`$CYGPATH -u "$path"`
11637 
11638   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11639   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11640   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11641   # "foo.exe" is OK but "foo" is an error.
11642   #
11643   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11644   # It is also a way to make sure we got the proper file name for the real test later on.
11645   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11646   if test "x$test_shortpath" = x; then
11647     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11648 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11649     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11650   fi
11651 
11652   # Call helper function which possibly converts this using DOS-style short mode.
11653   # If so, the updated path is stored in $new_path.
11654 
11655   input_path="$new_path"
11656   # Check if we need to convert this using DOS-style short mode. If the path
11657   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11658   # take no chances and rewrite it.
11659   # Note: m4 eats our [], so we need to use [ and ] instead.
11660   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11661   if test "x$has_forbidden_chars" != x; then
11662     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11663     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11664     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11665     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11666       # Going to short mode and back again did indeed matter. Since short mode is
11667       # case insensitive, let's make it lowercase to improve readability.
11668       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11669       # Now convert it back to Unix-stile (cygpath)
11670       input_path=`$CYGPATH -u "$shortmode_path"`
11671       new_path="$input_path"
11672     fi
11673   fi
11674 
11675   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11676   if test "x$test_cygdrive_prefix" = x; then
11677     # As a simple fix, exclude /usr/bin since it's not a real path.
11678     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11679       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11680       # a path prefixed by /cygdrive for fixpath to work.
11681       new_path="$CYGWIN_ROOT_PATH$input_path"
11682     fi
11683   fi
11684 
11685 
11686   if test "x$path" != "x$new_path"; then
11687     BOOT_JDK="$new_path"
11688     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11689 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11690   fi
11691 
11692   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11693 
11694   path="$BOOT_JDK"
11695   has_colon=`$ECHO $path | $GREP ^.:`
11696   new_path="$path"
11697   if test "x$has_colon" = x; then
11698     # Not in mixed or Windows style, start by that.
11699     new_path=`cmd //c echo $path`
11700   fi
11701 
11702 
11703   input_path="$new_path"
11704   # Check if we need to convert this using DOS-style short mode. If the path
11705   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11706   # take no chances and rewrite it.
11707   # Note: m4 eats our [], so we need to use [ and ] instead.
11708   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11709   if test "x$has_forbidden_chars" != x; then
11710     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11711     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11712   fi
11713 
11714 
11715   windows_path="$new_path"
11716   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11717     unix_path=`$CYGPATH -u "$windows_path"`
11718     new_path="$unix_path"
11719   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11720     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11721     new_path="$unix_path"
11722   fi
11723 
11724   if test "x$path" != "x$new_path"; then
11725     BOOT_JDK="$new_path"
11726     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11727 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11728   fi
11729 
11730   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11731   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11732 
11733   else
11734     # We're on a posix platform. Hooray! :)
11735     path="$BOOT_JDK"
11736 
11737     if test ! -f "$path" && test ! -d "$path"; then
11738       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11739     fi
11740 
11741     has_space=`$ECHO "$path" | $GREP " "`
11742     if test "x$has_space" != x; then
11743       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11744 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11745       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11746     fi
11747   fi
11748 
11749               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11750 $as_echo_n "checking for Boot JDK... " >&6; }
11751               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11752 $as_echo "$BOOT_JDK" >&6; }
11753               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11754 $as_echo_n "checking Boot JDK version... " >&6; }
11755               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11756               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11757 $as_echo "$BOOT_JDK_VERSION" >&6; }
11758             fi # end check jdk version
11759           fi # end check rt.jar
11760         fi # end check javac
11761       fi # end check java
11762     fi # end check boot jdk found
11763   fi
11764 
11765 
11766 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11767 
11768   if test "x$BOOT_JDK_FOUND" = xno; then
11769     # Now execute the test
11770 
11771     if test -x /usr/libexec/java_home; then
11772         BOOT_JDK=`/usr/libexec/java_home`
11773         BOOT_JDK_FOUND=maybe
11774         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11775 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11776     fi
11777 
11778 
11779     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11780     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11781       # Do we have a bin/java?
11782       if test ! -x "$BOOT_JDK/bin/java"; then
11783         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11784 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11785         BOOT_JDK_FOUND=no
11786       else
11787         # Do we have a bin/javac?
11788         if test ! -x "$BOOT_JDK/bin/javac"; then
11789           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11790 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11791           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11792 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11793           BOOT_JDK_FOUND=no
11794         else
11795           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11796           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11797             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11798 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11799             BOOT_JDK_FOUND=no
11800           else
11801             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11802             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11803 
11804             # Extra M4 quote needed to protect [] in grep expression.
11805             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11806             if test "x$FOUND_VERSION_78" = x; then
11807               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11808 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11809               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11810 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11811               BOOT_JDK_FOUND=no
11812             else
11813               # We're done! :-)
11814               BOOT_JDK_FOUND=yes
11815 
11816   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11817 
11818   # Input might be given as Windows format, start by converting to
11819   # unix format.
11820   path="$BOOT_JDK"
11821   new_path=`$CYGPATH -u "$path"`
11822 
11823   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11824   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11825   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11826   # "foo.exe" is OK but "foo" is an error.
11827   #
11828   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11829   # It is also a way to make sure we got the proper file name for the real test later on.
11830   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11831   if test "x$test_shortpath" = x; then
11832     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11833 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11834     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11835   fi
11836 
11837   # Call helper function which possibly converts this using DOS-style short mode.
11838   # If so, the updated path is stored in $new_path.
11839 
11840   input_path="$new_path"
11841   # Check if we need to convert this using DOS-style short mode. If the path
11842   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11843   # take no chances and rewrite it.
11844   # Note: m4 eats our [], so we need to use [ and ] instead.
11845   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11846   if test "x$has_forbidden_chars" != x; then
11847     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11848     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11849     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11850     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11851       # Going to short mode and back again did indeed matter. Since short mode is
11852       # case insensitive, let's make it lowercase to improve readability.
11853       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11854       # Now convert it back to Unix-stile (cygpath)
11855       input_path=`$CYGPATH -u "$shortmode_path"`
11856       new_path="$input_path"
11857     fi
11858   fi
11859 
11860   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11861   if test "x$test_cygdrive_prefix" = x; then
11862     # As a simple fix, exclude /usr/bin since it's not a real path.
11863     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11864       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11865       # a path prefixed by /cygdrive for fixpath to work.
11866       new_path="$CYGWIN_ROOT_PATH$input_path"
11867     fi
11868   fi
11869 
11870 
11871   if test "x$path" != "x$new_path"; then
11872     BOOT_JDK="$new_path"
11873     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11874 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11875   fi
11876 
11877   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11878 
11879   path="$BOOT_JDK"
11880   has_colon=`$ECHO $path | $GREP ^.:`
11881   new_path="$path"
11882   if test "x$has_colon" = x; then
11883     # Not in mixed or Windows style, start by that.
11884     new_path=`cmd //c echo $path`
11885   fi
11886 
11887 
11888   input_path="$new_path"
11889   # Check if we need to convert this using DOS-style short mode. If the path
11890   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11891   # take no chances and rewrite it.
11892   # Note: m4 eats our [], so we need to use [ and ] instead.
11893   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11894   if test "x$has_forbidden_chars" != x; then
11895     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11896     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11897   fi
11898 
11899 
11900   windows_path="$new_path"
11901   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11902     unix_path=`$CYGPATH -u "$windows_path"`
11903     new_path="$unix_path"
11904   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11905     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11906     new_path="$unix_path"
11907   fi
11908 
11909   if test "x$path" != "x$new_path"; then
11910     BOOT_JDK="$new_path"
11911     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11912 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11913   fi
11914 
11915   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11916   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11917 
11918   else
11919     # We're on a posix platform. Hooray! :)
11920     path="$BOOT_JDK"
11921 
11922     if test ! -f "$path" && test ! -d "$path"; then
11923       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11924     fi
11925 
11926     has_space=`$ECHO "$path" | $GREP " "`
11927     if test "x$has_space" != x; then
11928       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11929 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11930       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11931     fi
11932   fi
11933 
11934               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11935 $as_echo_n "checking for Boot JDK... " >&6; }
11936               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11937 $as_echo "$BOOT_JDK" >&6; }
11938               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11939 $as_echo_n "checking Boot JDK version... " >&6; }
11940               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11941               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11942 $as_echo "$BOOT_JDK_VERSION" >&6; }
11943             fi # end check jdk version
11944           fi # end check rt.jar
11945         fi # end check javac
11946       fi # end check java
11947     fi # end check boot jdk found
11948   fi
11949 
11950 
11951 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
11952 
11953   if test "x$BOOT_JDK_FOUND" = xno; then
11954     # Now execute the test
11955 
11956     # Extract the first word of "javac", so it can be a program name with args.
11957 set dummy javac; ac_word=$2
11958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11959 $as_echo_n "checking for $ac_word... " >&6; }
11960 if ${ac_cv_path_JAVAC_CHECK+:} false; then :
11961   $as_echo_n "(cached) " >&6
11962 else
11963   case $JAVAC_CHECK in
11964   [\\/]* | ?:[\\/]*)
11965   ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
11966   ;;
11967   *)
11968   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11969 for as_dir in $PATH
11970 do
11971   IFS=$as_save_IFS
11972   test -z "$as_dir" && as_dir=.
11973     for ac_exec_ext in '' $ac_executable_extensions; do
11974   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11975     ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
11976     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11977     break 2
11978   fi
11979 done
11980   done
11981 IFS=$as_save_IFS
11982 
11983   ;;
11984 esac
11985 fi
11986 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
11987 if test -n "$JAVAC_CHECK"; then
11988   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
11989 $as_echo "$JAVAC_CHECK" >&6; }
11990 else
11991   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11992 $as_echo "no" >&6; }
11993 fi
11994 
11995 
11996     # Extract the first word of "java", so it can be a program name with args.
11997 set dummy java; ac_word=$2
11998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11999 $as_echo_n "checking for $ac_word... " >&6; }
12000 if ${ac_cv_path_JAVA_CHECK+:} false; then :
12001   $as_echo_n "(cached) " >&6
12002 else
12003   case $JAVA_CHECK in
12004   [\\/]* | ?:[\\/]*)
12005   ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
12006   ;;
12007   *)
12008   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12009 for as_dir in $PATH
12010 do
12011   IFS=$as_save_IFS
12012   test -z "$as_dir" && as_dir=.
12013     for ac_exec_ext in '' $ac_executable_extensions; do
12014   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12015     ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
12016     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12017     break 2
12018   fi
12019 done
12020   done
12021 IFS=$as_save_IFS
12022 
12023   ;;
12024 esac
12025 fi
12026 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
12027 if test -n "$JAVA_CHECK"; then
12028   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
12029 $as_echo "$JAVA_CHECK" >&6; }
12030 else
12031   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12032 $as_echo "no" >&6; }
12033 fi
12034 
12035 
12036     BINARY="$JAVAC_CHECK"
12037     if test "x$JAVAC_CHECK" = x; then
12038         BINARY="$JAVA_CHECK"
12039     fi
12040     if test "x$BINARY" != x; then
12041         # So there is a java(c) binary, it might be part of a JDK.
12042         # Lets find the JDK/JRE directory by following symbolic links.
12043         # Linux/GNU systems often have links from /usr/bin/java to
12044         # /etc/alternatives/java to the real JDK binary.
12045 
12046     if test "x$OPENJDK_BUILD_OS" != xwindows; then
12047         # Follow a chain of symbolic links. Use readlink
12048         # where it exists, else fall back to horribly
12049         # complicated shell code.
12050         if test "x$READLINK_TESTED" != yes; then
12051             # On MacOSX there is a readlink tool with a different
12052             # purpose than the GNU readlink tool. Check the found readlink.
12053             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12054             if test "x$ISGNU" = x; then
12055                  # A readlink that we do not know how to use.
12056                  # Are there other non-GNU readlinks out there?
12057                  READLINK_TESTED=yes
12058                  READLINK=
12059             fi
12060         fi
12061 
12062         if test "x$READLINK" != x; then
12063             BINARY=`$READLINK -f $BINARY`
12064         else
12065             # Save the current directory for restoring afterwards
12066             STARTDIR=$PWD
12067             COUNTER=0
12068             sym_link_dir=`$DIRNAME $BINARY`
12069             sym_link_file=`$BASENAME $BINARY`
12070             # Use the system pwd and not the shell builtin to resolve directory symlinks
12071             cd $sym_link_dir
12072             cd `$THEPWDCMD`
12073             sym_link_dir=`$THEPWDCMD`
12074             # Resolve file symlinks
12075             while test $COUNTER -lt 20; do
12076                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12077                 if test "x$ISLINK" == x; then
12078                     # This is not a symbolic link! We are done!
12079                     break
12080                 fi
12081                 # Again resolve directory symlinks since the target of the just found
12082                 # link could be in a different directory
12083                 cd `$DIRNAME $ISLINK`
12084                 sym_link_dir=`$THEPWDCMD`
12085                 sym_link_file=`$BASENAME $ISLINK`
12086                 let COUNTER=COUNTER+1
12087             done
12088             cd $STARTDIR
12089             BINARY=$sym_link_dir/$sym_link_file
12090         fi
12091     fi
12092 
12093         BOOT_JDK=`dirname "$BINARY"`
12094         BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12095         if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12096             # Looks like we found ourselves an JDK
12097             BOOT_JDK_FOUND=maybe
12098             { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12099 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12100         fi
12101     fi
12102 
12103 
12104     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12105     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12106       # Do we have a bin/java?
12107       if test ! -x "$BOOT_JDK/bin/java"; then
12108         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12109 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12110         BOOT_JDK_FOUND=no
12111       else
12112         # Do we have a bin/javac?
12113         if test ! -x "$BOOT_JDK/bin/javac"; then
12114           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12115 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12116           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12117 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12118           BOOT_JDK_FOUND=no
12119         else
12120           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12121           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12122             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12123 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12124             BOOT_JDK_FOUND=no
12125           else
12126             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12127             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12128 
12129             # Extra M4 quote needed to protect [] in grep expression.
12130             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12131             if test "x$FOUND_VERSION_78" = x; then
12132               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12133 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12134               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12135 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12136               BOOT_JDK_FOUND=no
12137             else
12138               # We're done! :-)
12139               BOOT_JDK_FOUND=yes
12140 
12141   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12142 
12143   # Input might be given as Windows format, start by converting to
12144   # unix format.
12145   path="$BOOT_JDK"
12146   new_path=`$CYGPATH -u "$path"`
12147 
12148   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12149   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12150   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12151   # "foo.exe" is OK but "foo" is an error.
12152   #
12153   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12154   # It is also a way to make sure we got the proper file name for the real test later on.
12155   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12156   if test "x$test_shortpath" = x; then
12157     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12158 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12159     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12160   fi
12161 
12162   # Call helper function which possibly converts this using DOS-style short mode.
12163   # If so, the updated path is stored in $new_path.
12164 
12165   input_path="$new_path"
12166   # Check if we need to convert this using DOS-style short mode. If the path
12167   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12168   # take no chances and rewrite it.
12169   # Note: m4 eats our [], so we need to use [ and ] instead.
12170   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12171   if test "x$has_forbidden_chars" != x; then
12172     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12173     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12174     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12175     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12176       # Going to short mode and back again did indeed matter. Since short mode is
12177       # case insensitive, let's make it lowercase to improve readability.
12178       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12179       # Now convert it back to Unix-stile (cygpath)
12180       input_path=`$CYGPATH -u "$shortmode_path"`
12181       new_path="$input_path"
12182     fi
12183   fi
12184 
12185   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12186   if test "x$test_cygdrive_prefix" = x; then
12187     # As a simple fix, exclude /usr/bin since it's not a real path.
12188     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12189       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12190       # a path prefixed by /cygdrive for fixpath to work.
12191       new_path="$CYGWIN_ROOT_PATH$input_path"
12192     fi
12193   fi
12194 
12195 
12196   if test "x$path" != "x$new_path"; then
12197     BOOT_JDK="$new_path"
12198     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12199 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12200   fi
12201 
12202   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12203 
12204   path="$BOOT_JDK"
12205   has_colon=`$ECHO $path | $GREP ^.:`
12206   new_path="$path"
12207   if test "x$has_colon" = x; then
12208     # Not in mixed or Windows style, start by that.
12209     new_path=`cmd //c echo $path`
12210   fi
12211 
12212 
12213   input_path="$new_path"
12214   # Check if we need to convert this using DOS-style short mode. If the path
12215   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12216   # take no chances and rewrite it.
12217   # Note: m4 eats our [], so we need to use [ and ] instead.
12218   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12219   if test "x$has_forbidden_chars" != x; then
12220     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12221     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12222   fi
12223 
12224 
12225   windows_path="$new_path"
12226   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12227     unix_path=`$CYGPATH -u "$windows_path"`
12228     new_path="$unix_path"
12229   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12230     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12231     new_path="$unix_path"
12232   fi
12233 
12234   if test "x$path" != "x$new_path"; then
12235     BOOT_JDK="$new_path"
12236     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12237 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12238   fi
12239 
12240   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12241   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12242 
12243   else
12244     # We're on a posix platform. Hooray! :)
12245     path="$BOOT_JDK"
12246 
12247     if test ! -f "$path" && test ! -d "$path"; then
12248       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12249     fi
12250 
12251     has_space=`$ECHO "$path" | $GREP " "`
12252     if test "x$has_space" != x; then
12253       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12254 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12255       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12256     fi
12257   fi
12258 
12259               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12260 $as_echo_n "checking for Boot JDK... " >&6; }
12261               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12262 $as_echo "$BOOT_JDK" >&6; }
12263               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12264 $as_echo_n "checking Boot JDK version... " >&6; }
12265               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12266               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12267 $as_echo "$BOOT_JDK_VERSION" >&6; }
12268             fi # end check jdk version
12269           fi # end check rt.jar
12270         fi # end check javac
12271       fi # end check java
12272     fi # end check boot jdk found
12273   fi
12274 
12275 
12276 # Test: Is there a JDK installed in default, well-known locations?
12277 
12278   if test "x$BOOT_JDK_FOUND" = xno; then
12279     # Now execute the test
12280 
12281   if test "x$OPENJDK_TARGET_OS" = xwindows; then
12282 
12283   if test "x$BOOT_JDK_FOUND" = xno; then
12284     # Now execute the test
12285 
12286   if test "x$ProgramW6432" != x; then
12287     VIRTUAL_DIR="$ProgramW6432/Java"
12288 
12289   windows_path="$VIRTUAL_DIR"
12290   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12291     unix_path=`$CYGPATH -u "$windows_path"`
12292     VIRTUAL_DIR="$unix_path"
12293   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12294     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12295     VIRTUAL_DIR="$unix_path"
12296   fi
12297 
12298 
12299   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12300   BOOT_JDK_SUFFIX=""
12301   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12302   if test "x$ALL_JDKS_FOUND" != x; then
12303     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12304 
12305   if test "x$BOOT_JDK_FOUND" = xno; then
12306     # Now execute the test
12307 
12308         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12309         if test -d "$BOOT_JDK"; then
12310           BOOT_JDK_FOUND=maybe
12311           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12312 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12313         fi
12314 
12315 
12316     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12317     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12318       # Do we have a bin/java?
12319       if test ! -x "$BOOT_JDK/bin/java"; then
12320         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12321 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12322         BOOT_JDK_FOUND=no
12323       else
12324         # Do we have a bin/javac?
12325         if test ! -x "$BOOT_JDK/bin/javac"; then
12326           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12327 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12328           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12329 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12330           BOOT_JDK_FOUND=no
12331         else
12332           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12333           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12334             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12335 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12336             BOOT_JDK_FOUND=no
12337           else
12338             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12339             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12340 
12341             # Extra M4 quote needed to protect [] in grep expression.
12342             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12343             if test "x$FOUND_VERSION_78" = x; then
12344               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12345 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12346               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12347 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12348               BOOT_JDK_FOUND=no
12349             else
12350               # We're done! :-)
12351               BOOT_JDK_FOUND=yes
12352 
12353   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12354 
12355   # Input might be given as Windows format, start by converting to
12356   # unix format.
12357   path="$BOOT_JDK"
12358   new_path=`$CYGPATH -u "$path"`
12359 
12360   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12361   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12362   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12363   # "foo.exe" is OK but "foo" is an error.
12364   #
12365   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12366   # It is also a way to make sure we got the proper file name for the real test later on.
12367   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12368   if test "x$test_shortpath" = x; then
12369     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12370 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12371     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12372   fi
12373 
12374   # Call helper function which possibly converts this using DOS-style short mode.
12375   # If so, the updated path is stored in $new_path.
12376 
12377   input_path="$new_path"
12378   # Check if we need to convert this using DOS-style short mode. If the path
12379   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12380   # take no chances and rewrite it.
12381   # Note: m4 eats our [], so we need to use [ and ] instead.
12382   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12383   if test "x$has_forbidden_chars" != x; then
12384     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12385     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12386     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12387     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12388       # Going to short mode and back again did indeed matter. Since short mode is
12389       # case insensitive, let's make it lowercase to improve readability.
12390       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12391       # Now convert it back to Unix-stile (cygpath)
12392       input_path=`$CYGPATH -u "$shortmode_path"`
12393       new_path="$input_path"
12394     fi
12395   fi
12396 
12397   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12398   if test "x$test_cygdrive_prefix" = x; then
12399     # As a simple fix, exclude /usr/bin since it's not a real path.
12400     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12401       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12402       # a path prefixed by /cygdrive for fixpath to work.
12403       new_path="$CYGWIN_ROOT_PATH$input_path"
12404     fi
12405   fi
12406 
12407 
12408   if test "x$path" != "x$new_path"; then
12409     BOOT_JDK="$new_path"
12410     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12411 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12412   fi
12413 
12414   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12415 
12416   path="$BOOT_JDK"
12417   has_colon=`$ECHO $path | $GREP ^.:`
12418   new_path="$path"
12419   if test "x$has_colon" = x; then
12420     # Not in mixed or Windows style, start by that.
12421     new_path=`cmd //c echo $path`
12422   fi
12423 
12424 
12425   input_path="$new_path"
12426   # Check if we need to convert this using DOS-style short mode. If the path
12427   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12428   # take no chances and rewrite it.
12429   # Note: m4 eats our [], so we need to use [ and ] instead.
12430   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12431   if test "x$has_forbidden_chars" != x; then
12432     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12433     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12434   fi
12435 
12436 
12437   windows_path="$new_path"
12438   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12439     unix_path=`$CYGPATH -u "$windows_path"`
12440     new_path="$unix_path"
12441   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12442     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12443     new_path="$unix_path"
12444   fi
12445 
12446   if test "x$path" != "x$new_path"; then
12447     BOOT_JDK="$new_path"
12448     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12449 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12450   fi
12451 
12452   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12453   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12454 
12455   else
12456     # We're on a posix platform. Hooray! :)
12457     path="$BOOT_JDK"
12458 
12459     if test ! -f "$path" && test ! -d "$path"; then
12460       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12461     fi
12462 
12463     has_space=`$ECHO "$path" | $GREP " "`
12464     if test "x$has_space" != x; then
12465       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12466 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12467       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12468     fi
12469   fi
12470 
12471               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12472 $as_echo_n "checking for Boot JDK... " >&6; }
12473               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12474 $as_echo "$BOOT_JDK" >&6; }
12475               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12476 $as_echo_n "checking Boot JDK version... " >&6; }
12477               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12478               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12479 $as_echo "$BOOT_JDK_VERSION" >&6; }
12480             fi # end check jdk version
12481           fi # end check rt.jar
12482         fi # end check javac
12483       fi # end check java
12484     fi # end check boot jdk found
12485   fi
12486 
12487     done
12488   fi
12489 
12490   fi
12491 
12492 
12493     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12494     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12495       # Do we have a bin/java?
12496       if test ! -x "$BOOT_JDK/bin/java"; then
12497         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12498 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12499         BOOT_JDK_FOUND=no
12500       else
12501         # Do we have a bin/javac?
12502         if test ! -x "$BOOT_JDK/bin/javac"; then
12503           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12504 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12505           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12506 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12507           BOOT_JDK_FOUND=no
12508         else
12509           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12510           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12511             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12512 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12513             BOOT_JDK_FOUND=no
12514           else
12515             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12516             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12517 
12518             # Extra M4 quote needed to protect [] in grep expression.
12519             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12520             if test "x$FOUND_VERSION_78" = x; then
12521               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12522 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12523               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12524 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12525               BOOT_JDK_FOUND=no
12526             else
12527               # We're done! :-)
12528               BOOT_JDK_FOUND=yes
12529 
12530   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12531 
12532   # Input might be given as Windows format, start by converting to
12533   # unix format.
12534   path="$BOOT_JDK"
12535   new_path=`$CYGPATH -u "$path"`
12536 
12537   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12538   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12539   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12540   # "foo.exe" is OK but "foo" is an error.
12541   #
12542   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12543   # It is also a way to make sure we got the proper file name for the real test later on.
12544   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12545   if test "x$test_shortpath" = x; then
12546     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12547 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12548     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12549   fi
12550 
12551   # Call helper function which possibly converts this using DOS-style short mode.
12552   # If so, the updated path is stored in $new_path.
12553 
12554   input_path="$new_path"
12555   # Check if we need to convert this using DOS-style short mode. If the path
12556   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12557   # take no chances and rewrite it.
12558   # Note: m4 eats our [], so we need to use [ and ] instead.
12559   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12560   if test "x$has_forbidden_chars" != x; then
12561     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12562     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12563     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12564     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12565       # Going to short mode and back again did indeed matter. Since short mode is
12566       # case insensitive, let's make it lowercase to improve readability.
12567       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12568       # Now convert it back to Unix-stile (cygpath)
12569       input_path=`$CYGPATH -u "$shortmode_path"`
12570       new_path="$input_path"
12571     fi
12572   fi
12573 
12574   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12575   if test "x$test_cygdrive_prefix" = x; then
12576     # As a simple fix, exclude /usr/bin since it's not a real path.
12577     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12578       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12579       # a path prefixed by /cygdrive for fixpath to work.
12580       new_path="$CYGWIN_ROOT_PATH$input_path"
12581     fi
12582   fi
12583 
12584 
12585   if test "x$path" != "x$new_path"; then
12586     BOOT_JDK="$new_path"
12587     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12588 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12589   fi
12590 
12591   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12592 
12593   path="$BOOT_JDK"
12594   has_colon=`$ECHO $path | $GREP ^.:`
12595   new_path="$path"
12596   if test "x$has_colon" = x; then
12597     # Not in mixed or Windows style, start by that.
12598     new_path=`cmd //c echo $path`
12599   fi
12600 
12601 
12602   input_path="$new_path"
12603   # Check if we need to convert this using DOS-style short mode. If the path
12604   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12605   # take no chances and rewrite it.
12606   # Note: m4 eats our [], so we need to use [ and ] instead.
12607   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12608   if test "x$has_forbidden_chars" != x; then
12609     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12610     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12611   fi
12612 
12613 
12614   windows_path="$new_path"
12615   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12616     unix_path=`$CYGPATH -u "$windows_path"`
12617     new_path="$unix_path"
12618   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12619     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12620     new_path="$unix_path"
12621   fi
12622 
12623   if test "x$path" != "x$new_path"; then
12624     BOOT_JDK="$new_path"
12625     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12626 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12627   fi
12628 
12629   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12630   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12631 
12632   else
12633     # We're on a posix platform. Hooray! :)
12634     path="$BOOT_JDK"
12635 
12636     if test ! -f "$path" && test ! -d "$path"; then
12637       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12638     fi
12639 
12640     has_space=`$ECHO "$path" | $GREP " "`
12641     if test "x$has_space" != x; then
12642       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12643 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12644       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12645     fi
12646   fi
12647 
12648               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12649 $as_echo_n "checking for Boot JDK... " >&6; }
12650               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12651 $as_echo "$BOOT_JDK" >&6; }
12652               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12653 $as_echo_n "checking Boot JDK version... " >&6; }
12654               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12655               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12656 $as_echo "$BOOT_JDK_VERSION" >&6; }
12657             fi # end check jdk version
12658           fi # end check rt.jar
12659         fi # end check javac
12660       fi # end check java
12661     fi # end check boot jdk found
12662   fi
12663 
12664 
12665   if test "x$BOOT_JDK_FOUND" = xno; then
12666     # Now execute the test
12667 
12668   if test "x$PROGRAMW6432" != x; then
12669     VIRTUAL_DIR="$PROGRAMW6432/Java"
12670 
12671   windows_path="$VIRTUAL_DIR"
12672   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12673     unix_path=`$CYGPATH -u "$windows_path"`
12674     VIRTUAL_DIR="$unix_path"
12675   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12676     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12677     VIRTUAL_DIR="$unix_path"
12678   fi
12679 
12680 
12681   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12682   BOOT_JDK_SUFFIX=""
12683   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12684   if test "x$ALL_JDKS_FOUND" != x; then
12685     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12686 
12687   if test "x$BOOT_JDK_FOUND" = xno; then
12688     # Now execute the test
12689 
12690         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12691         if test -d "$BOOT_JDK"; then
12692           BOOT_JDK_FOUND=maybe
12693           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12694 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12695         fi
12696 
12697 
12698     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12699     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12700       # Do we have a bin/java?
12701       if test ! -x "$BOOT_JDK/bin/java"; then
12702         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12703 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12704         BOOT_JDK_FOUND=no
12705       else
12706         # Do we have a bin/javac?
12707         if test ! -x "$BOOT_JDK/bin/javac"; then
12708           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12709 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12710           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12711 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12712           BOOT_JDK_FOUND=no
12713         else
12714           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12715           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12716             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12717 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12718             BOOT_JDK_FOUND=no
12719           else
12720             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12721             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12722 
12723             # Extra M4 quote needed to protect [] in grep expression.
12724             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12725             if test "x$FOUND_VERSION_78" = x; then
12726               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12727 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12728               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12729 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12730               BOOT_JDK_FOUND=no
12731             else
12732               # We're done! :-)
12733               BOOT_JDK_FOUND=yes
12734 
12735   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12736 
12737   # Input might be given as Windows format, start by converting to
12738   # unix format.
12739   path="$BOOT_JDK"
12740   new_path=`$CYGPATH -u "$path"`
12741 
12742   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12743   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12744   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12745   # "foo.exe" is OK but "foo" is an error.
12746   #
12747   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12748   # It is also a way to make sure we got the proper file name for the real test later on.
12749   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12750   if test "x$test_shortpath" = x; then
12751     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12752 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12753     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12754   fi
12755 
12756   # Call helper function which possibly converts this using DOS-style short mode.
12757   # If so, the updated path is stored in $new_path.
12758 
12759   input_path="$new_path"
12760   # Check if we need to convert this using DOS-style short mode. If the path
12761   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12762   # take no chances and rewrite it.
12763   # Note: m4 eats our [], so we need to use [ and ] instead.
12764   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12765   if test "x$has_forbidden_chars" != x; then
12766     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12767     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12768     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12769     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12770       # Going to short mode and back again did indeed matter. Since short mode is
12771       # case insensitive, let's make it lowercase to improve readability.
12772       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12773       # Now convert it back to Unix-stile (cygpath)
12774       input_path=`$CYGPATH -u "$shortmode_path"`
12775       new_path="$input_path"
12776     fi
12777   fi
12778 
12779   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12780   if test "x$test_cygdrive_prefix" = x; then
12781     # As a simple fix, exclude /usr/bin since it's not a real path.
12782     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12783       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12784       # a path prefixed by /cygdrive for fixpath to work.
12785       new_path="$CYGWIN_ROOT_PATH$input_path"
12786     fi
12787   fi
12788 
12789 
12790   if test "x$path" != "x$new_path"; then
12791     BOOT_JDK="$new_path"
12792     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12793 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12794   fi
12795 
12796   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12797 
12798   path="$BOOT_JDK"
12799   has_colon=`$ECHO $path | $GREP ^.:`
12800   new_path="$path"
12801   if test "x$has_colon" = x; then
12802     # Not in mixed or Windows style, start by that.
12803     new_path=`cmd //c echo $path`
12804   fi
12805 
12806 
12807   input_path="$new_path"
12808   # Check if we need to convert this using DOS-style short mode. If the path
12809   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12810   # take no chances and rewrite it.
12811   # Note: m4 eats our [], so we need to use [ and ] instead.
12812   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12813   if test "x$has_forbidden_chars" != x; then
12814     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12815     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12816   fi
12817 
12818 
12819   windows_path="$new_path"
12820   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12821     unix_path=`$CYGPATH -u "$windows_path"`
12822     new_path="$unix_path"
12823   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12824     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12825     new_path="$unix_path"
12826   fi
12827 
12828   if test "x$path" != "x$new_path"; then
12829     BOOT_JDK="$new_path"
12830     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12831 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12832   fi
12833 
12834   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12835   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12836 
12837   else
12838     # We're on a posix platform. Hooray! :)
12839     path="$BOOT_JDK"
12840 
12841     if test ! -f "$path" && test ! -d "$path"; then
12842       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12843     fi
12844 
12845     has_space=`$ECHO "$path" | $GREP " "`
12846     if test "x$has_space" != x; then
12847       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12848 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12849       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12850     fi
12851   fi
12852 
12853               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12854 $as_echo_n "checking for Boot JDK... " >&6; }
12855               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12856 $as_echo "$BOOT_JDK" >&6; }
12857               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12858 $as_echo_n "checking Boot JDK version... " >&6; }
12859               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12860               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12861 $as_echo "$BOOT_JDK_VERSION" >&6; }
12862             fi # end check jdk version
12863           fi # end check rt.jar
12864         fi # end check javac
12865       fi # end check java
12866     fi # end check boot jdk found
12867   fi
12868 
12869     done
12870   fi
12871 
12872   fi
12873 
12874 
12875     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12876     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12877       # Do we have a bin/java?
12878       if test ! -x "$BOOT_JDK/bin/java"; then
12879         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12880 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12881         BOOT_JDK_FOUND=no
12882       else
12883         # Do we have a bin/javac?
12884         if test ! -x "$BOOT_JDK/bin/javac"; then
12885           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12886 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12887           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12888 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12889           BOOT_JDK_FOUND=no
12890         else
12891           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12892           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12893             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12894 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12895             BOOT_JDK_FOUND=no
12896           else
12897             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12898             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12899 
12900             # Extra M4 quote needed to protect [] in grep expression.
12901             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12902             if test "x$FOUND_VERSION_78" = x; then
12903               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12904 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12905               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12906 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12907               BOOT_JDK_FOUND=no
12908             else
12909               # We're done! :-)
12910               BOOT_JDK_FOUND=yes
12911 
12912   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12913 
12914   # Input might be given as Windows format, start by converting to
12915   # unix format.
12916   path="$BOOT_JDK"
12917   new_path=`$CYGPATH -u "$path"`
12918 
12919   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12920   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12921   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12922   # "foo.exe" is OK but "foo" is an error.
12923   #
12924   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12925   # It is also a way to make sure we got the proper file name for the real test later on.
12926   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12927   if test "x$test_shortpath" = x; then
12928     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12929 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12930     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12931   fi
12932 
12933   # Call helper function which possibly converts this using DOS-style short mode.
12934   # If so, the updated path is stored in $new_path.
12935 
12936   input_path="$new_path"
12937   # Check if we need to convert this using DOS-style short mode. If the path
12938   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12939   # take no chances and rewrite it.
12940   # Note: m4 eats our [], so we need to use [ and ] instead.
12941   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12942   if test "x$has_forbidden_chars" != x; then
12943     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12944     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12945     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12946     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12947       # Going to short mode and back again did indeed matter. Since short mode is
12948       # case insensitive, let's make it lowercase to improve readability.
12949       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12950       # Now convert it back to Unix-stile (cygpath)
12951       input_path=`$CYGPATH -u "$shortmode_path"`
12952       new_path="$input_path"
12953     fi
12954   fi
12955 
12956   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12957   if test "x$test_cygdrive_prefix" = x; then
12958     # As a simple fix, exclude /usr/bin since it's not a real path.
12959     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12960       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12961       # a path prefixed by /cygdrive for fixpath to work.
12962       new_path="$CYGWIN_ROOT_PATH$input_path"
12963     fi
12964   fi
12965 
12966 
12967   if test "x$path" != "x$new_path"; then
12968     BOOT_JDK="$new_path"
12969     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12970 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12971   fi
12972 
12973   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12974 
12975   path="$BOOT_JDK"
12976   has_colon=`$ECHO $path | $GREP ^.:`
12977   new_path="$path"
12978   if test "x$has_colon" = x; then
12979     # Not in mixed or Windows style, start by that.
12980     new_path=`cmd //c echo $path`
12981   fi
12982 
12983 
12984   input_path="$new_path"
12985   # Check if we need to convert this using DOS-style short mode. If the path
12986   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12987   # take no chances and rewrite it.
12988   # Note: m4 eats our [], so we need to use [ and ] instead.
12989   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12990   if test "x$has_forbidden_chars" != x; then
12991     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12992     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12993   fi
12994 
12995 
12996   windows_path="$new_path"
12997   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12998     unix_path=`$CYGPATH -u "$windows_path"`
12999     new_path="$unix_path"
13000   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13001     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13002     new_path="$unix_path"
13003   fi
13004 
13005   if test "x$path" != "x$new_path"; then
13006     BOOT_JDK="$new_path"
13007     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13008 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13009   fi
13010 
13011   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13012   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13013 
13014   else
13015     # We're on a posix platform. Hooray! :)
13016     path="$BOOT_JDK"
13017 
13018     if test ! -f "$path" && test ! -d "$path"; then
13019       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13020     fi
13021 
13022     has_space=`$ECHO "$path" | $GREP " "`
13023     if test "x$has_space" != x; then
13024       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13025 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13026       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13027     fi
13028   fi
13029 
13030               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13031 $as_echo_n "checking for Boot JDK... " >&6; }
13032               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13033 $as_echo "$BOOT_JDK" >&6; }
13034               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13035 $as_echo_n "checking Boot JDK version... " >&6; }
13036               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13037               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13038 $as_echo "$BOOT_JDK_VERSION" >&6; }
13039             fi # end check jdk version
13040           fi # end check rt.jar
13041         fi # end check javac
13042       fi # end check java
13043     fi # end check boot jdk found
13044   fi
13045 
13046 
13047   if test "x$BOOT_JDK_FOUND" = xno; then
13048     # Now execute the test
13049 
13050   if test "x$PROGRAMFILES" != x; then
13051     VIRTUAL_DIR="$PROGRAMFILES/Java"
13052 
13053   windows_path="$VIRTUAL_DIR"
13054   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13055     unix_path=`$CYGPATH -u "$windows_path"`
13056     VIRTUAL_DIR="$unix_path"
13057   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13058     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13059     VIRTUAL_DIR="$unix_path"
13060   fi
13061 
13062 
13063   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13064   BOOT_JDK_SUFFIX=""
13065   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13066   if test "x$ALL_JDKS_FOUND" != x; then
13067     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13068 
13069   if test "x$BOOT_JDK_FOUND" = xno; then
13070     # Now execute the test
13071 
13072         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13073         if test -d "$BOOT_JDK"; then
13074           BOOT_JDK_FOUND=maybe
13075           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13076 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13077         fi
13078 
13079 
13080     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13081     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13082       # Do we have a bin/java?
13083       if test ! -x "$BOOT_JDK/bin/java"; then
13084         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13085 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13086         BOOT_JDK_FOUND=no
13087       else
13088         # Do we have a bin/javac?
13089         if test ! -x "$BOOT_JDK/bin/javac"; then
13090           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13091 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13092           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13093 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13094           BOOT_JDK_FOUND=no
13095         else
13096           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13097           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13098             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13099 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13100             BOOT_JDK_FOUND=no
13101           else
13102             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13103             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13104 
13105             # Extra M4 quote needed to protect [] in grep expression.
13106             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13107             if test "x$FOUND_VERSION_78" = x; then
13108               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13109 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13110               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13111 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13112               BOOT_JDK_FOUND=no
13113             else
13114               # We're done! :-)
13115               BOOT_JDK_FOUND=yes
13116 
13117   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13118 
13119   # Input might be given as Windows format, start by converting to
13120   # unix format.
13121   path="$BOOT_JDK"
13122   new_path=`$CYGPATH -u "$path"`
13123 
13124   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13125   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13126   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13127   # "foo.exe" is OK but "foo" is an error.
13128   #
13129   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13130   # It is also a way to make sure we got the proper file name for the real test later on.
13131   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13132   if test "x$test_shortpath" = x; then
13133     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13134 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13135     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13136   fi
13137 
13138   # Call helper function which possibly converts this using DOS-style short mode.
13139   # If so, the updated path is stored in $new_path.
13140 
13141   input_path="$new_path"
13142   # Check if we need to convert this using DOS-style short mode. If the path
13143   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13144   # take no chances and rewrite it.
13145   # Note: m4 eats our [], so we need to use [ and ] instead.
13146   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13147   if test "x$has_forbidden_chars" != x; then
13148     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13149     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13150     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13151     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13152       # Going to short mode and back again did indeed matter. Since short mode is
13153       # case insensitive, let's make it lowercase to improve readability.
13154       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13155       # Now convert it back to Unix-stile (cygpath)
13156       input_path=`$CYGPATH -u "$shortmode_path"`
13157       new_path="$input_path"
13158     fi
13159   fi
13160 
13161   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13162   if test "x$test_cygdrive_prefix" = x; then
13163     # As a simple fix, exclude /usr/bin since it's not a real path.
13164     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13165       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13166       # a path prefixed by /cygdrive for fixpath to work.
13167       new_path="$CYGWIN_ROOT_PATH$input_path"
13168     fi
13169   fi
13170 
13171 
13172   if test "x$path" != "x$new_path"; then
13173     BOOT_JDK="$new_path"
13174     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13175 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13176   fi
13177 
13178   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13179 
13180   path="$BOOT_JDK"
13181   has_colon=`$ECHO $path | $GREP ^.:`
13182   new_path="$path"
13183   if test "x$has_colon" = x; then
13184     # Not in mixed or Windows style, start by that.
13185     new_path=`cmd //c echo $path`
13186   fi
13187 
13188 
13189   input_path="$new_path"
13190   # Check if we need to convert this using DOS-style short mode. If the path
13191   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13192   # take no chances and rewrite it.
13193   # Note: m4 eats our [], so we need to use [ and ] instead.
13194   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13195   if test "x$has_forbidden_chars" != x; then
13196     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13197     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13198   fi
13199 
13200 
13201   windows_path="$new_path"
13202   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13203     unix_path=`$CYGPATH -u "$windows_path"`
13204     new_path="$unix_path"
13205   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13206     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13207     new_path="$unix_path"
13208   fi
13209 
13210   if test "x$path" != "x$new_path"; then
13211     BOOT_JDK="$new_path"
13212     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13213 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13214   fi
13215 
13216   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13217   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13218 
13219   else
13220     # We're on a posix platform. Hooray! :)
13221     path="$BOOT_JDK"
13222 
13223     if test ! -f "$path" && test ! -d "$path"; then
13224       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13225     fi
13226 
13227     has_space=`$ECHO "$path" | $GREP " "`
13228     if test "x$has_space" != x; then
13229       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13230 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13231       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13232     fi
13233   fi
13234 
13235               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13236 $as_echo_n "checking for Boot JDK... " >&6; }
13237               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13238 $as_echo "$BOOT_JDK" >&6; }
13239               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13240 $as_echo_n "checking Boot JDK version... " >&6; }
13241               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13242               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13243 $as_echo "$BOOT_JDK_VERSION" >&6; }
13244             fi # end check jdk version
13245           fi # end check rt.jar
13246         fi # end check javac
13247       fi # end check java
13248     fi # end check boot jdk found
13249   fi
13250 
13251     done
13252   fi
13253 
13254   fi
13255 
13256 
13257     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13258     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13259       # Do we have a bin/java?
13260       if test ! -x "$BOOT_JDK/bin/java"; then
13261         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13262 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13263         BOOT_JDK_FOUND=no
13264       else
13265         # Do we have a bin/javac?
13266         if test ! -x "$BOOT_JDK/bin/javac"; then
13267           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13268 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13269           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13270 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13271           BOOT_JDK_FOUND=no
13272         else
13273           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13274           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13275             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13276 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13277             BOOT_JDK_FOUND=no
13278           else
13279             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13280             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13281 
13282             # Extra M4 quote needed to protect [] in grep expression.
13283             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13284             if test "x$FOUND_VERSION_78" = x; then
13285               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13286 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13287               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13288 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13289               BOOT_JDK_FOUND=no
13290             else
13291               # We're done! :-)
13292               BOOT_JDK_FOUND=yes
13293 
13294   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13295 
13296   # Input might be given as Windows format, start by converting to
13297   # unix format.
13298   path="$BOOT_JDK"
13299   new_path=`$CYGPATH -u "$path"`
13300 
13301   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13302   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13303   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13304   # "foo.exe" is OK but "foo" is an error.
13305   #
13306   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13307   # It is also a way to make sure we got the proper file name for the real test later on.
13308   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13309   if test "x$test_shortpath" = x; then
13310     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13311 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13312     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13313   fi
13314 
13315   # Call helper function which possibly converts this using DOS-style short mode.
13316   # If so, the updated path is stored in $new_path.
13317 
13318   input_path="$new_path"
13319   # Check if we need to convert this using DOS-style short mode. If the path
13320   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13321   # take no chances and rewrite it.
13322   # Note: m4 eats our [], so we need to use [ and ] instead.
13323   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13324   if test "x$has_forbidden_chars" != x; then
13325     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13326     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13327     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13328     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13329       # Going to short mode and back again did indeed matter. Since short mode is
13330       # case insensitive, let's make it lowercase to improve readability.
13331       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13332       # Now convert it back to Unix-stile (cygpath)
13333       input_path=`$CYGPATH -u "$shortmode_path"`
13334       new_path="$input_path"
13335     fi
13336   fi
13337 
13338   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13339   if test "x$test_cygdrive_prefix" = x; then
13340     # As a simple fix, exclude /usr/bin since it's not a real path.
13341     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13342       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13343       # a path prefixed by /cygdrive for fixpath to work.
13344       new_path="$CYGWIN_ROOT_PATH$input_path"
13345     fi
13346   fi
13347 
13348 
13349   if test "x$path" != "x$new_path"; then
13350     BOOT_JDK="$new_path"
13351     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13352 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13353   fi
13354 
13355   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13356 
13357   path="$BOOT_JDK"
13358   has_colon=`$ECHO $path | $GREP ^.:`
13359   new_path="$path"
13360   if test "x$has_colon" = x; then
13361     # Not in mixed or Windows style, start by that.
13362     new_path=`cmd //c echo $path`
13363   fi
13364 
13365 
13366   input_path="$new_path"
13367   # Check if we need to convert this using DOS-style short mode. If the path
13368   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13369   # take no chances and rewrite it.
13370   # Note: m4 eats our [], so we need to use [ and ] instead.
13371   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13372   if test "x$has_forbidden_chars" != x; then
13373     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13374     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13375   fi
13376 
13377 
13378   windows_path="$new_path"
13379   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13380     unix_path=`$CYGPATH -u "$windows_path"`
13381     new_path="$unix_path"
13382   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13383     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13384     new_path="$unix_path"
13385   fi
13386 
13387   if test "x$path" != "x$new_path"; then
13388     BOOT_JDK="$new_path"
13389     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13390 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13391   fi
13392 
13393   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13394   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13395 
13396   else
13397     # We're on a posix platform. Hooray! :)
13398     path="$BOOT_JDK"
13399 
13400     if test ! -f "$path" && test ! -d "$path"; then
13401       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13402     fi
13403 
13404     has_space=`$ECHO "$path" | $GREP " "`
13405     if test "x$has_space" != x; then
13406       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13407 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13408       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13409     fi
13410   fi
13411 
13412               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13413 $as_echo_n "checking for Boot JDK... " >&6; }
13414               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13415 $as_echo "$BOOT_JDK" >&6; }
13416               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13417 $as_echo_n "checking Boot JDK version... " >&6; }
13418               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13419               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13420 $as_echo "$BOOT_JDK_VERSION" >&6; }
13421             fi # end check jdk version
13422           fi # end check rt.jar
13423         fi # end check javac
13424       fi # end check java
13425     fi # end check boot jdk found
13426   fi
13427 
13428 
13429   if test "x$BOOT_JDK_FOUND" = xno; then
13430     # Now execute the test
13431 
13432   if test "x$ProgramFiles" != x; then
13433     VIRTUAL_DIR="$ProgramFiles/Java"
13434 
13435   windows_path="$VIRTUAL_DIR"
13436   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13437     unix_path=`$CYGPATH -u "$windows_path"`
13438     VIRTUAL_DIR="$unix_path"
13439   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13440     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13441     VIRTUAL_DIR="$unix_path"
13442   fi
13443 
13444 
13445   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13446   BOOT_JDK_SUFFIX=""
13447   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13448   if test "x$ALL_JDKS_FOUND" != x; then
13449     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13450 
13451   if test "x$BOOT_JDK_FOUND" = xno; then
13452     # Now execute the test
13453 
13454         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13455         if test -d "$BOOT_JDK"; then
13456           BOOT_JDK_FOUND=maybe
13457           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13458 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13459         fi
13460 
13461 
13462     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13463     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13464       # Do we have a bin/java?
13465       if test ! -x "$BOOT_JDK/bin/java"; then
13466         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13467 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13468         BOOT_JDK_FOUND=no
13469       else
13470         # Do we have a bin/javac?
13471         if test ! -x "$BOOT_JDK/bin/javac"; then
13472           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13473 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13474           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13475 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13476           BOOT_JDK_FOUND=no
13477         else
13478           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13479           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13480             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13481 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13482             BOOT_JDK_FOUND=no
13483           else
13484             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13485             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13486 
13487             # Extra M4 quote needed to protect [] in grep expression.
13488             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13489             if test "x$FOUND_VERSION_78" = x; then
13490               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13491 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13492               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13493 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13494               BOOT_JDK_FOUND=no
13495             else
13496               # We're done! :-)
13497               BOOT_JDK_FOUND=yes
13498 
13499   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13500 
13501   # Input might be given as Windows format, start by converting to
13502   # unix format.
13503   path="$BOOT_JDK"
13504   new_path=`$CYGPATH -u "$path"`
13505 
13506   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13507   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13508   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13509   # "foo.exe" is OK but "foo" is an error.
13510   #
13511   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13512   # It is also a way to make sure we got the proper file name for the real test later on.
13513   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13514   if test "x$test_shortpath" = x; then
13515     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13516 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13517     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13518   fi
13519 
13520   # Call helper function which possibly converts this using DOS-style short mode.
13521   # If so, the updated path is stored in $new_path.
13522 
13523   input_path="$new_path"
13524   # Check if we need to convert this using DOS-style short mode. If the path
13525   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13526   # take no chances and rewrite it.
13527   # Note: m4 eats our [], so we need to use [ and ] instead.
13528   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13529   if test "x$has_forbidden_chars" != x; then
13530     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13531     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13532     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13533     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13534       # Going to short mode and back again did indeed matter. Since short mode is
13535       # case insensitive, let's make it lowercase to improve readability.
13536       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13537       # Now convert it back to Unix-stile (cygpath)
13538       input_path=`$CYGPATH -u "$shortmode_path"`
13539       new_path="$input_path"
13540     fi
13541   fi
13542 
13543   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13544   if test "x$test_cygdrive_prefix" = x; then
13545     # As a simple fix, exclude /usr/bin since it's not a real path.
13546     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13547       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13548       # a path prefixed by /cygdrive for fixpath to work.
13549       new_path="$CYGWIN_ROOT_PATH$input_path"
13550     fi
13551   fi
13552 
13553 
13554   if test "x$path" != "x$new_path"; then
13555     BOOT_JDK="$new_path"
13556     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13557 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13558   fi
13559 
13560   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13561 
13562   path="$BOOT_JDK"
13563   has_colon=`$ECHO $path | $GREP ^.:`
13564   new_path="$path"
13565   if test "x$has_colon" = x; then
13566     # Not in mixed or Windows style, start by that.
13567     new_path=`cmd //c echo $path`
13568   fi
13569 
13570 
13571   input_path="$new_path"
13572   # Check if we need to convert this using DOS-style short mode. If the path
13573   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13574   # take no chances and rewrite it.
13575   # Note: m4 eats our [], so we need to use [ and ] instead.
13576   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13577   if test "x$has_forbidden_chars" != x; then
13578     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13579     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13580   fi
13581 
13582 
13583   windows_path="$new_path"
13584   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13585     unix_path=`$CYGPATH -u "$windows_path"`
13586     new_path="$unix_path"
13587   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13588     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13589     new_path="$unix_path"
13590   fi
13591 
13592   if test "x$path" != "x$new_path"; then
13593     BOOT_JDK="$new_path"
13594     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13595 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13596   fi
13597 
13598   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13599   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13600 
13601   else
13602     # We're on a posix platform. Hooray! :)
13603     path="$BOOT_JDK"
13604 
13605     if test ! -f "$path" && test ! -d "$path"; then
13606       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13607     fi
13608 
13609     has_space=`$ECHO "$path" | $GREP " "`
13610     if test "x$has_space" != x; then
13611       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13612 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13613       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13614     fi
13615   fi
13616 
13617               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13618 $as_echo_n "checking for Boot JDK... " >&6; }
13619               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13620 $as_echo "$BOOT_JDK" >&6; }
13621               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13622 $as_echo_n "checking Boot JDK version... " >&6; }
13623               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13624               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13625 $as_echo "$BOOT_JDK_VERSION" >&6; }
13626             fi # end check jdk version
13627           fi # end check rt.jar
13628         fi # end check javac
13629       fi # end check java
13630     fi # end check boot jdk found
13631   fi
13632 
13633     done
13634   fi
13635 
13636   fi
13637 
13638 
13639     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13640     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13641       # Do we have a bin/java?
13642       if test ! -x "$BOOT_JDK/bin/java"; then
13643         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13644 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13645         BOOT_JDK_FOUND=no
13646       else
13647         # Do we have a bin/javac?
13648         if test ! -x "$BOOT_JDK/bin/javac"; then
13649           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13650 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13651           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13652 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13653           BOOT_JDK_FOUND=no
13654         else
13655           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13656           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13657             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13658 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13659             BOOT_JDK_FOUND=no
13660           else
13661             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13662             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13663 
13664             # Extra M4 quote needed to protect [] in grep expression.
13665             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13666             if test "x$FOUND_VERSION_78" = x; then
13667               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13668 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13669               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13670 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13671               BOOT_JDK_FOUND=no
13672             else
13673               # We're done! :-)
13674               BOOT_JDK_FOUND=yes
13675 
13676   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13677 
13678   # Input might be given as Windows format, start by converting to
13679   # unix format.
13680   path="$BOOT_JDK"
13681   new_path=`$CYGPATH -u "$path"`
13682 
13683   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13684   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13685   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13686   # "foo.exe" is OK but "foo" is an error.
13687   #
13688   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13689   # It is also a way to make sure we got the proper file name for the real test later on.
13690   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13691   if test "x$test_shortpath" = x; then
13692     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13693 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13694     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13695   fi
13696 
13697   # Call helper function which possibly converts this using DOS-style short mode.
13698   # If so, the updated path is stored in $new_path.
13699 
13700   input_path="$new_path"
13701   # Check if we need to convert this using DOS-style short mode. If the path
13702   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13703   # take no chances and rewrite it.
13704   # Note: m4 eats our [], so we need to use [ and ] instead.
13705   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13706   if test "x$has_forbidden_chars" != x; then
13707     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13708     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13709     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13710     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13711       # Going to short mode and back again did indeed matter. Since short mode is
13712       # case insensitive, let's make it lowercase to improve readability.
13713       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13714       # Now convert it back to Unix-stile (cygpath)
13715       input_path=`$CYGPATH -u "$shortmode_path"`
13716       new_path="$input_path"
13717     fi
13718   fi
13719 
13720   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13721   if test "x$test_cygdrive_prefix" = x; then
13722     # As a simple fix, exclude /usr/bin since it's not a real path.
13723     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13724       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13725       # a path prefixed by /cygdrive for fixpath to work.
13726       new_path="$CYGWIN_ROOT_PATH$input_path"
13727     fi
13728   fi
13729 
13730 
13731   if test "x$path" != "x$new_path"; then
13732     BOOT_JDK="$new_path"
13733     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13734 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13735   fi
13736 
13737   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13738 
13739   path="$BOOT_JDK"
13740   has_colon=`$ECHO $path | $GREP ^.:`
13741   new_path="$path"
13742   if test "x$has_colon" = x; then
13743     # Not in mixed or Windows style, start by that.
13744     new_path=`cmd //c echo $path`
13745   fi
13746 
13747 
13748   input_path="$new_path"
13749   # Check if we need to convert this using DOS-style short mode. If the path
13750   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13751   # take no chances and rewrite it.
13752   # Note: m4 eats our [], so we need to use [ and ] instead.
13753   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13754   if test "x$has_forbidden_chars" != x; then
13755     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13756     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13757   fi
13758 
13759 
13760   windows_path="$new_path"
13761   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13762     unix_path=`$CYGPATH -u "$windows_path"`
13763     new_path="$unix_path"
13764   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13765     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13766     new_path="$unix_path"
13767   fi
13768 
13769   if test "x$path" != "x$new_path"; then
13770     BOOT_JDK="$new_path"
13771     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13772 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13773   fi
13774 
13775   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13776   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13777 
13778   else
13779     # We're on a posix platform. Hooray! :)
13780     path="$BOOT_JDK"
13781 
13782     if test ! -f "$path" && test ! -d "$path"; then
13783       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13784     fi
13785 
13786     has_space=`$ECHO "$path" | $GREP " "`
13787     if test "x$has_space" != x; then
13788       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13789 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13790       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13791     fi
13792   fi
13793 
13794               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13795 $as_echo_n "checking for Boot JDK... " >&6; }
13796               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13797 $as_echo "$BOOT_JDK" >&6; }
13798               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13799 $as_echo_n "checking Boot JDK version... " >&6; }
13800               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13801               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13802 $as_echo "$BOOT_JDK_VERSION" >&6; }
13803             fi # end check jdk version
13804           fi # end check rt.jar
13805         fi # end check javac
13806       fi # end check java
13807     fi # end check boot jdk found
13808   fi
13809 
13810 
13811   if test "x$BOOT_JDK_FOUND" = xno; then
13812     # Now execute the test
13813 
13814   BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13815   BOOT_JDK_SUFFIX=""
13816   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13817   if test "x$ALL_JDKS_FOUND" != x; then
13818     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13819 
13820   if test "x$BOOT_JDK_FOUND" = xno; then
13821     # Now execute the test
13822 
13823         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13824         if test -d "$BOOT_JDK"; then
13825           BOOT_JDK_FOUND=maybe
13826           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13827 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13828         fi
13829 
13830 
13831     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13832     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13833       # Do we have a bin/java?
13834       if test ! -x "$BOOT_JDK/bin/java"; then
13835         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13836 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13837         BOOT_JDK_FOUND=no
13838       else
13839         # Do we have a bin/javac?
13840         if test ! -x "$BOOT_JDK/bin/javac"; then
13841           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13842 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13843           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13844 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13845           BOOT_JDK_FOUND=no
13846         else
13847           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13848           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13849             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13850 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13851             BOOT_JDK_FOUND=no
13852           else
13853             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13854             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13855 
13856             # Extra M4 quote needed to protect [] in grep expression.
13857             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13858             if test "x$FOUND_VERSION_78" = x; then
13859               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13860 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13861               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13862 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13863               BOOT_JDK_FOUND=no
13864             else
13865               # We're done! :-)
13866               BOOT_JDK_FOUND=yes
13867 
13868   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13869 
13870   # Input might be given as Windows format, start by converting to
13871   # unix format.
13872   path="$BOOT_JDK"
13873   new_path=`$CYGPATH -u "$path"`
13874 
13875   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13876   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13877   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13878   # "foo.exe" is OK but "foo" is an error.
13879   #
13880   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13881   # It is also a way to make sure we got the proper file name for the real test later on.
13882   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13883   if test "x$test_shortpath" = x; then
13884     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13885 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13886     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13887   fi
13888 
13889   # Call helper function which possibly converts this using DOS-style short mode.
13890   # If so, the updated path is stored in $new_path.
13891 
13892   input_path="$new_path"
13893   # Check if we need to convert this using DOS-style short mode. If the path
13894   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13895   # take no chances and rewrite it.
13896   # Note: m4 eats our [], so we need to use [ and ] instead.
13897   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13898   if test "x$has_forbidden_chars" != x; then
13899     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13900     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13901     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13902     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13903       # Going to short mode and back again did indeed matter. Since short mode is
13904       # case insensitive, let's make it lowercase to improve readability.
13905       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13906       # Now convert it back to Unix-stile (cygpath)
13907       input_path=`$CYGPATH -u "$shortmode_path"`
13908       new_path="$input_path"
13909     fi
13910   fi
13911 
13912   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13913   if test "x$test_cygdrive_prefix" = x; then
13914     # As a simple fix, exclude /usr/bin since it's not a real path.
13915     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13916       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13917       # a path prefixed by /cygdrive for fixpath to work.
13918       new_path="$CYGWIN_ROOT_PATH$input_path"
13919     fi
13920   fi
13921 
13922 
13923   if test "x$path" != "x$new_path"; then
13924     BOOT_JDK="$new_path"
13925     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13926 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13927   fi
13928 
13929   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13930 
13931   path="$BOOT_JDK"
13932   has_colon=`$ECHO $path | $GREP ^.:`
13933   new_path="$path"
13934   if test "x$has_colon" = x; then
13935     # Not in mixed or Windows style, start by that.
13936     new_path=`cmd //c echo $path`
13937   fi
13938 
13939 
13940   input_path="$new_path"
13941   # Check if we need to convert this using DOS-style short mode. If the path
13942   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13943   # take no chances and rewrite it.
13944   # Note: m4 eats our [], so we need to use [ and ] instead.
13945   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13946   if test "x$has_forbidden_chars" != x; then
13947     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13948     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13949   fi
13950 
13951 
13952   windows_path="$new_path"
13953   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13954     unix_path=`$CYGPATH -u "$windows_path"`
13955     new_path="$unix_path"
13956   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13957     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13958     new_path="$unix_path"
13959   fi
13960 
13961   if test "x$path" != "x$new_path"; then
13962     BOOT_JDK="$new_path"
13963     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13964 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13965   fi
13966 
13967   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13968   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13969 
13970   else
13971     # We're on a posix platform. Hooray! :)
13972     path="$BOOT_JDK"
13973 
13974     if test ! -f "$path" && test ! -d "$path"; then
13975       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13976     fi
13977 
13978     has_space=`$ECHO "$path" | $GREP " "`
13979     if test "x$has_space" != x; then
13980       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13981 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13982       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13983     fi
13984   fi
13985 
13986               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13987 $as_echo_n "checking for Boot JDK... " >&6; }
13988               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13989 $as_echo "$BOOT_JDK" >&6; }
13990               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13991 $as_echo_n "checking Boot JDK version... " >&6; }
13992               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13993               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13994 $as_echo "$BOOT_JDK_VERSION" >&6; }
13995             fi # end check jdk version
13996           fi # end check rt.jar
13997         fi # end check javac
13998       fi # end check java
13999     fi # end check boot jdk found
14000   fi
14001 
14002     done
14003   fi
14004 
14005 
14006     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14007     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14008       # Do we have a bin/java?
14009       if test ! -x "$BOOT_JDK/bin/java"; then
14010         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14011 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14012         BOOT_JDK_FOUND=no
14013       else
14014         # Do we have a bin/javac?
14015         if test ! -x "$BOOT_JDK/bin/javac"; then
14016           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14017 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14018           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14019 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14020           BOOT_JDK_FOUND=no
14021         else
14022           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14023           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14024             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14025 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14026             BOOT_JDK_FOUND=no
14027           else
14028             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14029             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14030 
14031             # Extra M4 quote needed to protect [] in grep expression.
14032             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14033             if test "x$FOUND_VERSION_78" = x; then
14034               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14035 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14036               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14037 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14038               BOOT_JDK_FOUND=no
14039             else
14040               # We're done! :-)
14041               BOOT_JDK_FOUND=yes
14042 
14043   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14044 
14045   # Input might be given as Windows format, start by converting to
14046   # unix format.
14047   path="$BOOT_JDK"
14048   new_path=`$CYGPATH -u "$path"`
14049 
14050   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14051   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14052   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14053   # "foo.exe" is OK but "foo" is an error.
14054   #
14055   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14056   # It is also a way to make sure we got the proper file name for the real test later on.
14057   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14058   if test "x$test_shortpath" = x; then
14059     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14060 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14061     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14062   fi
14063 
14064   # Call helper function which possibly converts this using DOS-style short mode.
14065   # If so, the updated path is stored in $new_path.
14066 
14067   input_path="$new_path"
14068   # Check if we need to convert this using DOS-style short mode. If the path
14069   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14070   # take no chances and rewrite it.
14071   # Note: m4 eats our [], so we need to use [ and ] instead.
14072   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14073   if test "x$has_forbidden_chars" != x; then
14074     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14075     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14076     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14077     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14078       # Going to short mode and back again did indeed matter. Since short mode is
14079       # case insensitive, let's make it lowercase to improve readability.
14080       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14081       # Now convert it back to Unix-stile (cygpath)
14082       input_path=`$CYGPATH -u "$shortmode_path"`
14083       new_path="$input_path"
14084     fi
14085   fi
14086 
14087   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14088   if test "x$test_cygdrive_prefix" = x; then
14089     # As a simple fix, exclude /usr/bin since it's not a real path.
14090     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14091       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14092       # a path prefixed by /cygdrive for fixpath to work.
14093       new_path="$CYGWIN_ROOT_PATH$input_path"
14094     fi
14095   fi
14096 
14097 
14098   if test "x$path" != "x$new_path"; then
14099     BOOT_JDK="$new_path"
14100     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14101 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14102   fi
14103 
14104   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14105 
14106   path="$BOOT_JDK"
14107   has_colon=`$ECHO $path | $GREP ^.:`
14108   new_path="$path"
14109   if test "x$has_colon" = x; then
14110     # Not in mixed or Windows style, start by that.
14111     new_path=`cmd //c echo $path`
14112   fi
14113 
14114 
14115   input_path="$new_path"
14116   # Check if we need to convert this using DOS-style short mode. If the path
14117   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14118   # take no chances and rewrite it.
14119   # Note: m4 eats our [], so we need to use [ and ] instead.
14120   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14121   if test "x$has_forbidden_chars" != x; then
14122     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14123     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14124   fi
14125 
14126 
14127   windows_path="$new_path"
14128   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14129     unix_path=`$CYGPATH -u "$windows_path"`
14130     new_path="$unix_path"
14131   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14132     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14133     new_path="$unix_path"
14134   fi
14135 
14136   if test "x$path" != "x$new_path"; then
14137     BOOT_JDK="$new_path"
14138     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14139 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14140   fi
14141 
14142   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14143   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14144 
14145   else
14146     # We're on a posix platform. Hooray! :)
14147     path="$BOOT_JDK"
14148 
14149     if test ! -f "$path" && test ! -d "$path"; then
14150       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14151     fi
14152 
14153     has_space=`$ECHO "$path" | $GREP " "`
14154     if test "x$has_space" != x; then
14155       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14156 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14157       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14158     fi
14159   fi
14160 
14161               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14162 $as_echo_n "checking for Boot JDK... " >&6; }
14163               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14164 $as_echo "$BOOT_JDK" >&6; }
14165               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14166 $as_echo_n "checking Boot JDK version... " >&6; }
14167               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14168               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14169 $as_echo "$BOOT_JDK_VERSION" >&6; }
14170             fi # end check jdk version
14171           fi # end check rt.jar
14172         fi # end check javac
14173       fi # end check java
14174     fi # end check boot jdk found
14175   fi
14176 
14177   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14178 
14179   if test "x$BOOT_JDK_FOUND" = xno; then
14180     # Now execute the test
14181 
14182   BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14183   BOOT_JDK_SUFFIX="/Contents/Home"
14184   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14185   if test "x$ALL_JDKS_FOUND" != x; then
14186     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14187 
14188   if test "x$BOOT_JDK_FOUND" = xno; then
14189     # Now execute the test
14190 
14191         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14192         if test -d "$BOOT_JDK"; then
14193           BOOT_JDK_FOUND=maybe
14194           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14195 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14196         fi
14197 
14198 
14199     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14200     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14201       # Do we have a bin/java?
14202       if test ! -x "$BOOT_JDK/bin/java"; then
14203         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14204 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14205         BOOT_JDK_FOUND=no
14206       else
14207         # Do we have a bin/javac?
14208         if test ! -x "$BOOT_JDK/bin/javac"; then
14209           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14210 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14211           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14212 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14213           BOOT_JDK_FOUND=no
14214         else
14215           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14216           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14217             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14218 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14219             BOOT_JDK_FOUND=no
14220           else
14221             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14222             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14223 
14224             # Extra M4 quote needed to protect [] in grep expression.
14225             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14226             if test "x$FOUND_VERSION_78" = x; then
14227               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14228 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14229               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14230 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14231               BOOT_JDK_FOUND=no
14232             else
14233               # We're done! :-)
14234               BOOT_JDK_FOUND=yes
14235 
14236   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14237 
14238   # Input might be given as Windows format, start by converting to
14239   # unix format.
14240   path="$BOOT_JDK"
14241   new_path=`$CYGPATH -u "$path"`
14242 
14243   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14244   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14245   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14246   # "foo.exe" is OK but "foo" is an error.
14247   #
14248   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14249   # It is also a way to make sure we got the proper file name for the real test later on.
14250   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14251   if test "x$test_shortpath" = x; then
14252     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14253 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14254     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14255   fi
14256 
14257   # Call helper function which possibly converts this using DOS-style short mode.
14258   # If so, the updated path is stored in $new_path.
14259 
14260   input_path="$new_path"
14261   # Check if we need to convert this using DOS-style short mode. If the path
14262   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14263   # take no chances and rewrite it.
14264   # Note: m4 eats our [], so we need to use [ and ] instead.
14265   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14266   if test "x$has_forbidden_chars" != x; then
14267     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14268     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14269     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14270     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14271       # Going to short mode and back again did indeed matter. Since short mode is
14272       # case insensitive, let's make it lowercase to improve readability.
14273       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14274       # Now convert it back to Unix-stile (cygpath)
14275       input_path=`$CYGPATH -u "$shortmode_path"`
14276       new_path="$input_path"
14277     fi
14278   fi
14279 
14280   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14281   if test "x$test_cygdrive_prefix" = x; then
14282     # As a simple fix, exclude /usr/bin since it's not a real path.
14283     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14284       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14285       # a path prefixed by /cygdrive for fixpath to work.
14286       new_path="$CYGWIN_ROOT_PATH$input_path"
14287     fi
14288   fi
14289 
14290 
14291   if test "x$path" != "x$new_path"; then
14292     BOOT_JDK="$new_path"
14293     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14294 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14295   fi
14296 
14297   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14298 
14299   path="$BOOT_JDK"
14300   has_colon=`$ECHO $path | $GREP ^.:`
14301   new_path="$path"
14302   if test "x$has_colon" = x; then
14303     # Not in mixed or Windows style, start by that.
14304     new_path=`cmd //c echo $path`
14305   fi
14306 
14307 
14308   input_path="$new_path"
14309   # Check if we need to convert this using DOS-style short mode. If the path
14310   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14311   # take no chances and rewrite it.
14312   # Note: m4 eats our [], so we need to use [ and ] instead.
14313   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14314   if test "x$has_forbidden_chars" != x; then
14315     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14316     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14317   fi
14318 
14319 
14320   windows_path="$new_path"
14321   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14322     unix_path=`$CYGPATH -u "$windows_path"`
14323     new_path="$unix_path"
14324   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14325     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14326     new_path="$unix_path"
14327   fi
14328 
14329   if test "x$path" != "x$new_path"; then
14330     BOOT_JDK="$new_path"
14331     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14332 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14333   fi
14334 
14335   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14336   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14337 
14338   else
14339     # We're on a posix platform. Hooray! :)
14340     path="$BOOT_JDK"
14341 
14342     if test ! -f "$path" && test ! -d "$path"; then
14343       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14344     fi
14345 
14346     has_space=`$ECHO "$path" | $GREP " "`
14347     if test "x$has_space" != x; then
14348       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14349 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14350       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14351     fi
14352   fi
14353 
14354               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14355 $as_echo_n "checking for Boot JDK... " >&6; }
14356               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14357 $as_echo "$BOOT_JDK" >&6; }
14358               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14359 $as_echo_n "checking Boot JDK version... " >&6; }
14360               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14361               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14362 $as_echo "$BOOT_JDK_VERSION" >&6; }
14363             fi # end check jdk version
14364           fi # end check rt.jar
14365         fi # end check javac
14366       fi # end check java
14367     fi # end check boot jdk found
14368   fi
14369 
14370     done
14371   fi
14372 
14373 
14374     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14375     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14376       # Do we have a bin/java?
14377       if test ! -x "$BOOT_JDK/bin/java"; then
14378         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14379 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14380         BOOT_JDK_FOUND=no
14381       else
14382         # Do we have a bin/javac?
14383         if test ! -x "$BOOT_JDK/bin/javac"; then
14384           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14385 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14386           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14387 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14388           BOOT_JDK_FOUND=no
14389         else
14390           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14391           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14392             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14393 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14394             BOOT_JDK_FOUND=no
14395           else
14396             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14397             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14398 
14399             # Extra M4 quote needed to protect [] in grep expression.
14400             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14401             if test "x$FOUND_VERSION_78" = x; then
14402               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14403 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14404               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14405 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14406               BOOT_JDK_FOUND=no
14407             else
14408               # We're done! :-)
14409               BOOT_JDK_FOUND=yes
14410 
14411   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14412 
14413   # Input might be given as Windows format, start by converting to
14414   # unix format.
14415   path="$BOOT_JDK"
14416   new_path=`$CYGPATH -u "$path"`
14417 
14418   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14419   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14420   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14421   # "foo.exe" is OK but "foo" is an error.
14422   #
14423   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14424   # It is also a way to make sure we got the proper file name for the real test later on.
14425   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14426   if test "x$test_shortpath" = x; then
14427     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14428 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14429     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14430   fi
14431 
14432   # Call helper function which possibly converts this using DOS-style short mode.
14433   # If so, the updated path is stored in $new_path.
14434 
14435   input_path="$new_path"
14436   # Check if we need to convert this using DOS-style short mode. If the path
14437   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14438   # take no chances and rewrite it.
14439   # Note: m4 eats our [], so we need to use [ and ] instead.
14440   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14441   if test "x$has_forbidden_chars" != x; then
14442     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14443     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14444     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14445     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14446       # Going to short mode and back again did indeed matter. Since short mode is
14447       # case insensitive, let's make it lowercase to improve readability.
14448       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14449       # Now convert it back to Unix-stile (cygpath)
14450       input_path=`$CYGPATH -u "$shortmode_path"`
14451       new_path="$input_path"
14452     fi
14453   fi
14454 
14455   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14456   if test "x$test_cygdrive_prefix" = x; then
14457     # As a simple fix, exclude /usr/bin since it's not a real path.
14458     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14459       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14460       # a path prefixed by /cygdrive for fixpath to work.
14461       new_path="$CYGWIN_ROOT_PATH$input_path"
14462     fi
14463   fi
14464 
14465 
14466   if test "x$path" != "x$new_path"; then
14467     BOOT_JDK="$new_path"
14468     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14469 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14470   fi
14471 
14472   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14473 
14474   path="$BOOT_JDK"
14475   has_colon=`$ECHO $path | $GREP ^.:`
14476   new_path="$path"
14477   if test "x$has_colon" = x; then
14478     # Not in mixed or Windows style, start by that.
14479     new_path=`cmd //c echo $path`
14480   fi
14481 
14482 
14483   input_path="$new_path"
14484   # Check if we need to convert this using DOS-style short mode. If the path
14485   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14486   # take no chances and rewrite it.
14487   # Note: m4 eats our [], so we need to use [ and ] instead.
14488   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14489   if test "x$has_forbidden_chars" != x; then
14490     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14491     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14492   fi
14493 
14494 
14495   windows_path="$new_path"
14496   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14497     unix_path=`$CYGPATH -u "$windows_path"`
14498     new_path="$unix_path"
14499   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14500     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14501     new_path="$unix_path"
14502   fi
14503 
14504   if test "x$path" != "x$new_path"; then
14505     BOOT_JDK="$new_path"
14506     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14507 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14508   fi
14509 
14510   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14511   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14512 
14513   else
14514     # We're on a posix platform. Hooray! :)
14515     path="$BOOT_JDK"
14516 
14517     if test ! -f "$path" && test ! -d "$path"; then
14518       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14519     fi
14520 
14521     has_space=`$ECHO "$path" | $GREP " "`
14522     if test "x$has_space" != x; then
14523       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14524 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14525       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14526     fi
14527   fi
14528 
14529               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14530 $as_echo_n "checking for Boot JDK... " >&6; }
14531               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14532 $as_echo "$BOOT_JDK" >&6; }
14533               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14534 $as_echo_n "checking Boot JDK version... " >&6; }
14535               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14536               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14537 $as_echo "$BOOT_JDK_VERSION" >&6; }
14538             fi # end check jdk version
14539           fi # end check rt.jar
14540         fi # end check javac
14541       fi # end check java
14542     fi # end check boot jdk found
14543   fi
14544 
14545 
14546   if test "x$BOOT_JDK_FOUND" = xno; then
14547     # Now execute the test
14548 
14549   BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14550   BOOT_JDK_SUFFIX="/Contents/Home"
14551   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14552   if test "x$ALL_JDKS_FOUND" != x; then
14553     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14554 
14555   if test "x$BOOT_JDK_FOUND" = xno; then
14556     # Now execute the test
14557 
14558         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14559         if test -d "$BOOT_JDK"; then
14560           BOOT_JDK_FOUND=maybe
14561           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14562 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14563         fi
14564 
14565 
14566     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14567     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14568       # Do we have a bin/java?
14569       if test ! -x "$BOOT_JDK/bin/java"; then
14570         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14571 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14572         BOOT_JDK_FOUND=no
14573       else
14574         # Do we have a bin/javac?
14575         if test ! -x "$BOOT_JDK/bin/javac"; then
14576           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14577 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14578           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14579 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14580           BOOT_JDK_FOUND=no
14581         else
14582           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14583           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14584             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14585 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14586             BOOT_JDK_FOUND=no
14587           else
14588             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14589             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14590 
14591             # Extra M4 quote needed to protect [] in grep expression.
14592             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14593             if test "x$FOUND_VERSION_78" = x; then
14594               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14595 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14596               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14597 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14598               BOOT_JDK_FOUND=no
14599             else
14600               # We're done! :-)
14601               BOOT_JDK_FOUND=yes
14602 
14603   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14604 
14605   # Input might be given as Windows format, start by converting to
14606   # unix format.
14607   path="$BOOT_JDK"
14608   new_path=`$CYGPATH -u "$path"`
14609 
14610   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14611   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14612   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14613   # "foo.exe" is OK but "foo" is an error.
14614   #
14615   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14616   # It is also a way to make sure we got the proper file name for the real test later on.
14617   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14618   if test "x$test_shortpath" = x; then
14619     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14620 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14621     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14622   fi
14623 
14624   # Call helper function which possibly converts this using DOS-style short mode.
14625   # If so, the updated path is stored in $new_path.
14626 
14627   input_path="$new_path"
14628   # Check if we need to convert this using DOS-style short mode. If the path
14629   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14630   # take no chances and rewrite it.
14631   # Note: m4 eats our [], so we need to use [ and ] instead.
14632   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14633   if test "x$has_forbidden_chars" != x; then
14634     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14635     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14636     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14637     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14638       # Going to short mode and back again did indeed matter. Since short mode is
14639       # case insensitive, let's make it lowercase to improve readability.
14640       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14641       # Now convert it back to Unix-stile (cygpath)
14642       input_path=`$CYGPATH -u "$shortmode_path"`
14643       new_path="$input_path"
14644     fi
14645   fi
14646 
14647   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14648   if test "x$test_cygdrive_prefix" = x; then
14649     # As a simple fix, exclude /usr/bin since it's not a real path.
14650     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14651       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14652       # a path prefixed by /cygdrive for fixpath to work.
14653       new_path="$CYGWIN_ROOT_PATH$input_path"
14654     fi
14655   fi
14656 
14657 
14658   if test "x$path" != "x$new_path"; then
14659     BOOT_JDK="$new_path"
14660     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14661 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14662   fi
14663 
14664   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14665 
14666   path="$BOOT_JDK"
14667   has_colon=`$ECHO $path | $GREP ^.:`
14668   new_path="$path"
14669   if test "x$has_colon" = x; then
14670     # Not in mixed or Windows style, start by that.
14671     new_path=`cmd //c echo $path`
14672   fi
14673 
14674 
14675   input_path="$new_path"
14676   # Check if we need to convert this using DOS-style short mode. If the path
14677   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14678   # take no chances and rewrite it.
14679   # Note: m4 eats our [], so we need to use [ and ] instead.
14680   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14681   if test "x$has_forbidden_chars" != x; then
14682     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14683     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14684   fi
14685 
14686 
14687   windows_path="$new_path"
14688   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14689     unix_path=`$CYGPATH -u "$windows_path"`
14690     new_path="$unix_path"
14691   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14692     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14693     new_path="$unix_path"
14694   fi
14695 
14696   if test "x$path" != "x$new_path"; then
14697     BOOT_JDK="$new_path"
14698     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14699 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14700   fi
14701 
14702   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14703   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14704 
14705   else
14706     # We're on a posix platform. Hooray! :)
14707     path="$BOOT_JDK"
14708 
14709     if test ! -f "$path" && test ! -d "$path"; then
14710       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14711     fi
14712 
14713     has_space=`$ECHO "$path" | $GREP " "`
14714     if test "x$has_space" != x; then
14715       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14716 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14717       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14718     fi
14719   fi
14720 
14721               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14722 $as_echo_n "checking for Boot JDK... " >&6; }
14723               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14724 $as_echo "$BOOT_JDK" >&6; }
14725               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14726 $as_echo_n "checking Boot JDK version... " >&6; }
14727               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14728               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14729 $as_echo "$BOOT_JDK_VERSION" >&6; }
14730             fi # end check jdk version
14731           fi # end check rt.jar
14732         fi # end check javac
14733       fi # end check java
14734     fi # end check boot jdk found
14735   fi
14736 
14737     done
14738   fi
14739 
14740 
14741     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14742     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14743       # Do we have a bin/java?
14744       if test ! -x "$BOOT_JDK/bin/java"; then
14745         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14746 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14747         BOOT_JDK_FOUND=no
14748       else
14749         # Do we have a bin/javac?
14750         if test ! -x "$BOOT_JDK/bin/javac"; then
14751           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14752 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14753           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14754 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14755           BOOT_JDK_FOUND=no
14756         else
14757           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14758           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14759             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14760 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14761             BOOT_JDK_FOUND=no
14762           else
14763             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14764             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14765 
14766             # Extra M4 quote needed to protect [] in grep expression.
14767             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14768             if test "x$FOUND_VERSION_78" = x; then
14769               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14770 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14771               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14772 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14773               BOOT_JDK_FOUND=no
14774             else
14775               # We're done! :-)
14776               BOOT_JDK_FOUND=yes
14777 
14778   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14779 
14780   # Input might be given as Windows format, start by converting to
14781   # unix format.
14782   path="$BOOT_JDK"
14783   new_path=`$CYGPATH -u "$path"`
14784 
14785   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14786   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14787   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14788   # "foo.exe" is OK but "foo" is an error.
14789   #
14790   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14791   # It is also a way to make sure we got the proper file name for the real test later on.
14792   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14793   if test "x$test_shortpath" = x; then
14794     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14795 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14796     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14797   fi
14798 
14799   # Call helper function which possibly converts this using DOS-style short mode.
14800   # If so, the updated path is stored in $new_path.
14801 
14802   input_path="$new_path"
14803   # Check if we need to convert this using DOS-style short mode. If the path
14804   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14805   # take no chances and rewrite it.
14806   # Note: m4 eats our [], so we need to use [ and ] instead.
14807   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14808   if test "x$has_forbidden_chars" != x; then
14809     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14810     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14811     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14812     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14813       # Going to short mode and back again did indeed matter. Since short mode is
14814       # case insensitive, let's make it lowercase to improve readability.
14815       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14816       # Now convert it back to Unix-stile (cygpath)
14817       input_path=`$CYGPATH -u "$shortmode_path"`
14818       new_path="$input_path"
14819     fi
14820   fi
14821 
14822   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14823   if test "x$test_cygdrive_prefix" = x; then
14824     # As a simple fix, exclude /usr/bin since it's not a real path.
14825     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14826       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14827       # a path prefixed by /cygdrive for fixpath to work.
14828       new_path="$CYGWIN_ROOT_PATH$input_path"
14829     fi
14830   fi
14831 
14832 
14833   if test "x$path" != "x$new_path"; then
14834     BOOT_JDK="$new_path"
14835     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14836 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14837   fi
14838 
14839   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14840 
14841   path="$BOOT_JDK"
14842   has_colon=`$ECHO $path | $GREP ^.:`
14843   new_path="$path"
14844   if test "x$has_colon" = x; then
14845     # Not in mixed or Windows style, start by that.
14846     new_path=`cmd //c echo $path`
14847   fi
14848 
14849 
14850   input_path="$new_path"
14851   # Check if we need to convert this using DOS-style short mode. If the path
14852   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14853   # take no chances and rewrite it.
14854   # Note: m4 eats our [], so we need to use [ and ] instead.
14855   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14856   if test "x$has_forbidden_chars" != x; then
14857     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14858     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14859   fi
14860 
14861 
14862   windows_path="$new_path"
14863   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14864     unix_path=`$CYGPATH -u "$windows_path"`
14865     new_path="$unix_path"
14866   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14867     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14868     new_path="$unix_path"
14869   fi
14870 
14871   if test "x$path" != "x$new_path"; then
14872     BOOT_JDK="$new_path"
14873     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14874 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14875   fi
14876 
14877   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14878   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14879 
14880   else
14881     # We're on a posix platform. Hooray! :)
14882     path="$BOOT_JDK"
14883 
14884     if test ! -f "$path" && test ! -d "$path"; then
14885       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14886     fi
14887 
14888     has_space=`$ECHO "$path" | $GREP " "`
14889     if test "x$has_space" != x; then
14890       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14891 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14892       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14893     fi
14894   fi
14895 
14896               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14897 $as_echo_n "checking for Boot JDK... " >&6; }
14898               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14899 $as_echo "$BOOT_JDK" >&6; }
14900               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14901 $as_echo_n "checking Boot JDK version... " >&6; }
14902               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14903               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14904 $as_echo "$BOOT_JDK_VERSION" >&6; }
14905             fi # end check jdk version
14906           fi # end check rt.jar
14907         fi # end check javac
14908       fi # end check java
14909     fi # end check boot jdk found
14910   fi
14911 
14912   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
14913 
14914   if test "x$BOOT_JDK_FOUND" = xno; then
14915     # Now execute the test
14916 
14917   BOOT_JDK_PREFIX="/usr/lib/jvm"
14918   BOOT_JDK_SUFFIX=""
14919   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14920   if test "x$ALL_JDKS_FOUND" != x; then
14921     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14922 
14923   if test "x$BOOT_JDK_FOUND" = xno; then
14924     # Now execute the test
14925 
14926         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14927         if test -d "$BOOT_JDK"; then
14928           BOOT_JDK_FOUND=maybe
14929           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14930 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14931         fi
14932 
14933 
14934     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14935     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14936       # Do we have a bin/java?
14937       if test ! -x "$BOOT_JDK/bin/java"; then
14938         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14939 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14940         BOOT_JDK_FOUND=no
14941       else
14942         # Do we have a bin/javac?
14943         if test ! -x "$BOOT_JDK/bin/javac"; then
14944           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14945 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14946           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14947 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14948           BOOT_JDK_FOUND=no
14949         else
14950           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14951           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14952             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14953 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14954             BOOT_JDK_FOUND=no
14955           else
14956             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14957             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14958 
14959             # Extra M4 quote needed to protect [] in grep expression.
14960             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14961             if test "x$FOUND_VERSION_78" = x; then
14962               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14963 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14964               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14965 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14966               BOOT_JDK_FOUND=no
14967             else
14968               # We're done! :-)
14969               BOOT_JDK_FOUND=yes
14970 
14971   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14972 
14973   # Input might be given as Windows format, start by converting to
14974   # unix format.
14975   path="$BOOT_JDK"
14976   new_path=`$CYGPATH -u "$path"`
14977 
14978   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14979   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14980   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14981   # "foo.exe" is OK but "foo" is an error.
14982   #
14983   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14984   # It is also a way to make sure we got the proper file name for the real test later on.
14985   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14986   if test "x$test_shortpath" = x; then
14987     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14988 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14989     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14990   fi
14991 
14992   # Call helper function which possibly converts this using DOS-style short mode.
14993   # If so, the updated path is stored in $new_path.
14994 
14995   input_path="$new_path"
14996   # Check if we need to convert this using DOS-style short mode. If the path
14997   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14998   # take no chances and rewrite it.
14999   # Note: m4 eats our [], so we need to use [ and ] instead.
15000   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15001   if test "x$has_forbidden_chars" != x; then
15002     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15003     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15004     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15005     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15006       # Going to short mode and back again did indeed matter. Since short mode is
15007       # case insensitive, let's make it lowercase to improve readability.
15008       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15009       # Now convert it back to Unix-stile (cygpath)
15010       input_path=`$CYGPATH -u "$shortmode_path"`
15011       new_path="$input_path"
15012     fi
15013   fi
15014 
15015   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15016   if test "x$test_cygdrive_prefix" = x; then
15017     # As a simple fix, exclude /usr/bin since it's not a real path.
15018     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15019       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15020       # a path prefixed by /cygdrive for fixpath to work.
15021       new_path="$CYGWIN_ROOT_PATH$input_path"
15022     fi
15023   fi
15024 
15025 
15026   if test "x$path" != "x$new_path"; then
15027     BOOT_JDK="$new_path"
15028     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15029 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15030   fi
15031 
15032   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15033 
15034   path="$BOOT_JDK"
15035   has_colon=`$ECHO $path | $GREP ^.:`
15036   new_path="$path"
15037   if test "x$has_colon" = x; then
15038     # Not in mixed or Windows style, start by that.
15039     new_path=`cmd //c echo $path`
15040   fi
15041 
15042 
15043   input_path="$new_path"
15044   # Check if we need to convert this using DOS-style short mode. If the path
15045   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15046   # take no chances and rewrite it.
15047   # Note: m4 eats our [], so we need to use [ and ] instead.
15048   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15049   if test "x$has_forbidden_chars" != x; then
15050     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15051     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15052   fi
15053 
15054 
15055   windows_path="$new_path"
15056   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15057     unix_path=`$CYGPATH -u "$windows_path"`
15058     new_path="$unix_path"
15059   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15060     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15061     new_path="$unix_path"
15062   fi
15063 
15064   if test "x$path" != "x$new_path"; then
15065     BOOT_JDK="$new_path"
15066     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15067 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15068   fi
15069 
15070   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15071   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15072 
15073   else
15074     # We're on a posix platform. Hooray! :)
15075     path="$BOOT_JDK"
15076 
15077     if test ! -f "$path" && test ! -d "$path"; then
15078       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15079     fi
15080 
15081     has_space=`$ECHO "$path" | $GREP " "`
15082     if test "x$has_space" != x; then
15083       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15084 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15085       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15086     fi
15087   fi
15088 
15089               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15090 $as_echo_n "checking for Boot JDK... " >&6; }
15091               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15092 $as_echo "$BOOT_JDK" >&6; }
15093               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15094 $as_echo_n "checking Boot JDK version... " >&6; }
15095               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15096               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15097 $as_echo "$BOOT_JDK_VERSION" >&6; }
15098             fi # end check jdk version
15099           fi # end check rt.jar
15100         fi # end check javac
15101       fi # end check java
15102     fi # end check boot jdk found
15103   fi
15104 
15105     done
15106   fi
15107 
15108 
15109     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15110     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15111       # Do we have a bin/java?
15112       if test ! -x "$BOOT_JDK/bin/java"; then
15113         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15114 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15115         BOOT_JDK_FOUND=no
15116       else
15117         # Do we have a bin/javac?
15118         if test ! -x "$BOOT_JDK/bin/javac"; then
15119           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15120 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15121           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15122 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15123           BOOT_JDK_FOUND=no
15124         else
15125           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15126           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15127             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15128 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15129             BOOT_JDK_FOUND=no
15130           else
15131             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15132             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15133 
15134             # Extra M4 quote needed to protect [] in grep expression.
15135             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15136             if test "x$FOUND_VERSION_78" = x; then
15137               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15138 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15139               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15140 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15141               BOOT_JDK_FOUND=no
15142             else
15143               # We're done! :-)
15144               BOOT_JDK_FOUND=yes
15145 
15146   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15147 
15148   # Input might be given as Windows format, start by converting to
15149   # unix format.
15150   path="$BOOT_JDK"
15151   new_path=`$CYGPATH -u "$path"`
15152 
15153   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15154   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15155   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15156   # "foo.exe" is OK but "foo" is an error.
15157   #
15158   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15159   # It is also a way to make sure we got the proper file name for the real test later on.
15160   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15161   if test "x$test_shortpath" = x; then
15162     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15163 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15164     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15165   fi
15166 
15167   # Call helper function which possibly converts this using DOS-style short mode.
15168   # If so, the updated path is stored in $new_path.
15169 
15170   input_path="$new_path"
15171   # Check if we need to convert this using DOS-style short mode. If the path
15172   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15173   # take no chances and rewrite it.
15174   # Note: m4 eats our [], so we need to use [ and ] instead.
15175   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15176   if test "x$has_forbidden_chars" != x; then
15177     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15178     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15179     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15180     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15181       # Going to short mode and back again did indeed matter. Since short mode is
15182       # case insensitive, let's make it lowercase to improve readability.
15183       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15184       # Now convert it back to Unix-stile (cygpath)
15185       input_path=`$CYGPATH -u "$shortmode_path"`
15186       new_path="$input_path"
15187     fi
15188   fi
15189 
15190   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15191   if test "x$test_cygdrive_prefix" = x; then
15192     # As a simple fix, exclude /usr/bin since it's not a real path.
15193     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15194       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15195       # a path prefixed by /cygdrive for fixpath to work.
15196       new_path="$CYGWIN_ROOT_PATH$input_path"
15197     fi
15198   fi
15199 
15200 
15201   if test "x$path" != "x$new_path"; then
15202     BOOT_JDK="$new_path"
15203     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15204 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15205   fi
15206 
15207   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15208 
15209   path="$BOOT_JDK"
15210   has_colon=`$ECHO $path | $GREP ^.:`
15211   new_path="$path"
15212   if test "x$has_colon" = x; then
15213     # Not in mixed or Windows style, start by that.
15214     new_path=`cmd //c echo $path`
15215   fi
15216 
15217 
15218   input_path="$new_path"
15219   # Check if we need to convert this using DOS-style short mode. If the path
15220   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15221   # take no chances and rewrite it.
15222   # Note: m4 eats our [], so we need to use [ and ] instead.
15223   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15224   if test "x$has_forbidden_chars" != x; then
15225     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15226     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15227   fi
15228 
15229 
15230   windows_path="$new_path"
15231   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15232     unix_path=`$CYGPATH -u "$windows_path"`
15233     new_path="$unix_path"
15234   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15235     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15236     new_path="$unix_path"
15237   fi
15238 
15239   if test "x$path" != "x$new_path"; then
15240     BOOT_JDK="$new_path"
15241     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15242 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15243   fi
15244 
15245   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15246   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15247 
15248   else
15249     # We're on a posix platform. Hooray! :)
15250     path="$BOOT_JDK"
15251 
15252     if test ! -f "$path" && test ! -d "$path"; then
15253       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15254     fi
15255 
15256     has_space=`$ECHO "$path" | $GREP " "`
15257     if test "x$has_space" != x; then
15258       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15259 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15260       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15261     fi
15262   fi
15263 
15264               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15265 $as_echo_n "checking for Boot JDK... " >&6; }
15266               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15267 $as_echo "$BOOT_JDK" >&6; }
15268               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15269 $as_echo_n "checking Boot JDK version... " >&6; }
15270               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15271               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15272 $as_echo "$BOOT_JDK_VERSION" >&6; }
15273             fi # end check jdk version
15274           fi # end check rt.jar
15275         fi # end check javac
15276       fi # end check java
15277     fi # end check boot jdk found
15278   fi
15279 
15280   fi
15281 
15282 
15283     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15284     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15285       # Do we have a bin/java?
15286       if test ! -x "$BOOT_JDK/bin/java"; then
15287         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15288 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15289         BOOT_JDK_FOUND=no
15290       else
15291         # Do we have a bin/javac?
15292         if test ! -x "$BOOT_JDK/bin/javac"; then
15293           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15294 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15295           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15296 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15297           BOOT_JDK_FOUND=no
15298         else
15299           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15300           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15301             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15302 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15303             BOOT_JDK_FOUND=no
15304           else
15305             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15306             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15307 
15308             # Extra M4 quote needed to protect [] in grep expression.
15309             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15310             if test "x$FOUND_VERSION_78" = x; then
15311               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15312 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15313               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15314 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15315               BOOT_JDK_FOUND=no
15316             else
15317               # We're done! :-)
15318               BOOT_JDK_FOUND=yes
15319 
15320   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15321 
15322   # Input might be given as Windows format, start by converting to
15323   # unix format.
15324   path="$BOOT_JDK"
15325   new_path=`$CYGPATH -u "$path"`
15326 
15327   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15328   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15329   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15330   # "foo.exe" is OK but "foo" is an error.
15331   #
15332   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15333   # It is also a way to make sure we got the proper file name for the real test later on.
15334   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15335   if test "x$test_shortpath" = x; then
15336     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15337 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15338     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15339   fi
15340 
15341   # Call helper function which possibly converts this using DOS-style short mode.
15342   # If so, the updated path is stored in $new_path.
15343 
15344   input_path="$new_path"
15345   # Check if we need to convert this using DOS-style short mode. If the path
15346   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15347   # take no chances and rewrite it.
15348   # Note: m4 eats our [], so we need to use [ and ] instead.
15349   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15350   if test "x$has_forbidden_chars" != x; then
15351     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15352     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15353     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15354     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15355       # Going to short mode and back again did indeed matter. Since short mode is
15356       # case insensitive, let's make it lowercase to improve readability.
15357       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15358       # Now convert it back to Unix-stile (cygpath)
15359       input_path=`$CYGPATH -u "$shortmode_path"`
15360       new_path="$input_path"
15361     fi
15362   fi
15363 
15364   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15365   if test "x$test_cygdrive_prefix" = x; then
15366     # As a simple fix, exclude /usr/bin since it's not a real path.
15367     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15368       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15369       # a path prefixed by /cygdrive for fixpath to work.
15370       new_path="$CYGWIN_ROOT_PATH$input_path"
15371     fi
15372   fi
15373 
15374 
15375   if test "x$path" != "x$new_path"; then
15376     BOOT_JDK="$new_path"
15377     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15378 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15379   fi
15380 
15381   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15382 
15383   path="$BOOT_JDK"
15384   has_colon=`$ECHO $path | $GREP ^.:`
15385   new_path="$path"
15386   if test "x$has_colon" = x; then
15387     # Not in mixed or Windows style, start by that.
15388     new_path=`cmd //c echo $path`
15389   fi
15390 
15391 
15392   input_path="$new_path"
15393   # Check if we need to convert this using DOS-style short mode. If the path
15394   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15395   # take no chances and rewrite it.
15396   # Note: m4 eats our [], so we need to use [ and ] instead.
15397   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15398   if test "x$has_forbidden_chars" != x; then
15399     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15400     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15401   fi
15402 
15403 
15404   windows_path="$new_path"
15405   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15406     unix_path=`$CYGPATH -u "$windows_path"`
15407     new_path="$unix_path"
15408   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15409     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15410     new_path="$unix_path"
15411   fi
15412 
15413   if test "x$path" != "x$new_path"; then
15414     BOOT_JDK="$new_path"
15415     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15416 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15417   fi
15418 
15419   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15420   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15421 
15422   else
15423     # We're on a posix platform. Hooray! :)
15424     path="$BOOT_JDK"
15425 
15426     if test ! -f "$path" && test ! -d "$path"; then
15427       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15428     fi
15429 
15430     has_space=`$ECHO "$path" | $GREP " "`
15431     if test "x$has_space" != x; then
15432       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15433 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15434       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15435     fi
15436   fi
15437 
15438               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15439 $as_echo_n "checking for Boot JDK... " >&6; }
15440               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15441 $as_echo "$BOOT_JDK" >&6; }
15442               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15443 $as_echo_n "checking Boot JDK version... " >&6; }
15444               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15445               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15446 $as_echo "$BOOT_JDK_VERSION" >&6; }
15447             fi # end check jdk version
15448           fi # end check rt.jar
15449         fi # end check javac
15450       fi # end check java
15451     fi # end check boot jdk found
15452   fi
15453 
15454 
15455 # If we haven't found anything yet, we've truly lost. Give up.
15456 if test "x$BOOT_JDK_FOUND" = xno; then
15457 
15458     # Print a helpful message on how to acquire the necessary build dependency.
15459     # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15460     MISSING_DEPENDENCY=openjdk
15461     PKGHANDLER_COMMAND=
15462 
15463     case $PKGHANDLER in
15464         apt-get)
15465                 apt_help     $MISSING_DEPENDENCY ;;
15466     yum)
15467                 yum_help     $MISSING_DEPENDENCY ;;
15468         port)
15469                 port_help    $MISSING_DEPENDENCY ;;
15470         pkgutil)
15471                 pkgutil_help $MISSING_DEPENDENCY ;;
15472         pkgadd)
15473                 pkgadd_help  $MISSING_DEPENDENCY ;;
15474     * )
15475       break ;;
15476     esac
15477 
15478     if test "x$PKGHANDLER_COMMAND" != x; then
15479         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15480     fi
15481 
15482   { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15483 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15484   { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15485 $as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15486   as_fn_error $? "Cannot continue" "$LINENO" 5
15487 fi
15488 
15489 # Setup proper paths for what we found
15490 BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15491 if test ! -f "$BOOT_RTJAR"; then
15492     # On MacOSX it is called classes.jar
15493     BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15494     if test -f "$BOOT_RTJAR"; then
15495       # Remove the ..
15496       BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15497     fi
15498 fi
15499 BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15500 BOOT_JDK="$BOOT_JDK"
15501 
15502 
15503 
15504 
15505 # Setup tools from the Boot JDK.
15506 
15507   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15508 $as_echo_n "checking for java in Boot JDK... " >&6; }
15509   JAVA=$BOOT_JDK/bin/java
15510   if test ! -x $JAVA; then
15511       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15512 $as_echo "not found" >&6; }
15513       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15514 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15515       as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15516   fi
15517   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15518 $as_echo "ok" >&6; }
15519 
15520 
15521   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15522 $as_echo_n "checking for javac in Boot JDK... " >&6; }
15523   JAVAC=$BOOT_JDK/bin/javac
15524   if test ! -x $JAVAC; then
15525       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15526 $as_echo "not found" >&6; }
15527       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15528 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15529       as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15530   fi
15531   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15532 $as_echo "ok" >&6; }
15533 
15534 
15535   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15536 $as_echo_n "checking for javah in Boot JDK... " >&6; }
15537   JAVAH=$BOOT_JDK/bin/javah
15538   if test ! -x $JAVAH; then
15539       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15540 $as_echo "not found" >&6; }
15541       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15542 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15543       as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15544   fi
15545   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15546 $as_echo "ok" >&6; }
15547 
15548 
15549   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15550 $as_echo_n "checking for javap in Boot JDK... " >&6; }
15551   JAVAP=$BOOT_JDK/bin/javap
15552   if test ! -x $JAVAP; then
15553       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15554 $as_echo "not found" >&6; }
15555       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15556 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15557       as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15558   fi
15559   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15560 $as_echo "ok" >&6; }
15561 
15562 
15563   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15564 $as_echo_n "checking for jar in Boot JDK... " >&6; }
15565   JAR=$BOOT_JDK/bin/jar
15566   if test ! -x $JAR; then
15567       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15568 $as_echo "not found" >&6; }
15569       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15570 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15571       as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15572   fi
15573   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15574 $as_echo "ok" >&6; }
15575 
15576 
15577   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15578 $as_echo_n "checking for rmic in Boot JDK... " >&6; }
15579   RMIC=$BOOT_JDK/bin/rmic
15580   if test ! -x $RMIC; then
15581       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15582 $as_echo "not found" >&6; }
15583       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15584 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15585       as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15586   fi
15587   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15588 $as_echo "ok" >&6; }
15589 
15590 
15591   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15592 $as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15593   NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15594   if test ! -x $NATIVE2ASCII; then
15595       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15596 $as_echo "not found" >&6; }
15597       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15598 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15599       as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15600   fi
15601   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15602 $as_echo "ok" >&6; }
15603 
15604 
15605 # Finally, set some other options...
15606 
15607 # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15608 BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15609 
15610 
15611 
15612 
15613 ##############################################################################
15614 #
15615 # Specify options for anything that is run with the Boot JDK.
15616 #
15617 
15618 # Check whether --with-boot-jdk-jvmargs was given.
15619 if test "${with_boot_jdk_jvmargs+set}" = set; then :
15620   withval=$with_boot_jdk_jvmargs;
15621 fi
15622 
15623 
15624 if test "x$with_boot_jdk_jvmargs" = x; then
15625     # Not all JVM:s accept the same arguments on the command line.
15626     # OpenJDK specific increase in thread stack for JDK build,
15627     # well more specifically, when running javac.
15628     if test "x$BUILD_NUM_BITS" = x32; then
15629        STACK_SIZE=768
15630     else
15631        # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15632        # since 64-bit pointers are pushed on the stach. Apparently, we need
15633        # to increase the stack space when javacing the JDK....
15634        STACK_SIZE=1536
15635     fi
15636 
15637     # Minimum amount of heap memory.
15638 
15639     # Test if -Xms64M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15640     # If so, then append -Xms64M to boot_jdk_jvmargs
15641     FOUND_WARN=`$JAVA -Xms64M -version 2>&1 | grep -i warn`
15642     FOUND_VERSION=`$JAVA -Xms64M -version 2>&1 | grep " version \""`
15643     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15644         boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15645     fi
15646 
15647     if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15648         # Why does macosx need more heap? Its the huge JDK batch.
15649 
15650     # Test if -Xmx1600M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15651     # If so, then append -Xmx1600M to boot_jdk_jvmargs
15652     FOUND_WARN=`$JAVA -Xmx1600M -version 2>&1 | grep -i warn`
15653     FOUND_VERSION=`$JAVA -Xmx1600M -version 2>&1 | grep " version \""`
15654     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15655         boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15656     fi
15657 
15658     else
15659 
15660     # Test if -Xmx1100M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15661     # If so, then append -Xmx1100M to boot_jdk_jvmargs
15662     FOUND_WARN=`$JAVA -Xmx1100M -version 2>&1 | grep -i warn`
15663     FOUND_VERSION=`$JAVA -Xmx1100M -version 2>&1 | grep " version \""`
15664     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15665         boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15666     fi
15667 
15668     fi
15669     # When is adding -client something that speeds up the JVM?
15670     # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15671 
15672     # Test if -XX:PermSize=32m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15673     # If so, then append -XX:PermSize=32m to boot_jdk_jvmargs
15674     FOUND_WARN=`$JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
15675     FOUND_VERSION=`$JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
15676     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15677         boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15678     fi
15679 
15680 
15681     # Test if -XX:MaxPermSize=160m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15682     # If so, then append -XX:MaxPermSize=160m to boot_jdk_jvmargs
15683     FOUND_WARN=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
15684     FOUND_VERSION=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
15685     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15686         boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15687     fi
15688 
15689 
15690     # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15691     # If so, then append -XX:ThreadStackSize=$STACK_SIZE to boot_jdk_jvmargs
15692     FOUND_WARN=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
15693     FOUND_VERSION=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
15694     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15695         boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15696     fi
15697 
15698     # Disable special log output when a debug build is used as Boot JDK...
15699 
15700     # Test if -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15701     # If so, then append -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput to boot_jdk_jvmargs
15702     FOUND_WARN=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep -i warn`
15703     FOUND_VERSION=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep " version \""`
15704     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15705         boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15706     fi
15707 
15708 fi
15709 
15710 BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15711 
15712 
15713 
15714 ###############################################################################
15715 #
15716 # Configure the sources to use. We can add or override individual directories.
15717 #
15718 ###############################################################################
15719 
15720 
15721 
15722 # Where are the sources. Any of these can be overridden
15723 # using --with-override-corba and the likes.
15724 LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15725 CORBA_TOPDIR="$SRC_ROOT/corba"
15726 JAXP_TOPDIR="$SRC_ROOT/jaxp"
15727 JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15728 HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15729 NASHORN_TOPDIR="$SRC_ROOT/nashorn"
15730 JDK_TOPDIR="$SRC_ROOT/jdk"
15731 
15732 
15733 
15734 
15735 
15736 
15737 
15738 
15739 
15740 
15741 ###############################################################################
15742 #
15743 # Pickup additional source for a component from outside of the source root
15744 # or override source for a component.
15745 #
15746 
15747 # Check whether --with-add-source-root was given.
15748 if test "${with_add_source_root+set}" = set; then :
15749   withval=$with_add_source_root;
15750 fi
15751 
15752 
15753 
15754 # Check whether --with-override-source-root was given.
15755 if test "${with_override_source_root+set}" = set; then :
15756   withval=$with_override_source_root;
15757 fi
15758 
15759 
15760 
15761 # Check whether --with-adds-and-overrides was given.
15762 if test "${with_adds_and_overrides+set}" = set; then :
15763   withval=$with_adds_and_overrides;
15764 fi
15765 
15766 
15767 if test "x$with_adds_and_overrides" != x; then
15768     with_add_source_root="$with_adds_and_overrides/adds"
15769     with_override_source_root="$with_adds_and_overrides/overrides"
15770 fi
15771 
15772 if test "x$with_add_source_root" != x; then
15773     if ! test -d $with_add_source_root; then
15774        as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
15775     fi
15776     CURDIR="$PWD"
15777     cd "$with_add_source_root"
15778     ADD_SRC_ROOT="`pwd`"
15779     cd "$CURDIR"
15780     # Verify that the addon source root does not have any root makefiles.
15781     # If it does, then it is usually an error, prevent this.
15782     if test -f $with_add_source_root/langtools/makefiles/Makefile || \
15783        test -f $with_add_source_root/langtools/make/Makefile; then
15784         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
15785     fi
15786     if test -f $with_add_source_root/corba/makefiles/Makefile || \
15787        test -f $with_add_source_root/corba/make/Makefile; then
15788         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
15789     fi
15790     if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
15791        test -f $with_add_source_root/jaxp/make/Makefile; then
15792         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
15793     fi
15794     if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
15795        test -f $with_add_source_root/jaxws/make/Makefile; then
15796         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
15797     fi
15798     if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
15799        test -f $with_add_source_root/hotspot/make/Makefile; then
15800         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
15801     fi
15802     if test -f $with_add_source_root/jdk/makefiles/Makefile || \
15803        test -f $with_add_source_root/jdk/make/Makefile; then
15804         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
15805     fi
15806 fi
15807 
15808 
15809 if test "x$with_override_source_root" != x; then
15810     if ! test -d $with_override_source_root; then
15811        as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
15812     fi
15813     CURDIR="$PWD"
15814     cd "$with_override_source_root"
15815     OVERRIDE_SRC_ROOT="`pwd`"
15816     cd "$CURDIR"
15817     if test -f $with_override_source_root/langtools/makefiles/Makefile || \
15818        test -f $with_override_source_root/langtools/make/Makefile; then
15819         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
15820     fi
15821     if test -f $with_override_source_root/corba/makefiles/Makefile || \
15822        test -f $with_override_source_root/corba/make/Makefile; then
15823         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
15824     fi
15825     if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
15826        test -f $with_override_source_root/jaxp/make/Makefile; then
15827         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
15828     fi
15829     if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
15830        test -f $with_override_source_root/jaxws/make/Makefile; then
15831         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
15832     fi
15833     if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
15834        test -f $with_override_source_root/hotspot/make/Makefile; then
15835         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
15836     fi
15837     if test -f $with_override_source_root/jdk/makefiles/Makefile || \
15838        test -f $with_override_source_root/jdk/make/Makefile; then
15839         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
15840     fi
15841 fi
15842 
15843 
15844 ###############################################################################
15845 #
15846 # Override a repo completely, this is used for example when you have 3 small
15847 # development sandboxes of the langtools sources and want to avoid having 3 full
15848 # OpenJDK sources checked out on disk.
15849 #
15850 # Assuming that the 3 langtools sandboxes are located here:
15851 # /home/fredrik/sandbox1/langtools
15852 # /home/fredrik/sandbox2/langtools
15853 # /home/fredrik/sandbox3/langtools
15854 #
15855 # From the source root you create build subdirs manually:
15856 #     mkdir -p build1 build2 build3
15857 # in each build directory run:
15858 #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
15859 #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
15860 #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
15861 #
15862 
15863 
15864 # Check whether --with-override-langtools was given.
15865 if test "${with_override_langtools+set}" = set; then :
15866   withval=$with_override_langtools;
15867 fi
15868 
15869 
15870 
15871 # Check whether --with-override-corba was given.
15872 if test "${with_override_corba+set}" = set; then :
15873   withval=$with_override_corba;
15874 fi
15875 
15876 
15877 
15878 # Check whether --with-override-jaxp was given.
15879 if test "${with_override_jaxp+set}" = set; then :
15880   withval=$with_override_jaxp;
15881 fi
15882 
15883 
15884 
15885 # Check whether --with-override-jaxws was given.
15886 if test "${with_override_jaxws+set}" = set; then :
15887   withval=$with_override_jaxws;
15888 fi
15889 
15890 
15891 
15892 # Check whether --with-override-hotspot was given.
15893 if test "${with_override_hotspot+set}" = set; then :
15894   withval=$with_override_hotspot;
15895 fi
15896 
15897 
15898 
15899 # Check whether --with-override-jdk was given.
15900 if test "${with_override_jdk+set}" = set; then :
15901   withval=$with_override_jdk;
15902 fi
15903 
15904 
15905 if test "x$with_override_langtools" != x; then
15906     CURDIR="$PWD"
15907     cd "$with_override_langtools"
15908     LANGTOOLS_TOPDIR="`pwd`"
15909     cd "$CURDIR"
15910     if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
15911         as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
15912     fi
15913     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
15914 $as_echo_n "checking if langtools should be overridden... " >&6; }
15915     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
15916 $as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
15917 fi
15918 if test "x$with_override_corba" != x; then
15919     CURDIR="$PWD"
15920     cd "$with_override_corba"
15921     CORBA_TOPDIR="`pwd`"
15922     cd "$CURDIR"
15923     if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
15924         as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
15925     fi
15926     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
15927 $as_echo_n "checking if corba should be overridden... " >&6; }
15928     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
15929 $as_echo "yes with $CORBA_TOPDIR" >&6; }
15930 fi
15931 if test "x$with_override_jaxp" != x; then
15932     CURDIR="$PWD"
15933     cd "$with_override_jaxp"
15934     JAXP_TOPDIR="`pwd`"
15935     cd "$CURDIR"
15936     if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
15937         as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
15938     fi
15939     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
15940 $as_echo_n "checking if jaxp should be overridden... " >&6; }
15941     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
15942 $as_echo "yes with $JAXP_TOPDIR" >&6; }
15943 fi
15944 if test "x$with_override_jaxws" != x; then
15945     CURDIR="$PWD"
15946     cd "$with_override_jaxws"
15947     JAXWS_TOPDIR="`pwd`"
15948     cd "$CURDIR"
15949     if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
15950         as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
15951     fi
15952     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
15953 $as_echo_n "checking if jaxws should be overridden... " >&6; }
15954     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
15955 $as_echo "yes with $JAXWS_TOPDIR" >&6; }
15956 fi
15957 if test "x$with_override_hotspot" != x; then
15958     CURDIR="$PWD"
15959     cd "$with_override_hotspot"
15960     HOTSPOT_TOPDIR="`pwd`"
15961     cd "$CURDIR"
15962     if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
15963        ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
15964         as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
15965     fi
15966     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
15967 $as_echo_n "checking if hotspot should be overridden... " >&6; }
15968     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
15969 $as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
15970 fi
15971 if test "x$with_override_nashorn" != x; then
15972     CURDIR="$PWD"
15973     cd "$with_override_nashorn"
15974     NASHORN_TOPDIR="`pwd`"
15975     cd "$CURDIR"
15976     if ! test -f $NASHORN_TOPDIR/makefiles/BuildNashorn.gmk; then
15977         as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
15978     fi
15979     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
15980 $as_echo_n "checking if nashorn should be overridden... " >&6; }
15981     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
15982 $as_echo "yes with $NASHORN_TOPDIR" >&6; }
15983 fi
15984 if test "x$with_override_jdk" != x; then
15985     CURDIR="$PWD"
15986     cd "$with_override_jdk"
15987     JDK_TOPDIR="`pwd`"
15988     cd "$CURDIR"
15989     if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
15990         as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
15991     fi
15992     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
15993 $as_echo_n "checking if JDK should be overridden... " >&6; }
15994     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
15995 $as_echo "yes with $JDK_TOPDIR" >&6; }
15996 fi
15997 
15998 
15999 
16000 BUILD_OUTPUT="$OUTPUT_ROOT"
16001 
16002 
16003 HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
16004 BUILD_HOTSPOT=true
16005 
16006 
16007 
16008 # Check whether --with-import-hotspot was given.
16009 if test "${with_import_hotspot+set}" = set; then :
16010   withval=$with_import_hotspot;
16011 fi
16012 
16013 if test "x$with_import_hotspot" != x; then
16014     CURDIR="$PWD"
16015     cd "$with_import_hotspot"
16016     HOTSPOT_DIST="`pwd`"
16017     cd "$CURDIR"
16018     if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
16019         as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
16020     fi
16021     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
16022 $as_echo_n "checking if hotspot should be imported... " >&6; }
16023     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
16024 $as_echo "yes from $HOTSPOT_DIST" >&6; }
16025     BUILD_HOTSPOT=false
16026 fi
16027 
16028 JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
16029 
16030 
16031 ###############################################################################
16032 #
16033 # Setup the toolchain (compilers etc), i.e. the tools that need to be
16034 # cross-compilation aware.
16035 #
16036 ###############################################################################
16037 
16038 
16039 ###############################################################################
16040 #
16041 # Configure the development tool paths and potential sysroot.
16042 #
16043 ac_ext=cpp
16044 ac_cpp='$CXXCPP $CPPFLAGS'
16045 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16046 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16047 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16048 
16049 
16050 # The option used to specify the target .o,.a or .so file.
16051 # When compiling, how to specify the to be created object file.
16052 CC_OUT_OPTION='-o$(SPACE)'
16053 # When linking, how to specify the to be created executable.
16054 EXE_OUT_OPTION='-o$(SPACE)'
16055 # When linking, how to specify the to be created dynamically linkable library.
16056 LD_OUT_OPTION='-o$(SPACE)'
16057 # When archiving, how to specify the to be create static archive for object files.
16058 AR_OUT_OPTION='rcs$(SPACE)'
16059 
16060 
16061 
16062 
16063 
16064 # Locate the actual tools
16065 
16066 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16067 
16068   # Store path to cygwin link.exe to help excluding it when searching for
16069   # VS linker. This must be done before changing the PATH when looking for VS.
16070   # Extract the first word of "link", so it can be a program name with args.
16071 set dummy link; ac_word=$2
16072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16073 $as_echo_n "checking for $ac_word... " >&6; }
16074 if ${ac_cv_path_CYGWIN_LINK+:} false; then :
16075   $as_echo_n "(cached) " >&6
16076 else
16077   case $CYGWIN_LINK in
16078   [\\/]* | ?:[\\/]*)
16079   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16080   ;;
16081   *)
16082   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16083 for as_dir in $PATH
16084 do
16085   IFS=$as_save_IFS
16086   test -z "$as_dir" && as_dir=.
16087     for ac_exec_ext in '' $ac_executable_extensions; do
16088   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16089     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16090     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16091     break 2
16092   fi
16093 done
16094   done
16095 IFS=$as_save_IFS
16096 
16097   ;;
16098 esac
16099 fi
16100 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16101 if test -n "$CYGWIN_LINK"; then
16102   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16103 $as_echo "$CYGWIN_LINK" >&6; }
16104 else
16105   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16106 $as_echo "no" >&6; }
16107 fi
16108 
16109 
16110   if test "x$CYGWIN_LINK" != x; then
16111     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16112 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16113     "$CYGWIN_LINK" --version > /dev/null
16114     if test $? -eq 0 ; then
16115       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16116 $as_echo "yes" >&6; }
16117     else
16118       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16119 $as_echo "no" >&6; }
16120       # This might be the VS linker. Don't exclude it later on.
16121       CYGWIN_LINK=""
16122     fi
16123   fi
16124 
16125   # First-hand choice is to locate and run the vsvars bat file.
16126 
16127   if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16128     VCVARSFILE="vc/bin/vcvars32.bat"
16129   else
16130     VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16131   fi
16132 
16133   VS_ENV_CMD=""
16134   VS_ENV_ARGS=""
16135   if test "x$with_toolsdir" != x; then
16136 
16137   if test "x$VS_ENV_CMD" = x; then
16138     VS100BASE="$with_toolsdir/../.."
16139     METHOD="--with-tools-dir"
16140 
16141   windows_path="$VS100BASE"
16142   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16143     unix_path=`$CYGPATH -u "$windows_path"`
16144     VS100BASE="$unix_path"
16145   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16146     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16147     VS100BASE="$unix_path"
16148   fi
16149 
16150     if test -d "$VS100BASE"; then
16151       if test -f "$VS100BASE/$VCVARSFILE"; then
16152         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16153 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16154         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16155       else
16156         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16157 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16158         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16159 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16160       fi
16161     fi
16162   fi
16163 
16164   fi
16165 
16166   if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16167     # Having specified an argument which is incorrect will produce an instant failure;
16168     # we should not go on looking
16169     { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16170 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16171     { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16172 $as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16173     as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16174   fi
16175 
16176   if test "x$ProgramW6432" != x; then
16177 
16178   if test "x$VS_ENV_CMD" = x; then
16179     WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16180     METHOD="well-known name"
16181 
16182   windows_path="$WIN_SDK_BASE"
16183   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16184     unix_path=`$CYGPATH -u "$windows_path"`
16185     WIN_SDK_BASE="$unix_path"
16186   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16187     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16188     WIN_SDK_BASE="$unix_path"
16189   fi
16190 
16191     if test -d "$WIN_SDK_BASE"; then
16192       # There have been cases of partial or broken SDK installations. A missing
16193       # lib dir is not going to work.
16194       if test ! -d "$WIN_SDK_BASE/../lib"; then
16195         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16196 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16197         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16198 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16199       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16200         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16201 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16202         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16203         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16204           VS_ENV_ARGS="/x86"
16205         else
16206           VS_ENV_ARGS="/x64"
16207         fi
16208       else
16209         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16210 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16211         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16212 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16213       fi
16214     fi
16215   fi
16216 
16217   fi
16218   if test "x$PROGRAMW6432" != x; then
16219 
16220   if test "x$VS_ENV_CMD" = x; then
16221     WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16222     METHOD="well-known name"
16223 
16224   windows_path="$WIN_SDK_BASE"
16225   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16226     unix_path=`$CYGPATH -u "$windows_path"`
16227     WIN_SDK_BASE="$unix_path"
16228   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16229     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16230     WIN_SDK_BASE="$unix_path"
16231   fi
16232 
16233     if test -d "$WIN_SDK_BASE"; then
16234       # There have been cases of partial or broken SDK installations. A missing
16235       # lib dir is not going to work.
16236       if test ! -d "$WIN_SDK_BASE/../lib"; then
16237         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16238 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16239         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16240 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16241       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16242         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16243 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16244         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16245         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16246           VS_ENV_ARGS="/x86"
16247         else
16248           VS_ENV_ARGS="/x64"
16249         fi
16250       else
16251         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16252 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16253         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16254 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16255       fi
16256     fi
16257   fi
16258 
16259   fi
16260   if test "x$PROGRAMFILES" != x; then
16261 
16262   if test "x$VS_ENV_CMD" = x; then
16263     WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16264     METHOD="well-known name"
16265 
16266   windows_path="$WIN_SDK_BASE"
16267   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16268     unix_path=`$CYGPATH -u "$windows_path"`
16269     WIN_SDK_BASE="$unix_path"
16270   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16271     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16272     WIN_SDK_BASE="$unix_path"
16273   fi
16274 
16275     if test -d "$WIN_SDK_BASE"; then
16276       # There have been cases of partial or broken SDK installations. A missing
16277       # lib dir is not going to work.
16278       if test ! -d "$WIN_SDK_BASE/../lib"; then
16279         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16280 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16281         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16282 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16283       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; 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         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16287         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16288           VS_ENV_ARGS="/x86"
16289         else
16290           VS_ENV_ARGS="/x64"
16291         fi
16292       else
16293         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16294 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16295         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16296 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16297       fi
16298     fi
16299   fi
16300 
16301   fi
16302 
16303   if test "x$VS_ENV_CMD" = x; then
16304     WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16305     METHOD="well-known name"
16306 
16307   windows_path="$WIN_SDK_BASE"
16308   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16309     unix_path=`$CYGPATH -u "$windows_path"`
16310     WIN_SDK_BASE="$unix_path"
16311   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16312     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16313     WIN_SDK_BASE="$unix_path"
16314   fi
16315 
16316     if test -d "$WIN_SDK_BASE"; then
16317       # There have been cases of partial or broken SDK installations. A missing
16318       # lib dir is not going to work.
16319       if test ! -d "$WIN_SDK_BASE/../lib"; then
16320         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16321 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16322         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16323 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16324       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16325         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16326 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16327         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16328         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16329           VS_ENV_ARGS="/x86"
16330         else
16331           VS_ENV_ARGS="/x64"
16332         fi
16333       else
16334         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16335 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16336         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16337 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16338       fi
16339     fi
16340   fi
16341 
16342 
16343   if test "x$VS_ENV_CMD" = x; then
16344     WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
16345     METHOD="well-known name"
16346 
16347   windows_path="$WIN_SDK_BASE"
16348   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16349     unix_path=`$CYGPATH -u "$windows_path"`
16350     WIN_SDK_BASE="$unix_path"
16351   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16352     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16353     WIN_SDK_BASE="$unix_path"
16354   fi
16355 
16356     if test -d "$WIN_SDK_BASE"; then
16357       # There have been cases of partial or broken SDK installations. A missing
16358       # lib dir is not going to work.
16359       if test ! -d "$WIN_SDK_BASE/../lib"; then
16360         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16361 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16362         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16363 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16364       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16365         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16366 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16367         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16368         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16369           VS_ENV_ARGS="/x86"
16370         else
16371           VS_ENV_ARGS="/x64"
16372         fi
16373       else
16374         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16375 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16376         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16377 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16378       fi
16379     fi
16380   fi
16381 
16382 
16383   if test "x$VS100COMNTOOLS" != x; then
16384 
16385   if test "x$VS_ENV_CMD" = x; then
16386     VS100BASE="$VS100COMNTOOLS/../.."
16387     METHOD="VS100COMNTOOLS variable"
16388 
16389   windows_path="$VS100BASE"
16390   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16391     unix_path=`$CYGPATH -u "$windows_path"`
16392     VS100BASE="$unix_path"
16393   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16394     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16395     VS100BASE="$unix_path"
16396   fi
16397 
16398     if test -d "$VS100BASE"; then
16399       if test -f "$VS100BASE/$VCVARSFILE"; then
16400         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16401 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16402         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16403       else
16404         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16405 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16406         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16407 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16408       fi
16409     fi
16410   fi
16411 
16412   fi
16413   if test "x$PROGRAMFILES" != x; then
16414 
16415   if test "x$VS_ENV_CMD" = x; then
16416     VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16417     METHOD="well-known name"
16418 
16419   windows_path="$VS100BASE"
16420   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16421     unix_path=`$CYGPATH -u "$windows_path"`
16422     VS100BASE="$unix_path"
16423   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16424     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16425     VS100BASE="$unix_path"
16426   fi
16427 
16428     if test -d "$VS100BASE"; then
16429       if test -f "$VS100BASE/$VCVARSFILE"; then
16430         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16431 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16432         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16433       else
16434         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16435 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16436         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16437 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16438       fi
16439     fi
16440   fi
16441 
16442   fi
16443 
16444   if test "x$VS_ENV_CMD" = x; then
16445     VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16446     METHOD="well-known name"
16447 
16448   windows_path="$VS100BASE"
16449   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16450     unix_path=`$CYGPATH -u "$windows_path"`
16451     VS100BASE="$unix_path"
16452   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16453     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16454     VS100BASE="$unix_path"
16455   fi
16456 
16457     if test -d "$VS100BASE"; then
16458       if test -f "$VS100BASE/$VCVARSFILE"; then
16459         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16460 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16461         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16462       else
16463         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16464 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16465         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16466 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16467       fi
16468     fi
16469   fi
16470 
16471 
16472   if test "x$VS_ENV_CMD" = x; then
16473     VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16474     METHOD="well-known name"
16475 
16476   windows_path="$VS100BASE"
16477   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16478     unix_path=`$CYGPATH -u "$windows_path"`
16479     VS100BASE="$unix_path"
16480   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16481     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16482     VS100BASE="$unix_path"
16483   fi
16484 
16485     if test -d "$VS100BASE"; then
16486       if test -f "$VS100BASE/$VCVARSFILE"; then
16487         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16488 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16489         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16490       else
16491         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16492 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16493         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16494 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16495       fi
16496     fi
16497   fi
16498 
16499 
16500   if test "x$VS_ENV_CMD" != x; then
16501     # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
16502 
16503   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16504 
16505   # First separate the path from the arguments. This will split at the first
16506   # space.
16507   complete="$VS_ENV_CMD"
16508   path="${complete%% *}"
16509   tmp="$complete EOL"
16510   arguments="${tmp#* }"
16511 
16512   # Input might be given as Windows format, start by converting to
16513   # unix format.
16514   new_path=`$CYGPATH -u "$path"`
16515 
16516   # Now try to locate executable using which
16517   new_path=`$WHICH "$new_path" 2> /dev/null`
16518   # bat and cmd files are not always considered executable in cygwin causing which
16519   # to not find them
16520   if test "x$new_path" = x \
16521            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16522            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16523     new_path=`$CYGPATH -u "$path"`
16524   fi
16525   if test "x$new_path" = x; then
16526     # Oops. Which didn't find the executable.
16527     # The splitting of arguments from the executable at a space might have been incorrect,
16528     # since paths with space are more likely in Windows. Give it another try with the whole
16529     # argument.
16530     path="$complete"
16531     arguments="EOL"
16532     new_path=`$CYGPATH -u "$path"`
16533     new_path=`$WHICH "$new_path" 2> /dev/null`
16534     # bat and cmd files are not always considered executable in cygwin causing which
16535     # to not find them
16536     if test "x$new_path" = x \
16537              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16538              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16539       new_path=`$CYGPATH -u "$path"`
16540     fi
16541     if test "x$new_path" = x; then
16542       # It's still not found. Now this is an unrecoverable error.
16543       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16544 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16545       has_space=`$ECHO "$complete" | $GREP " "`
16546       if test "x$has_space" != x; then
16547         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16548 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16549       fi
16550       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16551     fi
16552   fi
16553 
16554   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16555   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16556   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16557   # "foo.exe" is OK but "foo" is an error.
16558   #
16559   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16560   # It is also a way to make sure we got the proper file name for the real test later on.
16561   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16562   if test "x$test_shortpath" = x; then
16563     # Short path failed, file does not exist as specified.
16564     # Try adding .exe or .cmd
16565     if test -f "${new_path}.exe"; then
16566        input_to_shortpath="${new_path}.exe"
16567     elif test -f "${new_path}.cmd"; then
16568        input_to_shortpath="${new_path}.cmd"
16569     else
16570       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
16571 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
16572       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16573 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16574       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16575     fi
16576   else
16577     input_to_shortpath="$new_path"
16578   fi
16579 
16580   # Call helper function which possibly converts this using DOS-style short mode.
16581   # If so, the updated path is stored in $new_path.
16582   new_path="$input_to_shortpath"
16583 
16584   input_path="$input_to_shortpath"
16585   # Check if we need to convert this using DOS-style short mode. If the path
16586   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16587   # take no chances and rewrite it.
16588   # Note: m4 eats our [], so we need to use [ and ] instead.
16589   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16590   if test "x$has_forbidden_chars" != x; then
16591     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16592     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16593     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16594     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16595       # Going to short mode and back again did indeed matter. Since short mode is
16596       # case insensitive, let's make it lowercase to improve readability.
16597       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16598       # Now convert it back to Unix-stile (cygpath)
16599       input_path=`$CYGPATH -u "$shortmode_path"`
16600       new_path="$input_path"
16601     fi
16602   fi
16603 
16604   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16605   if test "x$test_cygdrive_prefix" = x; then
16606     # As a simple fix, exclude /usr/bin since it's not a real path.
16607     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16608       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16609       # a path prefixed by /cygdrive for fixpath to work.
16610       new_path="$CYGWIN_ROOT_PATH$input_path"
16611     fi
16612   fi
16613 
16614   # remove trailing .exe if any
16615   new_path="${new_path/%.exe/}"
16616 
16617   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16618 
16619   # First separate the path from the arguments. This will split at the first
16620   # space.
16621   complete="$VS_ENV_CMD"
16622   path="${complete%% *}"
16623   tmp="$complete EOL"
16624   arguments="${tmp#* }"
16625 
16626   # Input might be given as Windows format, start by converting to
16627   # unix format.
16628   new_path="$path"
16629 
16630   windows_path="$new_path"
16631   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16632     unix_path=`$CYGPATH -u "$windows_path"`
16633     new_path="$unix_path"
16634   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16635     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16636     new_path="$unix_path"
16637   fi
16638 
16639 
16640   # Now try to locate executable using which
16641   new_path=`$WHICH "$new_path" 2> /dev/null`
16642 
16643   if test "x$new_path" = x; then
16644     # Oops. Which didn't find the executable.
16645     # The splitting of arguments from the executable at a space might have been incorrect,
16646     # since paths with space are more likely in Windows. Give it another try with the whole
16647     # argument.
16648     path="$complete"
16649     arguments="EOL"
16650     new_path="$path"
16651 
16652   windows_path="$new_path"
16653   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16654     unix_path=`$CYGPATH -u "$windows_path"`
16655     new_path="$unix_path"
16656   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16657     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16658     new_path="$unix_path"
16659   fi
16660 
16661 
16662     new_path=`$WHICH "$new_path" 2> /dev/null`
16663 
16664     if test "x$new_path" = x; then
16665       # It's still not found. Now this is an unrecoverable error.
16666       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16667 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16668       has_space=`$ECHO "$complete" | $GREP " "`
16669       if test "x$has_space" != x; then
16670         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16671 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16672       fi
16673       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16674     fi
16675   fi
16676 
16677   # Now new_path has a complete unix path to the binary
16678   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16679     # Keep paths in /bin as-is, but remove trailing .exe if any
16680     new_path="${new_path/%.exe/}"
16681     # Do not save /bin paths to all_fixpath_prefixes!
16682   else
16683     # Not in mixed or Windows style, start by that.
16684     new_path=`cmd //c echo $new_path`
16685 
16686   input_path="$new_path"
16687   # Check if we need to convert this using DOS-style short mode. If the path
16688   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16689   # take no chances and rewrite it.
16690   # Note: m4 eats our [], so we need to use [ and ] instead.
16691   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16692   if test "x$has_forbidden_chars" != x; then
16693     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16694     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16695   fi
16696 
16697     # Output is in $new_path
16698 
16699   windows_path="$new_path"
16700   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16701     unix_path=`$CYGPATH -u "$windows_path"`
16702     new_path="$unix_path"
16703   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16704     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16705     new_path="$unix_path"
16706   fi
16707 
16708     # remove trailing .exe if any
16709     new_path="${new_path/%.exe/}"
16710 
16711     # Save the first 10 bytes of this path to the storage, so fixpath can work.
16712     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16713   fi
16714 
16715   else
16716     # We're on a posix platform. Hooray! :)
16717     # First separate the path from the arguments. This will split at the first
16718     # space.
16719     complete="$VS_ENV_CMD"
16720     path="${complete%% *}"
16721     tmp="$complete EOL"
16722     arguments="${tmp#* }"
16723 
16724     # Cannot rely on the command "which" here since it doesn't always work.
16725     is_absolute_path=`$ECHO "$path" | $GREP ^/`
16726     if test -z "$is_absolute_path"; then
16727       # Path to executable is not absolute. Find it.
16728       IFS_save="$IFS"
16729       IFS=:
16730       for p in $PATH; do
16731         if test -f "$p/$path" && test -x "$p/$path"; then
16732           new_path="$p/$path"
16733           break
16734         fi
16735       done
16736       IFS="$IFS_save"
16737     else
16738       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
16739 $as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
16740       new_path="$path"
16741     fi
16742 
16743     if test "x$new_path" = x; then
16744         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16745 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16746         has_space=`$ECHO "$complete" | $GREP " "`
16747         if test "x$has_space" != x; then
16748           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16749 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16750         fi
16751         as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16752       fi
16753   fi
16754 
16755       # Now join together the path and the arguments once again
16756       if test "x$arguments" != xEOL; then
16757         new_complete="$new_path ${arguments% *}"
16758       else
16759         new_complete="$new_path"
16760       fi
16761 
16762   if test "x$complete" != "x$new_complete"; then
16763       VS_ENV_CMD="$new_complete"
16764       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
16765 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
16766     fi
16767 
16768 
16769     # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
16770     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
16771 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
16772     cd $OUTPUT_ROOT
16773     # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
16774     # to autoconf standards.
16775 
16776     #----
16777 
16778     # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
16779     # but calculate the difference in Cygwin environment before/after running it and then
16780     # apply the diff.
16781 
16782     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
16783       _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
16784       _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
16785       _dosbash=`cygpath -a -w -s \`which bash\`.*`
16786     else
16787       _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
16788       _dosbash=`cmd //c echo \`which bash\``
16789     fi
16790 
16791     # generate the set of exported vars before/after the vs10 setup
16792     $ECHO "@echo off"                                           >  localdevenvtmp.bat
16793     $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
16794     $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
16795     $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
16796 
16797     # Now execute the newly created bat file.
16798     # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
16799     cmd /c localdevenvtmp.bat | cat
16800 
16801     # apply the diff (less some non-vs10 vars named by "!")
16802     $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
16803     $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
16804     $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
16805 
16806     # cleanup
16807     $RM localdevenvtmp*
16808     #----
16809     cd $CURDIR
16810     if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
16811       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16812 $as_echo "no" >&6; }
16813       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
16814 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
16815       { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16816 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16817       { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16818 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16819       as_fn_error $? "Cannot continue" "$LINENO" 5
16820     fi
16821 
16822     # Now set all paths and other env variables. This will allow the rest of
16823     # the configure script to find and run the compiler in the proper way.
16824     { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
16825 $as_echo "$as_me: Setting extracted environment variables" >&6;}
16826     . $OUTPUT_ROOT/localdevenv.sh
16827   else
16828     # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
16829     { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
16830 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
16831   fi
16832 
16833   # At this point, we should have corrent variables in the environment, or we can't continue.
16834   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
16835 $as_echo_n "checking for Visual Studio variables... " >&6; }
16836 
16837   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
16838     if test "x$INCLUDE" = x || test "x$LIB" = x; then
16839       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
16840 $as_echo "present but broken" >&6; }
16841       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
16842     else
16843       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16844 $as_echo "ok" >&6; }
16845       # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
16846       VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
16847       VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
16848       VS_PATH="$PATH"
16849 
16850 
16851 
16852     fi
16853   else
16854     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16855 $as_echo "not found" >&6; }
16856 
16857     if test "x$VS_ENV_CMD" = x; then
16858       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
16859 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
16860       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
16861 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
16862     else
16863       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
16864 $as_echo "$as_me: Running the extraction script failed." >&6;}
16865     fi
16866     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16867 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16868     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16869 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16870     as_fn_error $? "Cannot continue" "$LINENO" 5
16871   fi
16872 
16873   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
16874 $as_echo_n "checking for msvcr100.dll... " >&6; }
16875 
16876 # Check whether --with-msvcr-dll was given.
16877 if test "${with_msvcr_dll+set}" = set; then :
16878   withval=$with_msvcr_dll;
16879 fi
16880 
16881   if test "x$with_msvcr_dll" != x; then
16882     MSVCR_DLL="$with_msvcr_dll"
16883   else
16884     if test "x$VCINSTALLDIR" != x; then
16885       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16886         MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
16887       else
16888         MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
16889         if test "x$MSVCR_DLL" = x; then
16890           MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
16891         fi
16892       fi
16893       if test "x$MSVCR_DLL" != x; then
16894         { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16895 $as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16896       else
16897         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16898 $as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16899       fi
16900     fi
16901     if test "x$MSVCR_DLL" = x; then
16902       if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
16903         { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
16904 $as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
16905         MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
16906       fi
16907     fi
16908   fi
16909   if test "x$MSVCR_DLL" = x; then
16910     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16911 $as_echo "no" >&6; }
16912     as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
16913   fi
16914   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
16915 $as_echo "$MSVCR_DLL" >&6; }
16916 
16917   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16918 
16919   # Input might be given as Windows format, start by converting to
16920   # unix format.
16921   path="$MSVCR_DLL"
16922   new_path=`$CYGPATH -u "$path"`
16923 
16924   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16925   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16926   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16927   # "foo.exe" is OK but "foo" is an error.
16928   #
16929   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16930   # It is also a way to make sure we got the proper file name for the real test later on.
16931   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16932   if test "x$test_shortpath" = x; then
16933     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16934 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16935     as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
16936   fi
16937 
16938   # Call helper function which possibly converts this using DOS-style short mode.
16939   # If so, the updated path is stored in $new_path.
16940 
16941   input_path="$new_path"
16942   # Check if we need to convert this using DOS-style short mode. If the path
16943   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16944   # take no chances and rewrite it.
16945   # Note: m4 eats our [], so we need to use [ and ] instead.
16946   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16947   if test "x$has_forbidden_chars" != x; then
16948     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16949     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16950     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16951     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16952       # Going to short mode and back again did indeed matter. Since short mode is
16953       # case insensitive, let's make it lowercase to improve readability.
16954       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16955       # Now convert it back to Unix-stile (cygpath)
16956       input_path=`$CYGPATH -u "$shortmode_path"`
16957       new_path="$input_path"
16958     fi
16959   fi
16960 
16961   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16962   if test "x$test_cygdrive_prefix" = x; then
16963     # As a simple fix, exclude /usr/bin since it's not a real path.
16964     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16965       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16966       # a path prefixed by /cygdrive for fixpath to work.
16967       new_path="$CYGWIN_ROOT_PATH$input_path"
16968     fi
16969   fi
16970 
16971 
16972   if test "x$path" != "x$new_path"; then
16973     MSVCR_DLL="$new_path"
16974     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16975 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16976   fi
16977 
16978   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16979 
16980   path="$MSVCR_DLL"
16981   has_colon=`$ECHO $path | $GREP ^.:`
16982   new_path="$path"
16983   if test "x$has_colon" = x; then
16984     # Not in mixed or Windows style, start by that.
16985     new_path=`cmd //c echo $path`
16986   fi
16987 
16988 
16989   input_path="$new_path"
16990   # Check if we need to convert this using DOS-style short mode. If the path
16991   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16992   # take no chances and rewrite it.
16993   # Note: m4 eats our [], so we need to use [ and ] instead.
16994   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16995   if test "x$has_forbidden_chars" != x; then
16996     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16997     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16998   fi
16999 
17000 
17001   windows_path="$new_path"
17002   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17003     unix_path=`$CYGPATH -u "$windows_path"`
17004     new_path="$unix_path"
17005   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17006     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17007     new_path="$unix_path"
17008   fi
17009 
17010   if test "x$path" != "x$new_path"; then
17011     MSVCR_DLL="$new_path"
17012     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17013 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17014   fi
17015 
17016   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17017   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17018 
17019   else
17020     # We're on a posix platform. Hooray! :)
17021     path="$MSVCR_DLL"
17022 
17023     if test ! -f "$path" && test ! -d "$path"; then
17024       as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
17025     fi
17026 
17027     has_space=`$ECHO "$path" | $GREP " "`
17028     if test "x$has_space" != x; then
17029       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17030 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17031       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17032     fi
17033   fi
17034 
17035 
17036 
17037 
17038 # Check whether --with-dxsdk was given.
17039 if test "${with_dxsdk+set}" = set; then :
17040   withval=$with_dxsdk;
17041 fi
17042 
17043 
17044 # Check whether --with-dxsdk-lib was given.
17045 if test "${with_dxsdk_lib+set}" = set; then :
17046   withval=$with_dxsdk_lib;
17047 fi
17048 
17049 
17050 # Check whether --with-dxsdk-include was given.
17051 if test "${with_dxsdk_include+set}" = set; then :
17052   withval=$with_dxsdk_include;
17053 fi
17054 
17055 
17056   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK" >&5
17057 $as_echo_n "checking for DirectX SDK... " >&6; }
17058 
17059   if test "x$with_dxsdk" != x; then
17060     dxsdk_path="$with_dxsdk"
17061   elif test "x$DXSDK_DIR" != x; then
17062     dxsdk_path="$DXSDK_DIR"
17063   elif test -d "C:/DXSDK"; then
17064     dxsdk_path="C:/DXSDK"
17065   else
17066     as_fn_error $? "Could not find the DirectX SDK" "$LINENO" 5
17067   fi
17068   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dxsdk_path" >&5
17069 $as_echo "$dxsdk_path" >&6; }
17070 
17071   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17072 
17073   # Input might be given as Windows format, start by converting to
17074   # unix format.
17075   path="$dxsdk_path"
17076   new_path=`$CYGPATH -u "$path"`
17077 
17078   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17079   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17080   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17081   # "foo.exe" is OK but "foo" is an error.
17082   #
17083   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17084   # It is also a way to make sure we got the proper file name for the real test later on.
17085   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17086   if test "x$test_shortpath" = x; then
17087     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17088 $as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17089     as_fn_error $? "Cannot locate the the path of dxsdk_path" "$LINENO" 5
17090   fi
17091 
17092   # Call helper function which possibly converts this using DOS-style short mode.
17093   # If so, the updated path is stored in $new_path.
17094 
17095   input_path="$new_path"
17096   # Check if we need to convert this using DOS-style short mode. If the path
17097   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17098   # take no chances and rewrite it.
17099   # Note: m4 eats our [], so we need to use [ and ] instead.
17100   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17101   if test "x$has_forbidden_chars" != x; then
17102     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17103     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17104     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17105     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17106       # Going to short mode and back again did indeed matter. Since short mode is
17107       # case insensitive, let's make it lowercase to improve readability.
17108       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17109       # Now convert it back to Unix-stile (cygpath)
17110       input_path=`$CYGPATH -u "$shortmode_path"`
17111       new_path="$input_path"
17112     fi
17113   fi
17114 
17115   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17116   if test "x$test_cygdrive_prefix" = x; then
17117     # As a simple fix, exclude /usr/bin since it's not a real path.
17118     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17119       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17120       # a path prefixed by /cygdrive for fixpath to work.
17121       new_path="$CYGWIN_ROOT_PATH$input_path"
17122     fi
17123   fi
17124 
17125 
17126   if test "x$path" != "x$new_path"; then
17127     dxsdk_path="$new_path"
17128     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17129 $as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17130   fi
17131 
17132   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17133 
17134   path="$dxsdk_path"
17135   has_colon=`$ECHO $path | $GREP ^.:`
17136   new_path="$path"
17137   if test "x$has_colon" = x; then
17138     # Not in mixed or Windows style, start by that.
17139     new_path=`cmd //c echo $path`
17140   fi
17141 
17142 
17143   input_path="$new_path"
17144   # Check if we need to convert this using DOS-style short mode. If the path
17145   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17146   # take no chances and rewrite it.
17147   # Note: m4 eats our [], so we need to use [ and ] instead.
17148   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17149   if test "x$has_forbidden_chars" != x; then
17150     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17151     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17152   fi
17153 
17154 
17155   windows_path="$new_path"
17156   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17157     unix_path=`$CYGPATH -u "$windows_path"`
17158     new_path="$unix_path"
17159   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17160     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17161     new_path="$unix_path"
17162   fi
17163 
17164   if test "x$path" != "x$new_path"; then
17165     dxsdk_path="$new_path"
17166     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17167 $as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17168   fi
17169 
17170   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17171   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17172 
17173   else
17174     # We're on a posix platform. Hooray! :)
17175     path="$dxsdk_path"
17176 
17177     if test ! -f "$path" && test ! -d "$path"; then
17178       as_fn_error $? "The path of dxsdk_path, which resolves as \"$path\", is not found." "$LINENO" 5
17179     fi
17180 
17181     has_space=`$ECHO "$path" | $GREP " "`
17182     if test "x$has_space" != x; then
17183       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17184 $as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17185       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17186     fi
17187   fi
17188 
17189 
17190   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK lib dir" >&5
17191 $as_echo_n "checking for DirectX SDK lib dir... " >&6; }
17192   if test "x$with_dxsdk_lib" != x; then
17193     DXSDK_LIB_PATH="$with_dxsdk_lib"
17194   elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
17195     DXSDK_LIB_PATH="$dxsdk_path/Lib/x64"
17196   else
17197     DXSDK_LIB_PATH="$dxsdk_path/Lib"
17198   fi
17199   # dsound.lib is linked to in jsoundds
17200   if test ! -f "$DXSDK_LIB_PATH/dsound.lib"; then
17201     as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17202   fi
17203   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_LIB_PATH" >&5
17204 $as_echo "$DXSDK_LIB_PATH" >&6; }
17205 
17206   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17207 
17208   # Input might be given as Windows format, start by converting to
17209   # unix format.
17210   path="$DXSDK_LIB_PATH"
17211   new_path=`$CYGPATH -u "$path"`
17212 
17213   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17214   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17215   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17216   # "foo.exe" is OK but "foo" is an error.
17217   #
17218   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17219   # It is also a way to make sure we got the proper file name for the real test later on.
17220   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17221   if test "x$test_shortpath" = x; then
17222     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17223 $as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17224     as_fn_error $? "Cannot locate the the path of DXSDK_LIB_PATH" "$LINENO" 5
17225   fi
17226 
17227   # Call helper function which possibly converts this using DOS-style short mode.
17228   # If so, the updated path is stored in $new_path.
17229 
17230   input_path="$new_path"
17231   # Check if we need to convert this using DOS-style short mode. If the path
17232   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17233   # take no chances and rewrite it.
17234   # Note: m4 eats our [], so we need to use [ and ] instead.
17235   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17236   if test "x$has_forbidden_chars" != x; then
17237     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17238     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17239     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17240     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17241       # Going to short mode and back again did indeed matter. Since short mode is
17242       # case insensitive, let's make it lowercase to improve readability.
17243       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17244       # Now convert it back to Unix-stile (cygpath)
17245       input_path=`$CYGPATH -u "$shortmode_path"`
17246       new_path="$input_path"
17247     fi
17248   fi
17249 
17250   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17251   if test "x$test_cygdrive_prefix" = x; then
17252     # As a simple fix, exclude /usr/bin since it's not a real path.
17253     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17254       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17255       # a path prefixed by /cygdrive for fixpath to work.
17256       new_path="$CYGWIN_ROOT_PATH$input_path"
17257     fi
17258   fi
17259 
17260 
17261   if test "x$path" != "x$new_path"; then
17262     DXSDK_LIB_PATH="$new_path"
17263     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17264 $as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17265   fi
17266 
17267   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17268 
17269   path="$DXSDK_LIB_PATH"
17270   has_colon=`$ECHO $path | $GREP ^.:`
17271   new_path="$path"
17272   if test "x$has_colon" = x; then
17273     # Not in mixed or Windows style, start by that.
17274     new_path=`cmd //c echo $path`
17275   fi
17276 
17277 
17278   input_path="$new_path"
17279   # Check if we need to convert this using DOS-style short mode. If the path
17280   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17281   # take no chances and rewrite it.
17282   # Note: m4 eats our [], so we need to use [ and ] instead.
17283   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17284   if test "x$has_forbidden_chars" != x; then
17285     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17286     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17287   fi
17288 
17289 
17290   windows_path="$new_path"
17291   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17292     unix_path=`$CYGPATH -u "$windows_path"`
17293     new_path="$unix_path"
17294   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17295     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17296     new_path="$unix_path"
17297   fi
17298 
17299   if test "x$path" != "x$new_path"; then
17300     DXSDK_LIB_PATH="$new_path"
17301     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17302 $as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17303   fi
17304 
17305   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17306   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17307 
17308   else
17309     # We're on a posix platform. Hooray! :)
17310     path="$DXSDK_LIB_PATH"
17311 
17312     if test ! -f "$path" && test ! -d "$path"; then
17313       as_fn_error $? "The path of DXSDK_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17314     fi
17315 
17316     has_space=`$ECHO "$path" | $GREP " "`
17317     if test "x$has_space" != x; then
17318       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17319 $as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17320       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17321     fi
17322   fi
17323 
17324 
17325   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK include dir" >&5
17326 $as_echo_n "checking for DirectX SDK include dir... " >&6; }
17327   if test "x$with_dxsdk_include" != x; then
17328     DXSDK_INCLUDE_PATH="$with_dxsdk_include"
17329   else
17330     DXSDK_INCLUDE_PATH="$dxsdk_path/Include"
17331   fi
17332   # dsound.h is included in jsoundds
17333   if test ! -f "$DXSDK_INCLUDE_PATH/dsound.h"; then
17334     as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17335   fi
17336   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_INCLUDE_PATH" >&5
17337 $as_echo "$DXSDK_INCLUDE_PATH" >&6; }
17338 
17339   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17340 
17341   # Input might be given as Windows format, start by converting to
17342   # unix format.
17343   path="$DXSDK_INCLUDE_PATH"
17344   new_path=`$CYGPATH -u "$path"`
17345 
17346   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17347   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17348   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17349   # "foo.exe" is OK but "foo" is an error.
17350   #
17351   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17352   # It is also a way to make sure we got the proper file name for the real test later on.
17353   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17354   if test "x$test_shortpath" = x; then
17355     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17356 $as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17357     as_fn_error $? "Cannot locate the the path of DXSDK_INCLUDE_PATH" "$LINENO" 5
17358   fi
17359 
17360   # Call helper function which possibly converts this using DOS-style short mode.
17361   # If so, the updated path is stored in $new_path.
17362 
17363   input_path="$new_path"
17364   # Check if we need to convert this using DOS-style short mode. If the path
17365   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17366   # take no chances and rewrite it.
17367   # Note: m4 eats our [], so we need to use [ and ] instead.
17368   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17369   if test "x$has_forbidden_chars" != x; then
17370     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17371     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17372     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17373     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17374       # Going to short mode and back again did indeed matter. Since short mode is
17375       # case insensitive, let's make it lowercase to improve readability.
17376       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17377       # Now convert it back to Unix-stile (cygpath)
17378       input_path=`$CYGPATH -u "$shortmode_path"`
17379       new_path="$input_path"
17380     fi
17381   fi
17382 
17383   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17384   if test "x$test_cygdrive_prefix" = x; then
17385     # As a simple fix, exclude /usr/bin since it's not a real path.
17386     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17387       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17388       # a path prefixed by /cygdrive for fixpath to work.
17389       new_path="$CYGWIN_ROOT_PATH$input_path"
17390     fi
17391   fi
17392 
17393 
17394   if test "x$path" != "x$new_path"; then
17395     DXSDK_INCLUDE_PATH="$new_path"
17396     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17397 $as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17398   fi
17399 
17400   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17401 
17402   path="$DXSDK_INCLUDE_PATH"
17403   has_colon=`$ECHO $path | $GREP ^.:`
17404   new_path="$path"
17405   if test "x$has_colon" = x; then
17406     # Not in mixed or Windows style, start by that.
17407     new_path=`cmd //c echo $path`
17408   fi
17409 
17410 
17411   input_path="$new_path"
17412   # Check if we need to convert this using DOS-style short mode. If the path
17413   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17414   # take no chances and rewrite it.
17415   # Note: m4 eats our [], so we need to use [ and ] instead.
17416   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17417   if test "x$has_forbidden_chars" != x; then
17418     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17419     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17420   fi
17421 
17422 
17423   windows_path="$new_path"
17424   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17425     unix_path=`$CYGPATH -u "$windows_path"`
17426     new_path="$unix_path"
17427   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17428     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17429     new_path="$unix_path"
17430   fi
17431 
17432   if test "x$path" != "x$new_path"; then
17433     DXSDK_INCLUDE_PATH="$new_path"
17434     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17435 $as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17436   fi
17437 
17438   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17439   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17440 
17441   else
17442     # We're on a posix platform. Hooray! :)
17443     path="$DXSDK_INCLUDE_PATH"
17444 
17445     if test ! -f "$path" && test ! -d "$path"; then
17446       as_fn_error $? "The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17447     fi
17448 
17449     has_space=`$ECHO "$path" | $GREP " "`
17450     if test "x$has_space" != x; then
17451       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17452 $as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17453       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17454     fi
17455   fi
17456 
17457 
17458 
17459 
17460   LDFLAGS_JDK="$LDFLAGS_JDK -libpath:$DXSDK_LIB_PATH"
17461 
17462 fi
17463 
17464 
17465 
17466 # If --build AND --host is set, then the configure script will find any
17467 # cross compilation tools in the PATH. Cross compilation tools
17468 # follows the cross compilation standard where they are prefixed with ${host}.
17469 # For example the binary i686-sun-solaris2.10-gcc
17470 # will cross compile for i686-sun-solaris2.10
17471 # If neither of build and host is not set, then build=host and the
17472 # default compiler found in the path will be used.
17473 # Setting only --host, does not seem to be really supported.
17474 # Please set both --build and --host if you want to cross compile.
17475 
17476 if test "x$COMPILE_TYPE" = "xcross"; then
17477     # Now we to find a C/C++ compiler that can build executables for the build
17478     # platform. We can't use the AC_PROG_CC macro, since it can only be used
17479     # once. Also, we need to do this before adding a tools dir to the path,
17480     # otherwise we might pick up cross-compilers which don't use standard naming.
17481     # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
17482     # to wait until they are properly discovered.
17483     for ac_prog in cl cc gcc
17484 do
17485   # Extract the first word of "$ac_prog", so it can be a program name with args.
17486 set dummy $ac_prog; ac_word=$2
17487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17488 $as_echo_n "checking for $ac_word... " >&6; }
17489 if ${ac_cv_path_BUILD_CC+:} false; then :
17490   $as_echo_n "(cached) " >&6
17491 else
17492   case $BUILD_CC in
17493   [\\/]* | ?:[\\/]*)
17494   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
17495   ;;
17496   *)
17497   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17498 for as_dir in $PATH
17499 do
17500   IFS=$as_save_IFS
17501   test -z "$as_dir" && as_dir=.
17502     for ac_exec_ext in '' $ac_executable_extensions; do
17503   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17504     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
17505     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17506     break 2
17507   fi
17508 done
17509   done
17510 IFS=$as_save_IFS
17511 
17512   ;;
17513 esac
17514 fi
17515 BUILD_CC=$ac_cv_path_BUILD_CC
17516 if test -n "$BUILD_CC"; then
17517   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
17518 $as_echo "$BUILD_CC" >&6; }
17519 else
17520   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17521 $as_echo "no" >&6; }
17522 fi
17523 
17524 
17525   test -n "$BUILD_CC" && break
17526 done
17527 
17528 
17529   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17530 
17531   # First separate the path from the arguments. This will split at the first
17532   # space.
17533   complete="$BUILD_CC"
17534   path="${complete%% *}"
17535   tmp="$complete EOL"
17536   arguments="${tmp#* }"
17537 
17538   # Input might be given as Windows format, start by converting to
17539   # unix format.
17540   new_path=`$CYGPATH -u "$path"`
17541 
17542   # Now try to locate executable using which
17543   new_path=`$WHICH "$new_path" 2> /dev/null`
17544   # bat and cmd files are not always considered executable in cygwin causing which
17545   # to not find them
17546   if test "x$new_path" = x \
17547            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17548            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17549     new_path=`$CYGPATH -u "$path"`
17550   fi
17551   if test "x$new_path" = x; then
17552     # Oops. Which didn't find the executable.
17553     # The splitting of arguments from the executable at a space might have been incorrect,
17554     # since paths with space are more likely in Windows. Give it another try with the whole
17555     # argument.
17556     path="$complete"
17557     arguments="EOL"
17558     new_path=`$CYGPATH -u "$path"`
17559     new_path=`$WHICH "$new_path" 2> /dev/null`
17560     # bat and cmd files are not always considered executable in cygwin causing which
17561     # to not find them
17562     if test "x$new_path" = x \
17563              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17564              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17565       new_path=`$CYGPATH -u "$path"`
17566     fi
17567     if test "x$new_path" = x; then
17568       # It's still not found. Now this is an unrecoverable error.
17569       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17570 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17571       has_space=`$ECHO "$complete" | $GREP " "`
17572       if test "x$has_space" != x; then
17573         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17574 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17575       fi
17576       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17577     fi
17578   fi
17579 
17580   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17581   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17582   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17583   # "foo.exe" is OK but "foo" is an error.
17584   #
17585   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17586   # It is also a way to make sure we got the proper file name for the real test later on.
17587   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17588   if test "x$test_shortpath" = x; then
17589     # Short path failed, file does not exist as specified.
17590     # Try adding .exe or .cmd
17591     if test -f "${new_path}.exe"; then
17592        input_to_shortpath="${new_path}.exe"
17593     elif test -f "${new_path}.cmd"; then
17594        input_to_shortpath="${new_path}.cmd"
17595     else
17596       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
17597 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
17598       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17599 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17600       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17601     fi
17602   else
17603     input_to_shortpath="$new_path"
17604   fi
17605 
17606   # Call helper function which possibly converts this using DOS-style short mode.
17607   # If so, the updated path is stored in $new_path.
17608   new_path="$input_to_shortpath"
17609 
17610   input_path="$input_to_shortpath"
17611   # Check if we need to convert this using DOS-style short mode. If the path
17612   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17613   # take no chances and rewrite it.
17614   # Note: m4 eats our [], so we need to use [ and ] instead.
17615   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17616   if test "x$has_forbidden_chars" != x; then
17617     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17618     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17619     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17620     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17621       # Going to short mode and back again did indeed matter. Since short mode is
17622       # case insensitive, let's make it lowercase to improve readability.
17623       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17624       # Now convert it back to Unix-stile (cygpath)
17625       input_path=`$CYGPATH -u "$shortmode_path"`
17626       new_path="$input_path"
17627     fi
17628   fi
17629 
17630   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17631   if test "x$test_cygdrive_prefix" = x; then
17632     # As a simple fix, exclude /usr/bin since it's not a real path.
17633     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17634       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17635       # a path prefixed by /cygdrive for fixpath to work.
17636       new_path="$CYGWIN_ROOT_PATH$input_path"
17637     fi
17638   fi
17639 
17640   # remove trailing .exe if any
17641   new_path="${new_path/%.exe/}"
17642 
17643   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17644 
17645   # First separate the path from the arguments. This will split at the first
17646   # space.
17647   complete="$BUILD_CC"
17648   path="${complete%% *}"
17649   tmp="$complete EOL"
17650   arguments="${tmp#* }"
17651 
17652   # Input might be given as Windows format, start by converting to
17653   # unix format.
17654   new_path="$path"
17655 
17656   windows_path="$new_path"
17657   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17658     unix_path=`$CYGPATH -u "$windows_path"`
17659     new_path="$unix_path"
17660   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17661     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17662     new_path="$unix_path"
17663   fi
17664 
17665 
17666   # Now try to locate executable using which
17667   new_path=`$WHICH "$new_path" 2> /dev/null`
17668 
17669   if test "x$new_path" = x; then
17670     # Oops. Which didn't find the executable.
17671     # The splitting of arguments from the executable at a space might have been incorrect,
17672     # since paths with space are more likely in Windows. Give it another try with the whole
17673     # argument.
17674     path="$complete"
17675     arguments="EOL"
17676     new_path="$path"
17677 
17678   windows_path="$new_path"
17679   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17680     unix_path=`$CYGPATH -u "$windows_path"`
17681     new_path="$unix_path"
17682   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17683     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17684     new_path="$unix_path"
17685   fi
17686 
17687 
17688     new_path=`$WHICH "$new_path" 2> /dev/null`
17689 
17690     if test "x$new_path" = x; then
17691       # It's still not found. Now this is an unrecoverable error.
17692       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17693 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17694       has_space=`$ECHO "$complete" | $GREP " "`
17695       if test "x$has_space" != x; then
17696         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17697 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17698       fi
17699       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17700     fi
17701   fi
17702 
17703   # Now new_path has a complete unix path to the binary
17704   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17705     # Keep paths in /bin as-is, but remove trailing .exe if any
17706     new_path="${new_path/%.exe/}"
17707     # Do not save /bin paths to all_fixpath_prefixes!
17708   else
17709     # Not in mixed or Windows style, start by that.
17710     new_path=`cmd //c echo $new_path`
17711 
17712   input_path="$new_path"
17713   # Check if we need to convert this using DOS-style short mode. If the path
17714   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17715   # take no chances and rewrite it.
17716   # Note: m4 eats our [], so we need to use [ and ] instead.
17717   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17718   if test "x$has_forbidden_chars" != x; then
17719     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17720     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17721   fi
17722 
17723     # Output is in $new_path
17724 
17725   windows_path="$new_path"
17726   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17727     unix_path=`$CYGPATH -u "$windows_path"`
17728     new_path="$unix_path"
17729   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17730     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17731     new_path="$unix_path"
17732   fi
17733 
17734     # remove trailing .exe if any
17735     new_path="${new_path/%.exe/}"
17736 
17737     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17738     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17739   fi
17740 
17741   else
17742     # We're on a posix platform. Hooray! :)
17743     # First separate the path from the arguments. This will split at the first
17744     # space.
17745     complete="$BUILD_CC"
17746     path="${complete%% *}"
17747     tmp="$complete EOL"
17748     arguments="${tmp#* }"
17749 
17750     # Cannot rely on the command "which" here since it doesn't always work.
17751     is_absolute_path=`$ECHO "$path" | $GREP ^/`
17752     if test -z "$is_absolute_path"; then
17753       # Path to executable is not absolute. Find it.
17754       IFS_save="$IFS"
17755       IFS=:
17756       for p in $PATH; do
17757         if test -f "$p/$path" && test -x "$p/$path"; then
17758           new_path="$p/$path"
17759           break
17760         fi
17761       done
17762       IFS="$IFS_save"
17763     else
17764       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
17765 $as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
17766       new_path="$path"
17767     fi
17768 
17769     if test "x$new_path" = x; then
17770         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17771 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17772         has_space=`$ECHO "$complete" | $GREP " "`
17773         if test "x$has_space" != x; then
17774           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17775 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17776         fi
17777         as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17778       fi
17779   fi
17780 
17781       # Now join together the path and the arguments once again
17782       if test "x$arguments" != xEOL; then
17783         new_complete="$new_path ${arguments% *}"
17784       else
17785         new_complete="$new_path"
17786       fi
17787 
17788   if test "x$complete" != "x$new_complete"; then
17789       BUILD_CC="$new_complete"
17790       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
17791 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
17792     fi
17793 
17794     for ac_prog in cl CC g++
17795 do
17796   # Extract the first word of "$ac_prog", so it can be a program name with args.
17797 set dummy $ac_prog; ac_word=$2
17798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17799 $as_echo_n "checking for $ac_word... " >&6; }
17800 if ${ac_cv_path_BUILD_CXX+:} false; then :
17801   $as_echo_n "(cached) " >&6
17802 else
17803   case $BUILD_CXX in
17804   [\\/]* | ?:[\\/]*)
17805   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
17806   ;;
17807   *)
17808   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17809 for as_dir in $PATH
17810 do
17811   IFS=$as_save_IFS
17812   test -z "$as_dir" && as_dir=.
17813     for ac_exec_ext in '' $ac_executable_extensions; do
17814   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17815     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
17816     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17817     break 2
17818   fi
17819 done
17820   done
17821 IFS=$as_save_IFS
17822 
17823   ;;
17824 esac
17825 fi
17826 BUILD_CXX=$ac_cv_path_BUILD_CXX
17827 if test -n "$BUILD_CXX"; then
17828   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
17829 $as_echo "$BUILD_CXX" >&6; }
17830 else
17831   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17832 $as_echo "no" >&6; }
17833 fi
17834 
17835 
17836   test -n "$BUILD_CXX" && break
17837 done
17838 
17839 
17840   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17841 
17842   # First separate the path from the arguments. This will split at the first
17843   # space.
17844   complete="$BUILD_CXX"
17845   path="${complete%% *}"
17846   tmp="$complete EOL"
17847   arguments="${tmp#* }"
17848 
17849   # Input might be given as Windows format, start by converting to
17850   # unix format.
17851   new_path=`$CYGPATH -u "$path"`
17852 
17853   # Now try to locate executable using which
17854   new_path=`$WHICH "$new_path" 2> /dev/null`
17855   # bat and cmd files are not always considered executable in cygwin causing which
17856   # to not find them
17857   if test "x$new_path" = x \
17858            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17859            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17860     new_path=`$CYGPATH -u "$path"`
17861   fi
17862   if test "x$new_path" = x; then
17863     # Oops. Which didn't find the executable.
17864     # The splitting of arguments from the executable at a space might have been incorrect,
17865     # since paths with space are more likely in Windows. Give it another try with the whole
17866     # argument.
17867     path="$complete"
17868     arguments="EOL"
17869     new_path=`$CYGPATH -u "$path"`
17870     new_path=`$WHICH "$new_path" 2> /dev/null`
17871     # bat and cmd files are not always considered executable in cygwin causing which
17872     # to not find them
17873     if test "x$new_path" = x \
17874              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17875              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17876       new_path=`$CYGPATH -u "$path"`
17877     fi
17878     if test "x$new_path" = x; then
17879       # It's still not found. Now this is an unrecoverable error.
17880       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17881 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17882       has_space=`$ECHO "$complete" | $GREP " "`
17883       if test "x$has_space" != x; then
17884         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17885 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17886       fi
17887       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17888     fi
17889   fi
17890 
17891   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17892   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17893   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17894   # "foo.exe" is OK but "foo" is an error.
17895   #
17896   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17897   # It is also a way to make sure we got the proper file name for the real test later on.
17898   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17899   if test "x$test_shortpath" = x; then
17900     # Short path failed, file does not exist as specified.
17901     # Try adding .exe or .cmd
17902     if test -f "${new_path}.exe"; then
17903        input_to_shortpath="${new_path}.exe"
17904     elif test -f "${new_path}.cmd"; then
17905        input_to_shortpath="${new_path}.cmd"
17906     else
17907       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
17908 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
17909       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17910 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17911       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17912     fi
17913   else
17914     input_to_shortpath="$new_path"
17915   fi
17916 
17917   # Call helper function which possibly converts this using DOS-style short mode.
17918   # If so, the updated path is stored in $new_path.
17919   new_path="$input_to_shortpath"
17920 
17921   input_path="$input_to_shortpath"
17922   # Check if we need to convert this using DOS-style short mode. If the path
17923   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17924   # take no chances and rewrite it.
17925   # Note: m4 eats our [], so we need to use [ and ] instead.
17926   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17927   if test "x$has_forbidden_chars" != x; then
17928     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17929     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17930     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17931     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17932       # Going to short mode and back again did indeed matter. Since short mode is
17933       # case insensitive, let's make it lowercase to improve readability.
17934       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17935       # Now convert it back to Unix-stile (cygpath)
17936       input_path=`$CYGPATH -u "$shortmode_path"`
17937       new_path="$input_path"
17938     fi
17939   fi
17940 
17941   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17942   if test "x$test_cygdrive_prefix" = x; then
17943     # As a simple fix, exclude /usr/bin since it's not a real path.
17944     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17945       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17946       # a path prefixed by /cygdrive for fixpath to work.
17947       new_path="$CYGWIN_ROOT_PATH$input_path"
17948     fi
17949   fi
17950 
17951   # remove trailing .exe if any
17952   new_path="${new_path/%.exe/}"
17953 
17954   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17955 
17956   # First separate the path from the arguments. This will split at the first
17957   # space.
17958   complete="$BUILD_CXX"
17959   path="${complete%% *}"
17960   tmp="$complete EOL"
17961   arguments="${tmp#* }"
17962 
17963   # Input might be given as Windows format, start by converting to
17964   # unix format.
17965   new_path="$path"
17966 
17967   windows_path="$new_path"
17968   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17969     unix_path=`$CYGPATH -u "$windows_path"`
17970     new_path="$unix_path"
17971   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17972     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17973     new_path="$unix_path"
17974   fi
17975 
17976 
17977   # Now try to locate executable using which
17978   new_path=`$WHICH "$new_path" 2> /dev/null`
17979 
17980   if test "x$new_path" = x; then
17981     # Oops. Which didn't find the executable.
17982     # The splitting of arguments from the executable at a space might have been incorrect,
17983     # since paths with space are more likely in Windows. Give it another try with the whole
17984     # argument.
17985     path="$complete"
17986     arguments="EOL"
17987     new_path="$path"
17988 
17989   windows_path="$new_path"
17990   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17991     unix_path=`$CYGPATH -u "$windows_path"`
17992     new_path="$unix_path"
17993   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17994     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17995     new_path="$unix_path"
17996   fi
17997 
17998 
17999     new_path=`$WHICH "$new_path" 2> /dev/null`
18000 
18001     if test "x$new_path" = x; then
18002       # It's still not found. Now this is an unrecoverable error.
18003       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18004 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18005       has_space=`$ECHO "$complete" | $GREP " "`
18006       if test "x$has_space" != x; then
18007         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18008 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18009       fi
18010       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18011     fi
18012   fi
18013 
18014   # Now new_path has a complete unix path to the binary
18015   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18016     # Keep paths in /bin as-is, but remove trailing .exe if any
18017     new_path="${new_path/%.exe/}"
18018     # Do not save /bin paths to all_fixpath_prefixes!
18019   else
18020     # Not in mixed or Windows style, start by that.
18021     new_path=`cmd //c echo $new_path`
18022 
18023   input_path="$new_path"
18024   # Check if we need to convert this using DOS-style short mode. If the path
18025   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18026   # take no chances and rewrite it.
18027   # Note: m4 eats our [], so we need to use [ and ] instead.
18028   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18029   if test "x$has_forbidden_chars" != x; then
18030     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18031     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18032   fi
18033 
18034     # Output is in $new_path
18035 
18036   windows_path="$new_path"
18037   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18038     unix_path=`$CYGPATH -u "$windows_path"`
18039     new_path="$unix_path"
18040   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18041     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18042     new_path="$unix_path"
18043   fi
18044 
18045     # remove trailing .exe if any
18046     new_path="${new_path/%.exe/}"
18047 
18048     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18049     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18050   fi
18051 
18052   else
18053     # We're on a posix platform. Hooray! :)
18054     # First separate the path from the arguments. This will split at the first
18055     # space.
18056     complete="$BUILD_CXX"
18057     path="${complete%% *}"
18058     tmp="$complete EOL"
18059     arguments="${tmp#* }"
18060 
18061     # Cannot rely on the command "which" here since it doesn't always work.
18062     is_absolute_path=`$ECHO "$path" | $GREP ^/`
18063     if test -z "$is_absolute_path"; then
18064       # Path to executable is not absolute. Find it.
18065       IFS_save="$IFS"
18066       IFS=:
18067       for p in $PATH; do
18068         if test -f "$p/$path" && test -x "$p/$path"; then
18069           new_path="$p/$path"
18070           break
18071         fi
18072       done
18073       IFS="$IFS_save"
18074     else
18075       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18076 $as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18077       new_path="$path"
18078     fi
18079 
18080     if test "x$new_path" = x; then
18081         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18082 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18083         has_space=`$ECHO "$complete" | $GREP " "`
18084         if test "x$has_space" != x; then
18085           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18086 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18087         fi
18088         as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18089       fi
18090   fi
18091 
18092       # Now join together the path and the arguments once again
18093       if test "x$arguments" != xEOL; then
18094         new_complete="$new_path ${arguments% *}"
18095       else
18096         new_complete="$new_path"
18097       fi
18098 
18099   if test "x$complete" != "x$new_complete"; then
18100       BUILD_CXX="$new_complete"
18101       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18102 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18103     fi
18104 
18105     # Extract the first word of "ld", so it can be a program name with args.
18106 set dummy ld; ac_word=$2
18107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18108 $as_echo_n "checking for $ac_word... " >&6; }
18109 if ${ac_cv_path_BUILD_LD+:} false; then :
18110   $as_echo_n "(cached) " >&6
18111 else
18112   case $BUILD_LD in
18113   [\\/]* | ?:[\\/]*)
18114   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18115   ;;
18116   *)
18117   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18118 for as_dir in $PATH
18119 do
18120   IFS=$as_save_IFS
18121   test -z "$as_dir" && as_dir=.
18122     for ac_exec_ext in '' $ac_executable_extensions; do
18123   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18124     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18125     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18126     break 2
18127   fi
18128 done
18129   done
18130 IFS=$as_save_IFS
18131 
18132   ;;
18133 esac
18134 fi
18135 BUILD_LD=$ac_cv_path_BUILD_LD
18136 if test -n "$BUILD_LD"; then
18137   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18138 $as_echo "$BUILD_LD" >&6; }
18139 else
18140   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18141 $as_echo "no" >&6; }
18142 fi
18143 
18144 
18145 
18146   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18147 
18148   # First separate the path from the arguments. This will split at the first
18149   # space.
18150   complete="$BUILD_LD"
18151   path="${complete%% *}"
18152   tmp="$complete EOL"
18153   arguments="${tmp#* }"
18154 
18155   # Input might be given as Windows format, start by converting to
18156   # unix format.
18157   new_path=`$CYGPATH -u "$path"`
18158 
18159   # Now try to locate executable using which
18160   new_path=`$WHICH "$new_path" 2> /dev/null`
18161   # bat and cmd files are not always considered executable in cygwin causing which
18162   # to not find them
18163   if test "x$new_path" = x \
18164            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18165            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18166     new_path=`$CYGPATH -u "$path"`
18167   fi
18168   if test "x$new_path" = x; then
18169     # Oops. Which didn't find the executable.
18170     # The splitting of arguments from the executable at a space might have been incorrect,
18171     # since paths with space are more likely in Windows. Give it another try with the whole
18172     # argument.
18173     path="$complete"
18174     arguments="EOL"
18175     new_path=`$CYGPATH -u "$path"`
18176     new_path=`$WHICH "$new_path" 2> /dev/null`
18177     # bat and cmd files are not always considered executable in cygwin causing which
18178     # to not find them
18179     if test "x$new_path" = x \
18180              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18181              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18182       new_path=`$CYGPATH -u "$path"`
18183     fi
18184     if test "x$new_path" = x; then
18185       # It's still not found. Now this is an unrecoverable error.
18186       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18187 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18188       has_space=`$ECHO "$complete" | $GREP " "`
18189       if test "x$has_space" != x; then
18190         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18191 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18192       fi
18193       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18194     fi
18195   fi
18196 
18197   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18198   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18199   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18200   # "foo.exe" is OK but "foo" is an error.
18201   #
18202   # This test is therefore slightly more accurate than "test -f" to check for file precense.
18203   # It is also a way to make sure we got the proper file name for the real test later on.
18204   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18205   if test "x$test_shortpath" = x; then
18206     # Short path failed, file does not exist as specified.
18207     # Try adding .exe or .cmd
18208     if test -f "${new_path}.exe"; then
18209        input_to_shortpath="${new_path}.exe"
18210     elif test -f "${new_path}.cmd"; then
18211        input_to_shortpath="${new_path}.cmd"
18212     else
18213       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18214 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18215       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18216 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18217       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18218     fi
18219   else
18220     input_to_shortpath="$new_path"
18221   fi
18222 
18223   # Call helper function which possibly converts this using DOS-style short mode.
18224   # If so, the updated path is stored in $new_path.
18225   new_path="$input_to_shortpath"
18226 
18227   input_path="$input_to_shortpath"
18228   # Check if we need to convert this using DOS-style short mode. If the path
18229   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18230   # take no chances and rewrite it.
18231   # Note: m4 eats our [], so we need to use [ and ] instead.
18232   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18233   if test "x$has_forbidden_chars" != x; then
18234     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18235     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18236     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18237     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18238       # Going to short mode and back again did indeed matter. Since short mode is
18239       # case insensitive, let's make it lowercase to improve readability.
18240       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18241       # Now convert it back to Unix-stile (cygpath)
18242       input_path=`$CYGPATH -u "$shortmode_path"`
18243       new_path="$input_path"
18244     fi
18245   fi
18246 
18247   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18248   if test "x$test_cygdrive_prefix" = x; then
18249     # As a simple fix, exclude /usr/bin since it's not a real path.
18250     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18251       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18252       # a path prefixed by /cygdrive for fixpath to work.
18253       new_path="$CYGWIN_ROOT_PATH$input_path"
18254     fi
18255   fi
18256 
18257   # remove trailing .exe if any
18258   new_path="${new_path/%.exe/}"
18259 
18260   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18261 
18262   # First separate the path from the arguments. This will split at the first
18263   # space.
18264   complete="$BUILD_LD"
18265   path="${complete%% *}"
18266   tmp="$complete EOL"
18267   arguments="${tmp#* }"
18268 
18269   # Input might be given as Windows format, start by converting to
18270   # unix format.
18271   new_path="$path"
18272 
18273   windows_path="$new_path"
18274   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18275     unix_path=`$CYGPATH -u "$windows_path"`
18276     new_path="$unix_path"
18277   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18278     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18279     new_path="$unix_path"
18280   fi
18281 
18282 
18283   # Now try to locate executable using which
18284   new_path=`$WHICH "$new_path" 2> /dev/null`
18285 
18286   if test "x$new_path" = x; then
18287     # Oops. Which didn't find the executable.
18288     # The splitting of arguments from the executable at a space might have been incorrect,
18289     # since paths with space are more likely in Windows. Give it another try with the whole
18290     # argument.
18291     path="$complete"
18292     arguments="EOL"
18293     new_path="$path"
18294 
18295   windows_path="$new_path"
18296   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18297     unix_path=`$CYGPATH -u "$windows_path"`
18298     new_path="$unix_path"
18299   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18300     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18301     new_path="$unix_path"
18302   fi
18303 
18304 
18305     new_path=`$WHICH "$new_path" 2> /dev/null`
18306 
18307     if test "x$new_path" = x; then
18308       # It's still not found. Now this is an unrecoverable error.
18309       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18310 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18311       has_space=`$ECHO "$complete" | $GREP " "`
18312       if test "x$has_space" != x; then
18313         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18314 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18315       fi
18316       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18317     fi
18318   fi
18319 
18320   # Now new_path has a complete unix path to the binary
18321   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18322     # Keep paths in /bin as-is, but remove trailing .exe if any
18323     new_path="${new_path/%.exe/}"
18324     # Do not save /bin paths to all_fixpath_prefixes!
18325   else
18326     # Not in mixed or Windows style, start by that.
18327     new_path=`cmd //c echo $new_path`
18328 
18329   input_path="$new_path"
18330   # Check if we need to convert this using DOS-style short mode. If the path
18331   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18332   # take no chances and rewrite it.
18333   # Note: m4 eats our [], so we need to use [ and ] instead.
18334   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18335   if test "x$has_forbidden_chars" != x; then
18336     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18337     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18338   fi
18339 
18340     # Output is in $new_path
18341 
18342   windows_path="$new_path"
18343   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18344     unix_path=`$CYGPATH -u "$windows_path"`
18345     new_path="$unix_path"
18346   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18347     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18348     new_path="$unix_path"
18349   fi
18350 
18351     # remove trailing .exe if any
18352     new_path="${new_path/%.exe/}"
18353 
18354     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18355     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18356   fi
18357 
18358   else
18359     # We're on a posix platform. Hooray! :)
18360     # First separate the path from the arguments. This will split at the first
18361     # space.
18362     complete="$BUILD_LD"
18363     path="${complete%% *}"
18364     tmp="$complete EOL"
18365     arguments="${tmp#* }"
18366 
18367     # Cannot rely on the command "which" here since it doesn't always work.
18368     is_absolute_path=`$ECHO "$path" | $GREP ^/`
18369     if test -z "$is_absolute_path"; then
18370       # Path to executable is not absolute. Find it.
18371       IFS_save="$IFS"
18372       IFS=:
18373       for p in $PATH; do
18374         if test -f "$p/$path" && test -x "$p/$path"; then
18375           new_path="$p/$path"
18376           break
18377         fi
18378       done
18379       IFS="$IFS_save"
18380     else
18381       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
18382 $as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
18383       new_path="$path"
18384     fi
18385 
18386     if test "x$new_path" = x; then
18387         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18388 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18389         has_space=`$ECHO "$complete" | $GREP " "`
18390         if test "x$has_space" != x; then
18391           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18392 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18393         fi
18394         as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18395       fi
18396   fi
18397 
18398       # Now join together the path and the arguments once again
18399       if test "x$arguments" != xEOL; then
18400         new_complete="$new_path ${arguments% *}"
18401       else
18402         new_complete="$new_path"
18403       fi
18404 
18405   if test "x$complete" != "x$new_complete"; then
18406       BUILD_LD="$new_complete"
18407       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
18408 $as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
18409     fi
18410 
18411 fi
18412 
18413 
18414 
18415 
18416 # If a devkit is found on the builddeps server, then prepend its path to the
18417 # PATH variable. If there are cross compilers available in the devkit, these
18418 # will be found by AC_PROG_CC et al.
18419 DEVKIT=
18420 
18421 
18422     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
18423         # Source the builddeps file again, to make sure it uses the latest variables!
18424         . $builddepsfile
18425         # Look for a target and build machine specific resource!
18426         eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
18427         if test "x$resource" = x; then
18428             # Ok, lets instead look for a target specific resource
18429             eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
18430         fi
18431         if test "x$resource" = x; then
18432             # Ok, lets instead look for a build specific resource
18433             eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
18434         fi
18435         if test "x$resource" = x; then
18436             # Ok, lets instead look for a generic resource
18437             # (The devkit comes from M4 and not the shell, thus no need for eval here.)
18438             resource=${builddep_devkit}
18439         fi
18440         if test "x$resource" != x; then
18441             { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
18442 $as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
18443             # If the resource in the builddeps.conf file is an existing directory,
18444             # for example /java/linux/cups
18445             if test -d ${resource}; then
18446                depdir=${resource}
18447             else
18448 
18449 # devkit is for example mymodule
18450 # $resource is for example libs/general/libmymod_1_2_3.zip
18451 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
18452 # $with_builddeps_dir is for example /localhome/builddeps
18453 # depdir is the name of the variable into which we store the depdir, eg MYMOD
18454 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
18455 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
18456     filename=`basename $resource`
18457     filebase=`echo $filename | sed 's/\.[^\.]*$//'`
18458     filebase=${filename%%.*}
18459     extension=${filename#*.}
18460     installdir=$with_builddeps_dir/$filebase
18461     if test ! -f $installdir/$filename.unpacked; then
18462         { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
18463 $as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
18464         if test ! -d $installdir; then
18465             mkdir -p $installdir
18466         fi
18467         if test ! -d $installdir; then
18468             as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
18469         fi
18470         tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
18471         touch $tmpfile
18472         if test ! -f $tmpfile; then
18473             as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
18474         fi
18475 
18476     # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
18477     # $tmpfile is the local file name for the downloaded file.
18478     VALID_TOOL=no
18479     if test "x$BDEPS_FTP" = xwget; then
18480        VALID_TOOL=yes
18481        wget -O $tmpfile $with_builddeps_server/$resource
18482     fi
18483     if test "x$BDEPS_FTP" = xlftp; then
18484        VALID_TOOL=yes
18485        lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
18486     fi
18487     if test "x$BDEPS_FTP" = xftp; then
18488         VALID_TOOL=yes
18489         FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
18490         FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
18491         FTPUSERPWD=${FTPSERVER%%@*}
18492         if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
18493             FTPUSER=${userpwd%%:*}
18494             FTPPWD=${userpwd#*@}
18495             FTPSERVER=${FTPSERVER#*@}
18496         else
18497             FTPUSER=ftp
18498             FTPPWD=ftp
18499         fi
18500         # the "pass" command does not work on some
18501         # ftp clients (read ftp.exe) but if it works,
18502         # passive mode is better!
18503         (\
18504             echo "user $FTPUSER $FTPPWD"        ;\
18505             echo "pass"                         ;\
18506             echo "bin"                          ;\
18507             echo "get $FTPPATH $tmpfile"              ;\
18508         ) | ftp -in $FTPSERVER
18509     fi
18510     if test "x$VALID_TOOL" != xyes; then
18511        as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
18512     fi
18513 
18514         mv $tmpfile $installdir/$filename
18515         if test ! -s $installdir/$filename; then
18516             as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
18517         fi
18518         case "$extension" in
18519             zip)  echo "Unzipping $installdir/$filename..."
18520                (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
18521             ;;
18522             tar.gz) echo "Untaring $installdir/$filename..."
18523                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18524             ;;
18525             tgz) echo "Untaring $installdir/$filename..."
18526                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18527             ;;
18528             *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
18529             ;;
18530         esac
18531     fi
18532     if test -f $installdir/$filename.unpacked; then
18533         depdir=$installdir
18534     fi
18535 
18536             fi
18537             # Source the builddeps file again, because in the previous command, the depdir
18538             # was updated to point at the current build dependency install directory.
18539             . $builddepsfile
18540             # Now extract variables from the builddeps.conf files.
18541             theroot=${builddep_devkit_ROOT}
18542             thecflags=${builddep_devkit_CFLAGS}
18543             thelibs=${builddep_devkit_LIBS}
18544             if test "x$depdir" = x; then
18545                 as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
18546             fi
18547             DEVKIT=$depdir
18548             if test "x$theroot" != x; then
18549                DEVKIT="$theroot"
18550             fi
18551             if test "x$thecflags" != x; then
18552                DEVKIT_CFLAGS="$thecflags"
18553             fi
18554             if test "x$thelibs" != x; then
18555                DEVKIT_LIBS="$thelibs"
18556             fi
18557             # Found devkit
18558                      PATH="$DEVKIT/bin:$PATH"
18559                      SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
18560                      if test "x$x_includes" = "xNONE"; then
18561                          x_includes="$SYS_ROOT/usr/include/X11"
18562                      fi
18563                      if test "x$x_libraries" = "xNONE"; then
18564                          x_libraries="$SYS_ROOT/usr/lib"
18565                      fi
18566 
18567 
18568         fi
18569 
18570     fi
18571 
18572 
18573 if test "x$SYS_ROOT" != "x/" ; then
18574     CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
18575     CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
18576     OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18577     OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18578     CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
18579     LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
18580 fi
18581 
18582 # Store the CFLAGS etal passed to the configure script.
18583 ORG_CFLAGS="$CFLAGS"
18584 ORG_CXXFLAGS="$CXXFLAGS"
18585 ORG_OBJCFLAGS="$OBJCFLAGS"
18586 
18587 # autoconf magic only relies on PATH, so update it if tools dir is specified
18588 OLD_PATH="$PATH"
18589 if test "x$TOOLS_DIR" != x; then
18590   PATH=$TOOLS_DIR:$PATH
18591 fi
18592 
18593 
18594 ### Locate C compiler (CC)
18595 
18596 # On windows, only cl.exe is supported.
18597 # On Solaris, cc is preferred to gcc.
18598 # Elsewhere, gcc is preferred to cc.
18599 
18600 if test "x$CC" != x; then
18601   COMPILER_CHECK_LIST="$CC"
18602 elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18603   COMPILER_CHECK_LIST="cl"
18604 elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
18605   COMPILER_CHECK_LIST="cc gcc"
18606 else
18607   COMPILER_CHECK_LIST="gcc cc"
18608 fi
18609 
18610 
18611   COMPILER_NAME=C
18612 
18613   CC=
18614   # If TOOLS_DIR is set, check for all compiler names in there first
18615   # before checking the rest of the PATH.
18616   if test -n "$TOOLS_DIR"; then
18617     PATH_save="$PATH"
18618     PATH="$TOOLS_DIR"
18619     for ac_prog in $COMPILER_CHECK_LIST
18620 do
18621   # Extract the first word of "$ac_prog", so it can be a program name with args.
18622 set dummy $ac_prog; ac_word=$2
18623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18624 $as_echo_n "checking for $ac_word... " >&6; }
18625 if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
18626   $as_echo_n "(cached) " >&6
18627 else
18628   case $TOOLS_DIR_CC in
18629   [\\/]* | ?:[\\/]*)
18630   ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
18631   ;;
18632   *)
18633   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18634 for as_dir in $PATH
18635 do
18636   IFS=$as_save_IFS
18637   test -z "$as_dir" && as_dir=.
18638     for ac_exec_ext in '' $ac_executable_extensions; do
18639   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18640     ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
18641     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18642     break 2
18643   fi
18644 done
18645   done
18646 IFS=$as_save_IFS
18647 
18648   ;;
18649 esac
18650 fi
18651 TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
18652 if test -n "$TOOLS_DIR_CC"; then
18653   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
18654 $as_echo "$TOOLS_DIR_CC" >&6; }
18655 else
18656   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18657 $as_echo "no" >&6; }
18658 fi
18659 
18660 
18661   test -n "$TOOLS_DIR_CC" && break
18662 done
18663 
18664     CC=$TOOLS_DIR_CC
18665     PATH="$PATH_save"
18666   fi
18667 
18668   # AC_PATH_PROGS can't be run multiple times with the same variable,
18669   # so create a new name for this run.
18670   if test "x$CC" = x; then
18671     for ac_prog in $COMPILER_CHECK_LIST
18672 do
18673   # Extract the first word of "$ac_prog", so it can be a program name with args.
18674 set dummy $ac_prog; ac_word=$2
18675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18676 $as_echo_n "checking for $ac_word... " >&6; }
18677 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
18678   $as_echo_n "(cached) " >&6
18679 else
18680   case $POTENTIAL_CC in
18681   [\\/]* | ?:[\\/]*)
18682   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
18683   ;;
18684   *)
18685   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18686 for as_dir in $PATH
18687 do
18688   IFS=$as_save_IFS
18689   test -z "$as_dir" && as_dir=.
18690     for ac_exec_ext in '' $ac_executable_extensions; do
18691   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18692     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
18693     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18694     break 2
18695   fi
18696 done
18697   done
18698 IFS=$as_save_IFS
18699 
18700   ;;
18701 esac
18702 fi
18703 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
18704 if test -n "$POTENTIAL_CC"; then
18705   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
18706 $as_echo "$POTENTIAL_CC" >&6; }
18707 else
18708   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18709 $as_echo "no" >&6; }
18710 fi
18711 
18712 
18713   test -n "$POTENTIAL_CC" && break
18714 done
18715 
18716     CC=$POTENTIAL_CC
18717   fi
18718 
18719   if test "x$CC" = x; then
18720 
18721     # Print a helpful message on how to acquire the necessary build dependency.
18722     # devkit is the help tag: freetyp2, cups, pulse, alsa etc
18723     MISSING_DEPENDENCY=devkit
18724     PKGHANDLER_COMMAND=
18725 
18726     case $PKGHANDLER in
18727         apt-get)
18728                 apt_help     $MISSING_DEPENDENCY ;;
18729     yum)
18730                 yum_help     $MISSING_DEPENDENCY ;;
18731         port)
18732                 port_help    $MISSING_DEPENDENCY ;;
18733         pkgutil)
18734                 pkgutil_help $MISSING_DEPENDENCY ;;
18735         pkgadd)
18736                 pkgadd_help  $MISSING_DEPENDENCY ;;
18737     * )
18738       break ;;
18739     esac
18740 
18741     if test "x$PKGHANDLER_COMMAND" != x; then
18742         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
18743     fi
18744 
18745       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
18746   fi
18747 
18748   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18749 
18750   # First separate the path from the arguments. This will split at the first
18751   # space.
18752   complete="$CC"
18753   path="${complete%% *}"
18754   tmp="$complete EOL"
18755   arguments="${tmp#* }"
18756 
18757   # Input might be given as Windows format, start by converting to
18758   # unix format.
18759   new_path=`$CYGPATH -u "$path"`
18760 
18761   # Now try to locate executable using which
18762   new_path=`$WHICH "$new_path" 2> /dev/null`
18763   # bat and cmd files are not always considered executable in cygwin causing which
18764   # to not find them
18765   if test "x$new_path" = x \
18766            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18767            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18768     new_path=`$CYGPATH -u "$path"`
18769   fi
18770   if test "x$new_path" = x; then
18771     # Oops. Which didn't find the executable.
18772     # The splitting of arguments from the executable at a space might have been incorrect,
18773     # since paths with space are more likely in Windows. Give it another try with the whole
18774     # argument.
18775     path="$complete"
18776     arguments="EOL"
18777     new_path=`$CYGPATH -u "$path"`
18778     new_path=`$WHICH "$new_path" 2> /dev/null`
18779     # bat and cmd files are not always considered executable in cygwin causing which
18780     # to not find them
18781     if test "x$new_path" = x \
18782              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18783              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18784       new_path=`$CYGPATH -u "$path"`
18785     fi
18786     if test "x$new_path" = x; then
18787       # It's still not found. Now this is an unrecoverable error.
18788       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18789 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18790       has_space=`$ECHO "$complete" | $GREP " "`
18791       if test "x$has_space" != x; then
18792         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18793 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18794       fi
18795       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18796     fi
18797   fi
18798 
18799   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18800   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18801   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18802   # "foo.exe" is OK but "foo" is an error.
18803   #
18804   # This test is therefore slightly more accurate than "test -f" to check for file precense.
18805   # It is also a way to make sure we got the proper file name for the real test later on.
18806   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18807   if test "x$test_shortpath" = x; then
18808     # Short path failed, file does not exist as specified.
18809     # Try adding .exe or .cmd
18810     if test -f "${new_path}.exe"; then
18811        input_to_shortpath="${new_path}.exe"
18812     elif test -f "${new_path}.cmd"; then
18813        input_to_shortpath="${new_path}.cmd"
18814     else
18815       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
18816 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
18817       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18818 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18819       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18820     fi
18821   else
18822     input_to_shortpath="$new_path"
18823   fi
18824 
18825   # Call helper function which possibly converts this using DOS-style short mode.
18826   # If so, the updated path is stored in $new_path.
18827   new_path="$input_to_shortpath"
18828 
18829   input_path="$input_to_shortpath"
18830   # Check if we need to convert this using DOS-style short mode. If the path
18831   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18832   # take no chances and rewrite it.
18833   # Note: m4 eats our [], so we need to use [ and ] instead.
18834   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18835   if test "x$has_forbidden_chars" != x; then
18836     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18837     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18838     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18839     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18840       # Going to short mode and back again did indeed matter. Since short mode is
18841       # case insensitive, let's make it lowercase to improve readability.
18842       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18843       # Now convert it back to Unix-stile (cygpath)
18844       input_path=`$CYGPATH -u "$shortmode_path"`
18845       new_path="$input_path"
18846     fi
18847   fi
18848 
18849   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18850   if test "x$test_cygdrive_prefix" = x; then
18851     # As a simple fix, exclude /usr/bin since it's not a real path.
18852     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18853       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18854       # a path prefixed by /cygdrive for fixpath to work.
18855       new_path="$CYGWIN_ROOT_PATH$input_path"
18856     fi
18857   fi
18858 
18859   # remove trailing .exe if any
18860   new_path="${new_path/%.exe/}"
18861 
18862   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18863 
18864   # First separate the path from the arguments. This will split at the first
18865   # space.
18866   complete="$CC"
18867   path="${complete%% *}"
18868   tmp="$complete EOL"
18869   arguments="${tmp#* }"
18870 
18871   # Input might be given as Windows format, start by converting to
18872   # unix format.
18873   new_path="$path"
18874 
18875   windows_path="$new_path"
18876   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18877     unix_path=`$CYGPATH -u "$windows_path"`
18878     new_path="$unix_path"
18879   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18880     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18881     new_path="$unix_path"
18882   fi
18883 
18884 
18885   # Now try to locate executable using which
18886   new_path=`$WHICH "$new_path" 2> /dev/null`
18887 
18888   if test "x$new_path" = x; then
18889     # Oops. Which didn't find the executable.
18890     # The splitting of arguments from the executable at a space might have been incorrect,
18891     # since paths with space are more likely in Windows. Give it another try with the whole
18892     # argument.
18893     path="$complete"
18894     arguments="EOL"
18895     new_path="$path"
18896 
18897   windows_path="$new_path"
18898   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18899     unix_path=`$CYGPATH -u "$windows_path"`
18900     new_path="$unix_path"
18901   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18902     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18903     new_path="$unix_path"
18904   fi
18905 
18906 
18907     new_path=`$WHICH "$new_path" 2> /dev/null`
18908 
18909     if test "x$new_path" = x; then
18910       # It's still not found. Now this is an unrecoverable error.
18911       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18912 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18913       has_space=`$ECHO "$complete" | $GREP " "`
18914       if test "x$has_space" != x; then
18915         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18916 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18917       fi
18918       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18919     fi
18920   fi
18921 
18922   # Now new_path has a complete unix path to the binary
18923   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18924     # Keep paths in /bin as-is, but remove trailing .exe if any
18925     new_path="${new_path/%.exe/}"
18926     # Do not save /bin paths to all_fixpath_prefixes!
18927   else
18928     # Not in mixed or Windows style, start by that.
18929     new_path=`cmd //c echo $new_path`
18930 
18931   input_path="$new_path"
18932   # Check if we need to convert this using DOS-style short mode. If the path
18933   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18934   # take no chances and rewrite it.
18935   # Note: m4 eats our [], so we need to use [ and ] instead.
18936   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18937   if test "x$has_forbidden_chars" != x; then
18938     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18939     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18940   fi
18941 
18942     # Output is in $new_path
18943 
18944   windows_path="$new_path"
18945   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18946     unix_path=`$CYGPATH -u "$windows_path"`
18947     new_path="$unix_path"
18948   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18949     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18950     new_path="$unix_path"
18951   fi
18952 
18953     # remove trailing .exe if any
18954     new_path="${new_path/%.exe/}"
18955 
18956     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18957     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18958   fi
18959 
18960   else
18961     # We're on a posix platform. Hooray! :)
18962     # First separate the path from the arguments. This will split at the first
18963     # space.
18964     complete="$CC"
18965     path="${complete%% *}"
18966     tmp="$complete EOL"
18967     arguments="${tmp#* }"
18968 
18969     # Cannot rely on the command "which" here since it doesn't always work.
18970     is_absolute_path=`$ECHO "$path" | $GREP ^/`
18971     if test -z "$is_absolute_path"; then
18972       # Path to executable is not absolute. Find it.
18973       IFS_save="$IFS"
18974       IFS=:
18975       for p in $PATH; do
18976         if test -f "$p/$path" && test -x "$p/$path"; then
18977           new_path="$p/$path"
18978           break
18979         fi
18980       done
18981       IFS="$IFS_save"
18982     else
18983       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
18984 $as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
18985       new_path="$path"
18986     fi
18987 
18988     if test "x$new_path" = x; then
18989         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18990 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18991         has_space=`$ECHO "$complete" | $GREP " "`
18992         if test "x$has_space" != x; then
18993           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18994 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18995         fi
18996         as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18997       fi
18998   fi
18999 
19000       # Now join together the path and the arguments once again
19001       if test "x$arguments" != xEOL; then
19002         new_complete="$new_path ${arguments% *}"
19003       else
19004         new_complete="$new_path"
19005       fi
19006 
19007   if test "x$complete" != "x$new_complete"; then
19008       CC="$new_complete"
19009       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19010 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19011     fi
19012 
19013   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19014 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
19015   TEST_COMPILER="$CC"
19016 
19017     if test "x$OPENJDK_BUILD_OS" != xwindows; then
19018         # Follow a chain of symbolic links. Use readlink
19019         # where it exists, else fall back to horribly
19020         # complicated shell code.
19021         if test "x$READLINK_TESTED" != yes; then
19022             # On MacOSX there is a readlink tool with a different
19023             # purpose than the GNU readlink tool. Check the found readlink.
19024             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19025             if test "x$ISGNU" = x; then
19026                  # A readlink that we do not know how to use.
19027                  # Are there other non-GNU readlinks out there?
19028                  READLINK_TESTED=yes
19029                  READLINK=
19030             fi
19031         fi
19032 
19033         if test "x$READLINK" != x; then
19034             TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19035         else
19036             # Save the current directory for restoring afterwards
19037             STARTDIR=$PWD
19038             COUNTER=0
19039             sym_link_dir=`$DIRNAME $TEST_COMPILER`
19040             sym_link_file=`$BASENAME $TEST_COMPILER`
19041             # Use the system pwd and not the shell builtin to resolve directory symlinks
19042             cd $sym_link_dir
19043             cd `$THEPWDCMD`
19044             sym_link_dir=`$THEPWDCMD`
19045             # Resolve file symlinks
19046             while test $COUNTER -lt 20; do
19047                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19048                 if test "x$ISLINK" == x; then
19049                     # This is not a symbolic link! We are done!
19050                     break
19051                 fi
19052                 # Again resolve directory symlinks since the target of the just found
19053                 # link could be in a different directory
19054                 cd `$DIRNAME $ISLINK`
19055                 sym_link_dir=`$THEPWDCMD`
19056                 sym_link_file=`$BASENAME $ISLINK`
19057                 let COUNTER=COUNTER+1
19058             done
19059             cd $STARTDIR
19060             TEST_COMPILER=$sym_link_dir/$sym_link_file
19061         fi
19062     fi
19063 
19064   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19065 $as_echo "$TEST_COMPILER" >&6; }
19066   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19067 $as_echo_n "checking if CC is disguised ccache... " >&6; }
19068 
19069   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19070   if test "x$COMPILER_BASENAME" = "xccache"; then
19071     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19072 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19073     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19074     # We want to control ccache invocation ourselves, so ignore this cc and try
19075     # searching again.
19076 
19077     # Remove the path to the fake ccache cc from the PATH
19078     RETRY_COMPILER_SAVED_PATH="$PATH"
19079     COMPILER_DIRNAME=`$DIRNAME $CC`
19080     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19081 
19082     # Try again looking for our compiler
19083     if test -n "$ac_tool_prefix"; then
19084   for ac_prog in $COMPILER_CHECK_LIST
19085   do
19086     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19087 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19089 $as_echo_n "checking for $ac_word... " >&6; }
19090 if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
19091   $as_echo_n "(cached) " >&6
19092 else
19093   if test -n "$PROPER_COMPILER_CC"; then
19094   ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19095 else
19096 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19097 for as_dir in $PATH
19098 do
19099   IFS=$as_save_IFS
19100   test -z "$as_dir" && as_dir=.
19101     for ac_exec_ext in '' $ac_executable_extensions; do
19102   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19103     ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19104     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19105     break 2
19106   fi
19107 done
19108   done
19109 IFS=$as_save_IFS
19110 
19111 fi
19112 fi
19113 PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19114 if test -n "$PROPER_COMPILER_CC"; then
19115   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19116 $as_echo "$PROPER_COMPILER_CC" >&6; }
19117 else
19118   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19119 $as_echo "no" >&6; }
19120 fi
19121 
19122 
19123     test -n "$PROPER_COMPILER_CC" && break
19124   done
19125 fi
19126 if test -z "$PROPER_COMPILER_CC"; then
19127   ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19128   for ac_prog in $COMPILER_CHECK_LIST
19129 do
19130   # Extract the first word of "$ac_prog", so it can be a program name with args.
19131 set dummy $ac_prog; ac_word=$2
19132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19133 $as_echo_n "checking for $ac_word... " >&6; }
19134 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
19135   $as_echo_n "(cached) " >&6
19136 else
19137   if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19138   ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19139 else
19140 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19141 for as_dir in $PATH
19142 do
19143   IFS=$as_save_IFS
19144   test -z "$as_dir" && as_dir=.
19145     for ac_exec_ext in '' $ac_executable_extensions; do
19146   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19147     ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19148     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19149     break 2
19150   fi
19151 done
19152   done
19153 IFS=$as_save_IFS
19154 
19155 fi
19156 fi
19157 ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19158 if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19159   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19160 $as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19161 else
19162   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19163 $as_echo "no" >&6; }
19164 fi
19165 
19166 
19167   test -n "$ac_ct_PROPER_COMPILER_CC" && break
19168 done
19169 
19170   if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19171     PROPER_COMPILER_CC=""
19172   else
19173     case $cross_compiling:$ac_tool_warned in
19174 yes:)
19175 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19176 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19177 ac_tool_warned=yes ;;
19178 esac
19179     PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19180   fi
19181 fi
19182 
19183 
19184   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19185 
19186   # First separate the path from the arguments. This will split at the first
19187   # space.
19188   complete="$PROPER_COMPILER_CC"
19189   path="${complete%% *}"
19190   tmp="$complete EOL"
19191   arguments="${tmp#* }"
19192 
19193   # Input might be given as Windows format, start by converting to
19194   # unix format.
19195   new_path=`$CYGPATH -u "$path"`
19196 
19197   # Now try to locate executable using which
19198   new_path=`$WHICH "$new_path" 2> /dev/null`
19199   # bat and cmd files are not always considered executable in cygwin causing which
19200   # to not find them
19201   if test "x$new_path" = x \
19202            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19203            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19204     new_path=`$CYGPATH -u "$path"`
19205   fi
19206   if test "x$new_path" = x; then
19207     # Oops. Which didn't find the executable.
19208     # The splitting of arguments from the executable at a space might have been incorrect,
19209     # since paths with space are more likely in Windows. Give it another try with the whole
19210     # argument.
19211     path="$complete"
19212     arguments="EOL"
19213     new_path=`$CYGPATH -u "$path"`
19214     new_path=`$WHICH "$new_path" 2> /dev/null`
19215     # bat and cmd files are not always considered executable in cygwin causing which
19216     # to not find them
19217     if test "x$new_path" = x \
19218              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19219              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19220       new_path=`$CYGPATH -u "$path"`
19221     fi
19222     if test "x$new_path" = x; then
19223       # It's still not found. Now this is an unrecoverable error.
19224       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19225 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19226       has_space=`$ECHO "$complete" | $GREP " "`
19227       if test "x$has_space" != x; then
19228         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19229 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19230       fi
19231       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19232     fi
19233   fi
19234 
19235   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19236   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19237   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19238   # "foo.exe" is OK but "foo" is an error.
19239   #
19240   # This test is therefore slightly more accurate than "test -f" to check for file precense.
19241   # It is also a way to make sure we got the proper file name for the real test later on.
19242   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19243   if test "x$test_shortpath" = x; then
19244     # Short path failed, file does not exist as specified.
19245     # Try adding .exe or .cmd
19246     if test -f "${new_path}.exe"; then
19247        input_to_shortpath="${new_path}.exe"
19248     elif test -f "${new_path}.cmd"; then
19249        input_to_shortpath="${new_path}.cmd"
19250     else
19251       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19252 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19253       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19254 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19255       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19256     fi
19257   else
19258     input_to_shortpath="$new_path"
19259   fi
19260 
19261   # Call helper function which possibly converts this using DOS-style short mode.
19262   # If so, the updated path is stored in $new_path.
19263   new_path="$input_to_shortpath"
19264 
19265   input_path="$input_to_shortpath"
19266   # Check if we need to convert this using DOS-style short mode. If the path
19267   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19268   # take no chances and rewrite it.
19269   # Note: m4 eats our [], so we need to use [ and ] instead.
19270   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19271   if test "x$has_forbidden_chars" != x; then
19272     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19273     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19274     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19275     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19276       # Going to short mode and back again did indeed matter. Since short mode is
19277       # case insensitive, let's make it lowercase to improve readability.
19278       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19279       # Now convert it back to Unix-stile (cygpath)
19280       input_path=`$CYGPATH -u "$shortmode_path"`
19281       new_path="$input_path"
19282     fi
19283   fi
19284 
19285   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19286   if test "x$test_cygdrive_prefix" = x; then
19287     # As a simple fix, exclude /usr/bin since it's not a real path.
19288     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19289       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19290       # a path prefixed by /cygdrive for fixpath to work.
19291       new_path="$CYGWIN_ROOT_PATH$input_path"
19292     fi
19293   fi
19294 
19295   # remove trailing .exe if any
19296   new_path="${new_path/%.exe/}"
19297 
19298   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19299 
19300   # First separate the path from the arguments. This will split at the first
19301   # space.
19302   complete="$PROPER_COMPILER_CC"
19303   path="${complete%% *}"
19304   tmp="$complete EOL"
19305   arguments="${tmp#* }"
19306 
19307   # Input might be given as Windows format, start by converting to
19308   # unix format.
19309   new_path="$path"
19310 
19311   windows_path="$new_path"
19312   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19313     unix_path=`$CYGPATH -u "$windows_path"`
19314     new_path="$unix_path"
19315   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19316     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19317     new_path="$unix_path"
19318   fi
19319 
19320 
19321   # Now try to locate executable using which
19322   new_path=`$WHICH "$new_path" 2> /dev/null`
19323 
19324   if test "x$new_path" = x; then
19325     # Oops. Which didn't find the executable.
19326     # The splitting of arguments from the executable at a space might have been incorrect,
19327     # since paths with space are more likely in Windows. Give it another try with the whole
19328     # argument.
19329     path="$complete"
19330     arguments="EOL"
19331     new_path="$path"
19332 
19333   windows_path="$new_path"
19334   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19335     unix_path=`$CYGPATH -u "$windows_path"`
19336     new_path="$unix_path"
19337   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19338     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19339     new_path="$unix_path"
19340   fi
19341 
19342 
19343     new_path=`$WHICH "$new_path" 2> /dev/null`
19344 
19345     if test "x$new_path" = x; then
19346       # It's still not found. Now this is an unrecoverable error.
19347       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19348 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19349       has_space=`$ECHO "$complete" | $GREP " "`
19350       if test "x$has_space" != x; then
19351         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19352 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19353       fi
19354       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19355     fi
19356   fi
19357 
19358   # Now new_path has a complete unix path to the binary
19359   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19360     # Keep paths in /bin as-is, but remove trailing .exe if any
19361     new_path="${new_path/%.exe/}"
19362     # Do not save /bin paths to all_fixpath_prefixes!
19363   else
19364     # Not in mixed or Windows style, start by that.
19365     new_path=`cmd //c echo $new_path`
19366 
19367   input_path="$new_path"
19368   # Check if we need to convert this using DOS-style short mode. If the path
19369   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19370   # take no chances and rewrite it.
19371   # Note: m4 eats our [], so we need to use [ and ] instead.
19372   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19373   if test "x$has_forbidden_chars" != x; then
19374     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19375     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19376   fi
19377 
19378     # Output is in $new_path
19379 
19380   windows_path="$new_path"
19381   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19382     unix_path=`$CYGPATH -u "$windows_path"`
19383     new_path="$unix_path"
19384   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19385     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19386     new_path="$unix_path"
19387   fi
19388 
19389     # remove trailing .exe if any
19390     new_path="${new_path/%.exe/}"
19391 
19392     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19393     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19394   fi
19395 
19396   else
19397     # We're on a posix platform. Hooray! :)
19398     # First separate the path from the arguments. This will split at the first
19399     # space.
19400     complete="$PROPER_COMPILER_CC"
19401     path="${complete%% *}"
19402     tmp="$complete EOL"
19403     arguments="${tmp#* }"
19404 
19405     # Cannot rely on the command "which" here since it doesn't always work.
19406     is_absolute_path=`$ECHO "$path" | $GREP ^/`
19407     if test -z "$is_absolute_path"; then
19408       # Path to executable is not absolute. Find it.
19409       IFS_save="$IFS"
19410       IFS=:
19411       for p in $PATH; do
19412         if test -f "$p/$path" && test -x "$p/$path"; then
19413           new_path="$p/$path"
19414           break
19415         fi
19416       done
19417       IFS="$IFS_save"
19418     else
19419       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
19420 $as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
19421       new_path="$path"
19422     fi
19423 
19424     if test "x$new_path" = x; then
19425         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19426 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19427         has_space=`$ECHO "$complete" | $GREP " "`
19428         if test "x$has_space" != x; then
19429           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19430 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19431         fi
19432         as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19433       fi
19434   fi
19435 
19436       # Now join together the path and the arguments once again
19437       if test "x$arguments" != xEOL; then
19438         new_complete="$new_path ${arguments% *}"
19439       else
19440         new_complete="$new_path"
19441       fi
19442 
19443   if test "x$complete" != "x$new_complete"; then
19444       PROPER_COMPILER_CC="$new_complete"
19445       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
19446 $as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
19447     fi
19448 
19449     PATH="$RETRY_COMPILER_SAVED_PATH"
19450 
19451     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
19452 $as_echo_n "checking for resolved symbolic links for CC... " >&6; }
19453 
19454     if test "x$OPENJDK_BUILD_OS" != xwindows; then
19455         # Follow a chain of symbolic links. Use readlink
19456         # where it exists, else fall back to horribly
19457         # complicated shell code.
19458         if test "x$READLINK_TESTED" != yes; then
19459             # On MacOSX there is a readlink tool with a different
19460             # purpose than the GNU readlink tool. Check the found readlink.
19461             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19462             if test "x$ISGNU" = x; then
19463                  # A readlink that we do not know how to use.
19464                  # Are there other non-GNU readlinks out there?
19465                  READLINK_TESTED=yes
19466                  READLINK=
19467             fi
19468         fi
19469 
19470         if test "x$READLINK" != x; then
19471             PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
19472         else
19473             # Save the current directory for restoring afterwards
19474             STARTDIR=$PWD
19475             COUNTER=0
19476             sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
19477             sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
19478             # Use the system pwd and not the shell builtin to resolve directory symlinks
19479             cd $sym_link_dir
19480             cd `$THEPWDCMD`
19481             sym_link_dir=`$THEPWDCMD`
19482             # Resolve file symlinks
19483             while test $COUNTER -lt 20; do
19484                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19485                 if test "x$ISLINK" == x; then
19486                     # This is not a symbolic link! We are done!
19487                     break
19488                 fi
19489                 # Again resolve directory symlinks since the target of the just found
19490                 # link could be in a different directory
19491                 cd `$DIRNAME $ISLINK`
19492                 sym_link_dir=`$THEPWDCMD`
19493                 sym_link_file=`$BASENAME $ISLINK`
19494                 let COUNTER=COUNTER+1
19495             done
19496             cd $STARTDIR
19497             PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
19498         fi
19499     fi
19500 
19501     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19502 $as_echo "$PROPER_COMPILER_CC" >&6; }
19503     CC="$PROPER_COMPILER_CC"
19504   else
19505     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
19506 $as_echo "no, keeping CC" >&6; }
19507     CC="$TEST_COMPILER"
19508   fi
19509 
19510   COMPILER=$CC
19511   COMPILER_NAME=$COMPILER_NAME
19512 
19513   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
19514     # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
19515     COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
19516     $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
19517     if test $? -ne 0; then
19518       GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19519 
19520       { $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
19521 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
19522       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
19523 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
19524       as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19525     else
19526       COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
19527       COMPILER_VENDOR="Sun Studio"
19528     fi
19529   elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
19530     # First line typically looks something like:
19531     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
19532     COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
19533     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
19534     COMPILER_VENDOR="Microsoft CL.EXE"
19535     COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
19536     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
19537       if test "x$COMPILER_CPU_TEST" != "x80x86"; then
19538         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
19539       fi
19540     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
19541       if test "x$COMPILER_CPU_TEST" != "xx64"; then
19542         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
19543       fi
19544     fi
19545   else
19546     COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19547     # Check that this is likely to be GCC.
19548     $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
19549     if test $? -ne 0; then
19550       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
19551 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
19552       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
19553 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
19554       as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19555     fi
19556 
19557     # First line typically looks something like:
19558     # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
19559     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
19560     COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
19561   fi
19562   # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
19563   CC_VERSION="$COMPILER_VERSION"
19564   # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
19565   CC_VENDOR="$COMPILER_VENDOR"
19566 
19567   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
19568 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
19569 
19570 
19571 # Now that we have resolved CC ourself, let autoconf have its go at it
19572 ac_ext=c
19573 ac_cpp='$CPP $CPPFLAGS'
19574 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19575 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19576 ac_compiler_gnu=$ac_cv_c_compiler_gnu
19577 if test -n "$ac_tool_prefix"; then
19578   for ac_prog in $CC
19579   do
19580     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19581 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19583 $as_echo_n "checking for $ac_word... " >&6; }
19584 if ${ac_cv_prog_CC+:} false; then :
19585   $as_echo_n "(cached) " >&6
19586 else
19587   if test -n "$CC"; then
19588   ac_cv_prog_CC="$CC" # Let the user override the test.
19589 else
19590 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19591 for as_dir in $PATH
19592 do
19593   IFS=$as_save_IFS
19594   test -z "$as_dir" && as_dir=.
19595     for ac_exec_ext in '' $ac_executable_extensions; do
19596   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19597     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
19598     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19599     break 2
19600   fi
19601 done
19602   done
19603 IFS=$as_save_IFS
19604 
19605 fi
19606 fi
19607 CC=$ac_cv_prog_CC
19608 if test -n "$CC"; then
19609   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
19610 $as_echo "$CC" >&6; }
19611 else
19612   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19613 $as_echo "no" >&6; }
19614 fi
19615 
19616 
19617     test -n "$CC" && break
19618   done
19619 fi
19620 if test -z "$CC"; then
19621   ac_ct_CC=$CC
19622   for ac_prog in $CC
19623 do
19624   # Extract the first word of "$ac_prog", so it can be a program name with args.
19625 set dummy $ac_prog; ac_word=$2
19626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19627 $as_echo_n "checking for $ac_word... " >&6; }
19628 if ${ac_cv_prog_ac_ct_CC+:} false; then :
19629   $as_echo_n "(cached) " >&6
19630 else
19631   if test -n "$ac_ct_CC"; then
19632   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
19633 else
19634 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19635 for as_dir in $PATH
19636 do
19637   IFS=$as_save_IFS
19638   test -z "$as_dir" && as_dir=.
19639     for ac_exec_ext in '' $ac_executable_extensions; do
19640   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19641     ac_cv_prog_ac_ct_CC="$ac_prog"
19642     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19643     break 2
19644   fi
19645 done
19646   done
19647 IFS=$as_save_IFS
19648 
19649 fi
19650 fi
19651 ac_ct_CC=$ac_cv_prog_ac_ct_CC
19652 if test -n "$ac_ct_CC"; then
19653   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
19654 $as_echo "$ac_ct_CC" >&6; }
19655 else
19656   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19657 $as_echo "no" >&6; }
19658 fi
19659 
19660 
19661   test -n "$ac_ct_CC" && break
19662 done
19663 
19664   if test "x$ac_ct_CC" = x; then
19665     CC=""
19666   else
19667     case $cross_compiling:$ac_tool_warned in
19668 yes:)
19669 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19670 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19671 ac_tool_warned=yes ;;
19672 esac
19673     CC=$ac_ct_CC
19674   fi
19675 fi
19676 
19677 
19678 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19679 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19680 as_fn_error $? "no acceptable C compiler found in \$PATH
19681 See \`config.log' for more details" "$LINENO" 5; }
19682 
19683 # Provide some information about the compiler.
19684 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
19685 set X $ac_compile
19686 ac_compiler=$2
19687 for ac_option in --version -v -V -qversion; do
19688   { { ac_try="$ac_compiler $ac_option >&5"
19689 case "(($ac_try" in
19690   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19691   *) ac_try_echo=$ac_try;;
19692 esac
19693 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19694 $as_echo "$ac_try_echo"; } >&5
19695   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
19696   ac_status=$?
19697   if test -s conftest.err; then
19698     sed '10a\
19699 ... rest of stderr output deleted ...
19700          10q' conftest.err >conftest.er1
19701     cat conftest.er1 >&5
19702   fi
19703   rm -f conftest.er1 conftest.err
19704   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19705   test $ac_status = 0; }
19706 done
19707 
19708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19709 /* end confdefs.h.  */
19710 
19711 int
19712 main ()
19713 {
19714 
19715   ;
19716   return 0;
19717 }
19718 _ACEOF
19719 ac_clean_files_save=$ac_clean_files
19720 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
19721 # Try to create an executable without -o first, disregard a.out.
19722 # It will help us diagnose broken compilers, and finding out an intuition
19723 # of exeext.
19724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
19725 $as_echo_n "checking whether the C compiler works... " >&6; }
19726 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
19727 
19728 # The possible output files:
19729 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
19730 
19731 ac_rmfiles=
19732 for ac_file in $ac_files
19733 do
19734   case $ac_file in
19735     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19736     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
19737   esac
19738 done
19739 rm -f $ac_rmfiles
19740 
19741 if { { ac_try="$ac_link_default"
19742 case "(($ac_try" in
19743   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19744   *) ac_try_echo=$ac_try;;
19745 esac
19746 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19747 $as_echo "$ac_try_echo"; } >&5
19748   (eval "$ac_link_default") 2>&5
19749   ac_status=$?
19750   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19751   test $ac_status = 0; }; then :
19752   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
19753 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
19754 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
19755 # so that the user can short-circuit this test for compilers unknown to
19756 # Autoconf.
19757 for ac_file in $ac_files ''
19758 do
19759   test -f "$ac_file" || continue
19760   case $ac_file in
19761     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
19762         ;;
19763     [ab].out )
19764         # We found the default executable, but exeext='' is most
19765         # certainly right.
19766         break;;
19767     *.* )
19768         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
19769         then :; else
19770            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19771         fi
19772         # We set ac_cv_exeext here because the later test for it is not
19773         # safe: cross compilers may not add the suffix if given an `-o'
19774         # argument, so we may need to know it at that point already.
19775         # Even if this section looks crufty: it has the advantage of
19776         # actually working.
19777         break;;
19778     * )
19779         break;;
19780   esac
19781 done
19782 test "$ac_cv_exeext" = no && ac_cv_exeext=
19783 
19784 else
19785   ac_file=''
19786 fi
19787 if test -z "$ac_file"; then :
19788   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19789 $as_echo "no" >&6; }
19790 $as_echo "$as_me: failed program was:" >&5
19791 sed 's/^/| /' conftest.$ac_ext >&5
19792 
19793 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19794 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19795 as_fn_error 77 "C compiler cannot create executables
19796 See \`config.log' for more details" "$LINENO" 5; }
19797 else
19798   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19799 $as_echo "yes" >&6; }
19800 fi
19801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
19802 $as_echo_n "checking for C compiler default output file name... " >&6; }
19803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
19804 $as_echo "$ac_file" >&6; }
19805 ac_exeext=$ac_cv_exeext
19806 
19807 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
19808 ac_clean_files=$ac_clean_files_save
19809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
19810 $as_echo_n "checking for suffix of executables... " >&6; }
19811 if { { ac_try="$ac_link"
19812 case "(($ac_try" in
19813   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19814   *) ac_try_echo=$ac_try;;
19815 esac
19816 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19817 $as_echo "$ac_try_echo"; } >&5
19818   (eval "$ac_link") 2>&5
19819   ac_status=$?
19820   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19821   test $ac_status = 0; }; then :
19822   # If both `conftest.exe' and `conftest' are `present' (well, observable)
19823 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
19824 # work properly (i.e., refer to `conftest.exe'), while it won't with
19825 # `rm'.
19826 for ac_file in conftest.exe conftest conftest.*; do
19827   test -f "$ac_file" || continue
19828   case $ac_file in
19829     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19830     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19831           break;;
19832     * ) break;;
19833   esac
19834 done
19835 else
19836   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19837 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19838 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
19839 See \`config.log' for more details" "$LINENO" 5; }
19840 fi
19841 rm -f conftest conftest$ac_cv_exeext
19842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
19843 $as_echo "$ac_cv_exeext" >&6; }
19844 
19845 rm -f conftest.$ac_ext
19846 EXEEXT=$ac_cv_exeext
19847 ac_exeext=$EXEEXT
19848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19849 /* end confdefs.h.  */
19850 #include <stdio.h>
19851 int
19852 main ()
19853 {
19854 FILE *f = fopen ("conftest.out", "w");
19855  return ferror (f) || fclose (f) != 0;
19856 
19857   ;
19858   return 0;
19859 }
19860 _ACEOF
19861 ac_clean_files="$ac_clean_files conftest.out"
19862 # Check that the compiler produces executables we can run.  If not, either
19863 # the compiler is broken, or we cross compile.
19864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
19865 $as_echo_n "checking whether we are cross compiling... " >&6; }
19866 if test "$cross_compiling" != yes; then
19867   { { ac_try="$ac_link"
19868 case "(($ac_try" in
19869   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19870   *) ac_try_echo=$ac_try;;
19871 esac
19872 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19873 $as_echo "$ac_try_echo"; } >&5
19874   (eval "$ac_link") 2>&5
19875   ac_status=$?
19876   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19877   test $ac_status = 0; }
19878   if { ac_try='./conftest$ac_cv_exeext'
19879   { { case "(($ac_try" in
19880   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19881   *) ac_try_echo=$ac_try;;
19882 esac
19883 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19884 $as_echo "$ac_try_echo"; } >&5
19885   (eval "$ac_try") 2>&5
19886   ac_status=$?
19887   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19888   test $ac_status = 0; }; }; then
19889     cross_compiling=no
19890   else
19891     if test "$cross_compiling" = maybe; then
19892         cross_compiling=yes
19893     else
19894         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19895 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19896 as_fn_error $? "cannot run C compiled programs.
19897 If you meant to cross compile, use \`--host'.
19898 See \`config.log' for more details" "$LINENO" 5; }
19899     fi
19900   fi
19901 fi
19902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
19903 $as_echo "$cross_compiling" >&6; }
19904 
19905 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
19906 ac_clean_files=$ac_clean_files_save
19907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
19908 $as_echo_n "checking for suffix of object files... " >&6; }
19909 if ${ac_cv_objext+:} false; then :
19910   $as_echo_n "(cached) " >&6
19911 else
19912   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19913 /* end confdefs.h.  */
19914 
19915 int
19916 main ()
19917 {
19918 
19919   ;
19920   return 0;
19921 }
19922 _ACEOF
19923 rm -f conftest.o conftest.obj
19924 if { { ac_try="$ac_compile"
19925 case "(($ac_try" in
19926   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19927   *) ac_try_echo=$ac_try;;
19928 esac
19929 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19930 $as_echo "$ac_try_echo"; } >&5
19931   (eval "$ac_compile") 2>&5
19932   ac_status=$?
19933   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19934   test $ac_status = 0; }; then :
19935   for ac_file in conftest.o conftest.obj conftest.*; do
19936   test -f "$ac_file" || continue;
19937   case $ac_file in
19938     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
19939     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
19940        break;;
19941   esac
19942 done
19943 else
19944   $as_echo "$as_me: failed program was:" >&5
19945 sed 's/^/| /' conftest.$ac_ext >&5
19946 
19947 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19948 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19949 as_fn_error $? "cannot compute suffix of object files: cannot compile
19950 See \`config.log' for more details" "$LINENO" 5; }
19951 fi
19952 rm -f conftest.$ac_cv_objext conftest.$ac_ext
19953 fi
19954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
19955 $as_echo "$ac_cv_objext" >&6; }
19956 OBJEXT=$ac_cv_objext
19957 ac_objext=$OBJEXT
19958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
19959 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
19960 if ${ac_cv_c_compiler_gnu+:} false; then :
19961   $as_echo_n "(cached) " >&6
19962 else
19963   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19964 /* end confdefs.h.  */
19965 
19966 int
19967 main ()
19968 {
19969 #ifndef __GNUC__
19970        choke me
19971 #endif
19972 
19973   ;
19974   return 0;
19975 }
19976 _ACEOF
19977 if ac_fn_c_try_compile "$LINENO"; then :
19978   ac_compiler_gnu=yes
19979 else
19980   ac_compiler_gnu=no
19981 fi
19982 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19983 ac_cv_c_compiler_gnu=$ac_compiler_gnu
19984 
19985 fi
19986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
19987 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
19988 if test $ac_compiler_gnu = yes; then
19989   GCC=yes
19990 else
19991   GCC=
19992 fi
19993 ac_test_CFLAGS=${CFLAGS+set}
19994 ac_save_CFLAGS=$CFLAGS
19995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
19996 $as_echo_n "checking whether $CC accepts -g... " >&6; }
19997 if ${ac_cv_prog_cc_g+:} false; then :
19998   $as_echo_n "(cached) " >&6
19999 else
20000   ac_save_c_werror_flag=$ac_c_werror_flag
20001    ac_c_werror_flag=yes
20002    ac_cv_prog_cc_g=no
20003    CFLAGS="-g"
20004    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20005 /* end confdefs.h.  */
20006 
20007 int
20008 main ()
20009 {
20010 
20011   ;
20012   return 0;
20013 }
20014 _ACEOF
20015 if ac_fn_c_try_compile "$LINENO"; then :
20016   ac_cv_prog_cc_g=yes
20017 else
20018   CFLAGS=""
20019       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20020 /* end confdefs.h.  */
20021 
20022 int
20023 main ()
20024 {
20025 
20026   ;
20027   return 0;
20028 }
20029 _ACEOF
20030 if ac_fn_c_try_compile "$LINENO"; then :
20031 
20032 else
20033   ac_c_werror_flag=$ac_save_c_werror_flag
20034          CFLAGS="-g"
20035          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20036 /* end confdefs.h.  */
20037 
20038 int
20039 main ()
20040 {
20041 
20042   ;
20043   return 0;
20044 }
20045 _ACEOF
20046 if ac_fn_c_try_compile "$LINENO"; then :
20047   ac_cv_prog_cc_g=yes
20048 fi
20049 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20050 fi
20051 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20052 fi
20053 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20054    ac_c_werror_flag=$ac_save_c_werror_flag
20055 fi
20056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20057 $as_echo "$ac_cv_prog_cc_g" >&6; }
20058 if test "$ac_test_CFLAGS" = set; then
20059   CFLAGS=$ac_save_CFLAGS
20060 elif test $ac_cv_prog_cc_g = yes; then
20061   if test "$GCC" = yes; then
20062     CFLAGS="-g -O2"
20063   else
20064     CFLAGS="-g"
20065   fi
20066 else
20067   if test "$GCC" = yes; then
20068     CFLAGS="-O2"
20069   else
20070     CFLAGS=
20071   fi
20072 fi
20073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20074 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20075 if ${ac_cv_prog_cc_c89+:} false; then :
20076   $as_echo_n "(cached) " >&6
20077 else
20078   ac_cv_prog_cc_c89=no
20079 ac_save_CC=$CC
20080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20081 /* end confdefs.h.  */
20082 #include <stdarg.h>
20083 #include <stdio.h>
20084 #include <sys/types.h>
20085 #include <sys/stat.h>
20086 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20087 struct buf { int x; };
20088 FILE * (*rcsopen) (struct buf *, struct stat *, int);
20089 static char *e (p, i)
20090      char **p;
20091      int i;
20092 {
20093   return p[i];
20094 }
20095 static char *f (char * (*g) (char **, int), char **p, ...)
20096 {
20097   char *s;
20098   va_list v;
20099   va_start (v,p);
20100   s = g (p, va_arg (v,int));
20101   va_end (v);
20102   return s;
20103 }
20104 
20105 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20106    function prototypes and stuff, but not '\xHH' hex character constants.
20107    These don't provoke an error unfortunately, instead are silently treated
20108    as 'x'.  The following induces an error, until -std is added to get
20109    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20110    array size at least.  It's necessary to write '\x00'==0 to get something
20111    that's true only with -std.  */
20112 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20113 
20114 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20115    inside strings and character constants.  */
20116 #define FOO(x) 'x'
20117 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20118 
20119 int test (int i, double x);
20120 struct s1 {int (*f) (int a);};
20121 struct s2 {int (*f) (double a);};
20122 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20123 int argc;
20124 char **argv;
20125 int
20126 main ()
20127 {
20128 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20129   ;
20130   return 0;
20131 }
20132 _ACEOF
20133 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20134         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20135 do
20136   CC="$ac_save_CC $ac_arg"
20137   if ac_fn_c_try_compile "$LINENO"; then :
20138   ac_cv_prog_cc_c89=$ac_arg
20139 fi
20140 rm -f core conftest.err conftest.$ac_objext
20141   test "x$ac_cv_prog_cc_c89" != "xno" && break
20142 done
20143 rm -f conftest.$ac_ext
20144 CC=$ac_save_CC
20145 
20146 fi
20147 # AC_CACHE_VAL
20148 case "x$ac_cv_prog_cc_c89" in
20149   x)
20150     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20151 $as_echo "none needed" >&6; } ;;
20152   xno)
20153     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20154 $as_echo "unsupported" >&6; } ;;
20155   *)
20156     CC="$CC $ac_cv_prog_cc_c89"
20157     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20158 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20159 esac
20160 if test "x$ac_cv_prog_cc_c89" != xno; then :
20161 
20162 fi
20163 
20164 ac_ext=cpp
20165 ac_cpp='$CXXCPP $CPPFLAGS'
20166 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20167 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20168 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20169 
20170 
20171 ### Locate C++ compiler (CXX)
20172 
20173 if test "x$CXX" != x; then
20174   COMPILER_CHECK_LIST="$CXX"
20175 elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20176   COMPILER_CHECK_LIST="cl"
20177 elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20178   COMPILER_CHECK_LIST="CC g++"
20179 else
20180   COMPILER_CHECK_LIST="g++ CC"
20181 fi
20182 
20183 
20184   COMPILER_NAME=C++
20185 
20186   CXX=
20187   # If TOOLS_DIR is set, check for all compiler names in there first
20188   # before checking the rest of the PATH.
20189   if test -n "$TOOLS_DIR"; then
20190     PATH_save="$PATH"
20191     PATH="$TOOLS_DIR"
20192     for ac_prog in $COMPILER_CHECK_LIST
20193 do
20194   # Extract the first word of "$ac_prog", so it can be a program name with args.
20195 set dummy $ac_prog; ac_word=$2
20196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20197 $as_echo_n "checking for $ac_word... " >&6; }
20198 if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
20199   $as_echo_n "(cached) " >&6
20200 else
20201   case $TOOLS_DIR_CXX in
20202   [\\/]* | ?:[\\/]*)
20203   ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20204   ;;
20205   *)
20206   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20207 for as_dir in $PATH
20208 do
20209   IFS=$as_save_IFS
20210   test -z "$as_dir" && as_dir=.
20211     for ac_exec_ext in '' $ac_executable_extensions; do
20212   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20213     ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20214     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20215     break 2
20216   fi
20217 done
20218   done
20219 IFS=$as_save_IFS
20220 
20221   ;;
20222 esac
20223 fi
20224 TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20225 if test -n "$TOOLS_DIR_CXX"; then
20226   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20227 $as_echo "$TOOLS_DIR_CXX" >&6; }
20228 else
20229   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20230 $as_echo "no" >&6; }
20231 fi
20232 
20233 
20234   test -n "$TOOLS_DIR_CXX" && break
20235 done
20236 
20237     CXX=$TOOLS_DIR_CXX
20238     PATH="$PATH_save"
20239   fi
20240 
20241   # AC_PATH_PROGS can't be run multiple times with the same variable,
20242   # so create a new name for this run.
20243   if test "x$CXX" = x; then
20244     for ac_prog in $COMPILER_CHECK_LIST
20245 do
20246   # Extract the first word of "$ac_prog", so it can be a program name with args.
20247 set dummy $ac_prog; ac_word=$2
20248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20249 $as_echo_n "checking for $ac_word... " >&6; }
20250 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
20251   $as_echo_n "(cached) " >&6
20252 else
20253   case $POTENTIAL_CXX in
20254   [\\/]* | ?:[\\/]*)
20255   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20256   ;;
20257   *)
20258   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20259 for as_dir in $PATH
20260 do
20261   IFS=$as_save_IFS
20262   test -z "$as_dir" && as_dir=.
20263     for ac_exec_ext in '' $ac_executable_extensions; do
20264   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20265     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20266     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20267     break 2
20268   fi
20269 done
20270   done
20271 IFS=$as_save_IFS
20272 
20273   ;;
20274 esac
20275 fi
20276 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20277 if test -n "$POTENTIAL_CXX"; then
20278   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20279 $as_echo "$POTENTIAL_CXX" >&6; }
20280 else
20281   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20282 $as_echo "no" >&6; }
20283 fi
20284 
20285 
20286   test -n "$POTENTIAL_CXX" && break
20287 done
20288 
20289     CXX=$POTENTIAL_CXX
20290   fi
20291 
20292   if test "x$CXX" = x; then
20293 
20294     # Print a helpful message on how to acquire the necessary build dependency.
20295     # devkit is the help tag: freetyp2, cups, pulse, alsa etc
20296     MISSING_DEPENDENCY=devkit
20297     PKGHANDLER_COMMAND=
20298 
20299     case $PKGHANDLER in
20300         apt-get)
20301                 apt_help     $MISSING_DEPENDENCY ;;
20302     yum)
20303                 yum_help     $MISSING_DEPENDENCY ;;
20304         port)
20305                 port_help    $MISSING_DEPENDENCY ;;
20306         pkgutil)
20307                 pkgutil_help $MISSING_DEPENDENCY ;;
20308         pkgadd)
20309                 pkgadd_help  $MISSING_DEPENDENCY ;;
20310     * )
20311       break ;;
20312     esac
20313 
20314     if test "x$PKGHANDLER_COMMAND" != x; then
20315         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20316     fi
20317 
20318       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20319   fi
20320 
20321   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20322 
20323   # First separate the path from the arguments. This will split at the first
20324   # space.
20325   complete="$CXX"
20326   path="${complete%% *}"
20327   tmp="$complete EOL"
20328   arguments="${tmp#* }"
20329 
20330   # Input might be given as Windows format, start by converting to
20331   # unix format.
20332   new_path=`$CYGPATH -u "$path"`
20333 
20334   # Now try to locate executable using which
20335   new_path=`$WHICH "$new_path" 2> /dev/null`
20336   # bat and cmd files are not always considered executable in cygwin causing which
20337   # to not find them
20338   if test "x$new_path" = x \
20339            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20340            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20341     new_path=`$CYGPATH -u "$path"`
20342   fi
20343   if test "x$new_path" = x; then
20344     # Oops. Which didn't find the executable.
20345     # The splitting of arguments from the executable at a space might have been incorrect,
20346     # since paths with space are more likely in Windows. Give it another try with the whole
20347     # argument.
20348     path="$complete"
20349     arguments="EOL"
20350     new_path=`$CYGPATH -u "$path"`
20351     new_path=`$WHICH "$new_path" 2> /dev/null`
20352     # bat and cmd files are not always considered executable in cygwin causing which
20353     # to not find them
20354     if test "x$new_path" = x \
20355              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20356              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20357       new_path=`$CYGPATH -u "$path"`
20358     fi
20359     if test "x$new_path" = x; then
20360       # It's still not found. Now this is an unrecoverable error.
20361       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20362 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20363       has_space=`$ECHO "$complete" | $GREP " "`
20364       if test "x$has_space" != x; then
20365         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20366 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20367       fi
20368       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20369     fi
20370   fi
20371 
20372   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20373   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20374   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20375   # "foo.exe" is OK but "foo" is an error.
20376   #
20377   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20378   # It is also a way to make sure we got the proper file name for the real test later on.
20379   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20380   if test "x$test_shortpath" = x; then
20381     # Short path failed, file does not exist as specified.
20382     # Try adding .exe or .cmd
20383     if test -f "${new_path}.exe"; then
20384        input_to_shortpath="${new_path}.exe"
20385     elif test -f "${new_path}.cmd"; then
20386        input_to_shortpath="${new_path}.cmd"
20387     else
20388       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
20389 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
20390       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20391 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20392       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20393     fi
20394   else
20395     input_to_shortpath="$new_path"
20396   fi
20397 
20398   # Call helper function which possibly converts this using DOS-style short mode.
20399   # If so, the updated path is stored in $new_path.
20400   new_path="$input_to_shortpath"
20401 
20402   input_path="$input_to_shortpath"
20403   # Check if we need to convert this using DOS-style short mode. If the path
20404   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20405   # take no chances and rewrite it.
20406   # Note: m4 eats our [], so we need to use [ and ] instead.
20407   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20408   if test "x$has_forbidden_chars" != x; then
20409     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20410     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20411     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20412     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20413       # Going to short mode and back again did indeed matter. Since short mode is
20414       # case insensitive, let's make it lowercase to improve readability.
20415       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20416       # Now convert it back to Unix-stile (cygpath)
20417       input_path=`$CYGPATH -u "$shortmode_path"`
20418       new_path="$input_path"
20419     fi
20420   fi
20421 
20422   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20423   if test "x$test_cygdrive_prefix" = x; then
20424     # As a simple fix, exclude /usr/bin since it's not a real path.
20425     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20426       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20427       # a path prefixed by /cygdrive for fixpath to work.
20428       new_path="$CYGWIN_ROOT_PATH$input_path"
20429     fi
20430   fi
20431 
20432   # remove trailing .exe if any
20433   new_path="${new_path/%.exe/}"
20434 
20435   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20436 
20437   # First separate the path from the arguments. This will split at the first
20438   # space.
20439   complete="$CXX"
20440   path="${complete%% *}"
20441   tmp="$complete EOL"
20442   arguments="${tmp#* }"
20443 
20444   # Input might be given as Windows format, start by converting to
20445   # unix format.
20446   new_path="$path"
20447 
20448   windows_path="$new_path"
20449   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20450     unix_path=`$CYGPATH -u "$windows_path"`
20451     new_path="$unix_path"
20452   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20453     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20454     new_path="$unix_path"
20455   fi
20456 
20457 
20458   # Now try to locate executable using which
20459   new_path=`$WHICH "$new_path" 2> /dev/null`
20460 
20461   if test "x$new_path" = x; then
20462     # Oops. Which didn't find the executable.
20463     # The splitting of arguments from the executable at a space might have been incorrect,
20464     # since paths with space are more likely in Windows. Give it another try with the whole
20465     # argument.
20466     path="$complete"
20467     arguments="EOL"
20468     new_path="$path"
20469 
20470   windows_path="$new_path"
20471   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20472     unix_path=`$CYGPATH -u "$windows_path"`
20473     new_path="$unix_path"
20474   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20475     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20476     new_path="$unix_path"
20477   fi
20478 
20479 
20480     new_path=`$WHICH "$new_path" 2> /dev/null`
20481 
20482     if test "x$new_path" = x; then
20483       # It's still not found. Now this is an unrecoverable error.
20484       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20485 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20486       has_space=`$ECHO "$complete" | $GREP " "`
20487       if test "x$has_space" != x; then
20488         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20489 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20490       fi
20491       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20492     fi
20493   fi
20494 
20495   # Now new_path has a complete unix path to the binary
20496   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20497     # Keep paths in /bin as-is, but remove trailing .exe if any
20498     new_path="${new_path/%.exe/}"
20499     # Do not save /bin paths to all_fixpath_prefixes!
20500   else
20501     # Not in mixed or Windows style, start by that.
20502     new_path=`cmd //c echo $new_path`
20503 
20504   input_path="$new_path"
20505   # Check if we need to convert this using DOS-style short mode. If the path
20506   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20507   # take no chances and rewrite it.
20508   # Note: m4 eats our [], so we need to use [ and ] instead.
20509   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20510   if test "x$has_forbidden_chars" != x; then
20511     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20512     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20513   fi
20514 
20515     # Output is in $new_path
20516 
20517   windows_path="$new_path"
20518   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20519     unix_path=`$CYGPATH -u "$windows_path"`
20520     new_path="$unix_path"
20521   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20522     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20523     new_path="$unix_path"
20524   fi
20525 
20526     # remove trailing .exe if any
20527     new_path="${new_path/%.exe/}"
20528 
20529     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20530     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20531   fi
20532 
20533   else
20534     # We're on a posix platform. Hooray! :)
20535     # First separate the path from the arguments. This will split at the first
20536     # space.
20537     complete="$CXX"
20538     path="${complete%% *}"
20539     tmp="$complete EOL"
20540     arguments="${tmp#* }"
20541 
20542     # Cannot rely on the command "which" here since it doesn't always work.
20543     is_absolute_path=`$ECHO "$path" | $GREP ^/`
20544     if test -z "$is_absolute_path"; then
20545       # Path to executable is not absolute. Find it.
20546       IFS_save="$IFS"
20547       IFS=:
20548       for p in $PATH; do
20549         if test -f "$p/$path" && test -x "$p/$path"; then
20550           new_path="$p/$path"
20551           break
20552         fi
20553       done
20554       IFS="$IFS_save"
20555     else
20556       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
20557 $as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
20558       new_path="$path"
20559     fi
20560 
20561     if test "x$new_path" = x; then
20562         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20563 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20564         has_space=`$ECHO "$complete" | $GREP " "`
20565         if test "x$has_space" != x; then
20566           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20567 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20568         fi
20569         as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20570       fi
20571   fi
20572 
20573       # Now join together the path and the arguments once again
20574       if test "x$arguments" != xEOL; then
20575         new_complete="$new_path ${arguments% *}"
20576       else
20577         new_complete="$new_path"
20578       fi
20579 
20580   if test "x$complete" != "x$new_complete"; then
20581       CXX="$new_complete"
20582       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
20583 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
20584     fi
20585 
20586   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
20587 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
20588   TEST_COMPILER="$CXX"
20589 
20590     if test "x$OPENJDK_BUILD_OS" != xwindows; then
20591         # Follow a chain of symbolic links. Use readlink
20592         # where it exists, else fall back to horribly
20593         # complicated shell code.
20594         if test "x$READLINK_TESTED" != yes; then
20595             # On MacOSX there is a readlink tool with a different
20596             # purpose than the GNU readlink tool. Check the found readlink.
20597             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20598             if test "x$ISGNU" = x; then
20599                  # A readlink that we do not know how to use.
20600                  # Are there other non-GNU readlinks out there?
20601                  READLINK_TESTED=yes
20602                  READLINK=
20603             fi
20604         fi
20605 
20606         if test "x$READLINK" != x; then
20607             TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
20608         else
20609             # Save the current directory for restoring afterwards
20610             STARTDIR=$PWD
20611             COUNTER=0
20612             sym_link_dir=`$DIRNAME $TEST_COMPILER`
20613             sym_link_file=`$BASENAME $TEST_COMPILER`
20614             # Use the system pwd and not the shell builtin to resolve directory symlinks
20615             cd $sym_link_dir
20616             cd `$THEPWDCMD`
20617             sym_link_dir=`$THEPWDCMD`
20618             # Resolve file symlinks
20619             while test $COUNTER -lt 20; do
20620                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20621                 if test "x$ISLINK" == x; then
20622                     # This is not a symbolic link! We are done!
20623                     break
20624                 fi
20625                 # Again resolve directory symlinks since the target of the just found
20626                 # link could be in a different directory
20627                 cd `$DIRNAME $ISLINK`
20628                 sym_link_dir=`$THEPWDCMD`
20629                 sym_link_file=`$BASENAME $ISLINK`
20630                 let COUNTER=COUNTER+1
20631             done
20632             cd $STARTDIR
20633             TEST_COMPILER=$sym_link_dir/$sym_link_file
20634         fi
20635     fi
20636 
20637   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
20638 $as_echo "$TEST_COMPILER" >&6; }
20639   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
20640 $as_echo_n "checking if CXX is disguised ccache... " >&6; }
20641 
20642   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
20643   if test "x$COMPILER_BASENAME" = "xccache"; then
20644     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
20645 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
20646     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
20647     # We want to control ccache invocation ourselves, so ignore this cc and try
20648     # searching again.
20649 
20650     # Remove the path to the fake ccache cc from the PATH
20651     RETRY_COMPILER_SAVED_PATH="$PATH"
20652     COMPILER_DIRNAME=`$DIRNAME $CXX`
20653     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
20654 
20655     # Try again looking for our compiler
20656     if test -n "$ac_tool_prefix"; then
20657   for ac_prog in $COMPILER_CHECK_LIST
20658   do
20659     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20660 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20662 $as_echo_n "checking for $ac_word... " >&6; }
20663 if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
20664   $as_echo_n "(cached) " >&6
20665 else
20666   if test -n "$PROPER_COMPILER_CXX"; then
20667   ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
20668 else
20669 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20670 for as_dir in $PATH
20671 do
20672   IFS=$as_save_IFS
20673   test -z "$as_dir" && as_dir=.
20674     for ac_exec_ext in '' $ac_executable_extensions; do
20675   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20676     ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
20677     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20678     break 2
20679   fi
20680 done
20681   done
20682 IFS=$as_save_IFS
20683 
20684 fi
20685 fi
20686 PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
20687 if test -n "$PROPER_COMPILER_CXX"; then
20688   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20689 $as_echo "$PROPER_COMPILER_CXX" >&6; }
20690 else
20691   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20692 $as_echo "no" >&6; }
20693 fi
20694 
20695 
20696     test -n "$PROPER_COMPILER_CXX" && break
20697   done
20698 fi
20699 if test -z "$PROPER_COMPILER_CXX"; then
20700   ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
20701   for ac_prog in $COMPILER_CHECK_LIST
20702 do
20703   # Extract the first word of "$ac_prog", so it can be a program name with args.
20704 set dummy $ac_prog; ac_word=$2
20705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20706 $as_echo_n "checking for $ac_word... " >&6; }
20707 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
20708   $as_echo_n "(cached) " >&6
20709 else
20710   if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20711   ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
20712 else
20713 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20714 for as_dir in $PATH
20715 do
20716   IFS=$as_save_IFS
20717   test -z "$as_dir" && as_dir=.
20718     for ac_exec_ext in '' $ac_executable_extensions; do
20719   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20720     ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
20721     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20722     break 2
20723   fi
20724 done
20725   done
20726 IFS=$as_save_IFS
20727 
20728 fi
20729 fi
20730 ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
20731 if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20732   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
20733 $as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
20734 else
20735   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20736 $as_echo "no" >&6; }
20737 fi
20738 
20739 
20740   test -n "$ac_ct_PROPER_COMPILER_CXX" && break
20741 done
20742 
20743   if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
20744     PROPER_COMPILER_CXX=""
20745   else
20746     case $cross_compiling:$ac_tool_warned in
20747 yes:)
20748 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20749 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20750 ac_tool_warned=yes ;;
20751 esac
20752     PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
20753   fi
20754 fi
20755 
20756 
20757   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20758 
20759   # First separate the path from the arguments. This will split at the first
20760   # space.
20761   complete="$PROPER_COMPILER_CXX"
20762   path="${complete%% *}"
20763   tmp="$complete EOL"
20764   arguments="${tmp#* }"
20765 
20766   # Input might be given as Windows format, start by converting to
20767   # unix format.
20768   new_path=`$CYGPATH -u "$path"`
20769 
20770   # Now try to locate executable using which
20771   new_path=`$WHICH "$new_path" 2> /dev/null`
20772   # bat and cmd files are not always considered executable in cygwin causing which
20773   # to not find them
20774   if test "x$new_path" = x \
20775            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20776            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20777     new_path=`$CYGPATH -u "$path"`
20778   fi
20779   if test "x$new_path" = x; then
20780     # Oops. Which didn't find the executable.
20781     # The splitting of arguments from the executable at a space might have been incorrect,
20782     # since paths with space are more likely in Windows. Give it another try with the whole
20783     # argument.
20784     path="$complete"
20785     arguments="EOL"
20786     new_path=`$CYGPATH -u "$path"`
20787     new_path=`$WHICH "$new_path" 2> /dev/null`
20788     # bat and cmd files are not always considered executable in cygwin causing which
20789     # to not find them
20790     if test "x$new_path" = x \
20791              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20792              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20793       new_path=`$CYGPATH -u "$path"`
20794     fi
20795     if test "x$new_path" = x; then
20796       # It's still not found. Now this is an unrecoverable error.
20797       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20798 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20799       has_space=`$ECHO "$complete" | $GREP " "`
20800       if test "x$has_space" != x; then
20801         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20802 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20803       fi
20804       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20805     fi
20806   fi
20807 
20808   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20809   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20810   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20811   # "foo.exe" is OK but "foo" is an error.
20812   #
20813   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20814   # It is also a way to make sure we got the proper file name for the real test later on.
20815   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20816   if test "x$test_shortpath" = x; then
20817     # Short path failed, file does not exist as specified.
20818     # Try adding .exe or .cmd
20819     if test -f "${new_path}.exe"; then
20820        input_to_shortpath="${new_path}.exe"
20821     elif test -f "${new_path}.cmd"; then
20822        input_to_shortpath="${new_path}.cmd"
20823     else
20824       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
20825 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
20826       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20827 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20828       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20829     fi
20830   else
20831     input_to_shortpath="$new_path"
20832   fi
20833 
20834   # Call helper function which possibly converts this using DOS-style short mode.
20835   # If so, the updated path is stored in $new_path.
20836   new_path="$input_to_shortpath"
20837 
20838   input_path="$input_to_shortpath"
20839   # Check if we need to convert this using DOS-style short mode. If the path
20840   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20841   # take no chances and rewrite it.
20842   # Note: m4 eats our [], so we need to use [ and ] instead.
20843   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20844   if test "x$has_forbidden_chars" != x; then
20845     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20846     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20847     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20848     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20849       # Going to short mode and back again did indeed matter. Since short mode is
20850       # case insensitive, let's make it lowercase to improve readability.
20851       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20852       # Now convert it back to Unix-stile (cygpath)
20853       input_path=`$CYGPATH -u "$shortmode_path"`
20854       new_path="$input_path"
20855     fi
20856   fi
20857 
20858   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20859   if test "x$test_cygdrive_prefix" = x; then
20860     # As a simple fix, exclude /usr/bin since it's not a real path.
20861     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20862       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20863       # a path prefixed by /cygdrive for fixpath to work.
20864       new_path="$CYGWIN_ROOT_PATH$input_path"
20865     fi
20866   fi
20867 
20868   # remove trailing .exe if any
20869   new_path="${new_path/%.exe/}"
20870 
20871   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20872 
20873   # First separate the path from the arguments. This will split at the first
20874   # space.
20875   complete="$PROPER_COMPILER_CXX"
20876   path="${complete%% *}"
20877   tmp="$complete EOL"
20878   arguments="${tmp#* }"
20879 
20880   # Input might be given as Windows format, start by converting to
20881   # unix format.
20882   new_path="$path"
20883 
20884   windows_path="$new_path"
20885   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20886     unix_path=`$CYGPATH -u "$windows_path"`
20887     new_path="$unix_path"
20888   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20889     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20890     new_path="$unix_path"
20891   fi
20892 
20893 
20894   # Now try to locate executable using which
20895   new_path=`$WHICH "$new_path" 2> /dev/null`
20896 
20897   if test "x$new_path" = x; then
20898     # Oops. Which didn't find the executable.
20899     # The splitting of arguments from the executable at a space might have been incorrect,
20900     # since paths with space are more likely in Windows. Give it another try with the whole
20901     # argument.
20902     path="$complete"
20903     arguments="EOL"
20904     new_path="$path"
20905 
20906   windows_path="$new_path"
20907   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20908     unix_path=`$CYGPATH -u "$windows_path"`
20909     new_path="$unix_path"
20910   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20911     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20912     new_path="$unix_path"
20913   fi
20914 
20915 
20916     new_path=`$WHICH "$new_path" 2> /dev/null`
20917 
20918     if test "x$new_path" = x; then
20919       # It's still not found. Now this is an unrecoverable error.
20920       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20921 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20922       has_space=`$ECHO "$complete" | $GREP " "`
20923       if test "x$has_space" != x; then
20924         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20925 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20926       fi
20927       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20928     fi
20929   fi
20930 
20931   # Now new_path has a complete unix path to the binary
20932   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20933     # Keep paths in /bin as-is, but remove trailing .exe if any
20934     new_path="${new_path/%.exe/}"
20935     # Do not save /bin paths to all_fixpath_prefixes!
20936   else
20937     # Not in mixed or Windows style, start by that.
20938     new_path=`cmd //c echo $new_path`
20939 
20940   input_path="$new_path"
20941   # Check if we need to convert this using DOS-style short mode. If the path
20942   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20943   # take no chances and rewrite it.
20944   # Note: m4 eats our [], so we need to use [ and ] instead.
20945   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20946   if test "x$has_forbidden_chars" != x; then
20947     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20948     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20949   fi
20950 
20951     # Output is in $new_path
20952 
20953   windows_path="$new_path"
20954   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20955     unix_path=`$CYGPATH -u "$windows_path"`
20956     new_path="$unix_path"
20957   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20958     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20959     new_path="$unix_path"
20960   fi
20961 
20962     # remove trailing .exe if any
20963     new_path="${new_path/%.exe/}"
20964 
20965     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20966     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20967   fi
20968 
20969   else
20970     # We're on a posix platform. Hooray! :)
20971     # First separate the path from the arguments. This will split at the first
20972     # space.
20973     complete="$PROPER_COMPILER_CXX"
20974     path="${complete%% *}"
20975     tmp="$complete EOL"
20976     arguments="${tmp#* }"
20977 
20978     # Cannot rely on the command "which" here since it doesn't always work.
20979     is_absolute_path=`$ECHO "$path" | $GREP ^/`
20980     if test -z "$is_absolute_path"; then
20981       # Path to executable is not absolute. Find it.
20982       IFS_save="$IFS"
20983       IFS=:
20984       for p in $PATH; do
20985         if test -f "$p/$path" && test -x "$p/$path"; then
20986           new_path="$p/$path"
20987           break
20988         fi
20989       done
20990       IFS="$IFS_save"
20991     else
20992       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
20993 $as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
20994       new_path="$path"
20995     fi
20996 
20997     if test "x$new_path" = x; then
20998         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20999 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21000         has_space=`$ECHO "$complete" | $GREP " "`
21001         if test "x$has_space" != x; then
21002           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21003 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21004         fi
21005         as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21006       fi
21007   fi
21008 
21009       # Now join together the path and the arguments once again
21010       if test "x$arguments" != xEOL; then
21011         new_complete="$new_path ${arguments% *}"
21012       else
21013         new_complete="$new_path"
21014       fi
21015 
21016   if test "x$complete" != "x$new_complete"; then
21017       PROPER_COMPILER_CXX="$new_complete"
21018       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21019 $as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21020     fi
21021 
21022     PATH="$RETRY_COMPILER_SAVED_PATH"
21023 
21024     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21025 $as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21026 
21027     if test "x$OPENJDK_BUILD_OS" != xwindows; then
21028         # Follow a chain of symbolic links. Use readlink
21029         # where it exists, else fall back to horribly
21030         # complicated shell code.
21031         if test "x$READLINK_TESTED" != yes; then
21032             # On MacOSX there is a readlink tool with a different
21033             # purpose than the GNU readlink tool. Check the found readlink.
21034             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21035             if test "x$ISGNU" = x; then
21036                  # A readlink that we do not know how to use.
21037                  # Are there other non-GNU readlinks out there?
21038                  READLINK_TESTED=yes
21039                  READLINK=
21040             fi
21041         fi
21042 
21043         if test "x$READLINK" != x; then
21044             PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21045         else
21046             # Save the current directory for restoring afterwards
21047             STARTDIR=$PWD
21048             COUNTER=0
21049             sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21050             sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21051             # Use the system pwd and not the shell builtin to resolve directory symlinks
21052             cd $sym_link_dir
21053             cd `$THEPWDCMD`
21054             sym_link_dir=`$THEPWDCMD`
21055             # Resolve file symlinks
21056             while test $COUNTER -lt 20; do
21057                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21058                 if test "x$ISLINK" == x; then
21059                     # This is not a symbolic link! We are done!
21060                     break
21061                 fi
21062                 # Again resolve directory symlinks since the target of the just found
21063                 # link could be in a different directory
21064                 cd `$DIRNAME $ISLINK`
21065                 sym_link_dir=`$THEPWDCMD`
21066                 sym_link_file=`$BASENAME $ISLINK`
21067                 let COUNTER=COUNTER+1
21068             done
21069             cd $STARTDIR
21070             PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21071         fi
21072     fi
21073 
21074     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21075 $as_echo "$PROPER_COMPILER_CXX" >&6; }
21076     CXX="$PROPER_COMPILER_CXX"
21077   else
21078     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21079 $as_echo "no, keeping CXX" >&6; }
21080     CXX="$TEST_COMPILER"
21081   fi
21082 
21083   COMPILER=$CXX
21084   COMPILER_NAME=$COMPILER_NAME
21085 
21086   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21087     # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21088     COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21089     $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21090     if test $? -ne 0; then
21091       GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21092 
21093       { $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
21094 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21095       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21096 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21097       as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21098     else
21099       COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21100       COMPILER_VENDOR="Sun Studio"
21101     fi
21102   elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21103     # First line typically looks something like:
21104     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
21105     COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
21106     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21107     COMPILER_VENDOR="Microsoft CL.EXE"
21108     COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21109     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21110       if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21111         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21112       fi
21113     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21114       if test "x$COMPILER_CPU_TEST" != "xx64"; then
21115         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21116       fi
21117     fi
21118   else
21119     COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21120     # Check that this is likely to be GCC.
21121     $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21122     if test $? -ne 0; then
21123       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21124 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21125       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21126 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21127       as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21128     fi
21129 
21130     # First line typically looks something like:
21131     # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21132     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21133     COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21134   fi
21135   # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21136   CXX_VERSION="$COMPILER_VERSION"
21137   # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21138   CXX_VENDOR="$COMPILER_VENDOR"
21139 
21140   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21141 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21142 
21143 
21144 # Now that we have resolved CXX ourself, let autoconf have its go at it
21145 ac_ext=cpp
21146 ac_cpp='$CXXCPP $CPPFLAGS'
21147 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21148 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21149 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21150 if test -z "$CXX"; then
21151   if test -n "$CCC"; then
21152     CXX=$CCC
21153   else
21154     if test -n "$ac_tool_prefix"; then
21155   for ac_prog in $CXX
21156   do
21157     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21158 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21160 $as_echo_n "checking for $ac_word... " >&6; }
21161 if ${ac_cv_prog_CXX+:} false; then :
21162   $as_echo_n "(cached) " >&6
21163 else
21164   if test -n "$CXX"; then
21165   ac_cv_prog_CXX="$CXX" # Let the user override the test.
21166 else
21167 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21168 for as_dir in $PATH
21169 do
21170   IFS=$as_save_IFS
21171   test -z "$as_dir" && as_dir=.
21172     for ac_exec_ext in '' $ac_executable_extensions; do
21173   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21174     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21175     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21176     break 2
21177   fi
21178 done
21179   done
21180 IFS=$as_save_IFS
21181 
21182 fi
21183 fi
21184 CXX=$ac_cv_prog_CXX
21185 if test -n "$CXX"; then
21186   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21187 $as_echo "$CXX" >&6; }
21188 else
21189   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21190 $as_echo "no" >&6; }
21191 fi
21192 
21193 
21194     test -n "$CXX" && break
21195   done
21196 fi
21197 if test -z "$CXX"; then
21198   ac_ct_CXX=$CXX
21199   for ac_prog in $CXX
21200 do
21201   # Extract the first word of "$ac_prog", so it can be a program name with args.
21202 set dummy $ac_prog; ac_word=$2
21203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21204 $as_echo_n "checking for $ac_word... " >&6; }
21205 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
21206   $as_echo_n "(cached) " >&6
21207 else
21208   if test -n "$ac_ct_CXX"; then
21209   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21210 else
21211 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21212 for as_dir in $PATH
21213 do
21214   IFS=$as_save_IFS
21215   test -z "$as_dir" && as_dir=.
21216     for ac_exec_ext in '' $ac_executable_extensions; do
21217   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21218     ac_cv_prog_ac_ct_CXX="$ac_prog"
21219     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21220     break 2
21221   fi
21222 done
21223   done
21224 IFS=$as_save_IFS
21225 
21226 fi
21227 fi
21228 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21229 if test -n "$ac_ct_CXX"; then
21230   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21231 $as_echo "$ac_ct_CXX" >&6; }
21232 else
21233   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21234 $as_echo "no" >&6; }
21235 fi
21236 
21237 
21238   test -n "$ac_ct_CXX" && break
21239 done
21240 
21241   if test "x$ac_ct_CXX" = x; then
21242     CXX="g++"
21243   else
21244     case $cross_compiling:$ac_tool_warned in
21245 yes:)
21246 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21247 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21248 ac_tool_warned=yes ;;
21249 esac
21250     CXX=$ac_ct_CXX
21251   fi
21252 fi
21253 
21254   fi
21255 fi
21256 # Provide some information about the compiler.
21257 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21258 set X $ac_compile
21259 ac_compiler=$2
21260 for ac_option in --version -v -V -qversion; do
21261   { { ac_try="$ac_compiler $ac_option >&5"
21262 case "(($ac_try" in
21263   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21264   *) ac_try_echo=$ac_try;;
21265 esac
21266 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21267 $as_echo "$ac_try_echo"; } >&5
21268   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21269   ac_status=$?
21270   if test -s conftest.err; then
21271     sed '10a\
21272 ... rest of stderr output deleted ...
21273          10q' conftest.err >conftest.er1
21274     cat conftest.er1 >&5
21275   fi
21276   rm -f conftest.er1 conftest.err
21277   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21278   test $ac_status = 0; }
21279 done
21280 
21281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21282 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21283 if ${ac_cv_cxx_compiler_gnu+:} false; then :
21284   $as_echo_n "(cached) " >&6
21285 else
21286   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21287 /* end confdefs.h.  */
21288 
21289 int
21290 main ()
21291 {
21292 #ifndef __GNUC__
21293        choke me
21294 #endif
21295 
21296   ;
21297   return 0;
21298 }
21299 _ACEOF
21300 if ac_fn_cxx_try_compile "$LINENO"; then :
21301   ac_compiler_gnu=yes
21302 else
21303   ac_compiler_gnu=no
21304 fi
21305 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21306 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21307 
21308 fi
21309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21310 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21311 if test $ac_compiler_gnu = yes; then
21312   GXX=yes
21313 else
21314   GXX=
21315 fi
21316 ac_test_CXXFLAGS=${CXXFLAGS+set}
21317 ac_save_CXXFLAGS=$CXXFLAGS
21318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21319 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
21320 if ${ac_cv_prog_cxx_g+:} false; then :
21321   $as_echo_n "(cached) " >&6
21322 else
21323   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21324    ac_cxx_werror_flag=yes
21325    ac_cv_prog_cxx_g=no
21326    CXXFLAGS="-g"
21327    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21328 /* end confdefs.h.  */
21329 
21330 int
21331 main ()
21332 {
21333 
21334   ;
21335   return 0;
21336 }
21337 _ACEOF
21338 if ac_fn_cxx_try_compile "$LINENO"; then :
21339   ac_cv_prog_cxx_g=yes
21340 else
21341   CXXFLAGS=""
21342       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21343 /* end confdefs.h.  */
21344 
21345 int
21346 main ()
21347 {
21348 
21349   ;
21350   return 0;
21351 }
21352 _ACEOF
21353 if ac_fn_cxx_try_compile "$LINENO"; then :
21354 
21355 else
21356   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21357          CXXFLAGS="-g"
21358          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21359 /* end confdefs.h.  */
21360 
21361 int
21362 main ()
21363 {
21364 
21365   ;
21366   return 0;
21367 }
21368 _ACEOF
21369 if ac_fn_cxx_try_compile "$LINENO"; then :
21370   ac_cv_prog_cxx_g=yes
21371 fi
21372 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21373 fi
21374 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21375 fi
21376 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21377    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21378 fi
21379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
21380 $as_echo "$ac_cv_prog_cxx_g" >&6; }
21381 if test "$ac_test_CXXFLAGS" = set; then
21382   CXXFLAGS=$ac_save_CXXFLAGS
21383 elif test $ac_cv_prog_cxx_g = yes; then
21384   if test "$GXX" = yes; then
21385     CXXFLAGS="-g -O2"
21386   else
21387     CXXFLAGS="-g"
21388   fi
21389 else
21390   if test "$GXX" = yes; then
21391     CXXFLAGS="-O2"
21392   else
21393     CXXFLAGS=
21394   fi
21395 fi
21396 ac_ext=cpp
21397 ac_cpp='$CXXCPP $CPPFLAGS'
21398 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21399 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21400 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21401 
21402 
21403 ### Locate other tools
21404 
21405 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21406     ac_ext=m
21407 ac_cpp='$OBJCPP $CPPFLAGS'
21408 ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21409 ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21410 ac_compiler_gnu=$ac_cv_objc_compiler_gnu
21411 if test -n "$ac_tool_prefix"; then
21412   for ac_prog in gcc objcc objc cc CC
21413   do
21414     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21415 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21417 $as_echo_n "checking for $ac_word... " >&6; }
21418 if ${ac_cv_prog_OBJC+:} false; then :
21419   $as_echo_n "(cached) " >&6
21420 else
21421   if test -n "$OBJC"; then
21422   ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
21423 else
21424 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21425 for as_dir in $PATH
21426 do
21427   IFS=$as_save_IFS
21428   test -z "$as_dir" && as_dir=.
21429     for ac_exec_ext in '' $ac_executable_extensions; do
21430   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21431     ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
21432     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21433     break 2
21434   fi
21435 done
21436   done
21437 IFS=$as_save_IFS
21438 
21439 fi
21440 fi
21441 OBJC=$ac_cv_prog_OBJC
21442 if test -n "$OBJC"; then
21443   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
21444 $as_echo "$OBJC" >&6; }
21445 else
21446   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21447 $as_echo "no" >&6; }
21448 fi
21449 
21450 
21451     test -n "$OBJC" && break
21452   done
21453 fi
21454 if test -z "$OBJC"; then
21455   ac_ct_OBJC=$OBJC
21456   for ac_prog in gcc objcc objc cc CC
21457 do
21458   # Extract the first word of "$ac_prog", so it can be a program name with args.
21459 set dummy $ac_prog; ac_word=$2
21460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21461 $as_echo_n "checking for $ac_word... " >&6; }
21462 if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
21463   $as_echo_n "(cached) " >&6
21464 else
21465   if test -n "$ac_ct_OBJC"; then
21466   ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
21467 else
21468 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21469 for as_dir in $PATH
21470 do
21471   IFS=$as_save_IFS
21472   test -z "$as_dir" && as_dir=.
21473     for ac_exec_ext in '' $ac_executable_extensions; do
21474   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21475     ac_cv_prog_ac_ct_OBJC="$ac_prog"
21476     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21477     break 2
21478   fi
21479 done
21480   done
21481 IFS=$as_save_IFS
21482 
21483 fi
21484 fi
21485 ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
21486 if test -n "$ac_ct_OBJC"; then
21487   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
21488 $as_echo "$ac_ct_OBJC" >&6; }
21489 else
21490   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21491 $as_echo "no" >&6; }
21492 fi
21493 
21494 
21495   test -n "$ac_ct_OBJC" && break
21496 done
21497 
21498   if test "x$ac_ct_OBJC" = x; then
21499     OBJC="gcc"
21500   else
21501     case $cross_compiling:$ac_tool_warned in
21502 yes:)
21503 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21504 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21505 ac_tool_warned=yes ;;
21506 esac
21507     OBJC=$ac_ct_OBJC
21508   fi
21509 fi
21510 
21511 # Provide some information about the compiler.
21512 $as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
21513 set X $ac_compile
21514 ac_compiler=$2
21515 for ac_option in --version -v -V -qversion; do
21516   { { ac_try="$ac_compiler $ac_option >&5"
21517 case "(($ac_try" in
21518   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21519   *) ac_try_echo=$ac_try;;
21520 esac
21521 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21522 $as_echo "$ac_try_echo"; } >&5
21523   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21524   ac_status=$?
21525   if test -s conftest.err; then
21526     sed '10a\
21527 ... rest of stderr output deleted ...
21528          10q' conftest.err >conftest.er1
21529     cat conftest.er1 >&5
21530   fi
21531   rm -f conftest.er1 conftest.err
21532   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21533   test $ac_status = 0; }
21534 done
21535 
21536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
21537 $as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
21538 if ${ac_cv_objc_compiler_gnu+:} false; then :
21539   $as_echo_n "(cached) " >&6
21540 else
21541   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21542 /* end confdefs.h.  */
21543 
21544 int
21545 main ()
21546 {
21547 #ifndef __GNUC__
21548        choke me
21549 #endif
21550 
21551   ;
21552   return 0;
21553 }
21554 _ACEOF
21555 if ac_fn_objc_try_compile "$LINENO"; then :
21556   ac_compiler_gnu=yes
21557 else
21558   ac_compiler_gnu=no
21559 fi
21560 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21561 ac_cv_objc_compiler_gnu=$ac_compiler_gnu
21562 
21563 fi
21564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
21565 $as_echo "$ac_cv_objc_compiler_gnu" >&6; }
21566 if test $ac_compiler_gnu = yes; then
21567   GOBJC=yes
21568 else
21569   GOBJC=
21570 fi
21571 ac_test_OBJCFLAGS=${OBJCFLAGS+set}
21572 ac_save_OBJCFLAGS=$OBJCFLAGS
21573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
21574 $as_echo_n "checking whether $OBJC accepts -g... " >&6; }
21575 if ${ac_cv_prog_objc_g+:} false; then :
21576   $as_echo_n "(cached) " >&6
21577 else
21578   ac_save_objc_werror_flag=$ac_objc_werror_flag
21579    ac_objc_werror_flag=yes
21580    ac_cv_prog_objc_g=no
21581    OBJCFLAGS="-g"
21582    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21583 /* end confdefs.h.  */
21584 
21585 int
21586 main ()
21587 {
21588 
21589   ;
21590   return 0;
21591 }
21592 _ACEOF
21593 if ac_fn_objc_try_compile "$LINENO"; then :
21594   ac_cv_prog_objc_g=yes
21595 else
21596   OBJCFLAGS=""
21597       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21598 /* end confdefs.h.  */
21599 
21600 int
21601 main ()
21602 {
21603 
21604   ;
21605   return 0;
21606 }
21607 _ACEOF
21608 if ac_fn_objc_try_compile "$LINENO"; then :
21609 
21610 else
21611   ac_objc_werror_flag=$ac_save_objc_werror_flag
21612          OBJCFLAGS="-g"
21613          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21614 /* end confdefs.h.  */
21615 
21616 int
21617 main ()
21618 {
21619 
21620   ;
21621   return 0;
21622 }
21623 _ACEOF
21624 if ac_fn_objc_try_compile "$LINENO"; then :
21625   ac_cv_prog_objc_g=yes
21626 fi
21627 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21628 fi
21629 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21630 fi
21631 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21632    ac_objc_werror_flag=$ac_save_objc_werror_flag
21633 fi
21634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
21635 $as_echo "$ac_cv_prog_objc_g" >&6; }
21636 if test "$ac_test_OBJCFLAGS" = set; then
21637   OBJCFLAGS=$ac_save_OBJCFLAGS
21638 elif test $ac_cv_prog_objc_g = yes; then
21639   if test "$GOBJC" = yes; then
21640     OBJCFLAGS="-g -O2"
21641   else
21642     OBJCFLAGS="-g"
21643   fi
21644 else
21645   if test "$GOBJC" = yes; then
21646     OBJCFLAGS="-O2"
21647   else
21648     OBJCFLAGS=
21649   fi
21650 fi
21651 ac_ext=cpp
21652 ac_cpp='$CXXCPP $CPPFLAGS'
21653 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21654 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21655 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21656 
21657 
21658   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21659 
21660   # First separate the path from the arguments. This will split at the first
21661   # space.
21662   complete="$OBJC"
21663   path="${complete%% *}"
21664   tmp="$complete EOL"
21665   arguments="${tmp#* }"
21666 
21667   # Input might be given as Windows format, start by converting to
21668   # unix format.
21669   new_path=`$CYGPATH -u "$path"`
21670 
21671   # Now try to locate executable using which
21672   new_path=`$WHICH "$new_path" 2> /dev/null`
21673   # bat and cmd files are not always considered executable in cygwin causing which
21674   # to not find them
21675   if test "x$new_path" = x \
21676            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21677            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21678     new_path=`$CYGPATH -u "$path"`
21679   fi
21680   if test "x$new_path" = x; then
21681     # Oops. Which didn't find the executable.
21682     # The splitting of arguments from the executable at a space might have been incorrect,
21683     # since paths with space are more likely in Windows. Give it another try with the whole
21684     # argument.
21685     path="$complete"
21686     arguments="EOL"
21687     new_path=`$CYGPATH -u "$path"`
21688     new_path=`$WHICH "$new_path" 2> /dev/null`
21689     # bat and cmd files are not always considered executable in cygwin causing which
21690     # to not find them
21691     if test "x$new_path" = x \
21692              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21693              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21694       new_path=`$CYGPATH -u "$path"`
21695     fi
21696     if test "x$new_path" = x; then
21697       # It's still not found. Now this is an unrecoverable error.
21698       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21699 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21700       has_space=`$ECHO "$complete" | $GREP " "`
21701       if test "x$has_space" != x; then
21702         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21703 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21704       fi
21705       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21706     fi
21707   fi
21708 
21709   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21710   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21711   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21712   # "foo.exe" is OK but "foo" is an error.
21713   #
21714   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21715   # It is also a way to make sure we got the proper file name for the real test later on.
21716   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21717   if test "x$test_shortpath" = x; then
21718     # Short path failed, file does not exist as specified.
21719     # Try adding .exe or .cmd
21720     if test -f "${new_path}.exe"; then
21721        input_to_shortpath="${new_path}.exe"
21722     elif test -f "${new_path}.cmd"; then
21723        input_to_shortpath="${new_path}.cmd"
21724     else
21725       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
21726 $as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
21727       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21728 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21729       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21730     fi
21731   else
21732     input_to_shortpath="$new_path"
21733   fi
21734 
21735   # Call helper function which possibly converts this using DOS-style short mode.
21736   # If so, the updated path is stored in $new_path.
21737   new_path="$input_to_shortpath"
21738 
21739   input_path="$input_to_shortpath"
21740   # Check if we need to convert this using DOS-style short mode. If the path
21741   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21742   # take no chances and rewrite it.
21743   # Note: m4 eats our [], so we need to use [ and ] instead.
21744   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21745   if test "x$has_forbidden_chars" != x; then
21746     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21747     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21748     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21749     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21750       # Going to short mode and back again did indeed matter. Since short mode is
21751       # case insensitive, let's make it lowercase to improve readability.
21752       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21753       # Now convert it back to Unix-stile (cygpath)
21754       input_path=`$CYGPATH -u "$shortmode_path"`
21755       new_path="$input_path"
21756     fi
21757   fi
21758 
21759   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21760   if test "x$test_cygdrive_prefix" = x; then
21761     # As a simple fix, exclude /usr/bin since it's not a real path.
21762     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21763       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21764       # a path prefixed by /cygdrive for fixpath to work.
21765       new_path="$CYGWIN_ROOT_PATH$input_path"
21766     fi
21767   fi
21768 
21769   # remove trailing .exe if any
21770   new_path="${new_path/%.exe/}"
21771 
21772   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21773 
21774   # First separate the path from the arguments. This will split at the first
21775   # space.
21776   complete="$OBJC"
21777   path="${complete%% *}"
21778   tmp="$complete EOL"
21779   arguments="${tmp#* }"
21780 
21781   # Input might be given as Windows format, start by converting to
21782   # unix format.
21783   new_path="$path"
21784 
21785   windows_path="$new_path"
21786   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21787     unix_path=`$CYGPATH -u "$windows_path"`
21788     new_path="$unix_path"
21789   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21790     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21791     new_path="$unix_path"
21792   fi
21793 
21794 
21795   # Now try to locate executable using which
21796   new_path=`$WHICH "$new_path" 2> /dev/null`
21797 
21798   if test "x$new_path" = x; then
21799     # Oops. Which didn't find the executable.
21800     # The splitting of arguments from the executable at a space might have been incorrect,
21801     # since paths with space are more likely in Windows. Give it another try with the whole
21802     # argument.
21803     path="$complete"
21804     arguments="EOL"
21805     new_path="$path"
21806 
21807   windows_path="$new_path"
21808   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21809     unix_path=`$CYGPATH -u "$windows_path"`
21810     new_path="$unix_path"
21811   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21812     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21813     new_path="$unix_path"
21814   fi
21815 
21816 
21817     new_path=`$WHICH "$new_path" 2> /dev/null`
21818 
21819     if test "x$new_path" = x; then
21820       # It's still not found. Now this is an unrecoverable error.
21821       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21822 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21823       has_space=`$ECHO "$complete" | $GREP " "`
21824       if test "x$has_space" != x; then
21825         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21826 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21827       fi
21828       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21829     fi
21830   fi
21831 
21832   # Now new_path has a complete unix path to the binary
21833   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21834     # Keep paths in /bin as-is, but remove trailing .exe if any
21835     new_path="${new_path/%.exe/}"
21836     # Do not save /bin paths to all_fixpath_prefixes!
21837   else
21838     # Not in mixed or Windows style, start by that.
21839     new_path=`cmd //c echo $new_path`
21840 
21841   input_path="$new_path"
21842   # Check if we need to convert this using DOS-style short mode. If the path
21843   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21844   # take no chances and rewrite it.
21845   # Note: m4 eats our [], so we need to use [ and ] instead.
21846   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21847   if test "x$has_forbidden_chars" != x; then
21848     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21849     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21850   fi
21851 
21852     # Output is in $new_path
21853 
21854   windows_path="$new_path"
21855   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21856     unix_path=`$CYGPATH -u "$windows_path"`
21857     new_path="$unix_path"
21858   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21859     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21860     new_path="$unix_path"
21861   fi
21862 
21863     # remove trailing .exe if any
21864     new_path="${new_path/%.exe/}"
21865 
21866     # Save the first 10 bytes of this path to the storage, so fixpath can work.
21867     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21868   fi
21869 
21870   else
21871     # We're on a posix platform. Hooray! :)
21872     # First separate the path from the arguments. This will split at the first
21873     # space.
21874     complete="$OBJC"
21875     path="${complete%% *}"
21876     tmp="$complete EOL"
21877     arguments="${tmp#* }"
21878 
21879     # Cannot rely on the command "which" here since it doesn't always work.
21880     is_absolute_path=`$ECHO "$path" | $GREP ^/`
21881     if test -z "$is_absolute_path"; then
21882       # Path to executable is not absolute. Find it.
21883       IFS_save="$IFS"
21884       IFS=:
21885       for p in $PATH; do
21886         if test -f "$p/$path" && test -x "$p/$path"; then
21887           new_path="$p/$path"
21888           break
21889         fi
21890       done
21891       IFS="$IFS_save"
21892     else
21893       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
21894 $as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
21895       new_path="$path"
21896     fi
21897 
21898     if test "x$new_path" = x; then
21899         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21900 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21901         has_space=`$ECHO "$complete" | $GREP " "`
21902         if test "x$has_space" != x; then
21903           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21904 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21905         fi
21906         as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21907       fi
21908   fi
21909 
21910       # Now join together the path and the arguments once again
21911       if test "x$arguments" != xEOL; then
21912         new_complete="$new_path ${arguments% *}"
21913       else
21914         new_complete="$new_path"
21915       fi
21916 
21917   if test "x$complete" != "x$new_complete"; then
21918       OBJC="$new_complete"
21919       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
21920 $as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
21921     fi
21922 
21923 else
21924     OBJC=
21925 fi
21926 
21927 # Restore the flags to the user specified values.
21928 # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
21929 CFLAGS="$ORG_CFLAGS"
21930 CXXFLAGS="$ORG_CXXFLAGS"
21931 OBJCFLAGS="$ORG_OBJCFLAGS"
21932 
21933 LD="$CC"
21934 LDEXE="$CC"
21935 LDCXX="$CXX"
21936 LDEXECXX="$CXX"
21937 
21938 # LDEXE is the linker to use, when creating executables.
21939 
21940 # Linking C++ libraries.
21941 
21942 # Linking C++ executables.
21943 
21944 
21945 if test "x$OPENJDK_TARGET_OS" != xwindows; then
21946     if test -n "$ac_tool_prefix"; then
21947   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
21948 set dummy ${ac_tool_prefix}ar; ac_word=$2
21949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21950 $as_echo_n "checking for $ac_word... " >&6; }
21951 if ${ac_cv_prog_AR+:} false; then :
21952   $as_echo_n "(cached) " >&6
21953 else
21954   if test -n "$AR"; then
21955   ac_cv_prog_AR="$AR" # Let the user override the test.
21956 else
21957 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21958 for as_dir in $PATH
21959 do
21960   IFS=$as_save_IFS
21961   test -z "$as_dir" && as_dir=.
21962     for ac_exec_ext in '' $ac_executable_extensions; do
21963   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21964     ac_cv_prog_AR="${ac_tool_prefix}ar"
21965     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21966     break 2
21967   fi
21968 done
21969   done
21970 IFS=$as_save_IFS
21971 
21972 fi
21973 fi
21974 AR=$ac_cv_prog_AR
21975 if test -n "$AR"; then
21976   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
21977 $as_echo "$AR" >&6; }
21978 else
21979   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21980 $as_echo "no" >&6; }
21981 fi
21982 
21983 
21984 fi
21985 if test -z "$ac_cv_prog_AR"; then
21986   ac_ct_AR=$AR
21987   # Extract the first word of "ar", so it can be a program name with args.
21988 set dummy ar; ac_word=$2
21989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21990 $as_echo_n "checking for $ac_word... " >&6; }
21991 if ${ac_cv_prog_ac_ct_AR+:} false; then :
21992   $as_echo_n "(cached) " >&6
21993 else
21994   if test -n "$ac_ct_AR"; then
21995   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
21996 else
21997 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21998 for as_dir in $PATH
21999 do
22000   IFS=$as_save_IFS
22001   test -z "$as_dir" && as_dir=.
22002     for ac_exec_ext in '' $ac_executable_extensions; do
22003   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22004     ac_cv_prog_ac_ct_AR="ar"
22005     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22006     break 2
22007   fi
22008 done
22009   done
22010 IFS=$as_save_IFS
22011 
22012 fi
22013 fi
22014 ac_ct_AR=$ac_cv_prog_ac_ct_AR
22015 if test -n "$ac_ct_AR"; then
22016   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22017 $as_echo "$ac_ct_AR" >&6; }
22018 else
22019   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22020 $as_echo "no" >&6; }
22021 fi
22022 
22023   if test "x$ac_ct_AR" = x; then
22024     AR=""
22025   else
22026     case $cross_compiling:$ac_tool_warned in
22027 yes:)
22028 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22029 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22030 ac_tool_warned=yes ;;
22031 esac
22032     AR=$ac_ct_AR
22033   fi
22034 else
22035   AR="$ac_cv_prog_AR"
22036 fi
22037 
22038 
22039   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22040 
22041   # First separate the path from the arguments. This will split at the first
22042   # space.
22043   complete="$AR"
22044   path="${complete%% *}"
22045   tmp="$complete EOL"
22046   arguments="${tmp#* }"
22047 
22048   # Input might be given as Windows format, start by converting to
22049   # unix format.
22050   new_path=`$CYGPATH -u "$path"`
22051 
22052   # Now try to locate executable using which
22053   new_path=`$WHICH "$new_path" 2> /dev/null`
22054   # bat and cmd files are not always considered executable in cygwin causing which
22055   # to not find them
22056   if test "x$new_path" = x \
22057            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22058            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22059     new_path=`$CYGPATH -u "$path"`
22060   fi
22061   if test "x$new_path" = x; then
22062     # Oops. Which didn't find the executable.
22063     # The splitting of arguments from the executable at a space might have been incorrect,
22064     # since paths with space are more likely in Windows. Give it another try with the whole
22065     # argument.
22066     path="$complete"
22067     arguments="EOL"
22068     new_path=`$CYGPATH -u "$path"`
22069     new_path=`$WHICH "$new_path" 2> /dev/null`
22070     # bat and cmd files are not always considered executable in cygwin causing which
22071     # to not find them
22072     if test "x$new_path" = x \
22073              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22074              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22075       new_path=`$CYGPATH -u "$path"`
22076     fi
22077     if test "x$new_path" = x; then
22078       # It's still not found. Now this is an unrecoverable error.
22079       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22080 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22081       has_space=`$ECHO "$complete" | $GREP " "`
22082       if test "x$has_space" != x; then
22083         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22084 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22085       fi
22086       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22087     fi
22088   fi
22089 
22090   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22091   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22092   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22093   # "foo.exe" is OK but "foo" is an error.
22094   #
22095   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22096   # It is also a way to make sure we got the proper file name for the real test later on.
22097   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22098   if test "x$test_shortpath" = x; then
22099     # Short path failed, file does not exist as specified.
22100     # Try adding .exe or .cmd
22101     if test -f "${new_path}.exe"; then
22102        input_to_shortpath="${new_path}.exe"
22103     elif test -f "${new_path}.cmd"; then
22104        input_to_shortpath="${new_path}.cmd"
22105     else
22106       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22107 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22108       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22109 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22110       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22111     fi
22112   else
22113     input_to_shortpath="$new_path"
22114   fi
22115 
22116   # Call helper function which possibly converts this using DOS-style short mode.
22117   # If so, the updated path is stored in $new_path.
22118   new_path="$input_to_shortpath"
22119 
22120   input_path="$input_to_shortpath"
22121   # Check if we need to convert this using DOS-style short mode. If the path
22122   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22123   # take no chances and rewrite it.
22124   # Note: m4 eats our [], so we need to use [ and ] instead.
22125   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22126   if test "x$has_forbidden_chars" != x; then
22127     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22128     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22129     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22130     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22131       # Going to short mode and back again did indeed matter. Since short mode is
22132       # case insensitive, let's make it lowercase to improve readability.
22133       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22134       # Now convert it back to Unix-stile (cygpath)
22135       input_path=`$CYGPATH -u "$shortmode_path"`
22136       new_path="$input_path"
22137     fi
22138   fi
22139 
22140   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22141   if test "x$test_cygdrive_prefix" = x; then
22142     # As a simple fix, exclude /usr/bin since it's not a real path.
22143     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22144       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22145       # a path prefixed by /cygdrive for fixpath to work.
22146       new_path="$CYGWIN_ROOT_PATH$input_path"
22147     fi
22148   fi
22149 
22150   # remove trailing .exe if any
22151   new_path="${new_path/%.exe/}"
22152 
22153   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22154 
22155   # First separate the path from the arguments. This will split at the first
22156   # space.
22157   complete="$AR"
22158   path="${complete%% *}"
22159   tmp="$complete EOL"
22160   arguments="${tmp#* }"
22161 
22162   # Input might be given as Windows format, start by converting to
22163   # unix format.
22164   new_path="$path"
22165 
22166   windows_path="$new_path"
22167   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22168     unix_path=`$CYGPATH -u "$windows_path"`
22169     new_path="$unix_path"
22170   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22171     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22172     new_path="$unix_path"
22173   fi
22174 
22175 
22176   # Now try to locate executable using which
22177   new_path=`$WHICH "$new_path" 2> /dev/null`
22178 
22179   if test "x$new_path" = x; then
22180     # Oops. Which didn't find the executable.
22181     # The splitting of arguments from the executable at a space might have been incorrect,
22182     # since paths with space are more likely in Windows. Give it another try with the whole
22183     # argument.
22184     path="$complete"
22185     arguments="EOL"
22186     new_path="$path"
22187 
22188   windows_path="$new_path"
22189   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22190     unix_path=`$CYGPATH -u "$windows_path"`
22191     new_path="$unix_path"
22192   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22193     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22194     new_path="$unix_path"
22195   fi
22196 
22197 
22198     new_path=`$WHICH "$new_path" 2> /dev/null`
22199 
22200     if test "x$new_path" = x; then
22201       # It's still not found. Now this is an unrecoverable error.
22202       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22203 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22204       has_space=`$ECHO "$complete" | $GREP " "`
22205       if test "x$has_space" != x; then
22206         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22207 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22208       fi
22209       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22210     fi
22211   fi
22212 
22213   # Now new_path has a complete unix path to the binary
22214   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22215     # Keep paths in /bin as-is, but remove trailing .exe if any
22216     new_path="${new_path/%.exe/}"
22217     # Do not save /bin paths to all_fixpath_prefixes!
22218   else
22219     # Not in mixed or Windows style, start by that.
22220     new_path=`cmd //c echo $new_path`
22221 
22222   input_path="$new_path"
22223   # Check if we need to convert this using DOS-style short mode. If the path
22224   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22225   # take no chances and rewrite it.
22226   # Note: m4 eats our [], so we need to use [ and ] instead.
22227   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22228   if test "x$has_forbidden_chars" != x; then
22229     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22230     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22231   fi
22232 
22233     # Output is in $new_path
22234 
22235   windows_path="$new_path"
22236   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22237     unix_path=`$CYGPATH -u "$windows_path"`
22238     new_path="$unix_path"
22239   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22240     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22241     new_path="$unix_path"
22242   fi
22243 
22244     # remove trailing .exe if any
22245     new_path="${new_path/%.exe/}"
22246 
22247     # Save the first 10 bytes of this path to the storage, so fixpath can work.
22248     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22249   fi
22250 
22251   else
22252     # We're on a posix platform. Hooray! :)
22253     # First separate the path from the arguments. This will split at the first
22254     # space.
22255     complete="$AR"
22256     path="${complete%% *}"
22257     tmp="$complete EOL"
22258     arguments="${tmp#* }"
22259 
22260     # Cannot rely on the command "which" here since it doesn't always work.
22261     is_absolute_path=`$ECHO "$path" | $GREP ^/`
22262     if test -z "$is_absolute_path"; then
22263       # Path to executable is not absolute. Find it.
22264       IFS_save="$IFS"
22265       IFS=:
22266       for p in $PATH; do
22267         if test -f "$p/$path" && test -x "$p/$path"; then
22268           new_path="$p/$path"
22269           break
22270         fi
22271       done
22272       IFS="$IFS_save"
22273     else
22274       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22275 $as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22276       new_path="$path"
22277     fi
22278 
22279     if test "x$new_path" = x; then
22280         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22281 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22282         has_space=`$ECHO "$complete" | $GREP " "`
22283         if test "x$has_space" != x; then
22284           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22285 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22286         fi
22287         as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22288       fi
22289   fi
22290 
22291       # Now join together the path and the arguments once again
22292       if test "x$arguments" != xEOL; then
22293         new_complete="$new_path ${arguments% *}"
22294       else
22295         new_complete="$new_path"
22296       fi
22297 
22298   if test "x$complete" != "x$new_complete"; then
22299       AR="$new_complete"
22300       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22301 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22302     fi
22303 
22304 fi
22305 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22306     ARFLAGS="-r"
22307 else
22308     ARFLAGS=""
22309 fi
22310 
22311 
22312 # For hotspot, we need these in Windows mixed path; other platforms keep them the same
22313 HOTSPOT_CXX="$CXX"
22314 HOTSPOT_LD="$LD"
22315 
22316 
22317 
22318 COMPILER_NAME=gcc
22319 COMPILER_TYPE=CC
22320 if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22321 
22322     # For now, assume that we are always compiling using cl.exe.
22323     CC_OUT_OPTION=-Fo
22324     EXE_OUT_OPTION=-out:
22325     LD_OUT_OPTION=-out:
22326     AR_OUT_OPTION=-out:
22327     # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22328     # program for something completely different.
22329     # Extract the first word of "link", so it can be a program name with args.
22330 set dummy link; ac_word=$2
22331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22332 $as_echo_n "checking for $ac_word... " >&6; }
22333 if ${ac_cv_prog_WINLD+:} false; then :
22334   $as_echo_n "(cached) " >&6
22335 else
22336   if test -n "$WINLD"; then
22337   ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22338 else
22339   ac_prog_rejected=no
22340 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22341 for as_dir in $PATH
22342 do
22343   IFS=$as_save_IFS
22344   test -z "$as_dir" && as_dir=.
22345     for ac_exec_ext in '' $ac_executable_extensions; do
22346   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22347     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22348        ac_prog_rejected=yes
22349        continue
22350      fi
22351     ac_cv_prog_WINLD="link"
22352     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22353     break 2
22354   fi
22355 done
22356   done
22357 IFS=$as_save_IFS
22358 
22359 if test $ac_prog_rejected = yes; then
22360   # We found a bogon in the path, so make sure we never use it.
22361   set dummy $ac_cv_prog_WINLD
22362   shift
22363   if test $# != 0; then
22364     # We chose a different compiler from the bogus one.
22365     # However, it has the same basename, so the bogon will be chosen
22366     # first if we set WINLD to just the basename; use the full file name.
22367     shift
22368     ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
22369   fi
22370 fi
22371 fi
22372 fi
22373 WINLD=$ac_cv_prog_WINLD
22374 if test -n "$WINLD"; then
22375   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
22376 $as_echo "$WINLD" >&6; }
22377 else
22378   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22379 $as_echo "no" >&6; }
22380 fi
22381 
22382 
22383     # Since we must ignore the first found link, WINLD will contain
22384     # the full path to the link.exe program.
22385 
22386   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22387 
22388   # First separate the path from the arguments. This will split at the first
22389   # space.
22390   complete="$WINLD"
22391   path="${complete%% *}"
22392   tmp="$complete EOL"
22393   arguments="${tmp#* }"
22394 
22395   # Input might be given as Windows format, start by converting to
22396   # unix format.
22397   new_path=`$CYGPATH -u "$path"`
22398 
22399   # Now try to locate executable using which
22400   new_path=`$WHICH "$new_path" 2> /dev/null`
22401   # bat and cmd files are not always considered executable in cygwin causing which
22402   # to not find them
22403   if test "x$new_path" = x \
22404            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22405            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22406     new_path=`$CYGPATH -u "$path"`
22407   fi
22408   if test "x$new_path" = x; then
22409     # Oops. Which didn't find the executable.
22410     # The splitting of arguments from the executable at a space might have been incorrect,
22411     # since paths with space are more likely in Windows. Give it another try with the whole
22412     # argument.
22413     path="$complete"
22414     arguments="EOL"
22415     new_path=`$CYGPATH -u "$path"`
22416     new_path=`$WHICH "$new_path" 2> /dev/null`
22417     # bat and cmd files are not always considered executable in cygwin causing which
22418     # to not find them
22419     if test "x$new_path" = x \
22420              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22421              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22422       new_path=`$CYGPATH -u "$path"`
22423     fi
22424     if test "x$new_path" = x; then
22425       # It's still not found. Now this is an unrecoverable error.
22426       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22427 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22428       has_space=`$ECHO "$complete" | $GREP " "`
22429       if test "x$has_space" != x; then
22430         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22431 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22432       fi
22433       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22434     fi
22435   fi
22436 
22437   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22438   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22439   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22440   # "foo.exe" is OK but "foo" is an error.
22441   #
22442   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22443   # It is also a way to make sure we got the proper file name for the real test later on.
22444   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22445   if test "x$test_shortpath" = x; then
22446     # Short path failed, file does not exist as specified.
22447     # Try adding .exe or .cmd
22448     if test -f "${new_path}.exe"; then
22449        input_to_shortpath="${new_path}.exe"
22450     elif test -f "${new_path}.cmd"; then
22451        input_to_shortpath="${new_path}.cmd"
22452     else
22453       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
22454 $as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
22455       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22456 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22457       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22458     fi
22459   else
22460     input_to_shortpath="$new_path"
22461   fi
22462 
22463   # Call helper function which possibly converts this using DOS-style short mode.
22464   # If so, the updated path is stored in $new_path.
22465   new_path="$input_to_shortpath"
22466 
22467   input_path="$input_to_shortpath"
22468   # Check if we need to convert this using DOS-style short mode. If the path
22469   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22470   # take no chances and rewrite it.
22471   # Note: m4 eats our [], so we need to use [ and ] instead.
22472   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22473   if test "x$has_forbidden_chars" != x; then
22474     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22475     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22476     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22477     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22478       # Going to short mode and back again did indeed matter. Since short mode is
22479       # case insensitive, let's make it lowercase to improve readability.
22480       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22481       # Now convert it back to Unix-stile (cygpath)
22482       input_path=`$CYGPATH -u "$shortmode_path"`
22483       new_path="$input_path"
22484     fi
22485   fi
22486 
22487   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22488   if test "x$test_cygdrive_prefix" = x; then
22489     # As a simple fix, exclude /usr/bin since it's not a real path.
22490     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22491       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22492       # a path prefixed by /cygdrive for fixpath to work.
22493       new_path="$CYGWIN_ROOT_PATH$input_path"
22494     fi
22495   fi
22496 
22497   # remove trailing .exe if any
22498   new_path="${new_path/%.exe/}"
22499 
22500   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22501 
22502   # First separate the path from the arguments. This will split at the first
22503   # space.
22504   complete="$WINLD"
22505   path="${complete%% *}"
22506   tmp="$complete EOL"
22507   arguments="${tmp#* }"
22508 
22509   # Input might be given as Windows format, start by converting to
22510   # unix format.
22511   new_path="$path"
22512 
22513   windows_path="$new_path"
22514   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22515     unix_path=`$CYGPATH -u "$windows_path"`
22516     new_path="$unix_path"
22517   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22518     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22519     new_path="$unix_path"
22520   fi
22521 
22522 
22523   # Now try to locate executable using which
22524   new_path=`$WHICH "$new_path" 2> /dev/null`
22525 
22526   if test "x$new_path" = x; then
22527     # Oops. Which didn't find the executable.
22528     # The splitting of arguments from the executable at a space might have been incorrect,
22529     # since paths with space are more likely in Windows. Give it another try with the whole
22530     # argument.
22531     path="$complete"
22532     arguments="EOL"
22533     new_path="$path"
22534 
22535   windows_path="$new_path"
22536   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22537     unix_path=`$CYGPATH -u "$windows_path"`
22538     new_path="$unix_path"
22539   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22540     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22541     new_path="$unix_path"
22542   fi
22543 
22544 
22545     new_path=`$WHICH "$new_path" 2> /dev/null`
22546 
22547     if test "x$new_path" = x; then
22548       # It's still not found. Now this is an unrecoverable error.
22549       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22550 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22551       has_space=`$ECHO "$complete" | $GREP " "`
22552       if test "x$has_space" != x; then
22553         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22554 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22555       fi
22556       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22557     fi
22558   fi
22559 
22560   # Now new_path has a complete unix path to the binary
22561   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22562     # Keep paths in /bin as-is, but remove trailing .exe if any
22563     new_path="${new_path/%.exe/}"
22564     # Do not save /bin paths to all_fixpath_prefixes!
22565   else
22566     # Not in mixed or Windows style, start by that.
22567     new_path=`cmd //c echo $new_path`
22568 
22569   input_path="$new_path"
22570   # Check if we need to convert this using DOS-style short mode. If the path
22571   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22572   # take no chances and rewrite it.
22573   # Note: m4 eats our [], so we need to use [ and ] instead.
22574   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22575   if test "x$has_forbidden_chars" != x; then
22576     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22577     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22578   fi
22579 
22580     # Output is in $new_path
22581 
22582   windows_path="$new_path"
22583   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22584     unix_path=`$CYGPATH -u "$windows_path"`
22585     new_path="$unix_path"
22586   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22587     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22588     new_path="$unix_path"
22589   fi
22590 
22591     # remove trailing .exe if any
22592     new_path="${new_path/%.exe/}"
22593 
22594     # Save the first 10 bytes of this path to the storage, so fixpath can work.
22595     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22596   fi
22597 
22598   else
22599     # We're on a posix platform. Hooray! :)
22600     # First separate the path from the arguments. This will split at the first
22601     # space.
22602     complete="$WINLD"
22603     path="${complete%% *}"
22604     tmp="$complete EOL"
22605     arguments="${tmp#* }"
22606 
22607     # Cannot rely on the command "which" here since it doesn't always work.
22608     is_absolute_path=`$ECHO "$path" | $GREP ^/`
22609     if test -z "$is_absolute_path"; then
22610       # Path to executable is not absolute. Find it.
22611       IFS_save="$IFS"
22612       IFS=:
22613       for p in $PATH; do
22614         if test -f "$p/$path" && test -x "$p/$path"; then
22615           new_path="$p/$path"
22616           break
22617         fi
22618       done
22619       IFS="$IFS_save"
22620     else
22621       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
22622 $as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
22623       new_path="$path"
22624     fi
22625 
22626     if test "x$new_path" = x; then
22627         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22628 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22629         has_space=`$ECHO "$complete" | $GREP " "`
22630         if test "x$has_space" != x; then
22631           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22632 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22633         fi
22634         as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22635       fi
22636   fi
22637 
22638       # Now join together the path and the arguments once again
22639       if test "x$arguments" != xEOL; then
22640         new_complete="$new_path ${arguments% *}"
22641       else
22642         new_complete="$new_path"
22643       fi
22644 
22645   if test "x$complete" != "x$new_complete"; then
22646       WINLD="$new_complete"
22647       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
22648 $as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
22649     fi
22650 
22651     printf "Windows linker was found at $WINLD\n"
22652     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
22653 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
22654     "$WINLD" --version > /dev/null
22655     if test $? -eq 0 ; then
22656       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22657 $as_echo "no" >&6; }
22658       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
22659     else
22660       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22661 $as_echo "yes" >&6; }
22662     fi
22663     LD="$WINLD"
22664     LDEXE="$WINLD"
22665     LDCXX="$WINLD"
22666     LDEXECXX="$WINLD"
22667 
22668     # Extract the first word of "mt", so it can be a program name with args.
22669 set dummy mt; ac_word=$2
22670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22671 $as_echo_n "checking for $ac_word... " >&6; }
22672 if ${ac_cv_prog_MT+:} false; then :
22673   $as_echo_n "(cached) " >&6
22674 else
22675   if test -n "$MT"; then
22676   ac_cv_prog_MT="$MT" # Let the user override the test.
22677 else
22678   ac_prog_rejected=no
22679 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22680 for as_dir in $PATH
22681 do
22682   IFS=$as_save_IFS
22683   test -z "$as_dir" && as_dir=.
22684     for ac_exec_ext in '' $ac_executable_extensions; do
22685   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22686     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
22687        ac_prog_rejected=yes
22688        continue
22689      fi
22690     ac_cv_prog_MT="mt"
22691     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22692     break 2
22693   fi
22694 done
22695   done
22696 IFS=$as_save_IFS
22697 
22698 if test $ac_prog_rejected = yes; then
22699   # We found a bogon in the path, so make sure we never use it.
22700   set dummy $ac_cv_prog_MT
22701   shift
22702   if test $# != 0; then
22703     # We chose a different compiler from the bogus one.
22704     # However, it has the same basename, so the bogon will be chosen
22705     # first if we set MT to just the basename; use the full file name.
22706     shift
22707     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
22708   fi
22709 fi
22710 fi
22711 fi
22712 MT=$ac_cv_prog_MT
22713 if test -n "$MT"; then
22714   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
22715 $as_echo "$MT" >&6; }
22716 else
22717   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22718 $as_echo "no" >&6; }
22719 fi
22720 
22721 
22722 
22723   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22724 
22725   # First separate the path from the arguments. This will split at the first
22726   # space.
22727   complete="$MT"
22728   path="${complete%% *}"
22729   tmp="$complete EOL"
22730   arguments="${tmp#* }"
22731 
22732   # Input might be given as Windows format, start by converting to
22733   # unix format.
22734   new_path=`$CYGPATH -u "$path"`
22735 
22736   # Now try to locate executable using which
22737   new_path=`$WHICH "$new_path" 2> /dev/null`
22738   # bat and cmd files are not always considered executable in cygwin causing which
22739   # to not find them
22740   if test "x$new_path" = x \
22741            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22742            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22743     new_path=`$CYGPATH -u "$path"`
22744   fi
22745   if test "x$new_path" = x; then
22746     # Oops. Which didn't find the executable.
22747     # The splitting of arguments from the executable at a space might have been incorrect,
22748     # since paths with space are more likely in Windows. Give it another try with the whole
22749     # argument.
22750     path="$complete"
22751     arguments="EOL"
22752     new_path=`$CYGPATH -u "$path"`
22753     new_path=`$WHICH "$new_path" 2> /dev/null`
22754     # bat and cmd files are not always considered executable in cygwin causing which
22755     # to not find them
22756     if test "x$new_path" = x \
22757              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22758              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22759       new_path=`$CYGPATH -u "$path"`
22760     fi
22761     if test "x$new_path" = x; then
22762       # It's still not found. Now this is an unrecoverable error.
22763       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22764 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22765       has_space=`$ECHO "$complete" | $GREP " "`
22766       if test "x$has_space" != x; then
22767         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22768 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22769       fi
22770       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22771     fi
22772   fi
22773 
22774   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22775   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22776   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22777   # "foo.exe" is OK but "foo" is an error.
22778   #
22779   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22780   # It is also a way to make sure we got the proper file name for the real test later on.
22781   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22782   if test "x$test_shortpath" = x; then
22783     # Short path failed, file does not exist as specified.
22784     # Try adding .exe or .cmd
22785     if test -f "${new_path}.exe"; then
22786        input_to_shortpath="${new_path}.exe"
22787     elif test -f "${new_path}.cmd"; then
22788        input_to_shortpath="${new_path}.cmd"
22789     else
22790       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
22791 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
22792       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22793 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22794       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22795     fi
22796   else
22797     input_to_shortpath="$new_path"
22798   fi
22799 
22800   # Call helper function which possibly converts this using DOS-style short mode.
22801   # If so, the updated path is stored in $new_path.
22802   new_path="$input_to_shortpath"
22803 
22804   input_path="$input_to_shortpath"
22805   # Check if we need to convert this using DOS-style short mode. If the path
22806   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22807   # take no chances and rewrite it.
22808   # Note: m4 eats our [], so we need to use [ and ] instead.
22809   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22810   if test "x$has_forbidden_chars" != x; then
22811     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22812     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22813     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22814     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22815       # Going to short mode and back again did indeed matter. Since short mode is
22816       # case insensitive, let's make it lowercase to improve readability.
22817       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22818       # Now convert it back to Unix-stile (cygpath)
22819       input_path=`$CYGPATH -u "$shortmode_path"`
22820       new_path="$input_path"
22821     fi
22822   fi
22823 
22824   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22825   if test "x$test_cygdrive_prefix" = x; then
22826     # As a simple fix, exclude /usr/bin since it's not a real path.
22827     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22828       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22829       # a path prefixed by /cygdrive for fixpath to work.
22830       new_path="$CYGWIN_ROOT_PATH$input_path"
22831     fi
22832   fi
22833 
22834   # remove trailing .exe if any
22835   new_path="${new_path/%.exe/}"
22836 
22837   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22838 
22839   # First separate the path from the arguments. This will split at the first
22840   # space.
22841   complete="$MT"
22842   path="${complete%% *}"
22843   tmp="$complete EOL"
22844   arguments="${tmp#* }"
22845 
22846   # Input might be given as Windows format, start by converting to
22847   # unix format.
22848   new_path="$path"
22849 
22850   windows_path="$new_path"
22851   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22852     unix_path=`$CYGPATH -u "$windows_path"`
22853     new_path="$unix_path"
22854   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22855     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22856     new_path="$unix_path"
22857   fi
22858 
22859 
22860   # Now try to locate executable using which
22861   new_path=`$WHICH "$new_path" 2> /dev/null`
22862 
22863   if test "x$new_path" = x; then
22864     # Oops. Which didn't find the executable.
22865     # The splitting of arguments from the executable at a space might have been incorrect,
22866     # since paths with space are more likely in Windows. Give it another try with the whole
22867     # argument.
22868     path="$complete"
22869     arguments="EOL"
22870     new_path="$path"
22871 
22872   windows_path="$new_path"
22873   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22874     unix_path=`$CYGPATH -u "$windows_path"`
22875     new_path="$unix_path"
22876   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22877     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22878     new_path="$unix_path"
22879   fi
22880 
22881 
22882     new_path=`$WHICH "$new_path" 2> /dev/null`
22883 
22884     if test "x$new_path" = x; then
22885       # It's still not found. Now this is an unrecoverable error.
22886       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22887 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22888       has_space=`$ECHO "$complete" | $GREP " "`
22889       if test "x$has_space" != x; then
22890         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22891 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22892       fi
22893       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22894     fi
22895   fi
22896 
22897   # Now new_path has a complete unix path to the binary
22898   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22899     # Keep paths in /bin as-is, but remove trailing .exe if any
22900     new_path="${new_path/%.exe/}"
22901     # Do not save /bin paths to all_fixpath_prefixes!
22902   else
22903     # Not in mixed or Windows style, start by that.
22904     new_path=`cmd //c echo $new_path`
22905 
22906   input_path="$new_path"
22907   # Check if we need to convert this using DOS-style short mode. If the path
22908   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22909   # take no chances and rewrite it.
22910   # Note: m4 eats our [], so we need to use [ and ] instead.
22911   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22912   if test "x$has_forbidden_chars" != x; then
22913     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22914     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22915   fi
22916 
22917     # Output is in $new_path
22918 
22919   windows_path="$new_path"
22920   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22921     unix_path=`$CYGPATH -u "$windows_path"`
22922     new_path="$unix_path"
22923   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22924     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22925     new_path="$unix_path"
22926   fi
22927 
22928     # remove trailing .exe if any
22929     new_path="${new_path/%.exe/}"
22930 
22931     # Save the first 10 bytes of this path to the storage, so fixpath can work.
22932     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22933   fi
22934 
22935   else
22936     # We're on a posix platform. Hooray! :)
22937     # First separate the path from the arguments. This will split at the first
22938     # space.
22939     complete="$MT"
22940     path="${complete%% *}"
22941     tmp="$complete EOL"
22942     arguments="${tmp#* }"
22943 
22944     # Cannot rely on the command "which" here since it doesn't always work.
22945     is_absolute_path=`$ECHO "$path" | $GREP ^/`
22946     if test -z "$is_absolute_path"; then
22947       # Path to executable is not absolute. Find it.
22948       IFS_save="$IFS"
22949       IFS=:
22950       for p in $PATH; do
22951         if test -f "$p/$path" && test -x "$p/$path"; then
22952           new_path="$p/$path"
22953           break
22954         fi
22955       done
22956       IFS="$IFS_save"
22957     else
22958       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
22959 $as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
22960       new_path="$path"
22961     fi
22962 
22963     if test "x$new_path" = x; then
22964         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22965 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22966         has_space=`$ECHO "$complete" | $GREP " "`
22967         if test "x$has_space" != x; then
22968           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22969 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22970         fi
22971         as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22972       fi
22973   fi
22974 
22975       # Now join together the path and the arguments once again
22976       if test "x$arguments" != xEOL; then
22977         new_complete="$new_path ${arguments% *}"
22978       else
22979         new_complete="$new_path"
22980       fi
22981 
22982   if test "x$complete" != "x$new_complete"; then
22983       MT="$new_complete"
22984       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
22985 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
22986     fi
22987 
22988     # The resource compiler
22989     # Extract the first word of "rc", so it can be a program name with args.
22990 set dummy rc; ac_word=$2
22991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22992 $as_echo_n "checking for $ac_word... " >&6; }
22993 if ${ac_cv_prog_RC+:} false; then :
22994   $as_echo_n "(cached) " >&6
22995 else
22996   if test -n "$RC"; then
22997   ac_cv_prog_RC="$RC" # Let the user override the test.
22998 else
22999   ac_prog_rejected=no
23000 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23001 for as_dir in $PATH
23002 do
23003   IFS=$as_save_IFS
23004   test -z "$as_dir" && as_dir=.
23005     for ac_exec_ext in '' $ac_executable_extensions; do
23006   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23007     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23008        ac_prog_rejected=yes
23009        continue
23010      fi
23011     ac_cv_prog_RC="rc"
23012     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23013     break 2
23014   fi
23015 done
23016   done
23017 IFS=$as_save_IFS
23018 
23019 if test $ac_prog_rejected = yes; then
23020   # We found a bogon in the path, so make sure we never use it.
23021   set dummy $ac_cv_prog_RC
23022   shift
23023   if test $# != 0; then
23024     # We chose a different compiler from the bogus one.
23025     # However, it has the same basename, so the bogon will be chosen
23026     # first if we set RC to just the basename; use the full file name.
23027     shift
23028     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23029   fi
23030 fi
23031 fi
23032 fi
23033 RC=$ac_cv_prog_RC
23034 if test -n "$RC"; then
23035   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23036 $as_echo "$RC" >&6; }
23037 else
23038   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23039 $as_echo "no" >&6; }
23040 fi
23041 
23042 
23043 
23044   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23045 
23046   # First separate the path from the arguments. This will split at the first
23047   # space.
23048   complete="$RC"
23049   path="${complete%% *}"
23050   tmp="$complete EOL"
23051   arguments="${tmp#* }"
23052 
23053   # Input might be given as Windows format, start by converting to
23054   # unix format.
23055   new_path=`$CYGPATH -u "$path"`
23056 
23057   # Now try to locate executable using which
23058   new_path=`$WHICH "$new_path" 2> /dev/null`
23059   # bat and cmd files are not always considered executable in cygwin causing which
23060   # to not find them
23061   if test "x$new_path" = x \
23062            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23063            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23064     new_path=`$CYGPATH -u "$path"`
23065   fi
23066   if test "x$new_path" = x; then
23067     # Oops. Which didn't find the executable.
23068     # The splitting of arguments from the executable at a space might have been incorrect,
23069     # since paths with space are more likely in Windows. Give it another try with the whole
23070     # argument.
23071     path="$complete"
23072     arguments="EOL"
23073     new_path=`$CYGPATH -u "$path"`
23074     new_path=`$WHICH "$new_path" 2> /dev/null`
23075     # bat and cmd files are not always considered executable in cygwin causing which
23076     # to not find them
23077     if test "x$new_path" = x \
23078              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23079              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23080       new_path=`$CYGPATH -u "$path"`
23081     fi
23082     if test "x$new_path" = x; then
23083       # It's still not found. Now this is an unrecoverable error.
23084       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23085 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23086       has_space=`$ECHO "$complete" | $GREP " "`
23087       if test "x$has_space" != x; then
23088         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23089 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23090       fi
23091       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23092     fi
23093   fi
23094 
23095   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23096   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23097   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23098   # "foo.exe" is OK but "foo" is an error.
23099   #
23100   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23101   # It is also a way to make sure we got the proper file name for the real test later on.
23102   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23103   if test "x$test_shortpath" = x; then
23104     # Short path failed, file does not exist as specified.
23105     # Try adding .exe or .cmd
23106     if test -f "${new_path}.exe"; then
23107        input_to_shortpath="${new_path}.exe"
23108     elif test -f "${new_path}.cmd"; then
23109        input_to_shortpath="${new_path}.cmd"
23110     else
23111       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23112 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23113       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23114 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23115       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23116     fi
23117   else
23118     input_to_shortpath="$new_path"
23119   fi
23120 
23121   # Call helper function which possibly converts this using DOS-style short mode.
23122   # If so, the updated path is stored in $new_path.
23123   new_path="$input_to_shortpath"
23124 
23125   input_path="$input_to_shortpath"
23126   # Check if we need to convert this using DOS-style short mode. If the path
23127   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23128   # take no chances and rewrite it.
23129   # Note: m4 eats our [], so we need to use [ and ] instead.
23130   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23131   if test "x$has_forbidden_chars" != x; then
23132     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23133     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23134     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23135     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23136       # Going to short mode and back again did indeed matter. Since short mode is
23137       # case insensitive, let's make it lowercase to improve readability.
23138       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23139       # Now convert it back to Unix-stile (cygpath)
23140       input_path=`$CYGPATH -u "$shortmode_path"`
23141       new_path="$input_path"
23142     fi
23143   fi
23144 
23145   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23146   if test "x$test_cygdrive_prefix" = x; then
23147     # As a simple fix, exclude /usr/bin since it's not a real path.
23148     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23149       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23150       # a path prefixed by /cygdrive for fixpath to work.
23151       new_path="$CYGWIN_ROOT_PATH$input_path"
23152     fi
23153   fi
23154 
23155   # remove trailing .exe if any
23156   new_path="${new_path/%.exe/}"
23157 
23158   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23159 
23160   # First separate the path from the arguments. This will split at the first
23161   # space.
23162   complete="$RC"
23163   path="${complete%% *}"
23164   tmp="$complete EOL"
23165   arguments="${tmp#* }"
23166 
23167   # Input might be given as Windows format, start by converting to
23168   # unix format.
23169   new_path="$path"
23170 
23171   windows_path="$new_path"
23172   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23173     unix_path=`$CYGPATH -u "$windows_path"`
23174     new_path="$unix_path"
23175   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23176     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23177     new_path="$unix_path"
23178   fi
23179 
23180 
23181   # Now try to locate executable using which
23182   new_path=`$WHICH "$new_path" 2> /dev/null`
23183 
23184   if test "x$new_path" = x; then
23185     # Oops. Which didn't find the executable.
23186     # The splitting of arguments from the executable at a space might have been incorrect,
23187     # since paths with space are more likely in Windows. Give it another try with the whole
23188     # argument.
23189     path="$complete"
23190     arguments="EOL"
23191     new_path="$path"
23192 
23193   windows_path="$new_path"
23194   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23195     unix_path=`$CYGPATH -u "$windows_path"`
23196     new_path="$unix_path"
23197   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23198     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23199     new_path="$unix_path"
23200   fi
23201 
23202 
23203     new_path=`$WHICH "$new_path" 2> /dev/null`
23204 
23205     if test "x$new_path" = x; then
23206       # It's still not found. Now this is an unrecoverable error.
23207       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23208 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23209       has_space=`$ECHO "$complete" | $GREP " "`
23210       if test "x$has_space" != x; then
23211         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23212 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23213       fi
23214       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23215     fi
23216   fi
23217 
23218   # Now new_path has a complete unix path to the binary
23219   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23220     # Keep paths in /bin as-is, but remove trailing .exe if any
23221     new_path="${new_path/%.exe/}"
23222     # Do not save /bin paths to all_fixpath_prefixes!
23223   else
23224     # Not in mixed or Windows style, start by that.
23225     new_path=`cmd //c echo $new_path`
23226 
23227   input_path="$new_path"
23228   # Check if we need to convert this using DOS-style short mode. If the path
23229   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23230   # take no chances and rewrite it.
23231   # Note: m4 eats our [], so we need to use [ and ] instead.
23232   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23233   if test "x$has_forbidden_chars" != x; then
23234     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23235     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23236   fi
23237 
23238     # Output is in $new_path
23239 
23240   windows_path="$new_path"
23241   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23242     unix_path=`$CYGPATH -u "$windows_path"`
23243     new_path="$unix_path"
23244   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23245     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23246     new_path="$unix_path"
23247   fi
23248 
23249     # remove trailing .exe if any
23250     new_path="${new_path/%.exe/}"
23251 
23252     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23253     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23254   fi
23255 
23256   else
23257     # We're on a posix platform. Hooray! :)
23258     # First separate the path from the arguments. This will split at the first
23259     # space.
23260     complete="$RC"
23261     path="${complete%% *}"
23262     tmp="$complete EOL"
23263     arguments="${tmp#* }"
23264 
23265     # Cannot rely on the command "which" here since it doesn't always work.
23266     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23267     if test -z "$is_absolute_path"; then
23268       # Path to executable is not absolute. Find it.
23269       IFS_save="$IFS"
23270       IFS=:
23271       for p in $PATH; do
23272         if test -f "$p/$path" && test -x "$p/$path"; then
23273           new_path="$p/$path"
23274           break
23275         fi
23276       done
23277       IFS="$IFS_save"
23278     else
23279       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23280 $as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23281       new_path="$path"
23282     fi
23283 
23284     if test "x$new_path" = x; then
23285         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23286 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23287         has_space=`$ECHO "$complete" | $GREP " "`
23288         if test "x$has_space" != x; then
23289           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23290 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23291         fi
23292         as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23293       fi
23294   fi
23295 
23296       # Now join together the path and the arguments once again
23297       if test "x$arguments" != xEOL; then
23298         new_complete="$new_path ${arguments% *}"
23299       else
23300         new_complete="$new_path"
23301       fi
23302 
23303   if test "x$complete" != "x$new_complete"; then
23304       RC="$new_complete"
23305       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23306 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23307     fi
23308 
23309 
23310     # For hotspot, we need these in Windows mixed path,
23311     # so rewrite them all. Need added .exe suffix.
23312     HOTSPOT_CXX="$CXX.exe"
23313     HOTSPOT_LD="$LD.exe"
23314     HOTSPOT_MT="$MT.exe"
23315     HOTSPOT_RC="$RC.exe"
23316 
23317   unix_path="$HOTSPOT_CXX"
23318   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23319     windows_path=`$CYGPATH -m "$unix_path"`
23320     HOTSPOT_CXX="$windows_path"
23321   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23322     windows_path=`cmd //c echo $unix_path`
23323     HOTSPOT_CXX="$windows_path"
23324   fi
23325 
23326 
23327   unix_path="$HOTSPOT_LD"
23328   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23329     windows_path=`$CYGPATH -m "$unix_path"`
23330     HOTSPOT_LD="$windows_path"
23331   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23332     windows_path=`cmd //c echo $unix_path`
23333     HOTSPOT_LD="$windows_path"
23334   fi
23335 
23336 
23337   unix_path="$HOTSPOT_MT"
23338   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23339     windows_path=`$CYGPATH -m "$unix_path"`
23340     HOTSPOT_MT="$windows_path"
23341   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23342     windows_path=`cmd //c echo $unix_path`
23343     HOTSPOT_MT="$windows_path"
23344   fi
23345 
23346 
23347   unix_path="$HOTSPOT_RC"
23348   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23349     windows_path=`$CYGPATH -m "$unix_path"`
23350     HOTSPOT_RC="$windows_path"
23351   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23352     windows_path=`cmd //c echo $unix_path`
23353     HOTSPOT_RC="$windows_path"
23354   fi
23355 
23356 
23357 
23358 
23359     RC_FLAGS="-nologo -l 0x409 -r"
23360     if test "x$VARIANT" = xOPT; then :
23361 
23362         RC_FLAGS="$RC_FLAGS -d NDEBUG"
23363 
23364 fi
23365     JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
23366     if test "x$JDK_UPDATE_VERSION" = x; then :
23367 
23368         JDK_UPDATE_VERSION_NOTNULL=0
23369 
23370 fi
23371     RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
23372     RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
23373     RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
23374     RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
23375     RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
23376     RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
23377     RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
23378 
23379     # lib.exe is used to create static libraries.
23380     # Extract the first word of "lib", so it can be a program name with args.
23381 set dummy lib; ac_word=$2
23382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23383 $as_echo_n "checking for $ac_word... " >&6; }
23384 if ${ac_cv_prog_WINAR+:} false; then :
23385   $as_echo_n "(cached) " >&6
23386 else
23387   if test -n "$WINAR"; then
23388   ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
23389 else
23390 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23391 for as_dir in $PATH
23392 do
23393   IFS=$as_save_IFS
23394   test -z "$as_dir" && as_dir=.
23395     for ac_exec_ext in '' $ac_executable_extensions; do
23396   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23397     ac_cv_prog_WINAR="lib"
23398     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23399     break 2
23400   fi
23401 done
23402   done
23403 IFS=$as_save_IFS
23404 
23405 fi
23406 fi
23407 WINAR=$ac_cv_prog_WINAR
23408 if test -n "$WINAR"; then
23409   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
23410 $as_echo "$WINAR" >&6; }
23411 else
23412   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23413 $as_echo "no" >&6; }
23414 fi
23415 
23416 
23417 
23418   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23419 
23420   # First separate the path from the arguments. This will split at the first
23421   # space.
23422   complete="$WINAR"
23423   path="${complete%% *}"
23424   tmp="$complete EOL"
23425   arguments="${tmp#* }"
23426 
23427   # Input might be given as Windows format, start by converting to
23428   # unix format.
23429   new_path=`$CYGPATH -u "$path"`
23430 
23431   # Now try to locate executable using which
23432   new_path=`$WHICH "$new_path" 2> /dev/null`
23433   # bat and cmd files are not always considered executable in cygwin causing which
23434   # to not find them
23435   if test "x$new_path" = x \
23436            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23437            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23438     new_path=`$CYGPATH -u "$path"`
23439   fi
23440   if test "x$new_path" = x; then
23441     # Oops. Which didn't find the executable.
23442     # The splitting of arguments from the executable at a space might have been incorrect,
23443     # since paths with space are more likely in Windows. Give it another try with the whole
23444     # argument.
23445     path="$complete"
23446     arguments="EOL"
23447     new_path=`$CYGPATH -u "$path"`
23448     new_path=`$WHICH "$new_path" 2> /dev/null`
23449     # bat and cmd files are not always considered executable in cygwin causing which
23450     # to not find them
23451     if test "x$new_path" = x \
23452              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23453              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23454       new_path=`$CYGPATH -u "$path"`
23455     fi
23456     if test "x$new_path" = x; then
23457       # It's still not found. Now this is an unrecoverable error.
23458       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23459 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23460       has_space=`$ECHO "$complete" | $GREP " "`
23461       if test "x$has_space" != x; then
23462         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23463 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23464       fi
23465       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23466     fi
23467   fi
23468 
23469   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23470   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23471   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23472   # "foo.exe" is OK but "foo" is an error.
23473   #
23474   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23475   # It is also a way to make sure we got the proper file name for the real test later on.
23476   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23477   if test "x$test_shortpath" = x; then
23478     # Short path failed, file does not exist as specified.
23479     # Try adding .exe or .cmd
23480     if test -f "${new_path}.exe"; then
23481        input_to_shortpath="${new_path}.exe"
23482     elif test -f "${new_path}.cmd"; then
23483        input_to_shortpath="${new_path}.cmd"
23484     else
23485       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
23486 $as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
23487       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23488 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23489       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23490     fi
23491   else
23492     input_to_shortpath="$new_path"
23493   fi
23494 
23495   # Call helper function which possibly converts this using DOS-style short mode.
23496   # If so, the updated path is stored in $new_path.
23497   new_path="$input_to_shortpath"
23498 
23499   input_path="$input_to_shortpath"
23500   # Check if we need to convert this using DOS-style short mode. If the path
23501   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23502   # take no chances and rewrite it.
23503   # Note: m4 eats our [], so we need to use [ and ] instead.
23504   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23505   if test "x$has_forbidden_chars" != x; then
23506     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23507     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23508     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23509     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23510       # Going to short mode and back again did indeed matter. Since short mode is
23511       # case insensitive, let's make it lowercase to improve readability.
23512       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23513       # Now convert it back to Unix-stile (cygpath)
23514       input_path=`$CYGPATH -u "$shortmode_path"`
23515       new_path="$input_path"
23516     fi
23517   fi
23518 
23519   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23520   if test "x$test_cygdrive_prefix" = x; then
23521     # As a simple fix, exclude /usr/bin since it's not a real path.
23522     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23523       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23524       # a path prefixed by /cygdrive for fixpath to work.
23525       new_path="$CYGWIN_ROOT_PATH$input_path"
23526     fi
23527   fi
23528 
23529   # remove trailing .exe if any
23530   new_path="${new_path/%.exe/}"
23531 
23532   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23533 
23534   # First separate the path from the arguments. This will split at the first
23535   # space.
23536   complete="$WINAR"
23537   path="${complete%% *}"
23538   tmp="$complete EOL"
23539   arguments="${tmp#* }"
23540 
23541   # Input might be given as Windows format, start by converting to
23542   # unix format.
23543   new_path="$path"
23544 
23545   windows_path="$new_path"
23546   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23547     unix_path=`$CYGPATH -u "$windows_path"`
23548     new_path="$unix_path"
23549   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23550     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23551     new_path="$unix_path"
23552   fi
23553 
23554 
23555   # Now try to locate executable using which
23556   new_path=`$WHICH "$new_path" 2> /dev/null`
23557 
23558   if test "x$new_path" = x; then
23559     # Oops. Which didn't find the executable.
23560     # The splitting of arguments from the executable at a space might have been incorrect,
23561     # since paths with space are more likely in Windows. Give it another try with the whole
23562     # argument.
23563     path="$complete"
23564     arguments="EOL"
23565     new_path="$path"
23566 
23567   windows_path="$new_path"
23568   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23569     unix_path=`$CYGPATH -u "$windows_path"`
23570     new_path="$unix_path"
23571   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23572     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23573     new_path="$unix_path"
23574   fi
23575 
23576 
23577     new_path=`$WHICH "$new_path" 2> /dev/null`
23578 
23579     if test "x$new_path" = x; then
23580       # It's still not found. Now this is an unrecoverable error.
23581       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23582 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23583       has_space=`$ECHO "$complete" | $GREP " "`
23584       if test "x$has_space" != x; then
23585         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23586 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23587       fi
23588       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23589     fi
23590   fi
23591 
23592   # Now new_path has a complete unix path to the binary
23593   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23594     # Keep paths in /bin as-is, but remove trailing .exe if any
23595     new_path="${new_path/%.exe/}"
23596     # Do not save /bin paths to all_fixpath_prefixes!
23597   else
23598     # Not in mixed or Windows style, start by that.
23599     new_path=`cmd //c echo $new_path`
23600 
23601   input_path="$new_path"
23602   # Check if we need to convert this using DOS-style short mode. If the path
23603   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23604   # take no chances and rewrite it.
23605   # Note: m4 eats our [], so we need to use [ and ] instead.
23606   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23607   if test "x$has_forbidden_chars" != x; then
23608     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23609     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23610   fi
23611 
23612     # Output is in $new_path
23613 
23614   windows_path="$new_path"
23615   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23616     unix_path=`$CYGPATH -u "$windows_path"`
23617     new_path="$unix_path"
23618   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23619     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23620     new_path="$unix_path"
23621   fi
23622 
23623     # remove trailing .exe if any
23624     new_path="${new_path/%.exe/}"
23625 
23626     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23627     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23628   fi
23629 
23630   else
23631     # We're on a posix platform. Hooray! :)
23632     # First separate the path from the arguments. This will split at the first
23633     # space.
23634     complete="$WINAR"
23635     path="${complete%% *}"
23636     tmp="$complete EOL"
23637     arguments="${tmp#* }"
23638 
23639     # Cannot rely on the command "which" here since it doesn't always work.
23640     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23641     if test -z "$is_absolute_path"; then
23642       # Path to executable is not absolute. Find it.
23643       IFS_save="$IFS"
23644       IFS=:
23645       for p in $PATH; do
23646         if test -f "$p/$path" && test -x "$p/$path"; then
23647           new_path="$p/$path"
23648           break
23649         fi
23650       done
23651       IFS="$IFS_save"
23652     else
23653       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
23654 $as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
23655       new_path="$path"
23656     fi
23657 
23658     if test "x$new_path" = x; then
23659         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23660 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23661         has_space=`$ECHO "$complete" | $GREP " "`
23662         if test "x$has_space" != x; then
23663           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23664 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23665         fi
23666         as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23667       fi
23668   fi
23669 
23670       # Now join together the path and the arguments once again
23671       if test "x$arguments" != xEOL; then
23672         new_complete="$new_path ${arguments% *}"
23673       else
23674         new_complete="$new_path"
23675       fi
23676 
23677   if test "x$complete" != "x$new_complete"; then
23678       WINAR="$new_complete"
23679       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
23680 $as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
23681     fi
23682 
23683     AR="$WINAR"
23684     ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
23685 
23686     # Extract the first word of "dumpbin", so it can be a program name with args.
23687 set dummy dumpbin; ac_word=$2
23688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23689 $as_echo_n "checking for $ac_word... " >&6; }
23690 if ${ac_cv_prog_DUMPBIN+:} false; then :
23691   $as_echo_n "(cached) " >&6
23692 else
23693   if test -n "$DUMPBIN"; then
23694   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
23695 else
23696 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23697 for as_dir in $PATH
23698 do
23699   IFS=$as_save_IFS
23700   test -z "$as_dir" && as_dir=.
23701     for ac_exec_ext in '' $ac_executable_extensions; do
23702   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23703     ac_cv_prog_DUMPBIN="dumpbin"
23704     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23705     break 2
23706   fi
23707 done
23708   done
23709 IFS=$as_save_IFS
23710 
23711 fi
23712 fi
23713 DUMPBIN=$ac_cv_prog_DUMPBIN
23714 if test -n "$DUMPBIN"; then
23715   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
23716 $as_echo "$DUMPBIN" >&6; }
23717 else
23718   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23719 $as_echo "no" >&6; }
23720 fi
23721 
23722 
23723 
23724   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23725 
23726   # First separate the path from the arguments. This will split at the first
23727   # space.
23728   complete="$DUMPBIN"
23729   path="${complete%% *}"
23730   tmp="$complete EOL"
23731   arguments="${tmp#* }"
23732 
23733   # Input might be given as Windows format, start by converting to
23734   # unix format.
23735   new_path=`$CYGPATH -u "$path"`
23736 
23737   # Now try to locate executable using which
23738   new_path=`$WHICH "$new_path" 2> /dev/null`
23739   # bat and cmd files are not always considered executable in cygwin causing which
23740   # to not find them
23741   if test "x$new_path" = x \
23742            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23743            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23744     new_path=`$CYGPATH -u "$path"`
23745   fi
23746   if test "x$new_path" = x; then
23747     # Oops. Which didn't find the executable.
23748     # The splitting of arguments from the executable at a space might have been incorrect,
23749     # since paths with space are more likely in Windows. Give it another try with the whole
23750     # argument.
23751     path="$complete"
23752     arguments="EOL"
23753     new_path=`$CYGPATH -u "$path"`
23754     new_path=`$WHICH "$new_path" 2> /dev/null`
23755     # bat and cmd files are not always considered executable in cygwin causing which
23756     # to not find them
23757     if test "x$new_path" = x \
23758              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23759              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23760       new_path=`$CYGPATH -u "$path"`
23761     fi
23762     if test "x$new_path" = x; then
23763       # It's still not found. Now this is an unrecoverable error.
23764       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23765 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23766       has_space=`$ECHO "$complete" | $GREP " "`
23767       if test "x$has_space" != x; then
23768         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23769 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23770       fi
23771       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23772     fi
23773   fi
23774 
23775   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23776   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23777   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23778   # "foo.exe" is OK but "foo" is an error.
23779   #
23780   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23781   # It is also a way to make sure we got the proper file name for the real test later on.
23782   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23783   if test "x$test_shortpath" = x; then
23784     # Short path failed, file does not exist as specified.
23785     # Try adding .exe or .cmd
23786     if test -f "${new_path}.exe"; then
23787        input_to_shortpath="${new_path}.exe"
23788     elif test -f "${new_path}.cmd"; then
23789        input_to_shortpath="${new_path}.cmd"
23790     else
23791       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
23792 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
23793       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23794 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23795       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23796     fi
23797   else
23798     input_to_shortpath="$new_path"
23799   fi
23800 
23801   # Call helper function which possibly converts this using DOS-style short mode.
23802   # If so, the updated path is stored in $new_path.
23803   new_path="$input_to_shortpath"
23804 
23805   input_path="$input_to_shortpath"
23806   # Check if we need to convert this using DOS-style short mode. If the path
23807   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23808   # take no chances and rewrite it.
23809   # Note: m4 eats our [], so we need to use [ and ] instead.
23810   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23811   if test "x$has_forbidden_chars" != x; then
23812     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23813     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23814     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23815     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23816       # Going to short mode and back again did indeed matter. Since short mode is
23817       # case insensitive, let's make it lowercase to improve readability.
23818       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23819       # Now convert it back to Unix-stile (cygpath)
23820       input_path=`$CYGPATH -u "$shortmode_path"`
23821       new_path="$input_path"
23822     fi
23823   fi
23824 
23825   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23826   if test "x$test_cygdrive_prefix" = x; then
23827     # As a simple fix, exclude /usr/bin since it's not a real path.
23828     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23829       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23830       # a path prefixed by /cygdrive for fixpath to work.
23831       new_path="$CYGWIN_ROOT_PATH$inpu