1 #! /bin/sh
   2 # Guess values for system-dependent variables and create Makefiles.
   3 # Generated by GNU Autoconf 2.69 for OpenJDK jdk8.
   4 #
   5 # Report bugs to <build-dev@openjdk.java.net>.
   6 #
   7 #
   8 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
   9 #
  10 #
  11 # This configure script is free software; the Free Software Foundation
  12 # gives unlimited permission to copy, distribute and modify it.
  13 ## -------------------- ##
  14 ## M4sh Initialization. ##
  15 ## -------------------- ##
  16 
  17 # Be more Bourne compatible
  18 DUALCASE=1; export DUALCASE # for MKS sh
  19 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
  20   emulate sh
  21   NULLCMD=:
  22   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
  23   # is contrary to our usage.  Disable this feature.
  24   alias -g '${1+"$@"}'='"$@"'
  25   setopt NO_GLOB_SUBST
  26 else
  27   case `(set -o) 2>/dev/null` in #(
  28   *posix*) :
  29     set -o posix ;; #(
  30   *) :
  31      ;;
  32 esac
  33 fi
  34 
  35 
  36 as_nl='
  37 '
  38 export as_nl
  39 # Printing a long string crashes Solaris 7 /usr/bin/printf.
  40 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  41 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
  42 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
  43 # Prefer a ksh shell builtin over an external printf program on Solaris,
  44 # but without wasting forks for bash or zsh.
  45 if test -z "$BASH_VERSION$ZSH_VERSION" \
  46     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
  47   as_echo='print -r --'
  48   as_echo_n='print -rn --'
  49 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
  50   as_echo='printf %s\n'
  51   as_echo_n='printf %s'
  52 else
  53   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
  54     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
  55     as_echo_n='/usr/ucb/echo -n'
  56   else
  57     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
  58     as_echo_n_body='eval
  59       arg=$1;
  60       case $arg in #(
  61       *"$as_nl"*)
  62         expr "X$arg" : "X\\(.*\\)$as_nl";
  63         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
  64       esac;
  65       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
  66     '
  67     export as_echo_n_body
  68     as_echo_n='sh -c $as_echo_n_body as_echo'
  69   fi
  70   export as_echo_body
  71   as_echo='sh -c $as_echo_body as_echo'
  72 fi
  73 
  74 # The user is always right.
  75 if test "${PATH_SEPARATOR+set}" != set; then
  76   PATH_SEPARATOR=:
  77   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
  78     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
  79       PATH_SEPARATOR=';'
  80   }
  81 fi
  82 
  83 
  84 # IFS
  85 # We need space, tab and new line, in precisely that order.  Quoting is
  86 # there to prevent editors from complaining about space-tab.
  87 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
  88 # splitting by setting IFS to empty value.)
  89 IFS=" ""        $as_nl"
  90 
  91 # Find who we are.  Look in the path if we contain no directory separator.
  92 as_myself=
  93 case $0 in #((
  94   *[\\/]* ) as_myself=$0 ;;
  95   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  96 for as_dir in $PATH
  97 do
  98   IFS=$as_save_IFS
  99   test -z "$as_dir" && as_dir=.
 100     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
 101   done
 102 IFS=$as_save_IFS
 103 
 104      ;;
 105 esac
 106 # We did not find ourselves, most probably we were run as `sh COMMAND'
 107 # in which case we are not to be found in the path.
 108 if test "x$as_myself" = x; then
 109   as_myself=$0
 110 fi
 111 if test ! -f "$as_myself"; then
 112   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
 113   exit 1
 114 fi
 115 
 116 # Unset variables that we do not need and which cause bugs (e.g. in
 117 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
 118 # suppresses any "Segmentation fault" message there.  '((' could
 119 # trigger a bug in pdksh 5.2.14.
 120 for as_var in BASH_ENV ENV MAIL MAILPATH
 121 do eval test x\${$as_var+set} = xset \
 122   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
 123 done
 124 PS1='$ '
 125 PS2='> '
 126 PS4='+ '
 127 
 128 # NLS nuisances.
 129 LC_ALL=C
 130 export LC_ALL
 131 LANGUAGE=C
 132 export LANGUAGE
 133 
 134 # CDPATH.
 135 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 136 
 137 # Use a proper internal environment variable to ensure we don't fall
 138   # into an infinite loop, continuously re-executing ourselves.
 139   if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
 140     _as_can_reexec=no; export _as_can_reexec;
 141     # We cannot yet assume a decent shell, so we have to provide a
 142 # neutralization value for shells without unset; and this also
 143 # works around shells that cannot unset nonexistent variables.
 144 # Preserve -v and -x to the replacement shell.
 145 BASH_ENV=/dev/null
 146 ENV=/dev/null
 147 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
 148 case $- in # ((((
 149   *v*x* | *x*v* ) as_opts=-vx ;;
 150   *v* ) as_opts=-v ;;
 151   *x* ) as_opts=-x ;;
 152   * ) as_opts= ;;
 153 esac
 154 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
 155 # Admittedly, this is quite paranoid, since all the known shells bail
 156 # out after a failed `exec'.
 157 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
 158 as_fn_exit 255
 159   fi
 160   # We don't want this to propagate to other subprocesses.
 161           { _as_can_reexec=; unset _as_can_reexec;}
 162 if test "x$CONFIG_SHELL" = x; then
 163   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
 164   emulate sh
 165   NULLCMD=:
 166   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
 167   # is contrary to our usage.  Disable this feature.
 168   alias -g '\${1+\"\$@\"}'='\"\$@\"'
 169   setopt NO_GLOB_SUBST
 170 else
 171   case \`(set -o) 2>/dev/null\` in #(
 172   *posix*) :
 173     set -o posix ;; #(
 174   *) :
 175      ;;
 176 esac
 177 fi
 178 "
 179   as_required="as_fn_return () { (exit \$1); }
 180 as_fn_success () { as_fn_return 0; }
 181 as_fn_failure () { as_fn_return 1; }
 182 as_fn_ret_success () { return 0; }
 183 as_fn_ret_failure () { return 1; }
 184 
 185 exitcode=0
 186 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
 187 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
 188 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
 189 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
 190 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
 191 
 192 else
 193   exitcode=1; echo positional parameters were not saved.
 194 fi
 195 test x\$exitcode = x0 || exit 1
 196 test -x / || exit 1"
 197   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
 198   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
 199   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
 200   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
 201 test \$(( 1 + 1 )) = 2 || exit 1"
 202   if (eval "$as_required") 2>/dev/null; then :
 203   as_have_required=yes
 204 else
 205   as_have_required=no
 206 fi
 207   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
 208 
 209 else
 210   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 211 as_found=false
 212 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
 213 do
 214   IFS=$as_save_IFS
 215   test -z "$as_dir" && as_dir=.
 216   as_found=:
 217   case $as_dir in #(
 218          /*)
 219            for as_base in sh bash ksh sh5; do
 220              # Try only shells that exist, to save several forks.
 221              as_shell=$as_dir/$as_base
 222              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
 223                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
 224   CONFIG_SHELL=$as_shell as_have_required=yes
 225                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
 226   break 2
 227 fi
 228 fi
 229            done;;
 230        esac
 231   as_found=false
 232 done
 233 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
 234               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
 235   CONFIG_SHELL=$SHELL as_have_required=yes
 236 fi; }
 237 IFS=$as_save_IFS
 238 
 239 
 240       if test "x$CONFIG_SHELL" != x; then :
 241   export CONFIG_SHELL
 242              # We cannot yet assume a decent shell, so we have to provide a
 243 # neutralization value for shells without unset; and this also
 244 # works around shells that cannot unset nonexistent variables.
 245 # Preserve -v and -x to the replacement shell.
 246 BASH_ENV=/dev/null
 247 ENV=/dev/null
 248 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
 249 case $- in # ((((
 250   *v*x* | *x*v* ) as_opts=-vx ;;
 251   *v* ) as_opts=-v ;;
 252   *x* ) as_opts=-x ;;
 253   * ) as_opts= ;;
 254 esac
 255 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
 256 # Admittedly, this is quite paranoid, since all the known shells bail
 257 # out after a failed `exec'.
 258 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
 259 exit 255
 260 fi
 261 
 262     if test x$as_have_required = xno; then :
 263   $as_echo "$0: This script requires a shell more modern than all"
 264   $as_echo "$0: the shells that I found on your system."
 265   if test x${ZSH_VERSION+set} = xset ; then
 266     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
 267     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
 268   else
 269     $as_echo "$0: Please tell bug-autoconf@gnu.org and
 270 $0: build-dev@openjdk.java.net about your system, including
 271 $0: any error possibly output before this message. Then
 272 $0: install a modern shell, or manually run the script
 273 $0: under such a shell if you do have one."
 274   fi
 275   exit 1
 276 fi
 277 fi
 278 fi
 279 SHELL=${CONFIG_SHELL-/bin/sh}
 280 export SHELL
 281 # Unset more variables known to interfere with behavior of common tools.
 282 CLICOLOR_FORCE= GREP_OPTIONS=
 283 unset CLICOLOR_FORCE GREP_OPTIONS
 284 
 285 ## --------------------- ##
 286 ## M4sh Shell Functions. ##
 287 ## --------------------- ##
 288 # as_fn_unset VAR
 289 # ---------------
 290 # Portably unset VAR.
 291 as_fn_unset ()
 292 {
 293   { eval $1=; unset $1;}
 294 }
 295 as_unset=as_fn_unset
 296 
 297 # as_fn_set_status STATUS
 298 # -----------------------
 299 # Set $? to STATUS, without forking.
 300 as_fn_set_status ()
 301 {
 302   return $1
 303 } # as_fn_set_status
 304 
 305 # as_fn_exit STATUS
 306 # -----------------
 307 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
 308 as_fn_exit ()
 309 {
 310   set +e
 311   as_fn_set_status $1
 312   exit $1
 313 } # as_fn_exit
 314 
 315 # as_fn_mkdir_p
 316 # -------------
 317 # Create "$as_dir" as a directory, including parents if necessary.
 318 as_fn_mkdir_p ()
 319 {
 320 
 321   case $as_dir in #(
 322   -*) as_dir=./$as_dir;;
 323   esac
 324   test -d "$as_dir" || eval $as_mkdir_p || {
 325     as_dirs=
 326     while :; do
 327       case $as_dir in #(
 328       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
 329       *) as_qdir=$as_dir;;
 330       esac
 331       as_dirs="'$as_qdir' $as_dirs"
 332       as_dir=`$as_dirname -- "$as_dir" ||
 333 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 334          X"$as_dir" : 'X\(//\)[^/]' \| \
 335          X"$as_dir" : 'X\(//\)$' \| \
 336          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
 337 $as_echo X"$as_dir" |
 338     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
 339             s//\1/
 340             q
 341           }
 342           /^X\(\/\/\)[^/].*/{
 343             s//\1/
 344             q
 345           }
 346           /^X\(\/\/\)$/{
 347             s//\1/
 348             q
 349           }
 350           /^X\(\/\).*/{
 351             s//\1/
 352             q
 353           }
 354           s/.*/./; q'`
 355       test -d "$as_dir" && break
 356     done
 357     test -z "$as_dirs" || eval "mkdir $as_dirs"
 358   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
 359 
 360 
 361 } # as_fn_mkdir_p
 362 
 363 # as_fn_executable_p FILE
 364 # -----------------------
 365 # Test if FILE is an executable regular file.
 366 as_fn_executable_p ()
 367 {
 368   test -f "$1" && test -x "$1"
 369 } # as_fn_executable_p
 370 # as_fn_append VAR VALUE
 371 # ----------------------
 372 # Append the text in VALUE to the end of the definition contained in VAR. Take
 373 # advantage of any shell optimizations that allow amortized linear growth over
 374 # repeated appends, instead of the typical quadratic growth present in naive
 375 # implementations.
 376 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
 377   eval 'as_fn_append ()
 378   {
 379     eval $1+=\$2
 380   }'
 381 else
 382   as_fn_append ()
 383   {
 384     eval $1=\$$1\$2
 385   }
 386 fi # as_fn_append
 387 
 388 # as_fn_arith ARG...
 389 # ------------------
 390 # Perform arithmetic evaluation on the ARGs, and store the result in the
 391 # global $as_val. Take advantage of shells that can avoid forks. The arguments
 392 # must be portable across $(()) and expr.
 393 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
 394   eval 'as_fn_arith ()
 395   {
 396     as_val=$(( $* ))
 397   }'
 398 else
 399   as_fn_arith ()
 400   {
 401     as_val=`expr "$@" || test $? -eq 1`
 402   }
 403 fi # as_fn_arith
 404 
 405 
 406 # as_fn_error STATUS ERROR [LINENO LOG_FD]
 407 # ----------------------------------------
 408 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
 409 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
 410 # script with STATUS, using 1 if that was 0.
 411 as_fn_error ()
 412 {
 413   as_status=$1; test $as_status -eq 0 && as_status=1
 414   if test "$4"; then
 415     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
 416     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
 417   fi
 418   $as_echo "$as_me: error: $2" >&2
 419   as_fn_exit $as_status
 420 } # as_fn_error
 421 
 422 if expr a : '\(a\)' >/dev/null 2>&1 &&
 423    test "X`expr 00001 : '.*\(...\)'`" = X001; then
 424   as_expr=expr
 425 else
 426   as_expr=false
 427 fi
 428 
 429 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
 430   as_basename=basename
 431 else
 432   as_basename=false
 433 fi
 434 
 435 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
 436   as_dirname=dirname
 437 else
 438   as_dirname=false
 439 fi
 440 
 441 as_me=`$as_basename -- "$0" ||
 442 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
 443          X"$0" : 'X\(//\)$' \| \
 444          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
 445 $as_echo X/"$0" |
 446     sed '/^.*\/\([^/][^/]*\)\/*$/{
 447             s//\1/
 448             q
 449           }
 450           /^X\/\(\/\/\)$/{
 451             s//\1/
 452             q
 453           }
 454           /^X\/\(\/\).*/{
 455             s//\1/
 456             q
 457           }
 458           s/.*/./; q'`
 459 
 460 # Avoid depending upon Character Ranges.
 461 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
 462 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 463 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
 464 as_cr_digits='0123456789'
 465 as_cr_alnum=$as_cr_Letters$as_cr_digits
 466 
 467 
 468   as_lineno_1=$LINENO as_lineno_1a=$LINENO
 469   as_lineno_2=$LINENO as_lineno_2a=$LINENO
 470   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
 471   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
 472   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
 473   sed -n '
 474     p
 475     /[$]LINENO/=
 476   ' <$as_myself |
 477     sed '
 478       s/[$]LINENO.*/&-/
 479       t lineno
 480       b
 481       :lineno
 482       N
 483       :loop
 484       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
 485       t loop
 486       s/-\n.*//
 487     ' >$as_me.lineno &&
 488   chmod +x "$as_me.lineno" ||
 489     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
 490 
 491   # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
 492   # already done that, so ensure we don't try to do so again and fall
 493   # in an infinite loop.  This has already happened in practice.
 494   _as_can_reexec=no; export _as_can_reexec
 495   # Don't try to exec as it changes $[0], causing all sort of problems
 496   # (the dirname of $[0] is not the place where we might find the
 497   # original and so on.  Autoconf is especially sensitive to this).
 498   . "./$as_me.lineno"
 499   # Exit status is that of the last command.
 500   exit
 501 }
 502 
 503 ECHO_C= ECHO_N= ECHO_T=
 504 case `echo -n x` in #(((((
 505 -n*)
 506   case `echo 'xy\c'` in
 507   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
 508   xy)  ECHO_C='\c';;
 509   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
 510        ECHO_T=' ';;
 511   esac;;
 512 *)
 513   ECHO_N='-n';;
 514 esac
 515 
 516 rm -f conf$$ conf$$.exe conf$$.file
 517 if test -d conf$$.dir; then
 518   rm -f conf$$.dir/conf$$.file
 519 else
 520   rm -f conf$$.dir
 521   mkdir conf$$.dir 2>/dev/null
 522 fi
 523 if (echo >conf$$.file) 2>/dev/null; then
 524   if ln -s conf$$.file conf$$ 2>/dev/null; then
 525     as_ln_s='ln -s'
 526     # ... but there are two gotchas:
 527     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
 528     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
 529     # In both cases, we have to default to `cp -pR'.
 530     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
 531       as_ln_s='cp -pR'
 532   elif ln conf$$.file conf$$ 2>/dev/null; then
 533     as_ln_s=ln
 534   else
 535     as_ln_s='cp -pR'
 536   fi
 537 else
 538   as_ln_s='cp -pR'
 539 fi
 540 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 541 rmdir conf$$.dir 2>/dev/null
 542 
 543 if mkdir -p . 2>/dev/null; then
 544   as_mkdir_p='mkdir -p "$as_dir"'
 545 else
 546   test -d ./-p && rmdir ./-p
 547   as_mkdir_p=false
 548 fi
 549 
 550 as_test_x='test -x'
 551 as_executable_p=as_fn_executable_p
 552 
 553 # Sed expression to map a string onto a valid CPP name.
 554 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
 555 
 556 # Sed expression to map a string onto a valid variable name.
 557 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 558 
 559 
 560 test -n "$DJDIR" || exec 7<&0 </dev/null
 561 exec 6>&1
 562 
 563 # Name of the host.
 564 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
 565 # so uname gets run too.
 566 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
 567 
 568 #
 569 # Initializations.
 570 #
 571 ac_default_prefix=/usr/local
 572 ac_clean_files=
 573 ac_config_libobj_dir=.
 574 LIBOBJS=
 575 cross_compiling=no
 576 subdirs=
 577 MFLAGS=
 578 MAKEFLAGS=
 579 
 580 # Identity of this package.
 581 PACKAGE_NAME='OpenJDK'
 582 PACKAGE_TARNAME='openjdk'
 583 PACKAGE_VERSION='jdk8'
 584 PACKAGE_STRING='OpenJDK jdk8'
 585 PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
 586 PACKAGE_URL='http://openjdk.java.net'
 587 
 588 # Factoring default headers for most tests.
 589 ac_includes_default="\
 590 #include <stdio.h>
 591 #ifdef HAVE_SYS_TYPES_H
 592 # include <sys/types.h>
 593 #endif
 594 #ifdef HAVE_SYS_STAT_H
 595 # include <sys/stat.h>
 596 #endif
 597 #ifdef STDC_HEADERS
 598 # include <stdlib.h>
 599 # include <stddef.h>
 600 #else
 601 # ifdef HAVE_STDLIB_H
 602 #  include <stdlib.h>
 603 # endif
 604 #endif
 605 #ifdef HAVE_STRING_H
 606 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
 607 #  include <memory.h>
 608 # endif
 609 # include <string.h>
 610 #endif
 611 #ifdef HAVE_STRINGS_H
 612 # include <strings.h>
 613 #endif
 614 #ifdef HAVE_INTTYPES_H
 615 # include <inttypes.h>
 616 #endif
 617 #ifdef HAVE_STDINT_H
 618 # include <stdint.h>
 619 #endif
 620 #ifdef HAVE_UNISTD_H
 621 # include <unistd.h>
 622 #endif"
 623 
 624 ac_subst_vars='LTLIBOBJS
 625 LIBOBJS
 626 CCACHE
 627 USE_PRECOMPILED_HEADER
 628 SJAVAC_SERVER_DIR
 629 ENABLE_SJAVAC
 630 SJAVAC_SERVER_JAVA
 631 JOBS
 632 MEMORY_SIZE
 633 NUM_CORES
 634 ENABLE_INTREE_EC
 635 SALIB_NAME
 636 HOTSPOT_MAKE_ARGS
 637 LIBCXX
 638 LLVM_LIBS
 639 LLVM_LDFLAGS
 640 LLVM_CFLAGS
 641 LLVM_CONFIG
 642 LIBFFI_LIBS
 643 LIBFFI_CFLAGS
 644 STATIC_CXX_SETTING
 645 LIBDL
 646 LIBM
 647 LIBZIP_CAN_USE_MMAP
 648 USE_EXTERNAL_LIBZ
 649 USE_EXTERNAL_LIBGIF
 650 USE_EXTERNAL_LIBJPEG
 651 ALSA_LIBS
 652 ALSA_CFLAGS
 653 FREETYPE_BUNDLE_LIB_PATH
 654 FREETYPE_LIBS
 655 FREETYPE_CFLAGS
 656 CUPS_CFLAGS
 657 OPENWIN_HOME
 658 X_EXTRA_LIBS
 659 X_LIBS
 660 X_PRE_LIBS
 661 X_CFLAGS
 662 XMKMF
 663 FIXPATH
 664 CXXFLAGS_DEBUG_SYMBOLS
 665 CFLAGS_DEBUG_SYMBOLS
 666 ZIP_DEBUGINFO_FILES
 667 ENABLE_DEBUG_SYMBOLS
 668 USING_BROKEN_SUSE_LD
 669 COMPILER_SUPPORTS_TARGET_BITS_FLAG
 670 ZERO_ARCHFLAG
 671 LDFLAGS_CXX_JDK
 672 LDFLAGS_JDKEXE_SUFFIX
 673 LDFLAGS_JDKLIB_SUFFIX
 674 LDFLAGS_JDKEXE
 675 LDFLAGS_JDKLIB
 676 CXXFLAGS_JDKEXE
 677 CXXFLAGS_JDKLIB
 678 CFLAGS_JDKEXE
 679 CFLAGS_JDKLIB
 680 MACOSX_VERSION_MIN
 681 PACKAGE_PATH
 682 LEGACY_EXTRA_LDFLAGS
 683 LEGACY_EXTRA_CXXFLAGS
 684 LEGACY_EXTRA_CFLAGS
 685 CXX_FLAG_DEPS
 686 C_FLAG_DEPS
 687 CXX_O_FLAG_NONE
 688 CXX_O_FLAG_NORM
 689 CXX_O_FLAG_HI
 690 CXX_O_FLAG_HIGHEST
 691 C_O_FLAG_NONE
 692 C_O_FLAG_NORM
 693 C_O_FLAG_HI
 694 C_O_FLAG_HIGHEST
 695 POST_MCS_CMD
 696 POST_STRIP_CMD
 697 SET_EXECUTABLE_ORIGIN
 698 SET_SHARED_LIBRARY_ORIGIN
 699 CXX_FLAG_REORDER
 700 C_FLAG_REORDER
 701 SET_SHARED_LIBRARY_MAPFILE
 702 SET_SHARED_LIBRARY_NAME
 703 SHARED_LIBRARY_FLAGS
 704 EXE_SUFFIX
 705 STATIC_LIBRARY_SUFFIX
 706 SHARED_LIBRARY_SUFFIX
 707 LIBRARY_PREFIX
 708 STATIC_LIBRARY
 709 SHARED_LIBRARY
 710 OBJ_SUFFIX
 711 COMPILER_NAME
 712 JT_HOME
 713 JTREGEXE
 714 ac_ct_OBJDUMP
 715 OBJDUMP
 716 ac_ct_OBJCOPY
 717 OBJCOPY
 718 OTOOL
 719 MCS
 720 STRIP
 721 GNM
 722 NM
 723 AS
 724 CXXCPP
 725 CPP
 726 COMPILER_TYPE
 727 RC_FLAGS
 728 DUMPBIN
 729 WINAR
 730 HOTSPOT_RC
 731 HOTSPOT_MT
 732 RC
 733 MT
 734 WINLD
 735 HOTSPOT_LD
 736 HOTSPOT_CXX
 737 ARFLAGS
 738 AR
 739 LDEXECXX
 740 LDCXX
 741 LDEXE
 742 LD
 743 ac_ct_OBJC
 744 OBJCFLAGS
 745 OBJC
 746 ac_ct_CXX
 747 CXXFLAGS
 748 CXX
 749 ac_ct_PROPER_COMPILER_CXX
 750 PROPER_COMPILER_CXX
 751 POTENTIAL_CXX
 752 TOOLS_DIR_CXX
 753 COMPILER_TARGET_BITS_FLAG
 754 OBJEXT
 755 EXEEXT
 756 ac_ct_CC
 757 CPPFLAGS
 758 LDFLAGS
 759 CFLAGS
 760 CC
 761 ac_ct_PROPER_COMPILER_CC
 762 PROPER_COMPILER_CC
 763 POTENTIAL_CC
 764 TOOLS_DIR_CC
 765 SDKPATH
 766 XCODEBUILD
 767 SET_DEVELOPER_DIR
 768 BUILD_LD
 769 BUILD_CXX
 770 BUILD_CC
 771 MSVCR_DLL
 772 VS_PATH
 773 VS_LIB
 774 VS_INCLUDE
 775 CYGWIN_LINK
 776 AR_OUT_OPTION
 777 LD_OUT_OPTION
 778 EXE_OUT_OPTION
 779 CC_OUT_OPTION
 780 BUILD_HOTSPOT
 781 HOTSPOT_DIST
 782 BUILD_OUTPUT
 783 OVERRIDE_SRC_ROOT
 784 ADD_SRC_ROOT
 785 JDK_TOPDIR
 786 NASHORN_TOPDIR
 787 HOTSPOT_TOPDIR
 788 JAXWS_TOPDIR
 789 JAXP_TOPDIR
 790 CORBA_TOPDIR
 791 LANGTOOLS_TOPDIR
 792 JAVA_FLAGS_SMALL
 793 JAVA_FLAGS_BIG
 794 JAVA_FLAGS
 795 JAVAC_FLAGS
 796 BOOT_JDK_SOURCETARGET
 797 BOOT_JDK
 798 BOOT_TOOLSJAR
 799 BOOT_RTJAR
 800 JAVA_CHECK
 801 JAVAC_CHECK
 802 COOKED_BUILD_NUMBER
 803 JDK_VERSION
 804 COPYRIGHT_YEAR
 805 MACOSX_BUNDLE_ID_BASE
 806 MACOSX_BUNDLE_NAME_BASE
 807 COMPANY_NAME
 808 JDK_RC_PLATFORM_NAME
 809 PRODUCT_SUFFIX
 810 PRODUCT_NAME
 811 LAUNCHER_NAME
 812 MILESTONE
 813 JDK_BUILD_NUMBER
 814 JDK_UPDATE_VERSION
 815 JDK_MICRO_VERSION
 816 JDK_MINOR_VERSION
 817 JDK_MAJOR_VERSION
 818 USER_RELEASE_SUFFIX
 819 COMPRESS_JARS
 820 UNLIMITED_CRYPTO
 821 CACERTS_FILE
 822 TEST_IN_BUILD
 823 BUILD_HEADLESS
 824 SUPPORT_HEADFUL
 825 SUPPORT_HEADLESS
 826 BDEPS_FTP
 827 BDEPS_UNZIP
 828 OS_VERSION_MICRO
 829 OS_VERSION_MINOR
 830 OS_VERSION_MAJOR
 831 PKG_CONFIG
 832 CODESIGN
 833 XATTR
 834 DSYMUTIL
 835 IS_GNU_TIME
 836 TIME
 837 STAT
 838 HG
 839 READELF
 840 LDD
 841 ZIP
 842 UNZIP
 843 FIND_DELETE
 844 MAKE
 845 CHECK_TOOLSDIR_MAKE
 846 CHECK_TOOLSDIR_GMAKE
 847 CHECK_MAKE
 848 CHECK_GMAKE
 849 PKGHANDLER
 850 OUTPUT_ROOT
 851 CONF_NAME
 852 SPEC
 853 BUILD_VARIANT_RELEASE
 854 DEBUG_CLASSFILES
 855 FASTDEBUG
 856 VARIANT
 857 DEBUG_LEVEL
 858 MACOSX_UNIVERSAL
 859 INCLUDE_SA
 860 JVM_VARIANT_CORE
 861 JVM_VARIANT_ZEROSHARK
 862 JVM_VARIANT_ZERO
 863 JVM_VARIANT_KERNEL
 864 JVM_VARIANT_MINIMAL1
 865 JVM_VARIANT_CLIENT
 866 JVM_VARIANT_SERVER
 867 JVM_VARIANTS
 868 JVM_INTERPRETER
 869 JDK_VARIANT
 870 SET_OPENJDK
 871 BUILD_LOG_WRAPPER
 872 BUILD_LOG_PREVIOUS
 873 BUILD_LOG
 874 SYS_ROOT
 875 PATH_SEP
 876 SRC_ROOT
 877 ZERO_ARCHDEF
 878 DEFINE_CROSS_COMPILE_ARCH
 879 LP64
 880 OPENJDK_TARGET_OS_EXPORT_DIR
 881 OPENJDK_TARGET_OS_API_DIR
 882 OPENJDK_TARGET_CPU_JLI_CFLAGS
 883 OPENJDK_TARGET_CPU_OSARCH
 884 OPENJDK_TARGET_CPU_ISADIR
 885 OPENJDK_TARGET_CPU_LIBDIR
 886 OPENJDK_TARGET_CPU_LEGACY_LIB
 887 OPENJDK_TARGET_CPU_LEGACY
 888 REQUIRED_OS_VERSION
 889 REQUIRED_OS_NAME
 890 COMPILE_TYPE
 891 OPENJDK_TARGET_CPU_ENDIAN
 892 OPENJDK_TARGET_CPU_BITS
 893 OPENJDK_TARGET_CPU_ARCH
 894 OPENJDK_TARGET_CPU
 895 OPENJDK_TARGET_OS_API
 896 OPENJDK_TARGET_OS
 897 OPENJDK_BUILD_CPU_ENDIAN
 898 OPENJDK_BUILD_CPU_BITS
 899 OPENJDK_BUILD_CPU_ARCH
 900 OPENJDK_BUILD_CPU
 901 OPENJDK_BUILD_OS_API
 902 OPENJDK_BUILD_OS
 903 OPENJDK_BUILD_AUTOCONF_NAME
 904 OPENJDK_TARGET_AUTOCONF_NAME
 905 target_os
 906 target_vendor
 907 target_cpu
 908 target
 909 host_os
 910 host_vendor
 911 host_cpu
 912 host
 913 build_os
 914 build_vendor
 915 build_cpu
 916 build
 917 SETFILE
 918 DF
 919 READLINK
 920 CYGPATH
 921 NAWK
 922 SED
 923 FGREP
 924 EGREP
 925 GREP
 926 AWK
 927 XARGS
 928 WHICH
 929 WC
 930 UNIQ
 931 UNAME
 932 TR
 933 TOUCH
 934 TEE
 935 TAR
 936 TAIL
 937 SORT
 938 SH
 939 RM
 940 PRINTF
 941 MV
 942 MKTEMP
 943 MKDIR
 944 LS
 945 LN
 946 HEAD
 947 FIND
 948 FILE
 949 EXPR
 950 ECHO
 951 DIRNAME
 952 DIFF
 953 DATE
 954 CUT
 955 CPIO
 956 CP
 957 COMM
 958 CMP
 959 CHMOD
 960 CAT
 961 BASH
 962 BASENAME
 963 DATE_WHEN_CONFIGURED
 964 CONFIGURE_COMMAND_LINE
 965 CUSTOM_MAKE_DIR
 966 target_alias
 967 host_alias
 968 build_alias
 969 LIBS
 970 ECHO_T
 971 ECHO_N
 972 ECHO_C
 973 DEFS
 974 mandir
 975 localedir
 976 libdir
 977 psdir
 978 pdfdir
 979 dvidir
 980 htmldir
 981 infodir
 982 docdir
 983 oldincludedir
 984 includedir
 985 localstatedir
 986 sharedstatedir
 987 sysconfdir
 988 datadir
 989 datarootdir
 990 libexecdir
 991 sbindir
 992 bindir
 993 program_transform_name
 994 prefix
 995 exec_prefix
 996 PACKAGE_URL
 997 PACKAGE_BUGREPORT
 998 PACKAGE_STRING
 999 PACKAGE_VERSION
1000 PACKAGE_TARNAME
1001 PACKAGE_NAME
1002 PATH_SEPARATOR
1003 SHELL'
1004 ac_subst_files=''
1005 ac_user_opts='
1006 enable_option_checking
1007 with_custom_make_dir
1008 with_target_bits
1009 with_sys_root
1010 with_tools_dir
1011 with_xcode_path
1012 with_devkit
1013 enable_openjdk_only
1014 with_jdk_variant
1015 with_jvm_interpreter
1016 with_jvm_variants
1017 enable_debug
1018 with_debug_level
1019 with_conf_name
1020 with_builddeps_conf
1021 with_builddeps_server
1022 with_builddeps_dir
1023 with_builddeps_group
1024 enable_headful
1025 enable_hotspot_test_in_build
1026 with_cacerts_file
1027 enable_unlimited_crypto
1028 with_milestone
1029 with_update_version
1030 with_user_release_suffix
1031 with_build_number
1032 with_copyright_year
1033 with_boot_jdk
1034 with_boot_jdk_jvmargs
1035 with_add_source_root
1036 with_override_source_root
1037 with_adds_and_overrides
1038 with_override_langtools
1039 with_override_corba
1040 with_override_jaxp
1041 with_override_jaxws
1042 with_override_hotspot
1043 with_override_nashorn
1044 with_override_jdk
1045 with_import_hotspot
1046 with_msvcr_dll
1047 with_dxsdk
1048 with_dxsdk_lib
1049 with_dxsdk_include
1050 with_jtreg
1051 with_extra_cflags
1052 with_extra_cxxflags
1053 with_extra_ldflags
1054 enable_debug_symbols
1055 enable_zip_debug_info
1056 enable_macosx_runtime_support
1057 with_x
1058 with_cups
1059 with_cups_include
1060 with_freetype
1061 with_freetype_include
1062 with_freetype_lib
1063 enable_freetype_bundling
1064 with_alsa
1065 with_alsa_include
1066 with_alsa_lib
1067 with_giflib
1068 with_zlib
1069 with_stdc__lib
1070 with_num_cores
1071 with_memory_size
1072 with_jobs
1073 with_sjavac_server_java
1074 enable_sjavac
1075 enable_precompiled_headers
1076 enable_ccache
1077 with_ccache_dir
1078 '
1079       ac_precious_vars='build_alias
1080 host_alias
1081 target_alias
1082 PKG_CONFIG
1083 CC
1084 CFLAGS
1085 LDFLAGS
1086 LIBS
1087 CPPFLAGS
1088 CXX
1089 CXXFLAGS
1090 CCC
1091 OBJC
1092 OBJCFLAGS
1093 CPP
1094 CXXCPP
1095 XMKMF
1096 FREETYPE_CFLAGS
1097 FREETYPE_LIBS
1098 ALSA_CFLAGS
1099 ALSA_LIBS
1100 LIBFFI_CFLAGS
1101 LIBFFI_LIBS'
1102 
1103 
1104 # Initialize some variables set by options.
1105 ac_init_help=
1106 ac_init_version=false
1107 ac_unrecognized_opts=
1108 ac_unrecognized_sep=
1109 # The variables have the same names as the options, with
1110 # dashes changed to underlines.
1111 cache_file=/dev/null
1112 exec_prefix=NONE
1113 no_create=
1114 no_recursion=
1115 prefix=NONE
1116 program_prefix=NONE
1117 program_suffix=NONE
1118 program_transform_name=s,x,x,
1119 silent=
1120 site=
1121 srcdir=
1122 verbose=
1123 x_includes=NONE
1124 x_libraries=NONE
1125 
1126 # Installation directory options.
1127 # These are left unexpanded so users can "make install exec_prefix=/foo"
1128 # and all the variables that are supposed to be based on exec_prefix
1129 # by default will actually change.
1130 # Use braces instead of parens because sh, perl, etc. also accept them.
1131 # (The list follows the same order as the GNU Coding Standards.)
1132 bindir='${exec_prefix}/bin'
1133 sbindir='${exec_prefix}/sbin'
1134 libexecdir='${exec_prefix}/libexec'
1135 datarootdir='${prefix}/share'
1136 datadir='${datarootdir}'
1137 sysconfdir='${prefix}/etc'
1138 sharedstatedir='${prefix}/com'
1139 localstatedir='${prefix}/var'
1140 includedir='${prefix}/include'
1141 oldincludedir='/usr/include'
1142 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1143 infodir='${datarootdir}/info'
1144 htmldir='${docdir}'
1145 dvidir='${docdir}'
1146 pdfdir='${docdir}'
1147 psdir='${docdir}'
1148 libdir='${exec_prefix}/lib'
1149 localedir='${datarootdir}/locale'
1150 mandir='${datarootdir}/man'
1151 
1152 ac_prev=
1153 ac_dashdash=
1154 for ac_option
1155 do
1156   # If the previous option needs an argument, assign it.
1157   if test -n "$ac_prev"; then
1158     eval $ac_prev=\$ac_option
1159     ac_prev=
1160     continue
1161   fi
1162 
1163   case $ac_option in
1164   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1165   *=)   ac_optarg= ;;
1166   *)    ac_optarg=yes ;;
1167   esac
1168 
1169   # Accept the important Cygnus configure options, so we can diagnose typos.
1170 
1171   case $ac_dashdash$ac_option in
1172   --)
1173     ac_dashdash=yes ;;
1174 
1175   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1176     ac_prev=bindir ;;
1177   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1178     bindir=$ac_optarg ;;
1179 
1180   -build | --build | --buil | --bui | --bu)
1181     ac_prev=build_alias ;;
1182   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1183     build_alias=$ac_optarg ;;
1184 
1185   -cache-file | --cache-file | --cache-fil | --cache-fi \
1186   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1187     ac_prev=cache_file ;;
1188   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1189   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1190     cache_file=$ac_optarg ;;
1191 
1192   --config-cache | -C)
1193     cache_file=config.cache ;;
1194 
1195   -datadir | --datadir | --datadi | --datad)
1196     ac_prev=datadir ;;
1197   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1198     datadir=$ac_optarg ;;
1199 
1200   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1201   | --dataroo | --dataro | --datar)
1202     ac_prev=datarootdir ;;
1203   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1204   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1205     datarootdir=$ac_optarg ;;
1206 
1207   -disable-* | --disable-*)
1208     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1209     # Reject names that are not valid shell variable names.
1210     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1211       as_fn_error $? "invalid feature name: $ac_useropt"
1212     ac_useropt_orig=$ac_useropt
1213     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1214     case $ac_user_opts in
1215       *"
1216 "enable_$ac_useropt"
1217 "*) ;;
1218       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1219          ac_unrecognized_sep=', ';;
1220     esac
1221     eval enable_$ac_useropt=no ;;
1222 
1223   -docdir | --docdir | --docdi | --doc | --do)
1224     ac_prev=docdir ;;
1225   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1226     docdir=$ac_optarg ;;
1227 
1228   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1229     ac_prev=dvidir ;;
1230   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1231     dvidir=$ac_optarg ;;
1232 
1233   -enable-* | --enable-*)
1234     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1235     # Reject names that are not valid shell variable names.
1236     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1237       as_fn_error $? "invalid feature name: $ac_useropt"
1238     ac_useropt_orig=$ac_useropt
1239     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1240     case $ac_user_opts in
1241       *"
1242 "enable_$ac_useropt"
1243 "*) ;;
1244       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1245          ac_unrecognized_sep=', ';;
1246     esac
1247     eval enable_$ac_useropt=\$ac_optarg ;;
1248 
1249   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1250   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1251   | --exec | --exe | --ex)
1252     ac_prev=exec_prefix ;;
1253   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1254   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1255   | --exec=* | --exe=* | --ex=*)
1256     exec_prefix=$ac_optarg ;;
1257 
1258   -gas | --gas | --ga | --g)
1259     # Obsolete; use --with-gas.
1260     with_gas=yes ;;
1261 
1262   -help | --help | --hel | --he | -h)
1263     ac_init_help=long ;;
1264   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1265     ac_init_help=recursive ;;
1266   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1267     ac_init_help=short ;;
1268 
1269   -host | --host | --hos | --ho)
1270     ac_prev=host_alias ;;
1271   -host=* | --host=* | --hos=* | --ho=*)
1272     host_alias=$ac_optarg ;;
1273 
1274   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1275     ac_prev=htmldir ;;
1276   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1277   | --ht=*)
1278     htmldir=$ac_optarg ;;
1279 
1280   -includedir | --includedir | --includedi | --included | --include \
1281   | --includ | --inclu | --incl | --inc)
1282     ac_prev=includedir ;;
1283   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1284   | --includ=* | --inclu=* | --incl=* | --inc=*)
1285     includedir=$ac_optarg ;;
1286 
1287   -infodir | --infodir | --infodi | --infod | --info | --inf)
1288     ac_prev=infodir ;;
1289   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1290     infodir=$ac_optarg ;;
1291 
1292   -libdir | --libdir | --libdi | --libd)
1293     ac_prev=libdir ;;
1294   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1295     libdir=$ac_optarg ;;
1296 
1297   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1298   | --libexe | --libex | --libe)
1299     ac_prev=libexecdir ;;
1300   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1301   | --libexe=* | --libex=* | --libe=*)
1302     libexecdir=$ac_optarg ;;
1303 
1304   -localedir | --localedir | --localedi | --localed | --locale)
1305     ac_prev=localedir ;;
1306   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1307     localedir=$ac_optarg ;;
1308 
1309   -localstatedir | --localstatedir | --localstatedi | --localstated \
1310   | --localstate | --localstat | --localsta | --localst | --locals)
1311     ac_prev=localstatedir ;;
1312   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1313   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1314     localstatedir=$ac_optarg ;;
1315 
1316   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1317     ac_prev=mandir ;;
1318   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1319     mandir=$ac_optarg ;;
1320 
1321   -nfp | --nfp | --nf)
1322     # Obsolete; use --without-fp.
1323     with_fp=no ;;
1324 
1325   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1326   | --no-cr | --no-c | -n)
1327     no_create=yes ;;
1328 
1329   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1330   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1331     no_recursion=yes ;;
1332 
1333   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1334   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1335   | --oldin | --oldi | --old | --ol | --o)
1336     ac_prev=oldincludedir ;;
1337   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1338   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1339   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1340     oldincludedir=$ac_optarg ;;
1341 
1342   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1343     ac_prev=prefix ;;
1344   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1345     prefix=$ac_optarg ;;
1346 
1347   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1348   | --program-pre | --program-pr | --program-p)
1349     ac_prev=program_prefix ;;
1350   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1351   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1352     program_prefix=$ac_optarg ;;
1353 
1354   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1355   | --program-suf | --program-su | --program-s)
1356     ac_prev=program_suffix ;;
1357   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1358   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1359     program_suffix=$ac_optarg ;;
1360 
1361   -program-transform-name | --program-transform-name \
1362   | --program-transform-nam | --program-transform-na \
1363   | --program-transform-n | --program-transform- \
1364   | --program-transform | --program-transfor \
1365   | --program-transfo | --program-transf \
1366   | --program-trans | --program-tran \
1367   | --progr-tra | --program-tr | --program-t)
1368     ac_prev=program_transform_name ;;
1369   -program-transform-name=* | --program-transform-name=* \
1370   | --program-transform-nam=* | --program-transform-na=* \
1371   | --program-transform-n=* | --program-transform-=* \
1372   | --program-transform=* | --program-transfor=* \
1373   | --program-transfo=* | --program-transf=* \
1374   | --program-trans=* | --program-tran=* \
1375   | --progr-tra=* | --program-tr=* | --program-t=*)
1376     program_transform_name=$ac_optarg ;;
1377 
1378   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1379     ac_prev=pdfdir ;;
1380   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1381     pdfdir=$ac_optarg ;;
1382 
1383   -psdir | --psdir | --psdi | --psd | --ps)
1384     ac_prev=psdir ;;
1385   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1386     psdir=$ac_optarg ;;
1387 
1388   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1389   | -silent | --silent | --silen | --sile | --sil)
1390     silent=yes ;;
1391 
1392   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1393     ac_prev=sbindir ;;
1394   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1395   | --sbi=* | --sb=*)
1396     sbindir=$ac_optarg ;;
1397 
1398   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1399   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1400   | --sharedst | --shareds | --shared | --share | --shar \
1401   | --sha | --sh)
1402     ac_prev=sharedstatedir ;;
1403   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1404   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1405   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1406   | --sha=* | --sh=*)
1407     sharedstatedir=$ac_optarg ;;
1408 
1409   -site | --site | --sit)
1410     ac_prev=site ;;
1411   -site=* | --site=* | --sit=*)
1412     site=$ac_optarg ;;
1413 
1414   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1415     ac_prev=srcdir ;;
1416   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1417     srcdir=$ac_optarg ;;
1418 
1419   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1420   | --syscon | --sysco | --sysc | --sys | --sy)
1421     ac_prev=sysconfdir ;;
1422   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1423   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1424     sysconfdir=$ac_optarg ;;
1425 
1426   -target | --target | --targe | --targ | --tar | --ta | --t)
1427     ac_prev=target_alias ;;
1428   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1429     target_alias=$ac_optarg ;;
1430 
1431   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1432     verbose=yes ;;
1433 
1434   -version | --version | --versio | --versi | --vers | -V)
1435     ac_init_version=: ;;
1436 
1437   -with-* | --with-*)
1438     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1439     # Reject names that are not valid shell variable names.
1440     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1441       as_fn_error $? "invalid package name: $ac_useropt"
1442     ac_useropt_orig=$ac_useropt
1443     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1444     case $ac_user_opts in
1445       *"
1446 "with_$ac_useropt"
1447 "*) ;;
1448       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1449          ac_unrecognized_sep=', ';;
1450     esac
1451     eval with_$ac_useropt=\$ac_optarg ;;
1452 
1453   -without-* | --without-*)
1454     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1455     # Reject names that are not valid shell variable names.
1456     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1457       as_fn_error $? "invalid package name: $ac_useropt"
1458     ac_useropt_orig=$ac_useropt
1459     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1460     case $ac_user_opts in
1461       *"
1462 "with_$ac_useropt"
1463 "*) ;;
1464       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1465          ac_unrecognized_sep=', ';;
1466     esac
1467     eval with_$ac_useropt=no ;;
1468 
1469   --x)
1470     # Obsolete; use --with-x.
1471     with_x=yes ;;
1472 
1473   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1474   | --x-incl | --x-inc | --x-in | --x-i)
1475     ac_prev=x_includes ;;
1476   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1477   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1478     x_includes=$ac_optarg ;;
1479 
1480   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1481   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1482     ac_prev=x_libraries ;;
1483   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1484   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1485     x_libraries=$ac_optarg ;;
1486 
1487   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1488 Try \`$0 --help' for more information"
1489     ;;
1490 
1491   *=*)
1492     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1493     # Reject names that are not valid shell variable names.
1494     case $ac_envvar in #(
1495       '' | [0-9]* | *[!_$as_cr_alnum]* )
1496       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1497     esac
1498     eval $ac_envvar=\$ac_optarg
1499     export $ac_envvar ;;
1500 
1501   *)
1502     # FIXME: should be removed in autoconf 3.0.
1503     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1504     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1505       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1506     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1507     ;;
1508 
1509   esac
1510 done
1511 
1512 if test -n "$ac_prev"; then
1513   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1514   as_fn_error $? "missing argument to $ac_option"
1515 fi
1516 
1517 if test -n "$ac_unrecognized_opts"; then
1518   case $enable_option_checking in
1519     no) ;;
1520     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1521     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1522   esac
1523 fi
1524 
1525 # Check all directory arguments for consistency.
1526 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1527                 datadir sysconfdir sharedstatedir localstatedir includedir \
1528                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1529                 libdir localedir mandir
1530 do
1531   eval ac_val=\$$ac_var
1532   # Remove trailing slashes.
1533   case $ac_val in
1534     */ )
1535       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1536       eval $ac_var=\$ac_val;;
1537   esac
1538   # Be sure to have absolute directory names.
1539   case $ac_val in
1540     [\\/$]* | ?:[\\/]* )  continue;;
1541     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1542   esac
1543   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1544 done
1545 
1546 # There might be people who depend on the old broken behavior: `$host'
1547 # used to hold the argument of --host etc.
1548 # FIXME: To remove some day.
1549 build=$build_alias
1550 host=$host_alias
1551 target=$target_alias
1552 
1553 # FIXME: To remove some day.
1554 if test "x$host_alias" != x; then
1555   if test "x$build_alias" = x; then
1556     cross_compiling=maybe
1557   elif test "x$build_alias" != "x$host_alias"; then
1558     cross_compiling=yes
1559   fi
1560 fi
1561 
1562 ac_tool_prefix=
1563 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1564 
1565 test "$silent" = yes && exec 6>/dev/null
1566 
1567 
1568 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1569 ac_ls_di=`ls -di .` &&
1570 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1571   as_fn_error $? "working directory cannot be determined"
1572 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1573   as_fn_error $? "pwd does not report name of working directory"
1574 
1575 
1576 # Find the source files, if location was not specified.
1577 if test -z "$srcdir"; then
1578   ac_srcdir_defaulted=yes
1579   # Try the directory containing this script, then the parent directory.
1580   ac_confdir=`$as_dirname -- "$as_myself" ||
1581 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1582          X"$as_myself" : 'X\(//\)[^/]' \| \
1583          X"$as_myself" : 'X\(//\)$' \| \
1584          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1585 $as_echo X"$as_myself" |
1586     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1587             s//\1/
1588             q
1589           }
1590           /^X\(\/\/\)[^/].*/{
1591             s//\1/
1592             q
1593           }
1594           /^X\(\/\/\)$/{
1595             s//\1/
1596             q
1597           }
1598           /^X\(\/\).*/{
1599             s//\1/
1600             q
1601           }
1602           s/.*/./; q'`
1603   srcdir=$ac_confdir
1604   if test ! -r "$srcdir/$ac_unique_file"; then
1605     srcdir=..
1606   fi
1607 else
1608   ac_srcdir_defaulted=no
1609 fi
1610 if test ! -r "$srcdir/$ac_unique_file"; then
1611   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1612   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1613 fi
1614 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1615 ac_abs_confdir=`(
1616         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1617         pwd)`
1618 # When building in place, set srcdir=.
1619 if test "$ac_abs_confdir" = "$ac_pwd"; then
1620   srcdir=.
1621 fi
1622 # Remove unnecessary trailing slashes from srcdir.
1623 # Double slashes in file names in object file debugging info
1624 # mess up M-x gdb in Emacs.
1625 case $srcdir in
1626 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1627 esac
1628 for ac_var in $ac_precious_vars; do
1629   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1630   eval ac_env_${ac_var}_value=\$${ac_var}
1631   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1632   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1633 done
1634 
1635 #
1636 # Report the --help message.
1637 #
1638 if test "$ac_init_help" = "long"; then
1639   # Omit some internal or obsolete options to make the list less imposing.
1640   # This message is too long to be a string in the A/UX 3.1 sh.
1641   cat <<_ACEOF
1642 \`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1643 
1644 Usage: $0 [OPTION]... [VAR=VALUE]...
1645 
1646 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1647 VAR=VALUE.  See below for descriptions of some of the useful variables.
1648 
1649 Defaults for the options are specified in brackets.
1650 
1651 Configuration:
1652   -h, --help              display this help and exit
1653       --help=short        display options specific to this package
1654       --help=recursive    display the short help of all the included packages
1655   -V, --version           display version information and exit
1656   -q, --quiet, --silent   do not print \`checking ...' messages
1657       --cache-file=FILE   cache test results in FILE [disabled]
1658   -C, --config-cache      alias for \`--cache-file=config.cache'
1659   -n, --no-create         do not create output files
1660       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1661 
1662 Installation directories:
1663   --prefix=PREFIX         install architecture-independent files in PREFIX
1664                           [$ac_default_prefix]
1665   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1666                           [PREFIX]
1667 
1668 By default, \`make install' will install all the files in
1669 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1670 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1671 for instance \`--prefix=\$HOME'.
1672 
1673 For better control, use the options below.
1674 
1675 Fine tuning of the installation directories:
1676   --bindir=DIR            user executables [EPREFIX/bin]
1677   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1678   --libexecdir=DIR        program executables [EPREFIX/libexec]
1679   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1680   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1681   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1682   --libdir=DIR            object code libraries [EPREFIX/lib]
1683   --includedir=DIR        C header files [PREFIX/include]
1684   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1685   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1686   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1687   --infodir=DIR           info documentation [DATAROOTDIR/info]
1688   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1689   --mandir=DIR            man documentation [DATAROOTDIR/man]
1690   --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1691   --htmldir=DIR           html documentation [DOCDIR]
1692   --dvidir=DIR            dvi documentation [DOCDIR]
1693   --pdfdir=DIR            pdf documentation [DOCDIR]
1694   --psdir=DIR             ps documentation [DOCDIR]
1695 _ACEOF
1696 
1697   cat <<\_ACEOF
1698 
1699 X features:
1700   --x-includes=DIR    X include files are in DIR
1701   --x-libraries=DIR   X library files are in DIR
1702 
1703 System types:
1704   --build=BUILD     configure for building on BUILD [guessed]
1705   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1706   --target=TARGET   configure for building compilers for TARGET [HOST]
1707 _ACEOF
1708 fi
1709 
1710 if test -n "$ac_init_help"; then
1711   case $ac_init_help in
1712      short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1713    esac
1714   cat <<\_ACEOF
1715 
1716 Optional Features:
1717   --disable-option-checking  ignore unrecognized --enable/--with options
1718   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1719   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1720   --enable-openjdk-only   suppress building custom source even if present
1721                           [disabled]
1722   --enable-debug          set the debug level to fastdebug (shorthand for
1723                           --with-debug-level=fastdebug) [disabled]
1724   --disable-headful       disable building headful support (graphical UI
1725                           support) [enabled]
1726   --enable-hotspot-test-in-build
1727                           run the Queens test after Hotspot build [disabled]
1728   --enable-unlimited-crypto
1729                           Enable unlimited crypto policy [disabled]
1730   --disable-debug-symbols disable generation of debug symbols [enabled]
1731   --disable-zip-debug-info
1732                           disable zipping of debug-info files [enabled]
1733   --enable-macosx-runtime-support
1734                           Deprecated. Option is kept for backwards
1735                           compatibility and is ignored
1736   --disable-freetype-bundling
1737                           disable bundling of the freetype library with the
1738                           build result [enabled on Windows or when using
1739                           --with-freetype, disabled otherwise]
1740   --enable-sjavac         use sjavac to do fast incremental compiles
1741                           [disabled]
1742   --disable-precompiled-headers
1743                           disable using precompiled headers when compiling C++
1744                           [enabled]
1745   --disable-ccache        disable using ccache to speed up recompilations
1746                           [enabled]
1747 
1748 Optional Packages:
1749   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1750   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1751   --with-custom-make-dir  use this directory for custom build/make files
1752   --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1753                           support it), e.g. --with-target-bits=32 [guessed]
1754   --with-sys-root         pass this sys-root to the compilers and tools (for
1755                           cross-compiling)
1756   --with-tools-dir        search this directory for compilers and tools (for
1757                           cross-compiling)
1758   --with-xcode-path       explicit path to Xcode 4 (generally for building on
1759                           10.9 and later)
1760   --with-devkit           use this directory as base for tools-dir and
1761                           sys-root (for cross-compiling)
1762   --with-jdk-variant      JDK variant to build (normal) [normal]
1763   --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1764   --with-jvm-variants     JVM variants (separated by commas) to build (server,
1765                           client, minimal1, kernel, zero, zeroshark, core)
1766                           [server]
1767   --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1768                           [release]
1769   --with-conf-name        use this as the name of the configuration [generated
1770                           from important configuration options]
1771   --with-builddeps-conf   use this configuration file for the builddeps
1772   --with-builddeps-server download and use build dependencies from this server
1773                           url
1774   --with-builddeps-dir    store downloaded build dependencies here
1775                           [/localhome/builddeps]
1776   --with-builddeps-group  chgrp the downloaded build dependencies to this
1777                           group
1778   --with-cacerts-file     specify alternative cacerts file
1779   --with-milestone        Set milestone value for build [internal]
1780   --with-update-version   Set update version value for build [b00]
1781   --with-user-release-suffix
1782                           Add a custom string to the version string if build
1783                           number isn't set.[username_builddateb00]
1784   --with-build-number     Set build number value for build [b00]
1785   --with-copyright-year   Set copyright year value for build [current year]
1786   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1787   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1788                           invocations of the Boot JDK, overriding the default
1789                           values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1790                           -enableassertions"
1791   --with-add-source-root  for each and every source directory, look in this
1792                           additional source root for the same directory; if it
1793                           exists and have files in it, include it in the build
1794   --with-override-source-root
1795                           for each and every source directory, look in this
1796                           override source root for the same directory; if it
1797                           exists, use that directory instead and ignore the
1798                           directory in the original source root
1799   --with-adds-and-overrides
1800                           use the subdirs 'adds' and 'overrides' in the
1801                           specified directory as add-source-root and
1802                           override-source-root
1803   --with-override-langtools
1804                           use this langtools dir for the build
1805   --with-override-corba   use this corba dir for the build
1806   --with-override-jaxp    use this jaxp dir for the build
1807   --with-override-jaxws   use this jaxws dir for the build
1808   --with-override-hotspot use this hotspot dir for the build
1809   --with-override-nashorn use this nashorn dir for the build
1810   --with-override-jdk     use this jdk dir for the build
1811   --with-import-hotspot   import hotspot binaries from this jdk image or
1812                           hotspot build dist dir instead of building from
1813                           source
1814   --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1815                           only) [probed]
1816   --with-dxsdk            Deprecated. Option is kept for backwards
1817                           compatibility and is ignored
1818   --with-dxsdk-lib        Deprecated. Option is kept for backwards
1819                           compatibility and is ignored
1820   --with-dxsdk-include    Deprecated. Option is kept for backwards
1821                           compatibility and is ignored
1822   --with-jtreg            Regression Test Harness [probed]
1823   --with-extra-cflags     extra flags to be used when compiling jdk c-files
1824   --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1825   --with-extra-ldflags    extra flags to be used when linking jdk
1826   --with-x                use the X Window System
1827   --with-cups             specify prefix directory for the cups package
1828                           (expecting the headers under PATH/include)
1829   --with-cups-include     specify directory for the cups include files
1830   --with-freetype         specify prefix directory for the freetype package
1831                           (expecting the libraries under PATH/lib and the
1832                           headers under PATH/include)
1833   --with-freetype-include specify directory for the freetype include files
1834   --with-freetype-lib     specify directory for the freetype library
1835   --with-alsa             specify prefix directory for the alsa package
1836                           (expecting the libraries under PATH/lib and the
1837                           headers under PATH/include)
1838   --with-alsa-include     specify directory for the alsa include files
1839   --with-alsa-lib         specify directory for the alsa library
1840   --with-giflib           use giflib from build system or OpenJDK source
1841                           (system, bundled) [bundled]
1842   --with-zlib             use zlib from build system or OpenJDK source
1843                           (system, bundled) [bundled]
1844   --with-stdc++lib=<static>,<dynamic>,<default>
1845                           force linking of the C++ runtime on Linux to either
1846                           static or dynamic, default is static with dynamic as
1847                           fallback
1848   --with-num-cores        number of cores in the build system, e.g.
1849                           --with-num-cores=8 [probed]
1850   --with-memory-size      memory (in MB) available in the build system, e.g.
1851                           --with-memory-size=1024 [probed]
1852   --with-jobs             number of parallel jobs to let make run [calculated
1853                           based on cores and memory]
1854   --with-sjavac-server-java
1855                           use this java binary for running the sjavac
1856                           background server [Boot JDK java]
1857   --with-ccache-dir       where to store ccache files [~/.ccache]
1858 
1859 Some influential environment variables:
1860   PKG_CONFIG  path to pkg-config utility
1861   CC          C compiler command
1862   CFLAGS      C compiler flags
1863   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1864               nonstandard directory <lib dir>
1865   LIBS        libraries to pass to the linker, e.g. -l<library>
1866   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1867               you have headers in a nonstandard directory <include dir>
1868   CXX         C++ compiler command
1869   CXXFLAGS    C++ compiler flags
1870   OBJC        Objective C compiler command
1871   OBJCFLAGS   Objective C compiler flags
1872   CPP         C preprocessor
1873   CXXCPP      C++ preprocessor
1874   XMKMF       Path to xmkmf, Makefile generator for X Window System
1875   FREETYPE_CFLAGS
1876               C compiler flags for FREETYPE, overriding pkg-config
1877   FREETYPE_LIBS
1878               linker flags for FREETYPE, overriding pkg-config
1879   ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1880   ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1881   LIBFFI_CFLAGS
1882               C compiler flags for LIBFFI, overriding pkg-config
1883   LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
1884 
1885 Use these variables to override the choices made by `configure' or to help
1886 it to find libraries and programs with nonstandard names/locations.
1887 
1888 Report bugs to <build-dev@openjdk.java.net>.
1889 OpenJDK home page: <http://openjdk.java.net>.
1890 _ACEOF
1891 ac_status=$?
1892 fi
1893 
1894 if test "$ac_init_help" = "recursive"; then
1895   # If there are subdirs, report their specific --help.
1896   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1897     test -d "$ac_dir" ||
1898       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1899       continue
1900     ac_builddir=.
1901 
1902 case "$ac_dir" in
1903 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1904 *)
1905   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1906   # A ".." for each directory in $ac_dir_suffix.
1907   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1908   case $ac_top_builddir_sub in
1909   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1910   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1911   esac ;;
1912 esac
1913 ac_abs_top_builddir=$ac_pwd
1914 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1915 # for backward compatibility:
1916 ac_top_builddir=$ac_top_build_prefix
1917 
1918 case $srcdir in
1919   .)  # We are building in place.
1920     ac_srcdir=.
1921     ac_top_srcdir=$ac_top_builddir_sub
1922     ac_abs_top_srcdir=$ac_pwd ;;
1923   [\\/]* | ?:[\\/]* )  # Absolute name.
1924     ac_srcdir=$srcdir$ac_dir_suffix;
1925     ac_top_srcdir=$srcdir
1926     ac_abs_top_srcdir=$srcdir ;;
1927   *) # Relative name.
1928     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1929     ac_top_srcdir=$ac_top_build_prefix$srcdir
1930     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1931 esac
1932 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1933 
1934     cd "$ac_dir" || { ac_status=$?; continue; }
1935     # Check for guested configure.
1936     if test -f "$ac_srcdir/configure.gnu"; then
1937       echo &&
1938       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1939     elif test -f "$ac_srcdir/configure"; then
1940       echo &&
1941       $SHELL "$ac_srcdir/configure" --help=recursive
1942     else
1943       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1944     fi || ac_status=$?
1945     cd "$ac_pwd" || { ac_status=$?; break; }
1946   done
1947 fi
1948 
1949 test -n "$ac_init_help" && exit $ac_status
1950 if $ac_init_version; then
1951   cat <<\_ACEOF
1952 OpenJDK configure jdk8
1953 generated by GNU Autoconf 2.69
1954 
1955 Copyright (C) 2012 Free Software Foundation, Inc.
1956 This configure script is free software; the Free Software Foundation
1957 gives unlimited permission to copy, distribute and modify it.
1958 _ACEOF
1959   exit
1960 fi
1961 
1962 ## ------------------------ ##
1963 ## Autoconf initialization. ##
1964 ## ------------------------ ##
1965 
1966 # ac_fn_c_try_compile LINENO
1967 # --------------------------
1968 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1969 ac_fn_c_try_compile ()
1970 {
1971   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1972   rm -f conftest.$ac_objext
1973   if { { ac_try="$ac_compile"
1974 case "(($ac_try" in
1975   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1976   *) ac_try_echo=$ac_try;;
1977 esac
1978 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1979 $as_echo "$ac_try_echo"; } >&5
1980   (eval "$ac_compile") 2>conftest.err
1981   ac_status=$?
1982   if test -s conftest.err; then
1983     grep -v '^ *+' conftest.err >conftest.er1
1984     cat conftest.er1 >&5
1985     mv -f conftest.er1 conftest.err
1986   fi
1987   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1988   test $ac_status = 0; } && {
1989          test -z "$ac_c_werror_flag" ||
1990          test ! -s conftest.err
1991        } && test -s conftest.$ac_objext; then :
1992   ac_retval=0
1993 else
1994   $as_echo "$as_me: failed program was:" >&5
1995 sed 's/^/| /' conftest.$ac_ext >&5
1996 
1997         ac_retval=1
1998 fi
1999   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2000   as_fn_set_status $ac_retval
2001 
2002 } # ac_fn_c_try_compile
2003 
2004 # ac_fn_cxx_try_compile LINENO
2005 # ----------------------------
2006 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2007 ac_fn_cxx_try_compile ()
2008 {
2009   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2010   rm -f conftest.$ac_objext
2011   if { { ac_try="$ac_compile"
2012 case "(($ac_try" in
2013   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2014   *) ac_try_echo=$ac_try;;
2015 esac
2016 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2017 $as_echo "$ac_try_echo"; } >&5
2018   (eval "$ac_compile") 2>conftest.err
2019   ac_status=$?
2020   if test -s conftest.err; then
2021     grep -v '^ *+' conftest.err >conftest.er1
2022     cat conftest.er1 >&5
2023     mv -f conftest.er1 conftest.err
2024   fi
2025   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2026   test $ac_status = 0; } && {
2027          test -z "$ac_cxx_werror_flag" ||
2028          test ! -s conftest.err
2029        } && test -s conftest.$ac_objext; then :
2030   ac_retval=0
2031 else
2032   $as_echo "$as_me: failed program was:" >&5
2033 sed 's/^/| /' conftest.$ac_ext >&5
2034 
2035         ac_retval=1
2036 fi
2037   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2038   as_fn_set_status $ac_retval
2039 
2040 } # ac_fn_cxx_try_compile
2041 
2042 # ac_fn_objc_try_compile LINENO
2043 # -----------------------------
2044 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2045 ac_fn_objc_try_compile ()
2046 {
2047   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2048   rm -f conftest.$ac_objext
2049   if { { ac_try="$ac_compile"
2050 case "(($ac_try" in
2051   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2052   *) ac_try_echo=$ac_try;;
2053 esac
2054 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2055 $as_echo "$ac_try_echo"; } >&5
2056   (eval "$ac_compile") 2>conftest.err
2057   ac_status=$?
2058   if test -s conftest.err; then
2059     grep -v '^ *+' conftest.err >conftest.er1
2060     cat conftest.er1 >&5
2061     mv -f conftest.er1 conftest.err
2062   fi
2063   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2064   test $ac_status = 0; } && {
2065          test -z "$ac_objc_werror_flag" ||
2066          test ! -s conftest.err
2067        } && test -s conftest.$ac_objext; then :
2068   ac_retval=0
2069 else
2070   $as_echo "$as_me: failed program was:" >&5
2071 sed 's/^/| /' conftest.$ac_ext >&5
2072 
2073         ac_retval=1
2074 fi
2075   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2076   as_fn_set_status $ac_retval
2077 
2078 } # ac_fn_objc_try_compile
2079 
2080 # ac_fn_c_try_cpp LINENO
2081 # ----------------------
2082 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2083 ac_fn_c_try_cpp ()
2084 {
2085   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2086   if { { ac_try="$ac_cpp conftest.$ac_ext"
2087 case "(($ac_try" in
2088   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2089   *) ac_try_echo=$ac_try;;
2090 esac
2091 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2092 $as_echo "$ac_try_echo"; } >&5
2093   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2094   ac_status=$?
2095   if test -s conftest.err; then
2096     grep -v '^ *+' conftest.err >conftest.er1
2097     cat conftest.er1 >&5
2098     mv -f conftest.er1 conftest.err
2099   fi
2100   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2101   test $ac_status = 0; } > conftest.i && {
2102          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2103          test ! -s conftest.err
2104        }; then :
2105   ac_retval=0
2106 else
2107   $as_echo "$as_me: failed program was:" >&5
2108 sed 's/^/| /' conftest.$ac_ext >&5
2109 
2110     ac_retval=1
2111 fi
2112   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2113   as_fn_set_status $ac_retval
2114 
2115 } # ac_fn_c_try_cpp
2116 
2117 # ac_fn_cxx_try_cpp LINENO
2118 # ------------------------
2119 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2120 ac_fn_cxx_try_cpp ()
2121 {
2122   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2123   if { { ac_try="$ac_cpp conftest.$ac_ext"
2124 case "(($ac_try" in
2125   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2126   *) ac_try_echo=$ac_try;;
2127 esac
2128 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2129 $as_echo "$ac_try_echo"; } >&5
2130   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2131   ac_status=$?
2132   if test -s conftest.err; then
2133     grep -v '^ *+' conftest.err >conftest.er1
2134     cat conftest.er1 >&5
2135     mv -f conftest.er1 conftest.err
2136   fi
2137   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2138   test $ac_status = 0; } > conftest.i && {
2139          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2140          test ! -s conftest.err
2141        }; then :
2142   ac_retval=0
2143 else
2144   $as_echo "$as_me: failed program was:" >&5
2145 sed 's/^/| /' conftest.$ac_ext >&5
2146 
2147     ac_retval=1
2148 fi
2149   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2150   as_fn_set_status $ac_retval
2151 
2152 } # ac_fn_cxx_try_cpp
2153 
2154 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2155 # ---------------------------------------------------------
2156 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2157 # the include files in INCLUDES and setting the cache variable VAR
2158 # accordingly.
2159 ac_fn_cxx_check_header_mongrel ()
2160 {
2161   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2162   if eval \${$3+:} false; then :
2163   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2164 $as_echo_n "checking for $2... " >&6; }
2165 if eval \${$3+:} false; then :
2166   $as_echo_n "(cached) " >&6
2167 fi
2168 eval ac_res=\$$3
2169                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2170 $as_echo "$ac_res" >&6; }
2171 else
2172   # Is the header compilable?
2173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2174 $as_echo_n "checking $2 usability... " >&6; }
2175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2176 /* end confdefs.h.  */
2177 $4
2178 #include <$2>
2179 _ACEOF
2180 if ac_fn_cxx_try_compile "$LINENO"; then :
2181   ac_header_compiler=yes
2182 else
2183   ac_header_compiler=no
2184 fi
2185 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2187 $as_echo "$ac_header_compiler" >&6; }
2188 
2189 # Is the header present?
2190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2191 $as_echo_n "checking $2 presence... " >&6; }
2192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2193 /* end confdefs.h.  */
2194 #include <$2>
2195 _ACEOF
2196 if ac_fn_cxx_try_cpp "$LINENO"; then :
2197   ac_header_preproc=yes
2198 else
2199   ac_header_preproc=no
2200 fi
2201 rm -f conftest.err conftest.i conftest.$ac_ext
2202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2203 $as_echo "$ac_header_preproc" >&6; }
2204 
2205 # So?  What about this header?
2206 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2207   yes:no: )
2208     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2209 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2210     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2211 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2212     ;;
2213   no:yes:* )
2214     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2215 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2216     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2217 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2218     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2219 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2220     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2221 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2222     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2223 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2224 ( $as_echo "## ----------------------------------------- ##
2225 ## Report this to build-dev@openjdk.java.net ##
2226 ## ----------------------------------------- ##"
2227      ) | sed "s/^/$as_me: WARNING:     /" >&2
2228     ;;
2229 esac
2230   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2231 $as_echo_n "checking for $2... " >&6; }
2232 if eval \${$3+:} false; then :
2233   $as_echo_n "(cached) " >&6
2234 else
2235   eval "$3=\$ac_header_compiler"
2236 fi
2237 eval ac_res=\$$3
2238                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2239 $as_echo "$ac_res" >&6; }
2240 fi
2241   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2242 
2243 } # ac_fn_cxx_check_header_mongrel
2244 
2245 # ac_fn_cxx_try_run LINENO
2246 # ------------------------
2247 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2248 # that executables *can* be run.
2249 ac_fn_cxx_try_run ()
2250 {
2251   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2252   if { { ac_try="$ac_link"
2253 case "(($ac_try" in
2254   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2255   *) ac_try_echo=$ac_try;;
2256 esac
2257 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2258 $as_echo "$ac_try_echo"; } >&5
2259   (eval "$ac_link") 2>&5
2260   ac_status=$?
2261   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2262   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2263   { { case "(($ac_try" in
2264   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2265   *) ac_try_echo=$ac_try;;
2266 esac
2267 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2268 $as_echo "$ac_try_echo"; } >&5
2269   (eval "$ac_try") 2>&5
2270   ac_status=$?
2271   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2272   test $ac_status = 0; }; }; then :
2273   ac_retval=0
2274 else
2275   $as_echo "$as_me: program exited with status $ac_status" >&5
2276        $as_echo "$as_me: failed program was:" >&5
2277 sed 's/^/| /' conftest.$ac_ext >&5
2278 
2279        ac_retval=$ac_status
2280 fi
2281   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2282   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2283   as_fn_set_status $ac_retval
2284 
2285 } # ac_fn_cxx_try_run
2286 
2287 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2288 # ---------------------------------------------------------
2289 # Tests whether HEADER exists and can be compiled using the include files in
2290 # INCLUDES, setting the cache variable VAR accordingly.
2291 ac_fn_cxx_check_header_compile ()
2292 {
2293   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2294   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2295 $as_echo_n "checking for $2... " >&6; }
2296 if eval \${$3+:} false; then :
2297   $as_echo_n "(cached) " >&6
2298 else
2299   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2300 /* end confdefs.h.  */
2301 $4
2302 #include <$2>
2303 _ACEOF
2304 if ac_fn_cxx_try_compile "$LINENO"; then :
2305   eval "$3=yes"
2306 else
2307   eval "$3=no"
2308 fi
2309 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2310 fi
2311 eval ac_res=\$$3
2312                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2313 $as_echo "$ac_res" >&6; }
2314   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2315 
2316 } # ac_fn_cxx_check_header_compile
2317 
2318 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2319 # ----------------------------------------------
2320 # Tries to find the compile-time value of EXPR in a program that includes
2321 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2322 # computed
2323 ac_fn_cxx_compute_int ()
2324 {
2325   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2326   if test "$cross_compiling" = yes; then
2327     # Depending upon the size, compute the lo and hi bounds.
2328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2329 /* end confdefs.h.  */
2330 $4
2331 int
2332 main ()
2333 {
2334 static int test_array [1 - 2 * !(($2) >= 0)];
2335 test_array [0] = 0;
2336 return test_array [0];
2337 
2338   ;
2339   return 0;
2340 }
2341 _ACEOF
2342 if ac_fn_cxx_try_compile "$LINENO"; then :
2343   ac_lo=0 ac_mid=0
2344   while :; do
2345     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2346 /* end confdefs.h.  */
2347 $4
2348 int
2349 main ()
2350 {
2351 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2352 test_array [0] = 0;
2353 return test_array [0];
2354 
2355   ;
2356   return 0;
2357 }
2358 _ACEOF
2359 if ac_fn_cxx_try_compile "$LINENO"; then :
2360   ac_hi=$ac_mid; break
2361 else
2362   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2363                         if test $ac_lo -le $ac_mid; then
2364                           ac_lo= ac_hi=
2365                           break
2366                         fi
2367                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2368 fi
2369 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2370   done
2371 else
2372   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2373 /* end confdefs.h.  */
2374 $4
2375 int
2376 main ()
2377 {
2378 static int test_array [1 - 2 * !(($2) < 0)];
2379 test_array [0] = 0;
2380 return test_array [0];
2381 
2382   ;
2383   return 0;
2384 }
2385 _ACEOF
2386 if ac_fn_cxx_try_compile "$LINENO"; then :
2387   ac_hi=-1 ac_mid=-1
2388   while :; do
2389     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2390 /* end confdefs.h.  */
2391 $4
2392 int
2393 main ()
2394 {
2395 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2396 test_array [0] = 0;
2397 return test_array [0];
2398 
2399   ;
2400   return 0;
2401 }
2402 _ACEOF
2403 if ac_fn_cxx_try_compile "$LINENO"; then :
2404   ac_lo=$ac_mid; break
2405 else
2406   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2407                         if test $ac_mid -le $ac_hi; then
2408                           ac_lo= ac_hi=
2409                           break
2410                         fi
2411                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2412 fi
2413 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2414   done
2415 else
2416   ac_lo= ac_hi=
2417 fi
2418 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2419 fi
2420 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2421 # Binary search between lo and hi bounds.
2422 while test "x$ac_lo" != "x$ac_hi"; do
2423   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2424   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2425 /* end confdefs.h.  */
2426 $4
2427 int
2428 main ()
2429 {
2430 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2431 test_array [0] = 0;
2432 return test_array [0];
2433 
2434   ;
2435   return 0;
2436 }
2437 _ACEOF
2438 if ac_fn_cxx_try_compile "$LINENO"; then :
2439   ac_hi=$ac_mid
2440 else
2441   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2442 fi
2443 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2444 done
2445 case $ac_lo in #((
2446 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2447 '') ac_retval=1 ;;
2448 esac
2449   else
2450     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2451 /* end confdefs.h.  */
2452 $4
2453 static long int longval () { return $2; }
2454 static unsigned long int ulongval () { return $2; }
2455 #include <stdio.h>
2456 #include <stdlib.h>
2457 int
2458 main ()
2459 {
2460 
2461   FILE *f = fopen ("conftest.val", "w");
2462   if (! f)
2463     return 1;
2464   if (($2) < 0)
2465     {
2466       long int i = longval ();
2467       if (i != ($2))
2468         return 1;
2469       fprintf (f, "%ld", i);
2470     }
2471   else
2472     {
2473       unsigned long int i = ulongval ();
2474       if (i != ($2))
2475         return 1;
2476       fprintf (f, "%lu", i);
2477     }
2478   /* Do not output a trailing newline, as this causes \r\n confusion
2479      on some platforms.  */
2480   return ferror (f) || fclose (f) != 0;
2481 
2482   ;
2483   return 0;
2484 }
2485 _ACEOF
2486 if ac_fn_cxx_try_run "$LINENO"; then :
2487   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2488 else
2489   ac_retval=1
2490 fi
2491 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2492   conftest.$ac_objext conftest.beam conftest.$ac_ext
2493 rm -f conftest.val
2494 
2495   fi
2496   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2497   as_fn_set_status $ac_retval
2498 
2499 } # ac_fn_cxx_compute_int
2500 
2501 # ac_fn_cxx_try_link LINENO
2502 # -------------------------
2503 # Try to link conftest.$ac_ext, and return whether this succeeded.
2504 ac_fn_cxx_try_link ()
2505 {
2506   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2507   rm -f conftest.$ac_objext conftest$ac_exeext
2508   if { { ac_try="$ac_link"
2509 case "(($ac_try" in
2510   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2511   *) ac_try_echo=$ac_try;;
2512 esac
2513 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2514 $as_echo "$ac_try_echo"; } >&5
2515   (eval "$ac_link") 2>conftest.err
2516   ac_status=$?
2517   if test -s conftest.err; then
2518     grep -v '^ *+' conftest.err >conftest.er1
2519     cat conftest.er1 >&5
2520     mv -f conftest.er1 conftest.err
2521   fi
2522   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2523   test $ac_status = 0; } && {
2524          test -z "$ac_cxx_werror_flag" ||
2525          test ! -s conftest.err
2526        } && test -s conftest$ac_exeext && {
2527          test "$cross_compiling" = yes ||
2528          test -x conftest$ac_exeext
2529        }; then :
2530   ac_retval=0
2531 else
2532   $as_echo "$as_me: failed program was:" >&5
2533 sed 's/^/| /' conftest.$ac_ext >&5
2534 
2535         ac_retval=1
2536 fi
2537   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2538   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2539   # interfere with the next link command; also delete a directory that is
2540   # left behind by Apple's compiler.  We do this before executing the actions.
2541   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2542   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2543   as_fn_set_status $ac_retval
2544 
2545 } # ac_fn_cxx_try_link
2546 
2547 # ac_fn_cxx_check_func LINENO FUNC VAR
2548 # ------------------------------------
2549 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2550 ac_fn_cxx_check_func ()
2551 {
2552   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2553   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2554 $as_echo_n "checking for $2... " >&6; }
2555 if eval \${$3+:} false; then :
2556   $as_echo_n "(cached) " >&6
2557 else
2558   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2559 /* end confdefs.h.  */
2560 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2561    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2562 #define $2 innocuous_$2
2563 
2564 /* System header to define __stub macros and hopefully few prototypes,
2565     which can conflict with char $2 (); below.
2566     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2567     <limits.h> exists even on freestanding compilers.  */
2568 
2569 #ifdef __STDC__
2570 # include <limits.h>
2571 #else
2572 # include <assert.h>
2573 #endif
2574 
2575 #undef $2
2576 
2577 /* Override any GCC internal prototype to avoid an error.
2578    Use char because int might match the return type of a GCC
2579    builtin and then its argument prototype would still apply.  */
2580 #ifdef __cplusplus
2581 extern "C"
2582 #endif
2583 char $2 ();
2584 /* The GNU C library defines this for functions which it implements
2585     to always fail with ENOSYS.  Some functions are actually named
2586     something starting with __ and the normal name is an alias.  */
2587 #if defined __stub_$2 || defined __stub___$2
2588 choke me
2589 #endif
2590 
2591 int
2592 main ()
2593 {
2594 return $2 ();
2595   ;
2596   return 0;
2597 }
2598 _ACEOF
2599 if ac_fn_cxx_try_link "$LINENO"; then :
2600   eval "$3=yes"
2601 else
2602   eval "$3=no"
2603 fi
2604 rm -f core conftest.err conftest.$ac_objext \
2605     conftest$ac_exeext conftest.$ac_ext
2606 fi
2607 eval ac_res=\$$3
2608                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2609 $as_echo "$ac_res" >&6; }
2610   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2611 
2612 } # ac_fn_cxx_check_func
2613 
2614 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2615 # -------------------------------------------------------
2616 # Tests whether HEADER exists and can be compiled using the include files in
2617 # INCLUDES, setting the cache variable VAR accordingly.
2618 ac_fn_c_check_header_compile ()
2619 {
2620   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2621   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2622 $as_echo_n "checking for $2... " >&6; }
2623 if eval \${$3+:} false; then :
2624   $as_echo_n "(cached) " >&6
2625 else
2626   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2627 /* end confdefs.h.  */
2628 $4
2629 #include <$2>
2630 _ACEOF
2631 if ac_fn_c_try_compile "$LINENO"; then :
2632   eval "$3=yes"
2633 else
2634   eval "$3=no"
2635 fi
2636 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2637 fi
2638 eval ac_res=\$$3
2639                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2640 $as_echo "$ac_res" >&6; }
2641   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2642 
2643 } # ac_fn_c_check_header_compile
2644 cat >config.log <<_ACEOF
2645 This file contains any messages produced by compilers while
2646 running configure, to aid debugging if configure makes a mistake.
2647 
2648 It was created by OpenJDK $as_me jdk8, which was
2649 generated by GNU Autoconf 2.69.  Invocation command line was
2650 
2651   $ $0 $@
2652 
2653 _ACEOF
2654 exec 5>>config.log
2655 {
2656 cat <<_ASUNAME
2657 ## --------- ##
2658 ## Platform. ##
2659 ## --------- ##
2660 
2661 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2662 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2663 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2664 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2665 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2666 
2667 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2668 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2669 
2670 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2671 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2672 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2673 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2674 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2675 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2676 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2677 
2678 _ASUNAME
2679 
2680 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2681 for as_dir in $PATH
2682 do
2683   IFS=$as_save_IFS
2684   test -z "$as_dir" && as_dir=.
2685     $as_echo "PATH: $as_dir"
2686   done
2687 IFS=$as_save_IFS
2688 
2689 } >&5
2690 
2691 cat >&5 <<_ACEOF
2692 
2693 
2694 ## ----------- ##
2695 ## Core tests. ##
2696 ## ----------- ##
2697 
2698 _ACEOF
2699 
2700 
2701 # Keep a trace of the command line.
2702 # Strip out --no-create and --no-recursion so they do not pile up.
2703 # Strip out --silent because we don't want to record it for future runs.
2704 # Also quote any args containing shell meta-characters.
2705 # Make two passes to allow for proper duplicate-argument suppression.
2706 ac_configure_args=
2707 ac_configure_args0=
2708 ac_configure_args1=
2709 ac_must_keep_next=false
2710 for ac_pass in 1 2
2711 do
2712   for ac_arg
2713   do
2714     case $ac_arg in
2715     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2716     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2717     | -silent | --silent | --silen | --sile | --sil)
2718       continue ;;
2719     *\'*)
2720       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2721     esac
2722     case $ac_pass in
2723     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2724     2)
2725       as_fn_append ac_configure_args1 " '$ac_arg'"
2726       if test $ac_must_keep_next = true; then
2727         ac_must_keep_next=false # Got value, back to normal.
2728       else
2729         case $ac_arg in
2730           *=* | --config-cache | -C | -disable-* | --disable-* \
2731           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2732           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2733           | -with-* | --with-* | -without-* | --without-* | --x)
2734             case "$ac_configure_args0 " in
2735               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2736             esac
2737             ;;
2738           -* ) ac_must_keep_next=true ;;
2739         esac
2740       fi
2741       as_fn_append ac_configure_args " '$ac_arg'"
2742       ;;
2743     esac
2744   done
2745 done
2746 { ac_configure_args0=; unset ac_configure_args0;}
2747 { ac_configure_args1=; unset ac_configure_args1;}
2748 
2749 # When interrupted or exit'd, cleanup temporary files, and complete
2750 # config.log.  We remove comments because anyway the quotes in there
2751 # would cause problems or look ugly.
2752 # WARNING: Use '\'' to represent an apostrophe within the trap.
2753 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2754 trap 'exit_status=$?
2755   # Save into config.log some information that might help in debugging.
2756   {
2757     echo
2758 
2759     $as_echo "## ---------------- ##
2760 ## Cache variables. ##
2761 ## ---------------- ##"
2762     echo
2763     # The following way of writing the cache mishandles newlines in values,
2764 (
2765   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2766     eval ac_val=\$$ac_var
2767     case $ac_val in #(
2768     *${as_nl}*)
2769       case $ac_var in #(
2770       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2771 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2772       esac
2773       case $ac_var in #(
2774       _ | IFS | as_nl) ;; #(
2775       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2776       *) { eval $ac_var=; unset $ac_var;} ;;
2777       esac ;;
2778     esac
2779   done
2780   (set) 2>&1 |
2781     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2782     *${as_nl}ac_space=\ *)
2783       sed -n \
2784         "s/'\''/'\''\\\\'\'''\''/g;
2785           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2786       ;; #(
2787     *)
2788       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2789       ;;
2790     esac |
2791     sort
2792 )
2793     echo
2794 
2795     $as_echo "## ----------------- ##
2796 ## Output variables. ##
2797 ## ----------------- ##"
2798     echo
2799     for ac_var in $ac_subst_vars
2800     do
2801       eval ac_val=\$$ac_var
2802       case $ac_val in
2803       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2804       esac
2805       $as_echo "$ac_var='\''$ac_val'\''"
2806     done | sort
2807     echo
2808 
2809     if test -n "$ac_subst_files"; then
2810       $as_echo "## ------------------- ##
2811 ## File substitutions. ##
2812 ## ------------------- ##"
2813       echo
2814       for ac_var in $ac_subst_files
2815       do
2816         eval ac_val=\$$ac_var
2817         case $ac_val in
2818         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2819         esac
2820         $as_echo "$ac_var='\''$ac_val'\''"
2821       done | sort
2822       echo
2823     fi
2824 
2825     if test -s confdefs.h; then
2826       $as_echo "## ----------- ##
2827 ## confdefs.h. ##
2828 ## ----------- ##"
2829       echo
2830       cat confdefs.h
2831       echo
2832     fi
2833     test "$ac_signal" != 0 &&
2834       $as_echo "$as_me: caught signal $ac_signal"
2835     $as_echo "$as_me: exit $exit_status"
2836   } >&5
2837   rm -f core *.core core.conftest.* &&
2838     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2839     exit $exit_status
2840 ' 0
2841 for ac_signal in 1 2 13 15; do
2842   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2843 done
2844 ac_signal=0
2845 
2846 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2847 rm -f -r conftest* confdefs.h
2848 
2849 $as_echo "/* confdefs.h */" > confdefs.h
2850 
2851 # Predefined preprocessor variables.
2852 
2853 cat >>confdefs.h <<_ACEOF
2854 #define PACKAGE_NAME "$PACKAGE_NAME"
2855 _ACEOF
2856 
2857 cat >>confdefs.h <<_ACEOF
2858 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2859 _ACEOF
2860 
2861 cat >>confdefs.h <<_ACEOF
2862 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2863 _ACEOF
2864 
2865 cat >>confdefs.h <<_ACEOF
2866 #define PACKAGE_STRING "$PACKAGE_STRING"
2867 _ACEOF
2868 
2869 cat >>confdefs.h <<_ACEOF
2870 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2871 _ACEOF
2872 
2873 cat >>confdefs.h <<_ACEOF
2874 #define PACKAGE_URL "$PACKAGE_URL"
2875 _ACEOF
2876 
2877 
2878 # Let the site file select an alternate cache file if it wants to.
2879 # Prefer an explicitly selected file to automatically selected ones.
2880 ac_site_file1=NONE
2881 ac_site_file2=NONE
2882 if test -n "$CONFIG_SITE"; then
2883   # We do not want a PATH search for config.site.
2884   case $CONFIG_SITE in #((
2885     -*)  ac_site_file1=./$CONFIG_SITE;;
2886     */*) ac_site_file1=$CONFIG_SITE;;
2887     *)   ac_site_file1=./$CONFIG_SITE;;
2888   esac
2889 elif test "x$prefix" != xNONE; then
2890   ac_site_file1=$prefix/share/config.site
2891   ac_site_file2=$prefix/etc/config.site
2892 else
2893   ac_site_file1=$ac_default_prefix/share/config.site
2894   ac_site_file2=$ac_default_prefix/etc/config.site
2895 fi
2896 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2897 do
2898   test "x$ac_site_file" = xNONE && continue
2899   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2900     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2901 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2902     sed 's/^/| /' "$ac_site_file" >&5
2903     . "$ac_site_file" \
2904       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2905 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2906 as_fn_error $? "failed to load site script $ac_site_file
2907 See \`config.log' for more details" "$LINENO" 5; }
2908   fi
2909 done
2910 
2911 if test -r "$cache_file"; then
2912   # Some versions of bash will fail to source /dev/null (special files
2913   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2914   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2915     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2916 $as_echo "$as_me: loading cache $cache_file" >&6;}
2917     case $cache_file in
2918       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2919       *)                      . "./$cache_file";;
2920     esac
2921   fi
2922 else
2923   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2924 $as_echo "$as_me: creating cache $cache_file" >&6;}
2925   >$cache_file
2926 fi
2927 
2928 # Check that the precious variables saved in the cache have kept the same
2929 # value.
2930 ac_cache_corrupted=false
2931 for ac_var in $ac_precious_vars; do
2932   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2933   eval ac_new_set=\$ac_env_${ac_var}_set
2934   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2935   eval ac_new_val=\$ac_env_${ac_var}_value
2936   case $ac_old_set,$ac_new_set in
2937     set,)
2938       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2939 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2940       ac_cache_corrupted=: ;;
2941     ,set)
2942       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2943 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2944       ac_cache_corrupted=: ;;
2945     ,);;
2946     *)
2947       if test "x$ac_old_val" != "x$ac_new_val"; then
2948         # differences in whitespace do not lead to failure.
2949         ac_old_val_w=`echo x $ac_old_val`
2950         ac_new_val_w=`echo x $ac_new_val`
2951         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2952           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2953 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2954           ac_cache_corrupted=:
2955         else
2956           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2957 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2958           eval $ac_var=\$ac_old_val
2959         fi
2960         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2961 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2962         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2963 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2964       fi;;
2965   esac
2966   # Pass precious variables to config.status.
2967   if test "$ac_new_set" = set; then
2968     case $ac_new_val in
2969     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2970     *) ac_arg=$ac_var=$ac_new_val ;;
2971     esac
2972     case " $ac_configure_args " in
2973       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2974       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2975     esac
2976   fi
2977 done
2978 if $ac_cache_corrupted; then
2979   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2980 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2981   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2982 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2983   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2984 fi
2985 ## -------------------- ##
2986 ## Main body of script. ##
2987 ## -------------------- ##
2988 
2989 ac_ext=c
2990 ac_cpp='$CPP $CPPFLAGS'
2991 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2992 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2993 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2994 
2995 
2996 
2997 ac_aux_dir=
2998 for ac_dir in build-aux "$srcdir"/build-aux; do
2999   if test -f "$ac_dir/install-sh"; then
3000     ac_aux_dir=$ac_dir
3001     ac_install_sh="$ac_aux_dir/install-sh -c"
3002     break
3003   elif test -f "$ac_dir/install.sh"; then
3004     ac_aux_dir=$ac_dir
3005     ac_install_sh="$ac_aux_dir/install.sh -c"
3006     break
3007   elif test -f "$ac_dir/shtool"; then
3008     ac_aux_dir=$ac_dir
3009     ac_install_sh="$ac_aux_dir/shtool install -c"
3010     break
3011   fi
3012 done
3013 if test -z "$ac_aux_dir"; then
3014   as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3015 fi
3016 
3017 # These three variables are undocumented and unsupported,
3018 # and are intended to be withdrawn in a future Autoconf release.
3019 # They can cause serious problems if a builder's source tree is in a directory
3020 # whose full name contains unusual characters.
3021 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3022 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3023 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3024 
3025 
3026 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3027 
3028 #
3029 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3030 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3031 #
3032 # This code is free software; you can redistribute it and/or modify it
3033 # under the terms of the GNU General Public License version 2 only, as
3034 # published by the Free Software Foundation.  Oracle designates this
3035 # particular file as subject to the "Classpath" exception as provided
3036 # by Oracle in the LICENSE file that accompanied this code.
3037 #
3038 # This code is distributed in the hope that it will be useful, but WITHOUT
3039 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3040 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3041 # version 2 for more details (a copy is included in the LICENSE file that
3042 # accompanied this code).
3043 #
3044 # You should have received a copy of the GNU General Public License version
3045 # 2 along with this work; if not, write to the Free Software Foundation,
3046 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3047 #
3048 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3049 # or visit www.oracle.com if you need additional information or have any
3050 # questions.
3051 #
3052 
3053 #
3054 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
3055 #
3056 # This program is free software; you can redistribute it and/or modify
3057 # it under the terms of the GNU General Public License as published by
3058 # the Free Software Foundation; either version 2 of the License, or
3059 # (at your option) any later version.
3060 #
3061 # This program is distributed in the hope that it will be useful, but
3062 # WITHOUT ANY WARRANTY; without even the implied warranty of
3063 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3064 # General Public License for more details.
3065 #
3066 # You should have received a copy of the GNU General Public License
3067 # along with this program; if not, write to the Free Software
3068 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3069 #
3070 # As a special exception to the GNU General Public License, if you
3071 # distribute this file as part of a program that contains a
3072 # configuration script generated by Autoconf, you may include it under
3073 # the same distribution terms that you use for the rest of that program.
3074 
3075 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
3076 # ----------------------------------
3077 # PKG_PROG_PKG_CONFIG
3078 
3079 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3080 #
3081 # Check to see whether a particular set of modules exists.  Similar
3082 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
3083 #
3084 #
3085 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
3086 # this or PKG_CHECK_MODULES is called, or make sure to call
3087 # PKG_CHECK_EXISTS manually
3088 # --------------------------------------------------------------
3089 
3090 
3091 
3092 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3093 # ---------------------------------------------
3094 # _PKG_CONFIG
3095 
3096 # _PKG_SHORT_ERRORS_SUPPORTED
3097 # -----------------------------
3098 # _PKG_SHORT_ERRORS_SUPPORTED
3099 
3100 
3101 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3102 # [ACTION-IF-NOT-FOUND])
3103 #
3104 #
3105 # Note that if there is a possibility the first call to
3106 # PKG_CHECK_MODULES might not happen, you should be sure to include an
3107 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3108 #
3109 #
3110 # --------------------------------------------------------------
3111 # PKG_CHECK_MODULES
3112 
3113 
3114 # Include these first...
3115 #
3116 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3117 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3118 #
3119 # This code is free software; you can redistribute it and/or modify it
3120 # under the terms of the GNU General Public License version 2 only, as
3121 # published by the Free Software Foundation.  Oracle designates this
3122 # particular file as subject to the "Classpath" exception as provided
3123 # by Oracle in the LICENSE file that accompanied this code.
3124 #
3125 # This code is distributed in the hope that it will be useful, but WITHOUT
3126 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3127 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3128 # version 2 for more details (a copy is included in the LICENSE file that
3129 # accompanied this code).
3130 #
3131 # You should have received a copy of the GNU General Public License version
3132 # 2 along with this work; if not, write to the Free Software Foundation,
3133 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3134 #
3135 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3136 # or visit www.oracle.com if you need additional information or have any
3137 # questions.
3138 #
3139 
3140 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3141 # If so, then append $1 to $2 \
3142 # Also set JVM_ARG_OK to true/false depending on outcome.
3143 
3144 
3145 # Appends a string to a path variable, only adding the : when needed.
3146 
3147 
3148 # This will make sure the given variable points to a full and proper
3149 # path. This means:
3150 # 1) There will be no spaces in the path. On posix platforms,
3151 #    spaces in the path will result in an error. On Windows,
3152 #    the path will be rewritten using short-style to be space-free.
3153 # 2) The path will be absolute, and it will be in unix-style (on
3154 #     cygwin).
3155 # $1: The name of the variable to fix
3156 
3157 
3158 # This will make sure the given variable points to a executable
3159 # with a full and proper path. This means:
3160 # 1) There will be no spaces in the path. On posix platforms,
3161 #    spaces in the path will result in an error. On Windows,
3162 #    the path will be rewritten using short-style to be space-free.
3163 # 2) The path will be absolute, and it will be in unix-style (on
3164 #     cygwin).
3165 # Any arguments given to the executable is preserved.
3166 # If the input variable does not have a directory specification, then
3167 # it need to be in the PATH.
3168 # $1: The name of the variable to fix
3169 
3170 
3171 
3172 
3173 # Register a --with argument but mark it as deprecated
3174 # $1: The name of the with argument to deprecate, not including --with-
3175 
3176 
3177 # Register a --enable argument but mark it as deprecated
3178 # $1: The name of the with argument to deprecate, not including --enable-
3179 # $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3180 
3181 
3182 
3183 
3184 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3185 # $1: variable to check
3186 # $2: executable name to print in warning (optional)
3187 
3188 
3189 # Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3190 # Arguments as AC_PATH_PROG:
3191 # $1: variable to set
3192 # $2: executable name to look for
3193 
3194 
3195 # Setup the most fundamental tools that relies on not much else to set up,
3196 # but is used by much of the early bootstrap code.
3197 
3198 
3199 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3200 
3201 
3202 
3203 
3204 
3205 
3206 
3207 #%%% Simple tools %%%
3208 
3209 # Check if we have found a usable version of make
3210 # $1: the path to a potential make binary (or empty)
3211 # $2: the description on how we found this
3212 
3213 
3214 # Goes looking for a usable version of GNU make.
3215 
3216 
3217 
3218 
3219 
3220 
3221 # Check if build directory is on local disk. If not possible to determine,
3222 # we prefer to claim it's local.
3223 # Argument 1: directory to test
3224 # Argument 2: what to do if it is on local disk
3225 # Argument 3: what to do otherwise (remote disk or failure)
3226 
3227 
3228 # Check that source files have basic read permissions set. This might
3229 # not be the case in cygwin in certain conditions.
3230 
3231 
3232 
3233 
3234 #
3235 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3236 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3237 #
3238 # This code is free software; you can redistribute it and/or modify it
3239 # under the terms of the GNU General Public License version 2 only, as
3240 # published by the Free Software Foundation.  Oracle designates this
3241 # particular file as subject to the "Classpath" exception as provided
3242 # by Oracle in the LICENSE file that accompanied this code.
3243 #
3244 # This code is distributed in the hope that it will be useful, but WITHOUT
3245 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3246 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3247 # version 2 for more details (a copy is included in the LICENSE file that
3248 # accompanied this code).
3249 #
3250 # You should have received a copy of the GNU General Public License version
3251 # 2 along with this work; if not, write to the Free Software Foundation,
3252 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3253 #
3254 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3255 # or visit www.oracle.com if you need additional information or have any
3256 # questions.
3257 #
3258 
3259 
3260 
3261 
3262 
3263 # Helper function which possibly converts a path using DOS-style short mode.
3264 # If so, the updated path is stored in $new_path.
3265 # $1: The path to check
3266 
3267 
3268 # Helper function which possibly converts a path using DOS-style short mode.
3269 # If so, the updated path is stored in $new_path.
3270 # $1: The path to check
3271 
3272 
3273 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3274 # and could probably be heavily simplified. However, all changes in this
3275 # area tend to need lot of testing in different scenarios, and in lack of
3276 # proper unit testing, cleaning this up has not been deemed worth the effort
3277 # at the moment.
3278 
3279 
3280 
3281 
3282 
3283 
3284 
3285 
3286 
3287 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3288 
3289 
3290 
3291 
3292 #
3293 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3294 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3295 #
3296 # This code is free software; you can redistribute it and/or modify it
3297 # under the terms of the GNU General Public License version 2 only, as
3298 # published by the Free Software Foundation.  Oracle designates this
3299 # particular file as subject to the "Classpath" exception as provided
3300 # by Oracle in the LICENSE file that accompanied this code.
3301 #
3302 # This code is distributed in the hope that it will be useful, but WITHOUT
3303 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3304 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3305 # version 2 for more details (a copy is included in the LICENSE file that
3306 # accompanied this code).
3307 #
3308 # You should have received a copy of the GNU General Public License version
3309 # 2 along with this work; if not, write to the Free Software Foundation,
3310 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3311 #
3312 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3313 # or visit www.oracle.com if you need additional information or have any
3314 # questions.
3315 #
3316 
3317 
3318 
3319 
3320 
3321 
3322 
3323 
3324 
3325 
3326 
3327 # ... then the rest
3328 #
3329 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3330 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3331 #
3332 # This code is free software; you can redistribute it and/or modify it
3333 # under the terms of the GNU General Public License version 2 only, as
3334 # published by the Free Software Foundation.  Oracle designates this
3335 # particular file as subject to the "Classpath" exception as provided
3336 # by Oracle in the LICENSE file that accompanied this code.
3337 #
3338 # This code is distributed in the hope that it will be useful, but WITHOUT
3339 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3340 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3341 # version 2 for more details (a copy is included in the LICENSE file that
3342 # accompanied this code).
3343 #
3344 # You should have received a copy of the GNU General Public License version
3345 # 2 along with this work; if not, write to the Free Software Foundation,
3346 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3347 #
3348 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3349 # or visit www.oracle.com if you need additional information or have any
3350 # questions.
3351 #
3352 
3353 # Execute the check given as argument, and verify the result
3354 # If the Boot JDK was previously found, do nothing
3355 # $1 A command line (typically autoconf macro) to execute
3356 
3357 
3358 # Test: Is bootjdk explicitely set by command line arguments?
3359 
3360 
3361 # Test: Is bootjdk available from builddeps?
3362 
3363 
3364 # Test: Is $JAVA_HOME set?
3365 
3366 
3367 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3368 
3369 
3370 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3371 
3372 
3373 # Look for a jdk in the given path. If there are multiple, try to select the newest.
3374 # If found, set BOOT_JDK and BOOT_JDK_FOUND.
3375 # $1 = Path to directory containing jdk installations.
3376 # $2 = String to append to the found JDK directory to get the proper JDK home
3377 
3378 
3379 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3380 # environmental variable as base for where to look.
3381 # $1 Name of an environmal variable, assumed to point to the Program Files directory.
3382 
3383 
3384 # Test: Is there a JDK installed in default, well-known locations?
3385 
3386 
3387 # Check that a command-line tool in the Boot JDK is correct
3388 # $1 = name of variable to assign
3389 # $2 = name of binary
3390 
3391 
3392 ###############################################################################
3393 #
3394 # We need a Boot JDK to bootstrap the build.
3395 #
3396 
3397 
3398 
3399 
3400 
3401 #
3402 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3403 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3404 #
3405 # This code is free software; you can redistribute it and/or modify it
3406 # under the terms of the GNU General Public License version 2 only, as
3407 # published by the Free Software Foundation.  Oracle designates this
3408 # particular file as subject to the "Classpath" exception as provided
3409 # by Oracle in the LICENSE file that accompanied this code.
3410 #
3411 # This code is distributed in the hope that it will be useful, but WITHOUT
3412 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3413 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3414 # version 2 for more details (a copy is included in the LICENSE file that
3415 # accompanied this code).
3416 #
3417 # You should have received a copy of the GNU General Public License version
3418 # 2 along with this work; if not, write to the Free Software Foundation,
3419 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3420 #
3421 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3422 # or visit www.oracle.com if you need additional information or have any
3423 # questions.
3424 #
3425 
3426 
3427 
3428 
3429 
3430 
3431 
3432 
3433 
3434 
3435 
3436 
3437 
3438 
3439 
3440 
3441 
3442 
3443 
3444 
3445 #
3446 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3447 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3448 #
3449 # This code is free software; you can redistribute it and/or modify it
3450 # under the terms of the GNU General Public License version 2 only, as
3451 # published by the Free Software Foundation.  Oracle designates this
3452 # particular file as subject to the "Classpath" exception as provided
3453 # by Oracle in the LICENSE file that accompanied this code.
3454 #
3455 # This code is distributed in the hope that it will be useful, but WITHOUT
3456 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3457 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3458 # version 2 for more details (a copy is included in the LICENSE file that
3459 # accompanied this code).
3460 #
3461 # You should have received a copy of the GNU General Public License version
3462 # 2 along with this work; if not, write to the Free Software Foundation,
3463 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3464 #
3465 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3466 # or visit www.oracle.com if you need additional information or have any
3467 # questions.
3468 #
3469 
3470 
3471 
3472 
3473 
3474 cygwin_help() {
3475   case $1 in
3476     unzip)
3477       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3478       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3479       ;;
3480     zip)
3481       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3482       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3483       ;;
3484     make)
3485       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3486       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3487       ;;
3488     freetype)
3489       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
3490         HELP_MSG="To install freetype, run:
3491 wget \"http://gnuwin32.sourceforge.net/downlinks/freetype.php\" -O /tmp/freetype-setup.exe
3492 chmod +x /tmp/freetype-setup.exe
3493 /tmp/freetype-setup.exe
3494 Follow GUI prompts, and install to default directory \"C:\Program Files (x86)\GnuWin32\".
3495 After installation, locate lib/libfreetype.dll.a and make a copy with the name freetype.dll."
3496       else
3497         HELP_MSG="You need to build a 64-bit version of freetype.
3498 This is not readily available.
3499 You can find source code and build instructions on
3500 http://www.freetype.org/
3501 If you put the resulting build in \"C:\Program Files\GnuWin32\", it will be found automatically."
3502       fi
3503       ;;
3504   esac
3505 }
3506 
3507 msys_help() {
3508   PKGHANDLER_COMMAND=""
3509 }
3510 
3511 apt_help() {
3512   case $1 in
3513     devkit)
3514       PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3515     openjdk)
3516       PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3517     alsa)
3518       PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3519     cups)
3520       PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3521     freetype)
3522       PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3523     pulse)
3524       PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3525     x11)
3526       PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3527     ccache)
3528       PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3529   esac
3530 }
3531 
3532 yum_help() {
3533   case $1 in
3534     devkit)
3535       PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3536     openjdk)
3537       PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3538     alsa)
3539       PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3540     cups)
3541       PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3542     freetype)
3543       PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3544     pulse)
3545       PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3546     x11)
3547       PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3548     ccache)
3549       PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3550   esac
3551 }
3552 
3553 port_help() {
3554   PKGHANDLER_COMMAND=""
3555 }
3556 
3557 pkgutil_help() {
3558   PKGHANDLER_COMMAND=""
3559 }
3560 
3561 pkgadd_help() {
3562   PKGHANDLER_COMMAND=""
3563 }
3564 
3565 
3566 
3567 #
3568 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3569 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3570 #
3571 # This code is free software; you can redistribute it and/or modify it
3572 # under the terms of the GNU General Public License version 2 only, as
3573 # published by the Free Software Foundation.  Oracle designates this
3574 # particular file as subject to the "Classpath" exception as provided
3575 # by Oracle in the LICENSE file that accompanied this code.
3576 #
3577 # This code is distributed in the hope that it will be useful, but WITHOUT
3578 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3579 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3580 # version 2 for more details (a copy is included in the LICENSE file that
3581 # accompanied this code).
3582 #
3583 # You should have received a copy of the GNU General Public License version
3584 # 2 along with this work; if not, write to the Free Software Foundation,
3585 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3586 #
3587 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3588 # or visit www.oracle.com if you need additional information or have any
3589 # questions.
3590 #
3591 
3592 
3593 
3594 
3595 
3596 
3597 
3598 
3599 
3600 
3601 ###############################################################################
3602 #
3603 # Should we build only OpenJDK even if closed sources are present?
3604 #
3605 
3606 
3607 
3608 
3609 ###############################################################################
3610 #
3611 # Setup version numbers
3612 #
3613 
3614 
3615 
3616 
3617 
3618 
3619 # Support for customization of the build process. Some build files
3620 # will include counterparts from this location, if they exist. This allows
3621 # for a degree of customization of the build targets and the rules/recipes
3622 # to create them
3623 
3624 # Check whether --with-custom-make-dir was given.
3625 if test "${with_custom_make_dir+set}" = set; then :
3626   withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3627 fi
3628 
3629 
3630 
3631 #
3632 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3633 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3634 #
3635 # This code is free software; you can redistribute it and/or modify it
3636 # under the terms of the GNU General Public License version 2 only, as
3637 # published by the Free Software Foundation.  Oracle designates this
3638 # particular file as subject to the "Classpath" exception as provided
3639 # by Oracle in the LICENSE file that accompanied this code.
3640 #
3641 # This code is distributed in the hope that it will be useful, but WITHOUT
3642 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3643 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3644 # version 2 for more details (a copy is included in the LICENSE file that
3645 # accompanied this code).
3646 #
3647 # You should have received a copy of the GNU General Public License version
3648 # 2 along with this work; if not, write to the Free Software Foundation,
3649 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3650 #
3651 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3652 # or visit www.oracle.com if you need additional information or have any
3653 # questions.
3654 #
3655 
3656 
3657 
3658 
3659 
3660 
3661 
3662 
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 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3698 # Converts autoconf style CPU name to OpenJDK style, into
3699 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3700 
3701 
3702 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3703 # Converts autoconf style OS name to OpenJDK style, into
3704 # VAR_OS and VAR_OS_API.
3705 
3706 
3707 # Expects $host_os $host_cpu $build_os and $build_cpu
3708 # and $with_target_bits to have been setup!
3709 #
3710 # Translate the standard triplet(quadruplet) definition
3711 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3712 # OPENJDK_BUILD_OS, etc.
3713 
3714 
3715 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3716 # accordingly. Must be done after setting up build and target system, but before
3717 # doing anything else with these values.
3718 
3719 
3720 # Setup the legacy variables, for controlling the old makefiles.
3721 #
3722 
3723 
3724 
3725 
3726 #%%% Build and target systems %%%
3727 
3728 
3729 
3730 
3731 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3732 # Add -mX to various FLAGS variables.
3733 
3734 
3735 
3736 
3737 
3738 
3739 #
3740 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3741 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3742 #
3743 # This code is free software; you can redistribute it and/or modify it
3744 # under the terms of the GNU General Public License version 2 only, as
3745 # published by the Free Software Foundation.  Oracle designates this
3746 # particular file as subject to the "Classpath" exception as provided
3747 # by Oracle in the LICENSE file that accompanied this code.
3748 #
3749 # This code is distributed in the hope that it will be useful, but WITHOUT
3750 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3751 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3752 # version 2 for more details (a copy is included in the LICENSE file that
3753 # accompanied this code).
3754 #
3755 # You should have received a copy of the GNU General Public License version
3756 # 2 along with this work; if not, write to the Free Software Foundation,
3757 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3758 #
3759 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3760 # or visit www.oracle.com if you need additional information or have any
3761 # questions.
3762 #
3763 
3764 
3765 
3766 
3767 
3768 
3769 
3770 
3771 #
3772 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3773 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3774 #
3775 # This code is free software; you can redistribute it and/or modify it
3776 # under the terms of the GNU General Public License version 2 only, as
3777 # published by the Free Software Foundation.  Oracle designates this
3778 # particular file as subject to the "Classpath" exception as provided
3779 # by Oracle in the LICENSE file that accompanied this code.
3780 #
3781 # This code is distributed in the hope that it will be useful, but WITHOUT
3782 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3783 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3784 # version 2 for more details (a copy is included in the LICENSE file that
3785 # accompanied this code).
3786 #
3787 # You should have received a copy of the GNU General Public License version
3788 # 2 along with this work; if not, write to the Free Software Foundation,
3789 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3790 #
3791 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3792 # or visit www.oracle.com if you need additional information or have any
3793 # questions.
3794 #
3795 
3796 # $1 = compiler to test (CC or CXX)
3797 # $2 = human readable name of compiler (C or C++)
3798 
3799 
3800 
3801 
3802 
3803 # $1 = compiler to test (CC or CXX)
3804 # $2 = human readable name of compiler (C or C++)
3805 # $3 = list of compiler names to search for
3806 
3807 
3808 
3809 
3810 
3811 
3812 
3813 
3814 
3815 
3816 
3817 
3818 
3819 # TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3820 #                                   [RUN-IF-FALSE])
3821 # ------------------------------------------------------------
3822 # Check that the c and c++ compilers support an argument
3823 
3824 
3825 
3826 
3827 # Setup the JTREG paths
3828 
3829 
3830 #
3831 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3832 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3833 #
3834 # This code is free software; you can redistribute it and/or modify it
3835 # under the terms of the GNU General Public License version 2 only, as
3836 # published by the Free Software Foundation.  Oracle designates this
3837 # particular file as subject to the "Classpath" exception as provided
3838 # by Oracle in the LICENSE file that accompanied this code.
3839 #
3840 # This code is distributed in the hope that it will be useful, but WITHOUT
3841 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3842 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3843 # version 2 for more details (a copy is included in the LICENSE file that
3844 # accompanied this code).
3845 #
3846 # You should have received a copy of the GNU General Public License version
3847 # 2 along with this work; if not, write to the Free Software Foundation,
3848 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3849 #
3850 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3851 # or visit www.oracle.com if you need additional information or have any
3852 # questions.
3853 #
3854 
3855 
3856 
3857 
3858 
3859 
3860 
3861 # Check if the VS env variables were setup prior to running configure.
3862 # If not, then find vcvarsall.bat and run it automatically, and integrate
3863 # the set env variables into the spec file.
3864 
3865 
3866 
3867 
3868 
3869 
3870 
3871 
3872 
3873 
3874 # This line needs to be here, verbatim, after all includes and the dummy hook
3875 # definitions. It is replaced with custom functionality when building
3876 # custom sources.
3877 #CUSTOM_AUTOCONF_INCLUDE
3878 
3879 # Do not change or remove the following line, it is needed for consistency checks:
3880 DATE_WHEN_GENERATED=1424783708
3881 
3882 ###############################################################################
3883 #
3884 # Initialization / Boot-strapping
3885 #
3886 # The bootstrapping process needs to solve the "chicken or the egg" problem,
3887 # thus it jumps back and forth, each time gaining something needed later on.
3888 #
3889 ###############################################################################
3890 
3891 # Basic initialization that must happen first of all
3892 
3893   # Save the original command line. This is passed to us by the wrapper configure script.
3894 
3895   DATE_WHEN_CONFIGURED=`LANG=C date`
3896 
3897   { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3898 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3899   { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3900 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3901 
3902 
3903 
3904   # Start with tools that do not need have cross compilation support
3905   # and can be expected to be found in the default PATH. These tools are
3906   # used by configure. Nor are these tools expected to be found in the
3907   # devkit from the builddeps server either, since they are
3908   # needed to download the devkit.
3909 
3910   # First are all the simple required tools.
3911 
3912   for ac_prog in basename
3913 do
3914   # Extract the first word of "$ac_prog", so it can be a program name with args.
3915 set dummy $ac_prog; ac_word=$2
3916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3917 $as_echo_n "checking for $ac_word... " >&6; }
3918 if ${ac_cv_path_BASENAME+:} false; then :
3919   $as_echo_n "(cached) " >&6
3920 else
3921   case $BASENAME in
3922   [\\/]* | ?:[\\/]*)
3923   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3924   ;;
3925   *)
3926   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3927 for as_dir in $PATH
3928 do
3929   IFS=$as_save_IFS
3930   test -z "$as_dir" && as_dir=.
3931     for ac_exec_ext in '' $ac_executable_extensions; do
3932   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3933     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3934     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3935     break 2
3936   fi
3937 done
3938   done
3939 IFS=$as_save_IFS
3940 
3941   ;;
3942 esac
3943 fi
3944 BASENAME=$ac_cv_path_BASENAME
3945 if test -n "$BASENAME"; then
3946   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3947 $as_echo "$BASENAME" >&6; }
3948 else
3949   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3950 $as_echo "no" >&6; }
3951 fi
3952 
3953 
3954   test -n "$BASENAME" && break
3955 done
3956 
3957 
3958   if test "x$BASENAME" = x; then
3959     if test "xbasename" = x; then
3960       PROG_NAME=basename
3961     else
3962       PROG_NAME=basename
3963     fi
3964     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3965 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3966     as_fn_error $? "Cannot continue" "$LINENO" 5
3967   fi
3968 
3969 
3970 
3971   for ac_prog in bash
3972 do
3973   # Extract the first word of "$ac_prog", so it can be a program name with args.
3974 set dummy $ac_prog; ac_word=$2
3975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3976 $as_echo_n "checking for $ac_word... " >&6; }
3977 if ${ac_cv_path_BASH+:} false; then :
3978   $as_echo_n "(cached) " >&6
3979 else
3980   case $BASH in
3981   [\\/]* | ?:[\\/]*)
3982   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3983   ;;
3984   *)
3985   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3986 for as_dir in $PATH
3987 do
3988   IFS=$as_save_IFS
3989   test -z "$as_dir" && as_dir=.
3990     for ac_exec_ext in '' $ac_executable_extensions; do
3991   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3992     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3993     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3994     break 2
3995   fi
3996 done
3997   done
3998 IFS=$as_save_IFS
3999 
4000   ;;
4001 esac
4002 fi
4003 BASH=$ac_cv_path_BASH
4004 if test -n "$BASH"; then
4005   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4006 $as_echo "$BASH" >&6; }
4007 else
4008   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4009 $as_echo "no" >&6; }
4010 fi
4011 
4012 
4013   test -n "$BASH" && break
4014 done
4015 
4016 
4017   if test "x$BASH" = x; then
4018     if test "xbash" = x; then
4019       PROG_NAME=bash
4020     else
4021       PROG_NAME=bash
4022     fi
4023     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4024 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4025     as_fn_error $? "Cannot continue" "$LINENO" 5
4026   fi
4027 
4028 
4029 
4030   for ac_prog in cat
4031 do
4032   # Extract the first word of "$ac_prog", so it can be a program name with args.
4033 set dummy $ac_prog; ac_word=$2
4034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4035 $as_echo_n "checking for $ac_word... " >&6; }
4036 if ${ac_cv_path_CAT+:} false; then :
4037   $as_echo_n "(cached) " >&6
4038 else
4039   case $CAT in
4040   [\\/]* | ?:[\\/]*)
4041   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4042   ;;
4043   *)
4044   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4045 for as_dir in $PATH
4046 do
4047   IFS=$as_save_IFS
4048   test -z "$as_dir" && as_dir=.
4049     for ac_exec_ext in '' $ac_executable_extensions; do
4050   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4051     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4052     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4053     break 2
4054   fi
4055 done
4056   done
4057 IFS=$as_save_IFS
4058 
4059   ;;
4060 esac
4061 fi
4062 CAT=$ac_cv_path_CAT
4063 if test -n "$CAT"; then
4064   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4065 $as_echo "$CAT" >&6; }
4066 else
4067   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4068 $as_echo "no" >&6; }
4069 fi
4070 
4071 
4072   test -n "$CAT" && break
4073 done
4074 
4075 
4076   if test "x$CAT" = x; then
4077     if test "xcat" = x; then
4078       PROG_NAME=cat
4079     else
4080       PROG_NAME=cat
4081     fi
4082     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4083 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4084     as_fn_error $? "Cannot continue" "$LINENO" 5
4085   fi
4086 
4087 
4088 
4089   for ac_prog in chmod
4090 do
4091   # Extract the first word of "$ac_prog", so it can be a program name with args.
4092 set dummy $ac_prog; ac_word=$2
4093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4094 $as_echo_n "checking for $ac_word... " >&6; }
4095 if ${ac_cv_path_CHMOD+:} false; then :
4096   $as_echo_n "(cached) " >&6
4097 else
4098   case $CHMOD in
4099   [\\/]* | ?:[\\/]*)
4100   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4101   ;;
4102   *)
4103   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4104 for as_dir in $PATH
4105 do
4106   IFS=$as_save_IFS
4107   test -z "$as_dir" && as_dir=.
4108     for ac_exec_ext in '' $ac_executable_extensions; do
4109   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4110     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4111     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4112     break 2
4113   fi
4114 done
4115   done
4116 IFS=$as_save_IFS
4117 
4118   ;;
4119 esac
4120 fi
4121 CHMOD=$ac_cv_path_CHMOD
4122 if test -n "$CHMOD"; then
4123   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4124 $as_echo "$CHMOD" >&6; }
4125 else
4126   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4127 $as_echo "no" >&6; }
4128 fi
4129 
4130 
4131   test -n "$CHMOD" && break
4132 done
4133 
4134 
4135   if test "x$CHMOD" = x; then
4136     if test "xchmod" = x; then
4137       PROG_NAME=chmod
4138     else
4139       PROG_NAME=chmod
4140     fi
4141     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4142 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4143     as_fn_error $? "Cannot continue" "$LINENO" 5
4144   fi
4145 
4146 
4147 
4148   for ac_prog in cmp
4149 do
4150   # Extract the first word of "$ac_prog", so it can be a program name with args.
4151 set dummy $ac_prog; ac_word=$2
4152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4153 $as_echo_n "checking for $ac_word... " >&6; }
4154 if ${ac_cv_path_CMP+:} false; then :
4155   $as_echo_n "(cached) " >&6
4156 else
4157   case $CMP in
4158   [\\/]* | ?:[\\/]*)
4159   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4160   ;;
4161   *)
4162   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4163 for as_dir in $PATH
4164 do
4165   IFS=$as_save_IFS
4166   test -z "$as_dir" && as_dir=.
4167     for ac_exec_ext in '' $ac_executable_extensions; do
4168   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4169     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4170     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4171     break 2
4172   fi
4173 done
4174   done
4175 IFS=$as_save_IFS
4176 
4177   ;;
4178 esac
4179 fi
4180 CMP=$ac_cv_path_CMP
4181 if test -n "$CMP"; then
4182   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4183 $as_echo "$CMP" >&6; }
4184 else
4185   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4186 $as_echo "no" >&6; }
4187 fi
4188 
4189 
4190   test -n "$CMP" && break
4191 done
4192 
4193 
4194   if test "x$CMP" = x; then
4195     if test "xcmp" = x; then
4196       PROG_NAME=cmp
4197     else
4198       PROG_NAME=cmp
4199     fi
4200     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4201 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4202     as_fn_error $? "Cannot continue" "$LINENO" 5
4203   fi
4204 
4205 
4206 
4207   for ac_prog in comm
4208 do
4209   # Extract the first word of "$ac_prog", so it can be a program name with args.
4210 set dummy $ac_prog; ac_word=$2
4211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4212 $as_echo_n "checking for $ac_word... " >&6; }
4213 if ${ac_cv_path_COMM+:} false; then :
4214   $as_echo_n "(cached) " >&6
4215 else
4216   case $COMM in
4217   [\\/]* | ?:[\\/]*)
4218   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4219   ;;
4220   *)
4221   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4222 for as_dir in $PATH
4223 do
4224   IFS=$as_save_IFS
4225   test -z "$as_dir" && as_dir=.
4226     for ac_exec_ext in '' $ac_executable_extensions; do
4227   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4228     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4229     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4230     break 2
4231   fi
4232 done
4233   done
4234 IFS=$as_save_IFS
4235 
4236   ;;
4237 esac
4238 fi
4239 COMM=$ac_cv_path_COMM
4240 if test -n "$COMM"; then
4241   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4242 $as_echo "$COMM" >&6; }
4243 else
4244   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4245 $as_echo "no" >&6; }
4246 fi
4247 
4248 
4249   test -n "$COMM" && break
4250 done
4251 
4252 
4253   if test "x$COMM" = x; then
4254     if test "xcomm" = x; then
4255       PROG_NAME=comm
4256     else
4257       PROG_NAME=comm
4258     fi
4259     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4260 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4261     as_fn_error $? "Cannot continue" "$LINENO" 5
4262   fi
4263 
4264 
4265 
4266   for ac_prog in cp
4267 do
4268   # Extract the first word of "$ac_prog", so it can be a program name with args.
4269 set dummy $ac_prog; ac_word=$2
4270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4271 $as_echo_n "checking for $ac_word... " >&6; }
4272 if ${ac_cv_path_CP+:} false; then :
4273   $as_echo_n "(cached) " >&6
4274 else
4275   case $CP in
4276   [\\/]* | ?:[\\/]*)
4277   ac_cv_path_CP="$CP" # Let the user override the test with a path.
4278   ;;
4279   *)
4280   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4281 for as_dir in $PATH
4282 do
4283   IFS=$as_save_IFS
4284   test -z "$as_dir" && as_dir=.
4285     for ac_exec_ext in '' $ac_executable_extensions; do
4286   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4287     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4288     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4289     break 2
4290   fi
4291 done
4292   done
4293 IFS=$as_save_IFS
4294 
4295   ;;
4296 esac
4297 fi
4298 CP=$ac_cv_path_CP
4299 if test -n "$CP"; then
4300   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4301 $as_echo "$CP" >&6; }
4302 else
4303   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4304 $as_echo "no" >&6; }
4305 fi
4306 
4307 
4308   test -n "$CP" && break
4309 done
4310 
4311 
4312   if test "x$CP" = x; then
4313     if test "xcp" = x; then
4314       PROG_NAME=cp
4315     else
4316       PROG_NAME=cp
4317     fi
4318     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4319 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4320     as_fn_error $? "Cannot continue" "$LINENO" 5
4321   fi
4322 
4323 
4324 
4325   for ac_prog in cpio
4326 do
4327   # Extract the first word of "$ac_prog", so it can be a program name with args.
4328 set dummy $ac_prog; ac_word=$2
4329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4330 $as_echo_n "checking for $ac_word... " >&6; }
4331 if ${ac_cv_path_CPIO+:} false; then :
4332   $as_echo_n "(cached) " >&6
4333 else
4334   case $CPIO in
4335   [\\/]* | ?:[\\/]*)
4336   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4337   ;;
4338   *)
4339   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4340 for as_dir in $PATH
4341 do
4342   IFS=$as_save_IFS
4343   test -z "$as_dir" && as_dir=.
4344     for ac_exec_ext in '' $ac_executable_extensions; do
4345   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4346     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4347     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4348     break 2
4349   fi
4350 done
4351   done
4352 IFS=$as_save_IFS
4353 
4354   ;;
4355 esac
4356 fi
4357 CPIO=$ac_cv_path_CPIO
4358 if test -n "$CPIO"; then
4359   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4360 $as_echo "$CPIO" >&6; }
4361 else
4362   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4363 $as_echo "no" >&6; }
4364 fi
4365 
4366 
4367   test -n "$CPIO" && break
4368 done
4369 
4370 
4371   if test "x$CPIO" = x; then
4372     if test "xcpio" = x; then
4373       PROG_NAME=cpio
4374     else
4375       PROG_NAME=cpio
4376     fi
4377     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4378 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4379     as_fn_error $? "Cannot continue" "$LINENO" 5
4380   fi
4381 
4382 
4383 
4384   for ac_prog in cut
4385 do
4386   # Extract the first word of "$ac_prog", so it can be a program name with args.
4387 set dummy $ac_prog; ac_word=$2
4388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4389 $as_echo_n "checking for $ac_word... " >&6; }
4390 if ${ac_cv_path_CUT+:} false; then :
4391   $as_echo_n "(cached) " >&6
4392 else
4393   case $CUT in
4394   [\\/]* | ?:[\\/]*)
4395   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4396   ;;
4397   *)
4398   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4399 for as_dir in $PATH
4400 do
4401   IFS=$as_save_IFS
4402   test -z "$as_dir" && as_dir=.
4403     for ac_exec_ext in '' $ac_executable_extensions; do
4404   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4405     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4406     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4407     break 2
4408   fi
4409 done
4410   done
4411 IFS=$as_save_IFS
4412 
4413   ;;
4414 esac
4415 fi
4416 CUT=$ac_cv_path_CUT
4417 if test -n "$CUT"; then
4418   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4419 $as_echo "$CUT" >&6; }
4420 else
4421   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4422 $as_echo "no" >&6; }
4423 fi
4424 
4425 
4426   test -n "$CUT" && break
4427 done
4428 
4429 
4430   if test "x$CUT" = x; then
4431     if test "xcut" = x; then
4432       PROG_NAME=cut
4433     else
4434       PROG_NAME=cut
4435     fi
4436     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4437 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4438     as_fn_error $? "Cannot continue" "$LINENO" 5
4439   fi
4440 
4441 
4442 
4443   for ac_prog in date
4444 do
4445   # Extract the first word of "$ac_prog", so it can be a program name with args.
4446 set dummy $ac_prog; ac_word=$2
4447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4448 $as_echo_n "checking for $ac_word... " >&6; }
4449 if ${ac_cv_path_DATE+:} false; then :
4450   $as_echo_n "(cached) " >&6
4451 else
4452   case $DATE in
4453   [\\/]* | ?:[\\/]*)
4454   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4455   ;;
4456   *)
4457   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4458 for as_dir in $PATH
4459 do
4460   IFS=$as_save_IFS
4461   test -z "$as_dir" && as_dir=.
4462     for ac_exec_ext in '' $ac_executable_extensions; do
4463   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4464     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4465     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4466     break 2
4467   fi
4468 done
4469   done
4470 IFS=$as_save_IFS
4471 
4472   ;;
4473 esac
4474 fi
4475 DATE=$ac_cv_path_DATE
4476 if test -n "$DATE"; then
4477   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4478 $as_echo "$DATE" >&6; }
4479 else
4480   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4481 $as_echo "no" >&6; }
4482 fi
4483 
4484 
4485   test -n "$DATE" && break
4486 done
4487 
4488 
4489   if test "x$DATE" = x; then
4490     if test "xdate" = x; then
4491       PROG_NAME=date
4492     else
4493       PROG_NAME=date
4494     fi
4495     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4496 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4497     as_fn_error $? "Cannot continue" "$LINENO" 5
4498   fi
4499 
4500 
4501 
4502   for ac_prog in gdiff diff
4503 do
4504   # Extract the first word of "$ac_prog", so it can be a program name with args.
4505 set dummy $ac_prog; ac_word=$2
4506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4507 $as_echo_n "checking for $ac_word... " >&6; }
4508 if ${ac_cv_path_DIFF+:} false; then :
4509   $as_echo_n "(cached) " >&6
4510 else
4511   case $DIFF in
4512   [\\/]* | ?:[\\/]*)
4513   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4514   ;;
4515   *)
4516   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4517 for as_dir in $PATH
4518 do
4519   IFS=$as_save_IFS
4520   test -z "$as_dir" && as_dir=.
4521     for ac_exec_ext in '' $ac_executable_extensions; do
4522   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4523     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4524     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4525     break 2
4526   fi
4527 done
4528   done
4529 IFS=$as_save_IFS
4530 
4531   ;;
4532 esac
4533 fi
4534 DIFF=$ac_cv_path_DIFF
4535 if test -n "$DIFF"; then
4536   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4537 $as_echo "$DIFF" >&6; }
4538 else
4539   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4540 $as_echo "no" >&6; }
4541 fi
4542 
4543 
4544   test -n "$DIFF" && break
4545 done
4546 
4547 
4548   if test "x$DIFF" = x; then
4549     if test "xgdiff diff" = x; then
4550       PROG_NAME=diff
4551     else
4552       PROG_NAME=gdiff diff
4553     fi
4554     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4555 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4556     as_fn_error $? "Cannot continue" "$LINENO" 5
4557   fi
4558 
4559 
4560 
4561   for ac_prog in dirname
4562 do
4563   # Extract the first word of "$ac_prog", so it can be a program name with args.
4564 set dummy $ac_prog; ac_word=$2
4565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4566 $as_echo_n "checking for $ac_word... " >&6; }
4567 if ${ac_cv_path_DIRNAME+:} false; then :
4568   $as_echo_n "(cached) " >&6
4569 else
4570   case $DIRNAME in
4571   [\\/]* | ?:[\\/]*)
4572   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4573   ;;
4574   *)
4575   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4576 for as_dir in $PATH
4577 do
4578   IFS=$as_save_IFS
4579   test -z "$as_dir" && as_dir=.
4580     for ac_exec_ext in '' $ac_executable_extensions; do
4581   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4582     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4583     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4584     break 2
4585   fi
4586 done
4587   done
4588 IFS=$as_save_IFS
4589 
4590   ;;
4591 esac
4592 fi
4593 DIRNAME=$ac_cv_path_DIRNAME
4594 if test -n "$DIRNAME"; then
4595   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4596 $as_echo "$DIRNAME" >&6; }
4597 else
4598   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4599 $as_echo "no" >&6; }
4600 fi
4601 
4602 
4603   test -n "$DIRNAME" && break
4604 done
4605 
4606 
4607   if test "x$DIRNAME" = x; then
4608     if test "xdirname" = x; then
4609       PROG_NAME=dirname
4610     else
4611       PROG_NAME=dirname
4612     fi
4613     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4614 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4615     as_fn_error $? "Cannot continue" "$LINENO" 5
4616   fi
4617 
4618 
4619 
4620   for ac_prog in echo
4621 do
4622   # Extract the first word of "$ac_prog", so it can be a program name with args.
4623 set dummy $ac_prog; ac_word=$2
4624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4625 $as_echo_n "checking for $ac_word... " >&6; }
4626 if ${ac_cv_path_ECHO+:} false; then :
4627   $as_echo_n "(cached) " >&6
4628 else
4629   case $ECHO in
4630   [\\/]* | ?:[\\/]*)
4631   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4632   ;;
4633   *)
4634   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4635 for as_dir in $PATH
4636 do
4637   IFS=$as_save_IFS
4638   test -z "$as_dir" && as_dir=.
4639     for ac_exec_ext in '' $ac_executable_extensions; do
4640   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4641     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4642     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4643     break 2
4644   fi
4645 done
4646   done
4647 IFS=$as_save_IFS
4648 
4649   ;;
4650 esac
4651 fi
4652 ECHO=$ac_cv_path_ECHO
4653 if test -n "$ECHO"; then
4654   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4655 $as_echo "$ECHO" >&6; }
4656 else
4657   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4658 $as_echo "no" >&6; }
4659 fi
4660 
4661 
4662   test -n "$ECHO" && break
4663 done
4664 
4665 
4666   if test "x$ECHO" = x; then
4667     if test "xecho" = x; then
4668       PROG_NAME=echo
4669     else
4670       PROG_NAME=echo
4671     fi
4672     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4673 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4674     as_fn_error $? "Cannot continue" "$LINENO" 5
4675   fi
4676 
4677 
4678 
4679   for ac_prog in expr
4680 do
4681   # Extract the first word of "$ac_prog", so it can be a program name with args.
4682 set dummy $ac_prog; ac_word=$2
4683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4684 $as_echo_n "checking for $ac_word... " >&6; }
4685 if ${ac_cv_path_EXPR+:} false; then :
4686   $as_echo_n "(cached) " >&6
4687 else
4688   case $EXPR in
4689   [\\/]* | ?:[\\/]*)
4690   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4691   ;;
4692   *)
4693   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4694 for as_dir in $PATH
4695 do
4696   IFS=$as_save_IFS
4697   test -z "$as_dir" && as_dir=.
4698     for ac_exec_ext in '' $ac_executable_extensions; do
4699   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4700     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4701     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4702     break 2
4703   fi
4704 done
4705   done
4706 IFS=$as_save_IFS
4707 
4708   ;;
4709 esac
4710 fi
4711 EXPR=$ac_cv_path_EXPR
4712 if test -n "$EXPR"; then
4713   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4714 $as_echo "$EXPR" >&6; }
4715 else
4716   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4717 $as_echo "no" >&6; }
4718 fi
4719 
4720 
4721   test -n "$EXPR" && break
4722 done
4723 
4724 
4725   if test "x$EXPR" = x; then
4726     if test "xexpr" = x; then
4727       PROG_NAME=expr
4728     else
4729       PROG_NAME=expr
4730     fi
4731     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4732 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4733     as_fn_error $? "Cannot continue" "$LINENO" 5
4734   fi
4735 
4736 
4737 
4738   for ac_prog in file
4739 do
4740   # Extract the first word of "$ac_prog", so it can be a program name with args.
4741 set dummy $ac_prog; ac_word=$2
4742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4743 $as_echo_n "checking for $ac_word... " >&6; }
4744 if ${ac_cv_path_FILE+:} false; then :
4745   $as_echo_n "(cached) " >&6
4746 else
4747   case $FILE in
4748   [\\/]* | ?:[\\/]*)
4749   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4750   ;;
4751   *)
4752   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4753 for as_dir in $PATH
4754 do
4755   IFS=$as_save_IFS
4756   test -z "$as_dir" && as_dir=.
4757     for ac_exec_ext in '' $ac_executable_extensions; do
4758   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4759     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4760     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4761     break 2
4762   fi
4763 done
4764   done
4765 IFS=$as_save_IFS
4766 
4767   ;;
4768 esac
4769 fi
4770 FILE=$ac_cv_path_FILE
4771 if test -n "$FILE"; then
4772   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4773 $as_echo "$FILE" >&6; }
4774 else
4775   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4776 $as_echo "no" >&6; }
4777 fi
4778 
4779 
4780   test -n "$FILE" && break
4781 done
4782 
4783 
4784   if test "x$FILE" = x; then
4785     if test "xfile" = x; then
4786       PROG_NAME=file
4787     else
4788       PROG_NAME=file
4789     fi
4790     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4791 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4792     as_fn_error $? "Cannot continue" "$LINENO" 5
4793   fi
4794 
4795 
4796 
4797   for ac_prog in find
4798 do
4799   # Extract the first word of "$ac_prog", so it can be a program name with args.
4800 set dummy $ac_prog; ac_word=$2
4801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4802 $as_echo_n "checking for $ac_word... " >&6; }
4803 if ${ac_cv_path_FIND+:} false; then :
4804   $as_echo_n "(cached) " >&6
4805 else
4806   case $FIND in
4807   [\\/]* | ?:[\\/]*)
4808   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4809   ;;
4810   *)
4811   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4812 for as_dir in $PATH
4813 do
4814   IFS=$as_save_IFS
4815   test -z "$as_dir" && as_dir=.
4816     for ac_exec_ext in '' $ac_executable_extensions; do
4817   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4818     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4819     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4820     break 2
4821   fi
4822 done
4823   done
4824 IFS=$as_save_IFS
4825 
4826   ;;
4827 esac
4828 fi
4829 FIND=$ac_cv_path_FIND
4830 if test -n "$FIND"; then
4831   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4832 $as_echo "$FIND" >&6; }
4833 else
4834   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4835 $as_echo "no" >&6; }
4836 fi
4837 
4838 
4839   test -n "$FIND" && break
4840 done
4841 
4842 
4843   if test "x$FIND" = x; then
4844     if test "xfind" = x; then
4845       PROG_NAME=find
4846     else
4847       PROG_NAME=find
4848     fi
4849     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4850 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4851     as_fn_error $? "Cannot continue" "$LINENO" 5
4852   fi
4853 
4854 
4855 
4856   for ac_prog in head
4857 do
4858   # Extract the first word of "$ac_prog", so it can be a program name with args.
4859 set dummy $ac_prog; ac_word=$2
4860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4861 $as_echo_n "checking for $ac_word... " >&6; }
4862 if ${ac_cv_path_HEAD+:} false; then :
4863   $as_echo_n "(cached) " >&6
4864 else
4865   case $HEAD in
4866   [\\/]* | ?:[\\/]*)
4867   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4868   ;;
4869   *)
4870   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4871 for as_dir in $PATH
4872 do
4873   IFS=$as_save_IFS
4874   test -z "$as_dir" && as_dir=.
4875     for ac_exec_ext in '' $ac_executable_extensions; do
4876   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4877     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4878     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4879     break 2
4880   fi
4881 done
4882   done
4883 IFS=$as_save_IFS
4884 
4885   ;;
4886 esac
4887 fi
4888 HEAD=$ac_cv_path_HEAD
4889 if test -n "$HEAD"; then
4890   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4891 $as_echo "$HEAD" >&6; }
4892 else
4893   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4894 $as_echo "no" >&6; }
4895 fi
4896 
4897 
4898   test -n "$HEAD" && break
4899 done
4900 
4901 
4902   if test "x$HEAD" = x; then
4903     if test "xhead" = x; then
4904       PROG_NAME=head
4905     else
4906       PROG_NAME=head
4907     fi
4908     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4909 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4910     as_fn_error $? "Cannot continue" "$LINENO" 5
4911   fi
4912 
4913 
4914 
4915   for ac_prog in ln
4916 do
4917   # Extract the first word of "$ac_prog", so it can be a program name with args.
4918 set dummy $ac_prog; ac_word=$2
4919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4920 $as_echo_n "checking for $ac_word... " >&6; }
4921 if ${ac_cv_path_LN+:} false; then :
4922   $as_echo_n "(cached) " >&6
4923 else
4924   case $LN in
4925   [\\/]* | ?:[\\/]*)
4926   ac_cv_path_LN="$LN" # Let the user override the test with a path.
4927   ;;
4928   *)
4929   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4930 for as_dir in $PATH
4931 do
4932   IFS=$as_save_IFS
4933   test -z "$as_dir" && as_dir=.
4934     for ac_exec_ext in '' $ac_executable_extensions; do
4935   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4936     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4937     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4938     break 2
4939   fi
4940 done
4941   done
4942 IFS=$as_save_IFS
4943 
4944   ;;
4945 esac
4946 fi
4947 LN=$ac_cv_path_LN
4948 if test -n "$LN"; then
4949   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4950 $as_echo "$LN" >&6; }
4951 else
4952   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4953 $as_echo "no" >&6; }
4954 fi
4955 
4956 
4957   test -n "$LN" && break
4958 done
4959 
4960 
4961   if test "x$LN" = x; then
4962     if test "xln" = x; then
4963       PROG_NAME=ln
4964     else
4965       PROG_NAME=ln
4966     fi
4967     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4968 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4969     as_fn_error $? "Cannot continue" "$LINENO" 5
4970   fi
4971 
4972 
4973 
4974   for ac_prog in ls
4975 do
4976   # Extract the first word of "$ac_prog", so it can be a program name with args.
4977 set dummy $ac_prog; ac_word=$2
4978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4979 $as_echo_n "checking for $ac_word... " >&6; }
4980 if ${ac_cv_path_LS+:} false; then :
4981   $as_echo_n "(cached) " >&6
4982 else
4983   case $LS in
4984   [\\/]* | ?:[\\/]*)
4985   ac_cv_path_LS="$LS" # Let the user override the test with a path.
4986   ;;
4987   *)
4988   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4989 for as_dir in $PATH
4990 do
4991   IFS=$as_save_IFS
4992   test -z "$as_dir" && as_dir=.
4993     for ac_exec_ext in '' $ac_executable_extensions; do
4994   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4995     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4996     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4997     break 2
4998   fi
4999 done
5000   done
5001 IFS=$as_save_IFS
5002 
5003   ;;
5004 esac
5005 fi
5006 LS=$ac_cv_path_LS
5007 if test -n "$LS"; then
5008   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
5009 $as_echo "$LS" >&6; }
5010 else
5011   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5012 $as_echo "no" >&6; }
5013 fi
5014 
5015 
5016   test -n "$LS" && break
5017 done
5018 
5019 
5020   if test "x$LS" = x; then
5021     if test "xls" = x; then
5022       PROG_NAME=ls
5023     else
5024       PROG_NAME=ls
5025     fi
5026     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5027 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5028     as_fn_error $? "Cannot continue" "$LINENO" 5
5029   fi
5030 
5031 
5032 
5033   for ac_prog in mkdir
5034 do
5035   # Extract the first word of "$ac_prog", so it can be a program name with args.
5036 set dummy $ac_prog; ac_word=$2
5037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5038 $as_echo_n "checking for $ac_word... " >&6; }
5039 if ${ac_cv_path_MKDIR+:} false; then :
5040   $as_echo_n "(cached) " >&6
5041 else
5042   case $MKDIR in
5043   [\\/]* | ?:[\\/]*)
5044   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
5045   ;;
5046   *)
5047   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5048 for as_dir in $PATH
5049 do
5050   IFS=$as_save_IFS
5051   test -z "$as_dir" && as_dir=.
5052     for ac_exec_ext in '' $ac_executable_extensions; do
5053   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5054     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
5055     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5056     break 2
5057   fi
5058 done
5059   done
5060 IFS=$as_save_IFS
5061 
5062   ;;
5063 esac
5064 fi
5065 MKDIR=$ac_cv_path_MKDIR
5066 if test -n "$MKDIR"; then
5067   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
5068 $as_echo "$MKDIR" >&6; }
5069 else
5070   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5071 $as_echo "no" >&6; }
5072 fi
5073 
5074 
5075   test -n "$MKDIR" && break
5076 done
5077 
5078 
5079   if test "x$MKDIR" = x; then
5080     if test "xmkdir" = x; then
5081       PROG_NAME=mkdir
5082     else
5083       PROG_NAME=mkdir
5084     fi
5085     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5086 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5087     as_fn_error $? "Cannot continue" "$LINENO" 5
5088   fi
5089 
5090 
5091 
5092   for ac_prog in mktemp
5093 do
5094   # Extract the first word of "$ac_prog", so it can be a program name with args.
5095 set dummy $ac_prog; ac_word=$2
5096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5097 $as_echo_n "checking for $ac_word... " >&6; }
5098 if ${ac_cv_path_MKTEMP+:} false; then :
5099   $as_echo_n "(cached) " >&6
5100 else
5101   case $MKTEMP in
5102   [\\/]* | ?:[\\/]*)
5103   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
5104   ;;
5105   *)
5106   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5107 for as_dir in $PATH
5108 do
5109   IFS=$as_save_IFS
5110   test -z "$as_dir" && as_dir=.
5111     for ac_exec_ext in '' $ac_executable_extensions; do
5112   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5113     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
5114     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5115     break 2
5116   fi
5117 done
5118   done
5119 IFS=$as_save_IFS
5120 
5121   ;;
5122 esac
5123 fi
5124 MKTEMP=$ac_cv_path_MKTEMP
5125 if test -n "$MKTEMP"; then
5126   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5127 $as_echo "$MKTEMP" >&6; }
5128 else
5129   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5130 $as_echo "no" >&6; }
5131 fi
5132 
5133 
5134   test -n "$MKTEMP" && break
5135 done
5136 
5137 
5138   if test "x$MKTEMP" = x; then
5139     if test "xmktemp" = x; then
5140       PROG_NAME=mktemp
5141     else
5142       PROG_NAME=mktemp
5143     fi
5144     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5145 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5146     as_fn_error $? "Cannot continue" "$LINENO" 5
5147   fi
5148 
5149 
5150 
5151   for ac_prog in mv
5152 do
5153   # Extract the first word of "$ac_prog", so it can be a program name with args.
5154 set dummy $ac_prog; ac_word=$2
5155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5156 $as_echo_n "checking for $ac_word... " >&6; }
5157 if ${ac_cv_path_MV+:} false; then :
5158   $as_echo_n "(cached) " >&6
5159 else
5160   case $MV in
5161   [\\/]* | ?:[\\/]*)
5162   ac_cv_path_MV="$MV" # Let the user override the test with a path.
5163   ;;
5164   *)
5165   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5166 for as_dir in $PATH
5167 do
5168   IFS=$as_save_IFS
5169   test -z "$as_dir" && as_dir=.
5170     for ac_exec_ext in '' $ac_executable_extensions; do
5171   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5172     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5173     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5174     break 2
5175   fi
5176 done
5177   done
5178 IFS=$as_save_IFS
5179 
5180   ;;
5181 esac
5182 fi
5183 MV=$ac_cv_path_MV
5184 if test -n "$MV"; then
5185   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5186 $as_echo "$MV" >&6; }
5187 else
5188   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5189 $as_echo "no" >&6; }
5190 fi
5191 
5192 
5193   test -n "$MV" && break
5194 done
5195 
5196 
5197   if test "x$MV" = x; then
5198     if test "xmv" = x; then
5199       PROG_NAME=mv
5200     else
5201       PROG_NAME=mv
5202     fi
5203     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5204 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5205     as_fn_error $? "Cannot continue" "$LINENO" 5
5206   fi
5207 
5208 
5209 
5210   for ac_prog in printf
5211 do
5212   # Extract the first word of "$ac_prog", so it can be a program name with args.
5213 set dummy $ac_prog; ac_word=$2
5214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5215 $as_echo_n "checking for $ac_word... " >&6; }
5216 if ${ac_cv_path_PRINTF+:} false; then :
5217   $as_echo_n "(cached) " >&6
5218 else
5219   case $PRINTF in
5220   [\\/]* | ?:[\\/]*)
5221   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5222   ;;
5223   *)
5224   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5225 for as_dir in $PATH
5226 do
5227   IFS=$as_save_IFS
5228   test -z "$as_dir" && as_dir=.
5229     for ac_exec_ext in '' $ac_executable_extensions; do
5230   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5231     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5232     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5233     break 2
5234   fi
5235 done
5236   done
5237 IFS=$as_save_IFS
5238 
5239   ;;
5240 esac
5241 fi
5242 PRINTF=$ac_cv_path_PRINTF
5243 if test -n "$PRINTF"; then
5244   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5245 $as_echo "$PRINTF" >&6; }
5246 else
5247   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5248 $as_echo "no" >&6; }
5249 fi
5250 
5251 
5252   test -n "$PRINTF" && break
5253 done
5254 
5255 
5256   if test "x$PRINTF" = x; then
5257     if test "xprintf" = x; then
5258       PROG_NAME=printf
5259     else
5260       PROG_NAME=printf
5261     fi
5262     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5263 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5264     as_fn_error $? "Cannot continue" "$LINENO" 5
5265   fi
5266 
5267 
5268 
5269   for ac_prog in rm
5270 do
5271   # Extract the first word of "$ac_prog", so it can be a program name with args.
5272 set dummy $ac_prog; ac_word=$2
5273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5274 $as_echo_n "checking for $ac_word... " >&6; }
5275 if ${ac_cv_path_RM+:} false; then :
5276   $as_echo_n "(cached) " >&6
5277 else
5278   case $RM in
5279   [\\/]* | ?:[\\/]*)
5280   ac_cv_path_RM="$RM" # Let the user override the test with a path.
5281   ;;
5282   *)
5283   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5284 for as_dir in $PATH
5285 do
5286   IFS=$as_save_IFS
5287   test -z "$as_dir" && as_dir=.
5288     for ac_exec_ext in '' $ac_executable_extensions; do
5289   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5290     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5291     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5292     break 2
5293   fi
5294 done
5295   done
5296 IFS=$as_save_IFS
5297 
5298   ;;
5299 esac
5300 fi
5301 RM=$ac_cv_path_RM
5302 if test -n "$RM"; then
5303   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5304 $as_echo "$RM" >&6; }
5305 else
5306   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5307 $as_echo "no" >&6; }
5308 fi
5309 
5310 
5311   test -n "$RM" && break
5312 done
5313 
5314 
5315   if test "x$RM" = x; then
5316     if test "xrm" = x; then
5317       PROG_NAME=rm
5318     else
5319       PROG_NAME=rm
5320     fi
5321     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5322 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5323     as_fn_error $? "Cannot continue" "$LINENO" 5
5324   fi
5325 
5326 
5327 
5328   for ac_prog in sh
5329 do
5330   # Extract the first word of "$ac_prog", so it can be a program name with args.
5331 set dummy $ac_prog; ac_word=$2
5332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5333 $as_echo_n "checking for $ac_word... " >&6; }
5334 if ${ac_cv_path_SH+:} false; then :
5335   $as_echo_n "(cached) " >&6
5336 else
5337   case $SH in
5338   [\\/]* | ?:[\\/]*)
5339   ac_cv_path_SH="$SH" # Let the user override the test with a path.
5340   ;;
5341   *)
5342   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5343 for as_dir in $PATH
5344 do
5345   IFS=$as_save_IFS
5346   test -z "$as_dir" && as_dir=.
5347     for ac_exec_ext in '' $ac_executable_extensions; do
5348   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5349     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5350     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5351     break 2
5352   fi
5353 done
5354   done
5355 IFS=$as_save_IFS
5356 
5357   ;;
5358 esac
5359 fi
5360 SH=$ac_cv_path_SH
5361 if test -n "$SH"; then
5362   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5363 $as_echo "$SH" >&6; }
5364 else
5365   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5366 $as_echo "no" >&6; }
5367 fi
5368 
5369 
5370   test -n "$SH" && break
5371 done
5372 
5373 
5374   if test "x$SH" = x; then
5375     if test "xsh" = x; then
5376       PROG_NAME=sh
5377     else
5378       PROG_NAME=sh
5379     fi
5380     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5381 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5382     as_fn_error $? "Cannot continue" "$LINENO" 5
5383   fi
5384 
5385 
5386 
5387   for ac_prog in sort
5388 do
5389   # Extract the first word of "$ac_prog", so it can be a program name with args.
5390 set dummy $ac_prog; ac_word=$2
5391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5392 $as_echo_n "checking for $ac_word... " >&6; }
5393 if ${ac_cv_path_SORT+:} false; then :
5394   $as_echo_n "(cached) " >&6
5395 else
5396   case $SORT in
5397   [\\/]* | ?:[\\/]*)
5398   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5399   ;;
5400   *)
5401   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5402 for as_dir in $PATH
5403 do
5404   IFS=$as_save_IFS
5405   test -z "$as_dir" && as_dir=.
5406     for ac_exec_ext in '' $ac_executable_extensions; do
5407   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5408     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5409     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5410     break 2
5411   fi
5412 done
5413   done
5414 IFS=$as_save_IFS
5415 
5416   ;;
5417 esac
5418 fi
5419 SORT=$ac_cv_path_SORT
5420 if test -n "$SORT"; then
5421   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5422 $as_echo "$SORT" >&6; }
5423 else
5424   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5425 $as_echo "no" >&6; }
5426 fi
5427 
5428 
5429   test -n "$SORT" && break
5430 done
5431 
5432 
5433   if test "x$SORT" = x; then
5434     if test "xsort" = x; then
5435       PROG_NAME=sort
5436     else
5437       PROG_NAME=sort
5438     fi
5439     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5440 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5441     as_fn_error $? "Cannot continue" "$LINENO" 5
5442   fi
5443 
5444 
5445 
5446   for ac_prog in tail
5447 do
5448   # Extract the first word of "$ac_prog", so it can be a program name with args.
5449 set dummy $ac_prog; ac_word=$2
5450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5451 $as_echo_n "checking for $ac_word... " >&6; }
5452 if ${ac_cv_path_TAIL+:} false; then :
5453   $as_echo_n "(cached) " >&6
5454 else
5455   case $TAIL in
5456   [\\/]* | ?:[\\/]*)
5457   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5458   ;;
5459   *)
5460   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5461 for as_dir in $PATH
5462 do
5463   IFS=$as_save_IFS
5464   test -z "$as_dir" && as_dir=.
5465     for ac_exec_ext in '' $ac_executable_extensions; do
5466   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5467     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5468     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5469     break 2
5470   fi
5471 done
5472   done
5473 IFS=$as_save_IFS
5474 
5475   ;;
5476 esac
5477 fi
5478 TAIL=$ac_cv_path_TAIL
5479 if test -n "$TAIL"; then
5480   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5481 $as_echo "$TAIL" >&6; }
5482 else
5483   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5484 $as_echo "no" >&6; }
5485 fi
5486 
5487 
5488   test -n "$TAIL" && break
5489 done
5490 
5491 
5492   if test "x$TAIL" = x; then
5493     if test "xtail" = x; then
5494       PROG_NAME=tail
5495     else
5496       PROG_NAME=tail
5497     fi
5498     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5499 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5500     as_fn_error $? "Cannot continue" "$LINENO" 5
5501   fi
5502 
5503 
5504 
5505   for ac_prog in tar
5506 do
5507   # Extract the first word of "$ac_prog", so it can be a program name with args.
5508 set dummy $ac_prog; ac_word=$2
5509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5510 $as_echo_n "checking for $ac_word... " >&6; }
5511 if ${ac_cv_path_TAR+:} false; then :
5512   $as_echo_n "(cached) " >&6
5513 else
5514   case $TAR in
5515   [\\/]* | ?:[\\/]*)
5516   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5517   ;;
5518   *)
5519   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5520 for as_dir in $PATH
5521 do
5522   IFS=$as_save_IFS
5523   test -z "$as_dir" && as_dir=.
5524     for ac_exec_ext in '' $ac_executable_extensions; do
5525   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5526     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5527     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5528     break 2
5529   fi
5530 done
5531   done
5532 IFS=$as_save_IFS
5533 
5534   ;;
5535 esac
5536 fi
5537 TAR=$ac_cv_path_TAR
5538 if test -n "$TAR"; then
5539   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5540 $as_echo "$TAR" >&6; }
5541 else
5542   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5543 $as_echo "no" >&6; }
5544 fi
5545 
5546 
5547   test -n "$TAR" && break
5548 done
5549 
5550 
5551   if test "x$TAR" = x; then
5552     if test "xtar" = x; then
5553       PROG_NAME=tar
5554     else
5555       PROG_NAME=tar
5556     fi
5557     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5558 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5559     as_fn_error $? "Cannot continue" "$LINENO" 5
5560   fi
5561 
5562 
5563 
5564   for ac_prog in tee
5565 do
5566   # Extract the first word of "$ac_prog", so it can be a program name with args.
5567 set dummy $ac_prog; ac_word=$2
5568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5569 $as_echo_n "checking for $ac_word... " >&6; }
5570 if ${ac_cv_path_TEE+:} false; then :
5571   $as_echo_n "(cached) " >&6
5572 else
5573   case $TEE in
5574   [\\/]* | ?:[\\/]*)
5575   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5576   ;;
5577   *)
5578   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5579 for as_dir in $PATH
5580 do
5581   IFS=$as_save_IFS
5582   test -z "$as_dir" && as_dir=.
5583     for ac_exec_ext in '' $ac_executable_extensions; do
5584   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5585     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5586     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5587     break 2
5588   fi
5589 done
5590   done
5591 IFS=$as_save_IFS
5592 
5593   ;;
5594 esac
5595 fi
5596 TEE=$ac_cv_path_TEE
5597 if test -n "$TEE"; then
5598   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5599 $as_echo "$TEE" >&6; }
5600 else
5601   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5602 $as_echo "no" >&6; }
5603 fi
5604 
5605 
5606   test -n "$TEE" && break
5607 done
5608 
5609 
5610   if test "x$TEE" = x; then
5611     if test "xtee" = x; then
5612       PROG_NAME=tee
5613     else
5614       PROG_NAME=tee
5615     fi
5616     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5617 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5618     as_fn_error $? "Cannot continue" "$LINENO" 5
5619   fi
5620 
5621 
5622 
5623   for ac_prog in touch
5624 do
5625   # Extract the first word of "$ac_prog", so it can be a program name with args.
5626 set dummy $ac_prog; ac_word=$2
5627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5628 $as_echo_n "checking for $ac_word... " >&6; }
5629 if ${ac_cv_path_TOUCH+:} false; then :
5630   $as_echo_n "(cached) " >&6
5631 else
5632   case $TOUCH in
5633   [\\/]* | ?:[\\/]*)
5634   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5635   ;;
5636   *)
5637   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5638 for as_dir in $PATH
5639 do
5640   IFS=$as_save_IFS
5641   test -z "$as_dir" && as_dir=.
5642     for ac_exec_ext in '' $ac_executable_extensions; do
5643   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5644     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5645     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5646     break 2
5647   fi
5648 done
5649   done
5650 IFS=$as_save_IFS
5651 
5652   ;;
5653 esac
5654 fi
5655 TOUCH=$ac_cv_path_TOUCH
5656 if test -n "$TOUCH"; then
5657   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5658 $as_echo "$TOUCH" >&6; }
5659 else
5660   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5661 $as_echo "no" >&6; }
5662 fi
5663 
5664 
5665   test -n "$TOUCH" && break
5666 done
5667 
5668 
5669   if test "x$TOUCH" = x; then
5670     if test "xtouch" = x; then
5671       PROG_NAME=touch
5672     else
5673       PROG_NAME=touch
5674     fi
5675     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5676 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5677     as_fn_error $? "Cannot continue" "$LINENO" 5
5678   fi
5679 
5680 
5681 
5682   for ac_prog in tr
5683 do
5684   # Extract the first word of "$ac_prog", so it can be a program name with args.
5685 set dummy $ac_prog; ac_word=$2
5686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5687 $as_echo_n "checking for $ac_word... " >&6; }
5688 if ${ac_cv_path_TR+:} false; then :
5689   $as_echo_n "(cached) " >&6
5690 else
5691   case $TR in
5692   [\\/]* | ?:[\\/]*)
5693   ac_cv_path_TR="$TR" # Let the user override the test with a path.
5694   ;;
5695   *)
5696   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5697 for as_dir in $PATH
5698 do
5699   IFS=$as_save_IFS
5700   test -z "$as_dir" && as_dir=.
5701     for ac_exec_ext in '' $ac_executable_extensions; do
5702   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5703     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5704     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5705     break 2
5706   fi
5707 done
5708   done
5709 IFS=$as_save_IFS
5710 
5711   ;;
5712 esac
5713 fi
5714 TR=$ac_cv_path_TR
5715 if test -n "$TR"; then
5716   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5717 $as_echo "$TR" >&6; }
5718 else
5719   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5720 $as_echo "no" >&6; }
5721 fi
5722 
5723 
5724   test -n "$TR" && break
5725 done
5726 
5727 
5728   if test "x$TR" = x; then
5729     if test "xtr" = x; then
5730       PROG_NAME=tr
5731     else
5732       PROG_NAME=tr
5733     fi
5734     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5735 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5736     as_fn_error $? "Cannot continue" "$LINENO" 5
5737   fi
5738 
5739 
5740 
5741   for ac_prog in uname
5742 do
5743   # Extract the first word of "$ac_prog", so it can be a program name with args.
5744 set dummy $ac_prog; ac_word=$2
5745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5746 $as_echo_n "checking for $ac_word... " >&6; }
5747 if ${ac_cv_path_UNAME+:} false; then :
5748   $as_echo_n "(cached) " >&6
5749 else
5750   case $UNAME in
5751   [\\/]* | ?:[\\/]*)
5752   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5753   ;;
5754   *)
5755   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5756 for as_dir in $PATH
5757 do
5758   IFS=$as_save_IFS
5759   test -z "$as_dir" && as_dir=.
5760     for ac_exec_ext in '' $ac_executable_extensions; do
5761   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5762     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5763     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5764     break 2
5765   fi
5766 done
5767   done
5768 IFS=$as_save_IFS
5769 
5770   ;;
5771 esac
5772 fi
5773 UNAME=$ac_cv_path_UNAME
5774 if test -n "$UNAME"; then
5775   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5776 $as_echo "$UNAME" >&6; }
5777 else
5778   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5779 $as_echo "no" >&6; }
5780 fi
5781 
5782 
5783   test -n "$UNAME" && break
5784 done
5785 
5786 
5787   if test "x$UNAME" = x; then
5788     if test "xuname" = x; then
5789       PROG_NAME=uname
5790     else
5791       PROG_NAME=uname
5792     fi
5793     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5794 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5795     as_fn_error $? "Cannot continue" "$LINENO" 5
5796   fi
5797 
5798 
5799 
5800   for ac_prog in uniq
5801 do
5802   # Extract the first word of "$ac_prog", so it can be a program name with args.
5803 set dummy $ac_prog; ac_word=$2
5804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5805 $as_echo_n "checking for $ac_word... " >&6; }
5806 if ${ac_cv_path_UNIQ+:} false; then :
5807   $as_echo_n "(cached) " >&6
5808 else
5809   case $UNIQ in
5810   [\\/]* | ?:[\\/]*)
5811   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5812   ;;
5813   *)
5814   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5815 for as_dir in $PATH
5816 do
5817   IFS=$as_save_IFS
5818   test -z "$as_dir" && as_dir=.
5819     for ac_exec_ext in '' $ac_executable_extensions; do
5820   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5821     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5822     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5823     break 2
5824   fi
5825 done
5826   done
5827 IFS=$as_save_IFS
5828 
5829   ;;
5830 esac
5831 fi
5832 UNIQ=$ac_cv_path_UNIQ
5833 if test -n "$UNIQ"; then
5834   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5835 $as_echo "$UNIQ" >&6; }
5836 else
5837   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5838 $as_echo "no" >&6; }
5839 fi
5840 
5841 
5842   test -n "$UNIQ" && break
5843 done
5844 
5845 
5846   if test "x$UNIQ" = x; then
5847     if test "xuniq" = x; then
5848       PROG_NAME=uniq
5849     else
5850       PROG_NAME=uniq
5851     fi
5852     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5853 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5854     as_fn_error $? "Cannot continue" "$LINENO" 5
5855   fi
5856 
5857 
5858 
5859   for ac_prog in wc
5860 do
5861   # Extract the first word of "$ac_prog", so it can be a program name with args.
5862 set dummy $ac_prog; ac_word=$2
5863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5864 $as_echo_n "checking for $ac_word... " >&6; }
5865 if ${ac_cv_path_WC+:} false; then :
5866   $as_echo_n "(cached) " >&6
5867 else
5868   case $WC in
5869   [\\/]* | ?:[\\/]*)
5870   ac_cv_path_WC="$WC" # Let the user override the test with a path.
5871   ;;
5872   *)
5873   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5874 for as_dir in $PATH
5875 do
5876   IFS=$as_save_IFS
5877   test -z "$as_dir" && as_dir=.
5878     for ac_exec_ext in '' $ac_executable_extensions; do
5879   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5880     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5881     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5882     break 2
5883   fi
5884 done
5885   done
5886 IFS=$as_save_IFS
5887 
5888   ;;
5889 esac
5890 fi
5891 WC=$ac_cv_path_WC
5892 if test -n "$WC"; then
5893   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5894 $as_echo "$WC" >&6; }
5895 else
5896   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5897 $as_echo "no" >&6; }
5898 fi
5899 
5900 
5901   test -n "$WC" && break
5902 done
5903 
5904 
5905   if test "x$WC" = x; then
5906     if test "xwc" = x; then
5907       PROG_NAME=wc
5908     else
5909       PROG_NAME=wc
5910     fi
5911     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5912 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5913     as_fn_error $? "Cannot continue" "$LINENO" 5
5914   fi
5915 
5916 
5917 
5918   for ac_prog in which
5919 do
5920   # Extract the first word of "$ac_prog", so it can be a program name with args.
5921 set dummy $ac_prog; ac_word=$2
5922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5923 $as_echo_n "checking for $ac_word... " >&6; }
5924 if ${ac_cv_path_WHICH+:} false; then :
5925   $as_echo_n "(cached) " >&6
5926 else
5927   case $WHICH in
5928   [\\/]* | ?:[\\/]*)
5929   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5930   ;;
5931   *)
5932   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5933 for as_dir in $PATH
5934 do
5935   IFS=$as_save_IFS
5936   test -z "$as_dir" && as_dir=.
5937     for ac_exec_ext in '' $ac_executable_extensions; do
5938   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5939     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5940     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5941     break 2
5942   fi
5943 done
5944   done
5945 IFS=$as_save_IFS
5946 
5947   ;;
5948 esac
5949 fi
5950 WHICH=$ac_cv_path_WHICH
5951 if test -n "$WHICH"; then
5952   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5953 $as_echo "$WHICH" >&6; }
5954 else
5955   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5956 $as_echo "no" >&6; }
5957 fi
5958 
5959 
5960   test -n "$WHICH" && break
5961 done
5962 
5963 
5964   if test "x$WHICH" = x; then
5965     if test "xwhich" = x; then
5966       PROG_NAME=which
5967     else
5968       PROG_NAME=which
5969     fi
5970     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5971 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5972     as_fn_error $? "Cannot continue" "$LINENO" 5
5973   fi
5974 
5975 
5976 
5977   for ac_prog in xargs
5978 do
5979   # Extract the first word of "$ac_prog", so it can be a program name with args.
5980 set dummy $ac_prog; ac_word=$2
5981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5982 $as_echo_n "checking for $ac_word... " >&6; }
5983 if ${ac_cv_path_XARGS+:} false; then :
5984   $as_echo_n "(cached) " >&6
5985 else
5986   case $XARGS in
5987   [\\/]* | ?:[\\/]*)
5988   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5989   ;;
5990   *)
5991   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5992 for as_dir in $PATH
5993 do
5994   IFS=$as_save_IFS
5995   test -z "$as_dir" && as_dir=.
5996     for ac_exec_ext in '' $ac_executable_extensions; do
5997   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5998     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5999     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6000     break 2
6001   fi
6002 done
6003   done
6004 IFS=$as_save_IFS
6005 
6006   ;;
6007 esac
6008 fi
6009 XARGS=$ac_cv_path_XARGS
6010 if test -n "$XARGS"; then
6011   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
6012 $as_echo "$XARGS" >&6; }
6013 else
6014   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6015 $as_echo "no" >&6; }
6016 fi
6017 
6018 
6019   test -n "$XARGS" && break
6020 done
6021 
6022 
6023   if test "x$XARGS" = x; then
6024     if test "xxargs" = x; then
6025       PROG_NAME=xargs
6026     else
6027       PROG_NAME=xargs
6028     fi
6029     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6030 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6031     as_fn_error $? "Cannot continue" "$LINENO" 5
6032   fi
6033 
6034 
6035 
6036   # Then required tools that require some special treatment.
6037   for ac_prog in gawk mawk nawk awk
6038 do
6039   # Extract the first word of "$ac_prog", so it can be a program name with args.
6040 set dummy $ac_prog; ac_word=$2
6041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6042 $as_echo_n "checking for $ac_word... " >&6; }
6043 if ${ac_cv_prog_AWK+:} false; then :
6044   $as_echo_n "(cached) " >&6
6045 else
6046   if test -n "$AWK"; then
6047   ac_cv_prog_AWK="$AWK" # Let the user override the test.
6048 else
6049 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6050 for as_dir in $PATH
6051 do
6052   IFS=$as_save_IFS
6053   test -z "$as_dir" && as_dir=.
6054     for ac_exec_ext in '' $ac_executable_extensions; do
6055   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6056     ac_cv_prog_AWK="$ac_prog"
6057     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6058     break 2
6059   fi
6060 done
6061   done
6062 IFS=$as_save_IFS
6063 
6064 fi
6065 fi
6066 AWK=$ac_cv_prog_AWK
6067 if test -n "$AWK"; then
6068   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6069 $as_echo "$AWK" >&6; }
6070 else
6071   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6072 $as_echo "no" >&6; }
6073 fi
6074 
6075 
6076   test -n "$AWK" && break
6077 done
6078 
6079 
6080   if test "x$AWK" = x; then
6081     if test "x" = x; then
6082       PROG_NAME=awk
6083     else
6084       PROG_NAME=
6085     fi
6086     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6087 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6088     as_fn_error $? "Cannot continue" "$LINENO" 5
6089   fi
6090 
6091   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6092 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6093 if ${ac_cv_path_GREP+:} false; then :
6094   $as_echo_n "(cached) " >&6
6095 else
6096   if test -z "$GREP"; then
6097   ac_path_GREP_found=false
6098   # Loop through the user's path and test for each of PROGNAME-LIST
6099   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6100 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6101 do
6102   IFS=$as_save_IFS
6103   test -z "$as_dir" && as_dir=.
6104     for ac_prog in grep ggrep; do
6105     for ac_exec_ext in '' $ac_executable_extensions; do
6106       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6107       as_fn_executable_p "$ac_path_GREP" || continue
6108 # Check for GNU ac_path_GREP and select it if it is found.
6109   # Check for GNU $ac_path_GREP
6110 case `"$ac_path_GREP" --version 2>&1` in
6111 *GNU*)
6112   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6113 *)
6114   ac_count=0
6115   $as_echo_n 0123456789 >"conftest.in"
6116   while :
6117   do
6118     cat "conftest.in" "conftest.in" >"conftest.tmp"
6119     mv "conftest.tmp" "conftest.in"
6120     cp "conftest.in" "conftest.nl"
6121     $as_echo 'GREP' >> "conftest.nl"
6122     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6123     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6124     as_fn_arith $ac_count + 1 && ac_count=$as_val
6125     if test $ac_count -gt ${ac_path_GREP_max-0}; then
6126       # Best one so far, save it but keep looking for a better one
6127       ac_cv_path_GREP="$ac_path_GREP"
6128       ac_path_GREP_max=$ac_count
6129     fi
6130     # 10*(2^10) chars as input seems more than enough
6131     test $ac_count -gt 10 && break
6132   done
6133   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6134 esac
6135 
6136       $ac_path_GREP_found && break 3
6137     done
6138   done
6139   done
6140 IFS=$as_save_IFS
6141   if test -z "$ac_cv_path_GREP"; then
6142     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6143   fi
6144 else
6145   ac_cv_path_GREP=$GREP
6146 fi
6147 
6148 fi
6149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6150 $as_echo "$ac_cv_path_GREP" >&6; }
6151  GREP="$ac_cv_path_GREP"
6152 
6153 
6154 
6155   if test "x$GREP" = x; then
6156     if test "x" = x; then
6157       PROG_NAME=grep
6158     else
6159       PROG_NAME=
6160     fi
6161     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6162 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6163     as_fn_error $? "Cannot continue" "$LINENO" 5
6164   fi
6165 
6166   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6167 $as_echo_n "checking for egrep... " >&6; }
6168 if ${ac_cv_path_EGREP+:} false; then :
6169   $as_echo_n "(cached) " >&6
6170 else
6171   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6172    then ac_cv_path_EGREP="$GREP -E"
6173    else
6174      if test -z "$EGREP"; then
6175   ac_path_EGREP_found=false
6176   # Loop through the user's path and test for each of PROGNAME-LIST
6177   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6178 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6179 do
6180   IFS=$as_save_IFS
6181   test -z "$as_dir" && as_dir=.
6182     for ac_prog in egrep; do
6183     for ac_exec_ext in '' $ac_executable_extensions; do
6184       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6185       as_fn_executable_p "$ac_path_EGREP" || continue
6186 # Check for GNU ac_path_EGREP and select it if it is found.
6187   # Check for GNU $ac_path_EGREP
6188 case `"$ac_path_EGREP" --version 2>&1` in
6189 *GNU*)
6190   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6191 *)
6192   ac_count=0
6193   $as_echo_n 0123456789 >"conftest.in"
6194   while :
6195   do
6196     cat "conftest.in" "conftest.in" >"conftest.tmp"
6197     mv "conftest.tmp" "conftest.in"
6198     cp "conftest.in" "conftest.nl"
6199     $as_echo 'EGREP' >> "conftest.nl"
6200     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6201     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6202     as_fn_arith $ac_count + 1 && ac_count=$as_val
6203     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6204       # Best one so far, save it but keep looking for a better one
6205       ac_cv_path_EGREP="$ac_path_EGREP"
6206       ac_path_EGREP_max=$ac_count
6207     fi
6208     # 10*(2^10) chars as input seems more than enough
6209     test $ac_count -gt 10 && break
6210   done
6211   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6212 esac
6213 
6214       $ac_path_EGREP_found && break 3
6215     done
6216   done
6217   done
6218 IFS=$as_save_IFS
6219   if test -z "$ac_cv_path_EGREP"; then
6220     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6221   fi
6222 else
6223   ac_cv_path_EGREP=$EGREP
6224 fi
6225 
6226    fi
6227 fi
6228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6229 $as_echo "$ac_cv_path_EGREP" >&6; }
6230  EGREP="$ac_cv_path_EGREP"
6231 
6232 
6233 
6234   if test "x$EGREP" = x; then
6235     if test "x" = x; then
6236       PROG_NAME=egrep
6237     else
6238       PROG_NAME=
6239     fi
6240     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6241 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6242     as_fn_error $? "Cannot continue" "$LINENO" 5
6243   fi
6244 
6245   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6246 $as_echo_n "checking for fgrep... " >&6; }
6247 if ${ac_cv_path_FGREP+:} false; then :
6248   $as_echo_n "(cached) " >&6
6249 else
6250   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6251    then ac_cv_path_FGREP="$GREP -F"
6252    else
6253      if test -z "$FGREP"; then
6254   ac_path_FGREP_found=false
6255   # Loop through the user's path and test for each of PROGNAME-LIST
6256   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6257 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6258 do
6259   IFS=$as_save_IFS
6260   test -z "$as_dir" && as_dir=.
6261     for ac_prog in fgrep; do
6262     for ac_exec_ext in '' $ac_executable_extensions; do
6263       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6264       as_fn_executable_p "$ac_path_FGREP" || continue
6265 # Check for GNU ac_path_FGREP and select it if it is found.
6266   # Check for GNU $ac_path_FGREP
6267 case `"$ac_path_FGREP" --version 2>&1` in
6268 *GNU*)
6269   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6270 *)
6271   ac_count=0
6272   $as_echo_n 0123456789 >"conftest.in"
6273   while :
6274   do
6275     cat "conftest.in" "conftest.in" >"conftest.tmp"
6276     mv "conftest.tmp" "conftest.in"
6277     cp "conftest.in" "conftest.nl"
6278     $as_echo 'FGREP' >> "conftest.nl"
6279     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6280     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6281     as_fn_arith $ac_count + 1 && ac_count=$as_val
6282     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6283       # Best one so far, save it but keep looking for a better one
6284       ac_cv_path_FGREP="$ac_path_FGREP"
6285       ac_path_FGREP_max=$ac_count
6286     fi
6287     # 10*(2^10) chars as input seems more than enough
6288     test $ac_count -gt 10 && break
6289   done
6290   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6291 esac
6292 
6293       $ac_path_FGREP_found && break 3
6294     done
6295   done
6296   done
6297 IFS=$as_save_IFS
6298   if test -z "$ac_cv_path_FGREP"; then
6299     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6300   fi
6301 else
6302   ac_cv_path_FGREP=$FGREP
6303 fi
6304 
6305    fi
6306 fi
6307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6308 $as_echo "$ac_cv_path_FGREP" >&6; }
6309  FGREP="$ac_cv_path_FGREP"
6310 
6311 
6312 
6313   if test "x$FGREP" = x; then
6314     if test "x" = x; then
6315       PROG_NAME=fgrep
6316     else
6317       PROG_NAME=
6318     fi
6319     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6320 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6321     as_fn_error $? "Cannot continue" "$LINENO" 5
6322   fi
6323 
6324   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6325 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
6326 if ${ac_cv_path_SED+:} false; then :
6327   $as_echo_n "(cached) " >&6
6328 else
6329             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6330      for ac_i in 1 2 3 4 5 6 7; do
6331        ac_script="$ac_script$as_nl$ac_script"
6332      done
6333      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6334      { ac_script=; unset ac_script;}
6335      if test -z "$SED"; then
6336   ac_path_SED_found=false
6337   # Loop through the user's path and test for each of PROGNAME-LIST
6338   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6339 for as_dir in $PATH
6340 do
6341   IFS=$as_save_IFS
6342   test -z "$as_dir" && as_dir=.
6343     for ac_prog in sed gsed; do
6344     for ac_exec_ext in '' $ac_executable_extensions; do
6345       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6346       as_fn_executable_p "$ac_path_SED" || continue
6347 # Check for GNU ac_path_SED and select it if it is found.
6348   # Check for GNU $ac_path_SED
6349 case `"$ac_path_SED" --version 2>&1` in
6350 *GNU*)
6351   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6352 *)
6353   ac_count=0
6354   $as_echo_n 0123456789 >"conftest.in"
6355   while :
6356   do
6357     cat "conftest.in" "conftest.in" >"conftest.tmp"
6358     mv "conftest.tmp" "conftest.in"
6359     cp "conftest.in" "conftest.nl"
6360     $as_echo '' >> "conftest.nl"
6361     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6362     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6363     as_fn_arith $ac_count + 1 && ac_count=$as_val
6364     if test $ac_count -gt ${ac_path_SED_max-0}; then
6365       # Best one so far, save it but keep looking for a better one
6366       ac_cv_path_SED="$ac_path_SED"
6367       ac_path_SED_max=$ac_count
6368     fi
6369     # 10*(2^10) chars as input seems more than enough
6370     test $ac_count -gt 10 && break
6371   done
6372   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6373 esac
6374 
6375       $ac_path_SED_found && break 3
6376     done
6377   done
6378   done
6379 IFS=$as_save_IFS
6380   if test -z "$ac_cv_path_SED"; then
6381     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6382   fi
6383 else
6384   ac_cv_path_SED=$SED
6385 fi
6386 
6387 fi
6388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6389 $as_echo "$ac_cv_path_SED" >&6; }
6390  SED="$ac_cv_path_SED"
6391   rm -f conftest.sed
6392 
6393 
6394   if test "x$SED" = x; then
6395     if test "x" = x; then
6396       PROG_NAME=sed
6397     else
6398       PROG_NAME=
6399     fi
6400     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6401 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6402     as_fn_error $? "Cannot continue" "$LINENO" 5
6403   fi
6404 
6405 
6406   for ac_prog in nawk gawk awk
6407 do
6408   # Extract the first word of "$ac_prog", so it can be a program name with args.
6409 set dummy $ac_prog; ac_word=$2
6410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6411 $as_echo_n "checking for $ac_word... " >&6; }
6412 if ${ac_cv_path_NAWK+:} false; then :
6413   $as_echo_n "(cached) " >&6
6414 else
6415   case $NAWK in
6416   [\\/]* | ?:[\\/]*)
6417   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6418   ;;
6419   *)
6420   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6421 for as_dir in $PATH
6422 do
6423   IFS=$as_save_IFS
6424   test -z "$as_dir" && as_dir=.
6425     for ac_exec_ext in '' $ac_executable_extensions; do
6426   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6427     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6428     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6429     break 2
6430   fi
6431 done
6432   done
6433 IFS=$as_save_IFS
6434 
6435   ;;
6436 esac
6437 fi
6438 NAWK=$ac_cv_path_NAWK
6439 if test -n "$NAWK"; then
6440   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6441 $as_echo "$NAWK" >&6; }
6442 else
6443   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6444 $as_echo "no" >&6; }
6445 fi
6446 
6447 
6448   test -n "$NAWK" && break
6449 done
6450 
6451 
6452   if test "x$NAWK" = x; then
6453     if test "x" = x; then
6454       PROG_NAME=nawk
6455     else
6456       PROG_NAME=
6457     fi
6458     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6459 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6460     as_fn_error $? "Cannot continue" "$LINENO" 5
6461   fi
6462 
6463 
6464   # Always force rm.
6465   RM="$RM -f"
6466 
6467   # pwd behaves differently on various platforms and some don't support the -L flag.
6468   # Always use the bash builtin pwd to get uniform behavior.
6469   THEPWDCMD=pwd
6470 
6471   # These are not required on all platforms
6472   # Extract the first word of "cygpath", so it can be a program name with args.
6473 set dummy cygpath; ac_word=$2
6474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6475 $as_echo_n "checking for $ac_word... " >&6; }
6476 if ${ac_cv_path_CYGPATH+:} false; then :
6477   $as_echo_n "(cached) " >&6
6478 else
6479   case $CYGPATH in
6480   [\\/]* | ?:[\\/]*)
6481   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6482   ;;
6483   *)
6484   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6485 for as_dir in $PATH
6486 do
6487   IFS=$as_save_IFS
6488   test -z "$as_dir" && as_dir=.
6489     for ac_exec_ext in '' $ac_executable_extensions; do
6490   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6491     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6492     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6493     break 2
6494   fi
6495 done
6496   done
6497 IFS=$as_save_IFS
6498 
6499   ;;
6500 esac
6501 fi
6502 CYGPATH=$ac_cv_path_CYGPATH
6503 if test -n "$CYGPATH"; then
6504   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6505 $as_echo "$CYGPATH" >&6; }
6506 else
6507   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6508 $as_echo "no" >&6; }
6509 fi
6510 
6511 
6512   # Extract the first word of "readlink", so it can be a program name with args.
6513 set dummy readlink; ac_word=$2
6514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6515 $as_echo_n "checking for $ac_word... " >&6; }
6516 if ${ac_cv_path_READLINK+:} false; then :
6517   $as_echo_n "(cached) " >&6
6518 else
6519   case $READLINK in
6520   [\\/]* | ?:[\\/]*)
6521   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6522   ;;
6523   *)
6524   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6525 for as_dir in $PATH
6526 do
6527   IFS=$as_save_IFS
6528   test -z "$as_dir" && as_dir=.
6529     for ac_exec_ext in '' $ac_executable_extensions; do
6530   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6531     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6532     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6533     break 2
6534   fi
6535 done
6536   done
6537 IFS=$as_save_IFS
6538 
6539   ;;
6540 esac
6541 fi
6542 READLINK=$ac_cv_path_READLINK
6543 if test -n "$READLINK"; then
6544   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6545 $as_echo "$READLINK" >&6; }
6546 else
6547   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6548 $as_echo "no" >&6; }
6549 fi
6550 
6551 
6552   # Extract the first word of "df", so it can be a program name with args.
6553 set dummy df; ac_word=$2
6554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6555 $as_echo_n "checking for $ac_word... " >&6; }
6556 if ${ac_cv_path_DF+:} false; then :
6557   $as_echo_n "(cached) " >&6
6558 else
6559   case $DF in
6560   [\\/]* | ?:[\\/]*)
6561   ac_cv_path_DF="$DF" # Let the user override the test with a path.
6562   ;;
6563   *)
6564   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6565 for as_dir in $PATH
6566 do
6567   IFS=$as_save_IFS
6568   test -z "$as_dir" && as_dir=.
6569     for ac_exec_ext in '' $ac_executable_extensions; do
6570   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6571     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6572     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6573     break 2
6574   fi
6575 done
6576   done
6577 IFS=$as_save_IFS
6578 
6579   ;;
6580 esac
6581 fi
6582 DF=$ac_cv_path_DF
6583 if test -n "$DF"; then
6584   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6585 $as_echo "$DF" >&6; }
6586 else
6587   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6588 $as_echo "no" >&6; }
6589 fi
6590 
6591 
6592   # Extract the first word of "SetFile", so it can be a program name with args.
6593 set dummy SetFile; ac_word=$2
6594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6595 $as_echo_n "checking for $ac_word... " >&6; }
6596 if ${ac_cv_path_SETFILE+:} false; then :
6597   $as_echo_n "(cached) " >&6
6598 else
6599   case $SETFILE in
6600   [\\/]* | ?:[\\/]*)
6601   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6602   ;;
6603   *)
6604   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6605 for as_dir in $PATH
6606 do
6607   IFS=$as_save_IFS
6608   test -z "$as_dir" && as_dir=.
6609     for ac_exec_ext in '' $ac_executable_extensions; do
6610   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6611     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6612     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6613     break 2
6614   fi
6615 done
6616   done
6617 IFS=$as_save_IFS
6618 
6619   ;;
6620 esac
6621 fi
6622 SETFILE=$ac_cv_path_SETFILE
6623 if test -n "$SETFILE"; then
6624   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6625 $as_echo "$SETFILE" >&6; }
6626 else
6627   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6628 $as_echo "no" >&6; }
6629 fi
6630 
6631 
6632 
6633 
6634 # Now we can determine OpenJDK build and target platforms. This is required to
6635 # have early on.
6636 # Make sure we can run config.sub.
6637 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6638   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6639 
6640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6641 $as_echo_n "checking build system type... " >&6; }
6642 if ${ac_cv_build+:} false; then :
6643   $as_echo_n "(cached) " >&6
6644 else
6645   ac_build_alias=$build_alias
6646 test "x$ac_build_alias" = x &&
6647   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6648 test "x$ac_build_alias" = x &&
6649   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6650 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6651   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6652 
6653 fi
6654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6655 $as_echo "$ac_cv_build" >&6; }
6656 case $ac_cv_build in
6657 *-*-*) ;;
6658 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6659 esac
6660 build=$ac_cv_build
6661 ac_save_IFS=$IFS; IFS='-'
6662 set x $ac_cv_build
6663 shift
6664 build_cpu=$1
6665 build_vendor=$2
6666 shift; shift
6667 # Remember, the first character of IFS is used to create $*,
6668 # except with old shells:
6669 build_os=$*
6670 IFS=$ac_save_IFS
6671 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6672 
6673 
6674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6675 $as_echo_n "checking host system type... " >&6; }
6676 if ${ac_cv_host+:} false; then :
6677   $as_echo_n "(cached) " >&6
6678 else
6679   if test "x$host_alias" = x; then
6680   ac_cv_host=$ac_cv_build
6681 else
6682   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6683     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6684 fi
6685 
6686 fi
6687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6688 $as_echo "$ac_cv_host" >&6; }
6689 case $ac_cv_host in
6690 *-*-*) ;;
6691 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6692 esac
6693 host=$ac_cv_host
6694 ac_save_IFS=$IFS; IFS='-'
6695 set x $ac_cv_host
6696 shift
6697 host_cpu=$1
6698 host_vendor=$2
6699 shift; shift
6700 # Remember, the first character of IFS is used to create $*,
6701 # except with old shells:
6702 host_os=$*
6703 IFS=$ac_save_IFS
6704 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6705 
6706 
6707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6708 $as_echo_n "checking target system type... " >&6; }
6709 if ${ac_cv_target+:} false; then :
6710   $as_echo_n "(cached) " >&6
6711 else
6712   if test "x$target_alias" = x; then
6713   ac_cv_target=$ac_cv_host
6714 else
6715   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6716     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6717 fi
6718 
6719 fi
6720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6721 $as_echo "$ac_cv_target" >&6; }
6722 case $ac_cv_target in
6723 *-*-*) ;;
6724 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6725 esac
6726 target=$ac_cv_target
6727 ac_save_IFS=$IFS; IFS='-'
6728 set x $ac_cv_target
6729 shift
6730 target_cpu=$1
6731 target_vendor=$2
6732 shift; shift
6733 # Remember, the first character of IFS is used to create $*,
6734 # except with old shells:
6735 target_os=$*
6736 IFS=$ac_save_IFS
6737 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6738 
6739 
6740 # The aliases save the names the user supplied, while $host etc.
6741 # will get canonicalized.
6742 test -n "$target_alias" &&
6743   test "$program_prefix$program_suffix$program_transform_name" = \
6744     NONENONEs,x,x, &&
6745   program_prefix=${target_alias}-
6746 
6747   # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6748   # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6749   # product you're building. The target of this build is called "host". Since this is confusing to most people, we
6750   # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6751   # to use the configure naming style.
6752 
6753 
6754 
6755 
6756 
6757   # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6758   # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6759   # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6760   # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6761   OPENJDK_TARGET_AUTOCONF_NAME="$host"
6762   OPENJDK_BUILD_AUTOCONF_NAME="$build"
6763 
6764 
6765 
6766   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6767 
6768   case "$build_os" in
6769     *linux*)
6770       VAR_OS=linux
6771       VAR_OS_API=posix
6772       VAR_OS_ENV=linux
6773       ;;
6774     *solaris*)
6775       VAR_OS=solaris
6776       VAR_OS_API=posix
6777       VAR_OS_ENV=solaris
6778       ;;
6779     *darwin*)
6780       VAR_OS=macosx
6781       VAR_OS_API=posix
6782       VAR_OS_ENV=macosx
6783       ;;
6784     *bsd*)
6785       VAR_OS=bsd
6786       VAR_OS_API=posix
6787       VAR_OS_ENV=bsd
6788       ;;
6789     *cygwin*)
6790       VAR_OS=windows
6791       VAR_OS_API=winapi
6792       VAR_OS_ENV=windows.cygwin
6793       ;;
6794     *mingw*)
6795       VAR_OS=windows
6796       VAR_OS_API=winapi
6797       VAR_OS_ENV=windows.msys
6798       ;;
6799     *aix*)
6800       VAR_OS=aix
6801       VAR_OS_API=posix
6802       VAR_OS_ENV=aix
6803       ;;
6804     *)
6805       as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6806       ;;
6807   esac
6808 
6809 
6810   # First argument is the cpu name from the trip/quad
6811   case "$build_cpu" in
6812     x86_64)
6813       VAR_CPU=x86_64
6814       VAR_CPU_ARCH=x86
6815       VAR_CPU_BITS=64
6816       VAR_CPU_ENDIAN=little
6817       ;;
6818     i?86)
6819       VAR_CPU=x86
6820       VAR_CPU_ARCH=x86
6821       VAR_CPU_BITS=32
6822       VAR_CPU_ENDIAN=little
6823       ;;
6824     arm*)
6825       VAR_CPU=arm
6826       VAR_CPU_ARCH=arm
6827       VAR_CPU_BITS=32
6828       VAR_CPU_ENDIAN=little
6829       ;;
6830     powerpc)
6831       VAR_CPU=ppc
6832       VAR_CPU_ARCH=ppc
6833       VAR_CPU_BITS=32
6834       VAR_CPU_ENDIAN=big
6835       ;;
6836     powerpc64)
6837       VAR_CPU=ppc64
6838       VAR_CPU_ARCH=ppc
6839       VAR_CPU_BITS=64
6840       VAR_CPU_ENDIAN=big
6841       ;;
6842     powerpc64le)
6843       VAR_CPU=ppc64
6844       VAR_CPU_ARCH=ppc
6845       VAR_CPU_BITS=64
6846       VAR_CPU_ENDIAN=little
6847       ;;
6848     s390)
6849       VAR_CPU=s390
6850       VAR_CPU_ARCH=s390
6851       VAR_CPU_BITS=32
6852       VAR_CPU_ENDIAN=big
6853       ;;
6854     s390x)
6855       VAR_CPU=s390x
6856       VAR_CPU_ARCH=s390
6857       VAR_CPU_BITS=64
6858       VAR_CPU_ENDIAN=big
6859       ;;
6860     sparc)
6861       VAR_CPU=sparc
6862       VAR_CPU_ARCH=sparc
6863       VAR_CPU_BITS=32
6864       VAR_CPU_ENDIAN=big
6865       ;;
6866     sparcv9)
6867       VAR_CPU=sparcv9
6868       VAR_CPU_ARCH=sparc
6869       VAR_CPU_BITS=64
6870       VAR_CPU_ENDIAN=big
6871       ;;
6872     *)
6873       as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6874       ;;
6875   esac
6876 
6877   # ..and setup our own variables. (Do this explicitely to facilitate searching)
6878   OPENJDK_BUILD_OS="$VAR_OS"
6879   OPENJDK_BUILD_OS_API="$VAR_OS_API"
6880   OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6881   OPENJDK_BUILD_CPU="$VAR_CPU"
6882   OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6883   OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6884   OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6885 
6886 
6887 
6888 
6889 
6890 
6891 
6892   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6893 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
6894   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6895 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6896 
6897   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6898 
6899   case "$host_os" in
6900     *linux*)
6901       VAR_OS=linux
6902       VAR_OS_API=posix
6903       VAR_OS_ENV=linux
6904       ;;
6905     *solaris*)
6906       VAR_OS=solaris
6907       VAR_OS_API=posix
6908       VAR_OS_ENV=solaris
6909       ;;
6910     *darwin*)
6911       VAR_OS=macosx
6912       VAR_OS_API=posix
6913       VAR_OS_ENV=macosx
6914       ;;
6915     *bsd*)
6916       VAR_OS=bsd
6917       VAR_OS_API=posix
6918       VAR_OS_ENV=bsd
6919       ;;
6920     *cygwin*)
6921       VAR_OS=windows
6922       VAR_OS_API=winapi
6923       VAR_OS_ENV=windows.cygwin
6924       ;;
6925     *mingw*)
6926       VAR_OS=windows
6927       VAR_OS_API=winapi
6928       VAR_OS_ENV=windows.msys
6929       ;;
6930     *aix*)
6931       VAR_OS=aix
6932       VAR_OS_API=posix
6933       VAR_OS_ENV=aix
6934       ;;
6935     *)
6936       as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6937       ;;
6938   esac
6939 
6940 
6941   # First argument is the cpu name from the trip/quad
6942   case "$host_cpu" in
6943     x86_64)
6944       VAR_CPU=x86_64
6945       VAR_CPU_ARCH=x86
6946       VAR_CPU_BITS=64
6947       VAR_CPU_ENDIAN=little
6948       ;;
6949     i?86)
6950       VAR_CPU=x86
6951       VAR_CPU_ARCH=x86
6952       VAR_CPU_BITS=32
6953       VAR_CPU_ENDIAN=little
6954       ;;
6955     arm*)
6956       VAR_CPU=arm
6957       VAR_CPU_ARCH=arm
6958       VAR_CPU_BITS=32
6959       VAR_CPU_ENDIAN=little
6960       ;;
6961     powerpc)
6962       VAR_CPU=ppc
6963       VAR_CPU_ARCH=ppc
6964       VAR_CPU_BITS=32
6965       VAR_CPU_ENDIAN=big
6966       ;;
6967     powerpc64)
6968       VAR_CPU=ppc64
6969       VAR_CPU_ARCH=ppc
6970       VAR_CPU_BITS=64
6971       VAR_CPU_ENDIAN=big
6972       ;;
6973     powerpc64le)
6974       VAR_CPU=ppc64
6975       VAR_CPU_ARCH=ppc
6976       VAR_CPU_BITS=64
6977       VAR_CPU_ENDIAN=little
6978       ;;
6979     s390)
6980       VAR_CPU=s390
6981       VAR_CPU_ARCH=s390
6982       VAR_CPU_BITS=32
6983       VAR_CPU_ENDIAN=big
6984       ;;
6985     s390x)
6986       VAR_CPU=s390x
6987       VAR_CPU_ARCH=s390
6988       VAR_CPU_BITS=64
6989       VAR_CPU_ENDIAN=big
6990       ;;
6991     sparc)
6992       VAR_CPU=sparc
6993       VAR_CPU_ARCH=sparc
6994       VAR_CPU_BITS=32
6995       VAR_CPU_ENDIAN=big
6996       ;;
6997     sparcv9)
6998       VAR_CPU=sparcv9
6999       VAR_CPU_ARCH=sparc
7000       VAR_CPU_BITS=64
7001       VAR_CPU_ENDIAN=big
7002       ;;
7003     *)
7004       as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
7005       ;;
7006   esac
7007 
7008   # ... and setup our own variables. (Do this explicitely to facilitate searching)
7009   OPENJDK_TARGET_OS="$VAR_OS"
7010   OPENJDK_TARGET_OS_API="$VAR_OS_API"
7011   OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
7012   OPENJDK_TARGET_CPU="$VAR_CPU"
7013   OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
7014   OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
7015   OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
7016 
7017 
7018 
7019 
7020 
7021 
7022 
7023   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
7024 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
7025   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
7026 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
7027 
7028 
7029 
7030 # Check whether --with-target-bits was given.
7031 if test "${with_target_bits+set}" = set; then :
7032   withval=$with_target_bits;
7033 fi
7034 
7035 
7036   # We have three types of compiles:
7037   # native  == normal compilation, target system == build system
7038   # cross   == traditional cross compilation, target system != build system; special toolchain needed
7039   # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
7040   #
7041   if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
7042     # We're doing a proper cross-compilation
7043     COMPILE_TYPE="cross"
7044   else
7045     COMPILE_TYPE="native"
7046   fi
7047 
7048   if test "x$with_target_bits" != x; then
7049     if test "x$COMPILE_TYPE" = "xcross"; then
7050       as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
7051     fi
7052 
7053     if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7054       # A reduced build is requested
7055       COMPILE_TYPE="reduced"
7056       OPENJDK_TARGET_CPU_BITS=32
7057       if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
7058         OPENJDK_TARGET_CPU=x86
7059       elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
7060         OPENJDK_TARGET_CPU=sparc
7061       else
7062         as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
7063       fi
7064     elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
7065       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
7066     elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
7067       { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
7068 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
7069     else
7070       as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
7071     fi
7072   fi
7073 
7074 
7075   { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
7076 $as_echo_n "checking compilation type... " >&6; }
7077   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
7078 $as_echo "$COMPILE_TYPE" >&6; }
7079 
7080 
7081   if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
7082     REQUIRED_OS_NAME=SunOS
7083     REQUIRED_OS_VERSION=5.10
7084   fi
7085   if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
7086     REQUIRED_OS_NAME=Linux
7087     REQUIRED_OS_VERSION=2.6
7088   fi
7089   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7090     REQUIRED_OS_NAME=Windows
7091     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
7092       REQUIRED_OS_VERSION=5.2
7093     else
7094       REQUIRED_OS_VERSION=5.1
7095     fi
7096   fi
7097   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7098     REQUIRED_OS_NAME=Darwin
7099     REQUIRED_OS_VERSION=11.2
7100   fi
7101 
7102 
7103 
7104 
7105 
7106   # Also store the legacy naming of the cpu.
7107   # Ie i586 and amd64 instead of x86 and x86_64
7108   OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
7109   if test "x$OPENJDK_TARGET_CPU" = xx86; then
7110     OPENJDK_TARGET_CPU_LEGACY="i586"
7111   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7112     # On all platforms except MacOSX replace x86_64 with amd64.
7113     OPENJDK_TARGET_CPU_LEGACY="amd64"
7114   fi
7115 
7116 
7117   # And the second legacy naming of the cpu.
7118   # Ie i386 and amd64 instead of x86 and x86_64.
7119   OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
7120   if test "x$OPENJDK_TARGET_CPU" = xx86; then
7121     OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
7122   elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7123     OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
7124   fi
7125 
7126 
7127   # This is the name of the cpu (but using i386 and amd64 instead of
7128   # x86 and x86_64, respectively), preceeded by a /, to be used when
7129   # locating libraries. On macosx, it's empty, though.
7130   OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
7131   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7132     OPENJDK_TARGET_CPU_LIBDIR=""
7133   fi
7134 
7135 
7136   # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
7137   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7138   # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7139   OPENJDK_TARGET_CPU_ISADIR=""
7140   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7141     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7142       OPENJDK_TARGET_CPU_ISADIR="/amd64"
7143     elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7144       OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7145     fi
7146   fi
7147 
7148 
7149   # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7150   OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7151   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7152     # On linux only, we replace x86 with i386.
7153     OPENJDK_TARGET_CPU_OSARCH="i386"
7154   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7155     # On all platforms except macosx, we replace x86_64 with amd64.
7156     OPENJDK_TARGET_CPU_OSARCH="amd64"
7157   fi
7158 
7159 
7160   OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7161   if test "x$OPENJDK_TARGET_CPU" = xx86; then
7162     OPENJDK_TARGET_CPU_JLI="i386"
7163   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7164     # On all platforms except macosx, we replace x86_64 with amd64.
7165     OPENJDK_TARGET_CPU_JLI="amd64"
7166   fi
7167   # Now setup the -D flags for building libjli.
7168   OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7169   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7170     if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7171       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7172     elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7173       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7174     fi
7175   fi
7176 
7177 
7178   # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7179   if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7180     OPENJDK_TARGET_OS_API_DIR="solaris"
7181   fi
7182   if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7183     OPENJDK_TARGET_OS_API_DIR="windows"
7184   fi
7185 
7186 
7187   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7188       OPENJDK_TARGET_OS_EXPORT_DIR=macosx
7189   else
7190       OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_API_DIR}
7191   fi
7192 
7193 
7194   if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7195     A_LP64="LP64:="
7196     # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7197     # unpack200.exe
7198     if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7199       ADD_LP64="-D_LP64=1"
7200     fi
7201   fi
7202   LP64=$A_LP64
7203 
7204 
7205   if test "x$COMPILE_TYPE" = "xcross"; then
7206     # FIXME: ... or should this include reduced builds..?
7207     DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7208   else
7209     DEFINE_CROSS_COMPILE_ARCH=""
7210   fi
7211 
7212 
7213   # ZERO_ARCHDEF is used to enable architecture-specific code
7214   case "${OPENJDK_TARGET_CPU}" in
7215     ppc)     ZERO_ARCHDEF=PPC32 ;;
7216     ppc64)   ZERO_ARCHDEF=PPC64 ;;
7217     s390*)   ZERO_ARCHDEF=S390  ;;
7218     sparc*)  ZERO_ARCHDEF=SPARC ;;
7219     x86_64*) ZERO_ARCHDEF=AMD64 ;;
7220     x86)     ZERO_ARCHDEF=IA32  ;;
7221     *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
7222   esac
7223 
7224 
7225 
7226 
7227 # Continue setting up basic stuff. Most remaining code require fundamental tools.
7228 
7229   # Locate the directory of this script.
7230   SCRIPT="$0"
7231   AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
7232 
7233   # Where is the source? It is located two levels above the configure script.
7234   CURDIR="$PWD"
7235   cd "$AUTOCONF_DIR/../.."
7236   SRC_ROOT="`$THEPWDCMD -L`"
7237 
7238   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7239     PATH_SEP=";"
7240 
7241   SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
7242   if test $SRC_ROOT_LENGTH -gt 100; then
7243     as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7244   fi
7245 
7246   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7247     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7248 $as_echo_n "checking cygwin release... " >&6; }
7249     CYGWIN_VERSION=`$UNAME -r`
7250     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7251 $as_echo "$CYGWIN_VERSION" >&6; }
7252     WINDOWS_ENV_VENDOR='cygwin'
7253     WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7254 
7255     CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7256     if test "x$CYGWIN_VERSION_OK" = x; then
7257       { $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
7258 $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;}
7259       as_fn_error $? "Cannot continue" "$LINENO" 5
7260     fi
7261     if test "x$CYGPATH" = x; then
7262       as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7263     fi
7264     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7265 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7266     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7267     cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7268     # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7269     CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7270     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7271 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
7272     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7273     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7274     if test "x$test_cygdrive_prefix" = x; then
7275       as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7276     fi
7277   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7278     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7279 $as_echo_n "checking msys release... " >&6; }
7280     MSYS_VERSION=`$UNAME -r`
7281     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7282 $as_echo "$MSYS_VERSION" >&6; }
7283 
7284     WINDOWS_ENV_VENDOR='msys'
7285     WINDOWS_ENV_VERSION="$MSYS_VERSION"
7286 
7287     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7288 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
7289     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7290     MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7291 
7292   windows_path="$MSYS_ROOT_PATH"
7293   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7294     unix_path=`$CYGPATH -u "$windows_path"`
7295     MSYS_ROOT_PATH="$unix_path"
7296   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7297     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7298     MSYS_ROOT_PATH="$unix_path"
7299   fi
7300 
7301     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7302 $as_echo "$MSYS_ROOT_PATH" >&6; }
7303     WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7304   else
7305     as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7306   fi
7307 
7308   # Test if windows or unix (cygwin/msys) find is first in path.
7309   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7310 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7311   FIND_BINARY_OUTPUT=`find --version 2>&1`
7312   if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7313     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7314 $as_echo "unix style" >&6; }
7315   elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7316     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7317 $as_echo "Windows" >&6; }
7318     { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7319 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7320     { $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
7321 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7322     as_fn_error $? "Cannot continue" "$LINENO" 5
7323   else
7324     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7325 $as_echo "unknown" >&6; }
7326     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7327 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7328   fi
7329 
7330   else
7331     PATH_SEP=":"
7332   fi
7333 
7334 
7335 
7336   cd "$CURDIR"
7337 
7338 
7339   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7340 
7341   # Input might be given as Windows format, start by converting to
7342   # unix format.
7343   path="$SRC_ROOT"
7344   new_path=`$CYGPATH -u "$path"`
7345 
7346   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7347   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7348   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7349   # "foo.exe" is OK but "foo" is an error.
7350   #
7351   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7352   # It is also a way to make sure we got the proper file name for the real test later on.
7353   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7354   if test "x$test_shortpath" = x; then
7355     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7356 $as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7357     as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7358   fi
7359 
7360   # Call helper function which possibly converts this using DOS-style short mode.
7361   # If so, the updated path is stored in $new_path.
7362 
7363   input_path="$new_path"
7364   # Check if we need to convert this using DOS-style short mode. If the path
7365   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7366   # take no chances and rewrite it.
7367   # Note: m4 eats our [], so we need to use [ and ] instead.
7368   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7369   if test "x$has_forbidden_chars" != x; then
7370     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7371     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7372     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7373     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7374       # Going to short mode and back again did indeed matter. Since short mode is
7375       # case insensitive, let's make it lowercase to improve readability.
7376       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7377       # Now convert it back to Unix-stile (cygpath)
7378       input_path=`$CYGPATH -u "$shortmode_path"`
7379       new_path="$input_path"
7380     fi
7381   fi
7382 
7383   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7384   if test "x$test_cygdrive_prefix" = x; then
7385     # As a simple fix, exclude /usr/bin since it's not a real path.
7386     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7387       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7388       # a path prefixed by /cygdrive for fixpath to work.
7389       new_path="$CYGWIN_ROOT_PATH$input_path"
7390     fi
7391   fi
7392 
7393 
7394   if test "x$path" != "x$new_path"; then
7395     SRC_ROOT="$new_path"
7396     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7397 $as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7398   fi
7399 
7400   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7401 
7402   path="$SRC_ROOT"
7403   has_colon=`$ECHO $path | $GREP ^.:`
7404   new_path="$path"
7405   if test "x$has_colon" = x; then
7406     # Not in mixed or Windows style, start by that.
7407     new_path=`cmd //c echo $path`
7408   fi
7409 
7410 
7411   input_path="$new_path"
7412   # Check if we need to convert this using DOS-style short mode. If the path
7413   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7414   # take no chances and rewrite it.
7415   # Note: m4 eats our [], so we need to use [ and ] instead.
7416   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7417   if test "x$has_forbidden_chars" != x; then
7418     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7419     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7420   fi
7421 
7422 
7423   windows_path="$new_path"
7424   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7425     unix_path=`$CYGPATH -u "$windows_path"`
7426     new_path="$unix_path"
7427   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7428     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7429     new_path="$unix_path"
7430   fi
7431 
7432   if test "x$path" != "x$new_path"; then
7433     SRC_ROOT="$new_path"
7434     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7435 $as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7436   fi
7437 
7438   # Save the first 10 bytes of this path to the storage, so fixpath can work.
7439   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7440 
7441   else
7442     # We're on a posix platform. Hooray! :)
7443     path="$SRC_ROOT"
7444     has_space=`$ECHO "$path" | $GREP " "`
7445     if test "x$has_space" != x; then
7446       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7447 $as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7448       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7449     fi
7450 
7451     # Use eval to expand a potential ~
7452     eval path="$path"
7453     if test ! -f "$path" && test ! -d "$path"; then
7454       as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7455     fi
7456 
7457     SRC_ROOT="`cd "$path"; $THEPWDCMD -L`"
7458   fi
7459 
7460 
7461   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7462 
7463   # Input might be given as Windows format, start by converting to
7464   # unix format.
7465   path="$CURDIR"
7466   new_path=`$CYGPATH -u "$path"`
7467 
7468   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7469   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7470   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7471   # "foo.exe" is OK but "foo" is an error.
7472   #
7473   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7474   # It is also a way to make sure we got the proper file name for the real test later on.
7475   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7476   if test "x$test_shortpath" = x; then
7477     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7478 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7479     as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7480   fi
7481 
7482   # Call helper function which possibly converts this using DOS-style short mode.
7483   # If so, the updated path is stored in $new_path.
7484 
7485   input_path="$new_path"
7486   # Check if we need to convert this using DOS-style short mode. If the path
7487   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7488   # take no chances and rewrite it.
7489   # Note: m4 eats our [], so we need to use [ and ] instead.
7490   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7491   if test "x$has_forbidden_chars" != x; then
7492     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7493     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7494     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7495     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7496       # Going to short mode and back again did indeed matter. Since short mode is
7497       # case insensitive, let's make it lowercase to improve readability.
7498       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7499       # Now convert it back to Unix-stile (cygpath)
7500       input_path=`$CYGPATH -u "$shortmode_path"`
7501       new_path="$input_path"
7502     fi
7503   fi
7504 
7505   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7506   if test "x$test_cygdrive_prefix" = x; then
7507     # As a simple fix, exclude /usr/bin since it's not a real path.
7508     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7509       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7510       # a path prefixed by /cygdrive for fixpath to work.
7511       new_path="$CYGWIN_ROOT_PATH$input_path"
7512     fi
7513   fi
7514 
7515 
7516   if test "x$path" != "x$new_path"; then
7517     CURDIR="$new_path"
7518     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7519 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7520   fi
7521 
7522   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7523 
7524   path="$CURDIR"
7525   has_colon=`$ECHO $path | $GREP ^.:`
7526   new_path="$path"
7527   if test "x$has_colon" = x; then
7528     # Not in mixed or Windows style, start by that.
7529     new_path=`cmd //c echo $path`
7530   fi
7531 
7532 
7533   input_path="$new_path"
7534   # Check if we need to convert this using DOS-style short mode. If the path
7535   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7536   # take no chances and rewrite it.
7537   # Note: m4 eats our [], so we need to use [ and ] instead.
7538   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7539   if test "x$has_forbidden_chars" != x; then
7540     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7541     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7542   fi
7543 
7544 
7545   windows_path="$new_path"
7546   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7547     unix_path=`$CYGPATH -u "$windows_path"`
7548     new_path="$unix_path"
7549   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7550     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7551     new_path="$unix_path"
7552   fi
7553 
7554   if test "x$path" != "x$new_path"; then
7555     CURDIR="$new_path"
7556     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7557 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7558   fi
7559 
7560   # Save the first 10 bytes of this path to the storage, so fixpath can work.
7561   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7562 
7563   else
7564     # We're on a posix platform. Hooray! :)
7565     path="$CURDIR"
7566     has_space=`$ECHO "$path" | $GREP " "`
7567     if test "x$has_space" != x; then
7568       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7569 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7570       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7571     fi
7572 
7573     # Use eval to expand a potential ~
7574     eval path="$path"
7575     if test ! -f "$path" && test ! -d "$path"; then
7576       as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7577     fi
7578 
7579     CURDIR="`cd "$path"; $THEPWDCMD -L`"
7580   fi
7581 
7582 
7583   if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7584     # Add extra search paths on solaris for utilities like ar and as etc...
7585     PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7586   fi
7587 
7588   # You can force the sys-root if the sys-root encoded into the cross compiler tools
7589   # is not correct.
7590 
7591 # Check whether --with-sys-root was given.
7592 if test "${with_sys_root+set}" = set; then :
7593   withval=$with_sys_root;
7594 fi
7595 
7596 
7597   if test "x$with_sys_root" != x; then
7598     SYS_ROOT=$with_sys_root
7599   else
7600     SYS_ROOT=/
7601   fi
7602 
7603 
7604 
7605 # Check whether --with-tools-dir was given.
7606 if test "${with_tools_dir+set}" = set; then :
7607   withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7608 
7609 fi
7610 
7611 
7612   # Xcode version will be validated later
7613 
7614 # Check whether --with-xcode-path was given.
7615 if test "${with_xcode_path+set}" = set; then :
7616   withval=$with_xcode_path; XCODE_PATH=$with_xcode_path
7617 
7618 fi
7619 
7620 
7621 
7622 # Check whether --with-devkit was given.
7623 if test "${with_devkit+set}" = set; then :
7624   withval=$with_devkit;
7625         if test "x$with_sys_root" != x; then
7626           as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7627         fi
7628 
7629   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7630 
7631   # Input might be given as Windows format, start by converting to
7632   # unix format.
7633   path="$with_devkit"
7634   new_path=`$CYGPATH -u "$path"`
7635 
7636   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7637   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7638   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7639   # "foo.exe" is OK but "foo" is an error.
7640   #
7641   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7642   # It is also a way to make sure we got the proper file name for the real test later on.
7643   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7644   if test "x$test_shortpath" = x; then
7645     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7646 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7647     as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
7648   fi
7649 
7650   # Call helper function which possibly converts this using DOS-style short mode.
7651   # If so, the updated path is stored in $new_path.
7652 
7653   input_path="$new_path"
7654   # Check if we need to convert this using DOS-style short mode. If the path
7655   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7656   # take no chances and rewrite it.
7657   # Note: m4 eats our [], so we need to use [ and ] instead.
7658   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7659   if test "x$has_forbidden_chars" != x; then
7660     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7661     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7662     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7663     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7664       # Going to short mode and back again did indeed matter. Since short mode is
7665       # case insensitive, let's make it lowercase to improve readability.
7666       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7667       # Now convert it back to Unix-stile (cygpath)
7668       input_path=`$CYGPATH -u "$shortmode_path"`
7669       new_path="$input_path"
7670     fi
7671   fi
7672 
7673   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7674   if test "x$test_cygdrive_prefix" = x; then
7675     # As a simple fix, exclude /usr/bin since it's not a real path.
7676     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7677       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7678       # a path prefixed by /cygdrive for fixpath to work.
7679       new_path="$CYGWIN_ROOT_PATH$input_path"
7680     fi
7681   fi
7682 
7683 
7684   if test "x$path" != "x$new_path"; then
7685     with_devkit="$new_path"
7686     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7687 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7688   fi
7689 
7690   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7691 
7692   path="$with_devkit"
7693   has_colon=`$ECHO $path | $GREP ^.:`
7694   new_path="$path"
7695   if test "x$has_colon" = x; then
7696     # Not in mixed or Windows style, start by that.
7697     new_path=`cmd //c echo $path`
7698   fi
7699 
7700 
7701   input_path="$new_path"
7702   # Check if we need to convert this using DOS-style short mode. If the path
7703   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7704   # take no chances and rewrite it.
7705   # Note: m4 eats our [], so we need to use [ and ] instead.
7706   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7707   if test "x$has_forbidden_chars" != x; then
7708     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7709     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7710   fi
7711 
7712 
7713   windows_path="$new_path"
7714   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7715     unix_path=`$CYGPATH -u "$windows_path"`
7716     new_path="$unix_path"
7717   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7718     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7719     new_path="$unix_path"
7720   fi
7721 
7722   if test "x$path" != "x$new_path"; then
7723     with_devkit="$new_path"
7724     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7725 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7726   fi
7727 
7728   # Save the first 10 bytes of this path to the storage, so fixpath can work.
7729   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7730 
7731   else
7732     # We're on a posix platform. Hooray! :)
7733     path="$with_devkit"
7734     has_space=`$ECHO "$path" | $GREP " "`
7735     if test "x$has_space" != x; then
7736       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7737 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7738       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7739     fi
7740 
7741     # Use eval to expand a potential ~
7742     eval path="$path"
7743     if test ! -f "$path" && test ! -d "$path"; then
7744       as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
7745     fi
7746 
7747     with_devkit="`cd "$path"; $THEPWDCMD -L`"
7748   fi
7749 
7750 
7751   if test "x$TOOLS_DIR" = x; then
7752     TOOLS_DIR="$with_devkit/bin"
7753   else
7754     TOOLS_DIR="$TOOLS_DIR:$with_devkit/bin"
7755   fi
7756 
7757         if test -d "$with_devkit/$host_alias/libc"; then
7758           SYS_ROOT=$with_devkit/$host_alias/libc
7759         elif test -d "$with_devkit/$host/sys-root"; then
7760           SYS_ROOT=$with_devkit/$host/sys-root
7761         fi
7762 
7763 fi
7764 
7765 
7766 
7767   # Setup default logging of stdout and stderr to build.log in the output root.
7768   BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7769   BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7770   BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7771 
7772 
7773 
7774 
7775 
7776 # Check if it's a pure open build or if custom sources are to be used.
7777 
7778   # Check whether --enable-openjdk-only was given.
7779 if test "${enable_openjdk_only+set}" = set; then :
7780   enableval=$enable_openjdk_only;
7781 else
7782   enable_openjdk_only="no"
7783 fi
7784 
7785 
7786   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7787 $as_echo_n "checking for presence of closed sources... " >&6; }
7788   if test -d "$SRC_ROOT/jdk/src/closed"; then
7789     CLOSED_SOURCE_PRESENT=yes
7790   else
7791     CLOSED_SOURCE_PRESENT=no
7792   fi
7793   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7794 $as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7795 
7796   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7797 $as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7798   SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7799   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7800 $as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7801 
7802   if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7803     OPENJDK=true
7804     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7805       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7806 $as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7807     fi
7808   else
7809     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7810       OPENJDK=true
7811     else
7812       OPENJDK=false
7813     fi
7814   fi
7815 
7816   if test "x$OPENJDK" = "xtrue"; then
7817     SET_OPENJDK="OPENJDK=true"
7818   fi
7819 
7820 
7821 
7822 
7823 # These are needed to be able to create a configuration name (and thus the output directory)
7824 
7825   ###############################################################################
7826   #
7827   # Check which variant of the JDK that we want to build.
7828   # Currently we have:
7829   #    normal:   standard edition
7830   # but the custom make system may add other variants
7831   #
7832   # Effectively the JDK variant gives a name to a specific set of
7833   # modules to compile into the JDK. In the future, these modules
7834   # might even be Jigsaw modules.
7835   #
7836   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7837 $as_echo_n "checking which variant of the JDK to build... " >&6; }
7838 
7839 # Check whether --with-jdk-variant was given.
7840 if test "${with_jdk_variant+set}" = set; then :
7841   withval=$with_jdk_variant;
7842 fi
7843 
7844 
7845   if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7846     JDK_VARIANT="normal"
7847   else
7848     as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7849   fi
7850 
7851 
7852 
7853   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7854 $as_echo "$JDK_VARIANT" >&6; }
7855 
7856 
7857 ###############################################################################
7858 #
7859 # Check which interpreter of the JVM we want to build.
7860 # Currently we have:
7861 #    template: Template interpreter (the default)
7862 #    cpp     : C++ interpreter
7863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
7864 $as_echo_n "checking which interpreter of the JVM to build... " >&6; }
7865 
7866 # Check whether --with-jvm-interpreter was given.
7867 if test "${with_jvm_interpreter+set}" = set; then :
7868   withval=$with_jvm_interpreter;
7869 fi
7870 
7871 
7872 if test "x$with_jvm_interpreter" = x; then
7873      with_jvm_interpreter="template"
7874 fi
7875 
7876 JVM_INTERPRETER="$with_jvm_interpreter"
7877 
7878 if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
7879    as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
7880 fi
7881 
7882 
7883 
7884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
7885 $as_echo "$with_jvm_interpreter" >&6; }
7886 
7887 
7888 
7889   ###############################################################################
7890   #
7891   # Check which variants of the JVM that we want to build.
7892   # Currently we have:
7893   #    server: normal interpreter and a tiered C1/C2 compiler
7894   #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7895   #    minimal1: reduced form of client with optional VM services and features stripped out
7896   #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7897   #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7898   #    zero: no machine code interpreter, no compiler
7899   #    zeroshark: zero interpreter and shark/llvm compiler backend
7900 #    core: interpreter only, no compiler (only works on some platforms)
7901   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7902 $as_echo_n "checking which variants of the JVM to build... " >&6; }
7903 
7904 # Check whether --with-jvm-variants was given.
7905 if test "${with_jvm_variants+set}" = set; then :
7906   withval=$with_jvm_variants;
7907 fi
7908 
7909 
7910   if test "x$with_jvm_variants" = x; then
7911     with_jvm_variants="server"
7912   fi
7913 
7914   JVM_VARIANTS=",$with_jvm_variants,"
7915   TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//' -e 's/core,//'`
7916 
7917   if test "x$TEST_VARIANTS" != "x,"; then
7918      as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
7919   fi
7920   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7921 $as_echo "$with_jvm_variants" >&6; }
7922 
7923   JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7924   JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7925   JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7926   JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7927   JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7928   JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7929   JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
7930 
7931   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7932     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7933       as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7934     fi
7935   fi
7936   if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7937     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7938       as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7939     fi
7940   fi
7941   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7942     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7943       as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7944     fi
7945   fi
7946 
7947   # Replace the commas with AND for use in the build directory name.
7948   ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
7949   COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/' -e 's/core,/1/'`
7950   if test "x$COUNT_VARIANTS" != "x,1"; then
7951     BUILDING_MULTIPLE_JVM_VARIANTS=yes
7952   else
7953     BUILDING_MULTIPLE_JVM_VARIANTS=no
7954   fi
7955 
7956 
7957 
7958 
7959 
7960 
7961 
7962 
7963 
7964 
7965   INCLUDE_SA=true
7966   if test "x$JVM_VARIANT_ZERO" = xtrue ; then
7967     INCLUDE_SA=false
7968   fi
7969   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
7970     INCLUDE_SA=false
7971   fi
7972   if test "x$VAR_CPU" = xppc64 ; then
7973     INCLUDE_SA=false
7974   fi
7975 
7976 
7977   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7978     MACOSX_UNIVERSAL="false"
7979   fi
7980 
7981 
7982 
7983 
7984   ###############################################################################
7985   #
7986   # Set the debug level
7987   #    release: no debug information, all optimizations, no asserts.
7988   #    fastdebug: debug information (-g), all optimizations, all asserts
7989   #    slowdebug: debug information (-g), no optimizations, all asserts
7990   #
7991   DEBUG_LEVEL="release"
7992   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7993 $as_echo_n "checking which debug level to use... " >&6; }
7994   # Check whether --enable-debug was given.
7995 if test "${enable_debug+set}" = set; then :
7996   enableval=$enable_debug;
7997         ENABLE_DEBUG="${enableval}"
7998         DEBUG_LEVEL="fastdebug"
7999 
8000 else
8001   ENABLE_DEBUG="no"
8002 fi
8003 
8004 
8005 
8006 # Check whether --with-debug-level was given.
8007 if test "${with_debug_level+set}" = set; then :
8008   withval=$with_debug_level;
8009         DEBUG_LEVEL="${withval}"
8010         if test "x$ENABLE_DEBUG" = xyes; then
8011           as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
8012         fi
8013 
8014 fi
8015 
8016   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
8017 $as_echo "$DEBUG_LEVEL" >&6; }
8018 
8019   if test "x$DEBUG_LEVEL" != xrelease && \
8020       test "x$DEBUG_LEVEL" != xfastdebug && \
8021       test "x$DEBUG_LEVEL" != xslowdebug; then
8022     as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
8023   fi
8024 
8025 
8026   ###############################################################################
8027   #
8028   # Setup legacy vars/targets and new vars to deal with different debug levels.
8029   #
8030 
8031   case $DEBUG_LEVEL in
8032     release )
8033       VARIANT="OPT"
8034       FASTDEBUG="false"
8035       DEBUG_CLASSFILES="false"
8036       BUILD_VARIANT_RELEASE=""
8037       HOTSPOT_DEBUG_LEVEL="product"
8038       HOTSPOT_EXPORT="product"
8039       ;;
8040     fastdebug )
8041       VARIANT="DBG"
8042       FASTDEBUG="true"
8043       DEBUG_CLASSFILES="true"
8044       BUILD_VARIANT_RELEASE="-fastdebug"
8045       HOTSPOT_DEBUG_LEVEL="fastdebug"
8046       HOTSPOT_EXPORT="fastdebug"
8047       ;;
8048     slowdebug )
8049       VARIANT="DBG"
8050       FASTDEBUG="false"
8051       DEBUG_CLASSFILES="true"
8052       BUILD_VARIANT_RELEASE="-debug"
8053       HOTSPOT_DEBUG_LEVEL="jvmg"
8054       HOTSPOT_EXPORT="debug"
8055       ;;
8056   esac
8057 
8058   #####
8059   # Generate the legacy makefile targets for hotspot.
8060   # The hotspot api for selecting the build artifacts, really, needs to be improved.
8061   # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
8062   # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
8063   # But until then ...
8064   HOTSPOT_TARGET=""
8065 
8066   if test "x$JVM_VARIANT_SERVER" = xtrue; then
8067     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
8068   fi
8069 
8070   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
8071     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
8072   fi
8073 
8074   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
8075     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
8076   fi
8077 
8078   if test "x$JVM_VARIANT_KERNEL" = xtrue; then
8079     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
8080   fi
8081 
8082   if test "x$JVM_VARIANT_ZERO" = xtrue; then
8083     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
8084   fi
8085 
8086   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
8087     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
8088   fi
8089 
8090   if test "x$JVM_VARIANT_CORE" = xtrue; then
8091     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
8092   fi
8093 
8094   HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
8095 
8096   # On Macosx universal binaries are produced, but they only contain
8097   # 64 bit intel. This invalidates control of which jvms are built
8098   # from configure, but only server is valid anyway. Fix this
8099   # when hotspot makefiles are rewritten.
8100   if test "x$MACOSX_UNIVERSAL" = xtrue; then
8101     HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
8102   fi
8103 
8104   #####
8105 
8106 
8107 
8108 
8109 
8110 
8111 
8112 
8113 # With basic setup done, call the custom early hook.
8114 
8115 
8116 # To properly create a configuration name, we need to have the OpenJDK target
8117 # and options (variants and debug level) parsed.
8118 
8119 
8120 
8121 # Check whether --with-conf-name was given.
8122 if test "${with_conf_name+set}" = set; then :
8123   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
8124 fi
8125 
8126 
8127   # Test from where we are running configure, in or outside of src root.
8128   if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
8129       || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
8130       || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
8131     # We are running configure from the src root.
8132     # Create a default ./build/target-variant-debuglevel output root.
8133     if test "x${CONF_NAME}" = x; then
8134       CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
8135     fi
8136     OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
8137     $MKDIR -p "$OUTPUT_ROOT"
8138     if test ! -d "$OUTPUT_ROOT"; then
8139       as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
8140     fi
8141   else
8142     # We are running configure from outside of the src dir.
8143     # Then use the current directory as output dir!
8144     # If configuration is situated in normal build directory, just use the build
8145     # directory name as configuration name, otherwise use the complete path.
8146     if test "x${CONF_NAME}" = x; then
8147       CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
8148     fi
8149     OUTPUT_ROOT="$CURDIR"
8150 
8151     # WARNING: This might be a bad thing to do. You need to be sure you want to
8152     # have a configuration in this directory. Do some sanity checks!
8153 
8154     if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
8155       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
8156       # other files
8157       files_present=`$LS $OUTPUT_ROOT`
8158       # Configure has already touched config.log and confdefs.h in the current dir when this check
8159       # is performed.
8160       filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
8161       | $TR -d '\n'`
8162       if test "x$filtered_files" != x; then
8163         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
8164 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
8165         { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
8166 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
8167         { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
8168 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
8169         { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
8170 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
8171         { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
8172 $as_echo "$as_me: seriously mess up just about everything." >&6;}
8173         { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
8174 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
8175         { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
8176 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
8177         as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
8178       fi
8179     fi
8180   fi
8181   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
8182 $as_echo_n "checking what configuration name to use... " >&6; }
8183   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
8184 $as_echo "$CONF_NAME" >&6; }
8185 
8186 
8187   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8188 
8189   # Input might be given as Windows format, start by converting to
8190   # unix format.
8191   path="$OUTPUT_ROOT"
8192   new_path=`$CYGPATH -u "$path"`
8193 
8194   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8195   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8196   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8197   # "foo.exe" is OK but "foo" is an error.
8198   #
8199   # This test is therefore slightly more accurate than "test -f" to check for file precense.
8200   # It is also a way to make sure we got the proper file name for the real test later on.
8201   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8202   if test "x$test_shortpath" = x; then
8203     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8204 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8205     as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
8206   fi
8207 
8208   # Call helper function which possibly converts this using DOS-style short mode.
8209   # If so, the updated path is stored in $new_path.
8210 
8211   input_path="$new_path"
8212   # Check if we need to convert this using DOS-style short mode. If the path
8213   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8214   # take no chances and rewrite it.
8215   # Note: m4 eats our [], so we need to use [ and ] instead.
8216   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8217   if test "x$has_forbidden_chars" != x; then
8218     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8219     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8220     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8221     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8222       # Going to short mode and back again did indeed matter. Since short mode is
8223       # case insensitive, let's make it lowercase to improve readability.
8224       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8225       # Now convert it back to Unix-stile (cygpath)
8226       input_path=`$CYGPATH -u "$shortmode_path"`
8227       new_path="$input_path"
8228     fi
8229   fi
8230 
8231   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8232   if test "x$test_cygdrive_prefix" = x; then
8233     # As a simple fix, exclude /usr/bin since it's not a real path.
8234     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
8235       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8236       # a path prefixed by /cygdrive for fixpath to work.
8237       new_path="$CYGWIN_ROOT_PATH$input_path"
8238     fi
8239   fi
8240 
8241 
8242   if test "x$path" != "x$new_path"; then
8243     OUTPUT_ROOT="$new_path"
8244     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8245 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8246   fi
8247 
8248   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8249 
8250   path="$OUTPUT_ROOT"
8251   has_colon=`$ECHO $path | $GREP ^.:`
8252   new_path="$path"
8253   if test "x$has_colon" = x; then
8254     # Not in mixed or Windows style, start by that.
8255     new_path=`cmd //c echo $path`
8256   fi
8257 
8258 
8259   input_path="$new_path"
8260   # Check if we need to convert this using DOS-style short mode. If the path
8261   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8262   # take no chances and rewrite it.
8263   # Note: m4 eats our [], so we need to use [ and ] instead.
8264   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8265   if test "x$has_forbidden_chars" != x; then
8266     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8267     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8268   fi
8269 
8270 
8271   windows_path="$new_path"
8272   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8273     unix_path=`$CYGPATH -u "$windows_path"`
8274     new_path="$unix_path"
8275   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8276     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8277     new_path="$unix_path"
8278   fi
8279 
8280   if test "x$path" != "x$new_path"; then
8281     OUTPUT_ROOT="$new_path"
8282     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8283 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8284   fi
8285 
8286   # Save the first 10 bytes of this path to the storage, so fixpath can work.
8287   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8288 
8289   else
8290     # We're on a posix platform. Hooray! :)
8291     path="$OUTPUT_ROOT"
8292     has_space=`$ECHO "$path" | $GREP " "`
8293     if test "x$has_space" != x; then
8294       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8295 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8296       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8297     fi
8298 
8299     # Use eval to expand a potential ~
8300     eval path="$path"
8301     if test ! -f "$path" && test ! -d "$path"; then
8302       as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8303     fi
8304 
8305     OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
8306   fi
8307 
8308 
8309   SPEC=$OUTPUT_ROOT/spec.gmk
8310 
8311   CONF_NAME=$CONF_NAME
8312 
8313   OUTPUT_ROOT=$OUTPUT_ROOT
8314 
8315 
8316   # Most of the probed defines are put into config.h
8317   ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8318 
8319   # The spec.gmk file contains all variables for the make system.
8320   ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8321 
8322   # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8323   ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8324 
8325   # The bootcycle-spec.gmk file contains support for boot cycle builds.
8326   ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8327 
8328   # The compare.sh is used to compare the build output to other builds.
8329   ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8330 
8331   # Spec.sh is currently used by compare-objects.sh
8332   ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8333 
8334   # The generated Makefile knows where the spec.gmk is and where the source is.
8335   # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8336   # which will look for generated configurations
8337   ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8338 
8339 
8340   # Save the arguments given to us
8341   echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8342 
8343 
8344 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8345 
8346   for ac_prog in apt-get yum port pkgutil pkgadd
8347 do
8348   # Extract the first word of "$ac_prog", so it can be a program name with args.
8349 set dummy $ac_prog; ac_word=$2
8350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8351 $as_echo_n "checking for $ac_word... " >&6; }
8352 if ${ac_cv_prog_PKGHANDLER+:} false; then :
8353   $as_echo_n "(cached) " >&6
8354 else
8355   if test -n "$PKGHANDLER"; then
8356   ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8357 else
8358 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8359 for as_dir in $PATH
8360 do
8361   IFS=$as_save_IFS
8362   test -z "$as_dir" && as_dir=.
8363     for ac_exec_ext in '' $ac_executable_extensions; do
8364   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8365     ac_cv_prog_PKGHANDLER="$ac_prog"
8366     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8367     break 2
8368   fi
8369 done
8370   done
8371 IFS=$as_save_IFS
8372 
8373 fi
8374 fi
8375 PKGHANDLER=$ac_cv_prog_PKGHANDLER
8376 if test -n "$PKGHANDLER"; then
8377   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8378 $as_echo "$PKGHANDLER" >&6; }
8379 else
8380   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8381 $as_echo "no" >&6; }
8382 fi
8383 
8384 
8385   test -n "$PKGHANDLER" && break
8386 done
8387 
8388 
8389 
8390 # Setup tools that requires more complex handling, or that is not needed by the configure script.
8391 
8392 
8393   # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8394   if test "x$MAKE" != x; then
8395     # User has supplied a make, test it.
8396     if test ! -f "$MAKE"; then
8397       as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8398     fi
8399 
8400   MAKE_CANDIDATE=""$MAKE""
8401   DESCRIPTION="user supplied MAKE=$MAKE"
8402   if test "x$MAKE_CANDIDATE" != x; then
8403     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8404 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8405     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8406     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8407     if test "x$IS_GNU_MAKE" = x; then
8408       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8409 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8410     else
8411       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
8412       if test "x$IS_MODERN_MAKE" = x; then
8413         { $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
8414 $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;}
8415       else
8416         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8417           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8418             MAKE_EXPECTED_ENV='cygwin'
8419           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8420             MAKE_EXPECTED_ENV='msys'
8421           else
8422             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8423           fi
8424           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8425           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8426         else
8427           # Not relevant for non-Windows
8428           IS_MAKE_CORRECT_ENV=true
8429         fi
8430         if test "x$IS_MAKE_CORRECT_ENV" = x; then
8431           { $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
8432 $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;}
8433         else
8434           FOUND_MAKE=$MAKE_CANDIDATE
8435 
8436   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8437 
8438   # First separate the path from the arguments. This will split at the first
8439   # space.
8440   complete="$FOUND_MAKE"
8441   path="${complete%% *}"
8442   tmp="$complete EOL"
8443   arguments="${tmp#* }"
8444 
8445   # Input might be given as Windows format, start by converting to
8446   # unix format.
8447   new_path=`$CYGPATH -u "$path"`
8448 
8449   # Now try to locate executable using which
8450   new_path=`$WHICH "$new_path" 2> /dev/null`
8451   # bat and cmd files are not always considered executable in cygwin causing which
8452   # to not find them
8453   if test "x$new_path" = x \
8454       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8455       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8456     new_path=`$CYGPATH -u "$path"`
8457   fi
8458   if test "x$new_path" = x; then
8459     # Oops. Which didn't find the executable.
8460     # The splitting of arguments from the executable at a space might have been incorrect,
8461     # since paths with space are more likely in Windows. Give it another try with the whole
8462     # argument.
8463     path="$complete"
8464     arguments="EOL"
8465     new_path=`$CYGPATH -u "$path"`
8466     new_path=`$WHICH "$new_path" 2> /dev/null`
8467     # bat and cmd files are not always considered executable in cygwin causing which
8468     # to not find them
8469     if test "x$new_path" = x \
8470         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8471         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8472       new_path=`$CYGPATH -u "$path"`
8473     fi
8474     if test "x$new_path" = x; then
8475       # It's still not found. Now this is an unrecoverable error.
8476       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8477 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8478       has_space=`$ECHO "$complete" | $GREP " "`
8479       if test "x$has_space" != x; then
8480         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8481 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8482       fi
8483       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8484     fi
8485   fi
8486 
8487   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8488   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8489   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8490   # "foo.exe" is OK but "foo" is an error.
8491   #
8492   # This test is therefore slightly more accurate than "test -f" to check for file presence.
8493   # It is also a way to make sure we got the proper file name for the real test later on.
8494   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8495   if test "x$test_shortpath" = x; then
8496     # Short path failed, file does not exist as specified.
8497     # Try adding .exe or .cmd
8498     if test -f "${new_path}.exe"; then
8499       input_to_shortpath="${new_path}.exe"
8500     elif test -f "${new_path}.cmd"; then
8501       input_to_shortpath="${new_path}.cmd"
8502     else
8503       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8504 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8505       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8506 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8507       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8508     fi
8509   else
8510     input_to_shortpath="$new_path"
8511   fi
8512 
8513   # Call helper function which possibly converts this using DOS-style short mode.
8514   # If so, the updated path is stored in $new_path.
8515   new_path="$input_to_shortpath"
8516 
8517   input_path="$input_to_shortpath"
8518   # Check if we need to convert this using DOS-style short mode. If the path
8519   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8520   # take no chances and rewrite it.
8521   # Note: m4 eats our [], so we need to use [ and ] instead.
8522   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8523   if test "x$has_forbidden_chars" != x; then
8524     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8525     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8526     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8527     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8528       # Going to short mode and back again did indeed matter. Since short mode is
8529       # case insensitive, let's make it lowercase to improve readability.
8530       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8531       # Now convert it back to Unix-stile (cygpath)
8532       input_path=`$CYGPATH -u "$shortmode_path"`
8533       new_path="$input_path"
8534     fi
8535   fi
8536 
8537   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8538   if test "x$test_cygdrive_prefix" = x; then
8539     # As a simple fix, exclude /usr/bin since it's not a real path.
8540     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8541       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8542       # a path prefixed by /cygdrive for fixpath to work.
8543       new_path="$CYGWIN_ROOT_PATH$input_path"
8544     fi
8545   fi
8546 
8547   # remove trailing .exe if any
8548   new_path="${new_path/%.exe/}"
8549 
8550   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8551 
8552   # First separate the path from the arguments. This will split at the first
8553   # space.
8554   complete="$FOUND_MAKE"
8555   path="${complete%% *}"
8556   tmp="$complete EOL"
8557   arguments="${tmp#* }"
8558 
8559   # Input might be given as Windows format, start by converting to
8560   # unix format.
8561   new_path="$path"
8562 
8563   windows_path="$new_path"
8564   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8565     unix_path=`$CYGPATH -u "$windows_path"`
8566     new_path="$unix_path"
8567   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8568     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8569     new_path="$unix_path"
8570   fi
8571 
8572 
8573   # Now try to locate executable using which
8574   new_path=`$WHICH "$new_path" 2> /dev/null`
8575 
8576   if test "x$new_path" = x; then
8577     # Oops. Which didn't find the executable.
8578     # The splitting of arguments from the executable at a space might have been incorrect,
8579     # since paths with space are more likely in Windows. Give it another try with the whole
8580     # argument.
8581     path="$complete"
8582     arguments="EOL"
8583     new_path="$path"
8584 
8585   windows_path="$new_path"
8586   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8587     unix_path=`$CYGPATH -u "$windows_path"`
8588     new_path="$unix_path"
8589   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8590     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8591     new_path="$unix_path"
8592   fi
8593 
8594 
8595     new_path=`$WHICH "$new_path" 2> /dev/null`
8596 
8597     if test "x$new_path" = x; then
8598       # It's still not found. Now this is an unrecoverable error.
8599       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8600 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8601       has_space=`$ECHO "$complete" | $GREP " "`
8602       if test "x$has_space" != x; then
8603         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8604 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8605       fi
8606       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8607     fi
8608   fi
8609 
8610   # Now new_path has a complete unix path to the binary
8611   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8612     # Keep paths in /bin as-is, but remove trailing .exe if any
8613     new_path="${new_path/%.exe/}"
8614     # Do not save /bin paths to all_fixpath_prefixes!
8615   else
8616     # Not in mixed or Windows style, start by that.
8617     new_path=`cmd //c echo $new_path`
8618 
8619   input_path="$new_path"
8620   # Check if we need to convert this using DOS-style short mode. If the path
8621   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8622   # take no chances and rewrite it.
8623   # Note: m4 eats our [], so we need to use [ and ] instead.
8624   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8625   if test "x$has_forbidden_chars" != x; then
8626     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8627     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8628   fi
8629 
8630     # Output is in $new_path
8631 
8632   windows_path="$new_path"
8633   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8634     unix_path=`$CYGPATH -u "$windows_path"`
8635     new_path="$unix_path"
8636   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8637     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8638     new_path="$unix_path"
8639   fi
8640 
8641     # remove trailing .exe if any
8642     new_path="${new_path/%.exe/}"
8643 
8644     # Save the first 10 bytes of this path to the storage, so fixpath can work.
8645     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8646   fi
8647 
8648   else
8649     # We're on a posix platform. Hooray! :)
8650     # First separate the path from the arguments. This will split at the first
8651     # space.
8652     complete="$FOUND_MAKE"
8653     path="${complete%% *}"
8654     tmp="$complete EOL"
8655     arguments="${tmp#* }"
8656 
8657     # Cannot rely on the command "which" here since it doesn't always work.
8658     is_absolute_path=`$ECHO "$path" | $GREP ^/`
8659     if test -z "$is_absolute_path"; then
8660       # Path to executable is not absolute. Find it.
8661       IFS_save="$IFS"
8662       IFS=:
8663       for p in $PATH; do
8664         if test -f "$p/$path" && test -x "$p/$path"; then
8665           new_path="$p/$path"
8666           break
8667         fi
8668       done
8669       IFS="$IFS_save"
8670     else
8671       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8672 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8673       new_path="$path"
8674     fi
8675 
8676     if test "x$new_path" = x; then
8677       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8678 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8679       has_space=`$ECHO "$complete" | $GREP " "`
8680       if test "x$has_space" != x; then
8681         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8682 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8683       fi
8684       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8685     fi
8686   fi
8687 
8688   # Now join together the path and the arguments once again
8689   if test "x$arguments" != xEOL; then
8690     new_complete="$new_path ${arguments% *}"
8691   else
8692     new_complete="$new_path"
8693   fi
8694 
8695   if test "x$complete" != "x$new_complete"; then
8696     FOUND_MAKE="$new_complete"
8697     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8698 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8699   fi
8700 
8701         fi
8702       fi
8703     fi
8704   fi
8705 
8706     if test "x$FOUND_MAKE" = x; then
8707       as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8708     fi
8709   else
8710     # Try our hardest to locate a correct version of GNU make
8711     for ac_prog in gmake
8712 do
8713   # Extract the first word of "$ac_prog", so it can be a program name with args.
8714 set dummy $ac_prog; ac_word=$2
8715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8716 $as_echo_n "checking for $ac_word... " >&6; }
8717 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
8718   $as_echo_n "(cached) " >&6
8719 else
8720   case $CHECK_GMAKE in
8721   [\\/]* | ?:[\\/]*)
8722   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8723   ;;
8724   *)
8725   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8726 for as_dir in $PATH
8727 do
8728   IFS=$as_save_IFS
8729   test -z "$as_dir" && as_dir=.
8730     for ac_exec_ext in '' $ac_executable_extensions; do
8731   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8732     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8733     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8734     break 2
8735   fi
8736 done
8737   done
8738 IFS=$as_save_IFS
8739 
8740   ;;
8741 esac
8742 fi
8743 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8744 if test -n "$CHECK_GMAKE"; then
8745   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8746 $as_echo "$CHECK_GMAKE" >&6; }
8747 else
8748   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8749 $as_echo "no" >&6; }
8750 fi
8751 
8752 
8753   test -n "$CHECK_GMAKE" && break
8754 done
8755 
8756 
8757   MAKE_CANDIDATE=""$CHECK_GMAKE""
8758   DESCRIPTION="gmake in PATH"
8759   if test "x$MAKE_CANDIDATE" != x; then
8760     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8761 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8762     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8763     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8764     if test "x$IS_GNU_MAKE" = x; then
8765       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8766 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8767     else
8768       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
8769       if test "x$IS_MODERN_MAKE" = x; then
8770         { $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
8771 $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;}
8772       else
8773         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8774           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8775             MAKE_EXPECTED_ENV='cygwin'
8776           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8777             MAKE_EXPECTED_ENV='msys'
8778           else
8779             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8780           fi
8781           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8782           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8783         else
8784           # Not relevant for non-Windows
8785           IS_MAKE_CORRECT_ENV=true
8786         fi
8787         if test "x$IS_MAKE_CORRECT_ENV" = x; then
8788           { $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
8789 $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;}
8790         else
8791           FOUND_MAKE=$MAKE_CANDIDATE
8792 
8793   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8794 
8795   # First separate the path from the arguments. This will split at the first
8796   # space.
8797   complete="$FOUND_MAKE"
8798   path="${complete%% *}"
8799   tmp="$complete EOL"
8800   arguments="${tmp#* }"
8801 
8802   # Input might be given as Windows format, start by converting to
8803   # unix format.
8804   new_path=`$CYGPATH -u "$path"`
8805 
8806   # Now try to locate executable using which
8807   new_path=`$WHICH "$new_path" 2> /dev/null`
8808   # bat and cmd files are not always considered executable in cygwin causing which
8809   # to not find them
8810   if test "x$new_path" = x \
8811       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8812       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8813     new_path=`$CYGPATH -u "$path"`
8814   fi
8815   if test "x$new_path" = x; then
8816     # Oops. Which didn't find the executable.
8817     # The splitting of arguments from the executable at a space might have been incorrect,
8818     # since paths with space are more likely in Windows. Give it another try with the whole
8819     # argument.
8820     path="$complete"
8821     arguments="EOL"
8822     new_path=`$CYGPATH -u "$path"`
8823     new_path=`$WHICH "$new_path" 2> /dev/null`
8824     # bat and cmd files are not always considered executable in cygwin causing which
8825     # to not find them
8826     if test "x$new_path" = x \
8827         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8828         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8829       new_path=`$CYGPATH -u "$path"`
8830     fi
8831     if test "x$new_path" = x; then
8832       # It's still not found. Now this is an unrecoverable error.
8833       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8834 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8835       has_space=`$ECHO "$complete" | $GREP " "`
8836       if test "x$has_space" != x; then
8837         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8838 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8839       fi
8840       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8841     fi
8842   fi
8843 
8844   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8845   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8846   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8847   # "foo.exe" is OK but "foo" is an error.
8848   #
8849   # This test is therefore slightly more accurate than "test -f" to check for file presence.
8850   # It is also a way to make sure we got the proper file name for the real test later on.
8851   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8852   if test "x$test_shortpath" = x; then
8853     # Short path failed, file does not exist as specified.
8854     # Try adding .exe or .cmd
8855     if test -f "${new_path}.exe"; then
8856       input_to_shortpath="${new_path}.exe"
8857     elif test -f "${new_path}.cmd"; then
8858       input_to_shortpath="${new_path}.cmd"
8859     else
8860       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8861 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8862       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8863 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8864       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8865     fi
8866   else
8867     input_to_shortpath="$new_path"
8868   fi
8869 
8870   # Call helper function which possibly converts this using DOS-style short mode.
8871   # If so, the updated path is stored in $new_path.
8872   new_path="$input_to_shortpath"
8873 
8874   input_path="$input_to_shortpath"
8875   # Check if we need to convert this using DOS-style short mode. If the path
8876   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8877   # take no chances and rewrite it.
8878   # Note: m4 eats our [], so we need to use [ and ] instead.
8879   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8880   if test "x$has_forbidden_chars" != x; then
8881     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8882     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8883     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8884     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8885       # Going to short mode and back again did indeed matter. Since short mode is
8886       # case insensitive, let's make it lowercase to improve readability.
8887       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8888       # Now convert it back to Unix-stile (cygpath)
8889       input_path=`$CYGPATH -u "$shortmode_path"`
8890       new_path="$input_path"
8891     fi
8892   fi
8893 
8894   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8895   if test "x$test_cygdrive_prefix" = x; then
8896     # As a simple fix, exclude /usr/bin since it's not a real path.
8897     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8898       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8899       # a path prefixed by /cygdrive for fixpath to work.
8900       new_path="$CYGWIN_ROOT_PATH$input_path"
8901     fi
8902   fi
8903 
8904   # remove trailing .exe if any
8905   new_path="${new_path/%.exe/}"
8906 
8907   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8908 
8909   # First separate the path from the arguments. This will split at the first
8910   # space.
8911   complete="$FOUND_MAKE"
8912   path="${complete%% *}"
8913   tmp="$complete EOL"
8914   arguments="${tmp#* }"
8915 
8916   # Input might be given as Windows format, start by converting to
8917   # unix format.
8918   new_path="$path"
8919 
8920   windows_path="$new_path"
8921   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8922     unix_path=`$CYGPATH -u "$windows_path"`
8923     new_path="$unix_path"
8924   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8925     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8926     new_path="$unix_path"
8927   fi
8928 
8929 
8930   # Now try to locate executable using which
8931   new_path=`$WHICH "$new_path" 2> /dev/null`
8932 
8933   if test "x$new_path" = x; then
8934     # Oops. Which didn't find the executable.
8935     # The splitting of arguments from the executable at a space might have been incorrect,
8936     # since paths with space are more likely in Windows. Give it another try with the whole
8937     # argument.
8938     path="$complete"
8939     arguments="EOL"
8940     new_path="$path"
8941 
8942   windows_path="$new_path"
8943   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8944     unix_path=`$CYGPATH -u "$windows_path"`
8945     new_path="$unix_path"
8946   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8947     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8948     new_path="$unix_path"
8949   fi
8950 
8951 
8952     new_path=`$WHICH "$new_path" 2> /dev/null`
8953 
8954     if test "x$new_path" = x; then
8955       # It's still not found. Now this is an unrecoverable error.
8956       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8957 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8958       has_space=`$ECHO "$complete" | $GREP " "`
8959       if test "x$has_space" != x; then
8960         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8961 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8962       fi
8963       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8964     fi
8965   fi
8966 
8967   # Now new_path has a complete unix path to the binary
8968   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8969     # Keep paths in /bin as-is, but remove trailing .exe if any
8970     new_path="${new_path/%.exe/}"
8971     # Do not save /bin paths to all_fixpath_prefixes!
8972   else
8973     # Not in mixed or Windows style, start by that.
8974     new_path=`cmd //c echo $new_path`
8975 
8976   input_path="$new_path"
8977   # Check if we need to convert this using DOS-style short mode. If the path
8978   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8979   # take no chances and rewrite it.
8980   # Note: m4 eats our [], so we need to use [ and ] instead.
8981   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8982   if test "x$has_forbidden_chars" != x; then
8983     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8984     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8985   fi
8986 
8987     # Output is in $new_path
8988 
8989   windows_path="$new_path"
8990   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8991     unix_path=`$CYGPATH -u "$windows_path"`
8992     new_path="$unix_path"
8993   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8994     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8995     new_path="$unix_path"
8996   fi
8997 
8998     # remove trailing .exe if any
8999     new_path="${new_path/%.exe/}"
9000 
9001     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9002     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9003   fi
9004 
9005   else
9006     # We're on a posix platform. Hooray! :)
9007     # First separate the path from the arguments. This will split at the first
9008     # space.
9009     complete="$FOUND_MAKE"
9010     path="${complete%% *}"
9011     tmp="$complete EOL"
9012     arguments="${tmp#* }"
9013 
9014     # Cannot rely on the command "which" here since it doesn't always work.
9015     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9016     if test -z "$is_absolute_path"; then
9017       # Path to executable is not absolute. Find it.
9018       IFS_save="$IFS"
9019       IFS=:
9020       for p in $PATH; do
9021         if test -f "$p/$path" && test -x "$p/$path"; then
9022           new_path="$p/$path"
9023           break
9024         fi
9025       done
9026       IFS="$IFS_save"
9027     else
9028       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9029 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9030       new_path="$path"
9031     fi
9032 
9033     if test "x$new_path" = x; then
9034       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9035 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9036       has_space=`$ECHO "$complete" | $GREP " "`
9037       if test "x$has_space" != x; then
9038         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9039 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9040       fi
9041       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9042     fi
9043   fi
9044 
9045   # Now join together the path and the arguments once again
9046   if test "x$arguments" != xEOL; then
9047     new_complete="$new_path ${arguments% *}"
9048   else
9049     new_complete="$new_path"
9050   fi
9051 
9052   if test "x$complete" != "x$new_complete"; then
9053     FOUND_MAKE="$new_complete"
9054     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9055 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9056   fi
9057 
9058         fi
9059       fi
9060     fi
9061   fi
9062 
9063 
9064     if test "x$FOUND_MAKE" = x; then
9065       for ac_prog in make
9066 do
9067   # Extract the first word of "$ac_prog", so it can be a program name with args.
9068 set dummy $ac_prog; ac_word=$2
9069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9070 $as_echo_n "checking for $ac_word... " >&6; }
9071 if ${ac_cv_path_CHECK_MAKE+:} false; then :
9072   $as_echo_n "(cached) " >&6
9073 else
9074   case $CHECK_MAKE in
9075   [\\/]* | ?:[\\/]*)
9076   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
9077   ;;
9078   *)
9079   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9080 for as_dir in $PATH
9081 do
9082   IFS=$as_save_IFS
9083   test -z "$as_dir" && as_dir=.
9084     for ac_exec_ext in '' $ac_executable_extensions; do
9085   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9086     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
9087     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9088     break 2
9089   fi
9090 done
9091   done
9092 IFS=$as_save_IFS
9093 
9094   ;;
9095 esac
9096 fi
9097 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
9098 if test -n "$CHECK_MAKE"; then
9099   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
9100 $as_echo "$CHECK_MAKE" >&6; }
9101 else
9102   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9103 $as_echo "no" >&6; }
9104 fi
9105 
9106 
9107   test -n "$CHECK_MAKE" && break
9108 done
9109 
9110 
9111   MAKE_CANDIDATE=""$CHECK_MAKE""
9112   DESCRIPTION="make in PATH"
9113   if test "x$MAKE_CANDIDATE" != x; then
9114     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9115 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9116     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9117     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9118     if test "x$IS_GNU_MAKE" = x; then
9119       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9120 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9121     else
9122       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
9123       if test "x$IS_MODERN_MAKE" = x; then
9124         { $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
9125 $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;}
9126       else
9127         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9128           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9129             MAKE_EXPECTED_ENV='cygwin'
9130           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9131             MAKE_EXPECTED_ENV='msys'
9132           else
9133             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9134           fi
9135           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9136           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9137         else
9138           # Not relevant for non-Windows
9139           IS_MAKE_CORRECT_ENV=true
9140         fi
9141         if test "x$IS_MAKE_CORRECT_ENV" = x; then
9142           { $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
9143 $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;}
9144         else
9145           FOUND_MAKE=$MAKE_CANDIDATE
9146 
9147   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9148 
9149   # First separate the path from the arguments. This will split at the first
9150   # space.
9151   complete="$FOUND_MAKE"
9152   path="${complete%% *}"
9153   tmp="$complete EOL"
9154   arguments="${tmp#* }"
9155 
9156   # Input might be given as Windows format, start by converting to
9157   # unix format.
9158   new_path=`$CYGPATH -u "$path"`
9159 
9160   # Now try to locate executable using which
9161   new_path=`$WHICH "$new_path" 2> /dev/null`
9162   # bat and cmd files are not always considered executable in cygwin causing which
9163   # to not find them
9164   if test "x$new_path" = x \
9165       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9166       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9167     new_path=`$CYGPATH -u "$path"`
9168   fi
9169   if test "x$new_path" = x; then
9170     # Oops. Which didn't find the executable.
9171     # The splitting of arguments from the executable at a space might have been incorrect,
9172     # since paths with space are more likely in Windows. Give it another try with the whole
9173     # argument.
9174     path="$complete"
9175     arguments="EOL"
9176     new_path=`$CYGPATH -u "$path"`
9177     new_path=`$WHICH "$new_path" 2> /dev/null`
9178     # bat and cmd files are not always considered executable in cygwin causing which
9179     # to not find them
9180     if test "x$new_path" = x \
9181         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9182         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9183       new_path=`$CYGPATH -u "$path"`
9184     fi
9185     if test "x$new_path" = x; then
9186       # It's still not found. Now this is an unrecoverable error.
9187       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9188 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9189       has_space=`$ECHO "$complete" | $GREP " "`
9190       if test "x$has_space" != x; then
9191         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9192 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9193       fi
9194       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9195     fi
9196   fi
9197 
9198   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9199   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9200   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9201   # "foo.exe" is OK but "foo" is an error.
9202   #
9203   # This test is therefore slightly more accurate than "test -f" to check for file presence.
9204   # It is also a way to make sure we got the proper file name for the real test later on.
9205   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9206   if test "x$test_shortpath" = x; then
9207     # Short path failed, file does not exist as specified.
9208     # Try adding .exe or .cmd
9209     if test -f "${new_path}.exe"; then
9210       input_to_shortpath="${new_path}.exe"
9211     elif test -f "${new_path}.cmd"; then
9212       input_to_shortpath="${new_path}.cmd"
9213     else
9214       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9215 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9216       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9217 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9218       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9219     fi
9220   else
9221     input_to_shortpath="$new_path"
9222   fi
9223 
9224   # Call helper function which possibly converts this using DOS-style short mode.
9225   # If so, the updated path is stored in $new_path.
9226   new_path="$input_to_shortpath"
9227 
9228   input_path="$input_to_shortpath"
9229   # Check if we need to convert this using DOS-style short mode. If the path
9230   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9231   # take no chances and rewrite it.
9232   # Note: m4 eats our [], so we need to use [ and ] instead.
9233   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9234   if test "x$has_forbidden_chars" != x; then
9235     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9236     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9237     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9238     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9239       # Going to short mode and back again did indeed matter. Since short mode is
9240       # case insensitive, let's make it lowercase to improve readability.
9241       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9242       # Now convert it back to Unix-stile (cygpath)
9243       input_path=`$CYGPATH -u "$shortmode_path"`
9244       new_path="$input_path"
9245     fi
9246   fi
9247 
9248   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9249   if test "x$test_cygdrive_prefix" = x; then
9250     # As a simple fix, exclude /usr/bin since it's not a real path.
9251     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9252       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9253       # a path prefixed by /cygdrive for fixpath to work.
9254       new_path="$CYGWIN_ROOT_PATH$input_path"
9255     fi
9256   fi
9257 
9258   # remove trailing .exe if any
9259   new_path="${new_path/%.exe/}"
9260 
9261   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9262 
9263   # First separate the path from the arguments. This will split at the first
9264   # space.
9265   complete="$FOUND_MAKE"
9266   path="${complete%% *}"
9267   tmp="$complete EOL"
9268   arguments="${tmp#* }"
9269 
9270   # Input might be given as Windows format, start by converting to
9271   # unix format.
9272   new_path="$path"
9273 
9274   windows_path="$new_path"
9275   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9276     unix_path=`$CYGPATH -u "$windows_path"`
9277     new_path="$unix_path"
9278   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9279     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9280     new_path="$unix_path"
9281   fi
9282 
9283 
9284   # Now try to locate executable using which
9285   new_path=`$WHICH "$new_path" 2> /dev/null`
9286 
9287   if test "x$new_path" = x; then
9288     # Oops. Which didn't find the executable.
9289     # The splitting of arguments from the executable at a space might have been incorrect,
9290     # since paths with space are more likely in Windows. Give it another try with the whole
9291     # argument.
9292     path="$complete"
9293     arguments="EOL"
9294     new_path="$path"
9295 
9296   windows_path="$new_path"
9297   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9298     unix_path=`$CYGPATH -u "$windows_path"`
9299     new_path="$unix_path"
9300   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9301     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9302     new_path="$unix_path"
9303   fi
9304 
9305 
9306     new_path=`$WHICH "$new_path" 2> /dev/null`
9307 
9308     if test "x$new_path" = x; then
9309       # It's still not found. Now this is an unrecoverable error.
9310       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9311 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9312       has_space=`$ECHO "$complete" | $GREP " "`
9313       if test "x$has_space" != x; then
9314         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9315 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9316       fi
9317       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9318     fi
9319   fi
9320 
9321   # Now new_path has a complete unix path to the binary
9322   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9323     # Keep paths in /bin as-is, but remove trailing .exe if any
9324     new_path="${new_path/%.exe/}"
9325     # Do not save /bin paths to all_fixpath_prefixes!
9326   else
9327     # Not in mixed or Windows style, start by that.
9328     new_path=`cmd //c echo $new_path`
9329 
9330   input_path="$new_path"
9331   # Check if we need to convert this using DOS-style short mode. If the path
9332   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9333   # take no chances and rewrite it.
9334   # Note: m4 eats our [], so we need to use [ and ] instead.
9335   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9336   if test "x$has_forbidden_chars" != x; then
9337     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9338     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9339   fi
9340 
9341     # Output is in $new_path
9342 
9343   windows_path="$new_path"
9344   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9345     unix_path=`$CYGPATH -u "$windows_path"`
9346     new_path="$unix_path"
9347   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9348     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9349     new_path="$unix_path"
9350   fi
9351 
9352     # remove trailing .exe if any
9353     new_path="${new_path/%.exe/}"
9354 
9355     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9356     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9357   fi
9358 
9359   else
9360     # We're on a posix platform. Hooray! :)
9361     # First separate the path from the arguments. This will split at the first
9362     # space.
9363     complete="$FOUND_MAKE"
9364     path="${complete%% *}"
9365     tmp="$complete EOL"
9366     arguments="${tmp#* }"
9367 
9368     # Cannot rely on the command "which" here since it doesn't always work.
9369     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9370     if test -z "$is_absolute_path"; then
9371       # Path to executable is not absolute. Find it.
9372       IFS_save="$IFS"
9373       IFS=:
9374       for p in $PATH; do
9375         if test -f "$p/$path" && test -x "$p/$path"; then
9376           new_path="$p/$path"
9377           break
9378         fi
9379       done
9380       IFS="$IFS_save"
9381     else
9382       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9383 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9384       new_path="$path"
9385     fi
9386 
9387     if test "x$new_path" = x; then
9388       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9389 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9390       has_space=`$ECHO "$complete" | $GREP " "`
9391       if test "x$has_space" != x; then
9392         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9393 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9394       fi
9395       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9396     fi
9397   fi
9398 
9399   # Now join together the path and the arguments once again
9400   if test "x$arguments" != xEOL; then
9401     new_complete="$new_path ${arguments% *}"
9402   else
9403     new_complete="$new_path"
9404   fi
9405 
9406   if test "x$complete" != "x$new_complete"; then
9407     FOUND_MAKE="$new_complete"
9408     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9409 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9410   fi
9411 
9412         fi
9413       fi
9414     fi
9415   fi
9416 
9417     fi
9418 
9419     if test "x$FOUND_MAKE" = x; then
9420       if test "x$TOOLS_DIR" != x; then
9421         # We have a tools-dir, check that as well before giving up.
9422         OLD_PATH=$PATH
9423         PATH=$TOOLS_DIR:$PATH
9424         for ac_prog in gmake
9425 do
9426   # Extract the first word of "$ac_prog", so it can be a program name with args.
9427 set dummy $ac_prog; ac_word=$2
9428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9429 $as_echo_n "checking for $ac_word... " >&6; }
9430 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
9431   $as_echo_n "(cached) " >&6
9432 else
9433   case $CHECK_TOOLSDIR_GMAKE in
9434   [\\/]* | ?:[\\/]*)
9435   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9436   ;;
9437   *)
9438   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9439 for as_dir in $PATH
9440 do
9441   IFS=$as_save_IFS
9442   test -z "$as_dir" && as_dir=.
9443     for ac_exec_ext in '' $ac_executable_extensions; do
9444   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9445     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9446     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9447     break 2
9448   fi
9449 done
9450   done
9451 IFS=$as_save_IFS
9452 
9453   ;;
9454 esac
9455 fi
9456 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9457 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9458   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9459 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9460 else
9461   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9462 $as_echo "no" >&6; }
9463 fi
9464 
9465 
9466   test -n "$CHECK_TOOLSDIR_GMAKE" && break
9467 done
9468 
9469 
9470   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9471   DESCRIPTION="gmake in tools-dir"
9472   if test "x$MAKE_CANDIDATE" != x; then
9473     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9474 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9475     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9476     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9477     if test "x$IS_GNU_MAKE" = x; then
9478       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9479 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9480     else
9481       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
9482       if test "x$IS_MODERN_MAKE" = x; then
9483         { $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
9484 $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;}
9485       else
9486         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9487           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9488             MAKE_EXPECTED_ENV='cygwin'
9489           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9490             MAKE_EXPECTED_ENV='msys'
9491           else
9492             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9493           fi
9494           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9495           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9496         else
9497           # Not relevant for non-Windows
9498           IS_MAKE_CORRECT_ENV=true
9499         fi
9500         if test "x$IS_MAKE_CORRECT_ENV" = x; then
9501           { $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
9502 $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;}
9503         else
9504           FOUND_MAKE=$MAKE_CANDIDATE
9505 
9506   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9507 
9508   # First separate the path from the arguments. This will split at the first
9509   # space.
9510   complete="$FOUND_MAKE"
9511   path="${complete%% *}"
9512   tmp="$complete EOL"
9513   arguments="${tmp#* }"
9514 
9515   # Input might be given as Windows format, start by converting to
9516   # unix format.
9517   new_path=`$CYGPATH -u "$path"`
9518 
9519   # Now try to locate executable using which
9520   new_path=`$WHICH "$new_path" 2> /dev/null`
9521   # bat and cmd files are not always considered executable in cygwin causing which
9522   # to not find them
9523   if test "x$new_path" = x \
9524       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9525       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9526     new_path=`$CYGPATH -u "$path"`
9527   fi
9528   if test "x$new_path" = x; then
9529     # Oops. Which didn't find the executable.
9530     # The splitting of arguments from the executable at a space might have been incorrect,
9531     # since paths with space are more likely in Windows. Give it another try with the whole
9532     # argument.
9533     path="$complete"
9534     arguments="EOL"
9535     new_path=`$CYGPATH -u "$path"`
9536     new_path=`$WHICH "$new_path" 2> /dev/null`
9537     # bat and cmd files are not always considered executable in cygwin causing which
9538     # to not find them
9539     if test "x$new_path" = x \
9540         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9541         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9542       new_path=`$CYGPATH -u "$path"`
9543     fi
9544     if test "x$new_path" = x; then
9545       # It's still not found. Now this is an unrecoverable error.
9546       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9547 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9548       has_space=`$ECHO "$complete" | $GREP " "`
9549       if test "x$has_space" != x; then
9550         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9551 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9552       fi
9553       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9554     fi
9555   fi
9556 
9557   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9558   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9559   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9560   # "foo.exe" is OK but "foo" is an error.
9561   #
9562   # This test is therefore slightly more accurate than "test -f" to check for file presence.
9563   # It is also a way to make sure we got the proper file name for the real test later on.
9564   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9565   if test "x$test_shortpath" = x; then
9566     # Short path failed, file does not exist as specified.
9567     # Try adding .exe or .cmd
9568     if test -f "${new_path}.exe"; then
9569       input_to_shortpath="${new_path}.exe"
9570     elif test -f "${new_path}.cmd"; then
9571       input_to_shortpath="${new_path}.cmd"
9572     else
9573       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9574 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9575       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9576 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9577       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9578     fi
9579   else
9580     input_to_shortpath="$new_path"
9581   fi
9582 
9583   # Call helper function which possibly converts this using DOS-style short mode.
9584   # If so, the updated path is stored in $new_path.
9585   new_path="$input_to_shortpath"
9586 
9587   input_path="$input_to_shortpath"
9588   # Check if we need to convert this using DOS-style short mode. If the path
9589   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9590   # take no chances and rewrite it.
9591   # Note: m4 eats our [], so we need to use [ and ] instead.
9592   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9593   if test "x$has_forbidden_chars" != x; then
9594     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9595     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9596     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9597     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9598       # Going to short mode and back again did indeed matter. Since short mode is
9599       # case insensitive, let's make it lowercase to improve readability.
9600       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9601       # Now convert it back to Unix-stile (cygpath)
9602       input_path=`$CYGPATH -u "$shortmode_path"`
9603       new_path="$input_path"
9604     fi
9605   fi
9606 
9607   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9608   if test "x$test_cygdrive_prefix" = x; then
9609     # As a simple fix, exclude /usr/bin since it's not a real path.
9610     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9611       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9612       # a path prefixed by /cygdrive for fixpath to work.
9613       new_path="$CYGWIN_ROOT_PATH$input_path"
9614     fi
9615   fi
9616 
9617   # remove trailing .exe if any
9618   new_path="${new_path/%.exe/}"
9619 
9620   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9621 
9622   # First separate the path from the arguments. This will split at the first
9623   # space.
9624   complete="$FOUND_MAKE"
9625   path="${complete%% *}"
9626   tmp="$complete EOL"
9627   arguments="${tmp#* }"
9628 
9629   # Input might be given as Windows format, start by converting to
9630   # unix format.
9631   new_path="$path"
9632 
9633   windows_path="$new_path"
9634   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9635     unix_path=`$CYGPATH -u "$windows_path"`
9636     new_path="$unix_path"
9637   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9638     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9639     new_path="$unix_path"
9640   fi
9641 
9642 
9643   # Now try to locate executable using which
9644   new_path=`$WHICH "$new_path" 2> /dev/null`
9645 
9646   if test "x$new_path" = x; then
9647     # Oops. Which didn't find the executable.
9648     # The splitting of arguments from the executable at a space might have been incorrect,
9649     # since paths with space are more likely in Windows. Give it another try with the whole
9650     # argument.
9651     path="$complete"
9652     arguments="EOL"
9653     new_path="$path"
9654 
9655   windows_path="$new_path"
9656   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9657     unix_path=`$CYGPATH -u "$windows_path"`
9658     new_path="$unix_path"
9659   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9660     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9661     new_path="$unix_path"
9662   fi
9663 
9664 
9665     new_path=`$WHICH "$new_path" 2> /dev/null`
9666 
9667     if test "x$new_path" = x; then
9668       # It's still not found. Now this is an unrecoverable error.
9669       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9670 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9671       has_space=`$ECHO "$complete" | $GREP " "`
9672       if test "x$has_space" != x; then
9673         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9674 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9675       fi
9676       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9677     fi
9678   fi
9679 
9680   # Now new_path has a complete unix path to the binary
9681   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9682     # Keep paths in /bin as-is, but remove trailing .exe if any
9683     new_path="${new_path/%.exe/}"
9684     # Do not save /bin paths to all_fixpath_prefixes!
9685   else
9686     # Not in mixed or Windows style, start by that.
9687     new_path=`cmd //c echo $new_path`
9688 
9689   input_path="$new_path"
9690   # Check if we need to convert this using DOS-style short mode. If the path
9691   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9692   # take no chances and rewrite it.
9693   # Note: m4 eats our [], so we need to use [ and ] instead.
9694   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9695   if test "x$has_forbidden_chars" != x; then
9696     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9697     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9698   fi
9699 
9700     # Output is in $new_path
9701 
9702   windows_path="$new_path"
9703   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9704     unix_path=`$CYGPATH -u "$windows_path"`
9705     new_path="$unix_path"
9706   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9707     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9708     new_path="$unix_path"
9709   fi
9710 
9711     # remove trailing .exe if any
9712     new_path="${new_path/%.exe/}"
9713 
9714     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9715     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9716   fi
9717 
9718   else
9719     # We're on a posix platform. Hooray! :)
9720     # First separate the path from the arguments. This will split at the first
9721     # space.
9722     complete="$FOUND_MAKE"
9723     path="${complete%% *}"
9724     tmp="$complete EOL"
9725     arguments="${tmp#* }"
9726 
9727     # Cannot rely on the command "which" here since it doesn't always work.
9728     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9729     if test -z "$is_absolute_path"; then
9730       # Path to executable is not absolute. Find it.
9731       IFS_save="$IFS"
9732       IFS=:
9733       for p in $PATH; do
9734         if test -f "$p/$path" && test -x "$p/$path"; then
9735           new_path="$p/$path"
9736           break
9737         fi
9738       done
9739       IFS="$IFS_save"
9740     else
9741       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9742 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9743       new_path="$path"
9744     fi
9745 
9746     if test "x$new_path" = x; then
9747       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9748 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9749       has_space=`$ECHO "$complete" | $GREP " "`
9750       if test "x$has_space" != x; then
9751         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9752 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9753       fi
9754       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9755     fi
9756   fi
9757 
9758   # Now join together the path and the arguments once again
9759   if test "x$arguments" != xEOL; then
9760     new_complete="$new_path ${arguments% *}"
9761   else
9762     new_complete="$new_path"
9763   fi
9764 
9765   if test "x$complete" != "x$new_complete"; then
9766     FOUND_MAKE="$new_complete"
9767     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9768 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9769   fi
9770 
9771         fi
9772       fi
9773     fi
9774   fi
9775 
9776         if test "x$FOUND_MAKE" = x; then
9777           for ac_prog in make
9778 do
9779   # Extract the first word of "$ac_prog", so it can be a program name with args.
9780 set dummy $ac_prog; ac_word=$2
9781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9782 $as_echo_n "checking for $ac_word... " >&6; }
9783 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
9784   $as_echo_n "(cached) " >&6
9785 else
9786   case $CHECK_TOOLSDIR_MAKE in
9787   [\\/]* | ?:[\\/]*)
9788   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9789   ;;
9790   *)
9791   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9792 for as_dir in $PATH
9793 do
9794   IFS=$as_save_IFS
9795   test -z "$as_dir" && as_dir=.
9796     for ac_exec_ext in '' $ac_executable_extensions; do
9797   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9798     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9799     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9800     break 2
9801   fi
9802 done
9803   done
9804 IFS=$as_save_IFS
9805 
9806   ;;
9807 esac
9808 fi
9809 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9810 if test -n "$CHECK_TOOLSDIR_MAKE"; then
9811   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9812 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9813 else
9814   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9815 $as_echo "no" >&6; }
9816 fi
9817 
9818 
9819   test -n "$CHECK_TOOLSDIR_MAKE" && break
9820 done
9821 
9822 
9823   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9824   DESCRIPTION="make in tools-dir"
9825   if test "x$MAKE_CANDIDATE" != x; then
9826     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9827 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9828     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9829     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9830     if test "x$IS_GNU_MAKE" = x; then
9831       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9832 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9833     else
9834       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
9835       if test "x$IS_MODERN_MAKE" = x; then
9836         { $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
9837 $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;}
9838       else
9839         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9840           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9841             MAKE_EXPECTED_ENV='cygwin'
9842           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9843             MAKE_EXPECTED_ENV='msys'
9844           else
9845             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9846           fi
9847           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9848           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9849         else
9850           # Not relevant for non-Windows
9851           IS_MAKE_CORRECT_ENV=true
9852         fi
9853         if test "x$IS_MAKE_CORRECT_ENV" = x; then
9854           { $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
9855 $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;}
9856         else
9857           FOUND_MAKE=$MAKE_CANDIDATE
9858 
9859   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9860 
9861   # First separate the path from the arguments. This will split at the first
9862   # space.
9863   complete="$FOUND_MAKE"
9864   path="${complete%% *}"
9865   tmp="$complete EOL"
9866   arguments="${tmp#* }"
9867 
9868   # Input might be given as Windows format, start by converting to
9869   # unix format.
9870   new_path=`$CYGPATH -u "$path"`
9871 
9872   # Now try to locate executable using which
9873   new_path=`$WHICH "$new_path" 2> /dev/null`
9874   # bat and cmd files are not always considered executable in cygwin causing which
9875   # to not find them
9876   if test "x$new_path" = x \
9877       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9878       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9879     new_path=`$CYGPATH -u "$path"`
9880   fi
9881   if test "x$new_path" = x; then
9882     # Oops. Which didn't find the executable.
9883     # The splitting of arguments from the executable at a space might have been incorrect,
9884     # since paths with space are more likely in Windows. Give it another try with the whole
9885     # argument.
9886     path="$complete"
9887     arguments="EOL"
9888     new_path=`$CYGPATH -u "$path"`
9889     new_path=`$WHICH "$new_path" 2> /dev/null`
9890     # bat and cmd files are not always considered executable in cygwin causing which
9891     # to not find them
9892     if test "x$new_path" = x \
9893         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9894         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9895       new_path=`$CYGPATH -u "$path"`
9896     fi
9897     if test "x$new_path" = x; then
9898       # It's still not found. Now this is an unrecoverable error.
9899       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9900 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9901       has_space=`$ECHO "$complete" | $GREP " "`
9902       if test "x$has_space" != x; then
9903         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9904 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9905       fi
9906       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9907     fi
9908   fi
9909 
9910   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9911   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9912   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9913   # "foo.exe" is OK but "foo" is an error.
9914   #
9915   # This test is therefore slightly more accurate than "test -f" to check for file presence.
9916   # It is also a way to make sure we got the proper file name for the real test later on.
9917   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9918   if test "x$test_shortpath" = x; then
9919     # Short path failed, file does not exist as specified.
9920     # Try adding .exe or .cmd
9921     if test -f "${new_path}.exe"; then
9922       input_to_shortpath="${new_path}.exe"
9923     elif test -f "${new_path}.cmd"; then
9924       input_to_shortpath="${new_path}.cmd"
9925     else
9926       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9927 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9928       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9929 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9930       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9931     fi
9932   else
9933     input_to_shortpath="$new_path"
9934   fi
9935 
9936   # Call helper function which possibly converts this using DOS-style short mode.
9937   # If so, the updated path is stored in $new_path.
9938   new_path="$input_to_shortpath"
9939 
9940   input_path="$input_to_shortpath"
9941   # Check if we need to convert this using DOS-style short mode. If the path
9942   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9943   # take no chances and rewrite it.
9944   # Note: m4 eats our [], so we need to use [ and ] instead.
9945   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9946   if test "x$has_forbidden_chars" != x; then
9947     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9948     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9949     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9950     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9951       # Going to short mode and back again did indeed matter. Since short mode is
9952       # case insensitive, let's make it lowercase to improve readability.
9953       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9954       # Now convert it back to Unix-stile (cygpath)
9955       input_path=`$CYGPATH -u "$shortmode_path"`
9956       new_path="$input_path"
9957     fi
9958   fi
9959 
9960   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9961   if test "x$test_cygdrive_prefix" = x; then
9962     # As a simple fix, exclude /usr/bin since it's not a real path.
9963     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9964       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9965       # a path prefixed by /cygdrive for fixpath to work.
9966       new_path="$CYGWIN_ROOT_PATH$input_path"
9967     fi
9968   fi
9969 
9970   # remove trailing .exe if any
9971   new_path="${new_path/%.exe/}"
9972 
9973   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9974 
9975   # First separate the path from the arguments. This will split at the first
9976   # space.
9977   complete="$FOUND_MAKE"
9978   path="${complete%% *}"
9979   tmp="$complete EOL"
9980   arguments="${tmp#* }"
9981 
9982   # Input might be given as Windows format, start by converting to
9983   # unix format.
9984   new_path="$path"
9985 
9986   windows_path="$new_path"
9987   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9988     unix_path=`$CYGPATH -u "$windows_path"`
9989     new_path="$unix_path"
9990   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9991     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9992     new_path="$unix_path"
9993   fi
9994 
9995 
9996   # Now try to locate executable using which
9997   new_path=`$WHICH "$new_path" 2> /dev/null`
9998 
9999   if test "x$new_path" = x; then
10000     # Oops. Which didn't find the executable.
10001     # The splitting of arguments from the executable at a space might have been incorrect,
10002     # since paths with space are more likely in Windows. Give it another try with the whole
10003     # argument.
10004     path="$complete"
10005     arguments="EOL"
10006     new_path="$path"
10007 
10008   windows_path="$new_path"
10009   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10010     unix_path=`$CYGPATH -u "$windows_path"`
10011     new_path="$unix_path"
10012   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10013     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
10014     new_path="$unix_path"
10015   fi
10016 
10017 
10018     new_path=`$WHICH "$new_path" 2> /dev/null`
10019 
10020     if test "x$new_path" = x; then
10021       # It's still not found. Now this is an unrecoverable error.
10022       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
10023 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
10024       has_space=`$ECHO "$complete" | $GREP " "`
10025       if test "x$has_space" != x; then
10026         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
10027 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
10028       fi
10029       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
10030     fi
10031   fi
10032 
10033   # Now new_path has a complete unix path to the binary
10034   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
10035     # Keep paths in /bin as-is, but remove trailing .exe if any
10036     new_path="${new_path/%.exe/}"
10037     # Do not save /bin paths to all_fixpath_prefixes!
10038   else
10039     # Not in mixed or Windows style, start by that.
10040     new_path=`cmd //c echo $new_path`
10041 
10042   input_path="$new_path"
10043   # Check if we need to convert this using DOS-style short mode. If the path
10044   # contains just simple characters, use it. Otherwise (spaces, weird characters),
10045   # take no chances and rewrite it.
10046   # Note: m4 eats our [], so we need to use [ and ] instead.
10047   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
10048   if test "x$has_forbidden_chars" != x; then
10049     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10050     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10051   fi
10052 
10053     # Output is in $new_path
10054 
10055   windows_path="$new_path"
10056   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10057     unix_path=`$CYGPATH -u "$windows_path"`
10058     new_path="$unix_path"
10059   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10060     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
10061     new_path="$unix_path"
10062   fi
10063 
10064     # remove trailing .exe if any
10065     new_path="${new_path/%.exe/}"
10066 
10067     # Save the first 10 bytes of this path to the storage, so fixpath can work.
10068     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
10069   fi
10070 
10071   else
10072     # We're on a posix platform. Hooray! :)
10073     # First separate the path from the arguments. This will split at the first
10074     # space.
10075     complete="$FOUND_MAKE"
10076     path="${complete%% *}"
10077     tmp="$complete EOL"
10078     arguments="${tmp#* }"
10079 
10080     # Cannot rely on the command "which" here since it doesn't always work.
10081     is_absolute_path=`$ECHO "$path" | $GREP ^/`
10082     if test -z "$is_absolute_path"; then
10083       # Path to executable is not absolute. Find it.
10084       IFS_save="$IFS"
10085       IFS=:
10086       for p in $PATH; do
10087         if test -f "$p/$path" && test -x "$p/$path"; then
10088           new_path="$p/$path"
10089           break
10090         fi
10091       done
10092       IFS="$IFS_save"
10093     else
10094       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
10095 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
10096       new_path="$path"
10097     fi
10098 
10099     if test "x$new_path" = x; then
10100       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
10101 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
10102       has_space=`$ECHO "$complete" | $GREP " "`
10103       if test "x$has_space" != x; then
10104         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
10105 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
10106       fi
10107       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
10108     fi
10109   fi
10110 
10111   # Now join together the path and the arguments once again
10112   if test "x$arguments" != xEOL; then
10113     new_complete="$new_path ${arguments% *}"
10114   else
10115     new_complete="$new_path"
10116   fi
10117 
10118   if test "x$complete" != "x$new_complete"; then
10119     FOUND_MAKE="$new_complete"
10120     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
10121 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
10122   fi
10123 
10124         fi
10125       fi
10126     fi
10127   fi
10128 
10129         fi
10130         PATH=$OLD_PATH
10131       fi
10132     fi
10133 
10134     if test "x$FOUND_MAKE" = x; then
10135       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
10136     fi
10137   fi
10138 
10139   MAKE=$FOUND_MAKE
10140 
10141   { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
10142 $as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
10143 
10144 
10145 
10146   # Test if find supports -delete
10147   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
10148 $as_echo_n "checking if find supports -delete... " >&6; }
10149   FIND_DELETE="-delete"
10150 
10151   DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
10152 
10153   echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
10154 
10155   TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
10156   if test -f $DELETEDIR/TestIfFindSupportsDelete; then
10157     # No, it does not.
10158     rm $DELETEDIR/TestIfFindSupportsDelete
10159     FIND_DELETE="-exec rm \{\} \+"
10160     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10161 $as_echo "no" >&6; }
10162   else
10163     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10164 $as_echo "yes" >&6; }
10165   fi
10166   rmdir $DELETEDIR
10167 
10168 
10169 
10170   # These tools might not be installed by default,
10171   # need hint on how to install them.
10172 
10173   for ac_prog in unzip
10174 do
10175   # Extract the first word of "$ac_prog", so it can be a program name with args.
10176 set dummy $ac_prog; ac_word=$2
10177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10178 $as_echo_n "checking for $ac_word... " >&6; }
10179 if ${ac_cv_path_UNZIP+:} false; then :
10180   $as_echo_n "(cached) " >&6
10181 else
10182   case $UNZIP in
10183   [\\/]* | ?:[\\/]*)
10184   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
10185   ;;
10186   *)
10187   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10188 for as_dir in $PATH
10189 do
10190   IFS=$as_save_IFS
10191   test -z "$as_dir" && as_dir=.
10192     for ac_exec_ext in '' $ac_executable_extensions; do
10193   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10194     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
10195     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10196     break 2
10197   fi
10198 done
10199   done
10200 IFS=$as_save_IFS
10201 
10202   ;;
10203 esac
10204 fi
10205 UNZIP=$ac_cv_path_UNZIP
10206 if test -n "$UNZIP"; then
10207   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
10208 $as_echo "$UNZIP" >&6; }
10209 else
10210   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10211 $as_echo "no" >&6; }
10212 fi
10213 
10214 
10215   test -n "$UNZIP" && break
10216 done
10217 
10218 
10219   if test "x$UNZIP" = x; then
10220     if test "xunzip" = x; then
10221       PROG_NAME=unzip
10222     else
10223       PROG_NAME=unzip
10224     fi
10225     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10226 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10227     as_fn_error $? "Cannot continue" "$LINENO" 5
10228   fi
10229 
10230 
10231 
10232   for ac_prog in zip
10233 do
10234   # Extract the first word of "$ac_prog", so it can be a program name with args.
10235 set dummy $ac_prog; ac_word=$2
10236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10237 $as_echo_n "checking for $ac_word... " >&6; }
10238 if ${ac_cv_path_ZIP+:} false; then :
10239   $as_echo_n "(cached) " >&6
10240 else
10241   case $ZIP in
10242   [\\/]* | ?:[\\/]*)
10243   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
10244   ;;
10245   *)
10246   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10247 for as_dir in $PATH
10248 do
10249   IFS=$as_save_IFS
10250   test -z "$as_dir" && as_dir=.
10251     for ac_exec_ext in '' $ac_executable_extensions; do
10252   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10253     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
10254     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10255     break 2
10256   fi
10257 done
10258   done
10259 IFS=$as_save_IFS
10260 
10261   ;;
10262 esac
10263 fi
10264 ZIP=$ac_cv_path_ZIP
10265 if test -n "$ZIP"; then
10266   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10267 $as_echo "$ZIP" >&6; }
10268 else
10269   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10270 $as_echo "no" >&6; }
10271 fi
10272 
10273 
10274   test -n "$ZIP" && break
10275 done
10276 
10277 
10278   if test "x$ZIP" = x; then
10279     if test "xzip" = x; then
10280       PROG_NAME=zip
10281     else
10282       PROG_NAME=zip
10283     fi
10284     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10285 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10286     as_fn_error $? "Cannot continue" "$LINENO" 5
10287   fi
10288 
10289 
10290 
10291   # Non-required basic tools
10292 
10293   # Extract the first word of "ldd", so it can be a program name with args.
10294 set dummy ldd; ac_word=$2
10295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10296 $as_echo_n "checking for $ac_word... " >&6; }
10297 if ${ac_cv_path_LDD+:} false; then :
10298   $as_echo_n "(cached) " >&6
10299 else
10300   case $LDD in
10301   [\\/]* | ?:[\\/]*)
10302   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10303   ;;
10304   *)
10305   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10306 for as_dir in $PATH
10307 do
10308   IFS=$as_save_IFS
10309   test -z "$as_dir" && as_dir=.
10310     for ac_exec_ext in '' $ac_executable_extensions; do
10311   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10312     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10313     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10314     break 2
10315   fi
10316 done
10317   done
10318 IFS=$as_save_IFS
10319 
10320   ;;
10321 esac
10322 fi
10323 LDD=$ac_cv_path_LDD
10324 if test -n "$LDD"; then
10325   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10326 $as_echo "$LDD" >&6; }
10327 else
10328   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10329 $as_echo "no" >&6; }
10330 fi
10331 
10332 
10333   if test "x$LDD" = "x"; then
10334     # List shared lib dependencies is used for
10335     # debug output and checking for forbidden dependencies.
10336     # We can build without it.
10337     LDD="true"
10338   fi
10339   for ac_prog in readelf greadelf
10340 do
10341   # Extract the first word of "$ac_prog", so it can be a program name with args.
10342 set dummy $ac_prog; ac_word=$2
10343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10344 $as_echo_n "checking for $ac_word... " >&6; }
10345 if ${ac_cv_path_READELF+:} false; then :
10346   $as_echo_n "(cached) " >&6
10347 else
10348   case $READELF in
10349   [\\/]* | ?:[\\/]*)
10350   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10351   ;;
10352   *)
10353   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10354 for as_dir in $PATH
10355 do
10356   IFS=$as_save_IFS
10357   test -z "$as_dir" && as_dir=.
10358     for ac_exec_ext in '' $ac_executable_extensions; do
10359   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10360     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10361     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10362     break 2
10363   fi
10364 done
10365   done
10366 IFS=$as_save_IFS
10367 
10368   ;;
10369 esac
10370 fi
10371 READELF=$ac_cv_path_READELF
10372 if test -n "$READELF"; then
10373   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10374 $as_echo "$READELF" >&6; }
10375 else
10376   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10377 $as_echo "no" >&6; }
10378 fi
10379 
10380 
10381   test -n "$READELF" && break
10382 done
10383 
10384   # Extract the first word of "hg", so it can be a program name with args.
10385 set dummy hg; ac_word=$2
10386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10387 $as_echo_n "checking for $ac_word... " >&6; }
10388 if ${ac_cv_path_HG+:} false; then :
10389   $as_echo_n "(cached) " >&6
10390 else
10391   case $HG in
10392   [\\/]* | ?:[\\/]*)
10393   ac_cv_path_HG="$HG" # Let the user override the test with a path.
10394   ;;
10395   *)
10396   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10397 for as_dir in $PATH
10398 do
10399   IFS=$as_save_IFS
10400   test -z "$as_dir" && as_dir=.
10401     for ac_exec_ext in '' $ac_executable_extensions; do
10402   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10403     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10404     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10405     break 2
10406   fi
10407 done
10408   done
10409 IFS=$as_save_IFS
10410 
10411   ;;
10412 esac
10413 fi
10414 HG=$ac_cv_path_HG
10415 if test -n "$HG"; then
10416   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10417 $as_echo "$HG" >&6; }
10418 else
10419   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10420 $as_echo "no" >&6; }
10421 fi
10422 
10423 
10424   # Extract the first word of "stat", so it can be a program name with args.
10425 set dummy stat; ac_word=$2
10426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10427 $as_echo_n "checking for $ac_word... " >&6; }
10428 if ${ac_cv_path_STAT+:} false; then :
10429   $as_echo_n "(cached) " >&6
10430 else
10431   case $STAT in
10432   [\\/]* | ?:[\\/]*)
10433   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10434   ;;
10435   *)
10436   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10437 for as_dir in $PATH
10438 do
10439   IFS=$as_save_IFS
10440   test -z "$as_dir" && as_dir=.
10441     for ac_exec_ext in '' $ac_executable_extensions; do
10442   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10443     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10444     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10445     break 2
10446   fi
10447 done
10448   done
10449 IFS=$as_save_IFS
10450 
10451   ;;
10452 esac
10453 fi
10454 STAT=$ac_cv_path_STAT
10455 if test -n "$STAT"; then
10456   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10457 $as_echo "$STAT" >&6; }
10458 else
10459   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10460 $as_echo "no" >&6; }
10461 fi
10462 
10463 
10464   # Extract the first word of "time", so it can be a program name with args.
10465 set dummy time; 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_TIME+:} false; then :
10469   $as_echo_n "(cached) " >&6
10470 else
10471   case $TIME in
10472   [\\/]* | ?:[\\/]*)
10473   ac_cv_path_TIME="$TIME" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10483     ac_cv_path_TIME="$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 TIME=$ac_cv_path_TIME
10495 if test -n "$TIME"; then
10496   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10497 $as_echo "$TIME" >&6; }
10498 else
10499   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10500 $as_echo "no" >&6; }
10501 fi
10502 
10503 
10504   # Check if it's GNU time
10505   IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
10506   if test "x$IS_GNU_TIME" != x; then
10507     IS_GNU_TIME=yes
10508   else
10509     IS_GNU_TIME=no
10510   fi
10511 
10512 
10513   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10514 
10515   for ac_prog in comm
10516 do
10517   # Extract the first word of "$ac_prog", so it can be a program name with args.
10518 set dummy $ac_prog; ac_word=$2
10519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10520 $as_echo_n "checking for $ac_word... " >&6; }
10521 if ${ac_cv_path_COMM+:} false; then :
10522   $as_echo_n "(cached) " >&6
10523 else
10524   case $COMM in
10525   [\\/]* | ?:[\\/]*)
10526   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10527   ;;
10528   *)
10529   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10530 for as_dir in $PATH
10531 do
10532   IFS=$as_save_IFS
10533   test -z "$as_dir" && as_dir=.
10534     for ac_exec_ext in '' $ac_executable_extensions; do
10535   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10536     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10537     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10538     break 2
10539   fi
10540 done
10541   done
10542 IFS=$as_save_IFS
10543 
10544   ;;
10545 esac
10546 fi
10547 COMM=$ac_cv_path_COMM
10548 if test -n "$COMM"; then
10549   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10550 $as_echo "$COMM" >&6; }
10551 else
10552   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10553 $as_echo "no" >&6; }
10554 fi
10555 
10556 
10557   test -n "$COMM" && break
10558 done
10559 
10560 
10561   if test "x$COMM" = x; then
10562     if test "xcomm" = x; then
10563       PROG_NAME=comm
10564     else
10565       PROG_NAME=comm
10566     fi
10567     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10568 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10569     as_fn_error $? "Cannot continue" "$LINENO" 5
10570   fi
10571 
10572 
10573   fi
10574 
10575   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
10576 
10577   for ac_prog in dsymutil
10578 do
10579   # Extract the first word of "$ac_prog", so it can be a program name with args.
10580 set dummy $ac_prog; ac_word=$2
10581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10582 $as_echo_n "checking for $ac_word... " >&6; }
10583 if ${ac_cv_path_DSYMUTIL+:} false; then :
10584   $as_echo_n "(cached) " >&6
10585 else
10586   case $DSYMUTIL in
10587   [\\/]* | ?:[\\/]*)
10588   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
10589   ;;
10590   *)
10591   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10592 for as_dir in $PATH
10593 do
10594   IFS=$as_save_IFS
10595   test -z "$as_dir" && as_dir=.
10596     for ac_exec_ext in '' $ac_executable_extensions; do
10597   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10598     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
10599     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10600     break 2
10601   fi
10602 done
10603   done
10604 IFS=$as_save_IFS
10605 
10606   ;;
10607 esac
10608 fi
10609 DSYMUTIL=$ac_cv_path_DSYMUTIL
10610 if test -n "$DSYMUTIL"; then
10611   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
10612 $as_echo "$DSYMUTIL" >&6; }
10613 else
10614   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10615 $as_echo "no" >&6; }
10616 fi
10617 
10618 
10619   test -n "$DSYMUTIL" && break
10620 done
10621 
10622 
10623   if test "x$DSYMUTIL" = x; then
10624     if test "xdsymutil" = x; then
10625       PROG_NAME=dsymutil
10626     else
10627       PROG_NAME=dsymutil
10628     fi
10629     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10630 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10631     as_fn_error $? "Cannot continue" "$LINENO" 5
10632   fi
10633 
10634 
10635 
10636   for ac_prog in xattr
10637 do
10638   # Extract the first word of "$ac_prog", so it can be a program name with args.
10639 set dummy $ac_prog; ac_word=$2
10640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10641 $as_echo_n "checking for $ac_word... " >&6; }
10642 if ${ac_cv_path_XATTR+:} false; then :
10643   $as_echo_n "(cached) " >&6
10644 else
10645   case $XATTR in
10646   [\\/]* | ?:[\\/]*)
10647   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
10648   ;;
10649   *)
10650   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10651 for as_dir in $PATH
10652 do
10653   IFS=$as_save_IFS
10654   test -z "$as_dir" && as_dir=.
10655     for ac_exec_ext in '' $ac_executable_extensions; do
10656   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10657     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
10658     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10659     break 2
10660   fi
10661 done
10662   done
10663 IFS=$as_save_IFS
10664 
10665   ;;
10666 esac
10667 fi
10668 XATTR=$ac_cv_path_XATTR
10669 if test -n "$XATTR"; then
10670   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
10671 $as_echo "$XATTR" >&6; }
10672 else
10673   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10674 $as_echo "no" >&6; }
10675 fi
10676 
10677 
10678   test -n "$XATTR" && break
10679 done
10680 
10681 
10682   if test "x$XATTR" = x; then
10683     if test "xxattr" = x; then
10684       PROG_NAME=xattr
10685     else
10686       PROG_NAME=xattr
10687     fi
10688     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10689 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10690     as_fn_error $? "Cannot continue" "$LINENO" 5
10691   fi
10692 
10693 
10694     # Extract the first word of "codesign", so it can be a program name with args.
10695 set dummy codesign; ac_word=$2
10696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10697 $as_echo_n "checking for $ac_word... " >&6; }
10698 if ${ac_cv_path_CODESIGN+:} false; then :
10699   $as_echo_n "(cached) " >&6
10700 else
10701   case $CODESIGN in
10702   [\\/]* | ?:[\\/]*)
10703   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
10704   ;;
10705   *)
10706   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10707 for as_dir in $PATH
10708 do
10709   IFS=$as_save_IFS
10710   test -z "$as_dir" && as_dir=.
10711     for ac_exec_ext in '' $ac_executable_extensions; do
10712   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10713     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
10714     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10715     break 2
10716   fi
10717 done
10718   done
10719 IFS=$as_save_IFS
10720 
10721   ;;
10722 esac
10723 fi
10724 CODESIGN=$ac_cv_path_CODESIGN
10725 if test -n "$CODESIGN"; then
10726   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
10727 $as_echo "$CODESIGN" >&6; }
10728 else
10729   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10730 $as_echo "no" >&6; }
10731 fi
10732 
10733 
10734     if test "x$CODESIGN" != "x"; then
10735       # Verify that the openjdk_codesign certificate is present
10736       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
10737 $as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
10738       rm -f codesign-testfile
10739       touch codesign-testfile
10740       codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
10741       rm -f codesign-testfile
10742       if test "x$CODESIGN" = x; then
10743         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10744 $as_echo "no" >&6; }
10745       else
10746         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10747 $as_echo "yes" >&6; }
10748       fi
10749     fi
10750   fi
10751 
10752 
10753 # Check if pkg-config is available.
10754 
10755 
10756 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10757         if test -n "$ac_tool_prefix"; then
10758   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10759 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10761 $as_echo_n "checking for $ac_word... " >&6; }
10762 if ${ac_cv_path_PKG_CONFIG+:} false; then :
10763   $as_echo_n "(cached) " >&6
10764 else
10765   case $PKG_CONFIG in
10766   [\\/]* | ?:[\\/]*)
10767   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10768   ;;
10769   *)
10770   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10771 for as_dir in $PATH
10772 do
10773   IFS=$as_save_IFS
10774   test -z "$as_dir" && as_dir=.
10775     for ac_exec_ext in '' $ac_executable_extensions; do
10776   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10777     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10778     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10779     break 2
10780   fi
10781 done
10782   done
10783 IFS=$as_save_IFS
10784 
10785   ;;
10786 esac
10787 fi
10788 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10789 if test -n "$PKG_CONFIG"; then
10790   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10791 $as_echo "$PKG_CONFIG" >&6; }
10792 else
10793   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10794 $as_echo "no" >&6; }
10795 fi
10796 
10797 
10798 fi
10799 if test -z "$ac_cv_path_PKG_CONFIG"; then
10800   ac_pt_PKG_CONFIG=$PKG_CONFIG
10801   # Extract the first word of "pkg-config", so it can be a program name with args.
10802 set dummy pkg-config; ac_word=$2
10803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10804 $as_echo_n "checking for $ac_word... " >&6; }
10805 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10806   $as_echo_n "(cached) " >&6
10807 else
10808   case $ac_pt_PKG_CONFIG in
10809   [\\/]* | ?:[\\/]*)
10810   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10811   ;;
10812   *)
10813   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10814 for as_dir in $PATH
10815 do
10816   IFS=$as_save_IFS
10817   test -z "$as_dir" && as_dir=.
10818     for ac_exec_ext in '' $ac_executable_extensions; do
10819   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10820     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10821     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10822     break 2
10823   fi
10824 done
10825   done
10826 IFS=$as_save_IFS
10827 
10828   ;;
10829 esac
10830 fi
10831 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10832 if test -n "$ac_pt_PKG_CONFIG"; then
10833   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10834 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
10835 else
10836   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10837 $as_echo "no" >&6; }
10838 fi
10839 
10840   if test "x$ac_pt_PKG_CONFIG" = x; then
10841     PKG_CONFIG=""
10842   else
10843     case $cross_compiling:$ac_tool_warned in
10844 yes:)
10845 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10846 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10847 ac_tool_warned=yes ;;
10848 esac
10849     PKG_CONFIG=$ac_pt_PKG_CONFIG
10850   fi
10851 else
10852   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10853 fi
10854 
10855 fi
10856 if test -n "$PKG_CONFIG"; then
10857         _pkg_min_version=0.9.0
10858         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10859 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10860         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10861                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10862 $as_echo "yes" >&6; }
10863         else
10864                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10865 $as_echo "no" >&6; }
10866                 PKG_CONFIG=""
10867         fi
10868 
10869 fi
10870 
10871 # After basic tools have been setup, we can check build os specific details.
10872 
10873   ###############################################################################
10874 
10875   # Note that this is the build platform OS version!
10876 
10877   OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10878   OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10879   OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10880   OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10881 
10882 
10883 
10884 
10885 
10886 # Setup builddeps, for automatic downloading of tools we need.
10887 # This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10888 # boot-jdk setup, but we need to have basic tools setup first.
10889 
10890 
10891 # Check whether --with-builddeps-conf was given.
10892 if test "${with_builddeps_conf+set}" = set; then :
10893   withval=$with_builddeps_conf;
10894 fi
10895 
10896 
10897 
10898 # Check whether --with-builddeps-server was given.
10899 if test "${with_builddeps_server+set}" = set; then :
10900   withval=$with_builddeps_server;
10901 fi
10902 
10903 
10904 
10905 # Check whether --with-builddeps-dir was given.
10906 if test "${with_builddeps_dir+set}" = set; then :
10907   withval=$with_builddeps_dir;
10908 else
10909   with_builddeps_dir=/localhome/builddeps
10910 fi
10911 
10912 
10913 
10914 # Check whether --with-builddeps-group was given.
10915 if test "${with_builddeps_group+set}" = set; then :
10916   withval=$with_builddeps_group;
10917 fi
10918 
10919 
10920 
10921 
10922   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10923     if test "x$with_builddeps_conf" != x; then
10924       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10925 $as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10926       builddepsfile=$with_builddeps_conf
10927       if test -s $builddepsfile; then
10928         . $builddepsfile
10929         { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10930 $as_echo "loaded!" >&6; }
10931       else
10932         as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10933       fi
10934     else
10935       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10936 $as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10937       builddepsfile=`mktemp`
10938       touch $builddepsfile
10939       # Put all found confs into a single file.
10940       find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10941       # Source the file to acquire the variables
10942       if test -s $builddepsfile; then
10943         . $builddepsfile
10944         { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10945 $as_echo "found at least one!" >&6; }
10946       else
10947         as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10948       fi
10949     fi
10950     # Create build and target names that use _ instead of "-" and ".".
10951     # This is necessary to use them in variable names.
10952     build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10953     target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10954     # Extract rewrite information for build and target
10955     eval rewritten_build=\${REWRITE_${build_var}}
10956     if test "x$rewritten_build" = x; then
10957       rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10958       echo Build stays the same $rewritten_build
10959     else
10960       echo Rewriting build for builddeps into $rewritten_build
10961     fi
10962     eval rewritten_target=\${REWRITE_${target_var}}
10963     if test "x$rewritten_target" = x; then
10964       rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10965       echo Target stays the same $rewritten_target
10966     else
10967       echo Rewriting target for builddeps into $rewritten_target
10968     fi
10969     rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10970     rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10971   fi
10972   for ac_prog in 7z unzip
10973 do
10974   # Extract the first word of "$ac_prog", so it can be a program name with args.
10975 set dummy $ac_prog; ac_word=$2
10976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10977 $as_echo_n "checking for $ac_word... " >&6; }
10978 if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
10979   $as_echo_n "(cached) " >&6
10980 else
10981   if test -n "$BDEPS_UNZIP"; then
10982   ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10983 else
10984 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10985 for as_dir in $PATH
10986 do
10987   IFS=$as_save_IFS
10988   test -z "$as_dir" && as_dir=.
10989     for ac_exec_ext in '' $ac_executable_extensions; do
10990   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10991     ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10992     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10993     break 2
10994   fi
10995 done
10996   done
10997 IFS=$as_save_IFS
10998 
10999 fi
11000 fi
11001 BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
11002 if test -n "$BDEPS_UNZIP"; then
11003   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
11004 $as_echo "$BDEPS_UNZIP" >&6; }
11005 else
11006   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11007 $as_echo "no" >&6; }
11008 fi
11009 
11010 
11011   test -n "$BDEPS_UNZIP" && break
11012 done
11013 
11014   if test "x$BDEPS_UNZIP" = x7z; then
11015     BDEPS_UNZIP="7z x"
11016   fi
11017 
11018   for ac_prog in wget lftp ftp
11019 do
11020   # Extract the first word of "$ac_prog", so it can be a program name with args.
11021 set dummy $ac_prog; ac_word=$2
11022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11023 $as_echo_n "checking for $ac_word... " >&6; }
11024 if ${ac_cv_prog_BDEPS_FTP+:} false; then :
11025   $as_echo_n "(cached) " >&6
11026 else
11027   if test -n "$BDEPS_FTP"; then
11028   ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
11029 else
11030 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11031 for as_dir in $PATH
11032 do
11033   IFS=$as_save_IFS
11034   test -z "$as_dir" && as_dir=.
11035     for ac_exec_ext in '' $ac_executable_extensions; do
11036   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11037     ac_cv_prog_BDEPS_FTP="$ac_prog"
11038     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11039     break 2
11040   fi
11041 done
11042   done
11043 IFS=$as_save_IFS
11044 
11045 fi
11046 fi
11047 BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
11048 if test -n "$BDEPS_FTP"; then
11049   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
11050 $as_echo "$BDEPS_FTP" >&6; }
11051 else
11052   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11053 $as_echo "no" >&6; }
11054 fi
11055 
11056 
11057   test -n "$BDEPS_FTP" && break
11058 done
11059 
11060 
11061 
11062 ###############################################################################
11063 #
11064 # Determine OpenJDK variants, options and version numbers.
11065 #
11066 ###############################################################################
11067 
11068 # We need build & target for this.
11069 
11070 
11071   ###############################################################################
11072   #
11073   # Should we build a JDK/JVM with headful support (ie a graphical ui)?
11074   # We always build headless support.
11075   #
11076   { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
11077 $as_echo_n "checking headful support... " >&6; }
11078   # Check whether --enable-headful was given.
11079 if test "${enable_headful+set}" = set; then :
11080   enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
11081 else
11082   SUPPORT_HEADFUL=yes
11083 fi
11084 
11085 
11086   SUPPORT_HEADLESS=yes
11087   BUILD_HEADLESS="BUILD_HEADLESS:=true"
11088 
11089   if test "x$SUPPORT_HEADFUL" = xyes; then
11090     # We are building both headful and headless.
11091     headful_msg="include support for both headful and headless"
11092   fi
11093 
11094   if test "x$SUPPORT_HEADFUL" = xno; then
11095     # Thus we are building headless only.
11096     BUILD_HEADLESS="BUILD_HEADLESS:=true"
11097     headful_msg="headless only"
11098   fi
11099 
11100   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
11101 $as_echo "$headful_msg" >&6; }
11102 
11103 
11104 
11105 
11106 
11107   # Control wether Hotspot runs Queens test after build.
11108   # Check whether --enable-hotspot-test-in-build was given.
11109 if test "${enable_hotspot_test_in_build+set}" = set; then :
11110   enableval=$enable_hotspot_test_in_build;
11111 else
11112   enable_hotspot_test_in_build=no
11113 fi
11114 
11115   if test "x$enable_hotspot_test_in_build" = "xyes"; then
11116     TEST_IN_BUILD=true
11117   else
11118     TEST_IN_BUILD=false
11119   fi
11120 
11121 
11122   ###############################################################################
11123   #
11124   # Choose cacerts source file
11125   #
11126 
11127 # Check whether --with-cacerts-file was given.
11128 if test "${with_cacerts_file+set}" = set; then :
11129   withval=$with_cacerts_file;
11130 fi
11131 
11132   if test "x$with_cacerts_file" != x; then
11133     CACERTS_FILE=$with_cacerts_file
11134   else
11135     CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
11136   fi
11137 
11138 
11139   ###############################################################################
11140   #
11141   # Enable or disable unlimited crypto
11142   #
11143   # Check whether --enable-unlimited-crypto was given.
11144 if test "${enable_unlimited_crypto+set}" = set; then :
11145   enableval=$enable_unlimited_crypto;
11146 else
11147   enable_unlimited_crypto=no
11148 fi
11149 
11150   if test "x$enable_unlimited_crypto" = "xyes"; then
11151     UNLIMITED_CRYPTO=true
11152   else
11153     UNLIMITED_CRYPTO=false
11154   fi
11155 
11156 
11157   ###############################################################################
11158   #
11159   # Enable or disable the elliptic curve crypto implementation
11160   #
11161 
11162 
11163   ###############################################################################
11164   #
11165   # Compress jars
11166   #
11167   COMPRESS_JARS=false
11168 
11169 
11170 
11171 
11172   # Source the version numbers
11173   . $AUTOCONF_DIR/version-numbers
11174 
11175   # Get the settings from parameters
11176 
11177 # Check whether --with-milestone was given.
11178 if test "${with_milestone+set}" = set; then :
11179   withval=$with_milestone;
11180 fi
11181 
11182   if test "x$with_milestone" = xyes; then
11183     as_fn_error $? "Milestone must have a value" "$LINENO" 5
11184   elif test "x$with_milestone" != x; then
11185     MILESTONE="$with_milestone"
11186   fi
11187   if test "x$MILESTONE" = x; then
11188     MILESTONE=internal
11189   fi
11190 
11191 
11192 # Check whether --with-update-version was given.
11193 if test "${with_update_version+set}" = set; then :
11194   withval=$with_update_version;
11195 fi
11196 
11197   if test "x$with_update_version" = xyes; then
11198     as_fn_error $? "Update version must have a value" "$LINENO" 5
11199   elif test "x$with_update_version" != x; then
11200     JDK_UPDATE_VERSION="$with_update_version"
11201     # On macosx 10.7, it's not possible to set --with-update-version=0X due
11202     # to a bug in expr (which reduces it to just X). To work around this, we
11203     # always add a 0 to one digit update versions.
11204     if test "${#JDK_UPDATE_VERSION}" = "1"; then
11205       JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
11206     fi
11207   fi
11208 
11209 
11210 # Check whether --with-user-release-suffix was given.
11211 if test "${with_user_release_suffix+set}" = set; then :
11212   withval=$with_user_release_suffix;
11213 fi
11214 
11215   if test "x$with_user_release_suffix" = xyes; then
11216     as_fn_error $? "Release suffix must have a value" "$LINENO" 5
11217   elif test "x$with_user_release_suffix" != x; then
11218     USER_RELEASE_SUFFIX="$with_user_release_suffix"
11219   fi
11220 
11221 
11222 # Check whether --with-build-number was given.
11223 if test "${with_build_number+set}" = set; then :
11224   withval=$with_build_number;
11225 fi
11226 
11227   if test "x$with_build_number" = xyes; then
11228     as_fn_error $? "Build number must have a value" "$LINENO" 5
11229   elif test "x$with_build_number" != x; then
11230     JDK_BUILD_NUMBER="$with_build_number"
11231   fi
11232   # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
11233   if test "x$JDK_BUILD_NUMBER" = x; then
11234     JDK_BUILD_NUMBER=b00
11235     if test "x$USER_RELEASE_SUFFIX" = x; then
11236       BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
11237       # Avoid [:alnum:] since it depends on the locale.
11238       CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
11239       USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11240     fi
11241   fi
11242 
11243   # Now set the JDK version, milestone, build number etc.
11244 
11245 
11246 
11247 
11248 
11249 
11250 
11251 
11252 
11253 
11254 
11255 
11256 
11257 
11258 
11259 
11260 # Check whether --with-copyright-year was given.
11261 if test "${with_copyright_year+set}" = set; then :
11262   withval=$with_copyright_year;
11263 fi
11264 
11265   if test "x$with_copyright_year" = xyes; then
11266     as_fn_error $? "Copyright year must have a value" "$LINENO" 5
11267   elif test "x$with_copyright_year" != x; then
11268     COPYRIGHT_YEAR="$with_copyright_year"
11269   else
11270     COPYRIGHT_YEAR=`date +'%Y'`
11271   fi
11272 
11273 
11274   if test "x$JDK_UPDATE_VERSION" != x; then
11275     JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
11276   else
11277     JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
11278   fi
11279 
11280 
11281   COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
11282 
11283 
11284 
11285 ###############################################################################
11286 #
11287 # Setup BootJDK, used to bootstrap the build.
11288 #
11289 ###############################################################################
11290 
11291 
11292   BOOT_JDK_FOUND=no
11293 
11294 # Check whether --with-boot-jdk was given.
11295 if test "${with_boot_jdk+set}" = set; then :
11296   withval=$with_boot_jdk;
11297 fi
11298 
11299 
11300   # We look for the Boot JDK through various means, going from more certain to
11301   # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
11302   # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
11303   # must check if this is indeed valid; otherwise we'll continue looking.
11304 
11305   # Test: Is bootjdk explicitely set by command line arguments?
11306 
11307   if test "x$BOOT_JDK_FOUND" = xno; then
11308     # Now execute the test
11309 
11310   if test "x$with_boot_jdk" != x; then
11311     BOOT_JDK=$with_boot_jdk
11312     BOOT_JDK_FOUND=maybe
11313     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
11314 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
11315   fi
11316 
11317 
11318     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11319     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11320       # Do we have a bin/java?
11321       if test ! -x "$BOOT_JDK/bin/java"; then
11322         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11323 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11324         BOOT_JDK_FOUND=no
11325       else
11326         # Do we have a bin/javac?
11327         if test ! -x "$BOOT_JDK/bin/javac"; then
11328           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11329 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11330           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11331 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11332           BOOT_JDK_FOUND=no
11333         else
11334           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11335           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11336             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11337 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11338             BOOT_JDK_FOUND=no
11339           else
11340             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11341             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11342 
11343             # Extra M4 quote needed to protect [] in grep expression.
11344             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11345             if test "x$FOUND_VERSION_78" = x; then
11346               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11347 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11348               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11349 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11350               BOOT_JDK_FOUND=no
11351             else
11352               # We're done! :-)
11353               BOOT_JDK_FOUND=yes
11354 
11355   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11356 
11357   # Input might be given as Windows format, start by converting to
11358   # unix format.
11359   path="$BOOT_JDK"
11360   new_path=`$CYGPATH -u "$path"`
11361 
11362   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11363   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11364   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11365   # "foo.exe" is OK but "foo" is an error.
11366   #
11367   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11368   # It is also a way to make sure we got the proper file name for the real test later on.
11369   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11370   if test "x$test_shortpath" = x; then
11371     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11372 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11373     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11374   fi
11375 
11376   # Call helper function which possibly converts this using DOS-style short mode.
11377   # If so, the updated path is stored in $new_path.
11378 
11379   input_path="$new_path"
11380   # Check if we need to convert this using DOS-style short mode. If the path
11381   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11382   # take no chances and rewrite it.
11383   # Note: m4 eats our [], so we need to use [ and ] instead.
11384   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11385   if test "x$has_forbidden_chars" != x; then
11386     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11387     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11388     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11389     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11390       # Going to short mode and back again did indeed matter. Since short mode is
11391       # case insensitive, let's make it lowercase to improve readability.
11392       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11393       # Now convert it back to Unix-stile (cygpath)
11394       input_path=`$CYGPATH -u "$shortmode_path"`
11395       new_path="$input_path"
11396     fi
11397   fi
11398 
11399   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11400   if test "x$test_cygdrive_prefix" = x; then
11401     # As a simple fix, exclude /usr/bin since it's not a real path.
11402     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11403       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11404       # a path prefixed by /cygdrive for fixpath to work.
11405       new_path="$CYGWIN_ROOT_PATH$input_path"
11406     fi
11407   fi
11408 
11409 
11410   if test "x$path" != "x$new_path"; then
11411     BOOT_JDK="$new_path"
11412     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11413 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11414   fi
11415 
11416   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11417 
11418   path="$BOOT_JDK"
11419   has_colon=`$ECHO $path | $GREP ^.:`
11420   new_path="$path"
11421   if test "x$has_colon" = x; then
11422     # Not in mixed or Windows style, start by that.
11423     new_path=`cmd //c echo $path`
11424   fi
11425 
11426 
11427   input_path="$new_path"
11428   # Check if we need to convert this using DOS-style short mode. If the path
11429   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11430   # take no chances and rewrite it.
11431   # Note: m4 eats our [], so we need to use [ and ] instead.
11432   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11433   if test "x$has_forbidden_chars" != x; then
11434     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11435     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11436   fi
11437 
11438 
11439   windows_path="$new_path"
11440   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11441     unix_path=`$CYGPATH -u "$windows_path"`
11442     new_path="$unix_path"
11443   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11444     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11445     new_path="$unix_path"
11446   fi
11447 
11448   if test "x$path" != "x$new_path"; then
11449     BOOT_JDK="$new_path"
11450     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11451 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11452   fi
11453 
11454   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11455   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11456 
11457   else
11458     # We're on a posix platform. Hooray! :)
11459     path="$BOOT_JDK"
11460     has_space=`$ECHO "$path" | $GREP " "`
11461     if test "x$has_space" != x; then
11462       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11463 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11464       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11465     fi
11466 
11467     # Use eval to expand a potential ~
11468     eval path="$path"
11469     if test ! -f "$path" && test ! -d "$path"; then
11470       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11471     fi
11472 
11473     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11474   fi
11475 
11476               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11477 $as_echo_n "checking for Boot JDK... " >&6; }
11478               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11479 $as_echo "$BOOT_JDK" >&6; }
11480               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11481 $as_echo_n "checking Boot JDK version... " >&6; }
11482               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11483               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11484 $as_echo "$BOOT_JDK_VERSION" >&6; }
11485             fi # end check jdk version
11486           fi # end check rt.jar
11487         fi # end check javac
11488       fi # end check java
11489     fi # end check boot jdk found
11490   fi
11491 
11492   if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11493     # Having specified an argument which is incorrect will produce an instant failure;
11494     # we should not go on looking
11495     as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11496   fi
11497 
11498   # Test: Is bootjdk available from builddeps?
11499 
11500   if test "x$BOOT_JDK_FOUND" = xno; then
11501     # Now execute the test
11502 
11503 
11504 
11505   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11506     # Source the builddeps file again, to make sure it uses the latest variables!
11507     . $builddepsfile
11508     # Look for a target and build machine specific resource!
11509     eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11510     if test "x$resource" = x; then
11511       # Ok, lets instead look for a target specific resource
11512       eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11513     fi
11514     if test "x$resource" = x; then
11515       # Ok, lets instead look for a build specific resource
11516       eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11517     fi
11518     if test "x$resource" = x; then
11519       # Ok, lets instead look for a generic resource
11520       # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11521       resource=${builddep_bootjdk}
11522     fi
11523     if test "x$resource" != x; then
11524       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11525 $as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11526       # If the resource in the builddeps.conf file is an existing directory,
11527       # for example /java/linux/cups
11528       if test -d ${resource}; then
11529         depdir=${resource}
11530       else
11531 
11532   # bootjdk is for example mymodule
11533   # $resource is for example libs/general/libmymod_1_2_3.zip
11534   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11535   # $with_builddeps_dir is for example /localhome/builddeps
11536   # depdir is the name of the variable into which we store the depdir, eg MYMOD
11537   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11538   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11539   filename=`basename $resource`
11540   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11541   filebase=${filename%%.*}
11542   extension=${filename#*.}
11543   installdir=$with_builddeps_dir/$filebase
11544   if test ! -f $installdir/$filename.unpacked; then
11545     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11546 $as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11547     if test ! -d $installdir; then
11548       mkdir -p $installdir
11549     fi
11550     if test ! -d $installdir; then
11551       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11552     fi
11553     tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11554     touch $tmpfile
11555     if test ! -f $tmpfile; then
11556       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11557     fi
11558 
11559   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11560   # $tmpfile is the local file name for the downloaded file.
11561   VALID_TOOL=no
11562   if test "x$BDEPS_FTP" = xwget; then
11563     VALID_TOOL=yes
11564     wget -O $tmpfile $with_builddeps_server/$resource
11565   fi
11566   if test "x$BDEPS_FTP" = xlftp; then
11567     VALID_TOOL=yes
11568     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11569   fi
11570   if test "x$BDEPS_FTP" = xftp; then
11571     VALID_TOOL=yes
11572     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11573     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11574     FTPUSERPWD=${FTPSERVER%%@*}
11575     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11576       FTPUSER=${userpwd%%:*}
11577       FTPPWD=${userpwd#*@}
11578       FTPSERVER=${FTPSERVER#*@}
11579     else
11580       FTPUSER=ftp
11581       FTPPWD=ftp
11582     fi
11583     # the "pass" command does not work on some
11584     # ftp clients (read ftp.exe) but if it works,
11585     # passive mode is better!
11586     ( \
11587         echo "user $FTPUSER $FTPPWD"        ; \
11588         echo "pass"                         ; \
11589         echo "bin"                          ; \
11590         echo "get $FTPPATH $tmpfile"              ; \
11591     ) | ftp -in $FTPSERVER
11592   fi
11593   if test "x$VALID_TOOL" != xyes; then
11594     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11595   fi
11596 
11597     mv $tmpfile $installdir/$filename
11598     if test ! -s $installdir/$filename; then
11599       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11600     fi
11601     case "$extension" in
11602       zip)  echo "Unzipping $installdir/$filename..."
11603         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11604         ;;
11605       tar.gz) echo "Untaring $installdir/$filename..."
11606         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11607         ;;
11608       tgz) echo "Untaring $installdir/$filename..."
11609         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11610         ;;
11611       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11612         ;;
11613     esac
11614   fi
11615   if test -f $installdir/$filename.unpacked; then
11616     depdir=$installdir
11617   fi
11618 
11619       fi
11620       # Source the builddeps file again, because in the previous command, the depdir
11621       # was updated to point at the current build dependency install directory.
11622       . $builddepsfile
11623       # Now extract variables from the builddeps.conf files.
11624       theroot=${builddep_bootjdk_ROOT}
11625       thecflags=${builddep_bootjdk_CFLAGS}
11626       thelibs=${builddep_bootjdk_LIBS}
11627       if test "x$depdir" = x; then
11628         as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11629       fi
11630       BOOT_JDK=$depdir
11631       if test "x$theroot" != x; then
11632         BOOT_JDK="$theroot"
11633       fi
11634       if test "x$thecflags" != x; then
11635         BOOT_JDK_CFLAGS="$thecflags"
11636       fi
11637       if test "x$thelibs" != x; then
11638         BOOT_JDK_LIBS="$thelibs"
11639       fi
11640       BOOT_JDK_FOUND=maybe
11641       else BOOT_JDK_FOUND=no
11642 
11643     fi
11644     else BOOT_JDK_FOUND=no
11645 
11646   fi
11647 
11648 
11649 
11650     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11651     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11652       # Do we have a bin/java?
11653       if test ! -x "$BOOT_JDK/bin/java"; then
11654         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11655 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11656         BOOT_JDK_FOUND=no
11657       else
11658         # Do we have a bin/javac?
11659         if test ! -x "$BOOT_JDK/bin/javac"; then
11660           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11661 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11662           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11663 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11664           BOOT_JDK_FOUND=no
11665         else
11666           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11667           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11668             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11669 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11670             BOOT_JDK_FOUND=no
11671           else
11672             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11673             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11674 
11675             # Extra M4 quote needed to protect [] in grep expression.
11676             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11677             if test "x$FOUND_VERSION_78" = x; then
11678               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11679 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11680               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11681 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11682               BOOT_JDK_FOUND=no
11683             else
11684               # We're done! :-)
11685               BOOT_JDK_FOUND=yes
11686 
11687   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11688 
11689   # Input might be given as Windows format, start by converting to
11690   # unix format.
11691   path="$BOOT_JDK"
11692   new_path=`$CYGPATH -u "$path"`
11693 
11694   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11695   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11696   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11697   # "foo.exe" is OK but "foo" is an error.
11698   #
11699   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11700   # It is also a way to make sure we got the proper file name for the real test later on.
11701   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11702   if test "x$test_shortpath" = x; then
11703     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11704 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11705     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11706   fi
11707 
11708   # Call helper function which possibly converts this using DOS-style short mode.
11709   # If so, the updated path is stored in $new_path.
11710 
11711   input_path="$new_path"
11712   # Check if we need to convert this using DOS-style short mode. If the path
11713   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11714   # take no chances and rewrite it.
11715   # Note: m4 eats our [], so we need to use [ and ] instead.
11716   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11717   if test "x$has_forbidden_chars" != x; then
11718     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11719     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11720     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11721     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11722       # Going to short mode and back again did indeed matter. Since short mode is
11723       # case insensitive, let's make it lowercase to improve readability.
11724       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11725       # Now convert it back to Unix-stile (cygpath)
11726       input_path=`$CYGPATH -u "$shortmode_path"`
11727       new_path="$input_path"
11728     fi
11729   fi
11730 
11731   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11732   if test "x$test_cygdrive_prefix" = x; then
11733     # As a simple fix, exclude /usr/bin since it's not a real path.
11734     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11735       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11736       # a path prefixed by /cygdrive for fixpath to work.
11737       new_path="$CYGWIN_ROOT_PATH$input_path"
11738     fi
11739   fi
11740 
11741 
11742   if test "x$path" != "x$new_path"; then
11743     BOOT_JDK="$new_path"
11744     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11745 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11746   fi
11747 
11748   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11749 
11750   path="$BOOT_JDK"
11751   has_colon=`$ECHO $path | $GREP ^.:`
11752   new_path="$path"
11753   if test "x$has_colon" = x; then
11754     # Not in mixed or Windows style, start by that.
11755     new_path=`cmd //c echo $path`
11756   fi
11757 
11758 
11759   input_path="$new_path"
11760   # Check if we need to convert this using DOS-style short mode. If the path
11761   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11762   # take no chances and rewrite it.
11763   # Note: m4 eats our [], so we need to use [ and ] instead.
11764   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11765   if test "x$has_forbidden_chars" != x; then
11766     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11767     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11768   fi
11769 
11770 
11771   windows_path="$new_path"
11772   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11773     unix_path=`$CYGPATH -u "$windows_path"`
11774     new_path="$unix_path"
11775   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11776     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11777     new_path="$unix_path"
11778   fi
11779 
11780   if test "x$path" != "x$new_path"; then
11781     BOOT_JDK="$new_path"
11782     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11783 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11784   fi
11785 
11786   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11787   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11788 
11789   else
11790     # We're on a posix platform. Hooray! :)
11791     path="$BOOT_JDK"
11792     has_space=`$ECHO "$path" | $GREP " "`
11793     if test "x$has_space" != x; then
11794       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11795 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11796       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11797     fi
11798 
11799     # Use eval to expand a potential ~
11800     eval path="$path"
11801     if test ! -f "$path" && test ! -d "$path"; then
11802       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11803     fi
11804 
11805     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11806   fi
11807 
11808               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11809 $as_echo_n "checking for Boot JDK... " >&6; }
11810               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11811 $as_echo "$BOOT_JDK" >&6; }
11812               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11813 $as_echo_n "checking Boot JDK version... " >&6; }
11814               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11815               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11816 $as_echo "$BOOT_JDK_VERSION" >&6; }
11817             fi # end check jdk version
11818           fi # end check rt.jar
11819         fi # end check javac
11820       fi # end check java
11821     fi # end check boot jdk found
11822   fi
11823 
11824 
11825   # Test: Is $JAVA_HOME set?
11826 
11827   if test "x$BOOT_JDK_FOUND" = xno; then
11828     # Now execute the test
11829 
11830   if test "x$JAVA_HOME" != x; then
11831     JAVA_HOME_PROCESSED="$JAVA_HOME"
11832 
11833   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11834 
11835   # Input might be given as Windows format, start by converting to
11836   # unix format.
11837   path="$JAVA_HOME_PROCESSED"
11838   new_path=`$CYGPATH -u "$path"`
11839 
11840   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11841   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11842   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11843   # "foo.exe" is OK but "foo" is an error.
11844   #
11845   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11846   # It is also a way to make sure we got the proper file name for the real test later on.
11847   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11848   if test "x$test_shortpath" = x; then
11849     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11850 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11851     as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11852   fi
11853 
11854   # Call helper function which possibly converts this using DOS-style short mode.
11855   # If so, the updated path is stored in $new_path.
11856 
11857   input_path="$new_path"
11858   # Check if we need to convert this using DOS-style short mode. If the path
11859   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11860   # take no chances and rewrite it.
11861   # Note: m4 eats our [], so we need to use [ and ] instead.
11862   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11863   if test "x$has_forbidden_chars" != x; then
11864     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11865     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11866     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11867     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11868       # Going to short mode and back again did indeed matter. Since short mode is
11869       # case insensitive, let's make it lowercase to improve readability.
11870       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11871       # Now convert it back to Unix-stile (cygpath)
11872       input_path=`$CYGPATH -u "$shortmode_path"`
11873       new_path="$input_path"
11874     fi
11875   fi
11876 
11877   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11878   if test "x$test_cygdrive_prefix" = x; then
11879     # As a simple fix, exclude /usr/bin since it's not a real path.
11880     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11881       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11882       # a path prefixed by /cygdrive for fixpath to work.
11883       new_path="$CYGWIN_ROOT_PATH$input_path"
11884     fi
11885   fi
11886 
11887 
11888   if test "x$path" != "x$new_path"; then
11889     JAVA_HOME_PROCESSED="$new_path"
11890     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11891 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11892   fi
11893 
11894   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11895 
11896   path="$JAVA_HOME_PROCESSED"
11897   has_colon=`$ECHO $path | $GREP ^.:`
11898   new_path="$path"
11899   if test "x$has_colon" = x; then
11900     # Not in mixed or Windows style, start by that.
11901     new_path=`cmd //c echo $path`
11902   fi
11903 
11904 
11905   input_path="$new_path"
11906   # Check if we need to convert this using DOS-style short mode. If the path
11907   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11908   # take no chances and rewrite it.
11909   # Note: m4 eats our [], so we need to use [ and ] instead.
11910   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11911   if test "x$has_forbidden_chars" != x; then
11912     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11913     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11914   fi
11915 
11916 
11917   windows_path="$new_path"
11918   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11919     unix_path=`$CYGPATH -u "$windows_path"`
11920     new_path="$unix_path"
11921   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11922     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11923     new_path="$unix_path"
11924   fi
11925 
11926   if test "x$path" != "x$new_path"; then
11927     JAVA_HOME_PROCESSED="$new_path"
11928     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11929 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11930   fi
11931 
11932   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11933   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11934 
11935   else
11936     # We're on a posix platform. Hooray! :)
11937     path="$JAVA_HOME_PROCESSED"
11938     has_space=`$ECHO "$path" | $GREP " "`
11939     if test "x$has_space" != x; then
11940       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11941 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11942       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11943     fi
11944 
11945     # Use eval to expand a potential ~
11946     eval path="$path"
11947     if test ! -f "$path" && test ! -d "$path"; then
11948       as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11949     fi
11950 
11951     JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
11952   fi
11953 
11954     if test ! -d "$JAVA_HOME_PROCESSED"; then
11955       { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11956 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11957     else
11958       # Aha, the user has set a JAVA_HOME
11959       # let us use that as the Boot JDK.
11960       BOOT_JDK="$JAVA_HOME_PROCESSED"
11961       BOOT_JDK_FOUND=maybe
11962       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11963 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11964     fi
11965   fi
11966 
11967 
11968     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11969     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11970       # Do we have a bin/java?
11971       if test ! -x "$BOOT_JDK/bin/java"; then
11972         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11973 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11974         BOOT_JDK_FOUND=no
11975       else
11976         # Do we have a bin/javac?
11977         if test ! -x "$BOOT_JDK/bin/javac"; then
11978           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11979 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11980           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11981 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11982           BOOT_JDK_FOUND=no
11983         else
11984           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11985           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11986             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11987 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11988             BOOT_JDK_FOUND=no
11989           else
11990             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11991             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11992 
11993             # Extra M4 quote needed to protect [] in grep expression.
11994             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11995             if test "x$FOUND_VERSION_78" = x; then
11996               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11997 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11998               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11999 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12000               BOOT_JDK_FOUND=no
12001             else
12002               # We're done! :-)
12003               BOOT_JDK_FOUND=yes
12004 
12005   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12006 
12007   # Input might be given as Windows format, start by converting to
12008   # unix format.
12009   path="$BOOT_JDK"
12010   new_path=`$CYGPATH -u "$path"`
12011 
12012   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12013   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12014   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12015   # "foo.exe" is OK but "foo" is an error.
12016   #
12017   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12018   # It is also a way to make sure we got the proper file name for the real test later on.
12019   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12020   if test "x$test_shortpath" = x; then
12021     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12022 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12023     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12024   fi
12025 
12026   # Call helper function which possibly converts this using DOS-style short mode.
12027   # If so, the updated path is stored in $new_path.
12028 
12029   input_path="$new_path"
12030   # Check if we need to convert this using DOS-style short mode. If the path
12031   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12032   # take no chances and rewrite it.
12033   # Note: m4 eats our [], so we need to use [ and ] instead.
12034   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12035   if test "x$has_forbidden_chars" != x; then
12036     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12037     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12038     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12039     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12040       # Going to short mode and back again did indeed matter. Since short mode is
12041       # case insensitive, let's make it lowercase to improve readability.
12042       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12043       # Now convert it back to Unix-stile (cygpath)
12044       input_path=`$CYGPATH -u "$shortmode_path"`
12045       new_path="$input_path"
12046     fi
12047   fi
12048 
12049   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12050   if test "x$test_cygdrive_prefix" = x; then
12051     # As a simple fix, exclude /usr/bin since it's not a real path.
12052     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12053       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12054       # a path prefixed by /cygdrive for fixpath to work.
12055       new_path="$CYGWIN_ROOT_PATH$input_path"
12056     fi
12057   fi
12058 
12059 
12060   if test "x$path" != "x$new_path"; then
12061     BOOT_JDK="$new_path"
12062     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12063 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12064   fi
12065 
12066   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12067 
12068   path="$BOOT_JDK"
12069   has_colon=`$ECHO $path | $GREP ^.:`
12070   new_path="$path"
12071   if test "x$has_colon" = x; then
12072     # Not in mixed or Windows style, start by that.
12073     new_path=`cmd //c echo $path`
12074   fi
12075 
12076 
12077   input_path="$new_path"
12078   # Check if we need to convert this using DOS-style short mode. If the path
12079   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12080   # take no chances and rewrite it.
12081   # Note: m4 eats our [], so we need to use [ and ] instead.
12082   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12083   if test "x$has_forbidden_chars" != x; then
12084     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12085     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12086   fi
12087 
12088 
12089   windows_path="$new_path"
12090   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12091     unix_path=`$CYGPATH -u "$windows_path"`
12092     new_path="$unix_path"
12093   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12094     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12095     new_path="$unix_path"
12096   fi
12097 
12098   if test "x$path" != "x$new_path"; then
12099     BOOT_JDK="$new_path"
12100     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12101 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12102   fi
12103 
12104   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12105   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12106 
12107   else
12108     # We're on a posix platform. Hooray! :)
12109     path="$BOOT_JDK"
12110     has_space=`$ECHO "$path" | $GREP " "`
12111     if test "x$has_space" != x; then
12112       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12113 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12114       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12115     fi
12116 
12117     # Use eval to expand a potential ~
12118     eval path="$path"
12119     if test ! -f "$path" && test ! -d "$path"; then
12120       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12121     fi
12122 
12123     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12124   fi
12125 
12126               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12127 $as_echo_n "checking for Boot JDK... " >&6; }
12128               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12129 $as_echo "$BOOT_JDK" >&6; }
12130               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12131 $as_echo_n "checking Boot JDK version... " >&6; }
12132               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12133               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12134 $as_echo "$BOOT_JDK_VERSION" >&6; }
12135             fi # end check jdk version
12136           fi # end check rt.jar
12137         fi # end check javac
12138       fi # end check java
12139     fi # end check boot jdk found
12140   fi
12141 
12142 
12143   # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
12144 
12145   if test "x$BOOT_JDK_FOUND" = xno; then
12146     # Now execute the test
12147 
12148   if test -x /usr/libexec/java_home; then
12149     BOOT_JDK=`/usr/libexec/java_home`
12150     BOOT_JDK_FOUND=maybe
12151     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
12152 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
12153   fi
12154 
12155 
12156     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12157     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12158       # Do we have a bin/java?
12159       if test ! -x "$BOOT_JDK/bin/java"; then
12160         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12161 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12162         BOOT_JDK_FOUND=no
12163       else
12164         # Do we have a bin/javac?
12165         if test ! -x "$BOOT_JDK/bin/javac"; then
12166           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12167 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12168           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12169 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12170           BOOT_JDK_FOUND=no
12171         else
12172           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12173           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12174             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12175 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12176             BOOT_JDK_FOUND=no
12177           else
12178             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12179             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12180 
12181             # Extra M4 quote needed to protect [] in grep expression.
12182             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12183             if test "x$FOUND_VERSION_78" = x; then
12184               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12185 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12186               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12187 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12188               BOOT_JDK_FOUND=no
12189             else
12190               # We're done! :-)
12191               BOOT_JDK_FOUND=yes
12192 
12193   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12194 
12195   # Input might be given as Windows format, start by converting to
12196   # unix format.
12197   path="$BOOT_JDK"
12198   new_path=`$CYGPATH -u "$path"`
12199 
12200   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12201   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12202   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12203   # "foo.exe" is OK but "foo" is an error.
12204   #
12205   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12206   # It is also a way to make sure we got the proper file name for the real test later on.
12207   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12208   if test "x$test_shortpath" = x; then
12209     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12210 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12211     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12212   fi
12213 
12214   # Call helper function which possibly converts this using DOS-style short mode.
12215   # If so, the updated path is stored in $new_path.
12216 
12217   input_path="$new_path"
12218   # Check if we need to convert this using DOS-style short mode. If the path
12219   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12220   # take no chances and rewrite it.
12221   # Note: m4 eats our [], so we need to use [ and ] instead.
12222   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12223   if test "x$has_forbidden_chars" != x; then
12224     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12225     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12226     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12227     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12228       # Going to short mode and back again did indeed matter. Since short mode is
12229       # case insensitive, let's make it lowercase to improve readability.
12230       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12231       # Now convert it back to Unix-stile (cygpath)
12232       input_path=`$CYGPATH -u "$shortmode_path"`
12233       new_path="$input_path"
12234     fi
12235   fi
12236 
12237   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12238   if test "x$test_cygdrive_prefix" = x; then
12239     # As a simple fix, exclude /usr/bin since it's not a real path.
12240     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12241       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12242       # a path prefixed by /cygdrive for fixpath to work.
12243       new_path="$CYGWIN_ROOT_PATH$input_path"
12244     fi
12245   fi
12246 
12247 
12248   if test "x$path" != "x$new_path"; then
12249     BOOT_JDK="$new_path"
12250     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12251 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12252   fi
12253 
12254   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12255 
12256   path="$BOOT_JDK"
12257   has_colon=`$ECHO $path | $GREP ^.:`
12258   new_path="$path"
12259   if test "x$has_colon" = x; then
12260     # Not in mixed or Windows style, start by that.
12261     new_path=`cmd //c echo $path`
12262   fi
12263 
12264 
12265   input_path="$new_path"
12266   # Check if we need to convert this using DOS-style short mode. If the path
12267   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12268   # take no chances and rewrite it.
12269   # Note: m4 eats our [], so we need to use [ and ] instead.
12270   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12271   if test "x$has_forbidden_chars" != x; then
12272     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12273     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12274   fi
12275 
12276 
12277   windows_path="$new_path"
12278   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12279     unix_path=`$CYGPATH -u "$windows_path"`
12280     new_path="$unix_path"
12281   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12282     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12283     new_path="$unix_path"
12284   fi
12285 
12286   if test "x$path" != "x$new_path"; then
12287     BOOT_JDK="$new_path"
12288     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12289 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12290   fi
12291 
12292   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12293   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12294 
12295   else
12296     # We're on a posix platform. Hooray! :)
12297     path="$BOOT_JDK"
12298     has_space=`$ECHO "$path" | $GREP " "`
12299     if test "x$has_space" != x; then
12300       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12301 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12302       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12303     fi
12304 
12305     # Use eval to expand a potential ~
12306     eval path="$path"
12307     if test ! -f "$path" && test ! -d "$path"; then
12308       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12309     fi
12310 
12311     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12312   fi
12313 
12314               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12315 $as_echo_n "checking for Boot JDK... " >&6; }
12316               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12317 $as_echo "$BOOT_JDK" >&6; }
12318               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12319 $as_echo_n "checking Boot JDK version... " >&6; }
12320               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12321               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12322 $as_echo "$BOOT_JDK_VERSION" >&6; }
12323             fi # end check jdk version
12324           fi # end check rt.jar
12325         fi # end check javac
12326       fi # end check java
12327     fi # end check boot jdk found
12328   fi
12329 
12330 
12331   # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
12332 
12333   if test "x$BOOT_JDK_FOUND" = xno; then
12334     # Now execute the test
12335 
12336   # Extract the first word of "javac", so it can be a program name with args.
12337 set dummy javac; ac_word=$2
12338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12339 $as_echo_n "checking for $ac_word... " >&6; }
12340 if ${ac_cv_path_JAVAC_CHECK+:} false; then :
12341   $as_echo_n "(cached) " >&6
12342 else
12343   case $JAVAC_CHECK in
12344   [\\/]* | ?:[\\/]*)
12345   ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
12346   ;;
12347   *)
12348   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12349 for as_dir in $PATH
12350 do
12351   IFS=$as_save_IFS
12352   test -z "$as_dir" && as_dir=.
12353     for ac_exec_ext in '' $ac_executable_extensions; do
12354   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12355     ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
12356     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12357     break 2
12358   fi
12359 done
12360   done
12361 IFS=$as_save_IFS
12362 
12363   ;;
12364 esac
12365 fi
12366 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
12367 if test -n "$JAVAC_CHECK"; then
12368   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
12369 $as_echo "$JAVAC_CHECK" >&6; }
12370 else
12371   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12372 $as_echo "no" >&6; }
12373 fi
12374 
12375 
12376   # Extract the first word of "java", so it can be a program name with args.
12377 set dummy java; ac_word=$2
12378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12379 $as_echo_n "checking for $ac_word... " >&6; }
12380 if ${ac_cv_path_JAVA_CHECK+:} false; then :
12381   $as_echo_n "(cached) " >&6
12382 else
12383   case $JAVA_CHECK in
12384   [\\/]* | ?:[\\/]*)
12385   ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
12386   ;;
12387   *)
12388   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12389 for as_dir in $PATH
12390 do
12391   IFS=$as_save_IFS
12392   test -z "$as_dir" && as_dir=.
12393     for ac_exec_ext in '' $ac_executable_extensions; do
12394   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12395     ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
12396     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12397     break 2
12398   fi
12399 done
12400   done
12401 IFS=$as_save_IFS
12402 
12403   ;;
12404 esac
12405 fi
12406 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
12407 if test -n "$JAVA_CHECK"; then
12408   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
12409 $as_echo "$JAVA_CHECK" >&6; }
12410 else
12411   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12412 $as_echo "no" >&6; }
12413 fi
12414 
12415 
12416   BINARY="$JAVAC_CHECK"
12417   if test "x$JAVAC_CHECK" = x; then
12418     BINARY="$JAVA_CHECK"
12419   fi
12420   if test "x$BINARY" != x; then
12421     # So there is a java(c) binary, it might be part of a JDK.
12422     # Lets find the JDK/JRE directory by following symbolic links.
12423     # Linux/GNU systems often have links from /usr/bin/java to
12424     # /etc/alternatives/java to the real JDK binary.
12425 
12426   if test "x$OPENJDK_BUILD_OS" != xwindows; then
12427     # Follow a chain of symbolic links. Use readlink
12428     # where it exists, else fall back to horribly
12429     # complicated shell code.
12430     if test "x$READLINK_TESTED" != yes; then
12431       # On MacOSX there is a readlink tool with a different
12432       # purpose than the GNU readlink tool. Check the found readlink.
12433       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12434       if test "x$ISGNU" = x; then
12435         # A readlink that we do not know how to use.
12436         # Are there other non-GNU readlinks out there?
12437         READLINK_TESTED=yes
12438         READLINK=
12439       fi
12440     fi
12441 
12442     if test "x$READLINK" != x; then
12443       BINARY=`$READLINK -f $BINARY`
12444     else
12445       # Save the current directory for restoring afterwards
12446       STARTDIR=$PWD
12447       COUNTER=0
12448       sym_link_dir=`$DIRNAME $BINARY`
12449       sym_link_file=`$BASENAME $BINARY`
12450       cd $sym_link_dir
12451       # Use -P flag to resolve symlinks in directories.
12452       cd `$THEPWDCMD -P`
12453       sym_link_dir=`$THEPWDCMD -P`
12454       # Resolve file symlinks
12455       while test $COUNTER -lt 20; do
12456         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12457         if test "x$ISLINK" == x; then
12458           # This is not a symbolic link! We are done!
12459           break
12460         fi
12461         # Again resolve directory symlinks since the target of the just found
12462         # link could be in a different directory
12463         cd `$DIRNAME $ISLINK`
12464         sym_link_dir=`$THEPWDCMD -P`
12465         sym_link_file=`$BASENAME $ISLINK`
12466         let COUNTER=COUNTER+1
12467       done
12468       cd $STARTDIR
12469       BINARY=$sym_link_dir/$sym_link_file
12470     fi
12471   fi
12472 
12473     BOOT_JDK=`dirname "$BINARY"`
12474     BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12475     if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12476       # Looks like we found ourselves an JDK
12477       BOOT_JDK_FOUND=maybe
12478       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12479 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12480     fi
12481   fi
12482 
12483 
12484     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12485     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12486       # Do we have a bin/java?
12487       if test ! -x "$BOOT_JDK/bin/java"; then
12488         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12489 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12490         BOOT_JDK_FOUND=no
12491       else
12492         # Do we have a bin/javac?
12493         if test ! -x "$BOOT_JDK/bin/javac"; then
12494           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12495 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12496           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12497 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12498           BOOT_JDK_FOUND=no
12499         else
12500           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12501           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12502             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12503 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12504             BOOT_JDK_FOUND=no
12505           else
12506             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12507             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12508 
12509             # Extra M4 quote needed to protect [] in grep expression.
12510             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12511             if test "x$FOUND_VERSION_78" = x; then
12512               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12513 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12514               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12515 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12516               BOOT_JDK_FOUND=no
12517             else
12518               # We're done! :-)
12519               BOOT_JDK_FOUND=yes
12520 
12521   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12522 
12523   # Input might be given as Windows format, start by converting to
12524   # unix format.
12525   path="$BOOT_JDK"
12526   new_path=`$CYGPATH -u "$path"`
12527 
12528   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12529   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12530   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12531   # "foo.exe" is OK but "foo" is an error.
12532   #
12533   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12534   # It is also a way to make sure we got the proper file name for the real test later on.
12535   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12536   if test "x$test_shortpath" = x; then
12537     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12538 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12539     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12540   fi
12541 
12542   # Call helper function which possibly converts this using DOS-style short mode.
12543   # If so, the updated path is stored in $new_path.
12544 
12545   input_path="$new_path"
12546   # Check if we need to convert this using DOS-style short mode. If the path
12547   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12548   # take no chances and rewrite it.
12549   # Note: m4 eats our [], so we need to use [ and ] instead.
12550   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12551   if test "x$has_forbidden_chars" != x; then
12552     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12553     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12554     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12555     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12556       # Going to short mode and back again did indeed matter. Since short mode is
12557       # case insensitive, let's make it lowercase to improve readability.
12558       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12559       # Now convert it back to Unix-stile (cygpath)
12560       input_path=`$CYGPATH -u "$shortmode_path"`
12561       new_path="$input_path"
12562     fi
12563   fi
12564 
12565   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12566   if test "x$test_cygdrive_prefix" = x; then
12567     # As a simple fix, exclude /usr/bin since it's not a real path.
12568     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12569       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12570       # a path prefixed by /cygdrive for fixpath to work.
12571       new_path="$CYGWIN_ROOT_PATH$input_path"
12572     fi
12573   fi
12574 
12575 
12576   if test "x$path" != "x$new_path"; then
12577     BOOT_JDK="$new_path"
12578     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12579 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12580   fi
12581 
12582   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12583 
12584   path="$BOOT_JDK"
12585   has_colon=`$ECHO $path | $GREP ^.:`
12586   new_path="$path"
12587   if test "x$has_colon" = x; then
12588     # Not in mixed or Windows style, start by that.
12589     new_path=`cmd //c echo $path`
12590   fi
12591 
12592 
12593   input_path="$new_path"
12594   # Check if we need to convert this using DOS-style short mode. If the path
12595   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12596   # take no chances and rewrite it.
12597   # Note: m4 eats our [], so we need to use [ and ] instead.
12598   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12599   if test "x$has_forbidden_chars" != x; then
12600     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12601     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12602   fi
12603 
12604 
12605   windows_path="$new_path"
12606   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12607     unix_path=`$CYGPATH -u "$windows_path"`
12608     new_path="$unix_path"
12609   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12610     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12611     new_path="$unix_path"
12612   fi
12613 
12614   if test "x$path" != "x$new_path"; then
12615     BOOT_JDK="$new_path"
12616     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12617 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12618   fi
12619 
12620   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12621   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12622 
12623   else
12624     # We're on a posix platform. Hooray! :)
12625     path="$BOOT_JDK"
12626     has_space=`$ECHO "$path" | $GREP " "`
12627     if test "x$has_space" != x; then
12628       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12629 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12630       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12631     fi
12632 
12633     # Use eval to expand a potential ~
12634     eval path="$path"
12635     if test ! -f "$path" && test ! -d "$path"; then
12636       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12637     fi
12638 
12639     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12640   fi
12641 
12642               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12643 $as_echo_n "checking for Boot JDK... " >&6; }
12644               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12645 $as_echo "$BOOT_JDK" >&6; }
12646               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12647 $as_echo_n "checking Boot JDK version... " >&6; }
12648               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12649               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12650 $as_echo "$BOOT_JDK_VERSION" >&6; }
12651             fi # end check jdk version
12652           fi # end check rt.jar
12653         fi # end check javac
12654       fi # end check java
12655     fi # end check boot jdk found
12656   fi
12657 
12658 
12659   # Test: Is there a JDK installed in default, well-known locations?
12660 
12661   if test "x$BOOT_JDK_FOUND" = xno; then
12662     # Now execute the test
12663 
12664   if test "x$OPENJDK_TARGET_OS" = xwindows; then
12665 
12666   if test "x$BOOT_JDK_FOUND" = xno; then
12667     # Now execute the test
12668 
12669   if test "x$ProgramW6432" != x; then
12670     VIRTUAL_DIR="$ProgramW6432/Java"
12671 
12672   windows_path="$VIRTUAL_DIR"
12673   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12674     unix_path=`$CYGPATH -u "$windows_path"`
12675     VIRTUAL_DIR="$unix_path"
12676   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12677     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12678     VIRTUAL_DIR="$unix_path"
12679   fi
12680 
12681 
12682   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12683   BOOT_JDK_SUFFIX=""
12684   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12685   if test "x$ALL_JDKS_FOUND" != x; then
12686     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12687 
12688   if test "x$BOOT_JDK_FOUND" = xno; then
12689     # Now execute the test
12690 
12691         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12692         if test -d "$BOOT_JDK"; then
12693           BOOT_JDK_FOUND=maybe
12694           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12695 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12696         fi
12697 
12698 
12699     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12700     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12701       # Do we have a bin/java?
12702       if test ! -x "$BOOT_JDK/bin/java"; then
12703         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12704 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12705         BOOT_JDK_FOUND=no
12706       else
12707         # Do we have a bin/javac?
12708         if test ! -x "$BOOT_JDK/bin/javac"; then
12709           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12710 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12711           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12712 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12713           BOOT_JDK_FOUND=no
12714         else
12715           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12716           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12717             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12718 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12719             BOOT_JDK_FOUND=no
12720           else
12721             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12722             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12723 
12724             # Extra M4 quote needed to protect [] in grep expression.
12725             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12726             if test "x$FOUND_VERSION_78" = x; then
12727               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12728 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12729               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12730 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12731               BOOT_JDK_FOUND=no
12732             else
12733               # We're done! :-)
12734               BOOT_JDK_FOUND=yes
12735 
12736   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12737 
12738   # Input might be given as Windows format, start by converting to
12739   # unix format.
12740   path="$BOOT_JDK"
12741   new_path=`$CYGPATH -u "$path"`
12742 
12743   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12744   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12745   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12746   # "foo.exe" is OK but "foo" is an error.
12747   #
12748   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12749   # It is also a way to make sure we got the proper file name for the real test later on.
12750   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12751   if test "x$test_shortpath" = x; then
12752     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12753 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12754     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12755   fi
12756 
12757   # Call helper function which possibly converts this using DOS-style short mode.
12758   # If so, the updated path is stored in $new_path.
12759 
12760   input_path="$new_path"
12761   # Check if we need to convert this using DOS-style short mode. If the path
12762   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12763   # take no chances and rewrite it.
12764   # Note: m4 eats our [], so we need to use [ and ] instead.
12765   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12766   if test "x$has_forbidden_chars" != x; then
12767     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12768     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12769     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12770     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12771       # Going to short mode and back again did indeed matter. Since short mode is
12772       # case insensitive, let's make it lowercase to improve readability.
12773       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12774       # Now convert it back to Unix-stile (cygpath)
12775       input_path=`$CYGPATH -u "$shortmode_path"`
12776       new_path="$input_path"
12777     fi
12778   fi
12779 
12780   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12781   if test "x$test_cygdrive_prefix" = x; then
12782     # As a simple fix, exclude /usr/bin since it's not a real path.
12783     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12784       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12785       # a path prefixed by /cygdrive for fixpath to work.
12786       new_path="$CYGWIN_ROOT_PATH$input_path"
12787     fi
12788   fi
12789 
12790 
12791   if test "x$path" != "x$new_path"; then
12792     BOOT_JDK="$new_path"
12793     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12794 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12795   fi
12796 
12797   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12798 
12799   path="$BOOT_JDK"
12800   has_colon=`$ECHO $path | $GREP ^.:`
12801   new_path="$path"
12802   if test "x$has_colon" = x; then
12803     # Not in mixed or Windows style, start by that.
12804     new_path=`cmd //c echo $path`
12805   fi
12806 
12807 
12808   input_path="$new_path"
12809   # Check if we need to convert this using DOS-style short mode. If the path
12810   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12811   # take no chances and rewrite it.
12812   # Note: m4 eats our [], so we need to use [ and ] instead.
12813   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12814   if test "x$has_forbidden_chars" != x; then
12815     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12816     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12817   fi
12818 
12819 
12820   windows_path="$new_path"
12821   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12822     unix_path=`$CYGPATH -u "$windows_path"`
12823     new_path="$unix_path"
12824   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12825     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12826     new_path="$unix_path"
12827   fi
12828 
12829   if test "x$path" != "x$new_path"; then
12830     BOOT_JDK="$new_path"
12831     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12832 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12833   fi
12834 
12835   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12836   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12837 
12838   else
12839     # We're on a posix platform. Hooray! :)
12840     path="$BOOT_JDK"
12841     has_space=`$ECHO "$path" | $GREP " "`
12842     if test "x$has_space" != x; then
12843       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12844 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12845       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12846     fi
12847 
12848     # Use eval to expand a potential ~
12849     eval path="$path"
12850     if test ! -f "$path" && test ! -d "$path"; then
12851       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12852     fi
12853 
12854     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12855   fi
12856 
12857               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12858 $as_echo_n "checking for Boot JDK... " >&6; }
12859               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12860 $as_echo "$BOOT_JDK" >&6; }
12861               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12862 $as_echo_n "checking Boot JDK version... " >&6; }
12863               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12864               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12865 $as_echo "$BOOT_JDK_VERSION" >&6; }
12866             fi # end check jdk version
12867           fi # end check rt.jar
12868         fi # end check javac
12869       fi # end check java
12870     fi # end check boot jdk found
12871   fi
12872 
12873     done
12874   fi
12875 
12876   fi
12877 
12878 
12879     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12880     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12881       # Do we have a bin/java?
12882       if test ! -x "$BOOT_JDK/bin/java"; then
12883         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12884 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12885         BOOT_JDK_FOUND=no
12886       else
12887         # Do we have a bin/javac?
12888         if test ! -x "$BOOT_JDK/bin/javac"; then
12889           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12890 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12891           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12892 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12893           BOOT_JDK_FOUND=no
12894         else
12895           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12896           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12897             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12898 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12899             BOOT_JDK_FOUND=no
12900           else
12901             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12902             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12903 
12904             # Extra M4 quote needed to protect [] in grep expression.
12905             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12906             if test "x$FOUND_VERSION_78" = x; then
12907               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12908 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12909               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12910 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12911               BOOT_JDK_FOUND=no
12912             else
12913               # We're done! :-)
12914               BOOT_JDK_FOUND=yes
12915 
12916   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12917 
12918   # Input might be given as Windows format, start by converting to
12919   # unix format.
12920   path="$BOOT_JDK"
12921   new_path=`$CYGPATH -u "$path"`
12922 
12923   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12924   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12925   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12926   # "foo.exe" is OK but "foo" is an error.
12927   #
12928   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12929   # It is also a way to make sure we got the proper file name for the real test later on.
12930   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12931   if test "x$test_shortpath" = x; then
12932     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12933 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12934     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12935   fi
12936 
12937   # Call helper function which possibly converts this using DOS-style short mode.
12938   # If so, the updated path is stored in $new_path.
12939 
12940   input_path="$new_path"
12941   # Check if we need to convert this using DOS-style short mode. If the path
12942   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12943   # take no chances and rewrite it.
12944   # Note: m4 eats our [], so we need to use [ and ] instead.
12945   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12946   if test "x$has_forbidden_chars" != x; then
12947     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12948     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12949     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12950     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12951       # Going to short mode and back again did indeed matter. Since short mode is
12952       # case insensitive, let's make it lowercase to improve readability.
12953       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12954       # Now convert it back to Unix-stile (cygpath)
12955       input_path=`$CYGPATH -u "$shortmode_path"`
12956       new_path="$input_path"
12957     fi
12958   fi
12959 
12960   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12961   if test "x$test_cygdrive_prefix" = x; then
12962     # As a simple fix, exclude /usr/bin since it's not a real path.
12963     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12964       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12965       # a path prefixed by /cygdrive for fixpath to work.
12966       new_path="$CYGWIN_ROOT_PATH$input_path"
12967     fi
12968   fi
12969 
12970 
12971   if test "x$path" != "x$new_path"; then
12972     BOOT_JDK="$new_path"
12973     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12974 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12975   fi
12976 
12977   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12978 
12979   path="$BOOT_JDK"
12980   has_colon=`$ECHO $path | $GREP ^.:`
12981   new_path="$path"
12982   if test "x$has_colon" = x; then
12983     # Not in mixed or Windows style, start by that.
12984     new_path=`cmd //c echo $path`
12985   fi
12986 
12987 
12988   input_path="$new_path"
12989   # Check if we need to convert this using DOS-style short mode. If the path
12990   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12991   # take no chances and rewrite it.
12992   # Note: m4 eats our [], so we need to use [ and ] instead.
12993   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12994   if test "x$has_forbidden_chars" != x; then
12995     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12996     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12997   fi
12998 
12999 
13000   windows_path="$new_path"
13001   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13002     unix_path=`$CYGPATH -u "$windows_path"`
13003     new_path="$unix_path"
13004   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13005     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13006     new_path="$unix_path"
13007   fi
13008 
13009   if test "x$path" != "x$new_path"; then
13010     BOOT_JDK="$new_path"
13011     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13012 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13013   fi
13014 
13015   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13016   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13017 
13018   else
13019     # We're on a posix platform. Hooray! :)
13020     path="$BOOT_JDK"
13021     has_space=`$ECHO "$path" | $GREP " "`
13022     if test "x$has_space" != x; then
13023       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13024 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13025       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13026     fi
13027 
13028     # Use eval to expand a potential ~
13029     eval path="$path"
13030     if test ! -f "$path" && test ! -d "$path"; then
13031       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13032     fi
13033 
13034     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13035   fi
13036 
13037               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13038 $as_echo_n "checking for Boot JDK... " >&6; }
13039               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13040 $as_echo "$BOOT_JDK" >&6; }
13041               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13042 $as_echo_n "checking Boot JDK version... " >&6; }
13043               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13044               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13045 $as_echo "$BOOT_JDK_VERSION" >&6; }
13046             fi # end check jdk version
13047           fi # end check rt.jar
13048         fi # end check javac
13049       fi # end check java
13050     fi # end check boot jdk found
13051   fi
13052 
13053 
13054   if test "x$BOOT_JDK_FOUND" = xno; then
13055     # Now execute the test
13056 
13057   if test "x$PROGRAMW6432" != x; then
13058     VIRTUAL_DIR="$PROGRAMW6432/Java"
13059 
13060   windows_path="$VIRTUAL_DIR"
13061   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13062     unix_path=`$CYGPATH -u "$windows_path"`
13063     VIRTUAL_DIR="$unix_path"
13064   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13065     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13066     VIRTUAL_DIR="$unix_path"
13067   fi
13068 
13069 
13070   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13071   BOOT_JDK_SUFFIX=""
13072   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13073   if test "x$ALL_JDKS_FOUND" != x; then
13074     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13075 
13076   if test "x$BOOT_JDK_FOUND" = xno; then
13077     # Now execute the test
13078 
13079         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13080         if test -d "$BOOT_JDK"; then
13081           BOOT_JDK_FOUND=maybe
13082           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13083 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13084         fi
13085 
13086 
13087     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13088     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13089       # Do we have a bin/java?
13090       if test ! -x "$BOOT_JDK/bin/java"; then
13091         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13092 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13093         BOOT_JDK_FOUND=no
13094       else
13095         # Do we have a bin/javac?
13096         if test ! -x "$BOOT_JDK/bin/javac"; then
13097           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13098 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13099           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13100 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13101           BOOT_JDK_FOUND=no
13102         else
13103           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13104           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13105             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13106 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13107             BOOT_JDK_FOUND=no
13108           else
13109             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13110             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13111 
13112             # Extra M4 quote needed to protect [] in grep expression.
13113             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13114             if test "x$FOUND_VERSION_78" = x; then
13115               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13116 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13117               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13118 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13119               BOOT_JDK_FOUND=no
13120             else
13121               # We're done! :-)
13122               BOOT_JDK_FOUND=yes
13123 
13124   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13125 
13126   # Input might be given as Windows format, start by converting to
13127   # unix format.
13128   path="$BOOT_JDK"
13129   new_path=`$CYGPATH -u "$path"`
13130 
13131   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13132   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13133   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13134   # "foo.exe" is OK but "foo" is an error.
13135   #
13136   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13137   # It is also a way to make sure we got the proper file name for the real test later on.
13138   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13139   if test "x$test_shortpath" = x; then
13140     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13141 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13142     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13143   fi
13144 
13145   # Call helper function which possibly converts this using DOS-style short mode.
13146   # If so, the updated path is stored in $new_path.
13147 
13148   input_path="$new_path"
13149   # Check if we need to convert this using DOS-style short mode. If the path
13150   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13151   # take no chances and rewrite it.
13152   # Note: m4 eats our [], so we need to use [ and ] instead.
13153   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13154   if test "x$has_forbidden_chars" != x; then
13155     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13156     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13157     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13158     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13159       # Going to short mode and back again did indeed matter. Since short mode is
13160       # case insensitive, let's make it lowercase to improve readability.
13161       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13162       # Now convert it back to Unix-stile (cygpath)
13163       input_path=`$CYGPATH -u "$shortmode_path"`
13164       new_path="$input_path"
13165     fi
13166   fi
13167 
13168   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13169   if test "x$test_cygdrive_prefix" = x; then
13170     # As a simple fix, exclude /usr/bin since it's not a real path.
13171     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13172       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13173       # a path prefixed by /cygdrive for fixpath to work.
13174       new_path="$CYGWIN_ROOT_PATH$input_path"
13175     fi
13176   fi
13177 
13178 
13179   if test "x$path" != "x$new_path"; then
13180     BOOT_JDK="$new_path"
13181     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13182 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13183   fi
13184 
13185   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13186 
13187   path="$BOOT_JDK"
13188   has_colon=`$ECHO $path | $GREP ^.:`
13189   new_path="$path"
13190   if test "x$has_colon" = x; then
13191     # Not in mixed or Windows style, start by that.
13192     new_path=`cmd //c echo $path`
13193   fi
13194 
13195 
13196   input_path="$new_path"
13197   # Check if we need to convert this using DOS-style short mode. If the path
13198   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13199   # take no chances and rewrite it.
13200   # Note: m4 eats our [], so we need to use [ and ] instead.
13201   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13202   if test "x$has_forbidden_chars" != x; then
13203     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13204     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13205   fi
13206 
13207 
13208   windows_path="$new_path"
13209   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13210     unix_path=`$CYGPATH -u "$windows_path"`
13211     new_path="$unix_path"
13212   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13213     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13214     new_path="$unix_path"
13215   fi
13216 
13217   if test "x$path" != "x$new_path"; then
13218     BOOT_JDK="$new_path"
13219     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13220 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13221   fi
13222 
13223   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13224   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13225 
13226   else
13227     # We're on a posix platform. Hooray! :)
13228     path="$BOOT_JDK"
13229     has_space=`$ECHO "$path" | $GREP " "`
13230     if test "x$has_space" != x; then
13231       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13232 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13233       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13234     fi
13235 
13236     # Use eval to expand a potential ~
13237     eval path="$path"
13238     if test ! -f "$path" && test ! -d "$path"; then
13239       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13240     fi
13241 
13242     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13243   fi
13244 
13245               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13246 $as_echo_n "checking for Boot JDK... " >&6; }
13247               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13248 $as_echo "$BOOT_JDK" >&6; }
13249               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13250 $as_echo_n "checking Boot JDK version... " >&6; }
13251               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13252               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13253 $as_echo "$BOOT_JDK_VERSION" >&6; }
13254             fi # end check jdk version
13255           fi # end check rt.jar
13256         fi # end check javac
13257       fi # end check java
13258     fi # end check boot jdk found
13259   fi
13260 
13261     done
13262   fi
13263 
13264   fi
13265 
13266 
13267     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13268     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13269       # Do we have a bin/java?
13270       if test ! -x "$BOOT_JDK/bin/java"; then
13271         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13272 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13273         BOOT_JDK_FOUND=no
13274       else
13275         # Do we have a bin/javac?
13276         if test ! -x "$BOOT_JDK/bin/javac"; then
13277           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13278 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13279           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13280 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13281           BOOT_JDK_FOUND=no
13282         else
13283           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13284           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13285             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13286 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13287             BOOT_JDK_FOUND=no
13288           else
13289             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13290             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13291 
13292             # Extra M4 quote needed to protect [] in grep expression.
13293             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13294             if test "x$FOUND_VERSION_78" = x; then
13295               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13296 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13297               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13298 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13299               BOOT_JDK_FOUND=no
13300             else
13301               # We're done! :-)
13302               BOOT_JDK_FOUND=yes
13303 
13304   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13305 
13306   # Input might be given as Windows format, start by converting to
13307   # unix format.
13308   path="$BOOT_JDK"
13309   new_path=`$CYGPATH -u "$path"`
13310 
13311   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13312   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13313   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13314   # "foo.exe" is OK but "foo" is an error.
13315   #
13316   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13317   # It is also a way to make sure we got the proper file name for the real test later on.
13318   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13319   if test "x$test_shortpath" = x; then
13320     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13321 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13322     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13323   fi
13324 
13325   # Call helper function which possibly converts this using DOS-style short mode.
13326   # If so, the updated path is stored in $new_path.
13327 
13328   input_path="$new_path"
13329   # Check if we need to convert this using DOS-style short mode. If the path
13330   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13331   # take no chances and rewrite it.
13332   # Note: m4 eats our [], so we need to use [ and ] instead.
13333   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13334   if test "x$has_forbidden_chars" != x; then
13335     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13336     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13337     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13338     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13339       # Going to short mode and back again did indeed matter. Since short mode is
13340       # case insensitive, let's make it lowercase to improve readability.
13341       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13342       # Now convert it back to Unix-stile (cygpath)
13343       input_path=`$CYGPATH -u "$shortmode_path"`
13344       new_path="$input_path"
13345     fi
13346   fi
13347 
13348   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13349   if test "x$test_cygdrive_prefix" = x; then
13350     # As a simple fix, exclude /usr/bin since it's not a real path.
13351     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13352       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13353       # a path prefixed by /cygdrive for fixpath to work.
13354       new_path="$CYGWIN_ROOT_PATH$input_path"
13355     fi
13356   fi
13357 
13358 
13359   if test "x$path" != "x$new_path"; then
13360     BOOT_JDK="$new_path"
13361     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13362 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13363   fi
13364 
13365   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13366 
13367   path="$BOOT_JDK"
13368   has_colon=`$ECHO $path | $GREP ^.:`
13369   new_path="$path"
13370   if test "x$has_colon" = x; then
13371     # Not in mixed or Windows style, start by that.
13372     new_path=`cmd //c echo $path`
13373   fi
13374 
13375 
13376   input_path="$new_path"
13377   # Check if we need to convert this using DOS-style short mode. If the path
13378   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13379   # take no chances and rewrite it.
13380   # Note: m4 eats our [], so we need to use [ and ] instead.
13381   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13382   if test "x$has_forbidden_chars" != x; then
13383     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13384     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13385   fi
13386 
13387 
13388   windows_path="$new_path"
13389   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13390     unix_path=`$CYGPATH -u "$windows_path"`
13391     new_path="$unix_path"
13392   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13393     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13394     new_path="$unix_path"
13395   fi
13396 
13397   if test "x$path" != "x$new_path"; then
13398     BOOT_JDK="$new_path"
13399     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13400 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13401   fi
13402 
13403   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13404   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13405 
13406   else
13407     # We're on a posix platform. Hooray! :)
13408     path="$BOOT_JDK"
13409     has_space=`$ECHO "$path" | $GREP " "`
13410     if test "x$has_space" != x; then
13411       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13412 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13413       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13414     fi
13415 
13416     # Use eval to expand a potential ~
13417     eval path="$path"
13418     if test ! -f "$path" && test ! -d "$path"; then
13419       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13420     fi
13421 
13422     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13423   fi
13424 
13425               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13426 $as_echo_n "checking for Boot JDK... " >&6; }
13427               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13428 $as_echo "$BOOT_JDK" >&6; }
13429               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13430 $as_echo_n "checking Boot JDK version... " >&6; }
13431               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13432               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13433 $as_echo "$BOOT_JDK_VERSION" >&6; }
13434             fi # end check jdk version
13435           fi # end check rt.jar
13436         fi # end check javac
13437       fi # end check java
13438     fi # end check boot jdk found
13439   fi
13440 
13441 
13442   if test "x$BOOT_JDK_FOUND" = xno; then
13443     # Now execute the test
13444 
13445   if test "x$PROGRAMFILES" != x; then
13446     VIRTUAL_DIR="$PROGRAMFILES/Java"
13447 
13448   windows_path="$VIRTUAL_DIR"
13449   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13450     unix_path=`$CYGPATH -u "$windows_path"`
13451     VIRTUAL_DIR="$unix_path"
13452   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13453     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13454     VIRTUAL_DIR="$unix_path"
13455   fi
13456 
13457 
13458   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13459   BOOT_JDK_SUFFIX=""
13460   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13461   if test "x$ALL_JDKS_FOUND" != x; then
13462     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13463 
13464   if test "x$BOOT_JDK_FOUND" = xno; then
13465     # Now execute the test
13466 
13467         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13468         if test -d "$BOOT_JDK"; then
13469           BOOT_JDK_FOUND=maybe
13470           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13471 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13472         fi
13473 
13474 
13475     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13476     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13477       # Do we have a bin/java?
13478       if test ! -x "$BOOT_JDK/bin/java"; then
13479         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13480 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13481         BOOT_JDK_FOUND=no
13482       else
13483         # Do we have a bin/javac?
13484         if test ! -x "$BOOT_JDK/bin/javac"; then
13485           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13486 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13487           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13488 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13489           BOOT_JDK_FOUND=no
13490         else
13491           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13492           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13493             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13494 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13495             BOOT_JDK_FOUND=no
13496           else
13497             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13498             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13499 
13500             # Extra M4 quote needed to protect [] in grep expression.
13501             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13502             if test "x$FOUND_VERSION_78" = x; then
13503               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13504 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13505               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13506 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13507               BOOT_JDK_FOUND=no
13508             else
13509               # We're done! :-)
13510               BOOT_JDK_FOUND=yes
13511 
13512   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13513 
13514   # Input might be given as Windows format, start by converting to
13515   # unix format.
13516   path="$BOOT_JDK"
13517   new_path=`$CYGPATH -u "$path"`
13518 
13519   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13520   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13521   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13522   # "foo.exe" is OK but "foo" is an error.
13523   #
13524   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13525   # It is also a way to make sure we got the proper file name for the real test later on.
13526   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13527   if test "x$test_shortpath" = x; then
13528     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13529 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13530     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13531   fi
13532 
13533   # Call helper function which possibly converts this using DOS-style short mode.
13534   # If so, the updated path is stored in $new_path.
13535 
13536   input_path="$new_path"
13537   # Check if we need to convert this using DOS-style short mode. If the path
13538   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13539   # take no chances and rewrite it.
13540   # Note: m4 eats our [], so we need to use [ and ] instead.
13541   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13542   if test "x$has_forbidden_chars" != x; then
13543     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13544     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13545     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13546     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13547       # Going to short mode and back again did indeed matter. Since short mode is
13548       # case insensitive, let's make it lowercase to improve readability.
13549       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13550       # Now convert it back to Unix-stile (cygpath)
13551       input_path=`$CYGPATH -u "$shortmode_path"`
13552       new_path="$input_path"
13553     fi
13554   fi
13555 
13556   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13557   if test "x$test_cygdrive_prefix" = x; then
13558     # As a simple fix, exclude /usr/bin since it's not a real path.
13559     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13560       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13561       # a path prefixed by /cygdrive for fixpath to work.
13562       new_path="$CYGWIN_ROOT_PATH$input_path"
13563     fi
13564   fi
13565 
13566 
13567   if test "x$path" != "x$new_path"; then
13568     BOOT_JDK="$new_path"
13569     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13570 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13571   fi
13572 
13573   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13574 
13575   path="$BOOT_JDK"
13576   has_colon=`$ECHO $path | $GREP ^.:`
13577   new_path="$path"
13578   if test "x$has_colon" = x; then
13579     # Not in mixed or Windows style, start by that.
13580     new_path=`cmd //c echo $path`
13581   fi
13582 
13583 
13584   input_path="$new_path"
13585   # Check if we need to convert this using DOS-style short mode. If the path
13586   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13587   # take no chances and rewrite it.
13588   # Note: m4 eats our [], so we need to use [ and ] instead.
13589   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13590   if test "x$has_forbidden_chars" != x; then
13591     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13592     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13593   fi
13594 
13595 
13596   windows_path="$new_path"
13597   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13598     unix_path=`$CYGPATH -u "$windows_path"`
13599     new_path="$unix_path"
13600   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13601     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13602     new_path="$unix_path"
13603   fi
13604 
13605   if test "x$path" != "x$new_path"; then
13606     BOOT_JDK="$new_path"
13607     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13608 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13609   fi
13610 
13611   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13612   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13613 
13614   else
13615     # We're on a posix platform. Hooray! :)
13616     path="$BOOT_JDK"
13617     has_space=`$ECHO "$path" | $GREP " "`
13618     if test "x$has_space" != x; then
13619       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13620 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13621       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13622     fi
13623 
13624     # Use eval to expand a potential ~
13625     eval path="$path"
13626     if test ! -f "$path" && test ! -d "$path"; then
13627       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13628     fi
13629 
13630     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13631   fi
13632 
13633               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13634 $as_echo_n "checking for Boot JDK... " >&6; }
13635               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13636 $as_echo "$BOOT_JDK" >&6; }
13637               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13638 $as_echo_n "checking Boot JDK version... " >&6; }
13639               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13640               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13641 $as_echo "$BOOT_JDK_VERSION" >&6; }
13642             fi # end check jdk version
13643           fi # end check rt.jar
13644         fi # end check javac
13645       fi # end check java
13646     fi # end check boot jdk found
13647   fi
13648 
13649     done
13650   fi
13651 
13652   fi
13653 
13654 
13655     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13656     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13657       # Do we have a bin/java?
13658       if test ! -x "$BOOT_JDK/bin/java"; then
13659         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13660 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13661         BOOT_JDK_FOUND=no
13662       else
13663         # Do we have a bin/javac?
13664         if test ! -x "$BOOT_JDK/bin/javac"; then
13665           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13666 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13667           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13668 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13669           BOOT_JDK_FOUND=no
13670         else
13671           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13672           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13673             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13674 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13675             BOOT_JDK_FOUND=no
13676           else
13677             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13678             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13679 
13680             # Extra M4 quote needed to protect [] in grep expression.
13681             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13682             if test "x$FOUND_VERSION_78" = x; then
13683               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13684 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13685               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13686 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13687               BOOT_JDK_FOUND=no
13688             else
13689               # We're done! :-)
13690               BOOT_JDK_FOUND=yes
13691 
13692   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13693 
13694   # Input might be given as Windows format, start by converting to
13695   # unix format.
13696   path="$BOOT_JDK"
13697   new_path=`$CYGPATH -u "$path"`
13698 
13699   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13700   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13701   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13702   # "foo.exe" is OK but "foo" is an error.
13703   #
13704   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13705   # It is also a way to make sure we got the proper file name for the real test later on.
13706   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13707   if test "x$test_shortpath" = x; then
13708     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13709 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13710     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13711   fi
13712 
13713   # Call helper function which possibly converts this using DOS-style short mode.
13714   # If so, the updated path is stored in $new_path.
13715 
13716   input_path="$new_path"
13717   # Check if we need to convert this using DOS-style short mode. If the path
13718   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13719   # take no chances and rewrite it.
13720   # Note: m4 eats our [], so we need to use [ and ] instead.
13721   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13722   if test "x$has_forbidden_chars" != x; then
13723     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13724     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13725     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13726     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13727       # Going to short mode and back again did indeed matter. Since short mode is
13728       # case insensitive, let's make it lowercase to improve readability.
13729       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13730       # Now convert it back to Unix-stile (cygpath)
13731       input_path=`$CYGPATH -u "$shortmode_path"`
13732       new_path="$input_path"
13733     fi
13734   fi
13735 
13736   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13737   if test "x$test_cygdrive_prefix" = x; then
13738     # As a simple fix, exclude /usr/bin since it's not a real path.
13739     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13740       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13741       # a path prefixed by /cygdrive for fixpath to work.
13742       new_path="$CYGWIN_ROOT_PATH$input_path"
13743     fi
13744   fi
13745 
13746 
13747   if test "x$path" != "x$new_path"; then
13748     BOOT_JDK="$new_path"
13749     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13750 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13751   fi
13752 
13753   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13754 
13755   path="$BOOT_JDK"
13756   has_colon=`$ECHO $path | $GREP ^.:`
13757   new_path="$path"
13758   if test "x$has_colon" = x; then
13759     # Not in mixed or Windows style, start by that.
13760     new_path=`cmd //c echo $path`
13761   fi
13762 
13763 
13764   input_path="$new_path"
13765   # Check if we need to convert this using DOS-style short mode. If the path
13766   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13767   # take no chances and rewrite it.
13768   # Note: m4 eats our [], so we need to use [ and ] instead.
13769   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13770   if test "x$has_forbidden_chars" != x; then
13771     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13772     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13773   fi
13774 
13775 
13776   windows_path="$new_path"
13777   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13778     unix_path=`$CYGPATH -u "$windows_path"`
13779     new_path="$unix_path"
13780   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13781     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13782     new_path="$unix_path"
13783   fi
13784 
13785   if test "x$path" != "x$new_path"; then
13786     BOOT_JDK="$new_path"
13787     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13788 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13789   fi
13790 
13791   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13792   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13793 
13794   else
13795     # We're on a posix platform. Hooray! :)
13796     path="$BOOT_JDK"
13797     has_space=`$ECHO "$path" | $GREP " "`
13798     if test "x$has_space" != x; then
13799       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13800 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13801       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13802     fi
13803 
13804     # Use eval to expand a potential ~
13805     eval path="$path"
13806     if test ! -f "$path" && test ! -d "$path"; then
13807       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13808     fi
13809 
13810     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13811   fi
13812 
13813               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13814 $as_echo_n "checking for Boot JDK... " >&6; }
13815               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13816 $as_echo "$BOOT_JDK" >&6; }
13817               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13818 $as_echo_n "checking Boot JDK version... " >&6; }
13819               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13820               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13821 $as_echo "$BOOT_JDK_VERSION" >&6; }
13822             fi # end check jdk version
13823           fi # end check rt.jar
13824         fi # end check javac
13825       fi # end check java
13826     fi # end check boot jdk found
13827   fi
13828 
13829 
13830   if test "x$BOOT_JDK_FOUND" = xno; then
13831     # Now execute the test
13832 
13833   if test "x$ProgramFiles" != x; then
13834     VIRTUAL_DIR="$ProgramFiles/Java"
13835 
13836   windows_path="$VIRTUAL_DIR"
13837   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13838     unix_path=`$CYGPATH -u "$windows_path"`
13839     VIRTUAL_DIR="$unix_path"
13840   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13841     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13842     VIRTUAL_DIR="$unix_path"
13843   fi
13844 
13845 
13846   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13847   BOOT_JDK_SUFFIX=""
13848   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13849   if test "x$ALL_JDKS_FOUND" != x; then
13850     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13851 
13852   if test "x$BOOT_JDK_FOUND" = xno; then
13853     # Now execute the test
13854 
13855         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13856         if test -d "$BOOT_JDK"; then
13857           BOOT_JDK_FOUND=maybe
13858           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13859 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13860         fi
13861 
13862 
13863     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13864     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13865       # Do we have a bin/java?
13866       if test ! -x "$BOOT_JDK/bin/java"; then
13867         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13868 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13869         BOOT_JDK_FOUND=no
13870       else
13871         # Do we have a bin/javac?
13872         if test ! -x "$BOOT_JDK/bin/javac"; then
13873           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13874 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13875           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13876 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13877           BOOT_JDK_FOUND=no
13878         else
13879           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13880           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13881             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13882 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13883             BOOT_JDK_FOUND=no
13884           else
13885             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13886             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13887 
13888             # Extra M4 quote needed to protect [] in grep expression.
13889             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13890             if test "x$FOUND_VERSION_78" = x; then
13891               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13892 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13893               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13894 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13895               BOOT_JDK_FOUND=no
13896             else
13897               # We're done! :-)
13898               BOOT_JDK_FOUND=yes
13899 
13900   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13901 
13902   # Input might be given as Windows format, start by converting to
13903   # unix format.
13904   path="$BOOT_JDK"
13905   new_path=`$CYGPATH -u "$path"`
13906 
13907   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13908   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13909   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13910   # "foo.exe" is OK but "foo" is an error.
13911   #
13912   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13913   # It is also a way to make sure we got the proper file name for the real test later on.
13914   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13915   if test "x$test_shortpath" = x; then
13916     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13917 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13918     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13919   fi
13920 
13921   # Call helper function which possibly converts this using DOS-style short mode.
13922   # If so, the updated path is stored in $new_path.
13923 
13924   input_path="$new_path"
13925   # Check if we need to convert this using DOS-style short mode. If the path
13926   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13927   # take no chances and rewrite it.
13928   # Note: m4 eats our [], so we need to use [ and ] instead.
13929   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13930   if test "x$has_forbidden_chars" != x; then
13931     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13932     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13933     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13934     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13935       # Going to short mode and back again did indeed matter. Since short mode is
13936       # case insensitive, let's make it lowercase to improve readability.
13937       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13938       # Now convert it back to Unix-stile (cygpath)
13939       input_path=`$CYGPATH -u "$shortmode_path"`
13940       new_path="$input_path"
13941     fi
13942   fi
13943 
13944   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13945   if test "x$test_cygdrive_prefix" = x; then
13946     # As a simple fix, exclude /usr/bin since it's not a real path.
13947     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13948       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13949       # a path prefixed by /cygdrive for fixpath to work.
13950       new_path="$CYGWIN_ROOT_PATH$input_path"
13951     fi
13952   fi
13953 
13954 
13955   if test "x$path" != "x$new_path"; then
13956     BOOT_JDK="$new_path"
13957     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13958 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13959   fi
13960 
13961   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13962 
13963   path="$BOOT_JDK"
13964   has_colon=`$ECHO $path | $GREP ^.:`
13965   new_path="$path"
13966   if test "x$has_colon" = x; then
13967     # Not in mixed or Windows style, start by that.
13968     new_path=`cmd //c echo $path`
13969   fi
13970 
13971 
13972   input_path="$new_path"
13973   # Check if we need to convert this using DOS-style short mode. If the path
13974   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13975   # take no chances and rewrite it.
13976   # Note: m4 eats our [], so we need to use [ and ] instead.
13977   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13978   if test "x$has_forbidden_chars" != x; then
13979     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13980     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13981   fi
13982 
13983 
13984   windows_path="$new_path"
13985   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13986     unix_path=`$CYGPATH -u "$windows_path"`
13987     new_path="$unix_path"
13988   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13989     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13990     new_path="$unix_path"
13991   fi
13992 
13993   if test "x$path" != "x$new_path"; then
13994     BOOT_JDK="$new_path"
13995     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13996 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13997   fi
13998 
13999   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14000   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14001 
14002   else
14003     # We're on a posix platform. Hooray! :)
14004     path="$BOOT_JDK"
14005     has_space=`$ECHO "$path" | $GREP " "`
14006     if test "x$has_space" != x; then
14007       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14008 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14009       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14010     fi
14011 
14012     # Use eval to expand a potential ~
14013     eval path="$path"
14014     if test ! -f "$path" && test ! -d "$path"; then
14015       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14016     fi
14017 
14018     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14019   fi
14020 
14021               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14022 $as_echo_n "checking for Boot JDK... " >&6; }
14023               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14024 $as_echo "$BOOT_JDK" >&6; }
14025               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14026 $as_echo_n "checking Boot JDK version... " >&6; }
14027               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14028               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14029 $as_echo "$BOOT_JDK_VERSION" >&6; }
14030             fi # end check jdk version
14031           fi # end check rt.jar
14032         fi # end check javac
14033       fi # end check java
14034     fi # end check boot jdk found
14035   fi
14036 
14037     done
14038   fi
14039 
14040   fi
14041 
14042 
14043     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14044     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14045       # Do we have a bin/java?
14046       if test ! -x "$BOOT_JDK/bin/java"; then
14047         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14048 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14049         BOOT_JDK_FOUND=no
14050       else
14051         # Do we have a bin/javac?
14052         if test ! -x "$BOOT_JDK/bin/javac"; then
14053           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14054 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14055           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14056 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14057           BOOT_JDK_FOUND=no
14058         else
14059           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14060           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14061             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14062 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14063             BOOT_JDK_FOUND=no
14064           else
14065             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14066             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14067 
14068             # Extra M4 quote needed to protect [] in grep expression.
14069             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14070             if test "x$FOUND_VERSION_78" = x; then
14071               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14072 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14073               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14074 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14075               BOOT_JDK_FOUND=no
14076             else
14077               # We're done! :-)
14078               BOOT_JDK_FOUND=yes
14079 
14080   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14081 
14082   # Input might be given as Windows format, start by converting to
14083   # unix format.
14084   path="$BOOT_JDK"
14085   new_path=`$CYGPATH -u "$path"`
14086 
14087   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14088   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14089   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14090   # "foo.exe" is OK but "foo" is an error.
14091   #
14092   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14093   # It is also a way to make sure we got the proper file name for the real test later on.
14094   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14095   if test "x$test_shortpath" = x; then
14096     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14097 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14098     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14099   fi
14100 
14101   # Call helper function which possibly converts this using DOS-style short mode.
14102   # If so, the updated path is stored in $new_path.
14103 
14104   input_path="$new_path"
14105   # Check if we need to convert this using DOS-style short mode. If the path
14106   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14107   # take no chances and rewrite it.
14108   # Note: m4 eats our [], so we need to use [ and ] instead.
14109   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14110   if test "x$has_forbidden_chars" != x; then
14111     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14112     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14113     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14114     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14115       # Going to short mode and back again did indeed matter. Since short mode is
14116       # case insensitive, let's make it lowercase to improve readability.
14117       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14118       # Now convert it back to Unix-stile (cygpath)
14119       input_path=`$CYGPATH -u "$shortmode_path"`
14120       new_path="$input_path"
14121     fi
14122   fi
14123 
14124   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14125   if test "x$test_cygdrive_prefix" = x; then
14126     # As a simple fix, exclude /usr/bin since it's not a real path.
14127     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14128       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14129       # a path prefixed by /cygdrive for fixpath to work.
14130       new_path="$CYGWIN_ROOT_PATH$input_path"
14131     fi
14132   fi
14133 
14134 
14135   if test "x$path" != "x$new_path"; then
14136     BOOT_JDK="$new_path"
14137     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14138 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14139   fi
14140 
14141   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14142 
14143   path="$BOOT_JDK"
14144   has_colon=`$ECHO $path | $GREP ^.:`
14145   new_path="$path"
14146   if test "x$has_colon" = x; then
14147     # Not in mixed or Windows style, start by that.
14148     new_path=`cmd //c echo $path`
14149   fi
14150 
14151 
14152   input_path="$new_path"
14153   # Check if we need to convert this using DOS-style short mode. If the path
14154   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14155   # take no chances and rewrite it.
14156   # Note: m4 eats our [], so we need to use [ and ] instead.
14157   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14158   if test "x$has_forbidden_chars" != x; then
14159     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14160     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14161   fi
14162 
14163 
14164   windows_path="$new_path"
14165   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14166     unix_path=`$CYGPATH -u "$windows_path"`
14167     new_path="$unix_path"
14168   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14169     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14170     new_path="$unix_path"
14171   fi
14172 
14173   if test "x$path" != "x$new_path"; then
14174     BOOT_JDK="$new_path"
14175     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14176 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14177   fi
14178 
14179   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14180   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14181 
14182   else
14183     # We're on a posix platform. Hooray! :)
14184     path="$BOOT_JDK"
14185     has_space=`$ECHO "$path" | $GREP " "`
14186     if test "x$has_space" != x; then
14187       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14188 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14189       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14190     fi
14191 
14192     # Use eval to expand a potential ~
14193     eval path="$path"
14194     if test ! -f "$path" && test ! -d "$path"; then
14195       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14196     fi
14197 
14198     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14199   fi
14200 
14201               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14202 $as_echo_n "checking for Boot JDK... " >&6; }
14203               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14204 $as_echo "$BOOT_JDK" >&6; }
14205               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14206 $as_echo_n "checking Boot JDK version... " >&6; }
14207               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14208               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14209 $as_echo "$BOOT_JDK_VERSION" >&6; }
14210             fi # end check jdk version
14211           fi # end check rt.jar
14212         fi # end check javac
14213       fi # end check java
14214     fi # end check boot jdk found
14215   fi
14216 
14217 
14218   if test "x$BOOT_JDK_FOUND" = xno; then
14219     # Now execute the test
14220 
14221   BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
14222   BOOT_JDK_SUFFIX=""
14223   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14224   if test "x$ALL_JDKS_FOUND" != x; then
14225     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14226 
14227   if test "x$BOOT_JDK_FOUND" = xno; then
14228     # Now execute the test
14229 
14230         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14231         if test -d "$BOOT_JDK"; then
14232           BOOT_JDK_FOUND=maybe
14233           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14234 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14235         fi
14236 
14237 
14238     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14239     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14240       # Do we have a bin/java?
14241       if test ! -x "$BOOT_JDK/bin/java"; then
14242         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14243 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14244         BOOT_JDK_FOUND=no
14245       else
14246         # Do we have a bin/javac?
14247         if test ! -x "$BOOT_JDK/bin/javac"; then
14248           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14249 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14250           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14251 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14252           BOOT_JDK_FOUND=no
14253         else
14254           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14255           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14256             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14257 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14258             BOOT_JDK_FOUND=no
14259           else
14260             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14261             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14262 
14263             # Extra M4 quote needed to protect [] in grep expression.
14264             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14265             if test "x$FOUND_VERSION_78" = x; then
14266               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14267 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14268               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14269 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14270               BOOT_JDK_FOUND=no
14271             else
14272               # We're done! :-)
14273               BOOT_JDK_FOUND=yes
14274 
14275   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14276 
14277   # Input might be given as Windows format, start by converting to
14278   # unix format.
14279   path="$BOOT_JDK"
14280   new_path=`$CYGPATH -u "$path"`
14281 
14282   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14283   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14284   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14285   # "foo.exe" is OK but "foo" is an error.
14286   #
14287   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14288   # It is also a way to make sure we got the proper file name for the real test later on.
14289   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14290   if test "x$test_shortpath" = x; then
14291     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14292 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14293     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14294   fi
14295 
14296   # Call helper function which possibly converts this using DOS-style short mode.
14297   # If so, the updated path is stored in $new_path.
14298 
14299   input_path="$new_path"
14300   # Check if we need to convert this using DOS-style short mode. If the path
14301   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14302   # take no chances and rewrite it.
14303   # Note: m4 eats our [], so we need to use [ and ] instead.
14304   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14305   if test "x$has_forbidden_chars" != x; then
14306     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14307     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14308     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14309     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14310       # Going to short mode and back again did indeed matter. Since short mode is
14311       # case insensitive, let's make it lowercase to improve readability.
14312       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14313       # Now convert it back to Unix-stile (cygpath)
14314       input_path=`$CYGPATH -u "$shortmode_path"`
14315       new_path="$input_path"
14316     fi
14317   fi
14318 
14319   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14320   if test "x$test_cygdrive_prefix" = x; then
14321     # As a simple fix, exclude /usr/bin since it's not a real path.
14322     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14323       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14324       # a path prefixed by /cygdrive for fixpath to work.
14325       new_path="$CYGWIN_ROOT_PATH$input_path"
14326     fi
14327   fi
14328 
14329 
14330   if test "x$path" != "x$new_path"; then
14331     BOOT_JDK="$new_path"
14332     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14333 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14334   fi
14335 
14336   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14337 
14338   path="$BOOT_JDK"
14339   has_colon=`$ECHO $path | $GREP ^.:`
14340   new_path="$path"
14341   if test "x$has_colon" = x; then
14342     # Not in mixed or Windows style, start by that.
14343     new_path=`cmd //c echo $path`
14344   fi
14345 
14346 
14347   input_path="$new_path"
14348   # Check if we need to convert this using DOS-style short mode. If the path
14349   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14350   # take no chances and rewrite it.
14351   # Note: m4 eats our [], so we need to use [ and ] instead.
14352   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14353   if test "x$has_forbidden_chars" != x; then
14354     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14355     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14356   fi
14357 
14358 
14359   windows_path="$new_path"
14360   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14361     unix_path=`$CYGPATH -u "$windows_path"`
14362     new_path="$unix_path"
14363   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14364     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14365     new_path="$unix_path"
14366   fi
14367 
14368   if test "x$path" != "x$new_path"; then
14369     BOOT_JDK="$new_path"
14370     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14371 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14372   fi
14373 
14374   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14375   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14376 
14377   else
14378     # We're on a posix platform. Hooray! :)
14379     path="$BOOT_JDK"
14380     has_space=`$ECHO "$path" | $GREP " "`
14381     if test "x$has_space" != x; then
14382       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14383 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14384       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14385     fi
14386 
14387     # Use eval to expand a potential ~
14388     eval path="$path"
14389     if test ! -f "$path" && test ! -d "$path"; then
14390       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14391     fi
14392 
14393     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14394   fi
14395 
14396               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14397 $as_echo_n "checking for Boot JDK... " >&6; }
14398               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14399 $as_echo "$BOOT_JDK" >&6; }
14400               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14401 $as_echo_n "checking Boot JDK version... " >&6; }
14402               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14403               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14404 $as_echo "$BOOT_JDK_VERSION" >&6; }
14405             fi # end check jdk version
14406           fi # end check rt.jar
14407         fi # end check javac
14408       fi # end check java
14409     fi # end check boot jdk found
14410   fi
14411 
14412     done
14413   fi
14414 
14415 
14416     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14417     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14418       # Do we have a bin/java?
14419       if test ! -x "$BOOT_JDK/bin/java"; then
14420         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14421 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14422         BOOT_JDK_FOUND=no
14423       else
14424         # Do we have a bin/javac?
14425         if test ! -x "$BOOT_JDK/bin/javac"; then
14426           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14427 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14428           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14429 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14430           BOOT_JDK_FOUND=no
14431         else
14432           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14433           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14434             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14435 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14436             BOOT_JDK_FOUND=no
14437           else
14438             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14439             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14440 
14441             # Extra M4 quote needed to protect [] in grep expression.
14442             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14443             if test "x$FOUND_VERSION_78" = x; then
14444               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14445 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14446               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14447 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14448               BOOT_JDK_FOUND=no
14449             else
14450               # We're done! :-)
14451               BOOT_JDK_FOUND=yes
14452 
14453   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14454 
14455   # Input might be given as Windows format, start by converting to
14456   # unix format.
14457   path="$BOOT_JDK"
14458   new_path=`$CYGPATH -u "$path"`
14459 
14460   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14461   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14462   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14463   # "foo.exe" is OK but "foo" is an error.
14464   #
14465   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14466   # It is also a way to make sure we got the proper file name for the real test later on.
14467   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14468   if test "x$test_shortpath" = x; then
14469     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14470 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14471     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14472   fi
14473 
14474   # Call helper function which possibly converts this using DOS-style short mode.
14475   # If so, the updated path is stored in $new_path.
14476 
14477   input_path="$new_path"
14478   # Check if we need to convert this using DOS-style short mode. If the path
14479   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14480   # take no chances and rewrite it.
14481   # Note: m4 eats our [], so we need to use [ and ] instead.
14482   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14483   if test "x$has_forbidden_chars" != x; then
14484     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14485     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14486     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14487     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14488       # Going to short mode and back again did indeed matter. Since short mode is
14489       # case insensitive, let's make it lowercase to improve readability.
14490       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14491       # Now convert it back to Unix-stile (cygpath)
14492       input_path=`$CYGPATH -u "$shortmode_path"`
14493       new_path="$input_path"
14494     fi
14495   fi
14496 
14497   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14498   if test "x$test_cygdrive_prefix" = x; then
14499     # As a simple fix, exclude /usr/bin since it's not a real path.
14500     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14501       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14502       # a path prefixed by /cygdrive for fixpath to work.
14503       new_path="$CYGWIN_ROOT_PATH$input_path"
14504     fi
14505   fi
14506 
14507 
14508   if test "x$path" != "x$new_path"; then
14509     BOOT_JDK="$new_path"
14510     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14511 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14512   fi
14513 
14514   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14515 
14516   path="$BOOT_JDK"
14517   has_colon=`$ECHO $path | $GREP ^.:`
14518   new_path="$path"
14519   if test "x$has_colon" = x; then
14520     # Not in mixed or Windows style, start by that.
14521     new_path=`cmd //c echo $path`
14522   fi
14523 
14524 
14525   input_path="$new_path"
14526   # Check if we need to convert this using DOS-style short mode. If the path
14527   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14528   # take no chances and rewrite it.
14529   # Note: m4 eats our [], so we need to use [ and ] instead.
14530   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14531   if test "x$has_forbidden_chars" != x; then
14532     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14533     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14534   fi
14535 
14536 
14537   windows_path="$new_path"
14538   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14539     unix_path=`$CYGPATH -u "$windows_path"`
14540     new_path="$unix_path"
14541   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14542     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14543     new_path="$unix_path"
14544   fi
14545 
14546   if test "x$path" != "x$new_path"; then
14547     BOOT_JDK="$new_path"
14548     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14549 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14550   fi
14551 
14552   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14553   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14554 
14555   else
14556     # We're on a posix platform. Hooray! :)
14557     path="$BOOT_JDK"
14558     has_space=`$ECHO "$path" | $GREP " "`
14559     if test "x$has_space" != x; then
14560       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14561 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14562       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14563     fi
14564 
14565     # Use eval to expand a potential ~
14566     eval path="$path"
14567     if test ! -f "$path" && test ! -d "$path"; then
14568       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14569     fi
14570 
14571     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14572   fi
14573 
14574               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14575 $as_echo_n "checking for Boot JDK... " >&6; }
14576               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14577 $as_echo "$BOOT_JDK" >&6; }
14578               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14579 $as_echo_n "checking Boot JDK version... " >&6; }
14580               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14581               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14582 $as_echo "$BOOT_JDK_VERSION" >&6; }
14583             fi # end check jdk version
14584           fi # end check rt.jar
14585         fi # end check javac
14586       fi # end check java
14587     fi # end check boot jdk found
14588   fi
14589 
14590   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14591 
14592   if test "x$BOOT_JDK_FOUND" = xno; then
14593     # Now execute the test
14594 
14595   BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14596   BOOT_JDK_SUFFIX="/Contents/Home"
14597   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14598   if test "x$ALL_JDKS_FOUND" != x; then
14599     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14600 
14601   if test "x$BOOT_JDK_FOUND" = xno; then
14602     # Now execute the test
14603 
14604         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14605         if test -d "$BOOT_JDK"; then
14606           BOOT_JDK_FOUND=maybe
14607           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14608 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14609         fi
14610 
14611 
14612     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14613     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14614       # Do we have a bin/java?
14615       if test ! -x "$BOOT_JDK/bin/java"; then
14616         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14617 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14618         BOOT_JDK_FOUND=no
14619       else
14620         # Do we have a bin/javac?
14621         if test ! -x "$BOOT_JDK/bin/javac"; then
14622           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14623 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14624           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14625 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14626           BOOT_JDK_FOUND=no
14627         else
14628           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14629           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14630             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14631 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14632             BOOT_JDK_FOUND=no
14633           else
14634             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14635             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14636 
14637             # Extra M4 quote needed to protect [] in grep expression.
14638             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14639             if test "x$FOUND_VERSION_78" = x; then
14640               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14641 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14642               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14643 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14644               BOOT_JDK_FOUND=no
14645             else
14646               # We're done! :-)
14647               BOOT_JDK_FOUND=yes
14648 
14649   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14650 
14651   # Input might be given as Windows format, start by converting to
14652   # unix format.
14653   path="$BOOT_JDK"
14654   new_path=`$CYGPATH -u "$path"`
14655 
14656   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14657   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14658   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14659   # "foo.exe" is OK but "foo" is an error.
14660   #
14661   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14662   # It is also a way to make sure we got the proper file name for the real test later on.
14663   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14664   if test "x$test_shortpath" = x; then
14665     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14666 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14667     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14668   fi
14669 
14670   # Call helper function which possibly converts this using DOS-style short mode.
14671   # If so, the updated path is stored in $new_path.
14672 
14673   input_path="$new_path"
14674   # Check if we need to convert this using DOS-style short mode. If the path
14675   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14676   # take no chances and rewrite it.
14677   # Note: m4 eats our [], so we need to use [ and ] instead.
14678   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14679   if test "x$has_forbidden_chars" != x; then
14680     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14681     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14682     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14683     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14684       # Going to short mode and back again did indeed matter. Since short mode is
14685       # case insensitive, let's make it lowercase to improve readability.
14686       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14687       # Now convert it back to Unix-stile (cygpath)
14688       input_path=`$CYGPATH -u "$shortmode_path"`
14689       new_path="$input_path"
14690     fi
14691   fi
14692 
14693   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14694   if test "x$test_cygdrive_prefix" = x; then
14695     # As a simple fix, exclude /usr/bin since it's not a real path.
14696     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14697       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14698       # a path prefixed by /cygdrive for fixpath to work.
14699       new_path="$CYGWIN_ROOT_PATH$input_path"
14700     fi
14701   fi
14702 
14703 
14704   if test "x$path" != "x$new_path"; then
14705     BOOT_JDK="$new_path"
14706     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14707 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14708   fi
14709 
14710   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14711 
14712   path="$BOOT_JDK"
14713   has_colon=`$ECHO $path | $GREP ^.:`
14714   new_path="$path"
14715   if test "x$has_colon" = x; then
14716     # Not in mixed or Windows style, start by that.
14717     new_path=`cmd //c echo $path`
14718   fi
14719 
14720 
14721   input_path="$new_path"
14722   # Check if we need to convert this using DOS-style short mode. If the path
14723   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14724   # take no chances and rewrite it.
14725   # Note: m4 eats our [], so we need to use [ and ] instead.
14726   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14727   if test "x$has_forbidden_chars" != x; then
14728     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14729     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14730   fi
14731 
14732 
14733   windows_path="$new_path"
14734   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14735     unix_path=`$CYGPATH -u "$windows_path"`
14736     new_path="$unix_path"
14737   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14738     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14739     new_path="$unix_path"
14740   fi
14741 
14742   if test "x$path" != "x$new_path"; then
14743     BOOT_JDK="$new_path"
14744     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14745 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14746   fi
14747 
14748   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14749   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14750 
14751   else
14752     # We're on a posix platform. Hooray! :)
14753     path="$BOOT_JDK"
14754     has_space=`$ECHO "$path" | $GREP " "`
14755     if test "x$has_space" != x; then
14756       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14757 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14758       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14759     fi
14760 
14761     # Use eval to expand a potential ~
14762     eval path="$path"
14763     if test ! -f "$path" && test ! -d "$path"; then
14764       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14765     fi
14766 
14767     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14768   fi
14769 
14770               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14771 $as_echo_n "checking for Boot JDK... " >&6; }
14772               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14773 $as_echo "$BOOT_JDK" >&6; }
14774               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14775 $as_echo_n "checking Boot JDK version... " >&6; }
14776               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14777               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14778 $as_echo "$BOOT_JDK_VERSION" >&6; }
14779             fi # end check jdk version
14780           fi # end check rt.jar
14781         fi # end check javac
14782       fi # end check java
14783     fi # end check boot jdk found
14784   fi
14785 
14786     done
14787   fi
14788 
14789 
14790     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14791     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14792       # Do we have a bin/java?
14793       if test ! -x "$BOOT_JDK/bin/java"; then
14794         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14795 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14796         BOOT_JDK_FOUND=no
14797       else
14798         # Do we have a bin/javac?
14799         if test ! -x "$BOOT_JDK/bin/javac"; then
14800           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14801 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14802           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14803 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14804           BOOT_JDK_FOUND=no
14805         else
14806           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14807           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14808             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14809 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14810             BOOT_JDK_FOUND=no
14811           else
14812             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14813             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14814 
14815             # Extra M4 quote needed to protect [] in grep expression.
14816             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14817             if test "x$FOUND_VERSION_78" = x; then
14818               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14819 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14820               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14821 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14822               BOOT_JDK_FOUND=no
14823             else
14824               # We're done! :-)
14825               BOOT_JDK_FOUND=yes
14826 
14827   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14828 
14829   # Input might be given as Windows format, start by converting to
14830   # unix format.
14831   path="$BOOT_JDK"
14832   new_path=`$CYGPATH -u "$path"`
14833 
14834   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14835   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14836   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14837   # "foo.exe" is OK but "foo" is an error.
14838   #
14839   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14840   # It is also a way to make sure we got the proper file name for the real test later on.
14841   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14842   if test "x$test_shortpath" = x; then
14843     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14844 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14845     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14846   fi
14847 
14848   # Call helper function which possibly converts this using DOS-style short mode.
14849   # If so, the updated path is stored in $new_path.
14850 
14851   input_path="$new_path"
14852   # Check if we need to convert this using DOS-style short mode. If the path
14853   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14854   # take no chances and rewrite it.
14855   # Note: m4 eats our [], so we need to use [ and ] instead.
14856   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14857   if test "x$has_forbidden_chars" != x; then
14858     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14859     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14860     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14861     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14862       # Going to short mode and back again did indeed matter. Since short mode is
14863       # case insensitive, let's make it lowercase to improve readability.
14864       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14865       # Now convert it back to Unix-stile (cygpath)
14866       input_path=`$CYGPATH -u "$shortmode_path"`
14867       new_path="$input_path"
14868     fi
14869   fi
14870 
14871   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14872   if test "x$test_cygdrive_prefix" = x; then
14873     # As a simple fix, exclude /usr/bin since it's not a real path.
14874     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14875       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14876       # a path prefixed by /cygdrive for fixpath to work.
14877       new_path="$CYGWIN_ROOT_PATH$input_path"
14878     fi
14879   fi
14880 
14881 
14882   if test "x$path" != "x$new_path"; then
14883     BOOT_JDK="$new_path"
14884     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14885 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14886   fi
14887 
14888   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14889 
14890   path="$BOOT_JDK"
14891   has_colon=`$ECHO $path | $GREP ^.:`
14892   new_path="$path"
14893   if test "x$has_colon" = x; then
14894     # Not in mixed or Windows style, start by that.
14895     new_path=`cmd //c echo $path`
14896   fi
14897 
14898 
14899   input_path="$new_path"
14900   # Check if we need to convert this using DOS-style short mode. If the path
14901   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14902   # take no chances and rewrite it.
14903   # Note: m4 eats our [], so we need to use [ and ] instead.
14904   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14905   if test "x$has_forbidden_chars" != x; then
14906     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14907     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14908   fi
14909 
14910 
14911   windows_path="$new_path"
14912   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14913     unix_path=`$CYGPATH -u "$windows_path"`
14914     new_path="$unix_path"
14915   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14916     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14917     new_path="$unix_path"
14918   fi
14919 
14920   if test "x$path" != "x$new_path"; then
14921     BOOT_JDK="$new_path"
14922     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14923 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14924   fi
14925 
14926   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14927   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14928 
14929   else
14930     # We're on a posix platform. Hooray! :)
14931     path="$BOOT_JDK"
14932     has_space=`$ECHO "$path" | $GREP " "`
14933     if test "x$has_space" != x; then
14934       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14935 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14936       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14937     fi
14938 
14939     # Use eval to expand a potential ~
14940     eval path="$path"
14941     if test ! -f "$path" && test ! -d "$path"; then
14942       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14943     fi
14944 
14945     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14946   fi
14947 
14948               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14949 $as_echo_n "checking for Boot JDK... " >&6; }
14950               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14951 $as_echo "$BOOT_JDK" >&6; }
14952               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14953 $as_echo_n "checking Boot JDK version... " >&6; }
14954               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14955               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14956 $as_echo "$BOOT_JDK_VERSION" >&6; }
14957             fi # end check jdk version
14958           fi # end check rt.jar
14959         fi # end check javac
14960       fi # end check java
14961     fi # end check boot jdk found
14962   fi
14963 
14964 
14965   if test "x$BOOT_JDK_FOUND" = xno; then
14966     # Now execute the test
14967 
14968   BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14969   BOOT_JDK_SUFFIX="/Contents/Home"
14970   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14971   if test "x$ALL_JDKS_FOUND" != x; then
14972     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14973 
14974   if test "x$BOOT_JDK_FOUND" = xno; then
14975     # Now execute the test
14976 
14977         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14978         if test -d "$BOOT_JDK"; then
14979           BOOT_JDK_FOUND=maybe
14980           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14981 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14982         fi
14983 
14984 
14985     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14986     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14987       # Do we have a bin/java?
14988       if test ! -x "$BOOT_JDK/bin/java"; then
14989         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14990 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14991         BOOT_JDK_FOUND=no
14992       else
14993         # Do we have a bin/javac?
14994         if test ! -x "$BOOT_JDK/bin/javac"; then
14995           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14996 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14997           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14998 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14999           BOOT_JDK_FOUND=no
15000         else
15001           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15002           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15003             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15004 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15005             BOOT_JDK_FOUND=no
15006           else
15007             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15008             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15009 
15010             # Extra M4 quote needed to protect [] in grep expression.
15011             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15012             if test "x$FOUND_VERSION_78" = x; then
15013               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15014 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15015               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15016 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15017               BOOT_JDK_FOUND=no
15018             else
15019               # We're done! :-)
15020               BOOT_JDK_FOUND=yes
15021 
15022   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15023 
15024   # Input might be given as Windows format, start by converting to
15025   # unix format.
15026   path="$BOOT_JDK"
15027   new_path=`$CYGPATH -u "$path"`
15028 
15029   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15030   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15031   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15032   # "foo.exe" is OK but "foo" is an error.
15033   #
15034   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15035   # It is also a way to make sure we got the proper file name for the real test later on.
15036   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15037   if test "x$test_shortpath" = x; then
15038     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15039 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15040     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15041   fi
15042 
15043   # Call helper function which possibly converts this using DOS-style short mode.
15044   # If so, the updated path is stored in $new_path.
15045 
15046   input_path="$new_path"
15047   # Check if we need to convert this using DOS-style short mode. If the path
15048   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15049   # take no chances and rewrite it.
15050   # Note: m4 eats our [], so we need to use [ and ] instead.
15051   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15052   if test "x$has_forbidden_chars" != x; then
15053     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15054     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15055     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15056     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15057       # Going to short mode and back again did indeed matter. Since short mode is
15058       # case insensitive, let's make it lowercase to improve readability.
15059       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15060       # Now convert it back to Unix-stile (cygpath)
15061       input_path=`$CYGPATH -u "$shortmode_path"`
15062       new_path="$input_path"
15063     fi
15064   fi
15065 
15066   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15067   if test "x$test_cygdrive_prefix" = x; then
15068     # As a simple fix, exclude /usr/bin since it's not a real path.
15069     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15070       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15071       # a path prefixed by /cygdrive for fixpath to work.
15072       new_path="$CYGWIN_ROOT_PATH$input_path"
15073     fi
15074   fi
15075 
15076 
15077   if test "x$path" != "x$new_path"; then
15078     BOOT_JDK="$new_path"
15079     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15080 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15081   fi
15082 
15083   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15084 
15085   path="$BOOT_JDK"
15086   has_colon=`$ECHO $path | $GREP ^.:`
15087   new_path="$path"
15088   if test "x$has_colon" = x; then
15089     # Not in mixed or Windows style, start by that.
15090     new_path=`cmd //c echo $path`
15091   fi
15092 
15093 
15094   input_path="$new_path"
15095   # Check if we need to convert this using DOS-style short mode. If the path
15096   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15097   # take no chances and rewrite it.
15098   # Note: m4 eats our [], so we need to use [ and ] instead.
15099   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15100   if test "x$has_forbidden_chars" != x; then
15101     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15102     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15103   fi
15104 
15105 
15106   windows_path="$new_path"
15107   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15108     unix_path=`$CYGPATH -u "$windows_path"`
15109     new_path="$unix_path"
15110   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15111     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15112     new_path="$unix_path"
15113   fi
15114 
15115   if test "x$path" != "x$new_path"; then
15116     BOOT_JDK="$new_path"
15117     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15118 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15119   fi
15120 
15121   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15122   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15123 
15124   else
15125     # We're on a posix platform. Hooray! :)
15126     path="$BOOT_JDK"
15127     has_space=`$ECHO "$path" | $GREP " "`
15128     if test "x$has_space" != x; then
15129       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15130 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15131       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15132     fi
15133 
15134     # Use eval to expand a potential ~
15135     eval path="$path"
15136     if test ! -f "$path" && test ! -d "$path"; then
15137       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15138     fi
15139 
15140     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15141   fi
15142 
15143               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15144 $as_echo_n "checking for Boot JDK... " >&6; }
15145               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15146 $as_echo "$BOOT_JDK" >&6; }
15147               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15148 $as_echo_n "checking Boot JDK version... " >&6; }
15149               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15150               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15151 $as_echo "$BOOT_JDK_VERSION" >&6; }
15152             fi # end check jdk version
15153           fi # end check rt.jar
15154         fi # end check javac
15155       fi # end check java
15156     fi # end check boot jdk found
15157   fi
15158 
15159     done
15160   fi
15161 
15162 
15163     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15164     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15165       # Do we have a bin/java?
15166       if test ! -x "$BOOT_JDK/bin/java"; then
15167         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15168 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15169         BOOT_JDK_FOUND=no
15170       else
15171         # Do we have a bin/javac?
15172         if test ! -x "$BOOT_JDK/bin/javac"; then
15173           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15174 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15175           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15176 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15177           BOOT_JDK_FOUND=no
15178         else
15179           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15180           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15181             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15182 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15183             BOOT_JDK_FOUND=no
15184           else
15185             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15186             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15187 
15188             # Extra M4 quote needed to protect [] in grep expression.
15189             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15190             if test "x$FOUND_VERSION_78" = x; then
15191               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15192 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15193               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15194 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15195               BOOT_JDK_FOUND=no
15196             else
15197               # We're done! :-)
15198               BOOT_JDK_FOUND=yes
15199 
15200   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15201 
15202   # Input might be given as Windows format, start by converting to
15203   # unix format.
15204   path="$BOOT_JDK"
15205   new_path=`$CYGPATH -u "$path"`
15206 
15207   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15208   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15209   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15210   # "foo.exe" is OK but "foo" is an error.
15211   #
15212   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15213   # It is also a way to make sure we got the proper file name for the real test later on.
15214   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15215   if test "x$test_shortpath" = x; then
15216     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15217 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15218     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15219   fi
15220 
15221   # Call helper function which possibly converts this using DOS-style short mode.
15222   # If so, the updated path is stored in $new_path.
15223 
15224   input_path="$new_path"
15225   # Check if we need to convert this using DOS-style short mode. If the path
15226   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15227   # take no chances and rewrite it.
15228   # Note: m4 eats our [], so we need to use [ and ] instead.
15229   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15230   if test "x$has_forbidden_chars" != x; then
15231     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15232     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15233     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15234     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15235       # Going to short mode and back again did indeed matter. Since short mode is
15236       # case insensitive, let's make it lowercase to improve readability.
15237       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15238       # Now convert it back to Unix-stile (cygpath)
15239       input_path=`$CYGPATH -u "$shortmode_path"`
15240       new_path="$input_path"
15241     fi
15242   fi
15243 
15244   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15245   if test "x$test_cygdrive_prefix" = x; then
15246     # As a simple fix, exclude /usr/bin since it's not a real path.
15247     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15248       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15249       # a path prefixed by /cygdrive for fixpath to work.
15250       new_path="$CYGWIN_ROOT_PATH$input_path"
15251     fi
15252   fi
15253 
15254 
15255   if test "x$path" != "x$new_path"; then
15256     BOOT_JDK="$new_path"
15257     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15258 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15259   fi
15260 
15261   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15262 
15263   path="$BOOT_JDK"
15264   has_colon=`$ECHO $path | $GREP ^.:`
15265   new_path="$path"
15266   if test "x$has_colon" = x; then
15267     # Not in mixed or Windows style, start by that.
15268     new_path=`cmd //c echo $path`
15269   fi
15270 
15271 
15272   input_path="$new_path"
15273   # Check if we need to convert this using DOS-style short mode. If the path
15274   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15275   # take no chances and rewrite it.
15276   # Note: m4 eats our [], so we need to use [ and ] instead.
15277   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15278   if test "x$has_forbidden_chars" != x; then
15279     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15280     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15281   fi
15282 
15283 
15284   windows_path="$new_path"
15285   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15286     unix_path=`$CYGPATH -u "$windows_path"`
15287     new_path="$unix_path"
15288   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15289     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15290     new_path="$unix_path"
15291   fi
15292 
15293   if test "x$path" != "x$new_path"; then
15294     BOOT_JDK="$new_path"
15295     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15296 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15297   fi
15298 
15299   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15300   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15301 
15302   else
15303     # We're on a posix platform. Hooray! :)
15304     path="$BOOT_JDK"
15305     has_space=`$ECHO "$path" | $GREP " "`
15306     if test "x$has_space" != x; then
15307       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15308 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15309       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15310     fi
15311 
15312     # Use eval to expand a potential ~
15313     eval path="$path"
15314     if test ! -f "$path" && test ! -d "$path"; then
15315       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15316     fi
15317 
15318     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15319   fi
15320 
15321               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15322 $as_echo_n "checking for Boot JDK... " >&6; }
15323               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15324 $as_echo "$BOOT_JDK" >&6; }
15325               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15326 $as_echo_n "checking Boot JDK version... " >&6; }
15327               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15328               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15329 $as_echo "$BOOT_JDK_VERSION" >&6; }
15330             fi # end check jdk version
15331           fi # end check rt.jar
15332         fi # end check javac
15333       fi # end check java
15334     fi # end check boot jdk found
15335   fi
15336 
15337   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
15338 
15339   if test "x$BOOT_JDK_FOUND" = xno; then
15340     # Now execute the test
15341 
15342   BOOT_JDK_PREFIX="/usr/lib/jvm"
15343   BOOT_JDK_SUFFIX=""
15344   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
15345   if test "x$ALL_JDKS_FOUND" != x; then
15346     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
15347 
15348   if test "x$BOOT_JDK_FOUND" = xno; then
15349     # Now execute the test
15350 
15351         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
15352         if test -d "$BOOT_JDK"; then
15353           BOOT_JDK_FOUND=maybe
15354           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
15355 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
15356         fi
15357 
15358 
15359     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15360     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15361       # Do we have a bin/java?
15362       if test ! -x "$BOOT_JDK/bin/java"; then
15363         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15364 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15365         BOOT_JDK_FOUND=no
15366       else
15367         # Do we have a bin/javac?
15368         if test ! -x "$BOOT_JDK/bin/javac"; then
15369           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15370 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15371           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15372 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15373           BOOT_JDK_FOUND=no
15374         else
15375           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15376           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15377             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15378 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15379             BOOT_JDK_FOUND=no
15380           else
15381             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15382             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15383 
15384             # Extra M4 quote needed to protect [] in grep expression.
15385             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15386             if test "x$FOUND_VERSION_78" = x; then
15387               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15388 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15389               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15390 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15391               BOOT_JDK_FOUND=no
15392             else
15393               # We're done! :-)
15394               BOOT_JDK_FOUND=yes
15395 
15396   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15397 
15398   # Input might be given as Windows format, start by converting to
15399   # unix format.
15400   path="$BOOT_JDK"
15401   new_path=`$CYGPATH -u "$path"`
15402 
15403   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15404   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15405   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15406   # "foo.exe" is OK but "foo" is an error.
15407   #
15408   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15409   # It is also a way to make sure we got the proper file name for the real test later on.
15410   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15411   if test "x$test_shortpath" = x; then
15412     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15413 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15414     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15415   fi
15416 
15417   # Call helper function which possibly converts this using DOS-style short mode.
15418   # If so, the updated path is stored in $new_path.
15419 
15420   input_path="$new_path"
15421   # Check if we need to convert this using DOS-style short mode. If the path
15422   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15423   # take no chances and rewrite it.
15424   # Note: m4 eats our [], so we need to use [ and ] instead.
15425   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15426   if test "x$has_forbidden_chars" != x; then
15427     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15428     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15429     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15430     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15431       # Going to short mode and back again did indeed matter. Since short mode is
15432       # case insensitive, let's make it lowercase to improve readability.
15433       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15434       # Now convert it back to Unix-stile (cygpath)
15435       input_path=`$CYGPATH -u "$shortmode_path"`
15436       new_path="$input_path"
15437     fi
15438   fi
15439 
15440   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15441   if test "x$test_cygdrive_prefix" = x; then
15442     # As a simple fix, exclude /usr/bin since it's not a real path.
15443     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15444       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15445       # a path prefixed by /cygdrive for fixpath to work.
15446       new_path="$CYGWIN_ROOT_PATH$input_path"
15447     fi
15448   fi
15449 
15450 
15451   if test "x$path" != "x$new_path"; then
15452     BOOT_JDK="$new_path"
15453     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15454 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15455   fi
15456 
15457   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15458 
15459   path="$BOOT_JDK"
15460   has_colon=`$ECHO $path | $GREP ^.:`
15461   new_path="$path"
15462   if test "x$has_colon" = x; then
15463     # Not in mixed or Windows style, start by that.
15464     new_path=`cmd //c echo $path`
15465   fi
15466 
15467 
15468   input_path="$new_path"
15469   # Check if we need to convert this using DOS-style short mode. If the path
15470   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15471   # take no chances and rewrite it.
15472   # Note: m4 eats our [], so we need to use [ and ] instead.
15473   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15474   if test "x$has_forbidden_chars" != x; then
15475     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15476     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15477   fi
15478 
15479 
15480   windows_path="$new_path"
15481   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15482     unix_path=`$CYGPATH -u "$windows_path"`
15483     new_path="$unix_path"
15484   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15485     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15486     new_path="$unix_path"
15487   fi
15488 
15489   if test "x$path" != "x$new_path"; then
15490     BOOT_JDK="$new_path"
15491     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15492 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15493   fi
15494 
15495   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15496   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15497 
15498   else
15499     # We're on a posix platform. Hooray! :)
15500     path="$BOOT_JDK"
15501     has_space=`$ECHO "$path" | $GREP " "`
15502     if test "x$has_space" != x; then
15503       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15504 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15505       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15506     fi
15507 
15508     # Use eval to expand a potential ~
15509     eval path="$path"
15510     if test ! -f "$path" && test ! -d "$path"; then
15511       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15512     fi
15513 
15514     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15515   fi
15516 
15517               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15518 $as_echo_n "checking for Boot JDK... " >&6; }
15519               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15520 $as_echo "$BOOT_JDK" >&6; }
15521               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15522 $as_echo_n "checking Boot JDK version... " >&6; }
15523               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15524               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15525 $as_echo "$BOOT_JDK_VERSION" >&6; }
15526             fi # end check jdk version
15527           fi # end check rt.jar
15528         fi # end check javac
15529       fi # end check java
15530     fi # end check boot jdk found
15531   fi
15532 
15533     done
15534   fi
15535 
15536 
15537     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15538     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15539       # Do we have a bin/java?
15540       if test ! -x "$BOOT_JDK/bin/java"; then
15541         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15542 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15543         BOOT_JDK_FOUND=no
15544       else
15545         # Do we have a bin/javac?
15546         if test ! -x "$BOOT_JDK/bin/javac"; then
15547           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15548 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15549           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15550 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15551           BOOT_JDK_FOUND=no
15552         else
15553           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15554           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15555             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15556 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15557             BOOT_JDK_FOUND=no
15558           else
15559             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15560             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15561 
15562             # Extra M4 quote needed to protect [] in grep expression.
15563             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15564             if test "x$FOUND_VERSION_78" = x; then
15565               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15566 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15567               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15568 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15569               BOOT_JDK_FOUND=no
15570             else
15571               # We're done! :-)
15572               BOOT_JDK_FOUND=yes
15573 
15574   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15575 
15576   # Input might be given as Windows format, start by converting to
15577   # unix format.
15578   path="$BOOT_JDK"
15579   new_path=`$CYGPATH -u "$path"`
15580 
15581   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15582   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15583   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15584   # "foo.exe" is OK but "foo" is an error.
15585   #
15586   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15587   # It is also a way to make sure we got the proper file name for the real test later on.
15588   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15589   if test "x$test_shortpath" = x; then
15590     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15591 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15592     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15593   fi
15594 
15595   # Call helper function which possibly converts this using DOS-style short mode.
15596   # If so, the updated path is stored in $new_path.
15597 
15598   input_path="$new_path"
15599   # Check if we need to convert this using DOS-style short mode. If the path
15600   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15601   # take no chances and rewrite it.
15602   # Note: m4 eats our [], so we need to use [ and ] instead.
15603   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15604   if test "x$has_forbidden_chars" != x; then
15605     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15606     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15607     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15608     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15609       # Going to short mode and back again did indeed matter. Since short mode is
15610       # case insensitive, let's make it lowercase to improve readability.
15611       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15612       # Now convert it back to Unix-stile (cygpath)
15613       input_path=`$CYGPATH -u "$shortmode_path"`
15614       new_path="$input_path"
15615     fi
15616   fi
15617 
15618   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15619   if test "x$test_cygdrive_prefix" = x; then
15620     # As a simple fix, exclude /usr/bin since it's not a real path.
15621     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15622       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15623       # a path prefixed by /cygdrive for fixpath to work.
15624       new_path="$CYGWIN_ROOT_PATH$input_path"
15625     fi
15626   fi
15627 
15628 
15629   if test "x$path" != "x$new_path"; then
15630     BOOT_JDK="$new_path"
15631     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15632 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15633   fi
15634 
15635   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15636 
15637   path="$BOOT_JDK"
15638   has_colon=`$ECHO $path | $GREP ^.:`
15639   new_path="$path"
15640   if test "x$has_colon" = x; then
15641     # Not in mixed or Windows style, start by that.
15642     new_path=`cmd //c echo $path`
15643   fi
15644 
15645 
15646   input_path="$new_path"
15647   # Check if we need to convert this using DOS-style short mode. If the path
15648   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15649   # take no chances and rewrite it.
15650   # Note: m4 eats our [], so we need to use [ and ] instead.
15651   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15652   if test "x$has_forbidden_chars" != x; then
15653     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15654     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15655   fi
15656 
15657 
15658   windows_path="$new_path"
15659   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15660     unix_path=`$CYGPATH -u "$windows_path"`
15661     new_path="$unix_path"
15662   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15663     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15664     new_path="$unix_path"
15665   fi
15666 
15667   if test "x$path" != "x$new_path"; then
15668     BOOT_JDK="$new_path"
15669     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15670 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15671   fi
15672 
15673   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15674   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15675 
15676   else
15677     # We're on a posix platform. Hooray! :)
15678     path="$BOOT_JDK"
15679     has_space=`$ECHO "$path" | $GREP " "`
15680     if test "x$has_space" != x; then
15681       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15682 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15683       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15684     fi
15685 
15686     # Use eval to expand a potential ~
15687     eval path="$path"
15688     if test ! -f "$path" && test ! -d "$path"; then
15689       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15690     fi
15691 
15692     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15693   fi
15694 
15695               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15696 $as_echo_n "checking for Boot JDK... " >&6; }
15697               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15698 $as_echo "$BOOT_JDK" >&6; }
15699               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15700 $as_echo_n "checking Boot JDK version... " >&6; }
15701               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15702               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15703 $as_echo "$BOOT_JDK_VERSION" >&6; }
15704             fi # end check jdk version
15705           fi # end check rt.jar
15706         fi # end check javac
15707       fi # end check java
15708     fi # end check boot jdk found
15709   fi
15710 
15711   fi
15712 
15713 
15714     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15715     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15716       # Do we have a bin/java?
15717       if test ! -x "$BOOT_JDK/bin/java"; then
15718         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15719 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15720         BOOT_JDK_FOUND=no
15721       else
15722         # Do we have a bin/javac?
15723         if test ! -x "$BOOT_JDK/bin/javac"; then
15724           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15725 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15726           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15727 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15728           BOOT_JDK_FOUND=no
15729         else
15730           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15731           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15732             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15733 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15734             BOOT_JDK_FOUND=no
15735           else
15736             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15737             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15738 
15739             # Extra M4 quote needed to protect [] in grep expression.
15740             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15741             if test "x$FOUND_VERSION_78" = x; then
15742               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15743 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15744               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15745 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15746               BOOT_JDK_FOUND=no
15747             else
15748               # We're done! :-)
15749               BOOT_JDK_FOUND=yes
15750 
15751   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15752 
15753   # Input might be given as Windows format, start by converting to
15754   # unix format.
15755   path="$BOOT_JDK"
15756   new_path=`$CYGPATH -u "$path"`
15757 
15758   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15759   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15760   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15761   # "foo.exe" is OK but "foo" is an error.
15762   #
15763   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15764   # It is also a way to make sure we got the proper file name for the real test later on.
15765   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15766   if test "x$test_shortpath" = x; then
15767     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15768 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15769     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15770   fi
15771 
15772   # Call helper function which possibly converts this using DOS-style short mode.
15773   # If so, the updated path is stored in $new_path.
15774 
15775   input_path="$new_path"
15776   # Check if we need to convert this using DOS-style short mode. If the path
15777   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15778   # take no chances and rewrite it.
15779   # Note: m4 eats our [], so we need to use [ and ] instead.
15780   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15781   if test "x$has_forbidden_chars" != x; then
15782     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15783     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15784     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15785     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15786       # Going to short mode and back again did indeed matter. Since short mode is
15787       # case insensitive, let's make it lowercase to improve readability.
15788       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15789       # Now convert it back to Unix-stile (cygpath)
15790       input_path=`$CYGPATH -u "$shortmode_path"`
15791       new_path="$input_path"
15792     fi
15793   fi
15794 
15795   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15796   if test "x$test_cygdrive_prefix" = x; then
15797     # As a simple fix, exclude /usr/bin since it's not a real path.
15798     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15799       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15800       # a path prefixed by /cygdrive for fixpath to work.
15801       new_path="$CYGWIN_ROOT_PATH$input_path"
15802     fi
15803   fi
15804 
15805 
15806   if test "x$path" != "x$new_path"; then
15807     BOOT_JDK="$new_path"
15808     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15809 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15810   fi
15811 
15812   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15813 
15814   path="$BOOT_JDK"
15815   has_colon=`$ECHO $path | $GREP ^.:`
15816   new_path="$path"
15817   if test "x$has_colon" = x; then
15818     # Not in mixed or Windows style, start by that.
15819     new_path=`cmd //c echo $path`
15820   fi
15821 
15822 
15823   input_path="$new_path"
15824   # Check if we need to convert this using DOS-style short mode. If the path
15825   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15826   # take no chances and rewrite it.
15827   # Note: m4 eats our [], so we need to use [ and ] instead.
15828   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15829   if test "x$has_forbidden_chars" != x; then
15830     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15831     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15832   fi
15833 
15834 
15835   windows_path="$new_path"
15836   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15837     unix_path=`$CYGPATH -u "$windows_path"`
15838     new_path="$unix_path"
15839   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15840     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15841     new_path="$unix_path"
15842   fi
15843 
15844   if test "x$path" != "x$new_path"; then
15845     BOOT_JDK="$new_path"
15846     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15847 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15848   fi
15849 
15850   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15851   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15852 
15853   else
15854     # We're on a posix platform. Hooray! :)
15855     path="$BOOT_JDK"
15856     has_space=`$ECHO "$path" | $GREP " "`
15857     if test "x$has_space" != x; then
15858       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15859 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15860       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15861     fi
15862 
15863     # Use eval to expand a potential ~
15864     eval path="$path"
15865     if test ! -f "$path" && test ! -d "$path"; then
15866       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15867     fi
15868 
15869     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15870   fi
15871 
15872               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15873 $as_echo_n "checking for Boot JDK... " >&6; }
15874               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15875 $as_echo "$BOOT_JDK" >&6; }
15876               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15877 $as_echo_n "checking Boot JDK version... " >&6; }
15878               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15879               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15880 $as_echo "$BOOT_JDK_VERSION" >&6; }
15881             fi # end check jdk version
15882           fi # end check rt.jar
15883         fi # end check javac
15884       fi # end check java
15885     fi # end check boot jdk found
15886   fi
15887 
15888 
15889   # If we haven't found anything yet, we've truly lost. Give up.
15890   if test "x$BOOT_JDK_FOUND" = xno; then
15891 
15892   # Print a helpful message on how to acquire the necessary build dependency.
15893   # openjdk is the help tag: freetype, cups, pulse, alsa etc
15894   MISSING_DEPENDENCY=openjdk
15895 
15896   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15897     cygwin_help $MISSING_DEPENDENCY
15898   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15899     msys_help $MISSING_DEPENDENCY
15900   else
15901     PKGHANDLER_COMMAND=
15902 
15903     case $PKGHANDLER in
15904       apt-get)
15905         apt_help     $MISSING_DEPENDENCY ;;
15906       yum)
15907         yum_help     $MISSING_DEPENDENCY ;;
15908       port)
15909         port_help    $MISSING_DEPENDENCY ;;
15910       pkgutil)
15911         pkgutil_help $MISSING_DEPENDENCY ;;
15912       pkgadd)
15913         pkgadd_help  $MISSING_DEPENDENCY ;;
15914     esac
15915 
15916     if test "x$PKGHANDLER_COMMAND" != x; then
15917       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15918     fi
15919   fi
15920 
15921     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15922 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15923     { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15924 $as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15925     as_fn_error $? "Cannot continue" "$LINENO" 5
15926   fi
15927 
15928   # Setup proper paths for what we found
15929   BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15930   if test ! -f "$BOOT_RTJAR"; then
15931     # On MacOSX it is called classes.jar
15932     BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15933     if test -f "$BOOT_RTJAR"; then
15934       # Remove the ..
15935       BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15936     fi
15937   fi
15938   BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15939   BOOT_JDK="$BOOT_JDK"
15940 
15941 
15942 
15943 
15944   # Setup tools from the Boot JDK.
15945 
15946   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15947 $as_echo_n "checking for java in Boot JDK... " >&6; }
15948   JAVA=$BOOT_JDK/bin/java
15949   if test ! -x $JAVA; then
15950     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15951 $as_echo "not found" >&6; }
15952     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15953 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15954     as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15955   fi
15956   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15957 $as_echo "ok" >&6; }
15958 
15959 
15960   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15961 $as_echo_n "checking for javac in Boot JDK... " >&6; }
15962   JAVAC=$BOOT_JDK/bin/javac
15963   if test ! -x $JAVAC; then
15964     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15965 $as_echo "not found" >&6; }
15966     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15967 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15968     as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15969   fi
15970   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15971 $as_echo "ok" >&6; }
15972 
15973 
15974   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15975 $as_echo_n "checking for javah in Boot JDK... " >&6; }
15976   JAVAH=$BOOT_JDK/bin/javah
15977   if test ! -x $JAVAH; then
15978     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15979 $as_echo "not found" >&6; }
15980     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15981 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15982     as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15983   fi
15984   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15985 $as_echo "ok" >&6; }
15986 
15987 
15988   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15989 $as_echo_n "checking for javap in Boot JDK... " >&6; }
15990   JAVAP=$BOOT_JDK/bin/javap
15991   if test ! -x $JAVAP; then
15992     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15993 $as_echo "not found" >&6; }
15994     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15995 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15996     as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15997   fi
15998   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15999 $as_echo "ok" >&6; }
16000 
16001 
16002   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
16003 $as_echo_n "checking for jar in Boot JDK... " >&6; }
16004   JAR=$BOOT_JDK/bin/jar
16005   if test ! -x $JAR; then
16006     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16007 $as_echo "not found" >&6; }
16008     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
16009 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
16010     as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
16011   fi
16012   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16013 $as_echo "ok" >&6; }
16014 
16015 
16016   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
16017 $as_echo_n "checking for rmic in Boot JDK... " >&6; }
16018   RMIC=$BOOT_JDK/bin/rmic
16019   if test ! -x $RMIC; then
16020     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16021 $as_echo "not found" >&6; }
16022     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
16023 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
16024     as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
16025   fi
16026   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16027 $as_echo "ok" >&6; }
16028 
16029 
16030   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
16031 $as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
16032   NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
16033   if test ! -x $NATIVE2ASCII; then
16034     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16035 $as_echo "not found" >&6; }
16036     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
16037 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
16038     as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
16039   fi
16040   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16041 $as_echo "ok" >&6; }
16042 
16043 
16044   # Finally, set some other options...
16045 
16046   # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
16047   BOOT_JDK_SOURCETARGET="-source 7 -target 7"
16048 
16049 
16050 
16051 
16052   ##############################################################################
16053   #
16054   # Specify options for anything that is run with the Boot JDK.
16055   #
16056 
16057 # Check whether --with-boot-jdk-jvmargs was given.
16058 if test "${with_boot_jdk_jvmargs+set}" = set; then :
16059   withval=$with_boot_jdk_jvmargs;
16060 fi
16061 
16062 
16063   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
16064 $as_echo_n "checking flags for boot jdk java command ... " >&6; }
16065 
16066   # Disable special log output when a debug build is used as Boot JDK...
16067 
16068   $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
16069   $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
16070   OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
16071   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16072   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16073   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16074     boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
16075     JVM_ARG_OK=true
16076   else
16077     $ECHO "Arg failed:" >&5
16078     $ECHO "$OUTPUT" >&5
16079     JVM_ARG_OK=false
16080   fi
16081 
16082 
16083   # Apply user provided options.
16084 
16085   $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
16086   $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
16087   OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
16088   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16089   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16090   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16091     boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
16092     JVM_ARG_OK=true
16093   else
16094     $ECHO "Arg failed:" >&5
16095     $ECHO "$OUTPUT" >&5
16096     JVM_ARG_OK=false
16097   fi
16098 
16099 
16100   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
16101 $as_echo "$boot_jdk_jvmargs" >&6; }
16102 
16103   # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
16104   JAVA_FLAGS=$boot_jdk_jvmargs
16105 
16106 
16107 
16108   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
16109 $as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
16110 
16111   # Starting amount of heap memory.
16112 
16113   $ECHO "Check if jvm arg is ok: -Xms64M" >&5
16114   $ECHO "Command: $JAVA -Xms64M -version" >&5
16115   OUTPUT=`$JAVA -Xms64M -version 2>&1`
16116   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16117   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16118   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16119     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
16120     JVM_ARG_OK=true
16121   else
16122     $ECHO "Arg failed:" >&5
16123     $ECHO "$OUTPUT" >&5
16124     JVM_ARG_OK=false
16125   fi
16126 
16127 
16128   # Maximum amount of heap memory.
16129   # Maximum stack size.
16130   if test "x$BUILD_NUM_BITS" = x32; then
16131     JVM_MAX_HEAP=1100M
16132     STACK_SIZE=768
16133   else
16134     # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
16135     # pointers are used. Apparently, we need to increase the heap and stack
16136     # space for the jvm. More specifically, when running javac to build huge
16137     # jdk batch
16138     JVM_MAX_HEAP=1600M
16139     STACK_SIZE=1536
16140   fi
16141 
16142   $ECHO "Check if jvm arg is ok: -Xmx$JVM_MAX_HEAP" >&5
16143   $ECHO "Command: $JAVA -Xmx$JVM_MAX_HEAP -version" >&5
16144   OUTPUT=`$JAVA -Xmx$JVM_MAX_HEAP -version 2>&1`
16145   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16146   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16147   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16148     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx$JVM_MAX_HEAP"
16149     JVM_ARG_OK=true
16150   else
16151     $ECHO "Arg failed:" >&5
16152     $ECHO "$OUTPUT" >&5
16153     JVM_ARG_OK=false
16154   fi
16155 
16156 
16157   $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
16158   $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
16159   OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
16160   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16161   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16162   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16163     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
16164     JVM_ARG_OK=true
16165   else
16166     $ECHO "Arg failed:" >&5
16167     $ECHO "$OUTPUT" >&5
16168     JVM_ARG_OK=false
16169   fi
16170 
16171 
16172   $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5
16173   $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5
16174   OUTPUT=`$JAVA -XX:PermSize=32m -version 2>&1`
16175   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16176   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16177   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16178     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:PermSize=32m"
16179     JVM_ARG_OK=true
16180   else
16181     $ECHO "Arg failed:" >&5
16182     $ECHO "$OUTPUT" >&5
16183     JVM_ARG_OK=false
16184   fi
16185 
16186 
16187   $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5
16188   $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5
16189   OUTPUT=`$JAVA -XX:MaxPermSize=160m -version 2>&1`
16190   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16191   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16192   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16193     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:MaxPermSize=160m"
16194     JVM_ARG_OK=true
16195   else
16196     $ECHO "Arg failed:" >&5
16197     $ECHO "$OUTPUT" >&5
16198     JVM_ARG_OK=false
16199   fi
16200 
16201 
16202   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
16203 $as_echo "$boot_jdk_jvmargs_big" >&6; }
16204 
16205   JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
16206 
16207 
16208 
16209   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
16210 $as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
16211 
16212   # Use serial gc for small short lived tools if possible
16213 
16214   $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
16215   $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
16216   OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
16217   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16218   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16219   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16220     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
16221     JVM_ARG_OK=true
16222   else
16223     $ECHO "Arg failed:" >&5
16224     $ECHO "$OUTPUT" >&5
16225     JVM_ARG_OK=false
16226   fi
16227 
16228 
16229   $ECHO "Check if jvm arg is ok: -Xms32M" >&5
16230   $ECHO "Command: $JAVA -Xms32M -version" >&5
16231   OUTPUT=`$JAVA -Xms32M -version 2>&1`
16232   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16233   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16234   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16235     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
16236     JVM_ARG_OK=true
16237   else
16238     $ECHO "Arg failed:" >&5
16239     $ECHO "$OUTPUT" >&5
16240     JVM_ARG_OK=false
16241   fi
16242 
16243 
16244   $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
16245   $ECHO "Command: $JAVA -Xmx512M -version" >&5
16246   OUTPUT=`$JAVA -Xmx512M -version 2>&1`
16247   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16248   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16249   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16250     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
16251     JVM_ARG_OK=true
16252   else
16253     $ECHO "Arg failed:" >&5
16254     $ECHO "$OUTPUT" >&5
16255     JVM_ARG_OK=false
16256   fi
16257 
16258 
16259   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
16260 $as_echo "$boot_jdk_jvmargs_small" >&6; }
16261 
16262   JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
16263 
16264 
16265 
16266 ###############################################################################
16267 #
16268 # Configure the sources to use. We can add or override individual directories.
16269 #
16270 ###############################################################################
16271 
16272 
16273   # Where are the sources. Any of these can be overridden
16274   # using --with-override-corba and the likes.
16275   LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
16276   CORBA_TOPDIR="$SRC_ROOT/corba"
16277   JAXP_TOPDIR="$SRC_ROOT/jaxp"
16278   JAXWS_TOPDIR="$SRC_ROOT/jaxws"
16279   HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
16280   NASHORN_TOPDIR="$SRC_ROOT/nashorn"
16281   JDK_TOPDIR="$SRC_ROOT/jdk"
16282 
16283 
16284 
16285 
16286 
16287 
16288 
16289 
16290 
16291 
16292   ###############################################################################
16293   #
16294   # Pickup additional source for a component from outside of the source root
16295   # or override source for a component.
16296   #
16297 
16298 # Check whether --with-add-source-root was given.
16299 if test "${with_add_source_root+set}" = set; then :
16300   withval=$with_add_source_root;
16301 fi
16302 
16303 
16304 
16305 # Check whether --with-override-source-root was given.
16306 if test "${with_override_source_root+set}" = set; then :
16307   withval=$with_override_source_root;
16308 fi
16309 
16310 
16311 
16312 # Check whether --with-adds-and-overrides was given.
16313 if test "${with_adds_and_overrides+set}" = set; then :
16314   withval=$with_adds_and_overrides;
16315 fi
16316 
16317 
16318   if test "x$with_adds_and_overrides" != x; then
16319     with_add_source_root="$with_adds_and_overrides/adds"
16320     with_override_source_root="$with_adds_and_overrides/overrides"
16321   fi
16322 
16323   if test "x$with_add_source_root" != x; then
16324     if ! test -d $with_add_source_root; then
16325       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
16326     fi
16327     CURDIR="$PWD"
16328     cd "$with_add_source_root"
16329     ADD_SRC_ROOT="`pwd`"
16330     cd "$CURDIR"
16331     # Verify that the addon source root does not have any root makefiles.
16332     # If it does, then it is usually an error, prevent this.
16333     if test -f $with_add_source_root/langtools/make/Makefile; then
16334       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
16335     fi
16336     if test -f $with_add_source_root/corba/make/Makefile; then
16337       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
16338     fi
16339     if test -f $with_add_source_root/jaxp/make/Makefile; then
16340       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
16341     fi
16342     if test -f $with_add_source_root/jaxws/make/Makefile; then
16343       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
16344     fi
16345     if test -f $with_add_source_root/hotspot/make/Makefile; then
16346       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
16347     fi
16348     if test -f $with_add_source_root/nashorn/make/Makefile; then
16349       as_fn_error $? "Your add source root seems to contain a full nashorn repo! An add source root should only contain additional sources." "$LINENO" 5
16350     fi
16351     if test -f $with_add_source_root/jdk/make/Makefile; then
16352       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
16353     fi
16354   fi
16355 
16356 
16357   if test "x$with_override_source_root" != x; then
16358     if ! test -d $with_override_source_root; then
16359       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
16360     fi
16361     CURDIR="$PWD"
16362     cd "$with_override_source_root"
16363     OVERRIDE_SRC_ROOT="`pwd`"
16364     cd "$CURDIR"
16365     if test -f $with_override_source_root/langtools/make/Makefile; then
16366       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
16367     fi
16368     if test -f $with_override_source_root/corba/make/Makefile; then
16369       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
16370     fi
16371     if test -f $with_override_source_root/jaxp/make/Makefile; then
16372       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
16373     fi
16374     if test -f $with_override_source_root/jaxws/make/Makefile; then
16375       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
16376     fi
16377     if test -f $with_override_source_root/hotspot/make/Makefile; then
16378       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
16379     fi
16380     if test -f $with_override_source_root/nashorn/make/Makefile; then
16381       as_fn_error $? "Your override source root seems to contain a full nashorn repo! An override source root should only contain sources that override." "$LINENO" 5
16382     fi
16383     if test -f $with_override_source_root/jdk/make/Makefile; then
16384       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
16385     fi
16386   fi
16387 
16388 
16389   ###############################################################################
16390   #
16391   # Override a repo completely, this is used for example when you have 3 small
16392   # development sandboxes of the langtools sources and want to avoid having 3 full
16393   # OpenJDK sources checked out on disk.
16394   #
16395   # Assuming that the 3 langtools sandboxes are located here:
16396   # /home/fredrik/sandbox1/langtools
16397   # /home/fredrik/sandbox2/langtools
16398   # /home/fredrik/sandbox3/langtools
16399   #
16400   # From the source root you create build subdirs manually:
16401   #     mkdir -p build1 build2 build3
16402   # in each build directory run:
16403   #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
16404   #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
16405   #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
16406   #
16407 
16408 
16409 # Check whether --with-override-langtools was given.
16410 if test "${with_override_langtools+set}" = set; then :
16411   withval=$with_override_langtools;
16412 fi
16413 
16414 
16415 
16416 # Check whether --with-override-corba was given.
16417 if test "${with_override_corba+set}" = set; then :
16418   withval=$with_override_corba;
16419 fi
16420 
16421 
16422 
16423 # Check whether --with-override-jaxp was given.
16424 if test "${with_override_jaxp+set}" = set; then :
16425   withval=$with_override_jaxp;
16426 fi
16427 
16428 
16429 
16430 # Check whether --with-override-jaxws was given.
16431 if test "${with_override_jaxws+set}" = set; then :
16432   withval=$with_override_jaxws;
16433 fi
16434 
16435 
16436 
16437 # Check whether --with-override-hotspot was given.
16438 if test "${with_override_hotspot+set}" = set; then :
16439   withval=$with_override_hotspot;
16440 fi
16441 
16442 
16443 
16444 # Check whether --with-override-nashorn was given.
16445 if test "${with_override_nashorn+set}" = set; then :
16446   withval=$with_override_nashorn;
16447 fi
16448 
16449 
16450 
16451 # Check whether --with-override-jdk was given.
16452 if test "${with_override_jdk+set}" = set; then :
16453   withval=$with_override_jdk;
16454 fi
16455 
16456 
16457   if test "x$with_override_langtools" != x; then
16458     CURDIR="$PWD"
16459     cd "$with_override_langtools"
16460     LANGTOOLS_TOPDIR="`pwd`"
16461     cd "$CURDIR"
16462     if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
16463       as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
16464     fi
16465     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
16466 $as_echo_n "checking if langtools should be overridden... " >&6; }
16467     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
16468 $as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
16469   fi
16470   if test "x$with_override_corba" != x; then
16471     CURDIR="$PWD"
16472     cd "$with_override_corba"
16473     CORBA_TOPDIR="`pwd`"
16474     cd "$CURDIR"
16475     if ! test -f $CORBA_TOPDIR/make/Makefile; then
16476       as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
16477     fi
16478     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
16479 $as_echo_n "checking if corba should be overridden... " >&6; }
16480     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
16481 $as_echo "yes with $CORBA_TOPDIR" >&6; }
16482   fi
16483   if test "x$with_override_jaxp" != x; then
16484     CURDIR="$PWD"
16485     cd "$with_override_jaxp"
16486     JAXP_TOPDIR="`pwd`"
16487     cd "$CURDIR"
16488     if ! test -f $JAXP_TOPDIR/make/Makefile; then
16489       as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
16490     fi
16491     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
16492 $as_echo_n "checking if jaxp should be overridden... " >&6; }
16493     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
16494 $as_echo "yes with $JAXP_TOPDIR" >&6; }
16495   fi
16496   if test "x$with_override_jaxws" != x; then
16497     CURDIR="$PWD"
16498     cd "$with_override_jaxws"
16499     JAXWS_TOPDIR="`pwd`"
16500     cd "$CURDIR"
16501     if ! test -f $JAXWS_TOPDIR/make/Makefile; then
16502       as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
16503     fi
16504     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
16505 $as_echo_n "checking if jaxws should be overridden... " >&6; }
16506     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
16507 $as_echo "yes with $JAXWS_TOPDIR" >&6; }
16508   fi
16509   if test "x$with_override_hotspot" != x; then
16510     CURDIR="$PWD"
16511     cd "$with_override_hotspot"
16512     HOTSPOT_TOPDIR="`pwd`"
16513     cd "$CURDIR"
16514     if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
16515       as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
16516     fi
16517     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
16518 $as_echo_n "checking if hotspot should be overridden... " >&6; }
16519     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
16520 $as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
16521   fi
16522   if test "x$with_override_nashorn" != x; then
16523     CURDIR="$PWD"
16524     cd "$with_override_nashorn"
16525     NASHORN_TOPDIR="`pwd`"
16526     cd "$CURDIR"
16527     if ! test -f $NASHORN_TOPDIR/make/Makefile; then
16528       as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
16529     fi
16530     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
16531 $as_echo_n "checking if nashorn should be overridden... " >&6; }
16532     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
16533 $as_echo "yes with $NASHORN_TOPDIR" >&6; }
16534   fi
16535   if test "x$with_override_jdk" != x; then
16536     CURDIR="$PWD"
16537     cd "$with_override_jdk"
16538     JDK_TOPDIR="`pwd`"
16539     cd "$CURDIR"
16540     if ! test -f $JDK_TOPDIR/make/Makefile; then
16541       as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
16542     fi
16543     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
16544 $as_echo_n "checking if JDK should be overridden... " >&6; }
16545     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
16546 $as_echo "yes with $JDK_TOPDIR" >&6; }
16547   fi
16548 
16549 
16550   BUILD_OUTPUT="$OUTPUT_ROOT"
16551 
16552 
16553   HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
16554   BUILD_HOTSPOT=true
16555 
16556 
16557 
16558 # Check whether --with-import-hotspot was given.
16559 if test "${with_import_hotspot+set}" = set; then :
16560   withval=$with_import_hotspot;
16561 fi
16562 
16563   if test "x$with_import_hotspot" != x; then
16564     CURDIR="$PWD"
16565     cd "$with_import_hotspot"
16566     HOTSPOT_DIST="`pwd`"
16567     cd "$CURDIR"
16568     if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
16569       as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
16570     fi
16571     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
16572 $as_echo_n "checking if hotspot should be imported... " >&6; }
16573     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
16574 $as_echo "yes from $HOTSPOT_DIST" >&6; }
16575     BUILD_HOTSPOT=false
16576   fi
16577 
16578   JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
16579 
16580 
16581 ###############################################################################
16582 #
16583 # Setup the toolchain (compilers etc), i.e. the tools that need to be
16584 # cross-compilation aware.
16585 #
16586 ###############################################################################
16587 
16588 
16589   ###############################################################################
16590   #
16591   # Configure the development tool paths and potential sysroot.
16592   #
16593   ac_ext=cpp
16594 ac_cpp='$CXXCPP $CPPFLAGS'
16595 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16596 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16597 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16598 
16599 
16600   # The option used to specify the target .o,.a or .so file.
16601   # When compiling, how to specify the to be created object file.
16602   CC_OUT_OPTION='-o$(SPACE)'
16603   # When linking, how to specify the to be created executable.
16604   EXE_OUT_OPTION='-o$(SPACE)'
16605   # When linking, how to specify the to be created dynamically linkable library.
16606   LD_OUT_OPTION='-o$(SPACE)'
16607   # When archiving, how to specify the to be create static archive for object files.
16608   AR_OUT_OPTION='rcs$(SPACE)'
16609 
16610 
16611 
16612 
16613 
16614 # Locate the actual tools
16615 
16616 
16617 # Check whether --with-jtreg was given.
16618 if test "${with_jtreg+set}" = set; then :
16619   withval=$with_jtreg;
16620 else
16621   with_jtreg=no
16622 fi
16623 
16624 
16625   if test "x$with_jtreg" = xno; then
16626     # jtreg disabled
16627     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16628 $as_echo_n "checking for jtreg... " >&6; }
16629     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16630 $as_echo "no" >&6; }
16631   else
16632     if test "x$with_jtreg" != xyes; then
16633       # with path specified.
16634       JT_HOME="$with_jtreg"
16635     fi
16636 
16637     if test "x$JT_HOME" != x; then
16638       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16639 $as_echo_n "checking for jtreg... " >&6; }
16640 
16641       # use JT_HOME enviroment var.
16642 
16643   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16644 
16645   # Input might be given as Windows format, start by converting to
16646   # unix format.
16647   path="$JT_HOME"
16648   new_path=`$CYGPATH -u "$path"`
16649 
16650   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16651   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16652   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16653   # "foo.exe" is OK but "foo" is an error.
16654   #
16655   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16656   # It is also a way to make sure we got the proper file name for the real test later on.
16657   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16658   if test "x$test_shortpath" = x; then
16659     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16660 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16661     as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
16662   fi
16663 
16664   # Call helper function which possibly converts this using DOS-style short mode.
16665   # If so, the updated path is stored in $new_path.
16666 
16667   input_path="$new_path"
16668   # Check if we need to convert this using DOS-style short mode. If the path
16669   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16670   # take no chances and rewrite it.
16671   # Note: m4 eats our [], so we need to use [ and ] instead.
16672   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16673   if test "x$has_forbidden_chars" != x; then
16674     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16675     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16676     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16677     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16678       # Going to short mode and back again did indeed matter. Since short mode is
16679       # case insensitive, let's make it lowercase to improve readability.
16680       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16681       # Now convert it back to Unix-stile (cygpath)
16682       input_path=`$CYGPATH -u "$shortmode_path"`
16683       new_path="$input_path"
16684     fi
16685   fi
16686 
16687   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16688   if test "x$test_cygdrive_prefix" = x; then
16689     # As a simple fix, exclude /usr/bin since it's not a real path.
16690     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16691       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16692       # a path prefixed by /cygdrive for fixpath to work.
16693       new_path="$CYGWIN_ROOT_PATH$input_path"
16694     fi
16695   fi
16696 
16697 
16698   if test "x$path" != "x$new_path"; then
16699     JT_HOME="$new_path"
16700     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16701 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16702   fi
16703 
16704   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16705 
16706   path="$JT_HOME"
16707   has_colon=`$ECHO $path | $GREP ^.:`
16708   new_path="$path"
16709   if test "x$has_colon" = x; then
16710     # Not in mixed or Windows style, start by that.
16711     new_path=`cmd //c echo $path`
16712   fi
16713 
16714 
16715   input_path="$new_path"
16716   # Check if we need to convert this using DOS-style short mode. If the path
16717   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16718   # take no chances and rewrite it.
16719   # Note: m4 eats our [], so we need to use [ and ] instead.
16720   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16721   if test "x$has_forbidden_chars" != x; then
16722     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16723     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16724   fi
16725 
16726 
16727   windows_path="$new_path"
16728   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16729     unix_path=`$CYGPATH -u "$windows_path"`
16730     new_path="$unix_path"
16731   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16732     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16733     new_path="$unix_path"
16734   fi
16735 
16736   if test "x$path" != "x$new_path"; then
16737     JT_HOME="$new_path"
16738     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16739 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16740   fi
16741 
16742   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16743   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16744 
16745   else
16746     # We're on a posix platform. Hooray! :)
16747     path="$JT_HOME"
16748     has_space=`$ECHO "$path" | $GREP " "`
16749     if test "x$has_space" != x; then
16750       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16751 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16752       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16753     fi
16754 
16755     # Use eval to expand a potential ~
16756     eval path="$path"
16757     if test ! -f "$path" && test ! -d "$path"; then
16758       as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
16759     fi
16760 
16761     JT_HOME="`cd "$path"; $THEPWDCMD -L`"
16762   fi
16763 
16764 
16765       # jtreg win32 script works for everybody
16766       JTREGEXE="$JT_HOME/win32/bin/jtreg"
16767 
16768       if test ! -f "$JTREGEXE"; then
16769         as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
16770       fi
16771 
16772       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16773 $as_echo "$JTREGEXE" >&6; }
16774     else
16775       # try to find jtreg on path
16776 
16777   for ac_prog in jtreg
16778 do
16779   # Extract the first word of "$ac_prog", so it can be a program name with args.
16780 set dummy $ac_prog; ac_word=$2
16781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16782 $as_echo_n "checking for $ac_word... " >&6; }
16783 if ${ac_cv_path_JTREGEXE+:} false; then :
16784   $as_echo_n "(cached) " >&6
16785 else
16786   case $JTREGEXE in
16787   [\\/]* | ?:[\\/]*)
16788   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
16789   ;;
16790   *)
16791   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16792 for as_dir in $PATH
16793 do
16794   IFS=$as_save_IFS
16795   test -z "$as_dir" && as_dir=.
16796     for ac_exec_ext in '' $ac_executable_extensions; do
16797   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16798     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
16799     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16800     break 2
16801   fi
16802 done
16803   done
16804 IFS=$as_save_IFS
16805 
16806   ;;
16807 esac
16808 fi
16809 JTREGEXE=$ac_cv_path_JTREGEXE
16810 if test -n "$JTREGEXE"; then
16811   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16812 $as_echo "$JTREGEXE" >&6; }
16813 else
16814   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16815 $as_echo "no" >&6; }
16816 fi
16817 
16818 
16819   test -n "$JTREGEXE" && break
16820 done
16821 
16822 
16823   if test "x$JTREGEXE" = x; then
16824     if test "xjtreg" = x; then
16825       PROG_NAME=jtregexe
16826     else
16827       PROG_NAME=jtreg
16828     fi
16829     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
16830 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
16831     as_fn_error $? "Cannot continue" "$LINENO" 5
16832   fi
16833 
16834 
16835       JT_HOME="`$DIRNAME $JTREGEXE`"
16836     fi
16837   fi
16838 
16839 
16840 
16841 
16842 
16843   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16844 
16845   # Store path to cygwin link.exe to help excluding it when searching for
16846   # VS linker. This must be done before changing the PATH when looking for VS.
16847   # Extract the first word of "link", so it can be a program name with args.
16848 set dummy link; ac_word=$2
16849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16850 $as_echo_n "checking for $ac_word... " >&6; }
16851 if ${ac_cv_path_CYGWIN_LINK+:} false; then :
16852   $as_echo_n "(cached) " >&6
16853 else
16854   case $CYGWIN_LINK in
16855   [\\/]* | ?:[\\/]*)
16856   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16857   ;;
16858   *)
16859   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16860 for as_dir in $PATH
16861 do
16862   IFS=$as_save_IFS
16863   test -z "$as_dir" && as_dir=.
16864     for ac_exec_ext in '' $ac_executable_extensions; do
16865   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16866     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16867     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16868     break 2
16869   fi
16870 done
16871   done
16872 IFS=$as_save_IFS
16873 
16874   ;;
16875 esac
16876 fi
16877 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16878 if test -n "$CYGWIN_LINK"; then
16879   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16880 $as_echo "$CYGWIN_LINK" >&6; }
16881 else
16882   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16883 $as_echo "no" >&6; }
16884 fi
16885 
16886 
16887   if test "x$CYGWIN_LINK" != x; then
16888     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16889 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16890     "$CYGWIN_LINK" --version > /dev/null
16891     if test $? -eq 0 ; then
16892       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16893 $as_echo "yes" >&6; }
16894     else
16895       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16896 $as_echo "no" >&6; }
16897       # This might be the VS linker. Don't exclude it later on.
16898       CYGWIN_LINK=""
16899     fi
16900   fi
16901 
16902   # First-hand choice is to locate and run the vsvars bat file.
16903 
16904   if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16905     VCVARSFILE="vc/bin/vcvars32.bat"
16906   else
16907     VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16908   fi
16909 
16910   VS_ENV_CMD=""
16911   VS_ENV_ARGS=""
16912   if test "x$with_toolsdir" != x; then
16913 
16914   if test "x$VS_ENV_CMD" = x; then
16915     VS100BASE="$with_toolsdir/../.."
16916     METHOD="--with-tools-dir"
16917 
16918   windows_path="$VS100BASE"
16919   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16920     unix_path=`$CYGPATH -u "$windows_path"`
16921     VS100BASE="$unix_path"
16922   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16923     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16924     VS100BASE="$unix_path"
16925   fi
16926 
16927     if test -d "$VS100BASE"; then
16928       if test -f "$VS100BASE/$VCVARSFILE"; then
16929         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16930 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16931         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16932       else
16933         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16934 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16935         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16936 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16937       fi
16938     fi
16939   fi
16940 
16941   fi
16942 
16943   if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16944     # Having specified an argument which is incorrect will produce an instant failure;
16945     # we should not go on looking
16946     { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16947 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16948     { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16949 $as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16950     as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16951   fi
16952 
16953   if test "x$VS100COMNTOOLS" != x; then
16954 
16955   if test "x$VS_ENV_CMD" = x; then
16956     VS100BASE="$VS100COMNTOOLS/../.."
16957     METHOD="VS100COMNTOOLS variable"
16958 
16959   windows_path="$VS100BASE"
16960   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16961     unix_path=`$CYGPATH -u "$windows_path"`
16962     VS100BASE="$unix_path"
16963   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16964     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16965     VS100BASE="$unix_path"
16966   fi
16967 
16968     if test -d "$VS100BASE"; then
16969       if test -f "$VS100BASE/$VCVARSFILE"; then
16970         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16971 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16972         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16973       else
16974         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16975 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16976         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16977 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16978       fi
16979     fi
16980   fi
16981 
16982   fi
16983   if test "x$PROGRAMFILES" != x; then
16984 
16985   if test "x$VS_ENV_CMD" = x; then
16986     VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16987     METHOD="well-known name"
16988 
16989   windows_path="$VS100BASE"
16990   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16991     unix_path=`$CYGPATH -u "$windows_path"`
16992     VS100BASE="$unix_path"
16993   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16994     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16995     VS100BASE="$unix_path"
16996   fi
16997 
16998     if test -d "$VS100BASE"; then
16999       if test -f "$VS100BASE/$VCVARSFILE"; then
17000         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17001 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17002         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
17003       else
17004         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17005 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17006         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
17007 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
17008       fi
17009     fi
17010   fi
17011 
17012   fi
17013 
17014   if test "x$VS_ENV_CMD" = x; then
17015     VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
17016     METHOD="well-known name"
17017 
17018   windows_path="$VS100BASE"
17019   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17020     unix_path=`$CYGPATH -u "$windows_path"`
17021     VS100BASE="$unix_path"
17022   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17023     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17024     VS100BASE="$unix_path"
17025   fi
17026 
17027     if test -d "$VS100BASE"; then
17028       if test -f "$VS100BASE/$VCVARSFILE"; then
17029         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17030 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17031         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
17032       else
17033         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17034 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17035         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
17036 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
17037       fi
17038     fi
17039   fi
17040 
17041 
17042   if test "x$VS_ENV_CMD" = x; then
17043     VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
17044     METHOD="well-known name"
17045 
17046   windows_path="$VS100BASE"
17047   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17048     unix_path=`$CYGPATH -u "$windows_path"`
17049     VS100BASE="$unix_path"
17050   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17051     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17052     VS100BASE="$unix_path"
17053   fi
17054 
17055     if test -d "$VS100BASE"; then
17056       if test -f "$VS100BASE/$VCVARSFILE"; then
17057         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17058 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17059         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
17060       else
17061         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17062 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17063         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
17064 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
17065       fi
17066     fi
17067   fi
17068 
17069 
17070   if test "x$ProgramW6432" != x; then
17071 
17072   if test "x$VS_ENV_CMD" = x; then
17073     WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
17074     METHOD="well-known name"
17075 
17076   windows_path="$WIN_SDK_BASE"
17077   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17078     unix_path=`$CYGPATH -u "$windows_path"`
17079     WIN_SDK_BASE="$unix_path"
17080   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17081     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17082     WIN_SDK_BASE="$unix_path"
17083   fi
17084 
17085     if test -d "$WIN_SDK_BASE"; then
17086       # There have been cases of partial or broken SDK installations. A missing
17087       # lib dir is not going to work.
17088       if test ! -d "$WIN_SDK_BASE/../lib"; then
17089         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17090 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17091         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17092 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17093       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17094         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17095 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17096         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17097         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17098           VS_ENV_ARGS="/x86"
17099         else
17100           VS_ENV_ARGS="/x64"
17101         fi
17102       else
17103         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17104 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17105         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17106 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17107       fi
17108     fi
17109   fi
17110 
17111   fi
17112   if test "x$PROGRAMW6432" != x; then
17113 
17114   if test "x$VS_ENV_CMD" = x; then
17115     WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
17116     METHOD="well-known name"
17117 
17118   windows_path="$WIN_SDK_BASE"
17119   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17120     unix_path=`$CYGPATH -u "$windows_path"`
17121     WIN_SDK_BASE="$unix_path"
17122   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17123     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17124     WIN_SDK_BASE="$unix_path"
17125   fi
17126 
17127     if test -d "$WIN_SDK_BASE"; then
17128       # There have been cases of partial or broken SDK installations. A missing
17129       # lib dir is not going to work.
17130       if test ! -d "$WIN_SDK_BASE/../lib"; then
17131         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17132 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17133         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17134 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17135       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17136         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17137 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17138         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17139         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17140           VS_ENV_ARGS="/x86"
17141         else
17142           VS_ENV_ARGS="/x64"
17143         fi
17144       else
17145         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17146 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17147         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17148 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17149       fi
17150     fi
17151   fi
17152 
17153   fi
17154   if test "x$PROGRAMFILES" != x; then
17155 
17156   if test "x$VS_ENV_CMD" = x; then
17157     WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
17158     METHOD="well-known name"
17159 
17160   windows_path="$WIN_SDK_BASE"
17161   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17162     unix_path=`$CYGPATH -u "$windows_path"`
17163     WIN_SDK_BASE="$unix_path"
17164   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17165     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17166     WIN_SDK_BASE="$unix_path"
17167   fi
17168 
17169     if test -d "$WIN_SDK_BASE"; then
17170       # There have been cases of partial or broken SDK installations. A missing
17171       # lib dir is not going to work.
17172       if test ! -d "$WIN_SDK_BASE/../lib"; then
17173         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17174 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17175         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17176 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17177       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17178         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17179 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17180         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17181         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17182           VS_ENV_ARGS="/x86"
17183         else
17184           VS_ENV_ARGS="/x64"
17185         fi
17186       else
17187         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17188 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17189         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17190 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17191       fi
17192     fi
17193   fi
17194 
17195   fi
17196 
17197   if test "x$VS_ENV_CMD" = x; then
17198     WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
17199     METHOD="well-known name"
17200 
17201   windows_path="$WIN_SDK_BASE"
17202   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17203     unix_path=`$CYGPATH -u "$windows_path"`
17204     WIN_SDK_BASE="$unix_path"
17205   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17206     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17207     WIN_SDK_BASE="$unix_path"
17208   fi
17209 
17210     if test -d "$WIN_SDK_BASE"; then
17211       # There have been cases of partial or broken SDK installations. A missing
17212       # lib dir is not going to work.
17213       if test ! -d "$WIN_SDK_BASE/../lib"; then
17214         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17215 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17216         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17217 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17218       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17219         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17220 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17221         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17222         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17223           VS_ENV_ARGS="/x86"
17224         else
17225           VS_ENV_ARGS="/x64"
17226         fi
17227       else
17228         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17229 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17230         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17231 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17232       fi
17233     fi
17234   fi
17235 
17236 
17237   if test "x$VS_ENV_CMD" = x; then
17238     WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
17239     METHOD="well-known name"
17240 
17241   windows_path="$WIN_SDK_BASE"
17242   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17243     unix_path=`$CYGPATH -u "$windows_path"`
17244     WIN_SDK_BASE="$unix_path"
17245   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17246     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17247     WIN_SDK_BASE="$unix_path"
17248   fi
17249 
17250     if test -d "$WIN_SDK_BASE"; then
17251       # There have been cases of partial or broken SDK installations. A missing
17252       # lib dir is not going to work.
17253       if test ! -d "$WIN_SDK_BASE/../lib"; then
17254         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17255 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17256         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17257 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17258       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17259         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17260 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17261         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17262         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17263           VS_ENV_ARGS="/x86"
17264         else
17265           VS_ENV_ARGS="/x64"
17266         fi
17267       else
17268         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17269 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17270         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17271 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17272       fi
17273     fi
17274   fi
17275 
17276 
17277   if test "x$VS_ENV_CMD" != x; then
17278     # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
17279 
17280   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17281 
17282   # First separate the path from the arguments. This will split at the first
17283   # space.
17284   complete="$VS_ENV_CMD"
17285   path="${complete%% *}"
17286   tmp="$complete EOL"
17287   arguments="${tmp#* }"
17288 
17289   # Input might be given as Windows format, start by converting to
17290   # unix format.
17291   new_path=`$CYGPATH -u "$path"`
17292 
17293   # Now try to locate executable using which
17294   new_path=`$WHICH "$new_path" 2> /dev/null`
17295   # bat and cmd files are not always considered executable in cygwin causing which
17296   # to not find them
17297   if test "x$new_path" = x \
17298       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17299       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17300     new_path=`$CYGPATH -u "$path"`
17301   fi
17302   if test "x$new_path" = x; then
17303     # Oops. Which didn't find the executable.
17304     # The splitting of arguments from the executable at a space might have been incorrect,
17305     # since paths with space are more likely in Windows. Give it another try with the whole
17306     # argument.
17307     path="$complete"
17308     arguments="EOL"
17309     new_path=`$CYGPATH -u "$path"`
17310     new_path=`$WHICH "$new_path" 2> /dev/null`
17311     # bat and cmd files are not always considered executable in cygwin causing which
17312     # to not find them
17313     if test "x$new_path" = x \
17314         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17315         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17316       new_path=`$CYGPATH -u "$path"`
17317     fi
17318     if test "x$new_path" = x; then
17319       # It's still not found. Now this is an unrecoverable error.
17320       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17321 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17322       has_space=`$ECHO "$complete" | $GREP " "`
17323       if test "x$has_space" != x; then
17324         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17325 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17326       fi
17327       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17328     fi
17329   fi
17330 
17331   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17332   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17333   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17334   # "foo.exe" is OK but "foo" is an error.
17335   #
17336   # This test is therefore slightly more accurate than "test -f" to check for file presence.
17337   # It is also a way to make sure we got the proper file name for the real test later on.
17338   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17339   if test "x$test_shortpath" = x; then
17340     # Short path failed, file does not exist as specified.
17341     # Try adding .exe or .cmd
17342     if test -f "${new_path}.exe"; then
17343       input_to_shortpath="${new_path}.exe"
17344     elif test -f "${new_path}.cmd"; then
17345       input_to_shortpath="${new_path}.cmd"
17346     else
17347       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
17348 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
17349       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17350 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17351       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17352     fi
17353   else
17354     input_to_shortpath="$new_path"
17355   fi
17356 
17357   # Call helper function which possibly converts this using DOS-style short mode.
17358   # If so, the updated path is stored in $new_path.
17359   new_path="$input_to_shortpath"
17360 
17361   input_path="$input_to_shortpath"
17362   # Check if we need to convert this using DOS-style short mode. If the path
17363   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17364   # take no chances and rewrite it.
17365   # Note: m4 eats our [], so we need to use [ and ] instead.
17366   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17367   if test "x$has_forbidden_chars" != x; then
17368     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17369     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17370     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17371     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17372       # Going to short mode and back again did indeed matter. Since short mode is
17373       # case insensitive, let's make it lowercase to improve readability.
17374       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17375       # Now convert it back to Unix-stile (cygpath)
17376       input_path=`$CYGPATH -u "$shortmode_path"`
17377       new_path="$input_path"
17378     fi
17379   fi
17380 
17381   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17382   if test "x$test_cygdrive_prefix" = x; then
17383     # As a simple fix, exclude /usr/bin since it's not a real path.
17384     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17385       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17386       # a path prefixed by /cygdrive for fixpath to work.
17387       new_path="$CYGWIN_ROOT_PATH$input_path"
17388     fi
17389   fi
17390 
17391   # remove trailing .exe if any
17392   new_path="${new_path/%.exe/}"
17393 
17394   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17395 
17396   # First separate the path from the arguments. This will split at the first
17397   # space.
17398   complete="$VS_ENV_CMD"
17399   path="${complete%% *}"
17400   tmp="$complete EOL"
17401   arguments="${tmp#* }"
17402 
17403   # Input might be given as Windows format, start by converting to
17404   # unix format.
17405   new_path="$path"
17406 
17407   windows_path="$new_path"
17408   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17409     unix_path=`$CYGPATH -u "$windows_path"`
17410     new_path="$unix_path"
17411   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17412     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17413     new_path="$unix_path"
17414   fi
17415 
17416 
17417   # Now try to locate executable using which
17418   new_path=`$WHICH "$new_path" 2> /dev/null`
17419 
17420   if test "x$new_path" = x; then
17421     # Oops. Which didn't find the executable.
17422     # The splitting of arguments from the executable at a space might have been incorrect,
17423     # since paths with space are more likely in Windows. Give it another try with the whole
17424     # argument.
17425     path="$complete"
17426     arguments="EOL"
17427     new_path="$path"
17428 
17429   windows_path="$new_path"
17430   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17431     unix_path=`$CYGPATH -u "$windows_path"`
17432     new_path="$unix_path"
17433   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17434     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17435     new_path="$unix_path"
17436   fi
17437 
17438 
17439     new_path=`$WHICH "$new_path" 2> /dev/null`
17440 
17441     if test "x$new_path" = x; then
17442       # It's still not found. Now this is an unrecoverable error.
17443       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17444 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17445       has_space=`$ECHO "$complete" | $GREP " "`
17446       if test "x$has_space" != x; then
17447         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17448 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17449       fi
17450       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17451     fi
17452   fi
17453 
17454   # Now new_path has a complete unix path to the binary
17455   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17456     # Keep paths in /bin as-is, but remove trailing .exe if any
17457     new_path="${new_path/%.exe/}"
17458     # Do not save /bin paths to all_fixpath_prefixes!
17459   else
17460     # Not in mixed or Windows style, start by that.
17461     new_path=`cmd //c echo $new_path`
17462 
17463   input_path="$new_path"
17464   # Check if we need to convert this using DOS-style short mode. If the path
17465   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17466   # take no chances and rewrite it.
17467   # Note: m4 eats our [], so we need to use [ and ] instead.
17468   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17469   if test "x$has_forbidden_chars" != x; then
17470     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17471     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17472   fi
17473 
17474     # Output is in $new_path
17475 
17476   windows_path="$new_path"
17477   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17478     unix_path=`$CYGPATH -u "$windows_path"`
17479     new_path="$unix_path"
17480   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17481     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17482     new_path="$unix_path"
17483   fi
17484 
17485     # remove trailing .exe if any
17486     new_path="${new_path/%.exe/}"
17487 
17488     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17489     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17490   fi
17491 
17492   else
17493     # We're on a posix platform. Hooray! :)
17494     # First separate the path from the arguments. This will split at the first
17495     # space.
17496     complete="$VS_ENV_CMD"
17497     path="${complete%% *}"
17498     tmp="$complete EOL"
17499     arguments="${tmp#* }"
17500 
17501     # Cannot rely on the command "which" here since it doesn't always work.
17502     is_absolute_path=`$ECHO "$path" | $GREP ^/`
17503     if test -z "$is_absolute_path"; then
17504       # Path to executable is not absolute. Find it.
17505       IFS_save="$IFS"
17506       IFS=:
17507       for p in $PATH; do
17508         if test -f "$p/$path" && test -x "$p/$path"; then
17509           new_path="$p/$path"
17510           break
17511         fi
17512       done
17513       IFS="$IFS_save"
17514     else
17515       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
17516 $as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
17517       new_path="$path"
17518     fi
17519 
17520     if test "x$new_path" = x; then
17521       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17522 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17523       has_space=`$ECHO "$complete" | $GREP " "`
17524       if test "x$has_space" != x; then
17525         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17526 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17527       fi
17528       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17529     fi
17530   fi
17531 
17532   # Now join together the path and the arguments once again
17533   if test "x$arguments" != xEOL; then
17534     new_complete="$new_path ${arguments% *}"
17535   else
17536     new_complete="$new_path"
17537   fi
17538 
17539   if test "x$complete" != "x$new_complete"; then
17540     VS_ENV_CMD="$new_complete"
17541     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
17542 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
17543   fi
17544 
17545 
17546     # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
17547     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
17548 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
17549     cd $OUTPUT_ROOT
17550     # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
17551     # to autoconf standards.
17552 
17553     #----
17554 
17555     # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
17556     # but calculate the difference in Cygwin environment before/after running it and then
17557     # apply the diff.
17558 
17559     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
17560       _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
17561       _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
17562       _dosbash=`cygpath -a -w -s \`which bash\`.*`
17563     else
17564       _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
17565       _dosbash=`cmd //c echo \`which bash\``
17566     fi
17567 
17568     # generate the set of exported vars before/after the vs10 setup
17569     $ECHO "@echo off"                                           >  localdevenvtmp.bat
17570     $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
17571     $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
17572     $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
17573 
17574     # Now execute the newly created bat file.
17575     # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
17576     cmd /c localdevenvtmp.bat | cat
17577 
17578     # apply the diff (less some non-vs10 vars named by "!")
17579     $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
17580     $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
17581     $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
17582 
17583     # cleanup
17584     $RM localdevenvtmp*
17585     #----
17586     cd $CURDIR
17587     if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
17588       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17589 $as_echo "no" >&6; }
17590       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
17591 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
17592       { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17593 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17594       { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17595 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17596       as_fn_error $? "Cannot continue" "$LINENO" 5
17597     fi
17598 
17599     # Now set all paths and other env variables. This will allow the rest of
17600     # the configure script to find and run the compiler in the proper way.
17601     { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
17602 $as_echo "$as_me: Setting extracted environment variables" >&6;}
17603     . $OUTPUT_ROOT/localdevenv.sh
17604   else
17605     # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
17606     { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
17607 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
17608   fi
17609 
17610   # At this point, we should have corrent variables in the environment, or we can't continue.
17611   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
17612 $as_echo_n "checking for Visual Studio variables... " >&6; }
17613 
17614   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
17615     if test "x$INCLUDE" = x || test "x$LIB" = x; then
17616       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
17617 $as_echo "present but broken" >&6; }
17618       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
17619     else
17620       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17621 $as_echo "ok" >&6; }
17622       # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
17623       VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
17624       VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
17625       # Remove any paths containing # (typically F#) as that messes up make
17626       PATH=`$ECHO "$PATH" | $SED 's/[^:#]*#[^:]*://g'`
17627       VS_PATH="$PATH"
17628 
17629 
17630 
17631     fi
17632   else
17633     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17634 $as_echo "not found" >&6; }
17635 
17636     if test "x$VS_ENV_CMD" = x; then
17637       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
17638 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
17639       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
17640 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
17641     else
17642       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
17643 $as_echo "$as_me: Running the extraction script failed." >&6;}
17644     fi
17645     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17646 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17647     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17648 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17649     as_fn_error $? "Cannot continue" "$LINENO" 5
17650   fi
17651 
17652 
17653 
17654 # Check whether --with-msvcr-dll was given.
17655 if test "${with_msvcr_dll+set}" = set; then :
17656   withval=$with_msvcr_dll;
17657 fi
17658 
17659 
17660   if test "x$with_msvcr_dll" != x; then
17661     # If given explicitely by user, do not probe. If not present, fail directly.
17662 
17663   POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
17664   METHOD="--with-msvcr-dll"
17665   if test -e "$POSSIBLE_MSVCR_DLL"; then
17666     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17667 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17668 
17669     # Need to check if the found msvcr is correct architecture
17670     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17671 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17672     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17673     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17674       CORRECT_MSVCR_ARCH=386
17675     else
17676       CORRECT_MSVCR_ARCH=x86-64
17677     fi
17678     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17679       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17680 $as_echo "ok" >&6; }
17681       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17682       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17683 $as_echo_n "checking for msvcr100.dll... " >&6; }
17684       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17685 $as_echo "$MSVCR_DLL" >&6; }
17686     else
17687       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17688 $as_echo "incorrect, ignoring" >&6; }
17689       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17690 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17691     fi
17692   fi
17693 
17694     if test "x$MSVCR_DLL" = x; then
17695       as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
17696     fi
17697   fi
17698 
17699   if test "x$MSVCR_DLL" = x; then
17700     # Probe: Using well-known location from Visual Studio 10.0
17701     if test "x$VCINSTALLDIR" != x; then
17702       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
17703 
17704   windows_path="$CYGWIN_VC_INSTALL_DIR"
17705   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17706     unix_path=`$CYGPATH -u "$windows_path"`
17707     CYGWIN_VC_INSTALL_DIR="$unix_path"
17708   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17709     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17710     CYGWIN_VC_INSTALL_DIR="$unix_path"
17711   fi
17712 
17713       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17714         POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
17715       else
17716         POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
17717       fi
17718 
17719   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17720   METHOD="well-known location in VCINSTALLDIR"
17721   if test -e "$POSSIBLE_MSVCR_DLL"; then
17722     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17723 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17724 
17725     # Need to check if the found msvcr is correct architecture
17726     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17727 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17728     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17729     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17730       CORRECT_MSVCR_ARCH=386
17731     else
17732       CORRECT_MSVCR_ARCH=x86-64
17733     fi
17734     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17735       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17736 $as_echo "ok" >&6; }
17737       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17738       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17739 $as_echo_n "checking for msvcr100.dll... " >&6; }
17740       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17741 $as_echo "$MSVCR_DLL" >&6; }
17742     else
17743       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17744 $as_echo "incorrect, ignoring" >&6; }
17745       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17746 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17747     fi
17748   fi
17749 
17750     fi
17751   fi
17752 
17753   if test "x$MSVCR_DLL" = x; then
17754     # Probe: Check in the Boot JDK directory.
17755     POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
17756 
17757   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17758   METHOD="well-known location in Boot JDK"
17759   if test -e "$POSSIBLE_MSVCR_DLL"; then
17760     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17761 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17762 
17763     # Need to check if the found msvcr is correct architecture
17764     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17765 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17766     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17767     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17768       CORRECT_MSVCR_ARCH=386
17769     else
17770       CORRECT_MSVCR_ARCH=x86-64
17771     fi
17772     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17773       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17774 $as_echo "ok" >&6; }
17775       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17776       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17777 $as_echo_n "checking for msvcr100.dll... " >&6; }
17778       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17779 $as_echo "$MSVCR_DLL" >&6; }
17780     else
17781       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17782 $as_echo "incorrect, ignoring" >&6; }
17783       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17784 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17785     fi
17786   fi
17787 
17788   fi
17789 
17790   if test "x$MSVCR_DLL" = x; then
17791     # Probe: Look in the Windows system32 directory
17792     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
17793 
17794   windows_path="$CYGWIN_SYSTEMROOT"
17795   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17796     unix_path=`$CYGPATH -u "$windows_path"`
17797     CYGWIN_SYSTEMROOT="$unix_path"
17798   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17799     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17800     CYGWIN_SYSTEMROOT="$unix_path"
17801   fi
17802 
17803     POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
17804 
17805   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17806   METHOD="well-known location in SYSTEMROOT"
17807   if test -e "$POSSIBLE_MSVCR_DLL"; then
17808     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17809 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17810 
17811     # Need to check if the found msvcr is correct architecture
17812     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17813 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17814     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17815     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17816       CORRECT_MSVCR_ARCH=386
17817     else
17818       CORRECT_MSVCR_ARCH=x86-64
17819     fi
17820     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17821       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17822 $as_echo "ok" >&6; }
17823       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17824       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17825 $as_echo_n "checking for msvcr100.dll... " >&6; }
17826       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17827 $as_echo "$MSVCR_DLL" >&6; }
17828     else
17829       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17830 $as_echo "incorrect, ignoring" >&6; }
17831       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17832 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17833     fi
17834   fi
17835 
17836   fi
17837 
17838   if test "x$MSVCR_DLL" = x; then
17839     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
17840     if test "x$VS100COMNTOOLS" != x; then
17841       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
17842 
17843   windows_path="$CYGWIN_VS_TOOLS_DIR"
17844   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17845     unix_path=`$CYGPATH -u "$windows_path"`
17846     CYGWIN_VS_TOOLS_DIR="$unix_path"
17847   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17848     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17849     CYGWIN_VS_TOOLS_DIR="$unix_path"
17850   fi
17851 
17852       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17853         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
17854       else
17855         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
17856       fi
17857 
17858   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17859   METHOD="search of VS100COMNTOOLS"
17860   if test -e "$POSSIBLE_MSVCR_DLL"; then
17861     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17862 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17863 
17864     # Need to check if the found msvcr is correct architecture
17865     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17866 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17867     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17868     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17869       CORRECT_MSVCR_ARCH=386
17870     else
17871       CORRECT_MSVCR_ARCH=x86-64
17872     fi
17873     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17874       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17875 $as_echo "ok" >&6; }
17876       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17877       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17878 $as_echo_n "checking for msvcr100.dll... " >&6; }
17879       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17880 $as_echo "$MSVCR_DLL" >&6; }
17881     else
17882       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17883 $as_echo "incorrect, ignoring" >&6; }
17884       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17885 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17886     fi
17887   fi
17888 
17889     fi
17890   fi
17891 
17892   if test "x$MSVCR_DLL" = x; then
17893     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
17894     # (This was the original behaviour; kept since it might turn up something)
17895     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
17896       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17897         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
17898       else
17899         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
17900         if test "x$POSSIBLE_MSVCR_DLL" = x; then
17901           # We're grasping at straws now...
17902           POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
17903         fi
17904       fi
17905 
17906 
17907   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17908   METHOD="search of VCINSTALLDIR"
17909   if test -e "$POSSIBLE_MSVCR_DLL"; then
17910     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17911 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17912 
17913     # Need to check if the found msvcr is correct architecture
17914     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17915 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17916     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17917     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17918       CORRECT_MSVCR_ARCH=386
17919     else
17920       CORRECT_MSVCR_ARCH=x86-64
17921     fi
17922     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17923       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17924 $as_echo "ok" >&6; }
17925       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17926       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17927 $as_echo_n "checking for msvcr100.dll... " >&6; }
17928       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17929 $as_echo "$MSVCR_DLL" >&6; }
17930     else
17931       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17932 $as_echo "incorrect, ignoring" >&6; }
17933       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17934 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17935     fi
17936   fi
17937 
17938     fi
17939   fi
17940 
17941   if test "x$MSVCR_DLL" = x; then
17942     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17943 $as_echo_n "checking for msvcr100.dll... " >&6; }
17944     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17945 $as_echo "no" >&6; }
17946     as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
17947   fi
17948 
17949 
17950   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17951 
17952   # Input might be given as Windows format, start by converting to
17953   # unix format.
17954   path="$MSVCR_DLL"
17955   new_path=`$CYGPATH -u "$path"`
17956 
17957   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17958   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17959   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17960   # "foo.exe" is OK but "foo" is an error.
17961   #
17962   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17963   # It is also a way to make sure we got the proper file name for the real test later on.
17964   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17965   if test "x$test_shortpath" = x; then
17966     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17967 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17968     as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
17969   fi
17970 
17971   # Call helper function which possibly converts this using DOS-style short mode.
17972   # If so, the updated path is stored in $new_path.
17973 
17974   input_path="$new_path"
17975   # Check if we need to convert this using DOS-style short mode. If the path
17976   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17977   # take no chances and rewrite it.
17978   # Note: m4 eats our [], so we need to use [ and ] instead.
17979   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17980   if test "x$has_forbidden_chars" != x; then
17981     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17982     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17983     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17984     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17985       # Going to short mode and back again did indeed matter. Since short mode is
17986       # case insensitive, let's make it lowercase to improve readability.
17987       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17988       # Now convert it back to Unix-stile (cygpath)
17989       input_path=`$CYGPATH -u "$shortmode_path"`
17990       new_path="$input_path"
17991     fi
17992   fi
17993 
17994   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17995   if test "x$test_cygdrive_prefix" = x; then
17996     # As a simple fix, exclude /usr/bin since it's not a real path.
17997     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17998       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17999       # a path prefixed by /cygdrive for fixpath to work.
18000       new_path="$CYGWIN_ROOT_PATH$input_path"
18001     fi
18002   fi
18003 
18004 
18005   if test "x$path" != "x$new_path"; then
18006     MSVCR_DLL="$new_path"
18007     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
18008 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
18009   fi
18010 
18011   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18012 
18013   path="$MSVCR_DLL"
18014   has_colon=`$ECHO $path | $GREP ^.:`
18015   new_path="$path"
18016   if test "x$has_colon" = x; then
18017     # Not in mixed or Windows style, start by that.
18018     new_path=`cmd //c echo $path`
18019   fi
18020 
18021 
18022   input_path="$new_path"
18023   # Check if we need to convert this using DOS-style short mode. If the path
18024   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18025   # take no chances and rewrite it.
18026   # Note: m4 eats our [], so we need to use [ and ] instead.
18027   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18028   if test "x$has_forbidden_chars" != x; then
18029     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18030     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18031   fi
18032 
18033 
18034   windows_path="$new_path"
18035   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18036     unix_path=`$CYGPATH -u "$windows_path"`
18037     new_path="$unix_path"
18038   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18039     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18040     new_path="$unix_path"
18041   fi
18042 
18043   if test "x$path" != "x$new_path"; then
18044     MSVCR_DLL="$new_path"
18045     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
18046 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
18047   fi
18048 
18049   # Save the first 10 bytes of this path to the storage, so fixpath can work.
18050   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18051 
18052   else
18053     # We're on a posix platform. Hooray! :)
18054     path="$MSVCR_DLL"
18055     has_space=`$ECHO "$path" | $GREP " "`
18056     if test "x$has_space" != x; then
18057       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
18058 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
18059       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
18060     fi
18061 
18062     # Use eval to expand a potential ~
18063     eval path="$path"
18064     if test ! -f "$path" && test ! -d "$path"; then
18065       as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
18066     fi
18067 
18068     MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
18069   fi
18070 
18071 
18072 
18073 
18074 # Check whether --with-dxsdk was given.
18075 if test "${with_dxsdk+set}" = set; then :
18076   withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
18077 $as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
18078 fi
18079 
18080 
18081 
18082 
18083 # Check whether --with-dxsdk-lib was given.
18084 if test "${with_dxsdk_lib+set}" = set; then :
18085   withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
18086 $as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
18087 fi
18088 
18089 
18090 
18091 
18092 # Check whether --with-dxsdk-include was given.
18093 if test "${with_dxsdk_include+set}" = set; then :
18094   withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
18095 $as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
18096 fi
18097 
18098 
18099   fi
18100 
18101 
18102 
18103   # If --build AND --host is set, then the configure script will find any
18104   # cross compilation tools in the PATH. Cross compilation tools
18105   # follows the cross compilation standard where they are prefixed with ${host}.
18106   # For example the binary i686-sun-solaris2.10-gcc
18107   # will cross compile for i686-sun-solaris2.10
18108   # If neither of build and host is not set, then build=host and the
18109   # default compiler found in the path will be used.
18110   # Setting only --host, does not seem to be really supported.
18111   # Please set both --build and --host if you want to cross compile.
18112 
18113   if test "x$COMPILE_TYPE" = "xcross"; then
18114     # Now we to find a C/C++ compiler that can build executables for the build
18115     # platform. We can't use the AC_PROG_CC macro, since it can only be used
18116     # once. Also, we need to do this before adding a tools dir to the path,
18117     # otherwise we might pick up cross-compilers which don't use standard naming.
18118     # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
18119     # to wait until they are properly discovered.
18120     for ac_prog in cl cc gcc
18121 do
18122   # Extract the first word of "$ac_prog", so it can be a program name with args.
18123 set dummy $ac_prog; ac_word=$2
18124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18125 $as_echo_n "checking for $ac_word... " >&6; }
18126 if ${ac_cv_path_BUILD_CC+:} false; then :
18127   $as_echo_n "(cached) " >&6
18128 else
18129   case $BUILD_CC in
18130   [\\/]* | ?:[\\/]*)
18131   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
18132   ;;
18133   *)
18134   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18135 for as_dir in $PATH
18136 do
18137   IFS=$as_save_IFS
18138   test -z "$as_dir" && as_dir=.
18139     for ac_exec_ext in '' $ac_executable_extensions; do
18140   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18141     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
18142     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18143     break 2
18144   fi
18145 done
18146   done
18147 IFS=$as_save_IFS
18148 
18149   ;;
18150 esac
18151 fi
18152 BUILD_CC=$ac_cv_path_BUILD_CC
18153 if test -n "$BUILD_CC"; then
18154   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
18155 $as_echo "$BUILD_CC" >&6; }
18156 else
18157   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18158 $as_echo "no" >&6; }
18159 fi
18160 
18161 
18162   test -n "$BUILD_CC" && break
18163 done
18164 
18165 
18166   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18167 
18168   # First separate the path from the arguments. This will split at the first
18169   # space.
18170   complete="$BUILD_CC"
18171   path="${complete%% *}"
18172   tmp="$complete EOL"
18173   arguments="${tmp#* }"
18174 
18175   # Input might be given as Windows format, start by converting to
18176   # unix format.
18177   new_path=`$CYGPATH -u "$path"`
18178 
18179   # Now try to locate executable using which
18180   new_path=`$WHICH "$new_path" 2> /dev/null`
18181   # bat and cmd files are not always considered executable in cygwin causing which
18182   # to not find them
18183   if test "x$new_path" = x \
18184       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18185       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18186     new_path=`$CYGPATH -u "$path"`
18187   fi
18188   if test "x$new_path" = x; then
18189     # Oops. Which didn't find the executable.
18190     # The splitting of arguments from the executable at a space might have been incorrect,
18191     # since paths with space are more likely in Windows. Give it another try with the whole
18192     # argument.
18193     path="$complete"
18194     arguments="EOL"
18195     new_path=`$CYGPATH -u "$path"`
18196     new_path=`$WHICH "$new_path" 2> /dev/null`
18197     # bat and cmd files are not always considered executable in cygwin causing which
18198     # to not find them
18199     if test "x$new_path" = x \
18200         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18201         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18202       new_path=`$CYGPATH -u "$path"`
18203     fi
18204     if test "x$new_path" = x; then
18205       # It's still not found. Now this is an unrecoverable error.
18206       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18207 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18208       has_space=`$ECHO "$complete" | $GREP " "`
18209       if test "x$has_space" != x; then
18210         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18211 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18212       fi
18213       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18214     fi
18215   fi
18216 
18217   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18218   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18219   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18220   # "foo.exe" is OK but "foo" is an error.
18221   #
18222   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18223   # It is also a way to make sure we got the proper file name for the real test later on.
18224   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18225   if test "x$test_shortpath" = x; then
18226     # Short path failed, file does not exist as specified.
18227     # Try adding .exe or .cmd
18228     if test -f "${new_path}.exe"; then
18229       input_to_shortpath="${new_path}.exe"
18230     elif test -f "${new_path}.cmd"; then
18231       input_to_shortpath="${new_path}.cmd"
18232     else
18233       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
18234 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
18235       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18236 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18237       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18238     fi
18239   else
18240     input_to_shortpath="$new_path"
18241   fi
18242 
18243   # Call helper function which possibly converts this using DOS-style short mode.
18244   # If so, the updated path is stored in $new_path.
18245   new_path="$input_to_shortpath"
18246 
18247   input_path="$input_to_shortpath"
18248   # Check if we need to convert this using DOS-style short mode. If the path
18249   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18250   # take no chances and rewrite it.
18251   # Note: m4 eats our [], so we need to use [ and ] instead.
18252   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18253   if test "x$has_forbidden_chars" != x; then
18254     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18255     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18256     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18257     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18258       # Going to short mode and back again did indeed matter. Since short mode is
18259       # case insensitive, let's make it lowercase to improve readability.
18260       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18261       # Now convert it back to Unix-stile (cygpath)
18262       input_path=`$CYGPATH -u "$shortmode_path"`
18263       new_path="$input_path"
18264     fi
18265   fi
18266 
18267   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18268   if test "x$test_cygdrive_prefix" = x; then
18269     # As a simple fix, exclude /usr/bin since it's not a real path.
18270     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18271       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18272       # a path prefixed by /cygdrive for fixpath to work.
18273       new_path="$CYGWIN_ROOT_PATH$input_path"
18274     fi
18275   fi
18276 
18277   # remove trailing .exe if any
18278   new_path="${new_path/%.exe/}"
18279 
18280   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18281 
18282   # First separate the path from the arguments. This will split at the first
18283   # space.
18284   complete="$BUILD_CC"
18285   path="${complete%% *}"
18286   tmp="$complete EOL"
18287   arguments="${tmp#* }"
18288 
18289   # Input might be given as Windows format, start by converting to
18290   # unix format.
18291   new_path="$path"
18292 
18293   windows_path="$new_path"
18294   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18295     unix_path=`$CYGPATH -u "$windows_path"`
18296     new_path="$unix_path"
18297   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18298     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18299     new_path="$unix_path"
18300   fi
18301 
18302 
18303   # Now try to locate executable using which
18304   new_path=`$WHICH "$new_path" 2> /dev/null`
18305 
18306   if test "x$new_path" = x; then
18307     # Oops. Which didn't find the executable.
18308     # The splitting of arguments from the executable at a space might have been incorrect,
18309     # since paths with space are more likely in Windows. Give it another try with the whole
18310     # argument.
18311     path="$complete"
18312     arguments="EOL"
18313     new_path="$path"
18314 
18315   windows_path="$new_path"
18316   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18317     unix_path=`$CYGPATH -u "$windows_path"`
18318     new_path="$unix_path"
18319   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18320     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18321     new_path="$unix_path"
18322   fi
18323 
18324 
18325     new_path=`$WHICH "$new_path" 2> /dev/null`
18326 
18327     if test "x$new_path" = x; then
18328       # It's still not found. Now this is an unrecoverable error.
18329       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18330 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18331       has_space=`$ECHO "$complete" | $GREP " "`
18332       if test "x$has_space" != x; then
18333         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18334 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18335       fi
18336       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18337     fi
18338   fi
18339 
18340   # Now new_path has a complete unix path to the binary
18341   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18342     # Keep paths in /bin as-is, but remove trailing .exe if any
18343     new_path="${new_path/%.exe/}"
18344     # Do not save /bin paths to all_fixpath_prefixes!
18345   else
18346     # Not in mixed or Windows style, start by that.
18347     new_path=`cmd //c echo $new_path`
18348 
18349   input_path="$new_path"
18350   # Check if we need to convert this using DOS-style short mode. If the path
18351   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18352   # take no chances and rewrite it.
18353   # Note: m4 eats our [], so we need to use [ and ] instead.
18354   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18355   if test "x$has_forbidden_chars" != x; then
18356     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18357     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18358   fi
18359 
18360     # Output is in $new_path
18361 
18362   windows_path="$new_path"
18363   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18364     unix_path=`$CYGPATH -u "$windows_path"`
18365     new_path="$unix_path"
18366   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18367     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18368     new_path="$unix_path"
18369   fi
18370 
18371     # remove trailing .exe if any
18372     new_path="${new_path/%.exe/}"
18373 
18374     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18375     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18376   fi
18377 
18378   else
18379     # We're on a posix platform. Hooray! :)
18380     # First separate the path from the arguments. This will split at the first
18381     # space.
18382     complete="$BUILD_CC"
18383     path="${complete%% *}"
18384     tmp="$complete EOL"
18385     arguments="${tmp#* }"
18386 
18387     # Cannot rely on the command "which" here since it doesn't always work.
18388     is_absolute_path=`$ECHO "$path" | $GREP ^/`
18389     if test -z "$is_absolute_path"; then
18390       # Path to executable is not absolute. Find it.
18391       IFS_save="$IFS"
18392       IFS=:
18393       for p in $PATH; do
18394         if test -f "$p/$path" && test -x "$p/$path"; then
18395           new_path="$p/$path"
18396           break
18397         fi
18398       done
18399       IFS="$IFS_save"
18400     else
18401       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
18402 $as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
18403       new_path="$path"
18404     fi
18405 
18406     if test "x$new_path" = x; then
18407       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18408 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18409       has_space=`$ECHO "$complete" | $GREP " "`
18410       if test "x$has_space" != x; then
18411         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18412 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18413       fi
18414       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18415     fi
18416   fi
18417 
18418   # Now join together the path and the arguments once again
18419   if test "x$arguments" != xEOL; then
18420     new_complete="$new_path ${arguments% *}"
18421   else
18422     new_complete="$new_path"
18423   fi
18424 
18425   if test "x$complete" != "x$new_complete"; then
18426     BUILD_CC="$new_complete"
18427     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
18428 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
18429   fi
18430 
18431     for ac_prog in cl CC g++
18432 do
18433   # Extract the first word of "$ac_prog", so it can be a program name with args.
18434 set dummy $ac_prog; ac_word=$2
18435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18436 $as_echo_n "checking for $ac_word... " >&6; }
18437 if ${ac_cv_path_BUILD_CXX+:} false; then :
18438   $as_echo_n "(cached) " >&6
18439 else
18440   case $BUILD_CXX in
18441   [\\/]* | ?:[\\/]*)
18442   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
18443   ;;
18444   *)
18445   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18446 for as_dir in $PATH
18447 do
18448   IFS=$as_save_IFS
18449   test -z "$as_dir" && as_dir=.
18450     for ac_exec_ext in '' $ac_executable_extensions; do
18451   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18452     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
18453     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18454     break 2
18455   fi
18456 done
18457   done
18458 IFS=$as_save_IFS
18459 
18460   ;;
18461 esac
18462 fi
18463 BUILD_CXX=$ac_cv_path_BUILD_CXX
18464 if test -n "$BUILD_CXX"; then
18465   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
18466 $as_echo "$BUILD_CXX" >&6; }
18467 else
18468   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18469 $as_echo "no" >&6; }
18470 fi
18471 
18472 
18473   test -n "$BUILD_CXX" && break
18474 done
18475 
18476 
18477   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18478 
18479   # First separate the path from the arguments. This will split at the first
18480   # space.
18481   complete="$BUILD_CXX"
18482   path="${complete%% *}"
18483   tmp="$complete EOL"
18484   arguments="${tmp#* }"
18485 
18486   # Input might be given as Windows format, start by converting to
18487   # unix format.
18488   new_path=`$CYGPATH -u "$path"`
18489 
18490   # Now try to locate executable using which
18491   new_path=`$WHICH "$new_path" 2> /dev/null`
18492   # bat and cmd files are not always considered executable in cygwin causing which
18493   # to not find them
18494   if test "x$new_path" = x \
18495       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18496       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18497     new_path=`$CYGPATH -u "$path"`
18498   fi
18499   if test "x$new_path" = x; then
18500     # Oops. Which didn't find the executable.
18501     # The splitting of arguments from the executable at a space might have been incorrect,
18502     # since paths with space are more likely in Windows. Give it another try with the whole
18503     # argument.
18504     path="$complete"
18505     arguments="EOL"
18506     new_path=`$CYGPATH -u "$path"`
18507     new_path=`$WHICH "$new_path" 2> /dev/null`
18508     # bat and cmd files are not always considered executable in cygwin causing which
18509     # to not find them
18510     if test "x$new_path" = x \
18511         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18512         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18513       new_path=`$CYGPATH -u "$path"`
18514     fi
18515     if test "x$new_path" = x; then
18516       # It's still not found. Now this is an unrecoverable error.
18517       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18518 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18519       has_space=`$ECHO "$complete" | $GREP " "`
18520       if test "x$has_space" != x; then
18521         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18522 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18523       fi
18524       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18525     fi
18526   fi
18527 
18528   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18529   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18530   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18531   # "foo.exe" is OK but "foo" is an error.
18532   #
18533   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18534   # It is also a way to make sure we got the proper file name for the real test later on.
18535   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18536   if test "x$test_shortpath" = x; then
18537     # Short path failed, file does not exist as specified.
18538     # Try adding .exe or .cmd
18539     if test -f "${new_path}.exe"; then
18540       input_to_shortpath="${new_path}.exe"
18541     elif test -f "${new_path}.cmd"; then
18542       input_to_shortpath="${new_path}.cmd"
18543     else
18544       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
18545 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
18546       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18547 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18548       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18549     fi
18550   else
18551     input_to_shortpath="$new_path"
18552   fi
18553 
18554   # Call helper function which possibly converts this using DOS-style short mode.
18555   # If so, the updated path is stored in $new_path.
18556   new_path="$input_to_shortpath"
18557 
18558   input_path="$input_to_shortpath"
18559   # Check if we need to convert this using DOS-style short mode. If the path
18560   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18561   # take no chances and rewrite it.
18562   # Note: m4 eats our [], so we need to use [ and ] instead.
18563   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18564   if test "x$has_forbidden_chars" != x; then
18565     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18566     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18567     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18568     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18569       # Going to short mode and back again did indeed matter. Since short mode is
18570       # case insensitive, let's make it lowercase to improve readability.
18571       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18572       # Now convert it back to Unix-stile (cygpath)
18573       input_path=`$CYGPATH -u "$shortmode_path"`
18574       new_path="$input_path"
18575     fi
18576   fi
18577 
18578   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18579   if test "x$test_cygdrive_prefix" = x; then
18580     # As a simple fix, exclude /usr/bin since it's not a real path.
18581     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18582       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18583       # a path prefixed by /cygdrive for fixpath to work.
18584       new_path="$CYGWIN_ROOT_PATH$input_path"
18585     fi
18586   fi
18587 
18588   # remove trailing .exe if any
18589   new_path="${new_path/%.exe/}"
18590 
18591   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18592 
18593   # First separate the path from the arguments. This will split at the first
18594   # space.
18595   complete="$BUILD_CXX"
18596   path="${complete%% *}"
18597   tmp="$complete EOL"
18598   arguments="${tmp#* }"
18599 
18600   # Input might be given as Windows format, start by converting to
18601   # unix format.
18602   new_path="$path"
18603 
18604   windows_path="$new_path"
18605   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18606     unix_path=`$CYGPATH -u "$windows_path"`
18607     new_path="$unix_path"
18608   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18609     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18610     new_path="$unix_path"
18611   fi
18612 
18613 
18614   # Now try to locate executable using which
18615   new_path=`$WHICH "$new_path" 2> /dev/null`
18616 
18617   if test "x$new_path" = x; then
18618     # Oops. Which didn't find the executable.
18619     # The splitting of arguments from the executable at a space might have been incorrect,
18620     # since paths with space are more likely in Windows. Give it another try with the whole
18621     # argument.
18622     path="$complete"
18623     arguments="EOL"
18624     new_path="$path"
18625 
18626   windows_path="$new_path"
18627   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18628     unix_path=`$CYGPATH -u "$windows_path"`
18629     new_path="$unix_path"
18630   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18631     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18632     new_path="$unix_path"
18633   fi
18634 
18635 
18636     new_path=`$WHICH "$new_path" 2> /dev/null`
18637 
18638     if test "x$new_path" = x; then
18639       # It's still not found. Now this is an unrecoverable error.
18640       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18641 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18642       has_space=`$ECHO "$complete" | $GREP " "`
18643       if test "x$has_space" != x; then
18644         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18645 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18646       fi
18647       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18648     fi
18649   fi
18650 
18651   # Now new_path has a complete unix path to the binary
18652   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18653     # Keep paths in /bin as-is, but remove trailing .exe if any
18654     new_path="${new_path/%.exe/}"
18655     # Do not save /bin paths to all_fixpath_prefixes!
18656   else
18657     # Not in mixed or Windows style, start by that.
18658     new_path=`cmd //c echo $new_path`
18659 
18660   input_path="$new_path"
18661   # Check if we need to convert this using DOS-style short mode. If the path
18662   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18663   # take no chances and rewrite it.
18664   # Note: m4 eats our [], so we need to use [ and ] instead.
18665   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18666   if test "x$has_forbidden_chars" != x; then
18667     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18668     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18669   fi
18670 
18671     # Output is in $new_path
18672 
18673   windows_path="$new_path"
18674   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18675     unix_path=`$CYGPATH -u "$windows_path"`
18676     new_path="$unix_path"
18677   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18678     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18679     new_path="$unix_path"
18680   fi
18681 
18682     # remove trailing .exe if any
18683     new_path="${new_path/%.exe/}"
18684 
18685     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18686     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18687   fi
18688 
18689   else
18690     # We're on a posix platform. Hooray! :)
18691     # First separate the path from the arguments. This will split at the first
18692     # space.
18693     complete="$BUILD_CXX"
18694     path="${complete%% *}"
18695     tmp="$complete EOL"
18696     arguments="${tmp#* }"
18697 
18698     # Cannot rely on the command "which" here since it doesn't always work.
18699     is_absolute_path=`$ECHO "$path" | $GREP ^/`
18700     if test -z "$is_absolute_path"; then
18701       # Path to executable is not absolute. Find it.
18702       IFS_save="$IFS"
18703       IFS=:
18704       for p in $PATH; do
18705         if test -f "$p/$path" && test -x "$p/$path"; then
18706           new_path="$p/$path"
18707           break
18708         fi
18709       done
18710       IFS="$IFS_save"
18711     else
18712       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18713 $as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18714       new_path="$path"
18715     fi
18716 
18717     if test "x$new_path" = x; then
18718       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18719 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18720       has_space=`$ECHO "$complete" | $GREP " "`
18721       if test "x$has_space" != x; then
18722         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18723 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18724       fi
18725       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18726     fi
18727   fi
18728 
18729   # Now join together the path and the arguments once again
18730   if test "x$arguments" != xEOL; then
18731     new_complete="$new_path ${arguments% *}"
18732   else
18733     new_complete="$new_path"
18734   fi
18735 
18736   if test "x$complete" != "x$new_complete"; then
18737     BUILD_CXX="$new_complete"
18738     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18739 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18740   fi
18741 
18742     # Extract the first word of "ld", so it can be a program name with args.
18743 set dummy ld; ac_word=$2
18744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18745 $as_echo_n "checking for $ac_word... " >&6; }
18746 if ${ac_cv_path_BUILD_LD+:} false; then :
18747   $as_echo_n "(cached) " >&6
18748 else
18749   case $BUILD_LD in
18750   [\\/]* | ?:[\\/]*)
18751   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18752   ;;
18753   *)
18754   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18755 for as_dir in $PATH
18756 do
18757   IFS=$as_save_IFS
18758   test -z "$as_dir" && as_dir=.
18759     for ac_exec_ext in '' $ac_executable_extensions; do
18760   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18761     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18762     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18763     break 2
18764   fi
18765 done
18766   done
18767 IFS=$as_save_IFS
18768 
18769   ;;
18770 esac
18771 fi
18772 BUILD_LD=$ac_cv_path_BUILD_LD
18773 if test -n "$BUILD_LD"; then
18774   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18775 $as_echo "$BUILD_LD" >&6; }
18776 else
18777   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18778 $as_echo "no" >&6; }
18779 fi
18780 
18781 
18782 
18783   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18784 
18785   # First separate the path from the arguments. This will split at the first
18786   # space.
18787   complete="$BUILD_LD"
18788   path="${complete%% *}"
18789   tmp="$complete EOL"
18790   arguments="${tmp#* }"
18791 
18792   # Input might be given as Windows format, start by converting to
18793   # unix format.
18794   new_path=`$CYGPATH -u "$path"`
18795 
18796   # Now try to locate executable using which
18797   new_path=`$WHICH "$new_path" 2> /dev/null`
18798   # bat and cmd files are not always considered executable in cygwin causing which
18799   # to not find them
18800   if test "x$new_path" = x \
18801       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18802       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18803     new_path=`$CYGPATH -u "$path"`
18804   fi
18805   if test "x$new_path" = x; then
18806     # Oops. Which didn't find the executable.
18807     # The splitting of arguments from the executable at a space might have been incorrect,
18808     # since paths with space are more likely in Windows. Give it another try with the whole
18809     # argument.
18810     path="$complete"
18811     arguments="EOL"
18812     new_path=`$CYGPATH -u "$path"`
18813     new_path=`$WHICH "$new_path" 2> /dev/null`
18814     # bat and cmd files are not always considered executable in cygwin causing which
18815     # to not find them
18816     if test "x$new_path" = x \
18817         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18818         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18819       new_path=`$CYGPATH -u "$path"`
18820     fi
18821     if test "x$new_path" = x; then
18822       # It's still not found. Now this is an unrecoverable error.
18823       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18824 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18825       has_space=`$ECHO "$complete" | $GREP " "`
18826       if test "x$has_space" != x; then
18827         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18828 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18829       fi
18830       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18831     fi
18832   fi
18833 
18834   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18835   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18836   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18837   # "foo.exe" is OK but "foo" is an error.
18838   #
18839   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18840   # It is also a way to make sure we got the proper file name for the real test later on.
18841   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18842   if test "x$test_shortpath" = x; then
18843     # Short path failed, file does not exist as specified.
18844     # Try adding .exe or .cmd
18845     if test -f "${new_path}.exe"; then
18846       input_to_shortpath="${new_path}.exe"
18847     elif test -f "${new_path}.cmd"; then
18848       input_to_shortpath="${new_path}.cmd"
18849     else
18850       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18851 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18852       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18853 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18854       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18855     fi
18856   else
18857     input_to_shortpath="$new_path"
18858   fi
18859 
18860   # Call helper function which possibly converts this using DOS-style short mode.
18861   # If so, the updated path is stored in $new_path.
18862   new_path="$input_to_shortpath"
18863 
18864   input_path="$input_to_shortpath"
18865   # Check if we need to convert this using DOS-style short mode. If the path
18866   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18867   # take no chances and rewrite it.
18868   # Note: m4 eats our [], so we need to use [ and ] instead.
18869   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18870   if test "x$has_forbidden_chars" != x; then
18871     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18872     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18873     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18874     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18875       # Going to short mode and back again did indeed matter. Since short mode is
18876       # case insensitive, let's make it lowercase to improve readability.
18877       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18878       # Now convert it back to Unix-stile (cygpath)
18879       input_path=`$CYGPATH -u "$shortmode_path"`
18880       new_path="$input_path"
18881     fi
18882   fi
18883 
18884   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18885   if test "x$test_cygdrive_prefix" = x; then
18886     # As a simple fix, exclude /usr/bin since it's not a real path.
18887     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18888       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18889       # a path prefixed by /cygdrive for fixpath to work.
18890       new_path="$CYGWIN_ROOT_PATH$input_path"
18891     fi
18892   fi
18893 
18894   # remove trailing .exe if any
18895   new_path="${new_path/%.exe/}"
18896 
18897   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18898 
18899   # First separate the path from the arguments. This will split at the first
18900   # space.
18901   complete="$BUILD_LD"
18902   path="${complete%% *}"
18903   tmp="$complete EOL"
18904   arguments="${tmp#* }"
18905 
18906   # Input might be given as Windows format, start by converting to
18907   # unix format.
18908   new_path="$path"
18909 
18910   windows_path="$new_path"
18911   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18912     unix_path=`$CYGPATH -u "$windows_path"`
18913     new_path="$unix_path"
18914   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18915     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18916     new_path="$unix_path"
18917   fi
18918 
18919 
18920   # Now try to locate executable using which
18921   new_path=`$WHICH "$new_path" 2> /dev/null`
18922 
18923   if test "x$new_path" = x; then
18924     # Oops. Which didn't find the executable.
18925     # The splitting of arguments from the executable at a space might have been incorrect,
18926     # since paths with space are more likely in Windows. Give it another try with the whole
18927     # argument.
18928     path="$complete"
18929     arguments="EOL"
18930     new_path="$path"
18931 
18932   windows_path="$new_path"
18933   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18934     unix_path=`$CYGPATH -u "$windows_path"`
18935     new_path="$unix_path"
18936   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18937     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18938     new_path="$unix_path"
18939   fi
18940 
18941 
18942     new_path=`$WHICH "$new_path" 2> /dev/null`
18943 
18944     if test "x$new_path" = x; then
18945       # It's still not found. Now this is an unrecoverable error.
18946       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18947 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18948       has_space=`$ECHO "$complete" | $GREP " "`
18949       if test "x$has_space" != x; then
18950         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18951 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18952       fi
18953       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18954     fi
18955   fi
18956 
18957   # Now new_path has a complete unix path to the binary
18958   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18959     # Keep paths in /bin as-is, but remove trailing .exe if any
18960     new_path="${new_path/%.exe/}"
18961     # Do not save /bin paths to all_fixpath_prefixes!
18962   else
18963     # Not in mixed or Windows style, start by that.
18964     new_path=`cmd //c echo $new_path`
18965 
18966   input_path="$new_path"
18967   # Check if we need to convert this using DOS-style short mode. If the path
18968   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18969   # take no chances and rewrite it.
18970   # Note: m4 eats our [], so we need to use [ and ] instead.
18971   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18972   if test "x$has_forbidden_chars" != x; then
18973     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18974     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18975   fi
18976 
18977     # Output is in $new_path
18978 
18979   windows_path="$new_path"
18980   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18981     unix_path=`$CYGPATH -u "$windows_path"`
18982     new_path="$unix_path"
18983   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18984     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18985     new_path="$unix_path"
18986   fi
18987 
18988     # remove trailing .exe if any
18989     new_path="${new_path/%.exe/}"
18990 
18991     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18992     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18993   fi
18994 
18995   else
18996     # We're on a posix platform. Hooray! :)
18997     # First separate the path from the arguments. This will split at the first
18998     # space.
18999     complete="$BUILD_LD"
19000     path="${complete%% *}"
19001     tmp="$complete EOL"
19002     arguments="${tmp#* }"
19003 
19004     # Cannot rely on the command "which" here since it doesn't always work.
19005     is_absolute_path=`$ECHO "$path" | $GREP ^/`
19006     if test -z "$is_absolute_path"; then
19007       # Path to executable is not absolute. Find it.
19008       IFS_save="$IFS"
19009       IFS=:
19010       for p in $PATH; do
19011         if test -f "$p/$path" && test -x "$p/$path"; then
19012           new_path="$p/$path"
19013           break
19014         fi
19015       done
19016       IFS="$IFS_save"
19017     else
19018       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
19019 $as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
19020       new_path="$path"
19021     fi
19022 
19023     if test "x$new_path" = x; then
19024       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
19025 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
19026       has_space=`$ECHO "$complete" | $GREP " "`
19027       if test "x$has_space" != x; then
19028         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19029 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19030       fi
19031       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
19032     fi
19033   fi
19034 
19035   # Now join together the path and the arguments once again
19036   if test "x$arguments" != xEOL; then
19037     new_complete="$new_path ${arguments% *}"
19038   else
19039     new_complete="$new_path"
19040   fi
19041 
19042   if test "x$complete" != "x$new_complete"; then
19043     BUILD_LD="$new_complete"
19044     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
19045 $as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
19046   fi
19047 
19048   fi
19049 
19050 
19051 
19052 
19053   # If a devkit is found on the builddeps server, then prepend its path to the
19054   # PATH variable. If there are cross compilers available in the devkit, these
19055   # will be found by AC_PROG_CC et al.
19056   DEVKIT=
19057 
19058 
19059   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19060     # Source the builddeps file again, to make sure it uses the latest variables!
19061     . $builddepsfile
19062     # Look for a target and build machine specific resource!
19063     eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
19064     if test "x$resource" = x; then
19065       # Ok, lets instead look for a target specific resource
19066       eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
19067     fi
19068     if test "x$resource" = x; then
19069       # Ok, lets instead look for a build specific resource
19070       eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
19071     fi
19072     if test "x$resource" = x; then
19073       # Ok, lets instead look for a generic resource
19074       # (The devkit comes from M4 and not the shell, thus no need for eval here.)
19075       resource=${builddep_devkit}
19076     fi
19077     if test "x$resource" != x; then
19078       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
19079 $as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
19080       # If the resource in the builddeps.conf file is an existing directory,
19081       # for example /java/linux/cups
19082       if test -d ${resource}; then
19083         depdir=${resource}
19084       else
19085 
19086   # devkit is for example mymodule
19087   # $resource is for example libs/general/libmymod_1_2_3.zip
19088   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
19089   # $with_builddeps_dir is for example /localhome/builddeps
19090   # depdir is the name of the variable into which we store the depdir, eg MYMOD
19091   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
19092   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
19093   filename=`basename $resource`
19094   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
19095   filebase=${filename%%.*}
19096   extension=${filename#*.}
19097   installdir=$with_builddeps_dir/$filebase
19098   if test ! -f $installdir/$filename.unpacked; then
19099     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
19100 $as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
19101     if test ! -d $installdir; then
19102       mkdir -p $installdir
19103     fi
19104     if test ! -d $installdir; then
19105       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
19106     fi
19107     tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
19108     touch $tmpfile
19109     if test ! -f $tmpfile; then
19110       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
19111     fi
19112 
19113   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
19114   # $tmpfile is the local file name for the downloaded file.
19115   VALID_TOOL=no
19116   if test "x$BDEPS_FTP" = xwget; then
19117     VALID_TOOL=yes
19118     wget -O $tmpfile $with_builddeps_server/$resource
19119   fi
19120   if test "x$BDEPS_FTP" = xlftp; then
19121     VALID_TOOL=yes
19122     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
19123   fi
19124   if test "x$BDEPS_FTP" = xftp; then
19125     VALID_TOOL=yes
19126     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
19127     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
19128     FTPUSERPWD=${FTPSERVER%%@*}
19129     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
19130       FTPUSER=${userpwd%%:*}
19131       FTPPWD=${userpwd#*@}
19132       FTPSERVER=${FTPSERVER#*@}
19133     else
19134       FTPUSER=ftp
19135       FTPPWD=ftp
19136     fi
19137     # the "pass" command does not work on some
19138     # ftp clients (read ftp.exe) but if it works,
19139     # passive mode is better!
19140     ( \
19141         echo "user $FTPUSER $FTPPWD"        ; \
19142         echo "pass"                         ; \
19143         echo "bin"                          ; \
19144         echo "get $FTPPATH $tmpfile"              ; \
19145     ) | ftp -in $FTPSERVER
19146   fi
19147   if test "x$VALID_TOOL" != xyes; then
19148     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
19149   fi
19150 
19151     mv $tmpfile $installdir/$filename
19152     if test ! -s $installdir/$filename; then
19153       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
19154     fi
19155     case "$extension" in
19156       zip)  echo "Unzipping $installdir/$filename..."
19157         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
19158         ;;
19159       tar.gz) echo "Untaring $installdir/$filename..."
19160         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19161         ;;
19162       tgz) echo "Untaring $installdir/$filename..."
19163         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19164         ;;
19165       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
19166         ;;
19167     esac
19168   fi
19169   if test -f $installdir/$filename.unpacked; then
19170     depdir=$installdir
19171   fi
19172 
19173       fi
19174       # Source the builddeps file again, because in the previous command, the depdir
19175       # was updated to point at the current build dependency install directory.
19176       . $builddepsfile
19177       # Now extract variables from the builddeps.conf files.
19178       theroot=${builddep_devkit_ROOT}
19179       thecflags=${builddep_devkit_CFLAGS}
19180       thelibs=${builddep_devkit_LIBS}
19181       if test "x$depdir" = x; then
19182         as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
19183       fi
19184       DEVKIT=$depdir
19185       if test "x$theroot" != x; then
19186         DEVKIT="$theroot"
19187       fi
19188       if test "x$thecflags" != x; then
19189         DEVKIT_CFLAGS="$thecflags"
19190       fi
19191       if test "x$thelibs" != x; then
19192         DEVKIT_LIBS="$thelibs"
19193       fi
19194 
19195         # Found devkit
19196         PATH="$DEVKIT/bin:$PATH"
19197         SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
19198         if test "x$x_includes" = "xNONE"; then
19199           x_includes="$SYS_ROOT/usr/include/X11"
19200         fi
19201         if test "x$x_libraries" = "xNONE"; then
19202           x_libraries="$SYS_ROOT/usr/lib"
19203         fi
19204 
19205 
19206     fi
19207 
19208   fi
19209 
19210 
19211   # Store the CFLAGS etal passed to the configure script.
19212   ORG_CFLAGS="$CFLAGS"
19213   ORG_CXXFLAGS="$CXXFLAGS"
19214   ORG_OBJCFLAGS="$OBJCFLAGS"
19215 
19216   # autoconf magic only relies on PATH, so update it if tools dir is specified
19217   OLD_PATH="$PATH"
19218   if test "x$TOOLS_DIR" != x; then
19219     PATH=$TOOLS_DIR:$PATH
19220   fi
19221 
19222   # Before we locate the compilers, we need to sanitize the Xcode build environment
19223   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
19224     # determine path to Xcode developer directory
19225     # can be empty in which case all the tools will rely on a sane Xcode 4 installation
19226     SET_DEVELOPER_DIR=
19227 
19228     if test -n "$XCODE_PATH"; then
19229       DEVELOPER_DIR="$XCODE_PATH"/Contents/Developer
19230     fi
19231 
19232     # DEVELOPER_DIR could also be provided directly
19233     { $as_echo "$as_me:${as_lineno-$LINENO}: checking Determining if we need to set DEVELOPER_DIR" >&5
19234 $as_echo_n "checking Determining if we need to set DEVELOPER_DIR... " >&6; }
19235     if test -n "$DEVELOPER_DIR"; then
19236       if test ! -d "$DEVELOPER_DIR"; then
19237         as_fn_error $? "Xcode Developer path does not exist: $DEVELOPER_DIR, please provide a path to the Xcode 4 application bundle using --with-xcode-path" "$LINENO" 5
19238       fi
19239       if test ! -f "$DEVELOPER_DIR"/usr/bin/xcodebuild; then
19240         as_fn_error $? "Xcode Developer path is not valid: $DEVELOPER_DIR, it must point to Contents/Developer inside an Xcode application bundle" "$LINENO" 5
19241       fi
19242       # make it visible to all the tools immediately
19243       export DEVELOPER_DIR
19244       SET_DEVELOPER_DIR="export DEVELOPER_DIR := $DEVELOPER_DIR"
19245       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($DEVELOPER_DIR)" >&5
19246 $as_echo "yes ($DEVELOPER_DIR)" >&6; }
19247     else
19248       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19249 $as_echo "no" >&6; }
19250     fi
19251 
19252 
19253     # Extract the first word of "xcodebuild", so it can be a program name with args.
19254 set dummy xcodebuild; ac_word=$2
19255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19256 $as_echo_n "checking for $ac_word... " >&6; }
19257 if ${ac_cv_path_XCODEBUILD+:} false; then :
19258   $as_echo_n "(cached) " >&6
19259 else
19260   case $XCODEBUILD in
19261   [\\/]* | ?:[\\/]*)
19262   ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
19263   ;;
19264   *)
19265   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19266 for as_dir in $PATH
19267 do
19268   IFS=$as_save_IFS
19269   test -z "$as_dir" && as_dir=.
19270     for ac_exec_ext in '' $ac_executable_extensions; do
19271   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19272     ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
19273     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19274     break 2
19275   fi
19276 done
19277   done
19278 IFS=$as_save_IFS
19279 
19280   ;;
19281 esac
19282 fi
19283 XCODEBUILD=$ac_cv_path_XCODEBUILD
19284 if test -n "$XCODEBUILD"; then
19285   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
19286 $as_echo "$XCODEBUILD" >&6; }
19287 else
19288   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19289 $as_echo "no" >&6; }
19290 fi
19291 
19292 
19293     if test -z "$XCODEBUILD"; then
19294       as_fn_error $? "The xcodebuild tool was not found, the Xcode command line tools are required to build on Mac OS X" "$LINENO" 5
19295     fi
19296 
19297     # Fail-fast: verify we're building on Xcode 4, we cannot build with Xcode 5 or later
19298     XCODE_VERSION=`$XCODEBUILD -version | grep '^Xcode ' | sed 's/Xcode //'`
19299     XC_VERSION_PARTS=( ${XCODE_VERSION//./ } )
19300     if test ! "${XC_VERSION_PARTS[0]}" = "4"; then
19301       as_fn_error $? "Xcode 4 is required to build JDK 8, the version found was $XCODE_VERSION. Use --with-xcode-path to specify the location of Xcode 4 or make Xcode 4 active by using xcode-select." "$LINENO" 5
19302     fi
19303 
19304     # Some versions of Xcode 5 command line tools install gcc and g++ as symlinks to
19305     # clang and clang++, which will break the build. So handle that here if we need to.
19306     if test -L "/usr/bin/gcc" -o -L "/usr/bin/g++"; then
19307       # use xcrun to find the real gcc and add it's directory to PATH
19308       # then autoconf magic will find it
19309       { $as_echo "$as_me:${as_lineno-$LINENO}: Found gcc symlinks to clang in /usr/bin, adding path to real gcc to PATH" >&5
19310 $as_echo "$as_me: Found gcc symlinks to clang in /usr/bin, adding path to real gcc to PATH" >&6;}
19311       XCODE_BIN_PATH=$(dirname `xcrun -find gcc`)
19312       PATH="$XCODE_BIN_PATH":$PATH
19313     fi
19314 
19315     # Determine appropriate SDKPATH, don't use SDKROOT as it interferes with the stub tools
19316     { $as_echo "$as_me:${as_lineno-$LINENO}: checking Determining Xcode SDK path" >&5
19317 $as_echo_n "checking Determining Xcode SDK path... " >&6; }
19318     # allow SDKNAME to be set to override the default SDK selection
19319     SDKPATH=`"$XCODEBUILD" -sdk ${SDKNAME:-macosx} -version | grep '^Path: ' | sed 's/Path: //'`
19320     if test -n "$SDKPATH"; then
19321       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKPATH" >&5
19322 $as_echo "$SDKPATH" >&6; }
19323     else
19324       { $as_echo "$as_me:${as_lineno-$LINENO}: result: (none, will use system headers and frameworks)" >&5
19325 $as_echo "(none, will use system headers and frameworks)" >&6; }
19326     fi
19327 
19328 
19329     # Perform a basic sanity test
19330     if test ! -f "$SDKPATH/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
19331       as_fn_error $? "Unable to find required framework headers, provide a valid path to Xcode 4 using --with-xcode-path" "$LINENO" 5
19332     fi
19333 
19334     # if SDKPATH is non-empty then we need to add -isysroot and -iframework for gcc and g++
19335     if test -n "$SDKPATH"; then
19336       # We need -isysroot <path> and -iframework<path>/System/Library/Frameworks
19337       CFLAGS_JDK="${CFLAGS_JDK} -isysroot \"$SDKPATH\" -iframework\"$SDKPATH/System/Library/Frameworks\""
19338       CXXFLAGS_JDK="${CXXFLAGS_JDK} -isysroot \"$SDKPATH\" -iframework\"$SDKPATH/System/Library/Frameworks\""
19339       LDFLAGS_JDK="${LDFLAGS_JDK} -isysroot \"$SDKPATH\" -iframework\"$SDKPATH/System/Library/Frameworks\""
19340     fi
19341 
19342     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
19343     # setting this here means it doesn't have to be peppered throughout the forest
19344     CFLAGS_JDK="$CFLAGS_JDK -F\"$SDKPATH/System/Library/Frameworks/JavaVM.framework/Frameworks\""
19345     CXXFLAGS_JDK="$CXXFLAGS_JDK -F\"$SDKPATH/System/Library/Frameworks/JavaVM.framework/Frameworks\""
19346     LDFLAGS_JDK="$LDFLAGS_JDK -F\"$SDKPATH/System/Library/Frameworks/JavaVM.framework/Frameworks\""
19347   fi
19348 
19349   ### Locate C compiler (CC)
19350 
19351   # On windows, only cl.exe is supported.
19352   # On Solaris, cc is preferred to gcc.
19353   # Elsewhere, gcc is preferred to cc.
19354 
19355   if test "x$CC" != x; then
19356     COMPILER_CHECK_LIST="$CC"
19357   elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
19358     COMPILER_CHECK_LIST="cl"
19359   elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
19360     COMPILER_CHECK_LIST="cc gcc"
19361   elif test "x$OPENJDK_TARGET_OS" = "xaix"; then
19362     # Do not probe for cc on AIX.
19363     COMPILER_CHECK_LIST="xlc_r"
19364   else
19365     COMPILER_CHECK_LIST="gcc cc"
19366   fi
19367 
19368 
19369   COMPILER_NAME=C
19370 
19371   CC=
19372   # If TOOLS_DIR is set, check for all compiler names in there first
19373   # before checking the rest of the PATH.
19374   if test -n "$TOOLS_DIR"; then
19375     PATH_save="$PATH"
19376     PATH="$TOOLS_DIR"
19377     for ac_prog in $COMPILER_CHECK_LIST
19378 do
19379   # Extract the first word of "$ac_prog", so it can be a program name with args.
19380 set dummy $ac_prog; ac_word=$2
19381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19382 $as_echo_n "checking for $ac_word... " >&6; }
19383 if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
19384   $as_echo_n "(cached) " >&6
19385 else
19386   case $TOOLS_DIR_CC in
19387   [\\/]* | ?:[\\/]*)
19388   ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
19389   ;;
19390   *)
19391   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19392 for as_dir in $PATH
19393 do
19394   IFS=$as_save_IFS
19395   test -z "$as_dir" && as_dir=.
19396     for ac_exec_ext in '' $ac_executable_extensions; do
19397   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19398     ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
19399     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19400     break 2
19401   fi
19402 done
19403   done
19404 IFS=$as_save_IFS
19405 
19406   ;;
19407 esac
19408 fi
19409 TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
19410 if test -n "$TOOLS_DIR_CC"; then
19411   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
19412 $as_echo "$TOOLS_DIR_CC" >&6; }
19413 else
19414   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19415 $as_echo "no" >&6; }
19416 fi
19417 
19418 
19419   test -n "$TOOLS_DIR_CC" && break
19420 done
19421 
19422     CC=$TOOLS_DIR_CC
19423     PATH="$PATH_save"
19424   fi
19425 
19426   # AC_PATH_PROGS can't be run multiple times with the same variable,
19427   # so create a new name for this run.
19428   if test "x$CC" = x; then
19429     for ac_prog in $COMPILER_CHECK_LIST
19430 do
19431   # Extract the first word of "$ac_prog", so it can be a program name with args.
19432 set dummy $ac_prog; ac_word=$2
19433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19434 $as_echo_n "checking for $ac_word... " >&6; }
19435 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
19436   $as_echo_n "(cached) " >&6
19437 else
19438   case $POTENTIAL_CC in
19439   [\\/]* | ?:[\\/]*)
19440   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
19441   ;;
19442   *)
19443   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19444 for as_dir in $PATH
19445 do
19446   IFS=$as_save_IFS
19447   test -z "$as_dir" && as_dir=.
19448     for ac_exec_ext in '' $ac_executable_extensions; do
19449   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19450     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
19451     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19452     break 2
19453   fi
19454 done
19455   done
19456 IFS=$as_save_IFS
19457 
19458   ;;
19459 esac
19460 fi
19461 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
19462 if test -n "$POTENTIAL_CC"; then
19463   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
19464 $as_echo "$POTENTIAL_CC" >&6; }
19465 else
19466   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19467 $as_echo "no" >&6; }
19468 fi
19469 
19470 
19471   test -n "$POTENTIAL_CC" && break
19472 done
19473 
19474     CC=$POTENTIAL_CC
19475   fi
19476 
19477   if test "x$CC" = x; then
19478 
19479   # Print a helpful message on how to acquire the necessary build dependency.
19480   # devkit is the help tag: freetype, cups, pulse, alsa etc
19481   MISSING_DEPENDENCY=devkit
19482 
19483   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19484     cygwin_help $MISSING_DEPENDENCY
19485   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19486     msys_help $MISSING_DEPENDENCY
19487   else
19488     PKGHANDLER_COMMAND=
19489 
19490     case $PKGHANDLER in
19491       apt-get)
19492         apt_help     $MISSING_DEPENDENCY ;;
19493       yum)
19494         yum_help     $MISSING_DEPENDENCY ;;
19495       port)
19496         port_help    $MISSING_DEPENDENCY ;;
19497       pkgutil)
19498         pkgutil_help $MISSING_DEPENDENCY ;;
19499       pkgadd)
19500         pkgadd_help  $MISSING_DEPENDENCY ;;
19501     esac
19502 
19503     if test "x$PKGHANDLER_COMMAND" != x; then
19504       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19505     fi
19506   fi
19507 
19508     as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19509   fi
19510 
19511   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19512 
19513   # First separate the path from the arguments. This will split at the first
19514   # space.
19515   complete="$CC"
19516   path="${complete%% *}"
19517   tmp="$complete EOL"
19518   arguments="${tmp#* }"
19519 
19520   # Input might be given as Windows format, start by converting to
19521   # unix format.
19522   new_path=`$CYGPATH -u "$path"`
19523 
19524   # Now try to locate executable using which
19525   new_path=`$WHICH "$new_path" 2> /dev/null`
19526   # bat and cmd files are not always considered executable in cygwin causing which
19527   # to not find them
19528   if test "x$new_path" = x \
19529       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19530       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19531     new_path=`$CYGPATH -u "$path"`
19532   fi
19533   if test "x$new_path" = x; then
19534     # Oops. Which didn't find the executable.
19535     # The splitting of arguments from the executable at a space might have been incorrect,
19536     # since paths with space are more likely in Windows. Give it another try with the whole
19537     # argument.
19538     path="$complete"
19539     arguments="EOL"
19540     new_path=`$CYGPATH -u "$path"`
19541     new_path=`$WHICH "$new_path" 2> /dev/null`
19542     # bat and cmd files are not always considered executable in cygwin causing which
19543     # to not find them
19544     if test "x$new_path" = x \
19545         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19546         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19547       new_path=`$CYGPATH -u "$path"`
19548     fi
19549     if test "x$new_path" = x; then
19550       # It's still not found. Now this is an unrecoverable error.
19551       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19552 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19553       has_space=`$ECHO "$complete" | $GREP " "`
19554       if test "x$has_space" != x; then
19555         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19556 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19557       fi
19558       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19559     fi
19560   fi
19561 
19562   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19563   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19564   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19565   # "foo.exe" is OK but "foo" is an error.
19566   #
19567   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19568   # It is also a way to make sure we got the proper file name for the real test later on.
19569   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19570   if test "x$test_shortpath" = x; then
19571     # Short path failed, file does not exist as specified.
19572     # Try adding .exe or .cmd
19573     if test -f "${new_path}.exe"; then
19574       input_to_shortpath="${new_path}.exe"
19575     elif test -f "${new_path}.cmd"; then
19576       input_to_shortpath="${new_path}.cmd"
19577     else
19578       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
19579 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
19580       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19581 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19582       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19583     fi
19584   else
19585     input_to_shortpath="$new_path"
19586   fi
19587 
19588   # Call helper function which possibly converts this using DOS-style short mode.
19589   # If so, the updated path is stored in $new_path.
19590   new_path="$input_to_shortpath"
19591 
19592   input_path="$input_to_shortpath"
19593   # Check if we need to convert this using DOS-style short mode. If the path
19594   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19595   # take no chances and rewrite it.
19596   # Note: m4 eats our [], so we need to use [ and ] instead.
19597   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19598   if test "x$has_forbidden_chars" != x; then
19599     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19600     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19601     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19602     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19603       # Going to short mode and back again did indeed matter. Since short mode is
19604       # case insensitive, let's make it lowercase to improve readability.
19605       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19606       # Now convert it back to Unix-stile (cygpath)
19607       input_path=`$CYGPATH -u "$shortmode_path"`
19608       new_path="$input_path"
19609     fi
19610   fi
19611 
19612   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19613   if test "x$test_cygdrive_prefix" = x; then
19614     # As a simple fix, exclude /usr/bin since it's not a real path.
19615     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19616       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19617       # a path prefixed by /cygdrive for fixpath to work.
19618       new_path="$CYGWIN_ROOT_PATH$input_path"
19619     fi
19620   fi
19621 
19622   # remove trailing .exe if any
19623   new_path="${new_path/%.exe/}"
19624 
19625   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19626 
19627   # First separate the path from the arguments. This will split at the first
19628   # space.
19629   complete="$CC"
19630   path="${complete%% *}"
19631   tmp="$complete EOL"
19632   arguments="${tmp#* }"
19633 
19634   # Input might be given as Windows format, start by converting to
19635   # unix format.
19636   new_path="$path"
19637 
19638   windows_path="$new_path"
19639   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19640     unix_path=`$CYGPATH -u "$windows_path"`
19641     new_path="$unix_path"
19642   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19643     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19644     new_path="$unix_path"
19645   fi
19646 
19647 
19648   # Now try to locate executable using which
19649   new_path=`$WHICH "$new_path" 2> /dev/null`
19650 
19651   if test "x$new_path" = x; then
19652     # Oops. Which didn't find the executable.
19653     # The splitting of arguments from the executable at a space might have been incorrect,
19654     # since paths with space are more likely in Windows. Give it another try with the whole
19655     # argument.
19656     path="$complete"
19657     arguments="EOL"
19658     new_path="$path"
19659 
19660   windows_path="$new_path"
19661   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19662     unix_path=`$CYGPATH -u "$windows_path"`
19663     new_path="$unix_path"
19664   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19665     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19666     new_path="$unix_path"
19667   fi
19668 
19669 
19670     new_path=`$WHICH "$new_path" 2> /dev/null`
19671 
19672     if test "x$new_path" = x; then
19673       # It's still not found. Now this is an unrecoverable error.
19674       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19675 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19676       has_space=`$ECHO "$complete" | $GREP " "`
19677       if test "x$has_space" != x; then
19678         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19679 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19680       fi
19681       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19682     fi
19683   fi
19684 
19685   # Now new_path has a complete unix path to the binary
19686   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19687     # Keep paths in /bin as-is, but remove trailing .exe if any
19688     new_path="${new_path/%.exe/}"
19689     # Do not save /bin paths to all_fixpath_prefixes!
19690   else
19691     # Not in mixed or Windows style, start by that.
19692     new_path=`cmd //c echo $new_path`
19693 
19694   input_path="$new_path"
19695   # Check if we need to convert this using DOS-style short mode. If the path
19696   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19697   # take no chances and rewrite it.
19698   # Note: m4 eats our [], so we need to use [ and ] instead.
19699   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19700   if test "x$has_forbidden_chars" != x; then
19701     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19702     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19703   fi
19704 
19705     # Output is in $new_path
19706 
19707   windows_path="$new_path"
19708   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19709     unix_path=`$CYGPATH -u "$windows_path"`
19710     new_path="$unix_path"
19711   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19712     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19713     new_path="$unix_path"
19714   fi
19715 
19716     # remove trailing .exe if any
19717     new_path="${new_path/%.exe/}"
19718 
19719     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19720     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19721   fi
19722 
19723   else
19724     # We're on a posix platform. Hooray! :)
19725     # First separate the path from the arguments. This will split at the first
19726     # space.
19727     complete="$CC"
19728     path="${complete%% *}"
19729     tmp="$complete EOL"
19730     arguments="${tmp#* }"
19731 
19732     # Cannot rely on the command "which" here since it doesn't always work.
19733     is_absolute_path=`$ECHO "$path" | $GREP ^/`
19734     if test -z "$is_absolute_path"; then
19735       # Path to executable is not absolute. Find it.
19736       IFS_save="$IFS"
19737       IFS=:
19738       for p in $PATH; do
19739         if test -f "$p/$path" && test -x "$p/$path"; then
19740           new_path="$p/$path"
19741           break
19742         fi
19743       done
19744       IFS="$IFS_save"
19745     else
19746       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
19747 $as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
19748       new_path="$path"
19749     fi
19750 
19751     if test "x$new_path" = x; then
19752       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19753 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19754       has_space=`$ECHO "$complete" | $GREP " "`
19755       if test "x$has_space" != x; then
19756         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19757 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19758       fi
19759       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19760     fi
19761   fi
19762 
19763   # Now join together the path and the arguments once again
19764   if test "x$arguments" != xEOL; then
19765     new_complete="$new_path ${arguments% *}"
19766   else
19767     new_complete="$new_path"
19768   fi
19769 
19770   if test "x$complete" != "x$new_complete"; then
19771     CC="$new_complete"
19772     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19773 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19774   fi
19775 
19776   TEST_COMPILER="$CC"
19777   # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
19778   # to 'xlc' but it is crucial that we invoke the compiler with the right name!
19779   if test "x$OPENJDK_BUILD_OS" != xaix; then
19780     { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19781 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
19782 
19783   if test "x$OPENJDK_BUILD_OS" != xwindows; then
19784     # Follow a chain of symbolic links. Use readlink
19785     # where it exists, else fall back to horribly
19786     # complicated shell code.
19787     if test "x$READLINK_TESTED" != yes; then
19788       # On MacOSX there is a readlink tool with a different
19789       # purpose than the GNU readlink tool. Check the found readlink.
19790       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19791       if test "x$ISGNU" = x; then
19792         # A readlink that we do not know how to use.
19793         # Are there other non-GNU readlinks out there?
19794         READLINK_TESTED=yes
19795         READLINK=
19796       fi
19797     fi
19798 
19799     if test "x$READLINK" != x; then
19800       TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19801     else
19802       # Save the current directory for restoring afterwards
19803       STARTDIR=$PWD
19804       COUNTER=0
19805       sym_link_dir=`$DIRNAME $TEST_COMPILER`
19806       sym_link_file=`$BASENAME $TEST_COMPILER`
19807       cd $sym_link_dir
19808       # Use -P flag to resolve symlinks in directories.
19809       cd `$THEPWDCMD -P`
19810       sym_link_dir=`$THEPWDCMD -P`
19811       # Resolve file symlinks
19812       while test $COUNTER -lt 20; do
19813         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19814         if test "x$ISLINK" == x; then
19815           # This is not a symbolic link! We are done!
19816           break
19817         fi
19818         # Again resolve directory symlinks since the target of the just found
19819         # link could be in a different directory
19820         cd `$DIRNAME $ISLINK`
19821         sym_link_dir=`$THEPWDCMD -P`
19822         sym_link_file=`$BASENAME $ISLINK`
19823         let COUNTER=COUNTER+1
19824       done
19825       cd $STARTDIR
19826       TEST_COMPILER=$sym_link_dir/$sym_link_file
19827     fi
19828   fi
19829 
19830     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19831 $as_echo "$TEST_COMPILER" >&6; }
19832   fi
19833   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19834 $as_echo_n "checking if CC is disguised ccache... " >&6; }
19835 
19836   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19837   if test "x$COMPILER_BASENAME" = "xccache"; then
19838     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19839 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19840     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19841     # We want to control ccache invocation ourselves, so ignore this cc and try
19842     # searching again.
19843 
19844     # Remove the path to the fake ccache cc from the PATH
19845     RETRY_COMPILER_SAVED_PATH="$PATH"
19846     COMPILER_DIRNAME=`$DIRNAME $CC`
19847     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19848 
19849     # Try again looking for our compiler
19850     if test -n "$ac_tool_prefix"; then
19851   for ac_prog in $COMPILER_CHECK_LIST
19852   do
19853     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19854 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19856 $as_echo_n "checking for $ac_word... " >&6; }
19857 if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
19858   $as_echo_n "(cached) " >&6
19859 else
19860   if test -n "$PROPER_COMPILER_CC"; then
19861   ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19862 else
19863 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19864 for as_dir in $PATH
19865 do
19866   IFS=$as_save_IFS
19867   test -z "$as_dir" && as_dir=.
19868     for ac_exec_ext in '' $ac_executable_extensions; do
19869   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19870     ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19871     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19872     break 2
19873   fi
19874 done
19875   done
19876 IFS=$as_save_IFS
19877 
19878 fi
19879 fi
19880 PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19881 if test -n "$PROPER_COMPILER_CC"; then
19882   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19883 $as_echo "$PROPER_COMPILER_CC" >&6; }
19884 else
19885   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19886 $as_echo "no" >&6; }
19887 fi
19888 
19889 
19890     test -n "$PROPER_COMPILER_CC" && break
19891   done
19892 fi
19893 if test -z "$PROPER_COMPILER_CC"; then
19894   ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19895   for ac_prog in $COMPILER_CHECK_LIST
19896 do
19897   # Extract the first word of "$ac_prog", so it can be a program name with args.
19898 set dummy $ac_prog; ac_word=$2
19899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19900 $as_echo_n "checking for $ac_word... " >&6; }
19901 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
19902   $as_echo_n "(cached) " >&6
19903 else
19904   if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19905   ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19906 else
19907 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19908 for as_dir in $PATH
19909 do
19910   IFS=$as_save_IFS
19911   test -z "$as_dir" && as_dir=.
19912     for ac_exec_ext in '' $ac_executable_extensions; do
19913   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19914     ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19915     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19916     break 2
19917   fi
19918 done
19919   done
19920 IFS=$as_save_IFS
19921 
19922 fi
19923 fi
19924 ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19925 if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19926   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19927 $as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19928 else
19929   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19930 $as_echo "no" >&6; }
19931 fi
19932 
19933 
19934   test -n "$ac_ct_PROPER_COMPILER_CC" && break
19935 done
19936 
19937   if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19938     PROPER_COMPILER_CC=""
19939   else
19940     case $cross_compiling:$ac_tool_warned in
19941 yes:)
19942 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19943 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19944 ac_tool_warned=yes ;;
19945 esac
19946     PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19947   fi
19948 fi
19949 
19950 
19951   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19952 
19953   # First separate the path from the arguments. This will split at the first
19954   # space.
19955   complete="$PROPER_COMPILER_CC"
19956   path="${complete%% *}"
19957   tmp="$complete EOL"
19958   arguments="${tmp#* }"
19959 
19960   # Input might be given as Windows format, start by converting to
19961   # unix format.
19962   new_path=`$CYGPATH -u "$path"`
19963 
19964   # Now try to locate executable using which
19965   new_path=`$WHICH "$new_path" 2> /dev/null`
19966   # bat and cmd files are not always considered executable in cygwin causing which
19967   # to not find them
19968   if test "x$new_path" = x \
19969       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19970       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19971     new_path=`$CYGPATH -u "$path"`
19972   fi
19973   if test "x$new_path" = x; then
19974     # Oops. Which didn't find the executable.
19975     # The splitting of arguments from the executable at a space might have been incorrect,
19976     # since paths with space are more likely in Windows. Give it another try with the whole
19977     # argument.
19978     path="$complete"
19979     arguments="EOL"
19980     new_path=`$CYGPATH -u "$path"`
19981     new_path=`$WHICH "$new_path" 2> /dev/null`
19982     # bat and cmd files are not always considered executable in cygwin causing which
19983     # to not find them
19984     if test "x$new_path" = x \
19985         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19986         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19987       new_path=`$CYGPATH -u "$path"`
19988     fi
19989     if test "x$new_path" = x; then
19990       # It's still not found. Now this is an unrecoverable error.
19991       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19992 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19993       has_space=`$ECHO "$complete" | $GREP " "`
19994       if test "x$has_space" != x; then
19995         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19996 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19997       fi
19998       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19999     fi
20000   fi
20001 
20002   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20003   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20004   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20005   # "foo.exe" is OK but "foo" is an error.
20006   #
20007   # This test is therefore slightly more accurate than "test -f" to check for file presence.
20008   # It is also a way to make sure we got the proper file name for the real test later on.
20009   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20010   if test "x$test_shortpath" = x; then
20011     # Short path failed, file does not exist as specified.
20012     # Try adding .exe or .cmd
20013     if test -f "${new_path}.exe"; then
20014       input_to_shortpath="${new_path}.exe"
20015     elif test -f "${new_path}.cmd"; then
20016       input_to_shortpath="${new_path}.cmd"
20017     else
20018       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
20019 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
20020       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20021 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20022       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
20023     fi
20024   else
20025     input_to_shortpath="$new_path"
20026   fi
20027 
20028   # Call helper function which possibly converts this using DOS-style short mode.
20029   # If so, the updated path is stored in $new_path.
20030   new_path="$input_to_shortpath"
20031 
20032   input_path="$input_to_shortpath"
20033   # Check if we need to convert this using DOS-style short mode. If the path
20034   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20035   # take no chances and rewrite it.
20036   # Note: m4 eats our [], so we need to use [ and ] instead.
20037   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20038   if test "x$has_forbidden_chars" != x; then
20039     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20040     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20041     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20042     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20043       # Going to short mode and back again did indeed matter. Since short mode is
20044       # case insensitive, let's make it lowercase to improve readability.
20045       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20046       # Now convert it back to Unix-stile (cygpath)
20047       input_path=`$CYGPATH -u "$shortmode_path"`
20048       new_path="$input_path"
20049     fi
20050   fi
20051 
20052   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20053   if test "x$test_cygdrive_prefix" = x; then
20054     # As a simple fix, exclude /usr/bin since it's not a real path.
20055     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20056       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20057       # a path prefixed by /cygdrive for fixpath to work.
20058       new_path="$CYGWIN_ROOT_PATH$input_path"
20059     fi
20060   fi
20061 
20062   # remove trailing .exe if any
20063   new_path="${new_path/%.exe/}"
20064 
20065   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20066 
20067   # First separate the path from the arguments. This will split at the first
20068   # space.
20069   complete="$PROPER_COMPILER_CC"
20070   path="${complete%% *}"
20071   tmp="$complete EOL"
20072   arguments="${tmp#* }"
20073 
20074   # Input might be given as Windows format, start by converting to
20075   # unix format.
20076   new_path="$path"
20077 
20078   windows_path="$new_path"
20079   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20080     unix_path=`$CYGPATH -u "$windows_path"`
20081     new_path="$unix_path"
20082   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20083     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20084     new_path="$unix_path"
20085   fi
20086 
20087 
20088   # Now try to locate executable using which
20089   new_path=`$WHICH "$new_path" 2> /dev/null`
20090 
20091   if test "x$new_path" = x; then
20092     # Oops. Which didn't find the executable.
20093     # The splitting of arguments from the executable at a space might have been incorrect,
20094     # since paths with space are more likely in Windows. Give it another try with the whole
20095     # argument.
20096     path="$complete"
20097     arguments="EOL"
20098     new_path="$path"
20099 
20100   windows_path="$new_path"
20101   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20102     unix_path=`$CYGPATH -u "$windows_path"`
20103     new_path="$unix_path"
20104   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20105     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20106     new_path="$unix_path"
20107   fi
20108 
20109 
20110     new_path=`$WHICH "$new_path" 2> /dev/null`
20111 
20112     if test "x$new_path" = x; then
20113       # It's still not found. Now this is an unrecoverable error.
20114       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
20115 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
20116       has_space=`$ECHO "$complete" | $GREP " "`
20117       if test "x$has_space" != x; then
20118         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20119 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20120       fi
20121       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
20122     fi
20123   fi
20124 
20125   # Now new_path has a complete unix path to the binary
20126   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20127     # Keep paths in /bin as-is, but remove trailing .exe if any
20128     new_path="${new_path/%.exe/}"
20129     # Do not save /bin paths to all_fixpath_prefixes!
20130   else
20131     # Not in mixed or Windows style, start by that.
20132     new_path=`cmd //c echo $new_path`
20133 
20134   input_path="$new_path"
20135   # Check if we need to convert this using DOS-style short mode. If the path
20136   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20137   # take no chances and rewrite it.
20138   # Note: m4 eats our [], so we need to use [ and ] instead.
20139   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20140   if test "x$has_forbidden_chars" != x; then
20141     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20142     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20143   fi
20144 
20145     # Output is in $new_path
20146 
20147   windows_path="$new_path"
20148   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20149     unix_path=`$CYGPATH -u "$windows_path"`
20150     new_path="$unix_path"
20151   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20152     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20153     new_path="$unix_path"
20154   fi
20155 
20156     # remove trailing .exe if any
20157     new_path="${new_path/%.exe/}"
20158 
20159     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20160     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20161   fi
20162 
20163   else
20164     # We're on a posix platform. Hooray! :)
20165     # First separate the path from the arguments. This will split at the first
20166     # space.
20167     complete="$PROPER_COMPILER_CC"
20168     path="${complete%% *}"
20169     tmp="$complete EOL"
20170     arguments="${tmp#* }"
20171 
20172     # Cannot rely on the command "which" here since it doesn't always work.
20173     is_absolute_path=`$ECHO "$path" | $GREP ^/`
20174     if test -z "$is_absolute_path"; then
20175       # Path to executable is not absolute. Find it.
20176       IFS_save="$IFS"
20177       IFS=:
20178       for p in $PATH; do
20179         if test -f "$p/$path" && test -x "$p/$path"; then
20180           new_path="$p/$path"
20181           break
20182         fi
20183       done
20184       IFS="$IFS_save"
20185     else
20186       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
20187 $as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
20188       new_path="$path"
20189     fi
20190 
20191     if test "x$new_path" = x; then
20192       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
20193 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
20194       has_space=`$ECHO "$complete" | $GREP " "`
20195       if test "x$has_space" != x; then
20196         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20197 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20198       fi
20199       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
20200     fi
20201   fi
20202 
20203   # Now join together the path and the arguments once again
20204   if test "x$arguments" != xEOL; then
20205     new_complete="$new_path ${arguments% *}"
20206   else
20207     new_complete="$new_path"
20208   fi
20209 
20210   if test "x$complete" != "x$new_complete"; then
20211     PROPER_COMPILER_CC="$new_complete"
20212     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
20213 $as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
20214   fi
20215 
20216     PATH="$RETRY_COMPILER_SAVED_PATH"
20217 
20218     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
20219 $as_echo_n "checking for resolved symbolic links for CC... " >&6; }
20220 
20221   if test "x$OPENJDK_BUILD_OS" != xwindows; then
20222     # Follow a chain of symbolic links. Use readlink
20223     # where it exists, else fall back to horribly
20224     # complicated shell code.
20225     if test "x$READLINK_TESTED" != yes; then
20226       # On MacOSX there is a readlink tool with a different
20227       # purpose than the GNU readlink tool. Check the found readlink.
20228       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20229       if test "x$ISGNU" = x; then
20230         # A readlink that we do not know how to use.
20231         # Are there other non-GNU readlinks out there?
20232         READLINK_TESTED=yes
20233         READLINK=
20234       fi
20235     fi
20236 
20237     if test "x$READLINK" != x; then
20238       PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
20239     else
20240       # Save the current directory for restoring afterwards
20241       STARTDIR=$PWD
20242       COUNTER=0
20243       sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
20244       sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
20245       cd $sym_link_dir
20246       # Use -P flag to resolve symlinks in directories.
20247       cd `$THEPWDCMD -P`
20248       sym_link_dir=`$THEPWDCMD -P`
20249       # Resolve file symlinks
20250       while test $COUNTER -lt 20; do
20251         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20252         if test "x$ISLINK" == x; then
20253           # This is not a symbolic link! We are done!
20254           break
20255         fi
20256         # Again resolve directory symlinks since the target of the just found
20257         # link could be in a different directory
20258         cd `$DIRNAME $ISLINK`
20259         sym_link_dir=`$THEPWDCMD -P`
20260         sym_link_file=`$BASENAME $ISLINK`
20261         let COUNTER=COUNTER+1
20262       done
20263       cd $STARTDIR
20264       PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
20265     fi
20266   fi
20267 
20268     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
20269 $as_echo "$PROPER_COMPILER_CC" >&6; }
20270     CC="$PROPER_COMPILER_CC"
20271   else
20272     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
20273 $as_echo "no, keeping CC" >&6; }
20274     CC="$TEST_COMPILER"
20275   fi
20276 
20277   COMPILER=$CC
20278   COMPILER_NAME=$COMPILER_NAME
20279 
20280   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
20281     # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
20282     COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
20283     $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
20284     if test $? -ne 0; then
20285       GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20286 
20287       { $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
20288 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
20289       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
20290 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
20291       as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20292     else
20293       COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
20294       COMPILER_VENDOR="Sun Studio"
20295     fi
20296   elif test  "x$OPENJDK_TARGET_OS" = xaix; then
20297       COMPILER_VERSION_TEST=`$COMPILER -qversion  2>&1 | $TAIL -n 1`
20298       $ECHO $COMPILER_VERSION_TEST | $GREP "^Version: " > /dev/null
20299       if test $? -ne 0; then
20300         as_fn_error $? "Failed to detect the compiler version of $COMPILER ...." "$LINENO" 5
20301       else
20302         COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n 's/Version: \(0-90-9\.0-90-9*\).*/\1/p'`
20303         COMPILER_VENDOR='IBM'
20304       fi
20305   elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
20306     # First line typically looks something like:
20307     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
20308     COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
20309     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
20310     COMPILER_VENDOR="Microsoft CL.EXE"
20311     COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
20312     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
20313       if test "x$COMPILER_CPU_TEST" != "x80x86"; then
20314         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
20315       fi
20316     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
20317       if test "x$COMPILER_CPU_TEST" != "xx64"; then
20318         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
20319       fi
20320     fi
20321   else
20322     COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20323     # Check that this is likely to be GCC.
20324     $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
20325     if test $? -ne 0; then
20326       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
20327 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
20328       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
20329 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
20330       as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20331     fi
20332 
20333     # First line typically looks something like:
20334     # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20335     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20336     COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20337   fi
20338   # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20339   CC_VERSION="$COMPILER_VERSION"
20340   # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20341   CC_VENDOR="$COMPILER_VENDOR"
20342 
20343   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20344 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20345 
20346 
20347   # Now that we have resolved CC ourself, let autoconf have its go at it
20348   ac_ext=c
20349 ac_cpp='$CPP $CPPFLAGS'
20350 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20351 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20352 ac_compiler_gnu=$ac_cv_c_compiler_gnu
20353 if test -n "$ac_tool_prefix"; then
20354   for ac_prog in $CC
20355   do
20356     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20357 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20359 $as_echo_n "checking for $ac_word... " >&6; }
20360 if ${ac_cv_prog_CC+:} false; then :
20361   $as_echo_n "(cached) " >&6
20362 else
20363   if test -n "$CC"; then
20364   ac_cv_prog_CC="$CC" # Let the user override the test.
20365 else
20366 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20367 for as_dir in $PATH
20368 do
20369   IFS=$as_save_IFS
20370   test -z "$as_dir" && as_dir=.
20371     for ac_exec_ext in '' $ac_executable_extensions; do
20372   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20373     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
20374     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20375     break 2
20376   fi
20377 done
20378   done
20379 IFS=$as_save_IFS
20380 
20381 fi
20382 fi
20383 CC=$ac_cv_prog_CC
20384 if test -n "$CC"; then
20385   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
20386 $as_echo "$CC" >&6; }
20387 else
20388   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20389 $as_echo "no" >&6; }
20390 fi
20391 
20392 
20393     test -n "$CC" && break
20394   done
20395 fi
20396 if test -z "$CC"; then
20397   ac_ct_CC=$CC
20398   for ac_prog in $CC
20399 do
20400   # Extract the first word of "$ac_prog", so it can be a program name with args.
20401 set dummy $ac_prog; ac_word=$2
20402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20403 $as_echo_n "checking for $ac_word... " >&6; }
20404 if ${ac_cv_prog_ac_ct_CC+:} false; then :
20405   $as_echo_n "(cached) " >&6
20406 else
20407   if test -n "$ac_ct_CC"; then
20408   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
20409 else
20410 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20411 for as_dir in $PATH
20412 do
20413   IFS=$as_save_IFS
20414   test -z "$as_dir" && as_dir=.
20415     for ac_exec_ext in '' $ac_executable_extensions; do
20416   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20417     ac_cv_prog_ac_ct_CC="$ac_prog"
20418     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20419     break 2
20420   fi
20421 done
20422   done
20423 IFS=$as_save_IFS
20424 
20425 fi
20426 fi
20427 ac_ct_CC=$ac_cv_prog_ac_ct_CC
20428 if test -n "$ac_ct_CC"; then
20429   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
20430 $as_echo "$ac_ct_CC" >&6; }
20431 else
20432   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20433 $as_echo "no" >&6; }
20434 fi
20435 
20436 
20437   test -n "$ac_ct_CC" && break
20438 done
20439 
20440   if test "x$ac_ct_CC" = x; then
20441     CC=""
20442   else
20443     case $cross_compiling:$ac_tool_warned in
20444 yes:)
20445 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20446 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20447 ac_tool_warned=yes ;;
20448 esac
20449     CC=$ac_ct_CC
20450   fi
20451 fi
20452 
20453 
20454 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20455 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20456 as_fn_error $? "no acceptable C compiler found in \$PATH
20457 See \`config.log' for more details" "$LINENO" 5; }
20458 
20459 # Provide some information about the compiler.
20460 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
20461 set X $ac_compile
20462 ac_compiler=$2
20463 for ac_option in --version -v -V -qversion; do
20464   { { ac_try="$ac_compiler $ac_option >&5"
20465 case "(($ac_try" in
20466   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20467   *) ac_try_echo=$ac_try;;
20468 esac
20469 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20470 $as_echo "$ac_try_echo"; } >&5
20471   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20472   ac_status=$?
20473   if test -s conftest.err; then
20474     sed '10a\
20475 ... rest of stderr output deleted ...
20476          10q' conftest.err >conftest.er1
20477     cat conftest.er1 >&5
20478   fi
20479   rm -f conftest.er1 conftest.err
20480   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20481   test $ac_status = 0; }
20482 done
20483 
20484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20485 /* end confdefs.h.  */
20486 
20487 int
20488 main ()
20489 {
20490 
20491   ;
20492   return 0;
20493 }
20494 _ACEOF
20495 ac_clean_files_save=$ac_clean_files
20496 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
20497 # Try to create an executable without -o first, disregard a.out.
20498 # It will help us diagnose broken compilers, and finding out an intuition
20499 # of exeext.
20500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
20501 $as_echo_n "checking whether the C compiler works... " >&6; }
20502 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
20503 
20504 # The possible output files:
20505 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
20506 
20507 ac_rmfiles=
20508 for ac_file in $ac_files
20509 do
20510   case $ac_file in
20511     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20512     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
20513   esac
20514 done
20515 rm -f $ac_rmfiles
20516 
20517 if { { ac_try="$ac_link_default"
20518 case "(($ac_try" in
20519   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20520   *) ac_try_echo=$ac_try;;
20521 esac
20522 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20523 $as_echo "$ac_try_echo"; } >&5
20524   (eval "$ac_link_default") 2>&5
20525   ac_status=$?
20526   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20527   test $ac_status = 0; }; then :
20528   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
20529 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
20530 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
20531 # so that the user can short-circuit this test for compilers unknown to
20532 # Autoconf.
20533 for ac_file in $ac_files ''
20534 do
20535   test -f "$ac_file" || continue
20536   case $ac_file in
20537     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
20538         ;;
20539     [ab].out )
20540         # We found the default executable, but exeext='' is most
20541         # certainly right.
20542         break;;
20543     *.* )
20544         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
20545         then :; else
20546            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20547         fi
20548         # We set ac_cv_exeext here because the later test for it is not
20549         # safe: cross compilers may not add the suffix if given an `-o'
20550         # argument, so we may need to know it at that point already.
20551         # Even if this section looks crufty: it has the advantage of
20552         # actually working.
20553         break;;
20554     * )
20555         break;;
20556   esac
20557 done
20558 test "$ac_cv_exeext" = no && ac_cv_exeext=
20559 
20560 else
20561   ac_file=''
20562 fi
20563 if test -z "$ac_file"; then :
20564   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20565 $as_echo "no" >&6; }
20566 $as_echo "$as_me: failed program was:" >&5
20567 sed 's/^/| /' conftest.$ac_ext >&5
20568 
20569 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20570 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20571 as_fn_error 77 "C compiler cannot create executables
20572 See \`config.log' for more details" "$LINENO" 5; }
20573 else
20574   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20575 $as_echo "yes" >&6; }
20576 fi
20577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
20578 $as_echo_n "checking for C compiler default output file name... " >&6; }
20579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
20580 $as_echo "$ac_file" >&6; }
20581 ac_exeext=$ac_cv_exeext
20582 
20583 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
20584 ac_clean_files=$ac_clean_files_save
20585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
20586 $as_echo_n "checking for suffix of executables... " >&6; }
20587 if { { ac_try="$ac_link"
20588 case "(($ac_try" in
20589   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20590   *) ac_try_echo=$ac_try;;
20591 esac
20592 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20593 $as_echo "$ac_try_echo"; } >&5
20594   (eval "$ac_link") 2>&5
20595   ac_status=$?
20596   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20597   test $ac_status = 0; }; then :
20598   # If both `conftest.exe' and `conftest' are `present' (well, observable)
20599 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
20600 # work properly (i.e., refer to `conftest.exe'), while it won't with
20601 # `rm'.
20602 for ac_file in conftest.exe conftest conftest.*; do
20603   test -f "$ac_file" || continue
20604   case $ac_file in
20605     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20606     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20607           break;;
20608     * ) break;;
20609   esac
20610 done
20611 else
20612   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20613 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20614 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
20615 See \`config.log' for more details" "$LINENO" 5; }
20616 fi
20617 rm -f conftest conftest$ac_cv_exeext
20618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
20619 $as_echo "$ac_cv_exeext" >&6; }
20620 
20621 rm -f conftest.$ac_ext
20622 EXEEXT=$ac_cv_exeext
20623 ac_exeext=$EXEEXT
20624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20625 /* end confdefs.h.  */
20626 #include <stdio.h>
20627 int
20628 main ()
20629 {
20630 FILE *f = fopen ("conftest.out", "w");
20631  return ferror (f) || fclose (f) != 0;
20632 
20633   ;
20634   return 0;
20635 }
20636 _ACEOF
20637 ac_clean_files="$ac_clean_files conftest.out"
20638 # Check that the compiler produces executables we can run.  If not, either
20639 # the compiler is broken, or we cross compile.
20640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
20641 $as_echo_n "checking whether we are cross compiling... " >&6; }
20642 if test "$cross_compiling" != yes; then
20643   { { ac_try="$ac_link"
20644 case "(($ac_try" in
20645   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20646   *) ac_try_echo=$ac_try;;
20647 esac
20648 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20649 $as_echo "$ac_try_echo"; } >&5
20650   (eval "$ac_link") 2>&5
20651   ac_status=$?
20652   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20653   test $ac_status = 0; }
20654   if { ac_try='./conftest$ac_cv_exeext'
20655   { { case "(($ac_try" in
20656   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20657   *) ac_try_echo=$ac_try;;
20658 esac
20659 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20660 $as_echo "$ac_try_echo"; } >&5
20661   (eval "$ac_try") 2>&5
20662   ac_status=$?
20663   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20664   test $ac_status = 0; }; }; then
20665     cross_compiling=no
20666   else
20667     if test "$cross_compiling" = maybe; then
20668         cross_compiling=yes
20669     else
20670         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20671 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20672 as_fn_error $? "cannot run C compiled programs.
20673 If you meant to cross compile, use \`--host'.
20674 See \`config.log' for more details" "$LINENO" 5; }
20675     fi
20676   fi
20677 fi
20678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
20679 $as_echo "$cross_compiling" >&6; }
20680 
20681 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
20682 ac_clean_files=$ac_clean_files_save
20683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
20684 $as_echo_n "checking for suffix of object files... " >&6; }
20685 if ${ac_cv_objext+:} false; then :
20686   $as_echo_n "(cached) " >&6
20687 else
20688   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20689 /* end confdefs.h.  */
20690 
20691 int
20692 main ()
20693 {
20694 
20695   ;
20696   return 0;
20697 }
20698 _ACEOF
20699 rm -f conftest.o conftest.obj
20700 if { { ac_try="$ac_compile"
20701 case "(($ac_try" in
20702   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20703   *) ac_try_echo=$ac_try;;
20704 esac
20705 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20706 $as_echo "$ac_try_echo"; } >&5
20707   (eval "$ac_compile") 2>&5
20708   ac_status=$?
20709   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20710   test $ac_status = 0; }; then :
20711   for ac_file in conftest.o conftest.obj conftest.*; do
20712   test -f "$ac_file" || continue;
20713   case $ac_file in
20714     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
20715     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
20716        break;;
20717   esac
20718 done
20719 else
20720   $as_echo "$as_me: failed program was:" >&5
20721 sed 's/^/| /' conftest.$ac_ext >&5
20722 
20723 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20724 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20725 as_fn_error $? "cannot compute suffix of object files: cannot compile
20726 See \`config.log' for more details" "$LINENO" 5; }
20727 fi
20728 rm -f conftest.$ac_cv_objext conftest.$ac_ext
20729 fi
20730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
20731 $as_echo "$ac_cv_objext" >&6; }
20732 OBJEXT=$ac_cv_objext
20733 ac_objext=$OBJEXT
20734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
20735 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
20736 if ${ac_cv_c_compiler_gnu+:} false; then :
20737   $as_echo_n "(cached) " >&6
20738 else
20739   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20740 /* end confdefs.h.  */
20741 
20742 int
20743 main ()
20744 {
20745 #ifndef __GNUC__
20746        choke me
20747 #endif
20748 
20749   ;
20750   return 0;
20751 }
20752 _ACEOF
20753 if ac_fn_c_try_compile "$LINENO"; then :
20754   ac_compiler_gnu=yes
20755 else
20756   ac_compiler_gnu=no
20757 fi
20758 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20759 ac_cv_c_compiler_gnu=$ac_compiler_gnu
20760 
20761 fi
20762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20763 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
20764 if test $ac_compiler_gnu = yes; then
20765   GCC=yes
20766 else
20767   GCC=
20768 fi
20769 ac_test_CFLAGS=${CFLAGS+set}
20770 ac_save_CFLAGS=$CFLAGS
20771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20772 $as_echo_n "checking whether $CC accepts -g... " >&6; }
20773 if ${ac_cv_prog_cc_g+:} false; then :
20774   $as_echo_n "(cached) " >&6
20775 else
20776   ac_save_c_werror_flag=$ac_c_werror_flag
20777    ac_c_werror_flag=yes
20778    ac_cv_prog_cc_g=no
20779    CFLAGS="-g"
20780    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20781 /* end confdefs.h.  */
20782 
20783 int
20784 main ()
20785 {
20786 
20787   ;
20788   return 0;
20789 }
20790 _ACEOF
20791 if ac_fn_c_try_compile "$LINENO"; then :
20792   ac_cv_prog_cc_g=yes
20793 else
20794   CFLAGS=""
20795       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20796 /* end confdefs.h.  */
20797 
20798 int
20799 main ()
20800 {
20801 
20802   ;
20803   return 0;
20804 }
20805 _ACEOF
20806 if ac_fn_c_try_compile "$LINENO"; then :
20807 
20808 else
20809   ac_c_werror_flag=$ac_save_c_werror_flag
20810          CFLAGS="-g"
20811          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20812 /* end confdefs.h.  */
20813 
20814 int
20815 main ()
20816 {
20817 
20818   ;
20819   return 0;
20820 }
20821 _ACEOF
20822 if ac_fn_c_try_compile "$LINENO"; then :
20823   ac_cv_prog_cc_g=yes
20824 fi
20825 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20826 fi
20827 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20828 fi
20829 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20830    ac_c_werror_flag=$ac_save_c_werror_flag
20831 fi
20832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20833 $as_echo "$ac_cv_prog_cc_g" >&6; }
20834 if test "$ac_test_CFLAGS" = set; then
20835   CFLAGS=$ac_save_CFLAGS
20836 elif test $ac_cv_prog_cc_g = yes; then
20837   if test "$GCC" = yes; then
20838     CFLAGS="-g -O2"
20839   else
20840     CFLAGS="-g"
20841   fi
20842 else
20843   if test "$GCC" = yes; then
20844     CFLAGS="-O2"
20845   else
20846     CFLAGS=
20847   fi
20848 fi
20849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20850 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20851 if ${ac_cv_prog_cc_c89+:} false; then :
20852   $as_echo_n "(cached) " >&6
20853 else
20854   ac_cv_prog_cc_c89=no
20855 ac_save_CC=$CC
20856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20857 /* end confdefs.h.  */
20858 #include <stdarg.h>
20859 #include <stdio.h>
20860 struct stat;
20861 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20862 struct buf { int x; };
20863 FILE * (*rcsopen) (struct buf *, struct stat *, int);
20864 static char *e (p, i)
20865      char **p;
20866      int i;
20867 {
20868   return p[i];
20869 }
20870 static char *f (char * (*g) (char **, int), char **p, ...)
20871 {
20872   char *s;
20873   va_list v;
20874   va_start (v,p);
20875   s = g (p, va_arg (v,int));
20876   va_end (v);
20877   return s;
20878 }
20879 
20880 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20881    function prototypes and stuff, but not '\xHH' hex character constants.
20882    These don't provoke an error unfortunately, instead are silently treated
20883    as 'x'.  The following induces an error, until -std is added to get
20884    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20885    array size at least.  It's necessary to write '\x00'==0 to get something
20886    that's true only with -std.  */
20887 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20888 
20889 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20890    inside strings and character constants.  */
20891 #define FOO(x) 'x'
20892 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20893 
20894 int test (int i, double x);
20895 struct s1 {int (*f) (int a);};
20896 struct s2 {int (*f) (double a);};
20897 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20898 int argc;
20899 char **argv;
20900 int
20901 main ()
20902 {
20903 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20904   ;
20905   return 0;
20906 }
20907 _ACEOF
20908 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20909         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20910 do
20911   CC="$ac_save_CC $ac_arg"
20912   if ac_fn_c_try_compile "$LINENO"; then :
20913   ac_cv_prog_cc_c89=$ac_arg
20914 fi
20915 rm -f core conftest.err conftest.$ac_objext
20916   test "x$ac_cv_prog_cc_c89" != "xno" && break
20917 done
20918 rm -f conftest.$ac_ext
20919 CC=$ac_save_CC
20920 
20921 fi
20922 # AC_CACHE_VAL
20923 case "x$ac_cv_prog_cc_c89" in
20924   x)
20925     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20926 $as_echo "none needed" >&6; } ;;
20927   xno)
20928     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20929 $as_echo "unsupported" >&6; } ;;
20930   *)
20931     CC="$CC $ac_cv_prog_cc_c89"
20932     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20933 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20934 esac
20935 if test "x$ac_cv_prog_cc_c89" != xno; then :
20936 
20937 fi
20938 
20939 ac_ext=cpp
20940 ac_cpp='$CXXCPP $CPPFLAGS'
20941 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20942 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20943 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20944 
20945 
20946   # Option used to tell the compiler whether to create 32- or 64-bit executables
20947   # Notice that CC contains the full compiler path at this point.
20948   case $CC in
20949     *xlc_r) COMPILER_TARGET_BITS_FLAG="-q";;
20950     *)      COMPILER_TARGET_BITS_FLAG="-m";;
20951   esac
20952 
20953 
20954   ### Locate C++ compiler (CXX)
20955 
20956   if test "x$CXX" != x; then
20957     COMPILER_CHECK_LIST="$CXX"
20958   elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20959     COMPILER_CHECK_LIST="cl"
20960   elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20961     COMPILER_CHECK_LIST="CC g++"
20962   elif test "x$OPENJDK_TARGET_OS" = "xaix"; then
20963     # Do not probe for CC on AIX .
20964     COMPILER_CHECK_LIST="xlC_r"
20965   else
20966     COMPILER_CHECK_LIST="g++ CC"
20967   fi
20968 
20969 
20970   COMPILER_NAME=C++
20971 
20972   CXX=
20973   # If TOOLS_DIR is set, check for all compiler names in there first
20974   # before checking the rest of the PATH.
20975   if test -n "$TOOLS_DIR"; then
20976     PATH_save="$PATH"
20977     PATH="$TOOLS_DIR"
20978     for ac_prog in $COMPILER_CHECK_LIST
20979 do
20980   # Extract the first word of "$ac_prog", so it can be a program name with args.
20981 set dummy $ac_prog; ac_word=$2
20982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20983 $as_echo_n "checking for $ac_word... " >&6; }
20984 if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
20985   $as_echo_n "(cached) " >&6
20986 else
20987   case $TOOLS_DIR_CXX in
20988   [\\/]* | ?:[\\/]*)
20989   ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20990   ;;
20991   *)
20992   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20993 for as_dir in $PATH
20994 do
20995   IFS=$as_save_IFS
20996   test -z "$as_dir" && as_dir=.
20997     for ac_exec_ext in '' $ac_executable_extensions; do
20998   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20999     ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
21000     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21001     break 2
21002   fi
21003 done
21004   done
21005 IFS=$as_save_IFS
21006 
21007   ;;
21008 esac
21009 fi
21010 TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
21011 if test -n "$TOOLS_DIR_CXX"; then
21012   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
21013 $as_echo "$TOOLS_DIR_CXX" >&6; }
21014 else
21015   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21016 $as_echo "no" >&6; }
21017 fi
21018 
21019 
21020   test -n "$TOOLS_DIR_CXX" && break
21021 done
21022 
21023     CXX=$TOOLS_DIR_CXX
21024     PATH="$PATH_save"
21025   fi
21026 
21027   # AC_PATH_PROGS can't be run multiple times with the same variable,
21028   # so create a new name for this run.
21029   if test "x$CXX" = x; then
21030     for ac_prog in $COMPILER_CHECK_LIST
21031 do
21032   # Extract the first word of "$ac_prog", so it can be a program name with args.
21033 set dummy $ac_prog; ac_word=$2
21034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21035 $as_echo_n "checking for $ac_word... " >&6; }
21036 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
21037   $as_echo_n "(cached) " >&6
21038 else
21039   case $POTENTIAL_CXX in
21040   [\\/]* | ?:[\\/]*)
21041   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
21042   ;;
21043   *)
21044   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21045 for as_dir in $PATH
21046 do
21047   IFS=$as_save_IFS
21048   test -z "$as_dir" && as_dir=.
21049     for ac_exec_ext in '' $ac_executable_extensions; do
21050   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21051     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
21052     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21053     break 2
21054   fi
21055 done
21056   done
21057 IFS=$as_save_IFS
21058 
21059   ;;
21060 esac
21061 fi
21062 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
21063 if test -n "$POTENTIAL_CXX"; then
21064   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
21065 $as_echo "$POTENTIAL_CXX" >&6; }
21066 else
21067   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21068 $as_echo "no" >&6; }
21069 fi
21070 
21071 
21072   test -n "$POTENTIAL_CXX" && break
21073 done
21074 
21075     CXX=$POTENTIAL_CXX
21076   fi
21077 
21078   if test "x$CXX" = x; then
21079 
21080   # Print a helpful message on how to acquire the necessary build dependency.
21081   # devkit is the help tag: freetype, cups, pulse, alsa etc
21082   MISSING_DEPENDENCY=devkit
21083 
21084   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21085     cygwin_help $MISSING_DEPENDENCY
21086   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21087     msys_help $MISSING_DEPENDENCY
21088   else
21089     PKGHANDLER_COMMAND=
21090 
21091     case $PKGHANDLER in
21092       apt-get)
21093         apt_help     $MISSING_DEPENDENCY ;;
21094       yum)
21095         yum_help     $MISSING_DEPENDENCY ;;
21096       port)
21097         port_help    $MISSING_DEPENDENCY ;;
21098       pkgutil)
21099         pkgutil_help $MISSING_DEPENDENCY ;;
21100       pkgadd)
21101         pkgadd_help  $MISSING_DEPENDENCY ;;
21102     esac
21103 
21104     if test "x$PKGHANDLER_COMMAND" != x; then
21105       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
21106     fi
21107   fi
21108 
21109     as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
21110   fi
21111 
21112   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21113 
21114   # First separate the path from the arguments. This will split at the first
21115   # space.
21116   complete="$CXX"
21117   path="${complete%% *}"
21118   tmp="$complete EOL"
21119   arguments="${tmp#* }"
21120 
21121   # Input might be given as Windows format, start by converting to
21122   # unix format.
21123   new_path=`$CYGPATH -u "$path"`
21124 
21125   # Now try to locate executable using which
21126   new_path=`$WHICH "$new_path" 2> /dev/null`
21127   # bat and cmd files are not always considered executable in cygwin causing which
21128   # to not find them
21129   if test "x$new_path" = x \
21130       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21131       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21132     new_path=`$CYGPATH -u "$path"`
21133   fi
21134   if test "x$new_path" = x; then
21135     # Oops. Which didn't find the executable.
21136     # The splitting of arguments from the executable at a space might have been incorrect,
21137     # since paths with space are more likely in Windows. Give it another try with the whole
21138     # argument.
21139     path="$complete"
21140     arguments="EOL"
21141     new_path=`$CYGPATH -u "$path"`
21142     new_path=`$WHICH "$new_path" 2> /dev/null`
21143     # bat and cmd files are not always considered executable in cygwin causing which
21144     # to not find them
21145     if test "x$new_path" = x \
21146         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21147         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21148       new_path=`$CYGPATH -u "$path"`
21149     fi
21150     if test "x$new_path" = x; then
21151       # It's still not found. Now this is an unrecoverable error.
21152       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21153 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21154       has_space=`$ECHO "$complete" | $GREP " "`
21155       if test "x$has_space" != x; then
21156         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21157 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21158       fi
21159       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21160     fi
21161   fi
21162 
21163   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21164   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21165   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21166   # "foo.exe" is OK but "foo" is an error.
21167   #
21168   # This test is therefore slightly more accurate than "test -f" to check for file presence.
21169   # It is also a way to make sure we got the proper file name for the real test later on.
21170   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21171   if test "x$test_shortpath" = x; then
21172     # Short path failed, file does not exist as specified.
21173     # Try adding .exe or .cmd
21174     if test -f "${new_path}.exe"; then
21175       input_to_shortpath="${new_path}.exe"
21176     elif test -f "${new_path}.cmd"; then
21177       input_to_shortpath="${new_path}.cmd"
21178     else
21179       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
21180 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
21181       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21182 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21183       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21184     fi
21185   else
21186     input_to_shortpath="$new_path"
21187   fi
21188 
21189   # Call helper function which possibly converts this using DOS-style short mode.
21190   # If so, the updated path is stored in $new_path.
21191   new_path="$input_to_shortpath"
21192 
21193   input_path="$input_to_shortpath"
21194   # Check if we need to convert this using DOS-style short mode. If the path
21195   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21196   # take no chances and rewrite it.
21197   # Note: m4 eats our [], so we need to use [ and ] instead.
21198   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21199   if test "x$has_forbidden_chars" != x; then
21200     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21201     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21202     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21203     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21204       # Going to short mode and back again did indeed matter. Since short mode is
21205       # case insensitive, let's make it lowercase to improve readability.
21206       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21207       # Now convert it back to Unix-stile (cygpath)
21208       input_path=`$CYGPATH -u "$shortmode_path"`
21209       new_path="$input_path"
21210     fi
21211   fi
21212 
21213   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21214   if test "x$test_cygdrive_prefix" = x; then
21215     # As a simple fix, exclude /usr/bin since it's not a real path.
21216     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21217       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21218       # a path prefixed by /cygdrive for fixpath to work.
21219       new_path="$CYGWIN_ROOT_PATH$input_path"
21220     fi
21221   fi
21222 
21223   # remove trailing .exe if any
21224   new_path="${new_path/%.exe/}"
21225 
21226   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21227 
21228   # First separate the path from the arguments. This will split at the first
21229   # space.
21230   complete="$CXX"
21231   path="${complete%% *}"
21232   tmp="$complete EOL"
21233   arguments="${tmp#* }"
21234 
21235   # Input might be given as Windows format, start by converting to
21236   # unix format.
21237   new_path="$path"
21238 
21239   windows_path="$new_path"
21240   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21241     unix_path=`$CYGPATH -u "$windows_path"`
21242     new_path="$unix_path"
21243   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21244     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21245     new_path="$unix_path"
21246   fi
21247 
21248 
21249   # Now try to locate executable using which
21250   new_path=`$WHICH "$new_path" 2> /dev/null`
21251 
21252   if test "x$new_path" = x; then
21253     # Oops. Which didn't find the executable.
21254     # The splitting of arguments from the executable at a space might have been incorrect,
21255     # since paths with space are more likely in Windows. Give it another try with the whole
21256     # argument.
21257     path="$complete"
21258     arguments="EOL"
21259     new_path="$path"
21260 
21261   windows_path="$new_path"
21262   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21263     unix_path=`$CYGPATH -u "$windows_path"`
21264     new_path="$unix_path"
21265   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21266     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21267     new_path="$unix_path"
21268   fi
21269 
21270 
21271     new_path=`$WHICH "$new_path" 2> /dev/null`
21272 
21273     if test "x$new_path" = x; then
21274       # It's still not found. Now this is an unrecoverable error.
21275       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21276 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21277       has_space=`$ECHO "$complete" | $GREP " "`
21278       if test "x$has_space" != x; then
21279         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21280 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21281       fi
21282       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21283     fi
21284   fi
21285 
21286   # Now new_path has a complete unix path to the binary
21287   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21288     # Keep paths in /bin as-is, but remove trailing .exe if any
21289     new_path="${new_path/%.exe/}"
21290     # Do not save /bin paths to all_fixpath_prefixes!
21291   else
21292     # Not in mixed or Windows style, start by that.
21293     new_path=`cmd //c echo $new_path`
21294 
21295   input_path="$new_path"
21296   # Check if we need to convert this using DOS-style short mode. If the path
21297   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21298   # take no chances and rewrite it.
21299   # Note: m4 eats our [], so we need to use [ and ] instead.
21300   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21301   if test "x$has_forbidden_chars" != x; then
21302     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21303     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21304   fi
21305 
21306     # Output is in $new_path
21307 
21308   windows_path="$new_path"
21309   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21310     unix_path=`$CYGPATH -u "$windows_path"`
21311     new_path="$unix_path"
21312   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21313     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21314     new_path="$unix_path"
21315   fi
21316 
21317     # remove trailing .exe if any
21318     new_path="${new_path/%.exe/}"
21319 
21320     # Save the first 10 bytes of this path to the storage, so fixpath can work.
21321     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21322   fi
21323 
21324   else
21325     # We're on a posix platform. Hooray! :)
21326     # First separate the path from the arguments. This will split at the first
21327     # space.
21328     complete="$CXX"
21329     path="${complete%% *}"
21330     tmp="$complete EOL"
21331     arguments="${tmp#* }"
21332 
21333     # Cannot rely on the command "which" here since it doesn't always work.
21334     is_absolute_path=`$ECHO "$path" | $GREP ^/`
21335     if test -z "$is_absolute_path"; then
21336       # Path to executable is not absolute. Find it.
21337       IFS_save="$IFS"
21338       IFS=:
21339       for p in $PATH; do
21340         if test -f "$p/$path" && test -x "$p/$path"; then
21341           new_path="$p/$path"
21342           break
21343         fi
21344       done
21345       IFS="$IFS_save"
21346     else
21347       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
21348 $as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
21349       new_path="$path"
21350     fi
21351 
21352     if test "x$new_path" = x; then
21353       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21354 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21355       has_space=`$ECHO "$complete" | $GREP " "`
21356       if test "x$has_space" != x; then
21357         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21358 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21359       fi
21360       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21361     fi
21362   fi
21363 
21364   # Now join together the path and the arguments once again
21365   if test "x$arguments" != xEOL; then
21366     new_complete="$new_path ${arguments% *}"
21367   else
21368     new_complete="$new_path"
21369   fi
21370 
21371   if test "x$complete" != "x$new_complete"; then
21372     CXX="$new_complete"
21373     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
21374 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
21375   fi
21376 
21377   TEST_COMPILER="$CXX"
21378   # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
21379   # to 'xlc' but it is crucial that we invoke the compiler with the right name!
21380   if test "x$OPENJDK_BUILD_OS" != xaix; then
21381     { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
21382 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
21383 
21384   if test "x$OPENJDK_BUILD_OS" != xwindows; then
21385     # Follow a chain of symbolic links. Use readlink
21386     # where it exists, else fall back to horribly
21387     # complicated shell code.
21388     if test "x$READLINK_TESTED" != yes; then
21389       # On MacOSX there is a readlink tool with a different
21390       # purpose than the GNU readlink tool. Check the found readlink.
21391       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21392       if test "x$ISGNU" = x; then
21393         # A readlink that we do not know how to use.
21394         # Are there other non-GNU readlinks out there?
21395         READLINK_TESTED=yes
21396         READLINK=
21397       fi
21398     fi
21399 
21400     if test "x$READLINK" != x; then
21401       TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
21402     else
21403       # Save the current directory for restoring afterwards
21404       STARTDIR=$PWD
21405       COUNTER=0
21406       sym_link_dir=`$DIRNAME $TEST_COMPILER`
21407       sym_link_file=`$BASENAME $TEST_COMPILER`
21408       cd $sym_link_dir
21409       # Use -P flag to resolve symlinks in directories.
21410       cd `$THEPWDCMD -P`
21411       sym_link_dir=`$THEPWDCMD -P`
21412       # Resolve file symlinks
21413       while test $COUNTER -lt 20; do
21414         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21415         if test "x$ISLINK" == x; then
21416           # This is not a symbolic link! We are done!
21417           break
21418         fi
21419         # Again resolve directory symlinks since the target of the just found
21420         # link could be in a different directory
21421         cd `$DIRNAME $ISLINK`
21422         sym_link_dir=`$THEPWDCMD -P`
21423         sym_link_file=`$BASENAME $ISLINK`
21424         let COUNTER=COUNTER+1
21425       done
21426       cd $STARTDIR
21427       TEST_COMPILER=$sym_link_dir/$sym_link_file
21428     fi
21429   fi
21430 
21431     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
21432 $as_echo "$TEST_COMPILER" >&6; }
21433   fi
21434   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
21435 $as_echo_n "checking if CXX is disguised ccache... " >&6; }
21436 
21437   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
21438   if test "x$COMPILER_BASENAME" = "xccache"; then
21439     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
21440 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
21441     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
21442     # We want to control ccache invocation ourselves, so ignore this cc and try
21443     # searching again.
21444 
21445     # Remove the path to the fake ccache cc from the PATH
21446     RETRY_COMPILER_SAVED_PATH="$PATH"
21447     COMPILER_DIRNAME=`$DIRNAME $CXX`
21448     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
21449 
21450     # Try again looking for our compiler
21451     if test -n "$ac_tool_prefix"; then
21452   for ac_prog in $COMPILER_CHECK_LIST
21453   do
21454     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21455 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21457 $as_echo_n "checking for $ac_word... " >&6; }
21458 if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
21459   $as_echo_n "(cached) " >&6
21460 else
21461   if test -n "$PROPER_COMPILER_CXX"; then
21462   ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
21463 else
21464 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21465 for as_dir in $PATH
21466 do
21467   IFS=$as_save_IFS
21468   test -z "$as_dir" && as_dir=.
21469     for ac_exec_ext in '' $ac_executable_extensions; do
21470   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21471     ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
21472     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21473     break 2
21474   fi
21475 done
21476   done
21477 IFS=$as_save_IFS
21478 
21479 fi
21480 fi
21481 PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
21482 if test -n "$PROPER_COMPILER_CXX"; then
21483   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21484 $as_echo "$PROPER_COMPILER_CXX" >&6; }
21485 else
21486   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21487 $as_echo "no" >&6; }
21488 fi
21489 
21490 
21491     test -n "$PROPER_COMPILER_CXX" && break
21492   done
21493 fi
21494 if test -z "$PROPER_COMPILER_CXX"; then
21495   ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
21496   for ac_prog in $COMPILER_CHECK_LIST
21497 do
21498   # Extract the first word of "$ac_prog", so it can be a program name with args.
21499 set dummy $ac_prog; ac_word=$2
21500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21501 $as_echo_n "checking for $ac_word... " >&6; }
21502 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
21503   $as_echo_n "(cached) " >&6
21504 else
21505   if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21506   ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
21507 else
21508 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21509 for as_dir in $PATH
21510 do
21511   IFS=$as_save_IFS
21512   test -z "$as_dir" && as_dir=.
21513     for ac_exec_ext in '' $ac_executable_extensions; do
21514   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21515     ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
21516     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21517     break 2
21518   fi
21519 done
21520   done
21521 IFS=$as_save_IFS
21522 
21523 fi
21524 fi
21525 ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
21526 if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21527   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
21528 $as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
21529 else
21530   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21531 $as_echo "no" >&6; }
21532 fi
21533 
21534 
21535   test -n "$ac_ct_PROPER_COMPILER_CXX" && break
21536 done
21537 
21538   if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
21539     PROPER_COMPILER_CXX=""
21540   else
21541     case $cross_compiling:$ac_tool_warned in
21542 yes:)
21543 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21544 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21545 ac_tool_warned=yes ;;
21546 esac
21547     PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
21548   fi
21549 fi
21550 
21551 
21552   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21553 
21554   # First separate the path from the arguments. This will split at the first
21555   # space.
21556   complete="$PROPER_COMPILER_CXX"
21557   path="${complete%% *}"
21558   tmp="$complete EOL"
21559   arguments="${tmp#* }"
21560 
21561   # Input might be given as Windows format, start by converting to
21562   # unix format.
21563   new_path=`$CYGPATH -u "$path"`
21564 
21565   # Now try to locate executable using which
21566   new_path=`$WHICH "$new_path" 2> /dev/null`
21567   # bat and cmd files are not always considered executable in cygwin causing which
21568   # to not find them
21569   if test "x$new_path" = x \
21570       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21571       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21572     new_path=`$CYGPATH -u "$path"`
21573   fi
21574   if test "x$new_path" = x; then
21575     # Oops. Which didn't find the executable.
21576     # The splitting of arguments from the executable at a space might have been incorrect,
21577     # since paths with space are more likely in Windows. Give it another try with the whole
21578     # argument.
21579     path="$complete"
21580     arguments="EOL"
21581     new_path=`$CYGPATH -u "$path"`
21582     new_path=`$WHICH "$new_path" 2> /dev/null`
21583     # bat and cmd files are not always considered executable in cygwin causing which
21584     # to not find them
21585     if test "x$new_path" = x \
21586         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21587         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21588       new_path=`$CYGPATH -u "$path"`
21589     fi
21590     if test "x$new_path" = x; then
21591       # It's still not found. Now this is an unrecoverable error.
21592       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21593 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21594       has_space=`$ECHO "$complete" | $GREP " "`
21595       if test "x$has_space" != x; then
21596         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21597 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21598       fi
21599       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21600     fi
21601   fi
21602 
21603   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21604   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21605   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21606   # "foo.exe" is OK but "foo" is an error.
21607   #
21608   # This test is therefore slightly more accurate than "test -f" to check for file presence.
21609   # It is also a way to make sure we got the proper file name for the real test later on.
21610   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21611   if test "x$test_shortpath" = x; then
21612     # Short path failed, file does not exist as specified.
21613     # Try adding .exe or .cmd
21614     if test -f "${new_path}.exe"; then
21615       input_to_shortpath="${new_path}.exe"
21616     elif test -f "${new_path}.cmd"; then
21617       input_to_shortpath="${new_path}.cmd"
21618     else
21619       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
21620 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
21621       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21622 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21623       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21624     fi
21625   else
21626     input_to_shortpath="$new_path"
21627   fi
21628 
21629   # Call helper function which possibly converts this using DOS-style short mode.
21630   # If so, the updated path is stored in $new_path.
21631   new_path="$input_to_shortpath"
21632 
21633   input_path="$input_to_shortpath"
21634   # Check if we need to convert this using DOS-style short mode. If the path
21635   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21636   # take no chances and rewrite it.
21637   # Note: m4 eats our [], so we need to use [ and ] instead.
21638   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21639   if test "x$has_forbidden_chars" != x; then
21640     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21641     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21642     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21643     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21644       # Going to short mode and back again did indeed matter. Since short mode is
21645       # case insensitive, let's make it lowercase to improve readability.
21646       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21647       # Now convert it back to Unix-stile (cygpath)
21648       input_path=`$CYGPATH -u "$shortmode_path"`
21649       new_path="$input_path"
21650     fi
21651   fi
21652 
21653   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21654   if test "x$test_cygdrive_prefix" = x; then
21655     # As a simple fix, exclude /usr/bin since it's not a real path.
21656     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21657       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21658       # a path prefixed by /cygdrive for fixpath to work.
21659       new_path="$CYGWIN_ROOT_PATH$input_path"
21660     fi
21661   fi
21662 
21663   # remove trailing .exe if any
21664   new_path="${new_path/%.exe/}"
21665 
21666   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21667 
21668   # First separate the path from the arguments. This will split at the first
21669   # space.
21670   complete="$PROPER_COMPILER_CXX"
21671   path="${complete%% *}"
21672   tmp="$complete EOL"
21673   arguments="${tmp#* }"
21674 
21675   # Input might be given as Windows format, start by converting to
21676   # unix format.
21677   new_path="$path"
21678 
21679   windows_path="$new_path"
21680   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21681     unix_path=`$CYGPATH -u "$windows_path"`
21682     new_path="$unix_path"
21683   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21684     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21685     new_path="$unix_path"
21686   fi
21687 
21688 
21689   # Now try to locate executable using which
21690   new_path=`$WHICH "$new_path" 2> /dev/null`
21691 
21692   if test "x$new_path" = x; then
21693     # Oops. Which didn't find the executable.
21694     # The splitting of arguments from the executable at a space might have been incorrect,
21695     # since paths with space are more likely in Windows. Give it another try with the whole
21696     # argument.
21697     path="$complete"
21698     arguments="EOL"
21699     new_path="$path"
21700 
21701   windows_path="$new_path"
21702   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21703     unix_path=`$CYGPATH -u "$windows_path"`
21704     new_path="$unix_path"
21705   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21706     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21707     new_path="$unix_path"
21708   fi
21709 
21710 
21711     new_path=`$WHICH "$new_path" 2> /dev/null`
21712 
21713     if test "x$new_path" = x; then
21714       # It's still not found. Now this is an unrecoverable error.
21715       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21716 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21717       has_space=`$ECHO "$complete" | $GREP " "`
21718       if test "x$has_space" != x; then
21719         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21720 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21721       fi
21722       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21723     fi
21724   fi
21725 
21726   # Now new_path has a complete unix path to the binary
21727   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21728     # Keep paths in /bin as-is, but remove trailing .exe if any
21729     new_path="${new_path/%.exe/}"
21730     # Do not save /bin paths to all_fixpath_prefixes!
21731   else
21732     # Not in mixed or Windows style, start by that.
21733     new_path=`cmd //c echo $new_path`
21734 
21735   input_path="$new_path"
21736   # Check if we need to convert this using DOS-style short mode. If the path
21737   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21738   # take no chances and rewrite it.
21739   # Note: m4 eats our [], so we need to use [ and ] instead.
21740   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21741   if test "x$has_forbidden_chars" != x; then
21742     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21743     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21744   fi
21745 
21746     # Output is in $new_path
21747 
21748   windows_path="$new_path"
21749   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21750     unix_path=`$CYGPATH -u "$windows_path"`
21751     new_path="$unix_path"
21752   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21753     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21754     new_path="$unix_path"
21755   fi
21756 
21757     # remove trailing .exe if any
21758     new_path="${new_path/%.exe/}"
21759 
21760     # Save the first 10 bytes of this path to the storage, so fixpath can work.
21761     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21762   fi
21763 
21764   else
21765     # We're on a posix platform. Hooray! :)
21766     # First separate the path from the arguments. This will split at the first
21767     # space.
21768     complete="$PROPER_COMPILER_CXX"
21769     path="${complete%% *}"
21770     tmp="$complete EOL"
21771     arguments="${tmp#* }"
21772 
21773     # Cannot rely on the command "which" here since it doesn't always work.
21774     is_absolute_path=`$ECHO "$path" | $GREP ^/`
21775     if test -z "$is_absolute_path"; then
21776       # Path to executable is not absolute. Find it.
21777       IFS_save="$IFS"
21778       IFS=:
21779       for p in $PATH; do
21780         if test -f "$p/$path" && test -x "$p/$path"; then
21781           new_path="$p/$path"
21782           break
21783         fi
21784       done
21785       IFS="$IFS_save"
21786     else
21787       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21788 $as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21789       new_path="$path"
21790     fi
21791 
21792     if test "x$new_path" = x; then
21793       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21794 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21795       has_space=`$ECHO "$complete" | $GREP " "`
21796       if test "x$has_space" != x; then
21797         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21798 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21799       fi
21800       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21801     fi
21802   fi
21803 
21804   # Now join together the path and the arguments once again
21805   if test "x$arguments" != xEOL; then
21806     new_complete="$new_path ${arguments% *}"
21807   else
21808     new_complete="$new_path"
21809   fi
21810 
21811   if test "x$complete" != "x$new_complete"; then
21812     PROPER_COMPILER_CXX="$new_complete"
21813     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21814 $as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21815   fi
21816 
21817     PATH="$RETRY_COMPILER_SAVED_PATH"
21818 
21819     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21820 $as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21821 
21822   if test "x$OPENJDK_BUILD_OS" != xwindows; then
21823     # Follow a chain of symbolic links. Use readlink
21824     # where it exists, else fall back to horribly
21825     # complicated shell code.
21826     if test "x$READLINK_TESTED" != yes; then
21827       # On MacOSX there is a readlink tool with a different
21828       # purpose than the GNU readlink tool. Check the found readlink.
21829       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21830       if test "x$ISGNU" = x; then
21831         # A readlink that we do not know how to use.
21832         # Are there other non-GNU readlinks out there?
21833         READLINK_TESTED=yes
21834         READLINK=
21835       fi
21836     fi
21837 
21838     if test "x$READLINK" != x; then
21839       PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21840     else
21841       # Save the current directory for restoring afterwards
21842       STARTDIR=$PWD
21843       COUNTER=0
21844       sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21845       sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21846       cd $sym_link_dir
21847       # Use -P flag to resolve symlinks in directories.
21848       cd `$THEPWDCMD -P`
21849       sym_link_dir=`$THEPWDCMD -P`
21850       # Resolve file symlinks
21851       while test $COUNTER -lt 20; do
21852         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21853         if test "x$ISLINK" == x; then
21854           # This is not a symbolic link! We are done!
21855           break
21856         fi
21857         # Again resolve directory symlinks since the target of the just found
21858         # link could be in a different directory
21859         cd `$DIRNAME $ISLINK`
21860         sym_link_dir=`$THEPWDCMD -P`
21861         sym_link_file=`$BASENAME $ISLINK`
21862         let COUNTER=COUNTER+1
21863       done
21864       cd $STARTDIR
21865       PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21866     fi
21867   fi
21868 
21869     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21870 $as_echo "$PROPER_COMPILER_CXX" >&6; }
21871     CXX="$PROPER_COMPILER_CXX"
21872   else
21873     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21874 $as_echo "no, keeping CXX" >&6; }
21875     CXX="$TEST_COMPILER"
21876   fi
21877 
21878   COMPILER=$CXX
21879   COMPILER_NAME=$COMPILER_NAME
21880 
21881   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21882     # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21883     COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21884     $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21885     if test $? -ne 0; then
21886       GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21887 
21888       { $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
21889 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21890       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21891 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21892       as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21893     else
21894       COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21895       COMPILER_VENDOR="Sun Studio"
21896     fi
21897   elif test  "x$OPENJDK_TARGET_OS" = xaix; then
21898       COMPILER_VERSION_TEST=`$COMPILER -qversion  2>&1 | $TAIL -n 1`
21899       $ECHO $COMPILER_VERSION_TEST | $GREP "^Version: " > /dev/null
21900       if test $? -ne 0; then
21901         as_fn_error $? "Failed to detect the compiler version of $COMPILER ...." "$LINENO" 5
21902       else
21903         COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n 's/Version: \(0-90-9\.0-90-9*\).*/\1/p'`
21904         COMPILER_VENDOR='IBM'
21905       fi
21906   elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21907     # First line typically looks something like:
21908     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
21909     COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
21910     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21911     COMPILER_VENDOR="Microsoft CL.EXE"
21912     COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21913     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21914       if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21915         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21916       fi
21917     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21918       if test "x$COMPILER_CPU_TEST" != "xx64"; then
21919         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21920       fi
21921     fi
21922   else
21923     COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21924     # Check that this is likely to be GCC.
21925     $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21926     if test $? -ne 0; then
21927       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21928 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21929       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21930 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21931       as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21932     fi
21933 
21934     # First line typically looks something like:
21935     # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21936     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21937     COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21938   fi
21939   # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21940   CXX_VERSION="$COMPILER_VERSION"
21941   # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21942   CXX_VENDOR="$COMPILER_VENDOR"
21943 
21944   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21945 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21946 
21947 
21948   # Now that we have resolved CXX ourself, let autoconf have its go at it
21949   ac_ext=cpp
21950 ac_cpp='$CXXCPP $CPPFLAGS'
21951 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21952 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21953 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21954 if test -z "$CXX"; then
21955   if test -n "$CCC"; then
21956     CXX=$CCC
21957   else
21958     if test -n "$ac_tool_prefix"; then
21959   for ac_prog in $CXX
21960   do
21961     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21962 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21964 $as_echo_n "checking for $ac_word... " >&6; }
21965 if ${ac_cv_prog_CXX+:} false; then :
21966   $as_echo_n "(cached) " >&6
21967 else
21968   if test -n "$CXX"; then
21969   ac_cv_prog_CXX="$CXX" # Let the user override the test.
21970 else
21971 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21972 for as_dir in $PATH
21973 do
21974   IFS=$as_save_IFS
21975   test -z "$as_dir" && as_dir=.
21976     for ac_exec_ext in '' $ac_executable_extensions; do
21977   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21978     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21979     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21980     break 2
21981   fi
21982 done
21983   done
21984 IFS=$as_save_IFS
21985 
21986 fi
21987 fi
21988 CXX=$ac_cv_prog_CXX
21989 if test -n "$CXX"; then
21990   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21991 $as_echo "$CXX" >&6; }
21992 else
21993   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21994 $as_echo "no" >&6; }
21995 fi
21996 
21997 
21998     test -n "$CXX" && break
21999   done
22000 fi
22001 if test -z "$CXX"; then
22002   ac_ct_CXX=$CXX
22003   for ac_prog in $CXX
22004 do
22005   # Extract the first word of "$ac_prog", so it can be a program name with args.
22006 set dummy $ac_prog; ac_word=$2
22007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22008 $as_echo_n "checking for $ac_word... " >&6; }
22009 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
22010   $as_echo_n "(cached) " >&6
22011 else
22012   if test -n "$ac_ct_CXX"; then
22013   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
22014 else
22015 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22016 for as_dir in $PATH
22017 do
22018   IFS=$as_save_IFS
22019   test -z "$as_dir" && as_dir=.
22020     for ac_exec_ext in '' $ac_executable_extensions; do
22021   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22022     ac_cv_prog_ac_ct_CXX="$ac_prog"
22023     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22024     break 2
22025   fi
22026 done
22027   done
22028 IFS=$as_save_IFS
22029 
22030 fi
22031 fi
22032 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
22033 if test -n "$ac_ct_CXX"; then
22034   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
22035 $as_echo "$ac_ct_CXX" >&6; }
22036 else
22037   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22038 $as_echo "no" >&6; }
22039 fi
22040 
22041 
22042   test -n "$ac_ct_CXX" && break
22043 done
22044 
22045   if test "x$ac_ct_CXX" = x; then
22046     CXX="g++"
22047   else
22048     case $cross_compiling:$ac_tool_warned in
22049 yes:)
22050 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22051 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22052 ac_tool_warned=yes ;;
22053 esac
22054     CXX=$ac_ct_CXX
22055   fi
22056 fi
22057 
22058   fi
22059 fi
22060 # Provide some information about the compiler.
22061 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
22062 set X $ac_compile
22063 ac_compiler=$2
22064 for ac_option in --version -v -V -qversion; do
22065   { { ac_try="$ac_compiler $ac_option >&5"
22066 case "(($ac_try" in
22067   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22068   *) ac_try_echo=$ac_try;;
22069 esac
22070 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
22071 $as_echo "$ac_try_echo"; } >&5
22072   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
22073   ac_status=$?
22074   if test -s conftest.err; then
22075     sed '10a\
22076 ... rest of stderr output deleted ...
22077          10q' conftest.err >conftest.er1
22078     cat conftest.er1 >&5
22079   fi
22080   rm -f conftest.er1 conftest.err
22081   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22082   test $ac_status = 0; }
22083 done
22084 
22085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
22086 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
22087 if ${ac_cv_cxx_compiler_gnu+:} false; then :
22088   $as_echo_n "(cached) " >&6
22089 else
22090   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22091 /* end confdefs.h.  */
22092 
22093 int
22094 main ()
22095 {
22096 #ifndef __GNUC__
22097        choke me
22098 #endif
22099 
22100   ;
22101   return 0;
22102 }
22103 _ACEOF
22104 if ac_fn_cxx_try_compile "$LINENO"; then :
22105   ac_compiler_gnu=yes
22106 else
22107   ac_compiler_gnu=no
22108 fi
22109 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22110 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
22111 
22112 fi
22113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
22114 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
22115 if test $ac_compiler_gnu = yes; then
22116   GXX=yes
22117 else
22118   GXX=
22119 fi
22120 ac_test_CXXFLAGS=${CXXFLAGS+set}
22121 ac_save_CXXFLAGS=$CXXFLAGS
22122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
22123 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
22124 if ${ac_cv_prog_cxx_g+:} false; then :
22125   $as_echo_n "(cached) " >&6
22126 else
22127   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
22128    ac_cxx_werror_flag=yes
22129    ac_cv_prog_cxx_g=no
22130    CXXFLAGS="-g"
22131    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22132 /* end confdefs.h.  */
22133 
22134 int
22135 main ()
22136 {
22137 
22138   ;
22139   return 0;
22140 }
22141 _ACEOF
22142 if ac_fn_cxx_try_compile "$LINENO"; then :
22143   ac_cv_prog_cxx_g=yes
22144 else
22145   CXXFLAGS=""
22146       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22147 /* end confdefs.h.  */
22148 
22149 int
22150 main ()
22151 {
22152 
22153   ;
22154   return 0;
22155 }
22156 _ACEOF
22157 if ac_fn_cxx_try_compile "$LINENO"; then :
22158 
22159 else
22160   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
22161          CXXFLAGS="-g"
22162          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22163 /* end confdefs.h.  */
22164 
22165 int
22166 main ()
22167 {
22168 
22169   ;
22170   return 0;
22171 }
22172 _ACEOF
22173 if ac_fn_cxx_try_compile "$LINENO"; then :
22174   ac_cv_prog_cxx_g=yes
22175 fi
22176 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22177 fi
22178 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22179 fi
22180 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22181    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
22182 fi
22183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
22184 $as_echo "$ac_cv_prog_cxx_g" >&6; }
22185 if test "$ac_test_CXXFLAGS" = set; then
22186   CXXFLAGS=$ac_save_CXXFLAGS
22187 elif test $ac_cv_prog_cxx_g = yes; then
22188   if test "$GXX" = yes; then
22189     CXXFLAGS="-g -O2"
22190   else
22191     CXXFLAGS="-g"
22192   fi
22193 else
22194   if test "$GXX" = yes; then
22195     CXXFLAGS="-O2"
22196   else
22197     CXXFLAGS=
22198   fi
22199 fi
22200 ac_ext=cpp
22201 ac_cpp='$CXXCPP $CPPFLAGS'
22202 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22203 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22204 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22205 
22206 
22207   ### Locate other tools
22208 
22209   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22210     ac_ext=m
22211 ac_cpp='$OBJCPP $CPPFLAGS'
22212 ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22213 ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22214 ac_compiler_gnu=$ac_cv_objc_compiler_gnu
22215 if test -n "$ac_tool_prefix"; then
22216   for ac_prog in gcc objcc objc cc CC
22217   do
22218     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
22219 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
22220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22221 $as_echo_n "checking for $ac_word... " >&6; }
22222 if ${ac_cv_prog_OBJC+:} false; then :
22223   $as_echo_n "(cached) " >&6
22224 else
22225   if test -n "$OBJC"; then
22226   ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
22227 else
22228 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22229 for as_dir in $PATH
22230 do
22231   IFS=$as_save_IFS
22232   test -z "$as_dir" && as_dir=.
22233     for ac_exec_ext in '' $ac_executable_extensions; do
22234   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22235     ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
22236     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22237     break 2
22238   fi
22239 done
22240   done
22241 IFS=$as_save_IFS
22242 
22243 fi
22244 fi
22245 OBJC=$ac_cv_prog_OBJC
22246 if test -n "$OBJC"; then
22247   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
22248 $as_echo "$OBJC" >&6; }
22249 else
22250   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22251 $as_echo "no" >&6; }
22252 fi
22253 
22254 
22255     test -n "$OBJC" && break
22256   done
22257 fi
22258 if test -z "$OBJC"; then
22259   ac_ct_OBJC=$OBJC
22260   for ac_prog in gcc objcc objc cc CC
22261 do
22262   # Extract the first word of "$ac_prog", so it can be a program name with args.
22263 set dummy $ac_prog; ac_word=$2
22264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22265 $as_echo_n "checking for $ac_word... " >&6; }
22266 if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
22267   $as_echo_n "(cached) " >&6
22268 else
22269   if test -n "$ac_ct_OBJC"; then
22270   ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
22271 else
22272 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22273 for as_dir in $PATH
22274 do
22275   IFS=$as_save_IFS
22276   test -z "$as_dir" && as_dir=.
22277     for ac_exec_ext in '' $ac_executable_extensions; do
22278   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22279     ac_cv_prog_ac_ct_OBJC="$ac_prog"
22280     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22281     break 2
22282   fi
22283 done
22284   done
22285 IFS=$as_save_IFS
22286 
22287 fi
22288 fi
22289 ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
22290 if test -n "$ac_ct_OBJC"; then
22291   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
22292 $as_echo "$ac_ct_OBJC" >&6; }
22293 else
22294   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22295 $as_echo "no" >&6; }
22296 fi
22297 
22298 
22299   test -n "$ac_ct_OBJC" && break
22300 done
22301 
22302   if test "x$ac_ct_OBJC" = x; then
22303     OBJC="gcc"
22304   else
22305     case $cross_compiling:$ac_tool_warned in
22306 yes:)
22307 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22308 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22309 ac_tool_warned=yes ;;
22310 esac
22311     OBJC=$ac_ct_OBJC
22312   fi
22313 fi
22314 
22315 # Provide some information about the compiler.
22316 $as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
22317 set X $ac_compile
22318 ac_compiler=$2
22319 for ac_option in --version -v -V -qversion; do
22320   { { ac_try="$ac_compiler $ac_option >&5"
22321 case "(($ac_try" in
22322   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22323   *) ac_try_echo=$ac_try;;
22324 esac
22325 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
22326 $as_echo "$ac_try_echo"; } >&5
22327   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
22328   ac_status=$?
22329   if test -s conftest.err; then
22330     sed '10a\
22331 ... rest of stderr output deleted ...
22332          10q' conftest.err >conftest.er1
22333     cat conftest.er1 >&5
22334   fi
22335   rm -f conftest.er1 conftest.err
22336   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22337   test $ac_status = 0; }
22338 done
22339 
22340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
22341 $as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
22342 if ${ac_cv_objc_compiler_gnu+:} false; then :
22343   $as_echo_n "(cached) " >&6
22344 else
22345   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22346 /* end confdefs.h.  */
22347 
22348 int
22349 main ()
22350 {
22351 #ifndef __GNUC__
22352        choke me
22353 #endif
22354 
22355   ;
22356   return 0;
22357 }
22358 _ACEOF
22359 if ac_fn_objc_try_compile "$LINENO"; then :
22360   ac_compiler_gnu=yes
22361 else
22362   ac_compiler_gnu=no
22363 fi
22364 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22365 ac_cv_objc_compiler_gnu=$ac_compiler_gnu
22366 
22367 fi
22368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
22369 $as_echo "$ac_cv_objc_compiler_gnu" >&6; }
22370 if test $ac_compiler_gnu = yes; then
22371   GOBJC=yes
22372 else
22373   GOBJC=
22374 fi
22375 ac_test_OBJCFLAGS=${OBJCFLAGS+set}
22376 ac_save_OBJCFLAGS=$OBJCFLAGS
22377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
22378 $as_echo_n "checking whether $OBJC accepts -g... " >&6; }
22379 if ${ac_cv_prog_objc_g+:} false; then :
22380   $as_echo_n "(cached) " >&6
22381 else
22382   ac_save_objc_werror_flag=$ac_objc_werror_flag
22383    ac_objc_werror_flag=yes
22384    ac_cv_prog_objc_g=no
22385    OBJCFLAGS="-g"
22386    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22387 /* end confdefs.h.  */
22388 
22389 int
22390 main ()
22391 {
22392 
22393   ;
22394   return 0;
22395 }
22396 _ACEOF
22397 if ac_fn_objc_try_compile "$LINENO"; then :
22398   ac_cv_prog_objc_g=yes
22399 else
22400   OBJCFLAGS=""
22401       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22402 /* end confdefs.h.  */
22403 
22404 int
22405 main ()
22406 {
22407 
22408   ;
22409   return 0;
22410 }
22411 _ACEOF
22412 if ac_fn_objc_try_compile "$LINENO"; then :
22413 
22414 else
22415   ac_objc_werror_flag=$ac_save_objc_werror_flag
22416          OBJCFLAGS="-g"
22417          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22418 /* end confdefs.h.  */
22419 
22420 int
22421 main ()
22422 {
22423 
22424   ;
22425   return 0;
22426 }
22427 _ACEOF
22428 if ac_fn_objc_try_compile "$LINENO"; then :
22429   ac_cv_prog_objc_g=yes
22430 fi
22431 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22432 fi
22433 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22434 fi
22435 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22436    ac_objc_werror_flag=$ac_save_objc_werror_flag
22437 fi
22438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
22439 $as_echo "$ac_cv_prog_objc_g" >&6; }
22440 if test "$ac_test_OBJCFLAGS" = set; then
22441   OBJCFLAGS=$ac_save_OBJCFLAGS
22442 elif test $ac_cv_prog_objc_g = yes; then
22443   if test "$GOBJC" = yes; then
22444     OBJCFLAGS="-g -O2"
22445   else
22446     OBJCFLAGS="-g"
22447   fi
22448 else
22449   if test "$GOBJC" = yes; then
22450     OBJCFLAGS="-O2"
22451   else
22452     OBJCFLAGS=
22453   fi
22454 fi
22455 ac_ext=cpp
22456 ac_cpp='$CXXCPP $CPPFLAGS'
22457 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22458 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22459 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22460 
22461 
22462   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22463 
22464   # First separate the path from the arguments. This will split at the first
22465   # space.
22466   complete="$OBJC"
22467   path="${complete%% *}"
22468   tmp="$complete EOL"
22469   arguments="${tmp#* }"
22470 
22471   # Input might be given as Windows format, start by converting to
22472   # unix format.
22473   new_path=`$CYGPATH -u "$path"`
22474 
22475   # Now try to locate executable using which
22476   new_path=`$WHICH "$new_path" 2> /dev/null`
22477   # bat and cmd files are not always considered executable in cygwin causing which
22478   # to not find them
22479   if test "x$new_path" = x \
22480       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22481       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22482     new_path=`$CYGPATH -u "$path"`
22483   fi
22484   if test "x$new_path" = x; then
22485     # Oops. Which didn't find the executable.
22486     # The splitting of arguments from the executable at a space might have been incorrect,
22487     # since paths with space are more likely in Windows. Give it another try with the whole
22488     # argument.
22489     path="$complete"
22490     arguments="EOL"
22491     new_path=`$CYGPATH -u "$path"`
22492     new_path=`$WHICH "$new_path" 2> /dev/null`
22493     # bat and cmd files are not always considered executable in cygwin causing which
22494     # to not find them
22495     if test "x$new_path" = x \
22496         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22497         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22498       new_path=`$CYGPATH -u "$path"`
22499     fi
22500     if test "x$new_path" = x; then
22501       # It's still not found. Now this is an unrecoverable error.
22502       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22503 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22504       has_space=`$ECHO "$complete" | $GREP " "`
22505       if test "x$has_space" != x; then
22506         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22507 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22508       fi
22509       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22510     fi
22511   fi
22512 
22513   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22514   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22515   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22516   # "foo.exe" is OK but "foo" is an error.
22517   #
22518   # This test is therefore slightly more accurate than "test -f" to check for file presence.
22519   # It is also a way to make sure we got the proper file name for the real test later on.
22520   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22521   if test "x$test_shortpath" = x; then
22522     # Short path failed, file does not exist as specified.
22523     # Try adding .exe or .cmd
22524     if test -f "${new_path}.exe"; then
22525       input_to_shortpath="${new_path}.exe"
22526     elif test -f "${new_path}.cmd"; then
22527       input_to_shortpath="${new_path}.cmd"
22528     else
22529       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
22530 $as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
22531       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22532 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22533       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22534     fi
22535   else
22536     input_to_shortpath="$new_path"
22537   fi
22538 
22539   # Call helper function which possibly converts this using DOS-style short mode.
22540   # If so, the updated path is stored in $new_path.
22541   new_path="$input_to_shortpath"
22542 
22543   input_path="$input_to_shortpath"
22544   # Check if we need to convert this using DOS-style short mode. If the path
22545   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22546   # take no chances and rewrite it.
22547   # Note: m4 eats our [], so we need to use [ and ] instead.
22548   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22549   if test "x$has_forbidden_chars" != x; then
22550     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22551     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22552     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22553     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22554       # Going to short mode and back again did indeed matter. Since short mode is
22555       # case insensitive, let's make it lowercase to improve readability.
22556       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22557       # Now convert it back to Unix-stile (cygpath)
22558       input_path=`$CYGPATH -u "$shortmode_path"`
22559       new_path="$input_path"
22560     fi
22561   fi
22562 
22563   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22564   if test "x$test_cygdrive_prefix" = x; then
22565     # As a simple fix, exclude /usr/bin since it's not a real path.
22566     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22567       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22568       # a path prefixed by /cygdrive for fixpath to work.
22569       new_path="$CYGWIN_ROOT_PATH$input_path"
22570     fi
22571   fi
22572 
22573   # remove trailing .exe if any
22574   new_path="${new_path/%.exe/}"
22575 
22576   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22577 
22578   # First separate the path from the arguments. This will split at the first
22579   # space.
22580   complete="$OBJC"
22581   path="${complete%% *}"
22582   tmp="$complete EOL"
22583   arguments="${tmp#* }"
22584 
22585   # Input might be given as Windows format, start by converting to
22586   # unix format.
22587   new_path="$path"
22588 
22589   windows_path="$new_path"
22590   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22591     unix_path=`$CYGPATH -u "$windows_path"`
22592     new_path="$unix_path"
22593   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22594     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22595     new_path="$unix_path"
22596   fi
22597 
22598 
22599   # Now try to locate executable using which
22600   new_path=`$WHICH "$new_path" 2> /dev/null`
22601 
22602   if test "x$new_path" = x; then
22603     # Oops. Which didn't find the executable.
22604     # The splitting of arguments from the executable at a space might have been incorrect,
22605     # since paths with space are more likely in Windows. Give it another try with the whole
22606     # argument.
22607     path="$complete"
22608     arguments="EOL"
22609     new_path="$path"
22610 
22611   windows_path="$new_path"
22612   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22613     unix_path=`$CYGPATH -u "$windows_path"`
22614     new_path="$unix_path"
22615   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22616     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22617     new_path="$unix_path"
22618   fi
22619 
22620 
22621     new_path=`$WHICH "$new_path" 2> /dev/null`
22622 
22623     if test "x$new_path" = x; then
22624       # It's still not found. Now this is an unrecoverable error.
22625       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22626 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22627       has_space=`$ECHO "$complete" | $GREP " "`
22628       if test "x$has_space" != x; then
22629         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22630 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22631       fi
22632       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22633     fi
22634   fi
22635 
22636   # Now new_path has a complete unix path to the binary
22637   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22638     # Keep paths in /bin as-is, but remove trailing .exe if any
22639     new_path="${new_path/%.exe/}"
22640     # Do not save /bin paths to all_fixpath_prefixes!
22641   else
22642     # Not in mixed or Windows style, start by that.
22643     new_path=`cmd //c echo $new_path`
22644 
22645   input_path="$new_path"
22646   # Check if we need to convert this using DOS-style short mode. If the path
22647   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22648   # take no chances and rewrite it.
22649   # Note: m4 eats our [], so we need to use [ and ] instead.
22650   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22651   if test "x$has_forbidden_chars" != x; then
22652     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22653     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22654   fi
22655 
22656     # Output is in $new_path
22657 
22658   windows_path="$new_path"
22659   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22660     unix_path=`$CYGPATH -u "$windows_path"`
22661     new_path="$unix_path"
22662   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22663     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22664     new_path="$unix_path"
22665   fi
22666 
22667     # remove trailing .exe if any
22668     new_path="${new_path/%.exe/}"
22669 
22670     # Save the first 10 bytes of this path to the storage, so fixpath can work.
22671     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22672   fi
22673 
22674   else
22675     # We're on a posix platform. Hooray! :)
22676     # First separate the path from the arguments. This will split at the first
22677     # space.
22678     complete="$OBJC"
22679     path="${complete%% *}"
22680     tmp="$complete EOL"
22681     arguments="${tmp#* }"
22682 
22683     # Cannot rely on the command "which" here since it doesn't always work.
22684     is_absolute_path=`$ECHO "$path" | $GREP ^/`
22685     if test -z "$is_absolute_path"; then
22686       # Path to executable is not absolute. Find it.
22687       IFS_save="$IFS"
22688       IFS=:
22689       for p in $PATH; do
22690         if test -f "$p/$path" && test -x "$p/$path"; then
22691           new_path="$p/$path"
22692           break
22693         fi
22694       done
22695       IFS="$IFS_save"
22696     else
22697       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
22698 $as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
22699       new_path="$path"
22700     fi
22701 
22702     if test "x$new_path" = x; then
22703       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22704 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22705       has_space=`$ECHO "$complete" | $GREP " "`
22706       if test "x$has_space" != x; then
22707         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22708 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22709       fi
22710       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22711     fi
22712   fi
22713 
22714   # Now join together the path and the arguments once again
22715   if test "x$arguments" != xEOL; then
22716     new_complete="$new_path ${arguments% *}"
22717   else
22718     new_complete="$new_path"
22719   fi
22720 
22721   if test "x$complete" != "x$new_complete"; then
22722     OBJC="$new_complete"
22723     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
22724 $as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
22725   fi
22726 
22727   else
22728     OBJC=
22729   fi
22730 
22731   # Restore the flags to the user specified values.
22732   # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
22733   CFLAGS="$ORG_CFLAGS"
22734   CXXFLAGS="$ORG_CXXFLAGS"
22735   OBJCFLAGS="$ORG_OBJCFLAGS"
22736 
22737   LD="$CC"
22738   LDEXE="$CC"
22739   LDCXX="$CXX"
22740   LDEXECXX="$CXX"
22741 
22742   # LDEXE is the linker to use, when creating executables.
22743 
22744   # Linking C++ libraries.
22745 
22746   # Linking C++ executables.
22747 
22748 
22749   if test "x$OPENJDK_TARGET_OS" != xwindows; then
22750     if test -n "$ac_tool_prefix"; then
22751   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
22752 set dummy ${ac_tool_prefix}ar; ac_word=$2
22753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22754 $as_echo_n "checking for $ac_word... " >&6; }
22755 if ${ac_cv_prog_AR+:} false; then :
22756   $as_echo_n "(cached) " >&6
22757 else
22758   if test -n "$AR"; then
22759   ac_cv_prog_AR="$AR" # Let the user override the test.
22760 else
22761 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22762 for as_dir in $PATH
22763 do
22764   IFS=$as_save_IFS
22765   test -z "$as_dir" && as_dir=.
22766     for ac_exec_ext in '' $ac_executable_extensions; do
22767   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22768     ac_cv_prog_AR="${ac_tool_prefix}ar"
22769     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22770     break 2
22771   fi
22772 done
22773   done
22774 IFS=$as_save_IFS
22775 
22776 fi
22777 fi
22778 AR=$ac_cv_prog_AR
22779 if test -n "$AR"; then
22780   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
22781 $as_echo "$AR" >&6; }
22782 else
22783   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22784 $as_echo "no" >&6; }
22785 fi
22786 
22787 
22788 fi
22789 if test -z "$ac_cv_prog_AR"; then
22790   ac_ct_AR=$AR
22791   # Extract the first word of "ar", so it can be a program name with args.
22792 set dummy ar; ac_word=$2
22793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22794 $as_echo_n "checking for $ac_word... " >&6; }
22795 if ${ac_cv_prog_ac_ct_AR+:} false; then :
22796   $as_echo_n "(cached) " >&6
22797 else
22798   if test -n "$ac_ct_AR"; then
22799   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22800 else
22801 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22802 for as_dir in $PATH
22803 do
22804   IFS=$as_save_IFS
22805   test -z "$as_dir" && as_dir=.
22806     for ac_exec_ext in '' $ac_executable_extensions; do
22807   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22808     ac_cv_prog_ac_ct_AR="ar"
22809     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22810     break 2
22811   fi
22812 done
22813   done
22814 IFS=$as_save_IFS
22815 
22816 fi
22817 fi
22818 ac_ct_AR=$ac_cv_prog_ac_ct_AR
22819 if test -n "$ac_ct_AR"; then
22820   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22821 $as_echo "$ac_ct_AR" >&6; }
22822 else
22823   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22824 $as_echo "no" >&6; }
22825 fi
22826 
22827   if test "x$ac_ct_AR" = x; then
22828     AR=""
22829   else
22830     case $cross_compiling:$ac_tool_warned in
22831 yes:)
22832 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22833 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22834 ac_tool_warned=yes ;;
22835 esac
22836     AR=$ac_ct_AR
22837   fi
22838 else
22839   AR="$ac_cv_prog_AR"
22840 fi
22841 
22842 
22843   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22844 
22845   # First separate the path from the arguments. This will split at the first
22846   # space.
22847   complete="$AR"
22848   path="${complete%% *}"
22849   tmp="$complete EOL"
22850   arguments="${tmp#* }"
22851 
22852   # Input might be given as Windows format, start by converting to
22853   # unix format.
22854   new_path=`$CYGPATH -u "$path"`
22855 
22856   # Now try to locate executable using which
22857   new_path=`$WHICH "$new_path" 2> /dev/null`
22858   # bat and cmd files are not always considered executable in cygwin causing which
22859   # to not find them
22860   if test "x$new_path" = x \
22861       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22862       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22863     new_path=`$CYGPATH -u "$path"`
22864   fi
22865   if test "x$new_path" = x; then
22866     # Oops. Which didn't find the executable.
22867     # The splitting of arguments from the executable at a space might have been incorrect,
22868     # since paths with space are more likely in Windows. Give it another try with the whole
22869     # argument.
22870     path="$complete"
22871     arguments="EOL"
22872     new_path=`$CYGPATH -u "$path"`
22873     new_path=`$WHICH "$new_path" 2> /dev/null`
22874     # bat and cmd files are not always considered executable in cygwin causing which
22875     # to not find them
22876     if test "x$new_path" = x \
22877         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22878         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22879       new_path=`$CYGPATH -u "$path"`
22880     fi
22881     if test "x$new_path" = x; then
22882       # It's still not found. Now this is an unrecoverable error.
22883       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22884 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22885       has_space=`$ECHO "$complete" | $GREP " "`
22886       if test "x$has_space" != x; then
22887         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22888 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22889       fi
22890       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22891     fi
22892   fi
22893 
22894   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22895   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22896   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22897   # "foo.exe" is OK but "foo" is an error.
22898   #
22899   # This test is therefore slightly more accurate than "test -f" to check for file presence.
22900   # It is also a way to make sure we got the proper file name for the real test later on.
22901   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22902   if test "x$test_shortpath" = x; then
22903     # Short path failed, file does not exist as specified.
22904     # Try adding .exe or .cmd
22905     if test -f "${new_path}.exe"; then
22906       input_to_shortpath="${new_path}.exe"
22907     elif test -f "${new_path}.cmd"; then
22908       input_to_shortpath="${new_path}.cmd"
22909     else
22910       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22911 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22912       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22913 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22914       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22915     fi
22916   else
22917     input_to_shortpath="$new_path"
22918   fi
22919 
22920   # Call helper function which possibly converts this using DOS-style short mode.
22921   # If so, the updated path is stored in $new_path.
22922   new_path="$input_to_shortpath"
22923 
22924   input_path="$input_to_shortpath"
22925   # Check if we need to convert this using DOS-style short mode. If the path
22926   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22927   # take no chances and rewrite it.
22928   # Note: m4 eats our [], so we need to use [ and ] instead.
22929   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22930   if test "x$has_forbidden_chars" != x; then
22931     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22932     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22933     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22934     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22935       # Going to short mode and back again did indeed matter. Since short mode is
22936       # case insensitive, let's make it lowercase to improve readability.
22937       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22938       # Now convert it back to Unix-stile (cygpath)
22939       input_path=`$CYGPATH -u "$shortmode_path"`
22940       new_path="$input_path"
22941     fi
22942   fi
22943 
22944   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22945   if test "x$test_cygdrive_prefix" = x; then
22946     # As a simple fix, exclude /usr/bin since it's not a real path.
22947     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22948       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22949       # a path prefixed by /cygdrive for fixpath to work.
22950       new_path="$CYGWIN_ROOT_PATH$input_path"
22951     fi
22952   fi
22953 
22954   # remove trailing .exe if any
22955   new_path="${new_path/%.exe/}"
22956 
22957   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22958 
22959   # First separate the path from the arguments. This will split at the first
22960   # space.
22961   complete="$AR"
22962   path="${complete%% *}"
22963   tmp="$complete EOL"
22964   arguments="${tmp#* }"
22965 
22966   # Input might be given as Windows format, start by converting to
22967   # unix format.
22968   new_path="$path"
22969 
22970   windows_path="$new_path"
22971   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22972     unix_path=`$CYGPATH -u "$windows_path"`
22973     new_path="$unix_path"
22974   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22975     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22976     new_path="$unix_path"
22977   fi
22978 
22979 
22980   # Now try to locate executable using which
22981   new_path=`$WHICH "$new_path" 2> /dev/null`
22982 
22983   if test "x$new_path" = x; then
22984     # Oops. Which didn't find the executable.
22985     # The splitting of arguments from the executable at a space might have been incorrect,
22986     # since paths with space are more likely in Windows. Give it another try with the whole
22987     # argument.
22988     path="$complete"
22989     arguments="EOL"
22990     new_path="$path"
22991 
22992   windows_path="$new_path"
22993   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22994     unix_path=`$CYGPATH -u "$windows_path"`
22995     new_path="$unix_path"
22996   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22997     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22998     new_path="$unix_path"
22999   fi
23000 
23001 
23002     new_path=`$WHICH "$new_path" 2> /dev/null`
23003 
23004     if test "x$new_path" = x; then
23005       # It's still not found. Now this is an unrecoverable error.
23006       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
23007 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
23008       has_space=`$ECHO "$complete" | $GREP " "`
23009       if test "x$has_space" != x; then
23010         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23011 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23012       fi
23013       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
23014     fi
23015   fi
23016 
23017   # Now new_path has a complete unix path to the binary
23018   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23019     # Keep paths in /bin as-is, but remove trailing .exe if any
23020     new_path="${new_path/%.exe/}"
23021     # Do not save /bin paths to all_fixpath_prefixes!
23022   else
23023     # Not in mixed or Windows style, start by that.
23024     new_path=`cmd //c echo $new_path`
23025 
23026   input_path="$new_path"
23027   # Check if we need to convert this using DOS-style short mode. If the path
23028   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23029   # take no chances and rewrite it.
23030   # Note: m4 eats our [], so we need to use [ and ] instead.
23031   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23032   if test "x$has_forbidden_chars" != x; then
23033     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23034     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23035   fi
23036 
23037     # Output is in $new_path
23038 
23039   windows_path="$new_path"
23040   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23041     unix_path=`$CYGPATH -u "$windows_path"`
23042     new_path="$unix_path"
23043   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23044     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23045     new_path="$unix_path"
23046   fi
23047 
23048     # remove trailing .exe if any
23049     new_path="${new_path/%.exe/}"
23050 
23051     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23052     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23053   fi
23054 
23055   else
23056     # We're on a posix platform. Hooray! :)
23057     # First separate the path from the arguments. This will split at the first
23058     # space.
23059     complete="$AR"
23060     path="${complete%% *}"
23061     tmp="$complete EOL"
23062     arguments="${tmp#* }"
23063 
23064     # Cannot rely on the command "which" here since it doesn't always work.
23065     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23066     if test -z "$is_absolute_path"; then
23067       # Path to executable is not absolute. Find it.
23068       IFS_save="$IFS"
23069       IFS=:
23070       for p in $PATH; do
23071         if test -f "$p/$path" && test -x "$p/$path"; then
23072           new_path="$p/$path"
23073           break
23074         fi
23075       done
23076       IFS="$IFS_save"
23077     else
23078       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
23079 $as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
23080       new_path="$path"
23081     fi
23082 
23083     if test "x$new_path" = x; then
23084       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
23085 $as_echo "$as_me: The path of AR, 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}: This might be caused by spaces in the path, which is not allowed." >&5
23089 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23090       fi
23091       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
23092     fi
23093   fi
23094 
23095   # Now join together the path and the arguments once again
23096   if test "x$arguments" != xEOL; then
23097     new_complete="$new_path ${arguments% *}"
23098   else
23099     new_complete="$new_path"
23100   fi
23101 
23102   if test "x$complete" != "x$new_complete"; then
23103     AR="$new_complete"
23104     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
23105 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
23106   fi
23107 
23108   fi
23109   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
23110     ARFLAGS="-r"
23111   elif test "x$OPENJDK_TARGET_OS" = xaix; then
23112     ARFLAGS="-X64"
23113   else
23114     ARFLAGS=""
23115   fi
23116 
23117 
23118   # For hotspot, we need these in Windows mixed path; other platforms keep them the same
23119   HOTSPOT_CXX="$CXX"
23120   HOTSPOT_LD="$LD"
23121 
23122 
23123 
23124   COMPILER_NAME=gcc
23125   COMPILER_TYPE=CC
23126   if test "x$OPENJDK_TARGET_OS" = xwindows; then :
23127 
23128     # For now, assume that we are always compiling using cl.exe.
23129     CC_OUT_OPTION=-Fo
23130     EXE_OUT_OPTION=-out:
23131     LD_OUT_OPTION=-out:
23132     AR_OUT_OPTION=-out:
23133     # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
23134     # program for something completely different.
23135     # Extract the first word of "link", so it can be a program name with args.
23136 set dummy link; ac_word=$2
23137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23138 $as_echo_n "checking for $ac_word... " >&6; }
23139 if ${ac_cv_prog_WINLD+:} false; then :
23140   $as_echo_n "(cached) " >&6
23141 else
23142   if test -n "$WINLD"; then
23143   ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
23144 else
23145   ac_prog_rejected=no
23146 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23147 for as_dir in $PATH
23148 do
23149   IFS=$as_save_IFS
23150   test -z "$as_dir" && as_dir=.
23151     for ac_exec_ext in '' $ac_executable_extensions; do
23152   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23153     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
23154        ac_prog_rejected=yes
23155        continue
23156      fi
23157     ac_cv_prog_WINLD="link"
23158     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23159     break 2
23160   fi
23161 done
23162   done
23163 IFS=$as_save_IFS
23164 
23165 if test $ac_prog_rejected = yes; then
23166   # We found a bogon in the path, so make sure we never use it.
23167   set dummy $ac_cv_prog_WINLD
23168   shift
23169   if test $# != 0; then
23170     # We chose a different compiler from the bogus one.
23171     # However, it has the same basename, so the bogon will be chosen
23172     # first if we set WINLD to just the basename; use the full file name.
23173     shift
23174     ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
23175   fi
23176 fi
23177 fi
23178 fi
23179 WINLD=$ac_cv_prog_WINLD
23180 if test -n "$WINLD"; then
23181   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
23182 $as_echo "$WINLD" >&6; }
23183 else
23184   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23185 $as_echo "no" >&6; }
23186 fi
23187 
23188 
23189     # Since we must ignore the first found link, WINLD will contain
23190     # the full path to the link.exe program.
23191 
23192   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23193 
23194   # First separate the path from the arguments. This will split at the first
23195   # space.
23196   complete="$WINLD"
23197   path="${complete%% *}"
23198   tmp="$complete EOL"
23199   arguments="${tmp#* }"
23200 
23201   # Input might be given as Windows format, start by converting to
23202   # unix format.
23203   new_path=`$CYGPATH -u "$path"`
23204 
23205   # Now try to locate executable using which
23206   new_path=`$WHICH "$new_path" 2> /dev/null`
23207   # bat and cmd files are not always considered executable in cygwin causing which
23208   # to not find them
23209   if test "x$new_path" = x \
23210       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23211       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23212     new_path=`$CYGPATH -u "$path"`
23213   fi
23214   if test "x$new_path" = x; then
23215     # Oops. Which didn't find the executable.
23216     # The splitting of arguments from the executable at a space might have been incorrect,
23217     # since paths with space are more likely in Windows. Give it another try with the whole
23218     # argument.
23219     path="$complete"
23220     arguments="EOL"
23221     new_path=`$CYGPATH -u "$path"`
23222     new_path=`$WHICH "$new_path" 2> /dev/null`
23223     # bat and cmd files are not always considered executable in cygwin causing which
23224     # to not find them
23225     if test "x$new_path" = x \
23226         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23227         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23228       new_path=`$CYGPATH -u "$path"`
23229     fi
23230     if test "x$new_path" = x; then
23231       # It's still not found. Now this is an unrecoverable error.
23232       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23233 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23234       has_space=`$ECHO "$complete" | $GREP " "`
23235       if test "x$has_space" != x; then
23236         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23237 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23238       fi
23239       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23240     fi
23241   fi
23242 
23243   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23244   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23245   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23246   # "foo.exe" is OK but "foo" is an error.
23247   #
23248   # This test is therefore slightly more accurate than "test -f" to check for file presence.
23249   # It is also a way to make sure we got the proper file name for the real test later on.
23250   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23251   if test "x$test_shortpath" = x; then
23252     # Short path failed, file does not exist as specified.
23253     # Try adding .exe or .cmd
23254     if test -f "${new_path}.exe"; then
23255       input_to_shortpath="${new_path}.exe"
23256     elif test -f "${new_path}.cmd"; then
23257       input_to_shortpath="${new_path}.cmd"
23258     else
23259       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
23260 $as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
23261       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23262 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23263       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23264     fi
23265   else
23266     input_to_shortpath="$new_path"
23267   fi
23268 
23269   # Call helper function which possibly converts this using DOS-style short mode.
23270   # If so, the updated path is stored in $new_path.
23271   new_path="$input_to_shortpath"
23272 
23273   input_path="$input_to_shortpath"
23274   # Check if we need to convert this using DOS-style short mode. If the path
23275   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23276   # take no chances and rewrite it.
23277   # Note: m4 eats our [], so we need to use [ and ] instead.
23278   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23279   if test "x$has_forbidden_chars" != x; then
23280     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23281     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23282     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23283     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23284       # Going to short mode and back again did indeed matter. Since short mode is
23285       # case insensitive, let's make it lowercase to improve readability.
23286       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23287       # Now convert it back to Unix-stile (cygpath)
23288       input_path=`$CYGPATH -u "$shortmode_path"`
23289       new_path="$input_path"
23290     fi
23291   fi
23292 
23293   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23294   if test "x$test_cygdrive_prefix" = x; then
23295     # As a simple fix, exclude /usr/bin since it's not a real path.
23296     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23297       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23298       # a path prefixed by /cygdrive for fixpath to work.
23299       new_path="$CYGWIN_ROOT_PATH$input_path"
23300     fi
23301   fi
23302 
23303   # remove trailing .exe if any
23304   new_path="${new_path/%.exe/}"
23305 
23306   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23307 
23308   # First separate the path from the arguments. This will split at the first
23309   # space.
23310   complete="$WINLD"
23311   path="${complete%% *}"
23312   tmp="$complete EOL"
23313   arguments="${tmp#* }"
23314 
23315   # Input might be given as Windows format, start by converting to
23316   # unix format.
23317   new_path="$path"
23318 
23319   windows_path="$new_path"
23320   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23321     unix_path=`$CYGPATH -u "$windows_path"`
23322     new_path="$unix_path"
23323   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23324     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23325     new_path="$unix_path"
23326   fi
23327 
23328 
23329   # Now try to locate executable using which
23330   new_path=`$WHICH "$new_path" 2> /dev/null`
23331 
23332   if test "x$new_path" = x; then
23333     # Oops. Which didn't find the executable.
23334     # The splitting of arguments from the executable at a space might have been incorrect,
23335     # since paths with space are more likely in Windows. Give it another try with the whole
23336     # argument.
23337     path="$complete"
23338     arguments="EOL"
23339     new_path="$path"
23340 
23341   windows_path="$new_path"
23342   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23343     unix_path=`$CYGPATH -u "$windows_path"`
23344     new_path="$unix_path"
23345   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23346     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23347     new_path="$unix_path"
23348   fi
23349 
23350 
23351     new_path=`$WHICH "$new_path" 2> /dev/null`
23352 
23353     if test "x$new_path" = x; then
23354       # It's still not found. Now this is an unrecoverable error.
23355       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23356 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23357       has_space=`$ECHO "$complete" | $GREP " "`
23358       if test "x$has_space" != x; then
23359         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23360 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23361       fi
23362       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23363     fi
23364   fi
23365 
23366   # Now new_path has a complete unix path to the binary
23367   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23368     # Keep paths in /bin as-is, but remove trailing .exe if any
23369     new_path="${new_path/%.exe/}"
23370     # Do not save /bin paths to all_fixpath_prefixes!
23371   else
23372     # Not in mixed or Windows style, start by that.
23373     new_path=`cmd //c echo $new_path`
23374 
23375   input_path="$new_path"
23376   # Check if we need to convert this using DOS-style short mode. If the path
23377   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23378   # take no chances and rewrite it.
23379   # Note: m4 eats our [], so we need to use [ and ] instead.
23380   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23381   if test "x$has_forbidden_chars" != x; then
23382     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23383     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23384   fi
23385 
23386     # Output is in $new_path
23387 
23388   windows_path="$new_path"
23389   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23390     unix_path=`$CYGPATH -u "$windows_path"`
23391     new_path="$unix_path"
23392   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23393     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23394     new_path="$unix_path"
23395   fi
23396 
23397     # remove trailing .exe if any
23398     new_path="${new_path/%.exe/}"
23399 
23400     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23401     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23402   fi
23403 
23404   else
23405     # We're on a posix platform. Hooray! :)
23406     # First separate the path from the arguments. This will split at the first
23407     # space.
23408     complete="$WINLD"
23409     path="${complete%% *}"
23410     tmp="$complete EOL"
23411     arguments="${tmp#* }"
23412 
23413     # Cannot rely on the command "which" here since it doesn't always work.
23414     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23415     if test -z "$is_absolute_path"; then
23416       # Path to executable is not absolute. Find it.
23417       IFS_save="$IFS"
23418       IFS=:
23419       for p in $PATH; do
23420         if test -f "$p/$path" && test -x "$p/$path"; then
23421           new_path="$p/$path"
23422           break
23423         fi
23424       done
23425       IFS="$IFS_save"
23426     else
23427       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
23428 $as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
23429       new_path="$path"
23430     fi
23431 
23432     if test "x$new_path" = x; then
23433       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23434 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23435       has_space=`$ECHO "$complete" | $GREP " "`
23436       if test "x$has_space" != x; then
23437         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23438 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23439       fi
23440       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23441     fi
23442   fi
23443 
23444   # Now join together the path and the arguments once again
23445   if test "x$arguments" != xEOL; then
23446     new_complete="$new_path ${arguments% *}"
23447   else
23448     new_complete="$new_path"
23449   fi
23450 
23451   if test "x$complete" != "x$new_complete"; then
23452     WINLD="$new_complete"
23453     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
23454 $as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
23455   fi
23456 
23457     printf "Windows linker was found at $WINLD\n"
23458     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
23459 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
23460     "$WINLD" --version > /dev/null
23461     if test $? -eq 0 ; then
23462       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23463 $as_echo "no" >&6; }
23464       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
23465     else
23466       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23467 $as_echo "yes" >&6; }
23468     fi
23469     LD="$WINLD"
23470     LDEXE="$WINLD"
23471     LDCXX="$WINLD"
23472     LDEXECXX="$WINLD"
23473 
23474     # Extract the first word of "mt", so it can be a program name with args.
23475 set dummy mt; ac_word=$2
23476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23477 $as_echo_n "checking for $ac_word... " >&6; }
23478 if ${ac_cv_prog_MT+:} false; then :
23479   $as_echo_n "(cached) " >&6
23480 else
23481   if test -n "$MT"; then
23482   ac_cv_prog_MT="$MT" # Let the user override the test.
23483 else
23484   ac_prog_rejected=no
23485 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23486 for as_dir in $PATH
23487 do
23488   IFS=$as_save_IFS
23489   test -z "$as_dir" && as_dir=.
23490     for ac_exec_ext in '' $ac_executable_extensions; do
23491   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23492     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
23493        ac_prog_rejected=yes
23494        continue
23495      fi
23496     ac_cv_prog_MT="mt"
23497     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23498     break 2
23499   fi
23500 done
23501   done
23502 IFS=$as_save_IFS
23503 
23504 if test $ac_prog_rejected = yes; then
23505   # We found a bogon in the path, so make sure we never use it.
23506   set dummy $ac_cv_prog_MT
23507   shift
23508   if test $# != 0; then
23509     # We chose a different compiler from the bogus one.
23510     # However, it has the same basename, so the bogon will be chosen
23511     # first if we set MT to just the basename; use the full file name.
23512     shift
23513     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
23514   fi
23515 fi
23516 fi
23517 fi
23518 MT=$ac_cv_prog_MT
23519 if test -n "$MT"; then
23520   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
23521 $as_echo "$MT" >&6; }
23522 else
23523   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23524 $as_echo "no" >&6; }
23525 fi
23526 
23527 
23528 
23529   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23530 
23531   # First separate the path from the arguments. This will split at the first
23532   # space.
23533   complete="$MT"
23534   path="${complete%% *}"
23535   tmp="$complete EOL"
23536   arguments="${tmp#* }"
23537 
23538   # Input might be given as Windows format, start by converting to
23539   # unix format.
23540   new_path=`$CYGPATH -u "$path"`
23541 
23542   # Now try to locate executable using which
23543   new_path=`$WHICH "$new_path" 2> /dev/null`
23544   # bat and cmd files are not always considered executable in cygwin causing which
23545   # to not find them
23546   if test "x$new_path" = x \
23547       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23548       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23549     new_path=`$CYGPATH -u "$path"`
23550   fi
23551   if test "x$new_path" = x; then
23552     # Oops. Which didn't find the executable.
23553     # The splitting of arguments from the executable at a space might have been incorrect,
23554     # since paths with space are more likely in Windows. Give it another try with the whole
23555     # argument.
23556     path="$complete"
23557     arguments="EOL"
23558     new_path=`$CYGPATH -u "$path"`
23559     new_path=`$WHICH "$new_path" 2> /dev/null`
23560     # bat and cmd files are not always considered executable in cygwin causing which
23561     # to not find them
23562     if test "x$new_path" = x \
23563         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23564         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23565       new_path=`$CYGPATH -u "$path"`
23566     fi
23567     if test "x$new_path" = x; then
23568       # It's still not found. Now this is an unrecoverable error.
23569       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23570 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23571       has_space=`$ECHO "$complete" | $GREP " "`
23572       if test "x$has_space" != x; then
23573         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23574 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23575       fi
23576       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23577     fi
23578   fi
23579 
23580   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23581   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23582   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23583   # "foo.exe" is OK but "foo" is an error.
23584   #
23585   # This test is therefore slightly more accurate than "test -f" to check for file presence.
23586   # It is also a way to make sure we got the proper file name for the real test later on.
23587   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23588   if test "x$test_shortpath" = x; then
23589     # Short path failed, file does not exist as specified.
23590     # Try adding .exe or .cmd
23591     if test -f "${new_path}.exe"; then
23592       input_to_shortpath="${new_path}.exe"
23593     elif test -f "${new_path}.cmd"; then
23594       input_to_shortpath="${new_path}.cmd"
23595     else
23596       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
23597 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
23598       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23599 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23600       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23601     fi
23602   else
23603     input_to_shortpath="$new_path"
23604   fi
23605 
23606   # Call helper function which possibly converts this using DOS-style short mode.
23607   # If so, the updated path is stored in $new_path.
23608   new_path="$input_to_shortpath"
23609 
23610   input_path="$input_to_shortpath"
23611   # Check if we need to convert this using DOS-style short mode. If the path
23612   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23613   # take no chances and rewrite it.
23614   # Note: m4 eats our [], so we need to use [ and ] instead.
23615   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23616   if test "x$has_forbidden_chars" != x; then
23617     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23618     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23619     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23620     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23621       # Going to short mode and back again did indeed matter. Since short mode is
23622       # case insensitive, let's make it lowercase to improve readability.
23623       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23624       # Now convert it back to Unix-stile (cygpath)
23625       input_path=`$CYGPATH -u "$shortmode_path"`
23626       new_path="$input_path"
23627     fi
23628   fi
23629 
23630   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23631   if test "x$test_cygdrive_prefix" = x; then
23632     # As a simple fix, exclude /usr/bin since it's not a real path.
23633     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23634       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23635       # a path prefixed by /cygdrive for fixpath to work.
23636       new_path="$CYGWIN_ROOT_PATH$input_path"
23637     fi
23638   fi
23639 
23640   # remove trailing .exe if any
23641   new_path="${new_path/%.exe/}"
23642 
23643   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23644 
23645   # First separate the path from the arguments. This will split at the first
23646   # space.
23647   complete="$MT"
23648   path="${complete%% *}"
23649   tmp="$complete EOL"
23650   arguments="${tmp#* }"
23651 
23652   # Input might be given as Windows format, start by converting to
23653   # unix format.
23654   new_path="$path"
23655 
23656   windows_path="$new_path"
23657   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23658     unix_path=`$CYGPATH -u "$windows_path"`
23659     new_path="$unix_path"
23660   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23661     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23662     new_path="$unix_path"
23663   fi
23664 
23665 
23666   # Now try to locate executable using which
23667   new_path=`$WHICH "$new_path" 2> /dev/null`
23668 
23669   if test "x$new_path" = x; then
23670     # Oops. Which didn't find the executable.
23671     # The splitting of arguments from the executable at a space might have been incorrect,
23672     # since paths with space are more likely in Windows. Give it another try with the whole
23673     # argument.
23674     path="$complete"
23675     arguments="EOL"
23676     new_path="$path"
23677 
23678   windows_path="$new_path"
23679   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23680     unix_path=`$CYGPATH -u "$windows_path"`
23681     new_path="$unix_path"
23682   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23683     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23684     new_path="$unix_path"
23685   fi
23686 
23687 
23688     new_path=`$WHICH "$new_path" 2> /dev/null`
23689 
23690     if test "x$new_path" = x; then
23691       # It's still not found. Now this is an unrecoverable error.
23692       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23693 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23694       has_space=`$ECHO "$complete" | $GREP " "`
23695       if test "x$has_space" != x; then
23696         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23697 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23698       fi
23699       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23700     fi
23701   fi
23702 
23703   # Now new_path has a complete unix path to the binary
23704   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23705     # Keep paths in /bin as-is, but remove trailing .exe if any
23706     new_path="${new_path/%.exe/}"
23707     # Do not save /bin paths to all_fixpath_prefixes!
23708   else
23709     # Not in mixed or Windows style, start by that.
23710     new_path=`cmd //c echo $new_path`
23711 
23712   input_path="$new_path"
23713   # Check if we need to convert this using DOS-style short mode. If the path
23714   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23715   # take no chances and rewrite it.
23716   # Note: m4 eats our [], so we need to use [ and ] instead.
23717   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23718   if test "x$has_forbidden_chars" != x; then
23719     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23720     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23721   fi
23722 
23723     # Output is in $new_path
23724 
23725   windows_path="$new_path"
23726   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23727     unix_path=`$CYGPATH -u "$windows_path"`
23728     new_path="$unix_path"
23729   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23730     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23731     new_path="$unix_path"
23732   fi
23733 
23734     # remove trailing .exe if any
23735     new_path="${new_path/%.exe/}"
23736 
23737     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23738     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23739   fi
23740 
23741   else
23742     # We're on a posix platform. Hooray! :)
23743     # First separate the path from the arguments. This will split at the first
23744     # space.
23745     complete="$MT"
23746     path="${complete%% *}"
23747     tmp="$complete EOL"
23748     arguments="${tmp#* }"
23749 
23750     # Cannot rely on the command "which" here since it doesn't always work.
23751     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23752     if test -z "$is_absolute_path"; then
23753       # Path to executable is not absolute. Find it.
23754       IFS_save="$IFS"
23755       IFS=:
23756       for p in $PATH; do
23757         if test -f "$p/$path" && test -x "$p/$path"; then
23758           new_path="$p/$path"
23759           break
23760         fi
23761       done
23762       IFS="$IFS_save"
23763     else
23764       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
23765 $as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
23766       new_path="$path"
23767     fi
23768 
23769     if test "x$new_path" = x; then
23770       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23771 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23772       has_space=`$ECHO "$complete" | $GREP " "`
23773       if test "x$has_space" != x; then
23774         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23775 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23776       fi
23777       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23778     fi
23779   fi
23780 
23781   # Now join together the path and the arguments once again
23782   if test "x$arguments" != xEOL; then
23783     new_complete="$new_path ${arguments% *}"
23784   else
23785     new_complete="$new_path"
23786   fi
23787 
23788   if test "x$complete" != "x$new_complete"; then
23789     MT="$new_complete"
23790     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23791 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23792   fi
23793 
23794     # The resource compiler
23795     # Extract the first word of "rc", so it can be a program name with args.
23796 set dummy rc; ac_word=$2
23797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23798 $as_echo_n "checking for $ac_word... " >&6; }
23799 if ${ac_cv_prog_RC+:} false; then :
23800   $as_echo_n "(cached) " >&6
23801 else
23802   if test -n "$RC"; then
23803   ac_cv_prog_RC="$RC" # Let the user override the test.
23804 else
23805   ac_prog_rejected=no
23806 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23807 for as_dir in $PATH
23808 do
23809   IFS=$as_save_IFS
23810   test -z "$as_dir" && as_dir=.
23811     for ac_exec_ext in '' $ac_executable_extensions; do
23812   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23813     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23814        ac_prog_rejected=yes
23815        continue
23816      fi
23817     ac_cv_prog_RC="rc"
23818     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23819     break 2
23820   fi
23821 done
23822   done
23823 IFS=$as_save_IFS
23824 
23825 if test $ac_prog_rejected = yes; then
23826   # We found a bogon in the path, so make sure we never use it.
23827   set dummy $ac_cv_prog_RC
23828   shift
23829   if test $# != 0; then
23830     # We chose a different compiler from the bogus one.
23831     # However, it has the same basename, so the bogon will be chosen
23832     # first if we set RC to just the basename; use the full file name.
23833     shift
23834     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23835   fi
23836 fi
23837 fi
23838 fi
23839 RC=$ac_cv_prog_RC
23840 if test -n "$RC"; then
23841   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23842 $as_echo "$RC" >&6; }
23843 else
23844   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23845 $as_echo "no" >&6; }
23846 fi
23847 
23848 
23849 
23850   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23851 
23852   # First separate the path from the arguments. This will split at the first
23853   # space.
23854   complete="$RC"
23855   path="${complete%% *}"
23856   tmp="$complete EOL"
23857   arguments="${tmp#* }"
23858 
23859   # Input might be given as Windows format, start by converting to
23860   # unix format.
23861   new_path=`$CYGPATH -u "$path"`
23862 
23863   # Now try to locate executable using which
23864   new_path=`$WHICH "$new_path" 2> /dev/null`
23865   # bat and cmd files are not always considered executable in cygwin causing which
23866   # to not find them
23867   if test "x$new_path" = x \
23868       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23869       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23870     new_path=`$CYGPATH -u "$path"`
23871   fi
23872   if test "x$new_path" = x; then
23873     # Oops. Which didn't find the executable.
23874     # The splitting of arguments from the executable at a space might have been incorrect,
23875     # since paths with space are more likely in Windows. Give it another try with the whole
23876     # argument.
23877     path="$complete"
23878     arguments="EOL"
23879     new_path=`$CYGPATH -u "$path"`
23880     new_path=`$WHICH "$new_path" 2> /dev/null`
23881     # bat and cmd files are not always considered executable in cygwin causing which
23882     # to not find them
23883     if test "x$new_path" = x \
23884         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23885         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23886       new_path=`$CYGPATH -u "$path"`
23887     fi
23888     if test "x$new_path" = x; then
23889       # It's still not found. Now this is an unrecoverable error.
23890       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23891 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23892       has_space=`$ECHO "$complete" | $GREP " "`
23893       if test "x$has_space" != x; then
23894         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23895 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23896       fi
23897       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23898     fi
23899   fi
23900 
23901   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23902   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23903   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23904   # "foo.exe" is OK but "foo" is an error.
23905   #
23906   # This test is therefore slightly more accurate than "test -f" to check for file presence.
23907   # It is also a way to make sure we got the proper file name for the real test later on.
23908   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23909   if test "x$test_shortpath" = x; then
23910     # Short path failed, file does not exist as specified.
23911     # Try adding .exe or .cmd
23912     if test -f "${new_path}.exe"; then
23913       input_to_shortpath="${new_path}.exe"
23914     elif test -f "${new_path}.cmd"; then
23915       input_to_shortpath="${new_path}.cmd"
23916     else
23917       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23918 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23919       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23920 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23921       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23922     fi
23923   else
23924     input_to_shortpath="$new_path"
23925   fi
23926 
23927   # Call helper function which possibly converts this using DOS-style short mode.
23928   # If so, the updated path is stored in $new_path.
23929   new_path="$input_to_shortpath"
23930 
23931   input_path="$input_to_shortpath"
23932   # Check if we need to convert this using DOS-style short mode. If the path
23933   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23934   # take no chances and rewrite it.
23935   # Note: m4 eats our [], so we need to use [ and ] instead.
23936   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23937   if test "x$has_forbidden_chars" != x; then
23938     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23939     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23940     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23941     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23942       # Going to short mode and back again did indeed matter. Since short mode is
23943       # case insensitive, let's make it lowercase to improve readability.
23944       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23945       # Now convert it back to Unix-stile (cygpath)
23946       input_path=`$CYGPATH -u "$shortmode_path"`
23947       new_path="$input_path"
23948     fi
23949   fi
23950 
23951   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23952   if test "x$test_cygdrive_prefix" = x; then
23953     # As a simple fix, exclude /usr/bin since it's not a real path.
23954     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23955       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23956       # a path prefixed by /cygdrive for fixpath to work.
23957       new_path="$CYGWIN_ROOT_PATH$input_path"
23958     fi
23959   fi
23960 
23961   # remove trailing .exe if any
23962   new_path="${new_path/%.exe/}"
23963 
23964   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23965 
23966   # First separate the path from the arguments. This will split at the first
23967   # space.
23968   complete="$RC"
23969   path="${complete%% *}"
23970   tmp="$complete EOL"
23971   arguments="${tmp#* }"
23972 
23973   # Input might be given as Windows format, start by converting to
23974   # unix format.
23975   new_path="$path"
23976 
23977   windows_path="$new_path"
23978   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23979     unix_path=`$CYGPATH -u "$windows_path"`
23980     new_path="$unix_path"
23981   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23982     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23983     new_path="$unix_path"
23984   fi
23985 
23986 
23987   # Now try to locate executable using which
23988   new_path=`$WHICH "$new_path" 2> /dev/null`
23989 
23990   if test "x$new_path" = x; then
23991     # Oops. Which didn't find the executable.
23992     # The splitting of arguments from the executable at a space might have been incorrect,
23993     # since paths with space are more likely in Windows. Give it another try with the whole
23994     # argument.
23995     path="$complete"
23996     arguments="EOL"
23997     new_path="$path"
23998 
23999   windows_path="$new_path"
24000   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24001     unix_path=`$CYGPATH -u "$windows_path"`
24002     new_path="$unix_path"
24003   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24004     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24005     new_path="$unix_path"
24006   fi
24007 
24008 
24009     new_path=`$WHICH "$new_path" 2> /dev/null`
24010 
24011     if test "x$new_path" = x; then
24012       # It's still not found. Now this is an unrecoverable error.
24013       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
24014 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
24015       has_space=`$ECHO "$complete" | $GREP " "`
24016       if test "x$has_space" != x; then
24017         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24018 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24019       fi
24020       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
24021     fi
24022   fi
24023 
24024   # Now new_path has a complete unix path to the binary
24025   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24026     # Keep paths in /bin as-is, but remove trailing .exe if any
24027     new_path="${new_path/%.exe/}"
24028     # Do not save /bin paths to all_fixpath_prefixes!
24029   else
24030     # Not in mixed or Windows style, start by that.
24031     new_path=`cmd //c echo $new_path`
24032 
24033   input_path="$new_path"
24034   # Check if we need to convert this using DOS-style short mode. If the path
24035   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24036   # take no chances and rewrite it.
24037   # Note: m4 eats our [], so we need to use [ and ] instead.
24038   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24039   if test "x$has_forbidden_chars" != x; then
24040     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24041     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24042   fi
24043 
24044     # Output is in $new_path
24045 
24046   windows_path="$new_path"
24047   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24048     unix_path=`$CYGPATH -u "$windows_path"`
24049     new_path="$unix_path"
24050   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24051     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24052     new_path="$unix_path"
24053   fi
24054 
24055     # remove trailing .exe if any
24056     new_path="${new_path/%.exe/}"
24057 
24058     # Save the first 10 bytes of this path to the storage, so fixpath can work.
24059     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24060   fi
24061 
24062   else
24063     # We're on a posix platform. Hooray! :)
24064     # First separate the path from the arguments. This will split at the first
24065     # space.
24066     complete="$RC"
24067     path="${complete%% *}"
24068     tmp="$complete EOL"
24069     arguments="${tmp#* }"
24070 
24071     # Cannot rely on the command "which" here since it doesn't always work.
24072     is_absolute_path=`$ECHO "$path" | $GREP ^/`
24073     if test -z "$is_absolute_path"; then
24074       # Path to executable is not absolute. Find it.
24075       IFS_save="$IFS"
24076       IFS=:
24077       for p in $PATH; do
24078         if test -f "$p/$path" && test -x "$p/$path"; then
24079           new_path="$p/$path"
24080           break
24081         fi
24082       done
24083       IFS="$IFS_save"
24084     else
24085       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
24086 $as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
24087       new_path="$path"
24088     fi
24089 
24090     if test "x$new_path" = x; then
24091       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
24092 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
24093       has_space=`$ECHO "$complete" | $GREP " "`
24094       if test "x$has_space" != x; then
24095         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24096 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24097       fi
24098       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
24099     fi
24100   fi
24101 
24102   # Now join together the path and the arguments once again
24103   if test "x$arguments" != xEOL; then
24104     new_complete="$new_path ${arguments% *}"
24105   else
24106     new_complete="$new_path"
24107   fi
24108 
24109   if test "x$complete" != "x$new_complete"; then
24110     RC="$new_complete"
24111     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
24112 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
24113   fi
24114 
24115 
24116     # For hotspot, we need these in Windows mixed path,
24117     # so rewrite them all. Need added .exe suffix.
24118     HOTSPOT_CXX="$CXX.exe"
24119     HOTSPOT_LD="$LD.exe"
24120     HOTSPOT_MT="$MT.exe"
24121     HOTSPOT_RC="$RC.exe"
24122 
24123   unix_path="$HOTSPOT_CXX"
24124   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24125     windows_path=`$CYGPATH -m "$unix_path"`
24126     HOTSPOT_CXX="$windows_path"
24127   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24128     windows_path=`cmd //c echo $unix_path`
24129     HOTSPOT_CXX="$windows_path"
24130   fi
24131 
24132 
24133   unix_path="$HOTSPOT_LD"
24134   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24135     windows_path=`$CYGPATH -m "$unix_path"`
24136     HOTSPOT_LD="$windows_path"
24137   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24138     windows_path=`cmd //c echo $unix_path`
24139     HOTSPOT_LD="$windows_path"
24140   fi
24141 
24142 
24143   unix_path="$HOTSPOT_MT"
24144   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24145     windows_path=`$CYGPATH -m "$unix_path"`
24146     HOTSPOT_MT="$windows_path"
24147   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24148     windows_path=`cmd //c echo $unix_path`
24149     HOTSPOT_MT="$windows_path"
24150   fi
24151 
24152 
24153   unix_path="$HOTSPOT_RC"
24154