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=1421450260
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=PPC   ;;
7216     s390*)   ZERO_ARCHDEF=S390  ;;
7217     sparc*)  ZERO_ARCHDEF=SPARC ;;
7218     x86_64*) ZERO_ARCHDEF=AMD64 ;;
7219     x86)     ZERO_ARCHDEF=IA32  ;;
7220     *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
7221   esac
7222 
7223 
7224 
7225 
7226 # Continue setting up basic stuff. Most remaining code require fundamental tools.
7227 
7228   # Locate the directory of this script.
7229   SCRIPT="$0"
7230   AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
7231 
7232   # Where is the source? It is located two levels above the configure script.
7233   CURDIR="$PWD"
7234   cd "$AUTOCONF_DIR/../.."
7235   SRC_ROOT="`$THEPWDCMD -L`"
7236 
7237   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7238     PATH_SEP=";"
7239 
7240   SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
7241   if test $SRC_ROOT_LENGTH -gt 100; then
7242     as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7243   fi
7244 
7245   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7246     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7247 $as_echo_n "checking cygwin release... " >&6; }
7248     CYGWIN_VERSION=`$UNAME -r`
7249     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7250 $as_echo "$CYGWIN_VERSION" >&6; }
7251     WINDOWS_ENV_VENDOR='cygwin'
7252     WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7253 
7254     CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7255     if test "x$CYGWIN_VERSION_OK" = x; then
7256       { $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
7257 $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;}
7258       as_fn_error $? "Cannot continue" "$LINENO" 5
7259     fi
7260     if test "x$CYGPATH" = x; then
7261       as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7262     fi
7263     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7264 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7265     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7266     cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7267     # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7268     CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7269     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7270 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
7271     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7272     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7273     if test "x$test_cygdrive_prefix" = x; then
7274       as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7275     fi
7276   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7277     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7278 $as_echo_n "checking msys release... " >&6; }
7279     MSYS_VERSION=`$UNAME -r`
7280     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7281 $as_echo "$MSYS_VERSION" >&6; }
7282 
7283     WINDOWS_ENV_VENDOR='msys'
7284     WINDOWS_ENV_VERSION="$MSYS_VERSION"
7285 
7286     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7287 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
7288     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7289     MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7290 
7291   windows_path="$MSYS_ROOT_PATH"
7292   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7293     unix_path=`$CYGPATH -u "$windows_path"`
7294     MSYS_ROOT_PATH="$unix_path"
7295   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7296     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7297     MSYS_ROOT_PATH="$unix_path"
7298   fi
7299 
7300     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7301 $as_echo "$MSYS_ROOT_PATH" >&6; }
7302     WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7303   else
7304     as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7305   fi
7306 
7307   # Test if windows or unix (cygwin/msys) find is first in path.
7308   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7309 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7310   FIND_BINARY_OUTPUT=`find --version 2>&1`
7311   if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7312     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7313 $as_echo "unix style" >&6; }
7314   elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7315     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7316 $as_echo "Windows" >&6; }
7317     { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7318 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7319     { $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
7320 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7321     as_fn_error $? "Cannot continue" "$LINENO" 5
7322   else
7323     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7324 $as_echo "unknown" >&6; }
7325     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7326 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7327   fi
7328 
7329   else
7330     PATH_SEP=":"
7331   fi
7332 
7333 
7334 
7335   cd "$CURDIR"
7336 
7337 
7338   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7339 
7340   # Input might be given as Windows format, start by converting to
7341   # unix format.
7342   path="$SRC_ROOT"
7343   new_path=`$CYGPATH -u "$path"`
7344 
7345   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7346   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7347   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7348   # "foo.exe" is OK but "foo" is an error.
7349   #
7350   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7351   # It is also a way to make sure we got the proper file name for the real test later on.
7352   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7353   if test "x$test_shortpath" = x; then
7354     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7355 $as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7356     as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7357   fi
7358 
7359   # Call helper function which possibly converts this using DOS-style short mode.
7360   # If so, the updated path is stored in $new_path.
7361 
7362   input_path="$new_path"
7363   # Check if we need to convert this using DOS-style short mode. If the path
7364   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7365   # take no chances and rewrite it.
7366   # Note: m4 eats our [], so we need to use [ and ] instead.
7367   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7368   if test "x$has_forbidden_chars" != x; then
7369     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7370     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7371     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7372     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7373       # Going to short mode and back again did indeed matter. Since short mode is
7374       # case insensitive, let's make it lowercase to improve readability.
7375       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7376       # Now convert it back to Unix-stile (cygpath)
7377       input_path=`$CYGPATH -u "$shortmode_path"`
7378       new_path="$input_path"
7379     fi
7380   fi
7381 
7382   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7383   if test "x$test_cygdrive_prefix" = x; then
7384     # As a simple fix, exclude /usr/bin since it's not a real path.
7385     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7386       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7387       # a path prefixed by /cygdrive for fixpath to work.
7388       new_path="$CYGWIN_ROOT_PATH$input_path"
7389     fi
7390   fi
7391 
7392 
7393   if test "x$path" != "x$new_path"; then
7394     SRC_ROOT="$new_path"
7395     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7396 $as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7397   fi
7398 
7399   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7400 
7401   path="$SRC_ROOT"
7402   has_colon=`$ECHO $path | $GREP ^.:`
7403   new_path="$path"
7404   if test "x$has_colon" = x; then
7405     # Not in mixed or Windows style, start by that.
7406     new_path=`cmd //c echo $path`
7407   fi
7408 
7409 
7410   input_path="$new_path"
7411   # Check if we need to convert this using DOS-style short mode. If the path
7412   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7413   # take no chances and rewrite it.
7414   # Note: m4 eats our [], so we need to use [ and ] instead.
7415   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7416   if test "x$has_forbidden_chars" != x; then
7417     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7418     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7419   fi
7420 
7421 
7422   windows_path="$new_path"
7423   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7424     unix_path=`$CYGPATH -u "$windows_path"`
7425     new_path="$unix_path"
7426   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7427     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7428     new_path="$unix_path"
7429   fi
7430 
7431   if test "x$path" != "x$new_path"; then
7432     SRC_ROOT="$new_path"
7433     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7434 $as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7435   fi
7436 
7437   # Save the first 10 bytes of this path to the storage, so fixpath can work.
7438   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7439 
7440   else
7441     # We're on a posix platform. Hooray! :)
7442     path="$SRC_ROOT"
7443     has_space=`$ECHO "$path" | $GREP " "`
7444     if test "x$has_space" != x; then
7445       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7446 $as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7447       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7448     fi
7449 
7450     # Use eval to expand a potential ~
7451     eval path="$path"
7452     if test ! -f "$path" && test ! -d "$path"; then
7453       as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7454     fi
7455 
7456     SRC_ROOT="`cd "$path"; $THEPWDCMD -L`"
7457   fi
7458 
7459 
7460   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7461 
7462   # Input might be given as Windows format, start by converting to
7463   # unix format.
7464   path="$CURDIR"
7465   new_path=`$CYGPATH -u "$path"`
7466 
7467   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7468   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7469   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7470   # "foo.exe" is OK but "foo" is an error.
7471   #
7472   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7473   # It is also a way to make sure we got the proper file name for the real test later on.
7474   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7475   if test "x$test_shortpath" = x; then
7476     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7477 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7478     as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7479   fi
7480 
7481   # Call helper function which possibly converts this using DOS-style short mode.
7482   # If so, the updated path is stored in $new_path.
7483 
7484   input_path="$new_path"
7485   # Check if we need to convert this using DOS-style short mode. If the path
7486   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7487   # take no chances and rewrite it.
7488   # Note: m4 eats our [], so we need to use [ and ] instead.
7489   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7490   if test "x$has_forbidden_chars" != x; then
7491     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7492     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7493     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7494     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7495       # Going to short mode and back again did indeed matter. Since short mode is
7496       # case insensitive, let's make it lowercase to improve readability.
7497       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7498       # Now convert it back to Unix-stile (cygpath)
7499       input_path=`$CYGPATH -u "$shortmode_path"`
7500       new_path="$input_path"
7501     fi
7502   fi
7503 
7504   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7505   if test "x$test_cygdrive_prefix" = x; then
7506     # As a simple fix, exclude /usr/bin since it's not a real path.
7507     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7508       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7509       # a path prefixed by /cygdrive for fixpath to work.
7510       new_path="$CYGWIN_ROOT_PATH$input_path"
7511     fi
7512   fi
7513 
7514 
7515   if test "x$path" != "x$new_path"; then
7516     CURDIR="$new_path"
7517     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7518 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7519   fi
7520 
7521   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7522 
7523   path="$CURDIR"
7524   has_colon=`$ECHO $path | $GREP ^.:`
7525   new_path="$path"
7526   if test "x$has_colon" = x; then
7527     # Not in mixed or Windows style, start by that.
7528     new_path=`cmd //c echo $path`
7529   fi
7530 
7531 
7532   input_path="$new_path"
7533   # Check if we need to convert this using DOS-style short mode. If the path
7534   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7535   # take no chances and rewrite it.
7536   # Note: m4 eats our [], so we need to use [ and ] instead.
7537   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7538   if test "x$has_forbidden_chars" != x; then
7539     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7540     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7541   fi
7542 
7543 
7544   windows_path="$new_path"
7545   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7546     unix_path=`$CYGPATH -u "$windows_path"`
7547     new_path="$unix_path"
7548   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7549     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7550     new_path="$unix_path"
7551   fi
7552 
7553   if test "x$path" != "x$new_path"; then
7554     CURDIR="$new_path"
7555     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7556 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7557   fi
7558 
7559   # Save the first 10 bytes of this path to the storage, so fixpath can work.
7560   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7561 
7562   else
7563     # We're on a posix platform. Hooray! :)
7564     path="$CURDIR"
7565     has_space=`$ECHO "$path" | $GREP " "`
7566     if test "x$has_space" != x; then
7567       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7568 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7569       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7570     fi
7571 
7572     # Use eval to expand a potential ~
7573     eval path="$path"
7574     if test ! -f "$path" && test ! -d "$path"; then
7575       as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7576     fi
7577 
7578     CURDIR="`cd "$path"; $THEPWDCMD -L`"
7579   fi
7580 
7581 
7582   if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7583     # Add extra search paths on solaris for utilities like ar and as etc...
7584     PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7585   fi
7586 
7587   # You can force the sys-root if the sys-root encoded into the cross compiler tools
7588   # is not correct.
7589 
7590 # Check whether --with-sys-root was given.
7591 if test "${with_sys_root+set}" = set; then :
7592   withval=$with_sys_root;
7593 fi
7594 
7595 
7596   if test "x$with_sys_root" != x; then
7597     SYS_ROOT=$with_sys_root
7598   else
7599     SYS_ROOT=/
7600   fi
7601 
7602 
7603 
7604 # Check whether --with-tools-dir was given.
7605 if test "${with_tools_dir+set}" = set; then :
7606   withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7607 
7608 fi
7609 
7610 
7611   # Xcode version will be validated later
7612 
7613 # Check whether --with-xcode-path was given.
7614 if test "${with_xcode_path+set}" = set; then :
7615   withval=$with_xcode_path; XCODE_PATH=$with_xcode_path
7616 
7617 fi
7618 
7619 
7620 
7621 # Check whether --with-devkit was given.
7622 if test "${with_devkit+set}" = set; then :
7623   withval=$with_devkit;
7624         if test "x$with_sys_root" != x; then
7625           as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7626         fi
7627 
7628   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7629 
7630   # Input might be given as Windows format, start by converting to
7631   # unix format.
7632   path="$with_devkit"
7633   new_path=`$CYGPATH -u "$path"`
7634 
7635   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7636   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7637   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7638   # "foo.exe" is OK but "foo" is an error.
7639   #
7640   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7641   # It is also a way to make sure we got the proper file name for the real test later on.
7642   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7643   if test "x$test_shortpath" = x; then
7644     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7645 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7646     as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
7647   fi
7648 
7649   # Call helper function which possibly converts this using DOS-style short mode.
7650   # If so, the updated path is stored in $new_path.
7651 
7652   input_path="$new_path"
7653   # Check if we need to convert this using DOS-style short mode. If the path
7654   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7655   # take no chances and rewrite it.
7656   # Note: m4 eats our [], so we need to use [ and ] instead.
7657   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7658   if test "x$has_forbidden_chars" != x; then
7659     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7660     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7661     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7662     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7663       # Going to short mode and back again did indeed matter. Since short mode is
7664       # case insensitive, let's make it lowercase to improve readability.
7665       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7666       # Now convert it back to Unix-stile (cygpath)
7667       input_path=`$CYGPATH -u "$shortmode_path"`
7668       new_path="$input_path"
7669     fi
7670   fi
7671 
7672   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7673   if test "x$test_cygdrive_prefix" = x; then
7674     # As a simple fix, exclude /usr/bin since it's not a real path.
7675     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7676       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7677       # a path prefixed by /cygdrive for fixpath to work.
7678       new_path="$CYGWIN_ROOT_PATH$input_path"
7679     fi
7680   fi
7681 
7682 
7683   if test "x$path" != "x$new_path"; then
7684     with_devkit="$new_path"
7685     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7686 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7687   fi
7688 
7689   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7690 
7691   path="$with_devkit"
7692   has_colon=`$ECHO $path | $GREP ^.:`
7693   new_path="$path"
7694   if test "x$has_colon" = x; then
7695     # Not in mixed or Windows style, start by that.
7696     new_path=`cmd //c echo $path`
7697   fi
7698 
7699 
7700   input_path="$new_path"
7701   # Check if we need to convert this using DOS-style short mode. If the path
7702   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7703   # take no chances and rewrite it.
7704   # Note: m4 eats our [], so we need to use [ and ] instead.
7705   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7706   if test "x$has_forbidden_chars" != x; then
7707     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7708     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7709   fi
7710 
7711 
7712   windows_path="$new_path"
7713   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7714     unix_path=`$CYGPATH -u "$windows_path"`
7715     new_path="$unix_path"
7716   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7717     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7718     new_path="$unix_path"
7719   fi
7720 
7721   if test "x$path" != "x$new_path"; then
7722     with_devkit="$new_path"
7723     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7724 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7725   fi
7726 
7727   # Save the first 10 bytes of this path to the storage, so fixpath can work.
7728   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7729 
7730   else
7731     # We're on a posix platform. Hooray! :)
7732     path="$with_devkit"
7733     has_space=`$ECHO "$path" | $GREP " "`
7734     if test "x$has_space" != x; then
7735       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7736 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7737       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7738     fi
7739 
7740     # Use eval to expand a potential ~
7741     eval path="$path"
7742     if test ! -f "$path" && test ! -d "$path"; then
7743       as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
7744     fi
7745 
7746     with_devkit="`cd "$path"; $THEPWDCMD -L`"
7747   fi
7748 
7749 
7750   if test "x$TOOLS_DIR" = x; then
7751     TOOLS_DIR="$with_devkit/bin"
7752   else
7753     TOOLS_DIR="$TOOLS_DIR:$with_devkit/bin"
7754   fi
7755 
7756         if test -d "$with_devkit/$host_alias/libc"; then
7757           SYS_ROOT=$with_devkit/$host_alias/libc
7758         elif test -d "$with_devkit/$host/sys-root"; then
7759           SYS_ROOT=$with_devkit/$host/sys-root
7760         fi
7761 
7762 fi
7763 
7764 
7765 
7766   # Setup default logging of stdout and stderr to build.log in the output root.
7767   BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7768   BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7769   BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7770 
7771 
7772 
7773 
7774 
7775 # Check if it's a pure open build or if custom sources are to be used.
7776 
7777   # Check whether --enable-openjdk-only was given.
7778 if test "${enable_openjdk_only+set}" = set; then :
7779   enableval=$enable_openjdk_only;
7780 else
7781   enable_openjdk_only="no"
7782 fi
7783 
7784 
7785   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7786 $as_echo_n "checking for presence of closed sources... " >&6; }
7787   if test -d "$SRC_ROOT/jdk/src/closed"; then
7788     CLOSED_SOURCE_PRESENT=yes
7789   else
7790     CLOSED_SOURCE_PRESENT=no
7791   fi
7792   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7793 $as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7794 
7795   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7796 $as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7797   SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7798   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7799 $as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7800 
7801   if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7802     OPENJDK=true
7803     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7804       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7805 $as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7806     fi
7807   else
7808     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7809       OPENJDK=true
7810     else
7811       OPENJDK=false
7812     fi
7813   fi
7814 
7815   if test "x$OPENJDK" = "xtrue"; then
7816     SET_OPENJDK="OPENJDK=true"
7817   fi
7818 
7819 
7820 
7821 
7822 # These are needed to be able to create a configuration name (and thus the output directory)
7823 
7824   ###############################################################################
7825   #
7826   # Check which variant of the JDK that we want to build.
7827   # Currently we have:
7828   #    normal:   standard edition
7829   # but the custom make system may add other variants
7830   #
7831   # Effectively the JDK variant gives a name to a specific set of
7832   # modules to compile into the JDK. In the future, these modules
7833   # might even be Jigsaw modules.
7834   #
7835   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7836 $as_echo_n "checking which variant of the JDK to build... " >&6; }
7837 
7838 # Check whether --with-jdk-variant was given.
7839 if test "${with_jdk_variant+set}" = set; then :
7840   withval=$with_jdk_variant;
7841 fi
7842 
7843 
7844   if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7845     JDK_VARIANT="normal"
7846   else
7847     as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7848   fi
7849 
7850 
7851 
7852   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7853 $as_echo "$JDK_VARIANT" >&6; }
7854 
7855 
7856 ###############################################################################
7857 #
7858 # Check which interpreter of the JVM we want to build.
7859 # Currently we have:
7860 #    template: Template interpreter (the default)
7861 #    cpp     : C++ interpreter
7862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
7863 $as_echo_n "checking which interpreter of the JVM to build... " >&6; }
7864 
7865 # Check whether --with-jvm-interpreter was given.
7866 if test "${with_jvm_interpreter+set}" = set; then :
7867   withval=$with_jvm_interpreter;
7868 fi
7869 
7870 
7871 if test "x$with_jvm_interpreter" = x; then
7872      with_jvm_interpreter="template"
7873 fi
7874 
7875 JVM_INTERPRETER="$with_jvm_interpreter"
7876 
7877 if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
7878    as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
7879 fi
7880 
7881 
7882 
7883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
7884 $as_echo "$with_jvm_interpreter" >&6; }
7885 
7886 
7887 
7888   ###############################################################################
7889   #
7890   # Check which variants of the JVM that we want to build.
7891   # Currently we have:
7892   #    server: normal interpreter and a tiered C1/C2 compiler
7893   #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7894   #    minimal1: reduced form of client with optional VM services and features stripped out
7895   #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7896   #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7897   #    zero: no machine code interpreter, no compiler
7898   #    zeroshark: zero interpreter and shark/llvm compiler backend
7899 #    core: interpreter only, no compiler (only works on some platforms)
7900   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7901 $as_echo_n "checking which variants of the JVM to build... " >&6; }
7902 
7903 # Check whether --with-jvm-variants was given.
7904 if test "${with_jvm_variants+set}" = set; then :
7905   withval=$with_jvm_variants;
7906 fi
7907 
7908 
7909   if test "x$with_jvm_variants" = x; then
7910     with_jvm_variants="server"
7911   fi
7912 
7913   JVM_VARIANTS=",$with_jvm_variants,"
7914   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,//'`
7915 
7916   if test "x$TEST_VARIANTS" != "x,"; then
7917      as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
7918   fi
7919   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7920 $as_echo "$with_jvm_variants" >&6; }
7921 
7922   JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7923   JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7924   JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7925   JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7926   JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7927   JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7928   JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
7929 
7930   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7931     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7932       as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7933     fi
7934   fi
7935   if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7936     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7937       as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7938     fi
7939   fi
7940   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7941     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7942       as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7943     fi
7944   fi
7945 
7946   # Replace the commas with AND for use in the build directory name.
7947   ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
7948   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/'`
7949   if test "x$COUNT_VARIANTS" != "x,1"; then
7950     BUILDING_MULTIPLE_JVM_VARIANTS=yes
7951   else
7952     BUILDING_MULTIPLE_JVM_VARIANTS=no
7953   fi
7954 
7955 
7956 
7957 
7958 
7959 
7960 
7961 
7962 
7963 
7964   INCLUDE_SA=true
7965   if test "x$JVM_VARIANT_ZERO" = xtrue ; then
7966     INCLUDE_SA=false
7967   fi
7968   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
7969     INCLUDE_SA=false
7970   fi
7971   if test "x$VAR_CPU" = xppc64 ; then
7972     INCLUDE_SA=false
7973   fi
7974 
7975 
7976   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7977     MACOSX_UNIVERSAL="false"
7978   fi
7979 
7980 
7981 
7982 
7983   ###############################################################################
7984   #
7985   # Set the debug level
7986   #    release: no debug information, all optimizations, no asserts.
7987   #    fastdebug: debug information (-g), all optimizations, all asserts
7988   #    slowdebug: debug information (-g), no optimizations, all asserts
7989   #
7990   DEBUG_LEVEL="release"
7991   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7992 $as_echo_n "checking which debug level to use... " >&6; }
7993   # Check whether --enable-debug was given.
7994 if test "${enable_debug+set}" = set; then :
7995   enableval=$enable_debug;
7996         ENABLE_DEBUG="${enableval}"
7997         DEBUG_LEVEL="fastdebug"
7998 
7999 else
8000   ENABLE_DEBUG="no"
8001 fi
8002 
8003 
8004 
8005 # Check whether --with-debug-level was given.
8006 if test "${with_debug_level+set}" = set; then :
8007   withval=$with_debug_level;
8008         DEBUG_LEVEL="${withval}"
8009         if test "x$ENABLE_DEBUG" = xyes; then
8010           as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
8011         fi
8012 
8013 fi
8014 
8015   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
8016 $as_echo "$DEBUG_LEVEL" >&6; }
8017 
8018   if test "x$DEBUG_LEVEL" != xrelease && \
8019       test "x$DEBUG_LEVEL" != xfastdebug && \
8020       test "x$DEBUG_LEVEL" != xslowdebug; then
8021     as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
8022   fi
8023 
8024 
8025   ###############################################################################
8026   #
8027   # Setup legacy vars/targets and new vars to deal with different debug levels.
8028   #
8029 
8030   case $DEBUG_LEVEL in
8031     release )
8032       VARIANT="OPT"
8033       FASTDEBUG="false"
8034       DEBUG_CLASSFILES="false"
8035       BUILD_VARIANT_RELEASE=""
8036       HOTSPOT_DEBUG_LEVEL="product"
8037       HOTSPOT_EXPORT="product"
8038       ;;
8039     fastdebug )
8040       VARIANT="DBG"
8041       FASTDEBUG="true"
8042       DEBUG_CLASSFILES="true"
8043       BUILD_VARIANT_RELEASE="-fastdebug"
8044       HOTSPOT_DEBUG_LEVEL="fastdebug"
8045       HOTSPOT_EXPORT="fastdebug"
8046       ;;
8047     slowdebug )
8048       VARIANT="DBG"
8049       FASTDEBUG="false"
8050       DEBUG_CLASSFILES="true"
8051       BUILD_VARIANT_RELEASE="-debug"
8052       HOTSPOT_DEBUG_LEVEL="jvmg"
8053       HOTSPOT_EXPORT="debug"
8054       ;;
8055   esac
8056 
8057   #####
8058   # Generate the legacy makefile targets for hotspot.
8059   # The hotspot api for selecting the build artifacts, really, needs to be improved.
8060   # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
8061   # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
8062   # But until then ...
8063   HOTSPOT_TARGET=""
8064 
8065   if test "x$JVM_VARIANT_SERVER" = xtrue; then
8066     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
8067   fi
8068 
8069   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
8070     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
8071   fi
8072 
8073   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
8074     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
8075   fi
8076 
8077   if test "x$JVM_VARIANT_KERNEL" = xtrue; then
8078     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
8079   fi
8080 
8081   if test "x$JVM_VARIANT_ZERO" = xtrue; then
8082     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
8083   fi
8084 
8085   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
8086     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
8087   fi
8088 
8089   if test "x$JVM_VARIANT_CORE" = xtrue; then
8090     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
8091   fi
8092 
8093   HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
8094 
8095   # On Macosx universal binaries are produced, but they only contain
8096   # 64 bit intel. This invalidates control of which jvms are built
8097   # from configure, but only server is valid anyway. Fix this
8098   # when hotspot makefiles are rewritten.
8099   if test "x$MACOSX_UNIVERSAL" = xtrue; then
8100     HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
8101   fi
8102 
8103   #####
8104 
8105 
8106 
8107 
8108 
8109 
8110 
8111 
8112 # With basic setup done, call the custom early hook.
8113 
8114 
8115 # To properly create a configuration name, we need to have the OpenJDK target
8116 # and options (variants and debug level) parsed.
8117 
8118 
8119 
8120 # Check whether --with-conf-name was given.
8121 if test "${with_conf_name+set}" = set; then :
8122   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
8123 fi
8124 
8125 
8126   # Test from where we are running configure, in or outside of src root.
8127   if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
8128       || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
8129       || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
8130     # We are running configure from the src root.
8131     # Create a default ./build/target-variant-debuglevel output root.
8132     if test "x${CONF_NAME}" = x; then
8133       CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
8134     fi
8135     OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
8136     $MKDIR -p "$OUTPUT_ROOT"
8137     if test ! -d "$OUTPUT_ROOT"; then
8138       as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
8139     fi
8140   else
8141     # We are running configure from outside of the src dir.
8142     # Then use the current directory as output dir!
8143     # If configuration is situated in normal build directory, just use the build
8144     # directory name as configuration name, otherwise use the complete path.
8145     if test "x${CONF_NAME}" = x; then
8146       CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
8147     fi
8148     OUTPUT_ROOT="$CURDIR"
8149 
8150     # WARNING: This might be a bad thing to do. You need to be sure you want to
8151     # have a configuration in this directory. Do some sanity checks!
8152 
8153     if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
8154       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
8155       # other files
8156       files_present=`$LS $OUTPUT_ROOT`
8157       # Configure has already touched config.log and confdefs.h in the current dir when this check
8158       # is performed.
8159       filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
8160       | $TR -d '\n'`
8161       if test "x$filtered_files" != x; then
8162         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
8163 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
8164         { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
8165 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
8166         { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
8167 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
8168         { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
8169 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
8170         { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
8171 $as_echo "$as_me: seriously mess up just about everything." >&6;}
8172         { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
8173 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
8174         { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
8175 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
8176         as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
8177       fi
8178     fi
8179   fi
8180   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
8181 $as_echo_n "checking what configuration name to use... " >&6; }
8182   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
8183 $as_echo "$CONF_NAME" >&6; }
8184 
8185 
8186   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8187 
8188   # Input might be given as Windows format, start by converting to
8189   # unix format.
8190   path="$OUTPUT_ROOT"
8191   new_path=`$CYGPATH -u "$path"`
8192 
8193   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8194   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8195   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8196   # "foo.exe" is OK but "foo" is an error.
8197   #
8198   # This test is therefore slightly more accurate than "test -f" to check for file precense.
8199   # It is also a way to make sure we got the proper file name for the real test later on.
8200   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8201   if test "x$test_shortpath" = x; then
8202     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8203 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8204     as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
8205   fi
8206 
8207   # Call helper function which possibly converts this using DOS-style short mode.
8208   # If so, the updated path is stored in $new_path.
8209 
8210   input_path="$new_path"
8211   # Check if we need to convert this using DOS-style short mode. If the path
8212   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8213   # take no chances and rewrite it.
8214   # Note: m4 eats our [], so we need to use [ and ] instead.
8215   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8216   if test "x$has_forbidden_chars" != x; then
8217     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8218     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8219     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8220     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8221       # Going to short mode and back again did indeed matter. Since short mode is
8222       # case insensitive, let's make it lowercase to improve readability.
8223       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8224       # Now convert it back to Unix-stile (cygpath)
8225       input_path=`$CYGPATH -u "$shortmode_path"`
8226       new_path="$input_path"
8227     fi
8228   fi
8229 
8230   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8231   if test "x$test_cygdrive_prefix" = x; then
8232     # As a simple fix, exclude /usr/bin since it's not a real path.
8233     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
8234       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8235       # a path prefixed by /cygdrive for fixpath to work.
8236       new_path="$CYGWIN_ROOT_PATH$input_path"
8237     fi
8238   fi
8239 
8240 
8241   if test "x$path" != "x$new_path"; then
8242     OUTPUT_ROOT="$new_path"
8243     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8244 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8245   fi
8246 
8247   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8248 
8249   path="$OUTPUT_ROOT"
8250   has_colon=`$ECHO $path | $GREP ^.:`
8251   new_path="$path"
8252   if test "x$has_colon" = x; then
8253     # Not in mixed or Windows style, start by that.
8254     new_path=`cmd //c echo $path`
8255   fi
8256 
8257 
8258   input_path="$new_path"
8259   # Check if we need to convert this using DOS-style short mode. If the path
8260   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8261   # take no chances and rewrite it.
8262   # Note: m4 eats our [], so we need to use [ and ] instead.
8263   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8264   if test "x$has_forbidden_chars" != x; then
8265     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8266     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8267   fi
8268 
8269 
8270   windows_path="$new_path"
8271   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8272     unix_path=`$CYGPATH -u "$windows_path"`
8273     new_path="$unix_path"
8274   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8275     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8276     new_path="$unix_path"
8277   fi
8278 
8279   if test "x$path" != "x$new_path"; then
8280     OUTPUT_ROOT="$new_path"
8281     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8282 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8283   fi
8284 
8285   # Save the first 10 bytes of this path to the storage, so fixpath can work.
8286   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8287 
8288   else
8289     # We're on a posix platform. Hooray! :)
8290     path="$OUTPUT_ROOT"
8291     has_space=`$ECHO "$path" | $GREP " "`
8292     if test "x$has_space" != x; then
8293       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8294 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8295       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8296     fi
8297 
8298     # Use eval to expand a potential ~
8299     eval path="$path"
8300     if test ! -f "$path" && test ! -d "$path"; then
8301       as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8302     fi
8303 
8304     OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
8305   fi
8306 
8307 
8308   SPEC=$OUTPUT_ROOT/spec.gmk
8309 
8310   CONF_NAME=$CONF_NAME
8311 
8312   OUTPUT_ROOT=$OUTPUT_ROOT
8313 
8314 
8315   # Most of the probed defines are put into config.h
8316   ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8317 
8318   # The spec.gmk file contains all variables for the make system.
8319   ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8320 
8321   # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8322   ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8323 
8324   # The bootcycle-spec.gmk file contains support for boot cycle builds.
8325   ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8326 
8327   # The compare.sh is used to compare the build output to other builds.
8328   ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8329 
8330   # Spec.sh is currently used by compare-objects.sh
8331   ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8332 
8333   # The generated Makefile knows where the spec.gmk is and where the source is.
8334   # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8335   # which will look for generated configurations
8336   ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8337 
8338 
8339   # Save the arguments given to us
8340   echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8341 
8342 
8343 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8344 
8345   for ac_prog in apt-get yum port pkgutil pkgadd
8346 do
8347   # Extract the first word of "$ac_prog", so it can be a program name with args.
8348 set dummy $ac_prog; ac_word=$2
8349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8350 $as_echo_n "checking for $ac_word... " >&6; }
8351 if ${ac_cv_prog_PKGHANDLER+:} false; then :
8352   $as_echo_n "(cached) " >&6
8353 else
8354   if test -n "$PKGHANDLER"; then
8355   ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8356 else
8357 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8358 for as_dir in $PATH
8359 do
8360   IFS=$as_save_IFS
8361   test -z "$as_dir" && as_dir=.
8362     for ac_exec_ext in '' $ac_executable_extensions; do
8363   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8364     ac_cv_prog_PKGHANDLER="$ac_prog"
8365     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8366     break 2
8367   fi
8368 done
8369   done
8370 IFS=$as_save_IFS
8371 
8372 fi
8373 fi
8374 PKGHANDLER=$ac_cv_prog_PKGHANDLER
8375 if test -n "$PKGHANDLER"; then
8376   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8377 $as_echo "$PKGHANDLER" >&6; }
8378 else
8379   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8380 $as_echo "no" >&6; }
8381 fi
8382 
8383 
8384   test -n "$PKGHANDLER" && break
8385 done
8386 
8387 
8388 
8389 # Setup tools that requires more complex handling, or that is not needed by the configure script.
8390 
8391 
8392   # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8393   if test "x$MAKE" != x; then
8394     # User has supplied a make, test it.
8395     if test ! -f "$MAKE"; then
8396       as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8397     fi
8398 
8399   MAKE_CANDIDATE=""$MAKE""
8400   DESCRIPTION="user supplied MAKE=$MAKE"
8401   if test "x$MAKE_CANDIDATE" != x; then
8402     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8403 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8404     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8405     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8406     if test "x$IS_GNU_MAKE" = x; then
8407       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8408 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8409     else
8410       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
8411       if test "x$IS_MODERN_MAKE" = x; then
8412         { $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
8413 $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;}
8414       else
8415         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8416           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8417             MAKE_EXPECTED_ENV='cygwin'
8418           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8419             MAKE_EXPECTED_ENV='msys'
8420           else
8421             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8422           fi
8423           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8424           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8425         else
8426           # Not relevant for non-Windows
8427           IS_MAKE_CORRECT_ENV=true
8428         fi
8429         if test "x$IS_MAKE_CORRECT_ENV" = x; then
8430           { $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
8431 $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;}
8432         else
8433           FOUND_MAKE=$MAKE_CANDIDATE
8434 
8435   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8436 
8437   # First separate the path from the arguments. This will split at the first
8438   # space.
8439   complete="$FOUND_MAKE"
8440   path="${complete%% *}"
8441   tmp="$complete EOL"
8442   arguments="${tmp#* }"
8443 
8444   # Input might be given as Windows format, start by converting to
8445   # unix format.
8446   new_path=`$CYGPATH -u "$path"`
8447 
8448   # Now try to locate executable using which
8449   new_path=`$WHICH "$new_path" 2> /dev/null`
8450   # bat and cmd files are not always considered executable in cygwin causing which
8451   # to not find them
8452   if test "x$new_path" = x \
8453       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8454       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8455     new_path=`$CYGPATH -u "$path"`
8456   fi
8457   if test "x$new_path" = x; then
8458     # Oops. Which didn't find the executable.
8459     # The splitting of arguments from the executable at a space might have been incorrect,
8460     # since paths with space are more likely in Windows. Give it another try with the whole
8461     # argument.
8462     path="$complete"
8463     arguments="EOL"
8464     new_path=`$CYGPATH -u "$path"`
8465     new_path=`$WHICH "$new_path" 2> /dev/null`
8466     # bat and cmd files are not always considered executable in cygwin causing which
8467     # to not find them
8468     if test "x$new_path" = x \
8469         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8470         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8471       new_path=`$CYGPATH -u "$path"`
8472     fi
8473     if test "x$new_path" = x; then
8474       # It's still not found. Now this is an unrecoverable error.
8475       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8476 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8477       has_space=`$ECHO "$complete" | $GREP " "`
8478       if test "x$has_space" != x; then
8479         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8480 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8481       fi
8482       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8483     fi
8484   fi
8485 
8486   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8487   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8488   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8489   # "foo.exe" is OK but "foo" is an error.
8490   #
8491   # This test is therefore slightly more accurate than "test -f" to check for file presence.
8492   # It is also a way to make sure we got the proper file name for the real test later on.
8493   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8494   if test "x$test_shortpath" = x; then
8495     # Short path failed, file does not exist as specified.
8496     # Try adding .exe or .cmd
8497     if test -f "${new_path}.exe"; then
8498       input_to_shortpath="${new_path}.exe"
8499     elif test -f "${new_path}.cmd"; then
8500       input_to_shortpath="${new_path}.cmd"
8501     else
8502       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8503 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8504       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8505 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8506       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8507     fi
8508   else
8509     input_to_shortpath="$new_path"
8510   fi
8511 
8512   # Call helper function which possibly converts this using DOS-style short mode.
8513   # If so, the updated path is stored in $new_path.
8514   new_path="$input_to_shortpath"
8515 
8516   input_path="$input_to_shortpath"
8517   # Check if we need to convert this using DOS-style short mode. If the path
8518   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8519   # take no chances and rewrite it.
8520   # Note: m4 eats our [], so we need to use [ and ] instead.
8521   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8522   if test "x$has_forbidden_chars" != x; then
8523     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8524     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8525     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8526     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8527       # Going to short mode and back again did indeed matter. Since short mode is
8528       # case insensitive, let's make it lowercase to improve readability.
8529       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8530       # Now convert it back to Unix-stile (cygpath)
8531       input_path=`$CYGPATH -u "$shortmode_path"`
8532       new_path="$input_path"
8533     fi
8534   fi
8535 
8536   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8537   if test "x$test_cygdrive_prefix" = x; then
8538     # As a simple fix, exclude /usr/bin since it's not a real path.
8539     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8540       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8541       # a path prefixed by /cygdrive for fixpath to work.
8542       new_path="$CYGWIN_ROOT_PATH$input_path"
8543     fi
8544   fi
8545 
8546   # remove trailing .exe if any
8547   new_path="${new_path/%.exe/}"
8548 
8549   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8550 
8551   # First separate the path from the arguments. This will split at the first
8552   # space.
8553   complete="$FOUND_MAKE"
8554   path="${complete%% *}"
8555   tmp="$complete EOL"
8556   arguments="${tmp#* }"
8557 
8558   # Input might be given as Windows format, start by converting to
8559   # unix format.
8560   new_path="$path"
8561 
8562   windows_path="$new_path"
8563   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8564     unix_path=`$CYGPATH -u "$windows_path"`
8565     new_path="$unix_path"
8566   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8567     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8568     new_path="$unix_path"
8569   fi
8570 
8571 
8572   # Now try to locate executable using which
8573   new_path=`$WHICH "$new_path" 2> /dev/null`
8574 
8575   if test "x$new_path" = x; then
8576     # Oops. Which didn't find the executable.
8577     # The splitting of arguments from the executable at a space might have been incorrect,
8578     # since paths with space are more likely in Windows. Give it another try with the whole
8579     # argument.
8580     path="$complete"
8581     arguments="EOL"
8582     new_path="$path"
8583 
8584   windows_path="$new_path"
8585   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8586     unix_path=`$CYGPATH -u "$windows_path"`
8587     new_path="$unix_path"
8588   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8589     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8590     new_path="$unix_path"
8591   fi
8592 
8593 
8594     new_path=`$WHICH "$new_path" 2> /dev/null`
8595 
8596     if test "x$new_path" = x; then
8597       # It's still not found. Now this is an unrecoverable error.
8598       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8599 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8600       has_space=`$ECHO "$complete" | $GREP " "`
8601       if test "x$has_space" != x; then
8602         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8603 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8604       fi
8605       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8606     fi
8607   fi
8608 
8609   # Now new_path has a complete unix path to the binary
8610   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8611     # Keep paths in /bin as-is, but remove trailing .exe if any
8612     new_path="${new_path/%.exe/}"
8613     # Do not save /bin paths to all_fixpath_prefixes!
8614   else
8615     # Not in mixed or Windows style, start by that.
8616     new_path=`cmd //c echo $new_path`
8617 
8618   input_path="$new_path"
8619   # Check if we need to convert this using DOS-style short mode. If the path
8620   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8621   # take no chances and rewrite it.
8622   # Note: m4 eats our [], so we need to use [ and ] instead.
8623   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8624   if test "x$has_forbidden_chars" != x; then
8625     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8626     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8627   fi
8628 
8629     # Output is in $new_path
8630 
8631   windows_path="$new_path"
8632   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8633     unix_path=`$CYGPATH -u "$windows_path"`
8634     new_path="$unix_path"
8635   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8636     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8637     new_path="$unix_path"
8638   fi
8639 
8640     # remove trailing .exe if any
8641     new_path="${new_path/%.exe/}"
8642 
8643     # Save the first 10 bytes of this path to the storage, so fixpath can work.
8644     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8645   fi
8646 
8647   else
8648     # We're on a posix platform. Hooray! :)
8649     # First separate the path from the arguments. This will split at the first
8650     # space.
8651     complete="$FOUND_MAKE"
8652     path="${complete%% *}"
8653     tmp="$complete EOL"
8654     arguments="${tmp#* }"
8655 
8656     # Cannot rely on the command "which" here since it doesn't always work.
8657     is_absolute_path=`$ECHO "$path" | $GREP ^/`
8658     if test -z "$is_absolute_path"; then
8659       # Path to executable is not absolute. Find it.
8660       IFS_save="$IFS"
8661       IFS=:
8662       for p in $PATH; do
8663         if test -f "$p/$path" && test -x "$p/$path"; then
8664           new_path="$p/$path"
8665           break
8666         fi
8667       done
8668       IFS="$IFS_save"
8669     else
8670       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8671 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8672       new_path="$path"
8673     fi
8674 
8675     if test "x$new_path" = x; then
8676       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8677 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8678       has_space=`$ECHO "$complete" | $GREP " "`
8679       if test "x$has_space" != x; then
8680         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8681 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8682       fi
8683       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8684     fi
8685   fi
8686 
8687   # Now join together the path and the arguments once again
8688   if test "x$arguments" != xEOL; then
8689     new_complete="$new_path ${arguments% *}"
8690   else
8691     new_complete="$new_path"
8692   fi
8693 
8694   if test "x$complete" != "x$new_complete"; then
8695     FOUND_MAKE="$new_complete"
8696     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8697 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8698   fi
8699 
8700         fi
8701       fi
8702     fi
8703   fi
8704 
8705     if test "x$FOUND_MAKE" = x; then
8706       as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8707     fi
8708   else
8709     # Try our hardest to locate a correct version of GNU make
8710     for ac_prog in gmake
8711 do
8712   # Extract the first word of "$ac_prog", so it can be a program name with args.
8713 set dummy $ac_prog; ac_word=$2
8714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8715 $as_echo_n "checking for $ac_word... " >&6; }
8716 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
8717   $as_echo_n "(cached) " >&6
8718 else
8719   case $CHECK_GMAKE in
8720   [\\/]* | ?:[\\/]*)
8721   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8722   ;;
8723   *)
8724   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8725 for as_dir in $PATH
8726 do
8727   IFS=$as_save_IFS
8728   test -z "$as_dir" && as_dir=.
8729     for ac_exec_ext in '' $ac_executable_extensions; do
8730   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8731     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8732     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8733     break 2
8734   fi
8735 done
8736   done
8737 IFS=$as_save_IFS
8738 
8739   ;;
8740 esac
8741 fi
8742 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8743 if test -n "$CHECK_GMAKE"; then
8744   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8745 $as_echo "$CHECK_GMAKE" >&6; }
8746 else
8747   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8748 $as_echo "no" >&6; }
8749 fi
8750 
8751 
8752   test -n "$CHECK_GMAKE" && break
8753 done
8754 
8755 
8756   MAKE_CANDIDATE=""$CHECK_GMAKE""
8757   DESCRIPTION="gmake in PATH"
8758   if test "x$MAKE_CANDIDATE" != x; then
8759     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8760 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8761     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8762     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8763     if test "x$IS_GNU_MAKE" = x; then
8764       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8765 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8766     else
8767       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
8768       if test "x$IS_MODERN_MAKE" = x; then
8769         { $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
8770 $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;}
8771       else
8772         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8773           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8774             MAKE_EXPECTED_ENV='cygwin'
8775           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8776             MAKE_EXPECTED_ENV='msys'
8777           else
8778             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8779           fi
8780           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8781           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8782         else
8783           # Not relevant for non-Windows
8784           IS_MAKE_CORRECT_ENV=true
8785         fi
8786         if test "x$IS_MAKE_CORRECT_ENV" = x; then
8787           { $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
8788 $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;}
8789         else
8790           FOUND_MAKE=$MAKE_CANDIDATE
8791 
8792   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8793 
8794   # First separate the path from the arguments. This will split at the first
8795   # space.
8796   complete="$FOUND_MAKE"
8797   path="${complete%% *}"
8798   tmp="$complete EOL"
8799   arguments="${tmp#* }"
8800 
8801   # Input might be given as Windows format, start by converting to
8802   # unix format.
8803   new_path=`$CYGPATH -u "$path"`
8804 
8805   # Now try to locate executable using which
8806   new_path=`$WHICH "$new_path" 2> /dev/null`
8807   # bat and cmd files are not always considered executable in cygwin causing which
8808   # to not find them
8809   if test "x$new_path" = x \
8810       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8811       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8812     new_path=`$CYGPATH -u "$path"`
8813   fi
8814   if test "x$new_path" = x; then
8815     # Oops. Which didn't find the executable.
8816     # The splitting of arguments from the executable at a space might have been incorrect,
8817     # since paths with space are more likely in Windows. Give it another try with the whole
8818     # argument.
8819     path="$complete"
8820     arguments="EOL"
8821     new_path=`$CYGPATH -u "$path"`
8822     new_path=`$WHICH "$new_path" 2> /dev/null`
8823     # bat and cmd files are not always considered executable in cygwin causing which
8824     # to not find them
8825     if test "x$new_path" = x \
8826         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8827         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8828       new_path=`$CYGPATH -u "$path"`
8829     fi
8830     if test "x$new_path" = x; then
8831       # It's still not found. Now this is an unrecoverable error.
8832       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8833 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8834       has_space=`$ECHO "$complete" | $GREP " "`
8835       if test "x$has_space" != x; then
8836         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8837 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8838       fi
8839       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8840     fi
8841   fi
8842 
8843   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8844   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8845   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8846   # "foo.exe" is OK but "foo" is an error.
8847   #
8848   # This test is therefore slightly more accurate than "test -f" to check for file presence.
8849   # It is also a way to make sure we got the proper file name for the real test later on.
8850   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8851   if test "x$test_shortpath" = x; then
8852     # Short path failed, file does not exist as specified.
8853     # Try adding .exe or .cmd
8854     if test -f "${new_path}.exe"; then
8855       input_to_shortpath="${new_path}.exe"
8856     elif test -f "${new_path}.cmd"; then
8857       input_to_shortpath="${new_path}.cmd"
8858     else
8859       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8860 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8861       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8862 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8863       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8864     fi
8865   else
8866     input_to_shortpath="$new_path"
8867   fi
8868 
8869   # Call helper function which possibly converts this using DOS-style short mode.
8870   # If so, the updated path is stored in $new_path.
8871   new_path="$input_to_shortpath"
8872 
8873   input_path="$input_to_shortpath"
8874   # Check if we need to convert this using DOS-style short mode. If the path
8875   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8876   # take no chances and rewrite it.
8877   # Note: m4 eats our [], so we need to use [ and ] instead.
8878   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8879   if test "x$has_forbidden_chars" != x; then
8880     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8881     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8882     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8883     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8884       # Going to short mode and back again did indeed matter. Since short mode is
8885       # case insensitive, let's make it lowercase to improve readability.
8886       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8887       # Now convert it back to Unix-stile (cygpath)
8888       input_path=`$CYGPATH -u "$shortmode_path"`
8889       new_path="$input_path"
8890     fi
8891   fi
8892 
8893   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8894   if test "x$test_cygdrive_prefix" = x; then
8895     # As a simple fix, exclude /usr/bin since it's not a real path.
8896     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8897       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8898       # a path prefixed by /cygdrive for fixpath to work.
8899       new_path="$CYGWIN_ROOT_PATH$input_path"
8900     fi
8901   fi
8902 
8903   # remove trailing .exe if any
8904   new_path="${new_path/%.exe/}"
8905 
8906   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8907 
8908   # First separate the path from the arguments. This will split at the first
8909   # space.
8910   complete="$FOUND_MAKE"
8911   path="${complete%% *}"
8912   tmp="$complete EOL"
8913   arguments="${tmp#* }"
8914 
8915   # Input might be given as Windows format, start by converting to
8916   # unix format.
8917   new_path="$path"
8918 
8919   windows_path="$new_path"
8920   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8921     unix_path=`$CYGPATH -u "$windows_path"`
8922     new_path="$unix_path"
8923   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8924     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8925     new_path="$unix_path"
8926   fi
8927 
8928 
8929   # Now try to locate executable using which
8930   new_path=`$WHICH "$new_path" 2> /dev/null`
8931 
8932   if test "x$new_path" = x; then
8933     # Oops. Which didn't find the executable.
8934     # The splitting of arguments from the executable at a space might have been incorrect,
8935     # since paths with space are more likely in Windows. Give it another try with the whole
8936     # argument.
8937     path="$complete"
8938     arguments="EOL"
8939     new_path="$path"
8940 
8941   windows_path="$new_path"
8942   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8943     unix_path=`$CYGPATH -u "$windows_path"`
8944     new_path="$unix_path"
8945   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8946     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8947     new_path="$unix_path"
8948   fi
8949 
8950 
8951     new_path=`$WHICH "$new_path" 2> /dev/null`
8952 
8953     if test "x$new_path" = x; then
8954       # It's still not found. Now this is an unrecoverable error.
8955       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8956 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8957       has_space=`$ECHO "$complete" | $GREP " "`
8958       if test "x$has_space" != x; then
8959         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8960 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8961       fi
8962       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8963     fi
8964   fi
8965 
8966   # Now new_path has a complete unix path to the binary
8967   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8968     # Keep paths in /bin as-is, but remove trailing .exe if any
8969     new_path="${new_path/%.exe/}"
8970     # Do not save /bin paths to all_fixpath_prefixes!
8971   else
8972     # Not in mixed or Windows style, start by that.
8973     new_path=`cmd //c echo $new_path`
8974 
8975   input_path="$new_path"
8976   # Check if we need to convert this using DOS-style short mode. If the path
8977   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8978   # take no chances and rewrite it.
8979   # Note: m4 eats our [], so we need to use [ and ] instead.
8980   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8981   if test "x$has_forbidden_chars" != x; then
8982     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8983     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8984   fi
8985 
8986     # Output is in $new_path
8987 
8988   windows_path="$new_path"
8989   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8990     unix_path=`$CYGPATH -u "$windows_path"`
8991     new_path="$unix_path"
8992   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8993     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8994     new_path="$unix_path"
8995   fi
8996 
8997     # remove trailing .exe if any
8998     new_path="${new_path/%.exe/}"
8999 
9000     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9001     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9002   fi
9003 
9004   else
9005     # We're on a posix platform. Hooray! :)
9006     # First separate the path from the arguments. This will split at the first
9007     # space.
9008     complete="$FOUND_MAKE"
9009     path="${complete%% *}"
9010     tmp="$complete EOL"
9011     arguments="${tmp#* }"
9012 
9013     # Cannot rely on the command "which" here since it doesn't always work.
9014     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9015     if test -z "$is_absolute_path"; then
9016       # Path to executable is not absolute. Find it.
9017       IFS_save="$IFS"
9018       IFS=:
9019       for p in $PATH; do
9020         if test -f "$p/$path" && test -x "$p/$path"; then
9021           new_path="$p/$path"
9022           break
9023         fi
9024       done
9025       IFS="$IFS_save"
9026     else
9027       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9028 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9029       new_path="$path"
9030     fi
9031 
9032     if test "x$new_path" = x; then
9033       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9034 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9035       has_space=`$ECHO "$complete" | $GREP " "`
9036       if test "x$has_space" != x; then
9037         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9038 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9039       fi
9040       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9041     fi
9042   fi
9043 
9044   # Now join together the path and the arguments once again
9045   if test "x$arguments" != xEOL; then
9046     new_complete="$new_path ${arguments% *}"
9047   else
9048     new_complete="$new_path"
9049   fi
9050 
9051   if test "x$complete" != "x$new_complete"; then
9052     FOUND_MAKE="$new_complete"
9053     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9054 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9055   fi
9056 
9057         fi
9058       fi
9059     fi
9060   fi
9061 
9062 
9063     if test "x$FOUND_MAKE" = x; then
9064       for ac_prog in make
9065 do
9066   # Extract the first word of "$ac_prog", so it can be a program name with args.
9067 set dummy $ac_prog; ac_word=$2
9068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9069 $as_echo_n "checking for $ac_word... " >&6; }
9070 if ${ac_cv_path_CHECK_MAKE+:} false; then :
9071   $as_echo_n "(cached) " >&6
9072 else
9073   case $CHECK_MAKE in
9074   [\\/]* | ?:[\\/]*)
9075   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
9076   ;;
9077   *)
9078   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9079 for as_dir in $PATH
9080 do
9081   IFS=$as_save_IFS
9082   test -z "$as_dir" && as_dir=.
9083     for ac_exec_ext in '' $ac_executable_extensions; do
9084   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9085     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
9086     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9087     break 2
9088   fi
9089 done
9090   done
9091 IFS=$as_save_IFS
9092 
9093   ;;
9094 esac
9095 fi
9096 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
9097 if test -n "$CHECK_MAKE"; then
9098   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
9099 $as_echo "$CHECK_MAKE" >&6; }
9100 else
9101   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9102 $as_echo "no" >&6; }
9103 fi
9104 
9105 
9106   test -n "$CHECK_MAKE" && break
9107 done
9108 
9109 
9110   MAKE_CANDIDATE=""$CHECK_MAKE""
9111   DESCRIPTION="make in PATH"
9112   if test "x$MAKE_CANDIDATE" != x; then
9113     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9114 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9115     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9116     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9117     if test "x$IS_GNU_MAKE" = x; then
9118       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9119 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9120     else
9121       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
9122       if test "x$IS_MODERN_MAKE" = x; then
9123         { $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
9124 $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;}
9125       else
9126         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9127           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9128             MAKE_EXPECTED_ENV='cygwin'
9129           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9130             MAKE_EXPECTED_ENV='msys'
9131           else
9132             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9133           fi
9134           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9135           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9136         else
9137           # Not relevant for non-Windows
9138           IS_MAKE_CORRECT_ENV=true
9139         fi
9140         if test "x$IS_MAKE_CORRECT_ENV" = x; then
9141           { $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
9142 $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;}
9143         else
9144           FOUND_MAKE=$MAKE_CANDIDATE
9145 
9146   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9147 
9148   # First separate the path from the arguments. This will split at the first
9149   # space.
9150   complete="$FOUND_MAKE"
9151   path="${complete%% *}"
9152   tmp="$complete EOL"
9153   arguments="${tmp#* }"
9154 
9155   # Input might be given as Windows format, start by converting to
9156   # unix format.
9157   new_path=`$CYGPATH -u "$path"`
9158 
9159   # Now try to locate executable using which
9160   new_path=`$WHICH "$new_path" 2> /dev/null`
9161   # bat and cmd files are not always considered executable in cygwin causing which
9162   # to not find them
9163   if test "x$new_path" = x \
9164       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9165       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9166     new_path=`$CYGPATH -u "$path"`
9167   fi
9168   if test "x$new_path" = x; then
9169     # Oops. Which didn't find the executable.
9170     # The splitting of arguments from the executable at a space might have been incorrect,
9171     # since paths with space are more likely in Windows. Give it another try with the whole
9172     # argument.
9173     path="$complete"
9174     arguments="EOL"
9175     new_path=`$CYGPATH -u "$path"`
9176     new_path=`$WHICH "$new_path" 2> /dev/null`
9177     # bat and cmd files are not always considered executable in cygwin causing which
9178     # to not find them
9179     if test "x$new_path" = x \
9180         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9181         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9182       new_path=`$CYGPATH -u "$path"`
9183     fi
9184     if test "x$new_path" = x; then
9185       # It's still not found. Now this is an unrecoverable error.
9186       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9187 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9188       has_space=`$ECHO "$complete" | $GREP " "`
9189       if test "x$has_space" != x; then
9190         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9191 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9192       fi
9193       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9194     fi
9195   fi
9196 
9197   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9198   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9199   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9200   # "foo.exe" is OK but "foo" is an error.
9201   #
9202   # This test is therefore slightly more accurate than "test -f" to check for file presence.
9203   # It is also a way to make sure we got the proper file name for the real test later on.
9204   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9205   if test "x$test_shortpath" = x; then
9206     # Short path failed, file does not exist as specified.
9207     # Try adding .exe or .cmd
9208     if test -f "${new_path}.exe"; then
9209       input_to_shortpath="${new_path}.exe"
9210     elif test -f "${new_path}.cmd"; then
9211       input_to_shortpath="${new_path}.cmd"
9212     else
9213       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9214 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9215       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9216 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9217       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9218     fi
9219   else
9220     input_to_shortpath="$new_path"
9221   fi
9222 
9223   # Call helper function which possibly converts this using DOS-style short mode.
9224   # If so, the updated path is stored in $new_path.
9225   new_path="$input_to_shortpath"
9226 
9227   input_path="$input_to_shortpath"
9228   # Check if we need to convert this using DOS-style short mode. If the path
9229   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9230   # take no chances and rewrite it.
9231   # Note: m4 eats our [], so we need to use [ and ] instead.
9232   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9233   if test "x$has_forbidden_chars" != x; then
9234     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9235     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9236     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9237     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9238       # Going to short mode and back again did indeed matter. Since short mode is
9239       # case insensitive, let's make it lowercase to improve readability.
9240       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9241       # Now convert it back to Unix-stile (cygpath)
9242       input_path=`$CYGPATH -u "$shortmode_path"`
9243       new_path="$input_path"
9244     fi
9245   fi
9246 
9247   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9248   if test "x$test_cygdrive_prefix" = x; then
9249     # As a simple fix, exclude /usr/bin since it's not a real path.
9250     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9251       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9252       # a path prefixed by /cygdrive for fixpath to work.
9253       new_path="$CYGWIN_ROOT_PATH$input_path"
9254     fi
9255   fi
9256 
9257   # remove trailing .exe if any
9258   new_path="${new_path/%.exe/}"
9259 
9260   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9261 
9262   # First separate the path from the arguments. This will split at the first
9263   # space.
9264   complete="$FOUND_MAKE"
9265   path="${complete%% *}"
9266   tmp="$complete EOL"
9267   arguments="${tmp#* }"
9268 
9269   # Input might be given as Windows format, start by converting to
9270   # unix format.
9271   new_path="$path"
9272 
9273   windows_path="$new_path"
9274   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9275     unix_path=`$CYGPATH -u "$windows_path"`
9276     new_path="$unix_path"
9277   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9278     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9279     new_path="$unix_path"
9280   fi
9281 
9282 
9283   # Now try to locate executable using which
9284   new_path=`$WHICH "$new_path" 2> /dev/null`
9285 
9286   if test "x$new_path" = x; then
9287     # Oops. Which didn't find the executable.
9288     # The splitting of arguments from the executable at a space might have been incorrect,
9289     # since paths with space are more likely in Windows. Give it another try with the whole
9290     # argument.
9291     path="$complete"
9292     arguments="EOL"
9293     new_path="$path"
9294 
9295   windows_path="$new_path"
9296   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9297     unix_path=`$CYGPATH -u "$windows_path"`
9298     new_path="$unix_path"
9299   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9300     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9301     new_path="$unix_path"
9302   fi
9303 
9304 
9305     new_path=`$WHICH "$new_path" 2> /dev/null`
9306 
9307     if test "x$new_path" = x; then
9308       # It's still not found. Now this is an unrecoverable error.
9309       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9310 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9311       has_space=`$ECHO "$complete" | $GREP " "`
9312       if test "x$has_space" != x; then
9313         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9314 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9315       fi
9316       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9317     fi
9318   fi
9319 
9320   # Now new_path has a complete unix path to the binary
9321   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9322     # Keep paths in /bin as-is, but remove trailing .exe if any
9323     new_path="${new_path/%.exe/}"
9324     # Do not save /bin paths to all_fixpath_prefixes!
9325   else
9326     # Not in mixed or Windows style, start by that.
9327     new_path=`cmd //c echo $new_path`
9328 
9329   input_path="$new_path"
9330   # Check if we need to convert this using DOS-style short mode. If the path
9331   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9332   # take no chances and rewrite it.
9333   # Note: m4 eats our [], so we need to use [ and ] instead.
9334   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9335   if test "x$has_forbidden_chars" != x; then
9336     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9337     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9338   fi
9339 
9340     # Output is in $new_path
9341 
9342   windows_path="$new_path"
9343   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9344     unix_path=`$CYGPATH -u "$windows_path"`
9345     new_path="$unix_path"
9346   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9347     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9348     new_path="$unix_path"
9349   fi
9350 
9351     # remove trailing .exe if any
9352     new_path="${new_path/%.exe/}"
9353 
9354     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9355     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9356   fi
9357 
9358   else
9359     # We're on a posix platform. Hooray! :)
9360     # First separate the path from the arguments. This will split at the first
9361     # space.
9362     complete="$FOUND_MAKE"
9363     path="${complete%% *}"
9364     tmp="$complete EOL"
9365     arguments="${tmp#* }"
9366 
9367     # Cannot rely on the command "which" here since it doesn't always work.
9368     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9369     if test -z "$is_absolute_path"; then
9370       # Path to executable is not absolute. Find it.
9371       IFS_save="$IFS"
9372       IFS=:
9373       for p in $PATH; do
9374         if test -f "$p/$path" && test -x "$p/$path"; then
9375           new_path="$p/$path"
9376           break
9377         fi
9378       done
9379       IFS="$IFS_save"
9380     else
9381       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9382 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9383       new_path="$path"
9384     fi
9385 
9386     if test "x$new_path" = x; then
9387       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9388 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9389       has_space=`$ECHO "$complete" | $GREP " "`
9390       if test "x$has_space" != x; then
9391         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9392 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9393       fi
9394       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9395     fi
9396   fi
9397 
9398   # Now join together the path and the arguments once again
9399   if test "x$arguments" != xEOL; then
9400     new_complete="$new_path ${arguments% *}"
9401   else
9402     new_complete="$new_path"
9403   fi
9404 
9405   if test "x$complete" != "x$new_complete"; then
9406     FOUND_MAKE="$new_complete"
9407     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9408 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9409   fi
9410 
9411         fi
9412       fi
9413     fi
9414   fi
9415 
9416     fi
9417 
9418     if test "x$FOUND_MAKE" = x; then
9419       if test "x$TOOLS_DIR" != x; then
9420         # We have a tools-dir, check that as well before giving up.
9421         OLD_PATH=$PATH
9422         PATH=$TOOLS_DIR:$PATH
9423         for ac_prog in gmake
9424 do
9425   # Extract the first word of "$ac_prog", so it can be a program name with args.
9426 set dummy $ac_prog; ac_word=$2
9427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9428 $as_echo_n "checking for $ac_word... " >&6; }
9429 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
9430   $as_echo_n "(cached) " >&6
9431 else
9432   case $CHECK_TOOLSDIR_GMAKE in
9433   [\\/]* | ?:[\\/]*)
9434   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9435   ;;
9436   *)
9437   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9438 for as_dir in $PATH
9439 do
9440   IFS=$as_save_IFS
9441   test -z "$as_dir" && as_dir=.
9442     for ac_exec_ext in '' $ac_executable_extensions; do
9443   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9444     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9445     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9446     break 2
9447   fi
9448 done
9449   done
9450 IFS=$as_save_IFS
9451 
9452   ;;
9453 esac
9454 fi
9455 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9456 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9457   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9458 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9459 else
9460   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9461 $as_echo "no" >&6; }
9462 fi
9463 
9464 
9465   test -n "$CHECK_TOOLSDIR_GMAKE" && break
9466 done
9467 
9468 
9469   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9470   DESCRIPTION="gmake in tools-dir"
9471   if test "x$MAKE_CANDIDATE" != x; then
9472     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9473 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9474     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9475     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9476     if test "x$IS_GNU_MAKE" = x; then
9477       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9478 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9479     else
9480       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
9481       if test "x$IS_MODERN_MAKE" = x; then
9482         { $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
9483 $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;}
9484       else
9485         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9486           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9487             MAKE_EXPECTED_ENV='cygwin'
9488           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9489             MAKE_EXPECTED_ENV='msys'
9490           else
9491             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9492           fi
9493           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9494           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9495         else
9496           # Not relevant for non-Windows
9497           IS_MAKE_CORRECT_ENV=true
9498         fi
9499         if test "x$IS_MAKE_CORRECT_ENV" = x; then
9500           { $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
9501 $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;}
9502         else
9503           FOUND_MAKE=$MAKE_CANDIDATE
9504 
9505   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9506 
9507   # First separate the path from the arguments. This will split at the first
9508   # space.
9509   complete="$FOUND_MAKE"
9510   path="${complete%% *}"
9511   tmp="$complete EOL"
9512   arguments="${tmp#* }"
9513 
9514   # Input might be given as Windows format, start by converting to
9515   # unix format.
9516   new_path=`$CYGPATH -u "$path"`
9517 
9518   # Now try to locate executable using which
9519   new_path=`$WHICH "$new_path" 2> /dev/null`
9520   # bat and cmd files are not always considered executable in cygwin causing which
9521   # to not find them
9522   if test "x$new_path" = x \
9523       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9524       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9525     new_path=`$CYGPATH -u "$path"`
9526   fi
9527   if test "x$new_path" = x; then
9528     # Oops. Which didn't find the executable.
9529     # The splitting of arguments from the executable at a space might have been incorrect,
9530     # since paths with space are more likely in Windows. Give it another try with the whole
9531     # argument.
9532     path="$complete"
9533     arguments="EOL"
9534     new_path=`$CYGPATH -u "$path"`
9535     new_path=`$WHICH "$new_path" 2> /dev/null`
9536     # bat and cmd files are not always considered executable in cygwin causing which
9537     # to not find them
9538     if test "x$new_path" = x \
9539         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9540         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9541       new_path=`$CYGPATH -u "$path"`
9542     fi
9543     if test "x$new_path" = x; then
9544       # It's still not found. Now this is an unrecoverable error.
9545       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9546 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9547       has_space=`$ECHO "$complete" | $GREP " "`
9548       if test "x$has_space" != x; then
9549         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9550 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9551       fi
9552       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9553     fi
9554   fi
9555 
9556   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9557   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9558   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9559   # "foo.exe" is OK but "foo" is an error.
9560   #
9561   # This test is therefore slightly more accurate than "test -f" to check for file presence.
9562   # It is also a way to make sure we got the proper file name for the real test later on.
9563   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9564   if test "x$test_shortpath" = x; then
9565     # Short path failed, file does not exist as specified.
9566     # Try adding .exe or .cmd
9567     if test -f "${new_path}.exe"; then
9568       input_to_shortpath="${new_path}.exe"
9569     elif test -f "${new_path}.cmd"; then
9570       input_to_shortpath="${new_path}.cmd"
9571     else
9572       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9573 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9574       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9575 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9576       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9577     fi
9578   else
9579     input_to_shortpath="$new_path"
9580   fi
9581 
9582   # Call helper function which possibly converts this using DOS-style short mode.
9583   # If so, the updated path is stored in $new_path.
9584   new_path="$input_to_shortpath"
9585 
9586   input_path="$input_to_shortpath"
9587   # Check if we need to convert this using DOS-style short mode. If the path
9588   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9589   # take no chances and rewrite it.
9590   # Note: m4 eats our [], so we need to use [ and ] instead.
9591   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9592   if test "x$has_forbidden_chars" != x; then
9593     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9594     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9595     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9596     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9597       # Going to short mode and back again did indeed matter. Since short mode is
9598       # case insensitive, let's make it lowercase to improve readability.
9599       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9600       # Now convert it back to Unix-stile (cygpath)
9601       input_path=`$CYGPATH -u "$shortmode_path"`
9602       new_path="$input_path"
9603     fi
9604   fi
9605 
9606   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9607   if test "x$test_cygdrive_prefix" = x; then
9608     # As a simple fix, exclude /usr/bin since it's not a real path.
9609     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9610       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9611       # a path prefixed by /cygdrive for fixpath to work.
9612       new_path="$CYGWIN_ROOT_PATH$input_path"
9613     fi
9614   fi
9615 
9616   # remove trailing .exe if any
9617   new_path="${new_path/%.exe/}"
9618 
9619   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9620 
9621   # First separate the path from the arguments. This will split at the first
9622   # space.
9623   complete="$FOUND_MAKE"
9624   path="${complete%% *}"
9625   tmp="$complete EOL"
9626   arguments="${tmp#* }"
9627 
9628   # Input might be given as Windows format, start by converting to
9629   # unix format.
9630   new_path="$path"
9631 
9632   windows_path="$new_path"
9633   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9634     unix_path=`$CYGPATH -u "$windows_path"`
9635     new_path="$unix_path"
9636   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9637     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9638     new_path="$unix_path"
9639   fi
9640 
9641 
9642   # Now try to locate executable using which
9643   new_path=`$WHICH "$new_path" 2> /dev/null`
9644 
9645   if test "x$new_path" = x; then
9646     # Oops. Which didn't find the executable.
9647     # The splitting of arguments from the executable at a space might have been incorrect,
9648     # since paths with space are more likely in Windows. Give it another try with the whole
9649     # argument.
9650     path="$complete"
9651     arguments="EOL"
9652     new_path="$path"
9653 
9654   windows_path="$new_path"
9655   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9656     unix_path=`$CYGPATH -u "$windows_path"`
9657     new_path="$unix_path"
9658   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9659     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9660     new_path="$unix_path"
9661   fi
9662 
9663 
9664     new_path=`$WHICH "$new_path" 2> /dev/null`
9665 
9666     if test "x$new_path" = x; then
9667       # It's still not found. Now this is an unrecoverable error.
9668       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9669 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9670       has_space=`$ECHO "$complete" | $GREP " "`
9671       if test "x$has_space" != x; then
9672         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9673 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9674       fi
9675       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9676     fi
9677   fi
9678 
9679   # Now new_path has a complete unix path to the binary
9680   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9681     # Keep paths in /bin as-is, but remove trailing .exe if any
9682     new_path="${new_path/%.exe/}"
9683     # Do not save /bin paths to all_fixpath_prefixes!
9684   else
9685     # Not in mixed or Windows style, start by that.
9686     new_path=`cmd //c echo $new_path`
9687 
9688   input_path="$new_path"
9689   # Check if we need to convert this using DOS-style short mode. If the path
9690   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9691   # take no chances and rewrite it.
9692   # Note: m4 eats our [], so we need to use [ and ] instead.
9693   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9694   if test "x$has_forbidden_chars" != x; then
9695     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9696     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9697   fi
9698 
9699     # Output is in $new_path
9700 
9701   windows_path="$new_path"
9702   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9703     unix_path=`$CYGPATH -u "$windows_path"`
9704     new_path="$unix_path"
9705   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9706     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9707     new_path="$unix_path"
9708   fi
9709 
9710     # remove trailing .exe if any
9711     new_path="${new_path/%.exe/}"
9712 
9713     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9714     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9715   fi
9716 
9717   else
9718     # We're on a posix platform. Hooray! :)
9719     # First separate the path from the arguments. This will split at the first
9720     # space.
9721     complete="$FOUND_MAKE"
9722     path="${complete%% *}"
9723     tmp="$complete EOL"
9724     arguments="${tmp#* }"
9725 
9726     # Cannot rely on the command "which" here since it doesn't always work.
9727     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9728     if test -z "$is_absolute_path"; then
9729       # Path to executable is not absolute. Find it.
9730       IFS_save="$IFS"
9731       IFS=:
9732       for p in $PATH; do
9733         if test -f "$p/$path" && test -x "$p/$path"; then
9734           new_path="$p/$path"
9735           break
9736         fi
9737       done
9738       IFS="$IFS_save"
9739     else
9740       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9741 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9742       new_path="$path"
9743     fi
9744 
9745     if test "x$new_path" = x; then
9746       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9747 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9748       has_space=`$ECHO "$complete" | $GREP " "`
9749       if test "x$has_space" != x; then
9750         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9751 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9752       fi
9753       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9754     fi
9755   fi
9756 
9757   # Now join together the path and the arguments once again
9758   if test "x$arguments" != xEOL; then
9759     new_complete="$new_path ${arguments% *}"
9760   else
9761     new_complete="$new_path"
9762   fi
9763 
9764   if test "x$complete" != "x$new_complete"; then
9765     FOUND_MAKE="$new_complete"
9766     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9767 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9768   fi
9769 
9770         fi
9771       fi
9772     fi
9773   fi
9774 
9775         if test "x$FOUND_MAKE" = x; then
9776           for ac_prog in make
9777 do
9778   # Extract the first word of "$ac_prog", so it can be a program name with args.
9779 set dummy $ac_prog; ac_word=$2
9780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9781 $as_echo_n "checking for $ac_word... " >&6; }
9782 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
9783   $as_echo_n "(cached) " >&6
9784 else
9785   case $CHECK_TOOLSDIR_MAKE in
9786   [\\/]* | ?:[\\/]*)
9787   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9788   ;;
9789   *)
9790   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9791 for as_dir in $PATH
9792 do
9793   IFS=$as_save_IFS
9794   test -z "$as_dir" && as_dir=.
9795     for ac_exec_ext in '' $ac_executable_extensions; do
9796   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9797     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9798     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9799     break 2
9800   fi
9801 done
9802   done
9803 IFS=$as_save_IFS
9804 
9805   ;;
9806 esac
9807 fi
9808 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9809 if test -n "$CHECK_TOOLSDIR_MAKE"; then
9810   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9811 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9812 else
9813   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9814 $as_echo "no" >&6; }
9815 fi
9816 
9817 
9818   test -n "$CHECK_TOOLSDIR_MAKE" && break
9819 done
9820 
9821 
9822   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9823   DESCRIPTION="make in tools-dir"
9824   if test "x$MAKE_CANDIDATE" != x; then
9825     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9826 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9827     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9828     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9829     if test "x$IS_GNU_MAKE" = x; then
9830       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9831 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9832     else
9833       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
9834       if test "x$IS_MODERN_MAKE" = x; then
9835         { $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
9836 $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;}
9837       else
9838         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9839           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9840             MAKE_EXPECTED_ENV='cygwin'
9841           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9842             MAKE_EXPECTED_ENV='msys'
9843           else
9844             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9845           fi
9846           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9847           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9848         else
9849           # Not relevant for non-Windows
9850           IS_MAKE_CORRECT_ENV=true
9851         fi
9852         if test "x$IS_MAKE_CORRECT_ENV" = x; then
9853           { $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
9854 $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;}
9855         else
9856           FOUND_MAKE=$MAKE_CANDIDATE
9857 
9858   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9859 
9860   # First separate the path from the arguments. This will split at the first
9861   # space.
9862   complete="$FOUND_MAKE"
9863   path="${complete%% *}"
9864   tmp="$complete EOL"
9865   arguments="${tmp#* }"
9866 
9867   # Input might be given as Windows format, start by converting to
9868   # unix format.
9869   new_path=`$CYGPATH -u "$path"`
9870 
9871   # Now try to locate executable using which
9872   new_path=`$WHICH "$new_path" 2> /dev/null`
9873   # bat and cmd files are not always considered executable in cygwin causing which
9874   # to not find them
9875   if test "x$new_path" = x \
9876       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9877       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9878     new_path=`$CYGPATH -u "$path"`
9879   fi
9880   if test "x$new_path" = x; then
9881     # Oops. Which didn't find the executable.
9882     # The splitting of arguments from the executable at a space might have been incorrect,
9883     # since paths with space are more likely in Windows. Give it another try with the whole
9884     # argument.
9885     path="$complete"
9886     arguments="EOL"
9887     new_path=`$CYGPATH -u "$path"`
9888     new_path=`$WHICH "$new_path" 2> /dev/null`
9889     # bat and cmd files are not always considered executable in cygwin causing which
9890     # to not find them
9891     if test "x$new_path" = x \
9892         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9893         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9894       new_path=`$CYGPATH -u "$path"`
9895     fi
9896     if test "x$new_path" = x; then
9897       # It's still not found. Now this is an unrecoverable error.
9898       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9899 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9900       has_space=`$ECHO "$complete" | $GREP " "`
9901       if test "x$has_space" != x; then
9902         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9903 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9904       fi
9905       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9906     fi
9907   fi
9908 
9909   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9910   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9911   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9912   # "foo.exe" is OK but "foo" is an error.
9913   #
9914   # This test is therefore slightly more accurate than "test -f" to check for file presence.
9915   # It is also a way to make sure we got the proper file name for the real test later on.
9916   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9917   if test "x$test_shortpath" = x; then
9918     # Short path failed, file does not exist as specified.
9919     # Try adding .exe or .cmd
9920     if test -f "${new_path}.exe"; then
9921       input_to_shortpath="${new_path}.exe"
9922     elif test -f "${new_path}.cmd"; then
9923       input_to_shortpath="${new_path}.cmd"
9924     else
9925       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9926 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9927       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9928 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9929       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9930     fi
9931   else
9932     input_to_shortpath="$new_path"
9933   fi
9934 
9935   # Call helper function which possibly converts this using DOS-style short mode.
9936   # If so, the updated path is stored in $new_path.
9937   new_path="$input_to_shortpath"
9938 
9939   input_path="$input_to_shortpath"
9940   # Check if we need to convert this using DOS-style short mode. If the path
9941   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9942   # take no chances and rewrite it.
9943   # Note: m4 eats our [], so we need to use [ and ] instead.
9944   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9945   if test "x$has_forbidden_chars" != x; then
9946     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9947     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9948     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9949     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9950       # Going to short mode and back again did indeed matter. Since short mode is
9951       # case insensitive, let's make it lowercase to improve readability.
9952       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9953       # Now convert it back to Unix-stile (cygpath)
9954       input_path=`$CYGPATH -u "$shortmode_path"`
9955       new_path="$input_path"
9956     fi
9957   fi
9958 
9959   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9960   if test "x$test_cygdrive_prefix" = x; then
9961     # As a simple fix, exclude /usr/bin since it's not a real path.
9962     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9963       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9964       # a path prefixed by /cygdrive for fixpath to work.
9965       new_path="$CYGWIN_ROOT_PATH$input_path"
9966     fi
9967   fi
9968 
9969   # remove trailing .exe if any
9970   new_path="${new_path/%.exe/}"
9971 
9972   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9973 
9974   # First separate the path from the arguments. This will split at the first
9975   # space.
9976   complete="$FOUND_MAKE"
9977   path="${complete%% *}"
9978   tmp="$complete EOL"
9979   arguments="${tmp#* }"
9980 
9981   # Input might be given as Windows format, start by converting to
9982   # unix format.
9983   new_path="$path"
9984 
9985   windows_path="$new_path"
9986   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9987     unix_path=`$CYGPATH -u "$windows_path"`
9988     new_path="$unix_path"
9989   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9990     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9991     new_path="$unix_path"
9992   fi
9993 
9994 
9995   # Now try to locate executable using which
9996   new_path=`$WHICH "$new_path" 2> /dev/null`
9997 
9998   if test "x$new_path" = x; then
9999     # Oops. Which didn't find the executable.
10000     # The splitting of arguments from the executable at a space might have been incorrect,
10001     # since paths with space are more likely in Windows. Give it another try with the whole
10002     # argument.
10003     path="$complete"
10004     arguments="EOL"
10005     new_path="$path"
10006 
10007   windows_path="$new_path"
10008   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10009     unix_path=`$CYGPATH -u "$windows_path"`
10010     new_path="$unix_path"
10011   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10012     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
10013     new_path="$unix_path"
10014   fi
10015 
10016 
10017     new_path=`$WHICH "$new_path" 2> /dev/null`
10018 
10019     if test "x$new_path" = x; then
10020       # It's still not found. Now this is an unrecoverable error.
10021       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
10022 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
10023       has_space=`$ECHO "$complete" | $GREP " "`
10024       if test "x$has_space" != x; then
10025         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
10026 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
10027       fi
10028       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
10029     fi
10030   fi
10031 
10032   # Now new_path has a complete unix path to the binary
10033   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
10034     # Keep paths in /bin as-is, but remove trailing .exe if any
10035     new_path="${new_path/%.exe/}"
10036     # Do not save /bin paths to all_fixpath_prefixes!
10037   else
10038     # Not in mixed or Windows style, start by that.
10039     new_path=`cmd //c echo $new_path`
10040 
10041   input_path="$new_path"
10042   # Check if we need to convert this using DOS-style short mode. If the path
10043   # contains just simple characters, use it. Otherwise (spaces, weird characters),
10044   # take no chances and rewrite it.
10045   # Note: m4 eats our [], so we need to use [ and ] instead.
10046   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
10047   if test "x$has_forbidden_chars" != x; then
10048     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10049     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10050   fi
10051 
10052     # Output is in $new_path
10053 
10054   windows_path="$new_path"
10055   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10056     unix_path=`$CYGPATH -u "$windows_path"`
10057     new_path="$unix_path"
10058   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10059     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
10060     new_path="$unix_path"
10061   fi
10062 
10063     # remove trailing .exe if any
10064     new_path="${new_path/%.exe/}"
10065 
10066     # Save the first 10 bytes of this path to the storage, so fixpath can work.
10067     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
10068   fi
10069 
10070   else
10071     # We're on a posix platform. Hooray! :)
10072     # First separate the path from the arguments. This will split at the first
10073     # space.
10074     complete="$FOUND_MAKE"
10075     path="${complete%% *}"
10076     tmp="$complete EOL"
10077     arguments="${tmp#* }"
10078 
10079     # Cannot rely on the command "which" here since it doesn't always work.
10080     is_absolute_path=`$ECHO "$path" | $GREP ^/`
10081     if test -z "$is_absolute_path"; then
10082       # Path to executable is not absolute. Find it.
10083       IFS_save="$IFS"
10084       IFS=:
10085       for p in $PATH; do
10086         if test -f "$p/$path" && test -x "$p/$path"; then
10087           new_path="$p/$path"
10088           break
10089         fi
10090       done
10091       IFS="$IFS_save"
10092     else
10093       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
10094 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
10095       new_path="$path"
10096     fi
10097 
10098     if test "x$new_path" = x; then
10099       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
10100 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
10101       has_space=`$ECHO "$complete" | $GREP " "`
10102       if test "x$has_space" != x; then
10103         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
10104 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
10105       fi
10106       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
10107     fi
10108   fi
10109 
10110   # Now join together the path and the arguments once again
10111   if test "x$arguments" != xEOL; then
10112     new_complete="$new_path ${arguments% *}"
10113   else
10114     new_complete="$new_path"
10115   fi
10116 
10117   if test "x$complete" != "x$new_complete"; then
10118     FOUND_MAKE="$new_complete"
10119     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
10120 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
10121   fi
10122 
10123         fi
10124       fi
10125     fi
10126   fi
10127 
10128         fi
10129         PATH=$OLD_PATH
10130       fi
10131     fi
10132 
10133     if test "x$FOUND_MAKE" = x; then
10134       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
10135     fi
10136   fi
10137 
10138   MAKE=$FOUND_MAKE
10139 
10140   { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
10141 $as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
10142 
10143 
10144 
10145   # Test if find supports -delete
10146   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
10147 $as_echo_n "checking if find supports -delete... " >&6; }
10148   FIND_DELETE="-delete"
10149 
10150   DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
10151 
10152   echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
10153 
10154   TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
10155   if test -f $DELETEDIR/TestIfFindSupportsDelete; then
10156     # No, it does not.
10157     rm $DELETEDIR/TestIfFindSupportsDelete
10158     FIND_DELETE="-exec rm \{\} \+"
10159     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10160 $as_echo "no" >&6; }
10161   else
10162     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10163 $as_echo "yes" >&6; }
10164   fi
10165   rmdir $DELETEDIR
10166 
10167 
10168 
10169   # These tools might not be installed by default,
10170   # need hint on how to install them.
10171 
10172   for ac_prog in unzip
10173 do
10174   # Extract the first word of "$ac_prog", so it can be a program name with args.
10175 set dummy $ac_prog; ac_word=$2
10176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10177 $as_echo_n "checking for $ac_word... " >&6; }
10178 if ${ac_cv_path_UNZIP+:} false; then :
10179   $as_echo_n "(cached) " >&6
10180 else
10181   case $UNZIP in
10182   [\\/]* | ?:[\\/]*)
10183   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
10184   ;;
10185   *)
10186   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10187 for as_dir in $PATH
10188 do
10189   IFS=$as_save_IFS
10190   test -z "$as_dir" && as_dir=.
10191     for ac_exec_ext in '' $ac_executable_extensions; do
10192   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10193     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
10194     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10195     break 2
10196   fi
10197 done
10198   done
10199 IFS=$as_save_IFS
10200 
10201   ;;
10202 esac
10203 fi
10204 UNZIP=$ac_cv_path_UNZIP
10205 if test -n "$UNZIP"; then
10206   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
10207 $as_echo "$UNZIP" >&6; }
10208 else
10209   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10210 $as_echo "no" >&6; }
10211 fi
10212 
10213 
10214   test -n "$UNZIP" && break
10215 done
10216 
10217 
10218   if test "x$UNZIP" = x; then
10219     if test "xunzip" = x; then
10220       PROG_NAME=unzip
10221     else
10222       PROG_NAME=unzip
10223     fi
10224     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10225 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10226     as_fn_error $? "Cannot continue" "$LINENO" 5
10227   fi
10228 
10229 
10230 
10231   for ac_prog in zip
10232 do
10233   # Extract the first word of "$ac_prog", so it can be a program name with args.
10234 set dummy $ac_prog; ac_word=$2
10235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10236 $as_echo_n "checking for $ac_word... " >&6; }
10237 if ${ac_cv_path_ZIP+:} false; then :
10238   $as_echo_n "(cached) " >&6
10239 else
10240   case $ZIP in
10241   [\\/]* | ?:[\\/]*)
10242   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
10243   ;;
10244   *)
10245   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10246 for as_dir in $PATH
10247 do
10248   IFS=$as_save_IFS
10249   test -z "$as_dir" && as_dir=.
10250     for ac_exec_ext in '' $ac_executable_extensions; do
10251   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10252     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
10253     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10254     break 2
10255   fi
10256 done
10257   done
10258 IFS=$as_save_IFS
10259 
10260   ;;
10261 esac
10262 fi
10263 ZIP=$ac_cv_path_ZIP
10264 if test -n "$ZIP"; then
10265   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10266 $as_echo "$ZIP" >&6; }
10267 else
10268   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10269 $as_echo "no" >&6; }
10270 fi
10271 
10272 
10273   test -n "$ZIP" && break
10274 done
10275 
10276 
10277   if test "x$ZIP" = x; then
10278     if test "xzip" = x; then
10279       PROG_NAME=zip
10280     else
10281       PROG_NAME=zip
10282     fi
10283     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10284 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10285     as_fn_error $? "Cannot continue" "$LINENO" 5
10286   fi
10287 
10288 
10289 
10290   # Non-required basic tools
10291 
10292   # Extract the first word of "ldd", so it can be a program name with args.
10293 set dummy ldd; ac_word=$2
10294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10295 $as_echo_n "checking for $ac_word... " >&6; }
10296 if ${ac_cv_path_LDD+:} false; then :
10297   $as_echo_n "(cached) " >&6
10298 else
10299   case $LDD in
10300   [\\/]* | ?:[\\/]*)
10301   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10302   ;;
10303   *)
10304   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10305 for as_dir in $PATH
10306 do
10307   IFS=$as_save_IFS
10308   test -z "$as_dir" && as_dir=.
10309     for ac_exec_ext in '' $ac_executable_extensions; do
10310   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10311     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10312     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10313     break 2
10314   fi
10315 done
10316   done
10317 IFS=$as_save_IFS
10318 
10319   ;;
10320 esac
10321 fi
10322 LDD=$ac_cv_path_LDD
10323 if test -n "$LDD"; then
10324   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10325 $as_echo "$LDD" >&6; }
10326 else
10327   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10328 $as_echo "no" >&6; }
10329 fi
10330 
10331 
10332   if test "x$LDD" = "x"; then
10333     # List shared lib dependencies is used for
10334     # debug output and checking for forbidden dependencies.
10335     # We can build without it.
10336     LDD="true"
10337   fi
10338   for ac_prog in readelf greadelf
10339 do
10340   # Extract the first word of "$ac_prog", so it can be a program name with args.
10341 set dummy $ac_prog; ac_word=$2
10342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10343 $as_echo_n "checking for $ac_word... " >&6; }
10344 if ${ac_cv_path_READELF+:} false; then :
10345   $as_echo_n "(cached) " >&6
10346 else
10347   case $READELF in
10348   [\\/]* | ?:[\\/]*)
10349   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10350   ;;
10351   *)
10352   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10353 for as_dir in $PATH
10354 do
10355   IFS=$as_save_IFS
10356   test -z "$as_dir" && as_dir=.
10357     for ac_exec_ext in '' $ac_executable_extensions; do
10358   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10359     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10360     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10361     break 2
10362   fi
10363 done
10364   done
10365 IFS=$as_save_IFS
10366 
10367   ;;
10368 esac
10369 fi
10370 READELF=$ac_cv_path_READELF
10371 if test -n "$READELF"; then
10372   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10373 $as_echo "$READELF" >&6; }
10374 else
10375   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10376 $as_echo "no" >&6; }
10377 fi
10378 
10379 
10380   test -n "$READELF" && break
10381 done
10382 
10383   # Extract the first word of "hg", so it can be a program name with args.
10384 set dummy hg; ac_word=$2
10385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10386 $as_echo_n "checking for $ac_word... " >&6; }
10387 if ${ac_cv_path_HG+:} false; then :
10388   $as_echo_n "(cached) " >&6
10389 else
10390   case $HG in
10391   [\\/]* | ?:[\\/]*)
10392   ac_cv_path_HG="$HG" # Let the user override the test with a path.
10393   ;;
10394   *)
10395   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10396 for as_dir in $PATH
10397 do
10398   IFS=$as_save_IFS
10399   test -z "$as_dir" && as_dir=.
10400     for ac_exec_ext in '' $ac_executable_extensions; do
10401   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10402     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10403     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10404     break 2
10405   fi
10406 done
10407   done
10408 IFS=$as_save_IFS
10409 
10410   ;;
10411 esac
10412 fi
10413 HG=$ac_cv_path_HG
10414 if test -n "$HG"; then
10415   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10416 $as_echo "$HG" >&6; }
10417 else
10418   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10419 $as_echo "no" >&6; }
10420 fi
10421 
10422 
10423   # Extract the first word of "stat", so it can be a program name with args.
10424 set dummy stat; ac_word=$2
10425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10426 $as_echo_n "checking for $ac_word... " >&6; }
10427 if ${ac_cv_path_STAT+:} false; then :
10428   $as_echo_n "(cached) " >&6
10429 else
10430   case $STAT in
10431   [\\/]* | ?:[\\/]*)
10432   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10433   ;;
10434   *)
10435   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10436 for as_dir in $PATH
10437 do
10438   IFS=$as_save_IFS
10439   test -z "$as_dir" && as_dir=.
10440     for ac_exec_ext in '' $ac_executable_extensions; do
10441   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10442     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10443     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10444     break 2
10445   fi
10446 done
10447   done
10448 IFS=$as_save_IFS
10449 
10450   ;;
10451 esac
10452 fi
10453 STAT=$ac_cv_path_STAT
10454 if test -n "$STAT"; then
10455   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10456 $as_echo "$STAT" >&6; }
10457 else
10458   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10459 $as_echo "no" >&6; }
10460 fi
10461 
10462 
10463   # Extract the first word of "time", so it can be a program name with args.
10464 set dummy time; ac_word=$2
10465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10466 $as_echo_n "checking for $ac_word... " >&6; }
10467 if ${ac_cv_path_TIME+:} false; then :
10468   $as_echo_n "(cached) " >&6
10469 else
10470   case $TIME in
10471   [\\/]* | ?:[\\/]*)
10472   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10473   ;;
10474   *)
10475   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10476 for as_dir in $PATH
10477 do
10478   IFS=$as_save_IFS
10479   test -z "$as_dir" && as_dir=.
10480     for ac_exec_ext in '' $ac_executable_extensions; do
10481   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10482     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10483     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10484     break 2
10485   fi
10486 done
10487   done
10488 IFS=$as_save_IFS
10489 
10490   ;;
10491 esac
10492 fi
10493 TIME=$ac_cv_path_TIME
10494 if test -n "$TIME"; then
10495   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10496 $as_echo "$TIME" >&6; }
10497 else
10498   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10499 $as_echo "no" >&6; }
10500 fi
10501 
10502 
10503   # Check if it's GNU time
10504   IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
10505   if test "x$IS_GNU_TIME" != x; then
10506     IS_GNU_TIME=yes
10507   else
10508     IS_GNU_TIME=no
10509   fi
10510 
10511 
10512   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10513 
10514   for ac_prog in comm
10515 do
10516   # Extract the first word of "$ac_prog", so it can be a program name with args.
10517 set dummy $ac_prog; ac_word=$2
10518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10519 $as_echo_n "checking for $ac_word... " >&6; }
10520 if ${ac_cv_path_COMM+:} false; then :
10521   $as_echo_n "(cached) " >&6
10522 else
10523   case $COMM in
10524   [\\/]* | ?:[\\/]*)
10525   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10526   ;;
10527   *)
10528   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10529 for as_dir in $PATH
10530 do
10531   IFS=$as_save_IFS
10532   test -z "$as_dir" && as_dir=.
10533     for ac_exec_ext in '' $ac_executable_extensions; do
10534   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10535     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10536     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10537     break 2
10538   fi
10539 done
10540   done
10541 IFS=$as_save_IFS
10542 
10543   ;;
10544 esac
10545 fi
10546 COMM=$ac_cv_path_COMM
10547 if test -n "$COMM"; then
10548   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10549 $as_echo "$COMM" >&6; }
10550 else
10551   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10552 $as_echo "no" >&6; }
10553 fi
10554 
10555 
10556   test -n "$COMM" && break
10557 done
10558 
10559 
10560   if test "x$COMM" = x; then
10561     if test "xcomm" = x; then
10562       PROG_NAME=comm
10563     else
10564       PROG_NAME=comm
10565     fi
10566     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10567 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10568     as_fn_error $? "Cannot continue" "$LINENO" 5
10569   fi
10570 
10571 
10572   fi
10573 
10574   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
10575 
10576   for ac_prog in dsymutil
10577 do
10578   # Extract the first word of "$ac_prog", so it can be a program name with args.
10579 set dummy $ac_prog; ac_word=$2
10580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10581 $as_echo_n "checking for $ac_word... " >&6; }
10582 if ${ac_cv_path_DSYMUTIL+:} false; then :
10583   $as_echo_n "(cached) " >&6
10584 else
10585   case $DSYMUTIL in
10586   [\\/]* | ?:[\\/]*)
10587   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
10588   ;;
10589   *)
10590   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10591 for as_dir in $PATH
10592 do
10593   IFS=$as_save_IFS
10594   test -z "$as_dir" && as_dir=.
10595     for ac_exec_ext in '' $ac_executable_extensions; do
10596   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10597     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
10598     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10599     break 2
10600   fi
10601 done
10602   done
10603 IFS=$as_save_IFS
10604 
10605   ;;
10606 esac
10607 fi
10608 DSYMUTIL=$ac_cv_path_DSYMUTIL
10609 if test -n "$DSYMUTIL"; then
10610   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
10611 $as_echo "$DSYMUTIL" >&6; }
10612 else
10613   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10614 $as_echo "no" >&6; }
10615 fi
10616 
10617 
10618   test -n "$DSYMUTIL" && break
10619 done
10620 
10621 
10622   if test "x$DSYMUTIL" = x; then
10623     if test "xdsymutil" = x; then
10624       PROG_NAME=dsymutil
10625     else
10626       PROG_NAME=dsymutil
10627     fi
10628     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10629 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10630     as_fn_error $? "Cannot continue" "$LINENO" 5
10631   fi
10632 
10633 
10634 
10635   for ac_prog in xattr
10636 do
10637   # Extract the first word of "$ac_prog", so it can be a program name with args.
10638 set dummy $ac_prog; ac_word=$2
10639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10640 $as_echo_n "checking for $ac_word... " >&6; }
10641 if ${ac_cv_path_XATTR+:} false; then :
10642   $as_echo_n "(cached) " >&6
10643 else
10644   case $XATTR in
10645   [\\/]* | ?:[\\/]*)
10646   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
10647   ;;
10648   *)
10649   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10650 for as_dir in $PATH
10651 do
10652   IFS=$as_save_IFS
10653   test -z "$as_dir" && as_dir=.
10654     for ac_exec_ext in '' $ac_executable_extensions; do
10655   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10656     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
10657     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10658     break 2
10659   fi
10660 done
10661   done
10662 IFS=$as_save_IFS
10663 
10664   ;;
10665 esac
10666 fi
10667 XATTR=$ac_cv_path_XATTR
10668 if test -n "$XATTR"; then
10669   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
10670 $as_echo "$XATTR" >&6; }
10671 else
10672   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10673 $as_echo "no" >&6; }
10674 fi
10675 
10676 
10677   test -n "$XATTR" && break
10678 done
10679 
10680 
10681   if test "x$XATTR" = x; then
10682     if test "xxattr" = x; then
10683       PROG_NAME=xattr
10684     else
10685       PROG_NAME=xattr
10686     fi
10687     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10688 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10689     as_fn_error $? "Cannot continue" "$LINENO" 5
10690   fi
10691 
10692 
10693     # Extract the first word of "codesign", so it can be a program name with args.
10694 set dummy codesign; ac_word=$2
10695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10696 $as_echo_n "checking for $ac_word... " >&6; }
10697 if ${ac_cv_path_CODESIGN+:} false; then :
10698   $as_echo_n "(cached) " >&6
10699 else
10700   case $CODESIGN in
10701   [\\/]* | ?:[\\/]*)
10702   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
10703   ;;
10704   *)
10705   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10706 for as_dir in $PATH
10707 do
10708   IFS=$as_save_IFS
10709   test -z "$as_dir" && as_dir=.
10710     for ac_exec_ext in '' $ac_executable_extensions; do
10711   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10712     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
10713     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10714     break 2
10715   fi
10716 done
10717   done
10718 IFS=$as_save_IFS
10719 
10720   ;;
10721 esac
10722 fi
10723 CODESIGN=$ac_cv_path_CODESIGN
10724 if test -n "$CODESIGN"; then
10725   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
10726 $as_echo "$CODESIGN" >&6; }
10727 else
10728   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10729 $as_echo "no" >&6; }
10730 fi
10731 
10732 
10733     if test "x$CODESIGN" != "x"; then
10734       # Verify that the openjdk_codesign certificate is present
10735       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
10736 $as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
10737       rm -f codesign-testfile
10738       touch codesign-testfile
10739       codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
10740       rm -f codesign-testfile
10741       if test "x$CODESIGN" = x; then
10742         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10743 $as_echo "no" >&6; }
10744       else
10745         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10746 $as_echo "yes" >&6; }
10747       fi
10748     fi
10749   fi
10750 
10751 
10752 # Check if pkg-config is available.
10753 
10754 
10755 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10756         if test -n "$ac_tool_prefix"; then
10757   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10758 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10760 $as_echo_n "checking for $ac_word... " >&6; }
10761 if ${ac_cv_path_PKG_CONFIG+:} false; then :
10762   $as_echo_n "(cached) " >&6
10763 else
10764   case $PKG_CONFIG in
10765   [\\/]* | ?:[\\/]*)
10766   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10767   ;;
10768   *)
10769   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10770 for as_dir in $PATH
10771 do
10772   IFS=$as_save_IFS
10773   test -z "$as_dir" && as_dir=.
10774     for ac_exec_ext in '' $ac_executable_extensions; do
10775   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10776     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10777     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10778     break 2
10779   fi
10780 done
10781   done
10782 IFS=$as_save_IFS
10783 
10784   ;;
10785 esac
10786 fi
10787 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10788 if test -n "$PKG_CONFIG"; then
10789   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10790 $as_echo "$PKG_CONFIG" >&6; }
10791 else
10792   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10793 $as_echo "no" >&6; }
10794 fi
10795 
10796 
10797 fi
10798 if test -z "$ac_cv_path_PKG_CONFIG"; then
10799   ac_pt_PKG_CONFIG=$PKG_CONFIG
10800   # Extract the first word of "pkg-config", so it can be a program name with args.
10801 set dummy pkg-config; ac_word=$2
10802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10803 $as_echo_n "checking for $ac_word... " >&6; }
10804 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10805   $as_echo_n "(cached) " >&6
10806 else
10807   case $ac_pt_PKG_CONFIG in
10808   [\\/]* | ?:[\\/]*)
10809   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10810   ;;
10811   *)
10812   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10813 for as_dir in $PATH
10814 do
10815   IFS=$as_save_IFS
10816   test -z "$as_dir" && as_dir=.
10817     for ac_exec_ext in '' $ac_executable_extensions; do
10818   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10819     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10820     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10821     break 2
10822   fi
10823 done
10824   done
10825 IFS=$as_save_IFS
10826 
10827   ;;
10828 esac
10829 fi
10830 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10831 if test -n "$ac_pt_PKG_CONFIG"; then
10832   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10833 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
10834 else
10835   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10836 $as_echo "no" >&6; }
10837 fi
10838 
10839   if test "x$ac_pt_PKG_CONFIG" = x; then
10840     PKG_CONFIG=""
10841   else
10842     case $cross_compiling:$ac_tool_warned in
10843 yes:)
10844 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10845 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10846 ac_tool_warned=yes ;;
10847 esac
10848     PKG_CONFIG=$ac_pt_PKG_CONFIG
10849   fi
10850 else
10851   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10852 fi
10853 
10854 fi
10855 if test -n "$PKG_CONFIG"; then
10856         _pkg_min_version=0.9.0
10857         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10858 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10859         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10860                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10861 $as_echo "yes" >&6; }
10862         else
10863                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10864 $as_echo "no" >&6; }
10865                 PKG_CONFIG=""
10866         fi
10867 
10868 fi
10869 
10870 # After basic tools have been setup, we can check build os specific details.
10871 
10872   ###############################################################################
10873 
10874   # Note that this is the build platform OS version!
10875 
10876   OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10877   OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10878   OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10879   OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10880 
10881 
10882 
10883 
10884 
10885 # Setup builddeps, for automatic downloading of tools we need.
10886 # This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10887 # boot-jdk setup, but we need to have basic tools setup first.
10888 
10889 
10890 # Check whether --with-builddeps-conf was given.
10891 if test "${with_builddeps_conf+set}" = set; then :
10892   withval=$with_builddeps_conf;
10893 fi
10894 
10895 
10896 
10897 # Check whether --with-builddeps-server was given.
10898 if test "${with_builddeps_server+set}" = set; then :
10899   withval=$with_builddeps_server;
10900 fi
10901 
10902 
10903 
10904 # Check whether --with-builddeps-dir was given.
10905 if test "${with_builddeps_dir+set}" = set; then :
10906   withval=$with_builddeps_dir;
10907 else
10908   with_builddeps_dir=/localhome/builddeps
10909 fi
10910 
10911 
10912 
10913 # Check whether --with-builddeps-group was given.
10914 if test "${with_builddeps_group+set}" = set; then :
10915   withval=$with_builddeps_group;
10916 fi
10917 
10918 
10919 
10920 
10921   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10922     if test "x$with_builddeps_conf" != x; then
10923       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10924 $as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10925       builddepsfile=$with_builddeps_conf
10926       if test -s $builddepsfile; then
10927         . $builddepsfile
10928         { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10929 $as_echo "loaded!" >&6; }
10930       else
10931         as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10932       fi
10933     else
10934       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10935 $as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10936       builddepsfile=`mktemp`
10937       touch $builddepsfile
10938       # Put all found confs into a single file.
10939       find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10940       # Source the file to acquire the variables
10941       if test -s $builddepsfile; then
10942         . $builddepsfile
10943         { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10944 $as_echo "found at least one!" >&6; }
10945       else
10946         as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10947       fi
10948     fi
10949     # Create build and target names that use _ instead of "-" and ".".
10950     # This is necessary to use them in variable names.
10951     build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10952     target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10953     # Extract rewrite information for build and target
10954     eval rewritten_build=\${REWRITE_${build_var}}
10955     if test "x$rewritten_build" = x; then
10956       rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10957       echo Build stays the same $rewritten_build
10958     else
10959       echo Rewriting build for builddeps into $rewritten_build
10960     fi
10961     eval rewritten_target=\${REWRITE_${target_var}}
10962     if test "x$rewritten_target" = x; then
10963       rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10964       echo Target stays the same $rewritten_target
10965     else
10966       echo Rewriting target for builddeps into $rewritten_target
10967     fi
10968     rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10969     rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10970   fi
10971   for ac_prog in 7z unzip
10972 do
10973   # Extract the first word of "$ac_prog", so it can be a program name with args.
10974 set dummy $ac_prog; ac_word=$2
10975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10976 $as_echo_n "checking for $ac_word... " >&6; }
10977 if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
10978   $as_echo_n "(cached) " >&6
10979 else
10980   if test -n "$BDEPS_UNZIP"; then
10981   ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10982 else
10983 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10984 for as_dir in $PATH
10985 do
10986   IFS=$as_save_IFS
10987   test -z "$as_dir" && as_dir=.
10988     for ac_exec_ext in '' $ac_executable_extensions; do
10989   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10990     ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10991     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10992     break 2
10993   fi
10994 done
10995   done
10996 IFS=$as_save_IFS
10997 
10998 fi
10999 fi
11000 BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
11001 if test -n "$BDEPS_UNZIP"; then
11002   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
11003 $as_echo "$BDEPS_UNZIP" >&6; }
11004 else
11005   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11006 $as_echo "no" >&6; }
11007 fi
11008 
11009 
11010   test -n "$BDEPS_UNZIP" && break
11011 done
11012 
11013   if test "x$BDEPS_UNZIP" = x7z; then
11014     BDEPS_UNZIP="7z x"
11015   fi
11016 
11017   for ac_prog in wget lftp ftp
11018 do
11019   # Extract the first word of "$ac_prog", so it can be a program name with args.
11020 set dummy $ac_prog; ac_word=$2
11021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11022 $as_echo_n "checking for $ac_word... " >&6; }
11023 if ${ac_cv_prog_BDEPS_FTP+:} false; then :
11024   $as_echo_n "(cached) " >&6
11025 else
11026   if test -n "$BDEPS_FTP"; then
11027   ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
11028 else
11029 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11030 for as_dir in $PATH
11031 do
11032   IFS=$as_save_IFS
11033   test -z "$as_dir" && as_dir=.
11034     for ac_exec_ext in '' $ac_executable_extensions; do
11035   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11036     ac_cv_prog_BDEPS_FTP="$ac_prog"
11037     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11038     break 2
11039   fi
11040 done
11041   done
11042 IFS=$as_save_IFS
11043 
11044 fi
11045 fi
11046 BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
11047 if test -n "$BDEPS_FTP"; then
11048   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
11049 $as_echo "$BDEPS_FTP" >&6; }
11050 else
11051   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11052 $as_echo "no" >&6; }
11053 fi
11054 
11055 
11056   test -n "$BDEPS_FTP" && break
11057 done
11058 
11059 
11060 
11061 ###############################################################################
11062 #
11063 # Determine OpenJDK variants, options and version numbers.
11064 #
11065 ###############################################################################
11066 
11067 # We need build & target for this.
11068 
11069 
11070   ###############################################################################
11071   #
11072   # Should we build a JDK/JVM with headful support (ie a graphical ui)?
11073   # We always build headless support.
11074   #
11075   { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
11076 $as_echo_n "checking headful support... " >&6; }
11077   # Check whether --enable-headful was given.
11078 if test "${enable_headful+set}" = set; then :
11079   enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
11080 else
11081   SUPPORT_HEADFUL=yes
11082 fi
11083 
11084 
11085   SUPPORT_HEADLESS=yes
11086   BUILD_HEADLESS="BUILD_HEADLESS:=true"
11087 
11088   if test "x$SUPPORT_HEADFUL" = xyes; then
11089     # We are building both headful and headless.
11090     headful_msg="include support for both headful and headless"
11091   fi
11092 
11093   if test "x$SUPPORT_HEADFUL" = xno; then
11094     # Thus we are building headless only.
11095     BUILD_HEADLESS="BUILD_HEADLESS:=true"
11096     headful_msg="headless only"
11097   fi
11098 
11099   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
11100 $as_echo "$headful_msg" >&6; }
11101 
11102 
11103 
11104 
11105 
11106   # Control wether Hotspot runs Queens test after build.
11107   # Check whether --enable-hotspot-test-in-build was given.
11108 if test "${enable_hotspot_test_in_build+set}" = set; then :
11109   enableval=$enable_hotspot_test_in_build;
11110 else
11111   enable_hotspot_test_in_build=no
11112 fi
11113 
11114   if test "x$enable_hotspot_test_in_build" = "xyes"; then
11115     TEST_IN_BUILD=true
11116   else
11117     TEST_IN_BUILD=false
11118   fi
11119 
11120 
11121   ###############################################################################
11122   #
11123   # Choose cacerts source file
11124   #
11125 
11126 # Check whether --with-cacerts-file was given.
11127 if test "${with_cacerts_file+set}" = set; then :
11128   withval=$with_cacerts_file;
11129 fi
11130 
11131   if test "x$with_cacerts_file" != x; then
11132     CACERTS_FILE=$with_cacerts_file
11133   else
11134     CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
11135   fi
11136 
11137 
11138   ###############################################################################
11139   #
11140   # Enable or disable unlimited crypto
11141   #
11142   # Check whether --enable-unlimited-crypto was given.
11143 if test "${enable_unlimited_crypto+set}" = set; then :
11144   enableval=$enable_unlimited_crypto;
11145 else
11146   enable_unlimited_crypto=no
11147 fi
11148 
11149   if test "x$enable_unlimited_crypto" = "xyes"; then
11150     UNLIMITED_CRYPTO=true
11151   else
11152     UNLIMITED_CRYPTO=false
11153   fi
11154 
11155 
11156   ###############################################################################
11157   #
11158   # Enable or disable the elliptic curve crypto implementation
11159   #
11160 
11161 
11162   ###############################################################################
11163   #
11164   # Compress jars
11165   #
11166   COMPRESS_JARS=false
11167 
11168 
11169 
11170 
11171   # Source the version numbers
11172   . $AUTOCONF_DIR/version-numbers
11173 
11174   # Get the settings from parameters
11175 
11176 # Check whether --with-milestone was given.
11177 if test "${with_milestone+set}" = set; then :
11178   withval=$with_milestone;
11179 fi
11180 
11181   if test "x$with_milestone" = xyes; then
11182     as_fn_error $? "Milestone must have a value" "$LINENO" 5
11183   elif test "x$with_milestone" != x; then
11184     MILESTONE="$with_milestone"
11185   fi
11186   if test "x$MILESTONE" = x; then
11187     MILESTONE=internal
11188   fi
11189 
11190 
11191 # Check whether --with-update-version was given.
11192 if test "${with_update_version+set}" = set; then :
11193   withval=$with_update_version;
11194 fi
11195 
11196   if test "x$with_update_version" = xyes; then
11197     as_fn_error $? "Update version must have a value" "$LINENO" 5
11198   elif test "x$with_update_version" != x; then
11199     JDK_UPDATE_VERSION="$with_update_version"
11200     # On macosx 10.7, it's not possible to set --with-update-version=0X due
11201     # to a bug in expr (which reduces it to just X). To work around this, we
11202     # always add a 0 to one digit update versions.
11203     if test "${#JDK_UPDATE_VERSION}" = "1"; then
11204       JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
11205     fi
11206   fi
11207 
11208 
11209 # Check whether --with-user-release-suffix was given.
11210 if test "${with_user_release_suffix+set}" = set; then :
11211   withval=$with_user_release_suffix;
11212 fi
11213 
11214   if test "x$with_user_release_suffix" = xyes; then
11215     as_fn_error $? "Release suffix must have a value" "$LINENO" 5
11216   elif test "x$with_user_release_suffix" != x; then
11217     USER_RELEASE_SUFFIX="$with_user_release_suffix"
11218   fi
11219 
11220 
11221 # Check whether --with-build-number was given.
11222 if test "${with_build_number+set}" = set; then :
11223   withval=$with_build_number;
11224 fi
11225 
11226   if test "x$with_build_number" = xyes; then
11227     as_fn_error $? "Build number must have a value" "$LINENO" 5
11228   elif test "x$with_build_number" != x; then
11229     JDK_BUILD_NUMBER="$with_build_number"
11230   fi
11231   # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
11232   if test "x$JDK_BUILD_NUMBER" = x; then
11233     JDK_BUILD_NUMBER=b00
11234     if test "x$USER_RELEASE_SUFFIX" = x; then
11235       BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
11236       # Avoid [:alnum:] since it depends on the locale.
11237       CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
11238       USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11239     fi
11240   fi
11241 
11242   # Now set the JDK version, milestone, build number etc.
11243 
11244 
11245 
11246 
11247 
11248 
11249 
11250 
11251 
11252 
11253 
11254 
11255 
11256 
11257 
11258 
11259 # Check whether --with-copyright-year was given.
11260 if test "${with_copyright_year+set}" = set; then :
11261   withval=$with_copyright_year;
11262 fi
11263 
11264   if test "x$with_copyright_year" = xyes; then
11265     as_fn_error $? "Copyright year must have a value" "$LINENO" 5
11266   elif test "x$with_copyright_year" != x; then
11267     COPYRIGHT_YEAR="$with_copyright_year"
11268   else
11269     COPYRIGHT_YEAR=`date +'%Y'`
11270   fi
11271 
11272 
11273   if test "x$JDK_UPDATE_VERSION" != x; then
11274     JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
11275   else
11276     JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
11277   fi
11278 
11279 
11280   COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
11281 
11282 
11283 
11284 ###############################################################################
11285 #
11286 # Setup BootJDK, used to bootstrap the build.
11287 #
11288 ###############################################################################
11289 
11290 
11291   BOOT_JDK_FOUND=no
11292 
11293 # Check whether --with-boot-jdk was given.
11294 if test "${with_boot_jdk+set}" = set; then :
11295   withval=$with_boot_jdk;
11296 fi
11297 
11298 
11299   # We look for the Boot JDK through various means, going from more certain to
11300   # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
11301   # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
11302   # must check if this is indeed valid; otherwise we'll continue looking.
11303 
11304   # Test: Is bootjdk explicitely set by command line arguments?
11305 
11306   if test "x$BOOT_JDK_FOUND" = xno; then
11307     # Now execute the test
11308 
11309   if test "x$with_boot_jdk" != x; then
11310     BOOT_JDK=$with_boot_jdk
11311     BOOT_JDK_FOUND=maybe
11312     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
11313 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
11314   fi
11315 
11316 
11317     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11318     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11319       # Do we have a bin/java?
11320       if test ! -x "$BOOT_JDK/bin/java"; then
11321         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11322 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11323         BOOT_JDK_FOUND=no
11324       else
11325         # Do we have a bin/javac?
11326         if test ! -x "$BOOT_JDK/bin/javac"; then
11327           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11328 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11329           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11330 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11331           BOOT_JDK_FOUND=no
11332         else
11333           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11334           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11335             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11336 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11337             BOOT_JDK_FOUND=no
11338           else
11339             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11340             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11341 
11342             # Extra M4 quote needed to protect [] in grep expression.
11343             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11344             if test "x$FOUND_VERSION_78" = x; then
11345               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11346 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11347               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11348 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11349               BOOT_JDK_FOUND=no
11350             else
11351               # We're done! :-)
11352               BOOT_JDK_FOUND=yes
11353 
11354   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11355 
11356   # Input might be given as Windows format, start by converting to
11357   # unix format.
11358   path="$BOOT_JDK"
11359   new_path=`$CYGPATH -u "$path"`
11360 
11361   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11362   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11363   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11364   # "foo.exe" is OK but "foo" is an error.
11365   #
11366   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11367   # It is also a way to make sure we got the proper file name for the real test later on.
11368   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11369   if test "x$test_shortpath" = x; then
11370     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11371 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11372     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11373   fi
11374 
11375   # Call helper function which possibly converts this using DOS-style short mode.
11376   # If so, the updated path is stored in $new_path.
11377 
11378   input_path="$new_path"
11379   # Check if we need to convert this using DOS-style short mode. If the path
11380   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11381   # take no chances and rewrite it.
11382   # Note: m4 eats our [], so we need to use [ and ] instead.
11383   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11384   if test "x$has_forbidden_chars" != x; then
11385     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11386     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11387     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11388     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11389       # Going to short mode and back again did indeed matter. Since short mode is
11390       # case insensitive, let's make it lowercase to improve readability.
11391       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11392       # Now convert it back to Unix-stile (cygpath)
11393       input_path=`$CYGPATH -u "$shortmode_path"`
11394       new_path="$input_path"
11395     fi
11396   fi
11397 
11398   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11399   if test "x$test_cygdrive_prefix" = x; then
11400     # As a simple fix, exclude /usr/bin since it's not a real path.
11401     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11402       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11403       # a path prefixed by /cygdrive for fixpath to work.
11404       new_path="$CYGWIN_ROOT_PATH$input_path"
11405     fi
11406   fi
11407 
11408 
11409   if test "x$path" != "x$new_path"; then
11410     BOOT_JDK="$new_path"
11411     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11412 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11413   fi
11414 
11415   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11416 
11417   path="$BOOT_JDK"
11418   has_colon=`$ECHO $path | $GREP ^.:`
11419   new_path="$path"
11420   if test "x$has_colon" = x; then
11421     # Not in mixed or Windows style, start by that.
11422     new_path=`cmd //c echo $path`
11423   fi
11424 
11425 
11426   input_path="$new_path"
11427   # Check if we need to convert this using DOS-style short mode. If the path
11428   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11429   # take no chances and rewrite it.
11430   # Note: m4 eats our [], so we need to use [ and ] instead.
11431   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11432   if test "x$has_forbidden_chars" != x; then
11433     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11434     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11435   fi
11436 
11437 
11438   windows_path="$new_path"
11439   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11440     unix_path=`$CYGPATH -u "$windows_path"`
11441     new_path="$unix_path"
11442   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11443     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11444     new_path="$unix_path"
11445   fi
11446 
11447   if test "x$path" != "x$new_path"; then
11448     BOOT_JDK="$new_path"
11449     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11450 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11451   fi
11452 
11453   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11454   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11455 
11456   else
11457     # We're on a posix platform. Hooray! :)
11458     path="$BOOT_JDK"
11459     has_space=`$ECHO "$path" | $GREP " "`
11460     if test "x$has_space" != x; then
11461       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11462 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11463       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11464     fi
11465 
11466     # Use eval to expand a potential ~
11467     eval path="$path"
11468     if test ! -f "$path" && test ! -d "$path"; then
11469       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11470     fi
11471 
11472     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11473   fi
11474 
11475               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11476 $as_echo_n "checking for Boot JDK... " >&6; }
11477               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11478 $as_echo "$BOOT_JDK" >&6; }
11479               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11480 $as_echo_n "checking Boot JDK version... " >&6; }
11481               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11482               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11483 $as_echo "$BOOT_JDK_VERSION" >&6; }
11484             fi # end check jdk version
11485           fi # end check rt.jar
11486         fi # end check javac
11487       fi # end check java
11488     fi # end check boot jdk found
11489   fi
11490 
11491   if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11492     # Having specified an argument which is incorrect will produce an instant failure;
11493     # we should not go on looking
11494     as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11495   fi
11496 
11497   # Test: Is bootjdk available from builddeps?
11498 
11499   if test "x$BOOT_JDK_FOUND" = xno; then
11500     # Now execute the test
11501 
11502 
11503 
11504   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11505     # Source the builddeps file again, to make sure it uses the latest variables!
11506     . $builddepsfile
11507     # Look for a target and build machine specific resource!
11508     eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11509     if test "x$resource" = x; then
11510       # Ok, lets instead look for a target specific resource
11511       eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11512     fi
11513     if test "x$resource" = x; then
11514       # Ok, lets instead look for a build specific resource
11515       eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11516     fi
11517     if test "x$resource" = x; then
11518       # Ok, lets instead look for a generic resource
11519       # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11520       resource=${builddep_bootjdk}
11521     fi
11522     if test "x$resource" != x; then
11523       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11524 $as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11525       # If the resource in the builddeps.conf file is an existing directory,
11526       # for example /java/linux/cups
11527       if test -d ${resource}; then
11528         depdir=${resource}
11529       else
11530 
11531   # bootjdk is for example mymodule
11532   # $resource is for example libs/general/libmymod_1_2_3.zip
11533   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11534   # $with_builddeps_dir is for example /localhome/builddeps
11535   # depdir is the name of the variable into which we store the depdir, eg MYMOD
11536   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11537   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11538   filename=`basename $resource`
11539   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11540   filebase=${filename%%.*}
11541   extension=${filename#*.}
11542   installdir=$with_builddeps_dir/$filebase
11543   if test ! -f $installdir/$filename.unpacked; then
11544     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11545 $as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11546     if test ! -d $installdir; then
11547       mkdir -p $installdir
11548     fi
11549     if test ! -d $installdir; then
11550       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11551     fi
11552     tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11553     touch $tmpfile
11554     if test ! -f $tmpfile; then
11555       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11556     fi
11557 
11558   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11559   # $tmpfile is the local file name for the downloaded file.
11560   VALID_TOOL=no
11561   if test "x$BDEPS_FTP" = xwget; then
11562     VALID_TOOL=yes
11563     wget -O $tmpfile $with_builddeps_server/$resource
11564   fi
11565   if test "x$BDEPS_FTP" = xlftp; then
11566     VALID_TOOL=yes
11567     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11568   fi
11569   if test "x$BDEPS_FTP" = xftp; then
11570     VALID_TOOL=yes
11571     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11572     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11573     FTPUSERPWD=${FTPSERVER%%@*}
11574     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11575       FTPUSER=${userpwd%%:*}
11576       FTPPWD=${userpwd#*@}
11577       FTPSERVER=${FTPSERVER#*@}
11578     else
11579       FTPUSER=ftp
11580       FTPPWD=ftp
11581     fi
11582     # the "pass" command does not work on some
11583     # ftp clients (read ftp.exe) but if it works,
11584     # passive mode is better!
11585     ( \
11586         echo "user $FTPUSER $FTPPWD"        ; \
11587         echo "pass"                         ; \
11588         echo "bin"                          ; \
11589         echo "get $FTPPATH $tmpfile"              ; \
11590     ) | ftp -in $FTPSERVER
11591   fi
11592   if test "x$VALID_TOOL" != xyes; then
11593     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11594   fi
11595 
11596     mv $tmpfile $installdir/$filename
11597     if test ! -s $installdir/$filename; then
11598       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11599     fi
11600     case "$extension" in
11601       zip)  echo "Unzipping $installdir/$filename..."
11602         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11603         ;;
11604       tar.gz) echo "Untaring $installdir/$filename..."
11605         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11606         ;;
11607       tgz) echo "Untaring $installdir/$filename..."
11608         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11609         ;;
11610       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11611         ;;
11612     esac
11613   fi
11614   if test -f $installdir/$filename.unpacked; then
11615     depdir=$installdir
11616   fi
11617 
11618       fi
11619       # Source the builddeps file again, because in the previous command, the depdir
11620       # was updated to point at the current build dependency install directory.
11621       . $builddepsfile
11622       # Now extract variables from the builddeps.conf files.
11623       theroot=${builddep_bootjdk_ROOT}
11624       thecflags=${builddep_bootjdk_CFLAGS}
11625       thelibs=${builddep_bootjdk_LIBS}
11626       if test "x$depdir" = x; then
11627         as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11628       fi
11629       BOOT_JDK=$depdir
11630       if test "x$theroot" != x; then
11631         BOOT_JDK="$theroot"
11632       fi
11633       if test "x$thecflags" != x; then
11634         BOOT_JDK_CFLAGS="$thecflags"
11635       fi
11636       if test "x$thelibs" != x; then
11637         BOOT_JDK_LIBS="$thelibs"
11638       fi
11639       BOOT_JDK_FOUND=maybe
11640       else BOOT_JDK_FOUND=no
11641 
11642     fi
11643     else BOOT_JDK_FOUND=no
11644 
11645   fi
11646 
11647 
11648 
11649     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11650     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11651       # Do we have a bin/java?
11652       if test ! -x "$BOOT_JDK/bin/java"; then
11653         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11654 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11655         BOOT_JDK_FOUND=no
11656       else
11657         # Do we have a bin/javac?
11658         if test ! -x "$BOOT_JDK/bin/javac"; then
11659           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11660 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11661           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11662 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11663           BOOT_JDK_FOUND=no
11664         else
11665           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11666           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11667             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11668 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11669             BOOT_JDK_FOUND=no
11670           else
11671             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11672             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11673 
11674             # Extra M4 quote needed to protect [] in grep expression.
11675             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11676             if test "x$FOUND_VERSION_78" = x; then
11677               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11678 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11679               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11680 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11681               BOOT_JDK_FOUND=no
11682             else
11683               # We're done! :-)
11684               BOOT_JDK_FOUND=yes
11685 
11686   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11687 
11688   # Input might be given as Windows format, start by converting to
11689   # unix format.
11690   path="$BOOT_JDK"
11691   new_path=`$CYGPATH -u "$path"`
11692 
11693   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11694   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11695   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11696   # "foo.exe" is OK but "foo" is an error.
11697   #
11698   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11699   # It is also a way to make sure we got the proper file name for the real test later on.
11700   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11701   if test "x$test_shortpath" = x; then
11702     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11703 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11704     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11705   fi
11706 
11707   # Call helper function which possibly converts this using DOS-style short mode.
11708   # If so, the updated path is stored in $new_path.
11709 
11710   input_path="$new_path"
11711   # Check if we need to convert this using DOS-style short mode. If the path
11712   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11713   # take no chances and rewrite it.
11714   # Note: m4 eats our [], so we need to use [ and ] instead.
11715   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11716   if test "x$has_forbidden_chars" != x; then
11717     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11718     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11719     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11720     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11721       # Going to short mode and back again did indeed matter. Since short mode is
11722       # case insensitive, let's make it lowercase to improve readability.
11723       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11724       # Now convert it back to Unix-stile (cygpath)
11725       input_path=`$CYGPATH -u "$shortmode_path"`
11726       new_path="$input_path"
11727     fi
11728   fi
11729 
11730   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11731   if test "x$test_cygdrive_prefix" = x; then
11732     # As a simple fix, exclude /usr/bin since it's not a real path.
11733     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11734       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11735       # a path prefixed by /cygdrive for fixpath to work.
11736       new_path="$CYGWIN_ROOT_PATH$input_path"
11737     fi
11738   fi
11739 
11740 
11741   if test "x$path" != "x$new_path"; then
11742     BOOT_JDK="$new_path"
11743     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11744 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11745   fi
11746 
11747   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11748 
11749   path="$BOOT_JDK"
11750   has_colon=`$ECHO $path | $GREP ^.:`
11751   new_path="$path"
11752   if test "x$has_colon" = x; then
11753     # Not in mixed or Windows style, start by that.
11754     new_path=`cmd //c echo $path`
11755   fi
11756 
11757 
11758   input_path="$new_path"
11759   # Check if we need to convert this using DOS-style short mode. If the path
11760   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11761   # take no chances and rewrite it.
11762   # Note: m4 eats our [], so we need to use [ and ] instead.
11763   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11764   if test "x$has_forbidden_chars" != x; then
11765     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11766     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11767   fi
11768 
11769 
11770   windows_path="$new_path"
11771   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11772     unix_path=`$CYGPATH -u "$windows_path"`
11773     new_path="$unix_path"
11774   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11775     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11776     new_path="$unix_path"
11777   fi
11778 
11779   if test "x$path" != "x$new_path"; then
11780     BOOT_JDK="$new_path"
11781     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11782 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11783   fi
11784 
11785   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11786   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11787 
11788   else
11789     # We're on a posix platform. Hooray! :)
11790     path="$BOOT_JDK"
11791     has_space=`$ECHO "$path" | $GREP " "`
11792     if test "x$has_space" != x; then
11793       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11794 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11795       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11796     fi
11797 
11798     # Use eval to expand a potential ~
11799     eval path="$path"
11800     if test ! -f "$path" && test ! -d "$path"; then
11801       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11802     fi
11803 
11804     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11805   fi
11806 
11807               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11808 $as_echo_n "checking for Boot JDK... " >&6; }
11809               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11810 $as_echo "$BOOT_JDK" >&6; }
11811               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11812 $as_echo_n "checking Boot JDK version... " >&6; }
11813               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11814               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11815 $as_echo "$BOOT_JDK_VERSION" >&6; }
11816             fi # end check jdk version
11817           fi # end check rt.jar
11818         fi # end check javac
11819       fi # end check java
11820     fi # end check boot jdk found
11821   fi
11822 
11823 
11824   # Test: Is $JAVA_HOME set?
11825 
11826   if test "x$BOOT_JDK_FOUND" = xno; then
11827     # Now execute the test
11828 
11829   if test "x$JAVA_HOME" != x; then
11830     JAVA_HOME_PROCESSED="$JAVA_HOME"
11831 
11832   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11833 
11834   # Input might be given as Windows format, start by converting to
11835   # unix format.
11836   path="$JAVA_HOME_PROCESSED"
11837   new_path=`$CYGPATH -u "$path"`
11838 
11839   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11840   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11841   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11842   # "foo.exe" is OK but "foo" is an error.
11843   #
11844   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11845   # It is also a way to make sure we got the proper file name for the real test later on.
11846   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11847   if test "x$test_shortpath" = x; then
11848     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11849 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11850     as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11851   fi
11852 
11853   # Call helper function which possibly converts this using DOS-style short mode.
11854   # If so, the updated path is stored in $new_path.
11855 
11856   input_path="$new_path"
11857   # Check if we need to convert this using DOS-style short mode. If the path
11858   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11859   # take no chances and rewrite it.
11860   # Note: m4 eats our [], so we need to use [ and ] instead.
11861   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11862   if test "x$has_forbidden_chars" != x; then
11863     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11864     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11865     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11866     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11867       # Going to short mode and back again did indeed matter. Since short mode is
11868       # case insensitive, let's make it lowercase to improve readability.
11869       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11870       # Now convert it back to Unix-stile (cygpath)
11871       input_path=`$CYGPATH -u "$shortmode_path"`
11872       new_path="$input_path"
11873     fi
11874   fi
11875 
11876   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11877   if test "x$test_cygdrive_prefix" = x; then
11878     # As a simple fix, exclude /usr/bin since it's not a real path.
11879     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11880       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11881       # a path prefixed by /cygdrive for fixpath to work.
11882       new_path="$CYGWIN_ROOT_PATH$input_path"
11883     fi
11884   fi
11885 
11886 
11887   if test "x$path" != "x$new_path"; then
11888     JAVA_HOME_PROCESSED="$new_path"
11889     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11890 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11891   fi
11892 
11893   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11894 
11895   path="$JAVA_HOME_PROCESSED"
11896   has_colon=`$ECHO $path | $GREP ^.:`
11897   new_path="$path"
11898   if test "x$has_colon" = x; then
11899     # Not in mixed or Windows style, start by that.
11900     new_path=`cmd //c echo $path`
11901   fi
11902 
11903 
11904   input_path="$new_path"
11905   # Check if we need to convert this using DOS-style short mode. If the path
11906   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11907   # take no chances and rewrite it.
11908   # Note: m4 eats our [], so we need to use [ and ] instead.
11909   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11910   if test "x$has_forbidden_chars" != x; then
11911     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11912     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11913   fi
11914 
11915 
11916   windows_path="$new_path"
11917   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11918     unix_path=`$CYGPATH -u "$windows_path"`
11919     new_path="$unix_path"
11920   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11921     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11922     new_path="$unix_path"
11923   fi
11924 
11925   if test "x$path" != "x$new_path"; then
11926     JAVA_HOME_PROCESSED="$new_path"
11927     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11928 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11929   fi
11930 
11931   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11932   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11933 
11934   else
11935     # We're on a posix platform. Hooray! :)
11936     path="$JAVA_HOME_PROCESSED"
11937     has_space=`$ECHO "$path" | $GREP " "`
11938     if test "x$has_space" != x; then
11939       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11940 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11941       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11942     fi
11943 
11944     # Use eval to expand a potential ~
11945     eval path="$path"
11946     if test ! -f "$path" && test ! -d "$path"; then
11947       as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11948     fi
11949 
11950     JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
11951   fi
11952 
11953     if test ! -d "$JAVA_HOME_PROCESSED"; then
11954       { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11955 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11956     else
11957       # Aha, the user has set a JAVA_HOME
11958       # let us use that as the Boot JDK.
11959       BOOT_JDK="$JAVA_HOME_PROCESSED"
11960       BOOT_JDK_FOUND=maybe
11961       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11962 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11963     fi
11964   fi
11965 
11966 
11967     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11968     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11969       # Do we have a bin/java?
11970       if test ! -x "$BOOT_JDK/bin/java"; then
11971         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11972 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11973         BOOT_JDK_FOUND=no
11974       else
11975         # Do we have a bin/javac?
11976         if test ! -x "$BOOT_JDK/bin/javac"; then
11977           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11978 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11979           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11980 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11981           BOOT_JDK_FOUND=no
11982         else
11983           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11984           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11985             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11986 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11987             BOOT_JDK_FOUND=no
11988           else
11989             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11990             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11991 
11992             # Extra M4 quote needed to protect [] in grep expression.
11993             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11994             if test "x$FOUND_VERSION_78" = x; then
11995               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11996 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11997               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11998 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11999               BOOT_JDK_FOUND=no
12000             else
12001               # We're done! :-)
12002               BOOT_JDK_FOUND=yes
12003 
12004   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12005 
12006   # Input might be given as Windows format, start by converting to
12007   # unix format.
12008   path="$BOOT_JDK"
12009   new_path=`$CYGPATH -u "$path"`
12010 
12011   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12012   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12013   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12014   # "foo.exe" is OK but "foo" is an error.
12015   #
12016   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12017   # It is also a way to make sure we got the proper file name for the real test later on.
12018   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12019   if test "x$test_shortpath" = x; then
12020     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12021 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12022     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12023   fi
12024 
12025   # Call helper function which possibly converts this using DOS-style short mode.
12026   # If so, the updated path is stored in $new_path.
12027 
12028   input_path="$new_path"
12029   # Check if we need to convert this using DOS-style short mode. If the path
12030   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12031   # take no chances and rewrite it.
12032   # Note: m4 eats our [], so we need to use [ and ] instead.
12033   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12034   if test "x$has_forbidden_chars" != x; then
12035     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12036     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12037     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12038     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12039       # Going to short mode and back again did indeed matter. Since short mode is
12040       # case insensitive, let's make it lowercase to improve readability.
12041       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12042       # Now convert it back to Unix-stile (cygpath)
12043       input_path=`$CYGPATH -u "$shortmode_path"`
12044       new_path="$input_path"
12045     fi
12046   fi
12047 
12048   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12049   if test "x$test_cygdrive_prefix" = x; then
12050     # As a simple fix, exclude /usr/bin since it's not a real path.
12051     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12052       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12053       # a path prefixed by /cygdrive for fixpath to work.
12054       new_path="$CYGWIN_ROOT_PATH$input_path"
12055     fi
12056   fi
12057 
12058 
12059   if test "x$path" != "x$new_path"; then
12060     BOOT_JDK="$new_path"
12061     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12062 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12063   fi
12064 
12065   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12066 
12067   path="$BOOT_JDK"
12068   has_colon=`$ECHO $path | $GREP ^.:`
12069   new_path="$path"
12070   if test "x$has_colon" = x; then
12071     # Not in mixed or Windows style, start by that.
12072     new_path=`cmd //c echo $path`
12073   fi
12074 
12075 
12076   input_path="$new_path"
12077   # Check if we need to convert this using DOS-style short mode. If the path
12078   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12079   # take no chances and rewrite it.
12080   # Note: m4 eats our [], so we need to use [ and ] instead.
12081   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12082   if test "x$has_forbidden_chars" != x; then
12083     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12084     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12085   fi
12086 
12087 
12088   windows_path="$new_path"
12089   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12090     unix_path=`$CYGPATH -u "$windows_path"`
12091     new_path="$unix_path"
12092   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12093     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12094     new_path="$unix_path"
12095   fi
12096 
12097   if test "x$path" != "x$new_path"; then
12098     BOOT_JDK="$new_path"
12099     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12100 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12101   fi
12102 
12103   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12104   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12105 
12106   else
12107     # We're on a posix platform. Hooray! :)
12108     path="$BOOT_JDK"
12109     has_space=`$ECHO "$path" | $GREP " "`
12110     if test "x$has_space" != x; then
12111       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12112 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12113       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12114     fi
12115 
12116     # Use eval to expand a potential ~
12117     eval path="$path"
12118     if test ! -f "$path" && test ! -d "$path"; then
12119       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12120     fi
12121 
12122     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12123   fi
12124 
12125               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12126 $as_echo_n "checking for Boot JDK... " >&6; }
12127               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12128 $as_echo "$BOOT_JDK" >&6; }
12129               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12130 $as_echo_n "checking Boot JDK version... " >&6; }
12131               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12132               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12133 $as_echo "$BOOT_JDK_VERSION" >&6; }
12134             fi # end check jdk version
12135           fi # end check rt.jar
12136         fi # end check javac
12137       fi # end check java
12138     fi # end check boot jdk found
12139   fi
12140 
12141 
12142   # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
12143 
12144   if test "x$BOOT_JDK_FOUND" = xno; then
12145     # Now execute the test
12146 
12147   if test -x /usr/libexec/java_home; then
12148     BOOT_JDK=`/usr/libexec/java_home`
12149     BOOT_JDK_FOUND=maybe
12150     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
12151 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
12152   fi
12153 
12154 
12155     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12156     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12157       # Do we have a bin/java?
12158       if test ! -x "$BOOT_JDK/bin/java"; then
12159         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12160 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12161         BOOT_JDK_FOUND=no
12162       else
12163         # Do we have a bin/javac?
12164         if test ! -x "$BOOT_JDK/bin/javac"; then
12165           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12166 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12167           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12168 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12169           BOOT_JDK_FOUND=no
12170         else
12171           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12172           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12173             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12174 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12175             BOOT_JDK_FOUND=no
12176           else
12177             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12178             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12179 
12180             # Extra M4 quote needed to protect [] in grep expression.
12181             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12182             if test "x$FOUND_VERSION_78" = x; then
12183               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12184 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12185               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12186 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12187               BOOT_JDK_FOUND=no
12188             else
12189               # We're done! :-)
12190               BOOT_JDK_FOUND=yes
12191 
12192   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12193 
12194   # Input might be given as Windows format, start by converting to
12195   # unix format.
12196   path="$BOOT_JDK"
12197   new_path=`$CYGPATH -u "$path"`
12198 
12199   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12200   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12201   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12202   # "foo.exe" is OK but "foo" is an error.
12203   #
12204   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12205   # It is also a way to make sure we got the proper file name for the real test later on.
12206   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12207   if test "x$test_shortpath" = x; then
12208     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12209 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12210     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12211   fi
12212 
12213   # Call helper function which possibly converts this using DOS-style short mode.
12214   # If so, the updated path is stored in $new_path.
12215 
12216   input_path="$new_path"
12217   # Check if we need to convert this using DOS-style short mode. If the path
12218   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12219   # take no chances and rewrite it.
12220   # Note: m4 eats our [], so we need to use [ and ] instead.
12221   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12222   if test "x$has_forbidden_chars" != x; then
12223     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12224     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12225     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12226     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12227       # Going to short mode and back again did indeed matter. Since short mode is
12228       # case insensitive, let's make it lowercase to improve readability.
12229       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12230       # Now convert it back to Unix-stile (cygpath)
12231       input_path=`$CYGPATH -u "$shortmode_path"`
12232       new_path="$input_path"
12233     fi
12234   fi
12235 
12236   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12237   if test "x$test_cygdrive_prefix" = x; then
12238     # As a simple fix, exclude /usr/bin since it's not a real path.
12239     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12240       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12241       # a path prefixed by /cygdrive for fixpath to work.
12242       new_path="$CYGWIN_ROOT_PATH$input_path"
12243     fi
12244   fi
12245 
12246 
12247   if test "x$path" != "x$new_path"; then
12248     BOOT_JDK="$new_path"
12249     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12250 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12251   fi
12252 
12253   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12254 
12255   path="$BOOT_JDK"
12256   has_colon=`$ECHO $path | $GREP ^.:`
12257   new_path="$path"
12258   if test "x$has_colon" = x; then
12259     # Not in mixed or Windows style, start by that.
12260     new_path=`cmd //c echo $path`
12261   fi
12262 
12263 
12264   input_path="$new_path"
12265   # Check if we need to convert this using DOS-style short mode. If the path
12266   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12267   # take no chances and rewrite it.
12268   # Note: m4 eats our [], so we need to use [ and ] instead.
12269   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12270   if test "x$has_forbidden_chars" != x; then
12271     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12272     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12273   fi
12274 
12275 
12276   windows_path="$new_path"
12277   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12278     unix_path=`$CYGPATH -u "$windows_path"`
12279     new_path="$unix_path"
12280   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12281     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12282     new_path="$unix_path"
12283   fi
12284 
12285   if test "x$path" != "x$new_path"; then
12286     BOOT_JDK="$new_path"
12287     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12288 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12289   fi
12290 
12291   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12292   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12293 
12294   else
12295     # We're on a posix platform. Hooray! :)
12296     path="$BOOT_JDK"
12297     has_space=`$ECHO "$path" | $GREP " "`
12298     if test "x$has_space" != x; then
12299       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12300 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12301       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12302     fi
12303 
12304     # Use eval to expand a potential ~
12305     eval path="$path"
12306     if test ! -f "$path" && test ! -d "$path"; then
12307       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12308     fi
12309 
12310     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12311   fi
12312 
12313               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12314 $as_echo_n "checking for Boot JDK... " >&6; }
12315               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12316 $as_echo "$BOOT_JDK" >&6; }
12317               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12318 $as_echo_n "checking Boot JDK version... " >&6; }
12319               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12320               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12321 $as_echo "$BOOT_JDK_VERSION" >&6; }
12322             fi # end check jdk version
12323           fi # end check rt.jar
12324         fi # end check javac
12325       fi # end check java
12326     fi # end check boot jdk found
12327   fi
12328 
12329 
12330   # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
12331 
12332   if test "x$BOOT_JDK_FOUND" = xno; then
12333     # Now execute the test
12334 
12335   # Extract the first word of "javac", so it can be a program name with args.
12336 set dummy javac; ac_word=$2
12337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12338 $as_echo_n "checking for $ac_word... " >&6; }
12339 if ${ac_cv_path_JAVAC_CHECK+:} false; then :
12340   $as_echo_n "(cached) " >&6
12341 else
12342   case $JAVAC_CHECK in
12343   [\\/]* | ?:[\\/]*)
12344   ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
12345   ;;
12346   *)
12347   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12348 for as_dir in $PATH
12349 do
12350   IFS=$as_save_IFS
12351   test -z "$as_dir" && as_dir=.
12352     for ac_exec_ext in '' $ac_executable_extensions; do
12353   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12354     ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
12355     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12356     break 2
12357   fi
12358 done
12359   done
12360 IFS=$as_save_IFS
12361 
12362   ;;
12363 esac
12364 fi
12365 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
12366 if test -n "$JAVAC_CHECK"; then
12367   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
12368 $as_echo "$JAVAC_CHECK" >&6; }
12369 else
12370   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12371 $as_echo "no" >&6; }
12372 fi
12373 
12374 
12375   # Extract the first word of "java", so it can be a program name with args.
12376 set dummy java; ac_word=$2
12377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12378 $as_echo_n "checking for $ac_word... " >&6; }
12379 if ${ac_cv_path_JAVA_CHECK+:} false; then :
12380   $as_echo_n "(cached) " >&6
12381 else
12382   case $JAVA_CHECK in
12383   [\\/]* | ?:[\\/]*)
12384   ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
12385   ;;
12386   *)
12387   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12388 for as_dir in $PATH
12389 do
12390   IFS=$as_save_IFS
12391   test -z "$as_dir" && as_dir=.
12392     for ac_exec_ext in '' $ac_executable_extensions; do
12393   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12394     ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
12395     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12396     break 2
12397   fi
12398 done
12399   done
12400 IFS=$as_save_IFS
12401 
12402   ;;
12403 esac
12404 fi
12405 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
12406 if test -n "$JAVA_CHECK"; then
12407   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
12408 $as_echo "$JAVA_CHECK" >&6; }
12409 else
12410   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12411 $as_echo "no" >&6; }
12412 fi
12413 
12414 
12415   BINARY="$JAVAC_CHECK"
12416   if test "x$JAVAC_CHECK" = x; then
12417     BINARY="$JAVA_CHECK"
12418   fi
12419   if test "x$BINARY" != x; then
12420     # So there is a java(c) binary, it might be part of a JDK.
12421     # Lets find the JDK/JRE directory by following symbolic links.
12422     # Linux/GNU systems often have links from /usr/bin/java to
12423     # /etc/alternatives/java to the real JDK binary.
12424 
12425   if test "x$OPENJDK_BUILD_OS" != xwindows; then
12426     # Follow a chain of symbolic links. Use readlink
12427     # where it exists, else fall back to horribly
12428     # complicated shell code.
12429     if test "x$READLINK_TESTED" != yes; then
12430       # On MacOSX there is a readlink tool with a different
12431       # purpose than the GNU readlink tool. Check the found readlink.
12432       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12433       if test "x$ISGNU" = x; then
12434         # A readlink that we do not know how to use.
12435         # Are there other non-GNU readlinks out there?
12436         READLINK_TESTED=yes
12437         READLINK=
12438       fi
12439     fi
12440 
12441     if test "x$READLINK" != x; then
12442       BINARY=`$READLINK -f $BINARY`
12443     else
12444       # Save the current directory for restoring afterwards
12445       STARTDIR=$PWD
12446       COUNTER=0
12447       sym_link_dir=`$DIRNAME $BINARY`
12448       sym_link_file=`$BASENAME $BINARY`
12449       cd $sym_link_dir
12450       # Use -P flag to resolve symlinks in directories.
12451       cd `$THEPWDCMD -P`
12452       sym_link_dir=`$THEPWDCMD -P`
12453       # Resolve file symlinks
12454       while test $COUNTER -lt 20; do
12455         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12456         if test "x$ISLINK" == x; then
12457           # This is not a symbolic link! We are done!
12458           break
12459         fi
12460         # Again resolve directory symlinks since the target of the just found
12461         # link could be in a different directory
12462         cd `$DIRNAME $ISLINK`
12463         sym_link_dir=`$THEPWDCMD -P`
12464         sym_link_file=`$BASENAME $ISLINK`
12465         let COUNTER=COUNTER+1
12466       done
12467       cd $STARTDIR
12468       BINARY=$sym_link_dir/$sym_link_file
12469     fi
12470   fi
12471 
12472     BOOT_JDK=`dirname "$BINARY"`
12473     BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12474     if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12475       # Looks like we found ourselves an JDK
12476       BOOT_JDK_FOUND=maybe
12477       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12478 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12479     fi
12480   fi
12481 
12482 
12483     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12484     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12485       # Do we have a bin/java?
12486       if test ! -x "$BOOT_JDK/bin/java"; then
12487         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12488 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12489         BOOT_JDK_FOUND=no
12490       else
12491         # Do we have a bin/javac?
12492         if test ! -x "$BOOT_JDK/bin/javac"; then
12493           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12494 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12495           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12496 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12497           BOOT_JDK_FOUND=no
12498         else
12499           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12500           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12501             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12502 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12503             BOOT_JDK_FOUND=no
12504           else
12505             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12506             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12507 
12508             # Extra M4 quote needed to protect [] in grep expression.
12509             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12510             if test "x$FOUND_VERSION_78" = x; then
12511               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12512 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12513               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12514 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12515               BOOT_JDK_FOUND=no
12516             else
12517               # We're done! :-)
12518               BOOT_JDK_FOUND=yes
12519 
12520   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12521 
12522   # Input might be given as Windows format, start by converting to
12523   # unix format.
12524   path="$BOOT_JDK"
12525   new_path=`$CYGPATH -u "$path"`
12526 
12527   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12528   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12529   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12530   # "foo.exe" is OK but "foo" is an error.
12531   #
12532   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12533   # It is also a way to make sure we got the proper file name for the real test later on.
12534   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12535   if test "x$test_shortpath" = x; then
12536     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12537 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12538     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12539   fi
12540 
12541   # Call helper function which possibly converts this using DOS-style short mode.
12542   # If so, the updated path is stored in $new_path.
12543 
12544   input_path="$new_path"
12545   # Check if we need to convert this using DOS-style short mode. If the path
12546   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12547   # take no chances and rewrite it.
12548   # Note: m4 eats our [], so we need to use [ and ] instead.
12549   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12550   if test "x$has_forbidden_chars" != x; then
12551     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12552     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12553     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12554     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12555       # Going to short mode and back again did indeed matter. Since short mode is
12556       # case insensitive, let's make it lowercase to improve readability.
12557       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12558       # Now convert it back to Unix-stile (cygpath)
12559       input_path=`$CYGPATH -u "$shortmode_path"`
12560       new_path="$input_path"
12561     fi
12562   fi
12563 
12564   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12565   if test "x$test_cygdrive_prefix" = x; then
12566     # As a simple fix, exclude /usr/bin since it's not a real path.
12567     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12568       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12569       # a path prefixed by /cygdrive for fixpath to work.
12570       new_path="$CYGWIN_ROOT_PATH$input_path"
12571     fi
12572   fi
12573 
12574 
12575   if test "x$path" != "x$new_path"; then
12576     BOOT_JDK="$new_path"
12577     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12578 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12579   fi
12580 
12581   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12582 
12583   path="$BOOT_JDK"
12584   has_colon=`$ECHO $path | $GREP ^.:`
12585   new_path="$path"
12586   if test "x$has_colon" = x; then
12587     # Not in mixed or Windows style, start by that.
12588     new_path=`cmd //c echo $path`
12589   fi
12590 
12591 
12592   input_path="$new_path"
12593   # Check if we need to convert this using DOS-style short mode. If the path
12594   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12595   # take no chances and rewrite it.
12596   # Note: m4 eats our [], so we need to use [ and ] instead.
12597   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12598   if test "x$has_forbidden_chars" != x; then
12599     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12600     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12601   fi
12602 
12603 
12604   windows_path="$new_path"
12605   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12606     unix_path=`$CYGPATH -u "$windows_path"`
12607     new_path="$unix_path"
12608   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12609     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12610     new_path="$unix_path"
12611   fi
12612 
12613   if test "x$path" != "x$new_path"; then
12614     BOOT_JDK="$new_path"
12615     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12616 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12617   fi
12618 
12619   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12620   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12621 
12622   else
12623     # We're on a posix platform. Hooray! :)
12624     path="$BOOT_JDK"
12625     has_space=`$ECHO "$path" | $GREP " "`
12626     if test "x$has_space" != x; then
12627       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12628 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12629       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12630     fi
12631 
12632     # Use eval to expand a potential ~
12633     eval path="$path"
12634     if test ! -f "$path" && test ! -d "$path"; then
12635       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12636     fi
12637 
12638     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12639   fi
12640 
12641               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12642 $as_echo_n "checking for Boot JDK... " >&6; }
12643               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12644 $as_echo "$BOOT_JDK" >&6; }
12645               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12646 $as_echo_n "checking Boot JDK version... " >&6; }
12647               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12648               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12649 $as_echo "$BOOT_JDK_VERSION" >&6; }
12650             fi # end check jdk version
12651           fi # end check rt.jar
12652         fi # end check javac
12653       fi # end check java
12654     fi # end check boot jdk found
12655   fi
12656 
12657 
12658   # Test: Is there a JDK installed in default, well-known locations?
12659 
12660   if test "x$BOOT_JDK_FOUND" = xno; then
12661     # Now execute the test
12662 
12663   if test "x$OPENJDK_TARGET_OS" = xwindows; then
12664 
12665   if test "x$BOOT_JDK_FOUND" = xno; then
12666     # Now execute the test
12667 
12668   if test "x$ProgramW6432" != x; then
12669     VIRTUAL_DIR="$ProgramW6432/Java"
12670 
12671   windows_path="$VIRTUAL_DIR"
12672   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12673     unix_path=`$CYGPATH -u "$windows_path"`
12674     VIRTUAL_DIR="$unix_path"
12675   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12676     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12677     VIRTUAL_DIR="$unix_path"
12678   fi
12679 
12680 
12681   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12682   BOOT_JDK_SUFFIX=""
12683   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12684   if test "x$ALL_JDKS_FOUND" != x; then
12685     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12686 
12687   if test "x$BOOT_JDK_FOUND" = xno; then
12688     # Now execute the test
12689 
12690         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12691         if test -d "$BOOT_JDK"; then
12692           BOOT_JDK_FOUND=maybe
12693           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12694 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12695         fi
12696 
12697 
12698     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12699     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12700       # Do we have a bin/java?
12701       if test ! -x "$BOOT_JDK/bin/java"; then
12702         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12703 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12704         BOOT_JDK_FOUND=no
12705       else
12706         # Do we have a bin/javac?
12707         if test ! -x "$BOOT_JDK/bin/javac"; then
12708           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12709 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12710           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12711 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12712           BOOT_JDK_FOUND=no
12713         else
12714           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12715           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12716             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12717 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12718             BOOT_JDK_FOUND=no
12719           else
12720             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12721             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12722 
12723             # Extra M4 quote needed to protect [] in grep expression.
12724             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12725             if test "x$FOUND_VERSION_78" = x; then
12726               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12727 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12728               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12729 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12730               BOOT_JDK_FOUND=no
12731             else
12732               # We're done! :-)
12733               BOOT_JDK_FOUND=yes
12734 
12735   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12736 
12737   # Input might be given as Windows format, start by converting to
12738   # unix format.
12739   path="$BOOT_JDK"
12740   new_path=`$CYGPATH -u "$path"`
12741 
12742   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12743   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12744   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12745   # "foo.exe" is OK but "foo" is an error.
12746   #
12747   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12748   # It is also a way to make sure we got the proper file name for the real test later on.
12749   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12750   if test "x$test_shortpath" = x; then
12751     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12752 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12753     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12754   fi
12755 
12756   # Call helper function which possibly converts this using DOS-style short mode.
12757   # If so, the updated path is stored in $new_path.
12758 
12759   input_path="$new_path"
12760   # Check if we need to convert this using DOS-style short mode. If the path
12761   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12762   # take no chances and rewrite it.
12763   # Note: m4 eats our [], so we need to use [ and ] instead.
12764   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12765   if test "x$has_forbidden_chars" != x; then
12766     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12767     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12768     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12769     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12770       # Going to short mode and back again did indeed matter. Since short mode is
12771       # case insensitive, let's make it lowercase to improve readability.
12772       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12773       # Now convert it back to Unix-stile (cygpath)
12774       input_path=`$CYGPATH -u "$shortmode_path"`
12775       new_path="$input_path"
12776     fi
12777   fi
12778 
12779   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12780   if test "x$test_cygdrive_prefix" = x; then
12781     # As a simple fix, exclude /usr/bin since it's not a real path.
12782     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12783       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12784       # a path prefixed by /cygdrive for fixpath to work.
12785       new_path="$CYGWIN_ROOT_PATH$input_path"
12786     fi
12787   fi
12788 
12789 
12790   if test "x$path" != "x$new_path"; then
12791     BOOT_JDK="$new_path"
12792     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12793 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12794   fi
12795 
12796   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12797 
12798   path="$BOOT_JDK"
12799   has_colon=`$ECHO $path | $GREP ^.:`
12800   new_path="$path"
12801   if test "x$has_colon" = x; then
12802     # Not in mixed or Windows style, start by that.
12803     new_path=`cmd //c echo $path`
12804   fi
12805 
12806 
12807   input_path="$new_path"
12808   # Check if we need to convert this using DOS-style short mode. If the path
12809   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12810   # take no chances and rewrite it.
12811   # Note: m4 eats our [], so we need to use [ and ] instead.
12812   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12813   if test "x$has_forbidden_chars" != x; then
12814     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12815     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12816   fi
12817 
12818 
12819   windows_path="$new_path"
12820   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12821     unix_path=`$CYGPATH -u "$windows_path"`
12822     new_path="$unix_path"
12823   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12824     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12825     new_path="$unix_path"
12826   fi
12827 
12828   if test "x$path" != "x$new_path"; then
12829     BOOT_JDK="$new_path"
12830     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12831 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12832   fi
12833 
12834   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12835   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12836 
12837   else
12838     # We're on a posix platform. Hooray! :)
12839     path="$BOOT_JDK"
12840     has_space=`$ECHO "$path" | $GREP " "`
12841     if test "x$has_space" != x; then
12842       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12843 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12844       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12845     fi
12846 
12847     # Use eval to expand a potential ~
12848     eval path="$path"
12849     if test ! -f "$path" && test ! -d "$path"; then
12850       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12851     fi
12852 
12853     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12854   fi
12855 
12856               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12857 $as_echo_n "checking for Boot JDK... " >&6; }
12858               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12859 $as_echo "$BOOT_JDK" >&6; }
12860               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12861 $as_echo_n "checking Boot JDK version... " >&6; }
12862               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12863               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12864 $as_echo "$BOOT_JDK_VERSION" >&6; }
12865             fi # end check jdk version
12866           fi # end check rt.jar
12867         fi # end check javac
12868       fi # end check java
12869     fi # end check boot jdk found
12870   fi
12871 
12872     done
12873   fi
12874 
12875   fi
12876 
12877 
12878     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12879     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12880       # Do we have a bin/java?
12881       if test ! -x "$BOOT_JDK/bin/java"; then
12882         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12883 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12884         BOOT_JDK_FOUND=no
12885       else
12886         # Do we have a bin/javac?
12887         if test ! -x "$BOOT_JDK/bin/javac"; then
12888           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12889 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12890           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12891 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12892           BOOT_JDK_FOUND=no
12893         else
12894           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12895           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12896             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12897 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12898             BOOT_JDK_FOUND=no
12899           else
12900             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12901             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12902 
12903             # Extra M4 quote needed to protect [] in grep expression.
12904             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12905             if test "x$FOUND_VERSION_78" = x; then
12906               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12907 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12908               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12909 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12910               BOOT_JDK_FOUND=no
12911             else
12912               # We're done! :-)
12913               BOOT_JDK_FOUND=yes
12914 
12915   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12916 
12917   # Input might be given as Windows format, start by converting to
12918   # unix format.
12919   path="$BOOT_JDK"
12920   new_path=`$CYGPATH -u "$path"`
12921 
12922   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12923   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12924   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12925   # "foo.exe" is OK but "foo" is an error.
12926   #
12927   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12928   # It is also a way to make sure we got the proper file name for the real test later on.
12929   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12930   if test "x$test_shortpath" = x; then
12931     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12932 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12933     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12934   fi
12935 
12936   # Call helper function which possibly converts this using DOS-style short mode.
12937   # If so, the updated path is stored in $new_path.
12938 
12939   input_path="$new_path"
12940   # Check if we need to convert this using DOS-style short mode. If the path
12941   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12942   # take no chances and rewrite it.
12943   # Note: m4 eats our [], so we need to use [ and ] instead.
12944   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12945   if test "x$has_forbidden_chars" != x; then
12946     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12947     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12948     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12949     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12950       # Going to short mode and back again did indeed matter. Since short mode is
12951       # case insensitive, let's make it lowercase to improve readability.
12952       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12953       # Now convert it back to Unix-stile (cygpath)
12954       input_path=`$CYGPATH -u "$shortmode_path"`
12955       new_path="$input_path"
12956     fi
12957   fi
12958 
12959   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12960   if test "x$test_cygdrive_prefix" = x; then
12961     # As a simple fix, exclude /usr/bin since it's not a real path.
12962     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12963       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12964       # a path prefixed by /cygdrive for fixpath to work.
12965       new_path="$CYGWIN_ROOT_PATH$input_path"
12966     fi
12967   fi
12968 
12969 
12970   if test "x$path" != "x$new_path"; then
12971     BOOT_JDK="$new_path"
12972     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12973 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12974   fi
12975 
12976   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12977 
12978   path="$BOOT_JDK"
12979   has_colon=`$ECHO $path | $GREP ^.:`
12980   new_path="$path"
12981   if test "x$has_colon" = x; then
12982     # Not in mixed or Windows style, start by that.
12983     new_path=`cmd //c echo $path`
12984   fi
12985 
12986 
12987   input_path="$new_path"
12988   # Check if we need to convert this using DOS-style short mode. If the path
12989   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12990   # take no chances and rewrite it.
12991   # Note: m4 eats our [], so we need to use [ and ] instead.
12992   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12993   if test "x$has_forbidden_chars" != x; then
12994     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12995     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12996   fi
12997 
12998 
12999   windows_path="$new_path"
13000   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13001     unix_path=`$CYGPATH -u "$windows_path"`
13002     new_path="$unix_path"
13003   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13004     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13005     new_path="$unix_path"
13006   fi
13007 
13008   if test "x$path" != "x$new_path"; then
13009     BOOT_JDK="$new_path"
13010     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13011 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13012   fi
13013 
13014   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13015   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13016 
13017   else
13018     # We're on a posix platform. Hooray! :)
13019     path="$BOOT_JDK"
13020     has_space=`$ECHO "$path" | $GREP " "`
13021     if test "x$has_space" != x; then
13022       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13023 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13024       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13025     fi
13026 
13027     # Use eval to expand a potential ~
13028     eval path="$path"
13029     if test ! -f "$path" && test ! -d "$path"; then
13030       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13031     fi
13032 
13033     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13034   fi
13035 
13036               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13037 $as_echo_n "checking for Boot JDK... " >&6; }
13038               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13039 $as_echo "$BOOT_JDK" >&6; }
13040               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13041 $as_echo_n "checking Boot JDK version... " >&6; }
13042               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13043               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13044 $as_echo "$BOOT_JDK_VERSION" >&6; }
13045             fi # end check jdk version
13046           fi # end check rt.jar
13047         fi # end check javac
13048       fi # end check java
13049     fi # end check boot jdk found
13050   fi
13051 
13052 
13053   if test "x$BOOT_JDK_FOUND" = xno; then
13054     # Now execute the test
13055 
13056   if test "x$PROGRAMW6432" != x; then
13057     VIRTUAL_DIR="$PROGRAMW6432/Java"
13058 
13059   windows_path="$VIRTUAL_DIR"
13060   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13061     unix_path=`$CYGPATH -u "$windows_path"`
13062     VIRTUAL_DIR="$unix_path"
13063   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13064     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13065     VIRTUAL_DIR="$unix_path"
13066   fi
13067 
13068 
13069   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13070   BOOT_JDK_SUFFIX=""
13071   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13072   if test "x$ALL_JDKS_FOUND" != x; then
13073     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13074 
13075   if test "x$BOOT_JDK_FOUND" = xno; then
13076     # Now execute the test
13077 
13078         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13079         if test -d "$BOOT_JDK"; then
13080           BOOT_JDK_FOUND=maybe
13081           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13082 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13083         fi
13084 
13085 
13086     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13087     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13088       # Do we have a bin/java?
13089       if test ! -x "$BOOT_JDK/bin/java"; then
13090         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13091 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13092         BOOT_JDK_FOUND=no
13093       else
13094         # Do we have a bin/javac?
13095         if test ! -x "$BOOT_JDK/bin/javac"; then
13096           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13097 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13098           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13099 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13100           BOOT_JDK_FOUND=no
13101         else
13102           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13103           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13104             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13105 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13106             BOOT_JDK_FOUND=no
13107           else
13108             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13109             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13110 
13111             # Extra M4 quote needed to protect [] in grep expression.
13112             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13113             if test "x$FOUND_VERSION_78" = x; then
13114               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13115 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13116               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13117 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13118               BOOT_JDK_FOUND=no
13119             else
13120               # We're done! :-)
13121               BOOT_JDK_FOUND=yes
13122 
13123   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13124 
13125   # Input might be given as Windows format, start by converting to
13126   # unix format.
13127   path="$BOOT_JDK"
13128   new_path=`$CYGPATH -u "$path"`
13129 
13130   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13131   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13132   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13133   # "foo.exe" is OK but "foo" is an error.
13134   #
13135   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13136   # It is also a way to make sure we got the proper file name for the real test later on.
13137   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13138   if test "x$test_shortpath" = x; then
13139     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13140 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13141     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13142   fi
13143 
13144   # Call helper function which possibly converts this using DOS-style short mode.
13145   # If so, the updated path is stored in $new_path.
13146 
13147   input_path="$new_path"
13148   # Check if we need to convert this using DOS-style short mode. If the path
13149   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13150   # take no chances and rewrite it.
13151   # Note: m4 eats our [], so we need to use [ and ] instead.
13152   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13153   if test "x$has_forbidden_chars" != x; then
13154     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13155     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13156     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13157     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13158       # Going to short mode and back again did indeed matter. Since short mode is
13159       # case insensitive, let's make it lowercase to improve readability.
13160       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13161       # Now convert it back to Unix-stile (cygpath)
13162       input_path=`$CYGPATH -u "$shortmode_path"`
13163       new_path="$input_path"
13164     fi
13165   fi
13166 
13167   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13168   if test "x$test_cygdrive_prefix" = x; then
13169     # As a simple fix, exclude /usr/bin since it's not a real path.
13170     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13171       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13172       # a path prefixed by /cygdrive for fixpath to work.
13173       new_path="$CYGWIN_ROOT_PATH$input_path"
13174     fi
13175   fi
13176 
13177 
13178   if test "x$path" != "x$new_path"; then
13179     BOOT_JDK="$new_path"
13180     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13181 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13182   fi
13183 
13184   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13185 
13186   path="$BOOT_JDK"
13187   has_colon=`$ECHO $path | $GREP ^.:`
13188   new_path="$path"
13189   if test "x$has_colon" = x; then
13190     # Not in mixed or Windows style, start by that.
13191     new_path=`cmd //c echo $path`
13192   fi
13193 
13194 
13195   input_path="$new_path"
13196   # Check if we need to convert this using DOS-style short mode. If the path
13197   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13198   # take no chances and rewrite it.
13199   # Note: m4 eats our [], so we need to use [ and ] instead.
13200   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13201   if test "x$has_forbidden_chars" != x; then
13202     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13203     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13204   fi
13205 
13206 
13207   windows_path="$new_path"
13208   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13209     unix_path=`$CYGPATH -u "$windows_path"`
13210     new_path="$unix_path"
13211   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13212     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13213     new_path="$unix_path"
13214   fi
13215 
13216   if test "x$path" != "x$new_path"; then
13217     BOOT_JDK="$new_path"
13218     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13219 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13220   fi
13221 
13222   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13223   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13224 
13225   else
13226     # We're on a posix platform. Hooray! :)
13227     path="$BOOT_JDK"
13228     has_space=`$ECHO "$path" | $GREP " "`
13229     if test "x$has_space" != x; then
13230       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13231 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13232       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13233     fi
13234 
13235     # Use eval to expand a potential ~
13236     eval path="$path"
13237     if test ! -f "$path" && test ! -d "$path"; then
13238       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13239     fi
13240 
13241     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13242   fi
13243 
13244               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13245 $as_echo_n "checking for Boot JDK... " >&6; }
13246               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13247 $as_echo "$BOOT_JDK" >&6; }
13248               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13249 $as_echo_n "checking Boot JDK version... " >&6; }
13250               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13251               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13252 $as_echo "$BOOT_JDK_VERSION" >&6; }
13253             fi # end check jdk version
13254           fi # end check rt.jar
13255         fi # end check javac
13256       fi # end check java
13257     fi # end check boot jdk found
13258   fi
13259 
13260     done
13261   fi
13262 
13263   fi
13264 
13265 
13266     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13267     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13268       # Do we have a bin/java?
13269       if test ! -x "$BOOT_JDK/bin/java"; then
13270         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13271 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13272         BOOT_JDK_FOUND=no
13273       else
13274         # Do we have a bin/javac?
13275         if test ! -x "$BOOT_JDK/bin/javac"; then
13276           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13277 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13278           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13279 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13280           BOOT_JDK_FOUND=no
13281         else
13282           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13283           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13284             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13285 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13286             BOOT_JDK_FOUND=no
13287           else
13288             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13289             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13290 
13291             # Extra M4 quote needed to protect [] in grep expression.
13292             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13293             if test "x$FOUND_VERSION_78" = x; then
13294               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13295 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13296               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13297 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13298               BOOT_JDK_FOUND=no
13299             else
13300               # We're done! :-)
13301               BOOT_JDK_FOUND=yes
13302 
13303   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13304 
13305   # Input might be given as Windows format, start by converting to
13306   # unix format.
13307   path="$BOOT_JDK"
13308   new_path=`$CYGPATH -u "$path"`
13309 
13310   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13311   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13312   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13313   # "foo.exe" is OK but "foo" is an error.
13314   #
13315   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13316   # It is also a way to make sure we got the proper file name for the real test later on.
13317   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13318   if test "x$test_shortpath" = x; then
13319     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13320 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13321     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13322   fi
13323 
13324   # Call helper function which possibly converts this using DOS-style short mode.
13325   # If so, the updated path is stored in $new_path.
13326 
13327   input_path="$new_path"
13328   # Check if we need to convert this using DOS-style short mode. If the path
13329   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13330   # take no chances and rewrite it.
13331   # Note: m4 eats our [], so we need to use [ and ] instead.
13332   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13333   if test "x$has_forbidden_chars" != x; then
13334     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13335     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13336     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13337     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13338       # Going to short mode and back again did indeed matter. Since short mode is
13339       # case insensitive, let's make it lowercase to improve readability.
13340       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13341       # Now convert it back to Unix-stile (cygpath)
13342       input_path=`$CYGPATH -u "$shortmode_path"`
13343       new_path="$input_path"
13344     fi
13345   fi
13346 
13347   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13348   if test "x$test_cygdrive_prefix" = x; then
13349     # As a simple fix, exclude /usr/bin since it's not a real path.
13350     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13351       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13352       # a path prefixed by /cygdrive for fixpath to work.
13353       new_path="$CYGWIN_ROOT_PATH$input_path"
13354     fi
13355   fi
13356 
13357 
13358   if test "x$path" != "x$new_path"; then
13359     BOOT_JDK="$new_path"
13360     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13361 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13362   fi
13363 
13364   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13365 
13366   path="$BOOT_JDK"
13367   has_colon=`$ECHO $path | $GREP ^.:`
13368   new_path="$path"
13369   if test "x$has_colon" = x; then
13370     # Not in mixed or Windows style, start by that.
13371     new_path=`cmd //c echo $path`
13372   fi
13373 
13374 
13375   input_path="$new_path"
13376   # Check if we need to convert this using DOS-style short mode. If the path
13377   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13378   # take no chances and rewrite it.
13379   # Note: m4 eats our [], so we need to use [ and ] instead.
13380   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13381   if test "x$has_forbidden_chars" != x; then
13382     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13383     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13384   fi
13385 
13386 
13387   windows_path="$new_path"
13388   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13389     unix_path=`$CYGPATH -u "$windows_path"`
13390     new_path="$unix_path"
13391   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13392     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13393     new_path="$unix_path"
13394   fi
13395 
13396   if test "x$path" != "x$new_path"; then
13397     BOOT_JDK="$new_path"
13398     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13399 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13400   fi
13401 
13402   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13403   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13404 
13405   else
13406     # We're on a posix platform. Hooray! :)
13407     path="$BOOT_JDK"
13408     has_space=`$ECHO "$path" | $GREP " "`
13409     if test "x$has_space" != x; then
13410       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13411 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13412       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13413     fi
13414 
13415     # Use eval to expand a potential ~
13416     eval path="$path"
13417     if test ! -f "$path" && test ! -d "$path"; then
13418       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13419     fi
13420 
13421     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13422   fi
13423 
13424               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13425 $as_echo_n "checking for Boot JDK... " >&6; }
13426               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13427 $as_echo "$BOOT_JDK" >&6; }
13428               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13429 $as_echo_n "checking Boot JDK version... " >&6; }
13430               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13431               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13432 $as_echo "$BOOT_JDK_VERSION" >&6; }
13433             fi # end check jdk version
13434           fi # end check rt.jar
13435         fi # end check javac
13436       fi # end check java
13437     fi # end check boot jdk found
13438   fi
13439 
13440 
13441   if test "x$BOOT_JDK_FOUND" = xno; then
13442     # Now execute the test
13443 
13444   if test "x$PROGRAMFILES" != x; then
13445     VIRTUAL_DIR="$PROGRAMFILES/Java"
13446 
13447   windows_path="$VIRTUAL_DIR"
13448   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13449     unix_path=`$CYGPATH -u "$windows_path"`
13450     VIRTUAL_DIR="$unix_path"
13451   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13452     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13453     VIRTUAL_DIR="$unix_path"
13454   fi
13455 
13456 
13457   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13458   BOOT_JDK_SUFFIX=""
13459   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13460   if test "x$ALL_JDKS_FOUND" != x; then
13461     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13462 
13463   if test "x$BOOT_JDK_FOUND" = xno; then
13464     # Now execute the test
13465 
13466         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13467         if test -d "$BOOT_JDK"; then
13468           BOOT_JDK_FOUND=maybe
13469           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13470 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13471         fi
13472 
13473 
13474     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13475     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13476       # Do we have a bin/java?
13477       if test ! -x "$BOOT_JDK/bin/java"; then
13478         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13479 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13480         BOOT_JDK_FOUND=no
13481       else
13482         # Do we have a bin/javac?
13483         if test ! -x "$BOOT_JDK/bin/javac"; then
13484           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13485 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13486           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13487 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13488           BOOT_JDK_FOUND=no
13489         else
13490           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13491           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13492             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13493 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13494             BOOT_JDK_FOUND=no
13495           else
13496             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13497             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13498 
13499             # Extra M4 quote needed to protect [] in grep expression.
13500             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13501             if test "x$FOUND_VERSION_78" = x; then
13502               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13503 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13504               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13505 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13506               BOOT_JDK_FOUND=no
13507             else
13508               # We're done! :-)
13509               BOOT_JDK_FOUND=yes
13510 
13511   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13512 
13513   # Input might be given as Windows format, start by converting to
13514   # unix format.
13515   path="$BOOT_JDK"
13516   new_path=`$CYGPATH -u "$path"`
13517 
13518   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13519   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13520   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13521   # "foo.exe" is OK but "foo" is an error.
13522   #
13523   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13524   # It is also a way to make sure we got the proper file name for the real test later on.
13525   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13526   if test "x$test_shortpath" = x; then
13527     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13528 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13529     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13530   fi
13531 
13532   # Call helper function which possibly converts this using DOS-style short mode.
13533   # If so, the updated path is stored in $new_path.
13534 
13535   input_path="$new_path"
13536   # Check if we need to convert this using DOS-style short mode. If the path
13537   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13538   # take no chances and rewrite it.
13539   # Note: m4 eats our [], so we need to use [ and ] instead.
13540   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13541   if test "x$has_forbidden_chars" != x; then
13542     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13543     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13544     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13545     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13546       # Going to short mode and back again did indeed matter. Since short mode is
13547       # case insensitive, let's make it lowercase to improve readability.
13548       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13549       # Now convert it back to Unix-stile (cygpath)
13550       input_path=`$CYGPATH -u "$shortmode_path"`
13551       new_path="$input_path"
13552     fi
13553   fi
13554 
13555   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13556   if test "x$test_cygdrive_prefix" = x; then
13557     # As a simple fix, exclude /usr/bin since it's not a real path.
13558     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13559       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13560       # a path prefixed by /cygdrive for fixpath to work.
13561       new_path="$CYGWIN_ROOT_PATH$input_path"
13562     fi
13563   fi
13564 
13565 
13566   if test "x$path" != "x$new_path"; then
13567     BOOT_JDK="$new_path"
13568     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13569 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13570   fi
13571 
13572   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13573 
13574   path="$BOOT_JDK"
13575   has_colon=`$ECHO $path | $GREP ^.:`
13576   new_path="$path"
13577   if test "x$has_colon" = x; then
13578     # Not in mixed or Windows style, start by that.
13579     new_path=`cmd //c echo $path`
13580   fi
13581 
13582 
13583   input_path="$new_path"
13584   # Check if we need to convert this using DOS-style short mode. If the path
13585   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13586   # take no chances and rewrite it.
13587   # Note: m4 eats our [], so we need to use [ and ] instead.
13588   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13589   if test "x$has_forbidden_chars" != x; then
13590     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13591     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13592   fi
13593 
13594 
13595   windows_path="$new_path"
13596   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13597     unix_path=`$CYGPATH -u "$windows_path"`
13598     new_path="$unix_path"
13599   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13600     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13601     new_path="$unix_path"
13602   fi
13603 
13604   if test "x$path" != "x$new_path"; then
13605     BOOT_JDK="$new_path"
13606     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13607 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13608   fi
13609 
13610   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13611   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13612 
13613   else
13614     # We're on a posix platform. Hooray! :)
13615     path="$BOOT_JDK"
13616     has_space=`$ECHO "$path" | $GREP " "`
13617     if test "x$has_space" != x; then
13618       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13619 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13620       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13621     fi
13622 
13623     # Use eval to expand a potential ~
13624     eval path="$path"
13625     if test ! -f "$path" && test ! -d "$path"; then
13626       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13627     fi
13628 
13629     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13630   fi
13631 
13632               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13633 $as_echo_n "checking for Boot JDK... " >&6; }
13634               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13635 $as_echo "$BOOT_JDK" >&6; }
13636               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13637 $as_echo_n "checking Boot JDK version... " >&6; }
13638               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13639               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13640 $as_echo "$BOOT_JDK_VERSION" >&6; }
13641             fi # end check jdk version
13642           fi # end check rt.jar
13643         fi # end check javac
13644       fi # end check java
13645     fi # end check boot jdk found
13646   fi
13647 
13648     done
13649   fi
13650 
13651   fi
13652 
13653 
13654     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13655     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13656       # Do we have a bin/java?
13657       if test ! -x "$BOOT_JDK/bin/java"; then
13658         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13659 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13660         BOOT_JDK_FOUND=no
13661       else
13662         # Do we have a bin/javac?
13663         if test ! -x "$BOOT_JDK/bin/javac"; then
13664           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13665 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13666           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13667 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13668           BOOT_JDK_FOUND=no
13669         else
13670           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13671           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13672             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13673 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13674             BOOT_JDK_FOUND=no
13675           else
13676             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13677             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13678 
13679             # Extra M4 quote needed to protect [] in grep expression.
13680             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13681             if test "x$FOUND_VERSION_78" = x; then
13682               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13683 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13684               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13685 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13686               BOOT_JDK_FOUND=no
13687             else
13688               # We're done! :-)
13689               BOOT_JDK_FOUND=yes
13690 
13691   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13692 
13693   # Input might be given as Windows format, start by converting to
13694   # unix format.
13695   path="$BOOT_JDK"
13696   new_path=`$CYGPATH -u "$path"`
13697 
13698   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13699   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13700   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13701   # "foo.exe" is OK but "foo" is an error.
13702   #
13703   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13704   # It is also a way to make sure we got the proper file name for the real test later on.
13705   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13706   if test "x$test_shortpath" = x; then
13707     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13708 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13709     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13710   fi
13711 
13712   # Call helper function which possibly converts this using DOS-style short mode.
13713   # If so, the updated path is stored in $new_path.
13714 
13715   input_path="$new_path"
13716   # Check if we need to convert this using DOS-style short mode. If the path
13717   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13718   # take no chances and rewrite it.
13719   # Note: m4 eats our [], so we need to use [ and ] instead.
13720   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13721   if test "x$has_forbidden_chars" != x; then
13722     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13723     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13724     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13725     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13726       # Going to short mode and back again did indeed matter. Since short mode is
13727       # case insensitive, let's make it lowercase to improve readability.
13728       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13729       # Now convert it back to Unix-stile (cygpath)
13730       input_path=`$CYGPATH -u "$shortmode_path"`
13731       new_path="$input_path"
13732     fi
13733   fi
13734 
13735   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13736   if test "x$test_cygdrive_prefix" = x; then
13737     # As a simple fix, exclude /usr/bin since it's not a real path.
13738     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13739       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13740       # a path prefixed by /cygdrive for fixpath to work.
13741       new_path="$CYGWIN_ROOT_PATH$input_path"
13742     fi
13743   fi
13744 
13745 
13746   if test "x$path" != "x$new_path"; then
13747     BOOT_JDK="$new_path"
13748     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13749 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13750   fi
13751 
13752   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13753 
13754   path="$BOOT_JDK"
13755   has_colon=`$ECHO $path | $GREP ^.:`
13756   new_path="$path"
13757   if test "x$has_colon" = x; then
13758     # Not in mixed or Windows style, start by that.
13759     new_path=`cmd //c echo $path`
13760   fi
13761 
13762 
13763   input_path="$new_path"
13764   # Check if we need to convert this using DOS-style short mode. If the path
13765   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13766   # take no chances and rewrite it.
13767   # Note: m4 eats our [], so we need to use [ and ] instead.
13768   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13769   if test "x$has_forbidden_chars" != x; then
13770     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13771     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13772   fi
13773 
13774 
13775   windows_path="$new_path"
13776   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13777     unix_path=`$CYGPATH -u "$windows_path"`
13778     new_path="$unix_path"
13779   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13780     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13781     new_path="$unix_path"
13782   fi
13783 
13784   if test "x$path" != "x$new_path"; then
13785     BOOT_JDK="$new_path"
13786     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13787 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13788   fi
13789 
13790   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13791   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13792 
13793   else
13794     # We're on a posix platform. Hooray! :)
13795     path="$BOOT_JDK"
13796     has_space=`$ECHO "$path" | $GREP " "`
13797     if test "x$has_space" != x; then
13798       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13799 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13800       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13801     fi
13802 
13803     # Use eval to expand a potential ~
13804     eval path="$path"
13805     if test ! -f "$path" && test ! -d "$path"; then
13806       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13807     fi
13808 
13809     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13810   fi
13811 
13812               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13813 $as_echo_n "checking for Boot JDK... " >&6; }
13814               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13815 $as_echo "$BOOT_JDK" >&6; }
13816               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13817 $as_echo_n "checking Boot JDK version... " >&6; }
13818               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13819               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13820 $as_echo "$BOOT_JDK_VERSION" >&6; }
13821             fi # end check jdk version
13822           fi # end check rt.jar
13823         fi # end check javac
13824       fi # end check java
13825     fi # end check boot jdk found
13826   fi
13827 
13828 
13829   if test "x$BOOT_JDK_FOUND" = xno; then
13830     # Now execute the test
13831 
13832   if test "x$ProgramFiles" != x; then
13833     VIRTUAL_DIR="$ProgramFiles/Java"
13834 
13835   windows_path="$VIRTUAL_DIR"
13836   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13837     unix_path=`$CYGPATH -u "$windows_path"`
13838     VIRTUAL_DIR="$unix_path"
13839   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13840     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13841     VIRTUAL_DIR="$unix_path"
13842   fi
13843 
13844 
13845   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13846   BOOT_JDK_SUFFIX=""
13847   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13848   if test "x$ALL_JDKS_FOUND" != x; then
13849     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13850 
13851   if test "x$BOOT_JDK_FOUND" = xno; then
13852     # Now execute the test
13853 
13854         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13855         if test -d "$BOOT_JDK"; then
13856           BOOT_JDK_FOUND=maybe
13857           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13858 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13859         fi
13860 
13861 
13862     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13863     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13864       # Do we have a bin/java?
13865       if test ! -x "$BOOT_JDK/bin/java"; then
13866         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13867 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13868         BOOT_JDK_FOUND=no
13869       else
13870         # Do we have a bin/javac?
13871         if test ! -x "$BOOT_JDK/bin/javac"; then
13872           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13873 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13874           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13875 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13876           BOOT_JDK_FOUND=no
13877         else
13878           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13879           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13880             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13881 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13882             BOOT_JDK_FOUND=no
13883           else
13884             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13885             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13886 
13887             # Extra M4 quote needed to protect [] in grep expression.
13888             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13889             if test "x$FOUND_VERSION_78" = x; then
13890               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13891 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13892               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13893 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13894               BOOT_JDK_FOUND=no
13895             else
13896               # We're done! :-)
13897               BOOT_JDK_FOUND=yes
13898 
13899   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13900 
13901   # Input might be given as Windows format, start by converting to
13902   # unix format.
13903   path="$BOOT_JDK"
13904   new_path=`$CYGPATH -u "$path"`
13905 
13906   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13907   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13908   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13909   # "foo.exe" is OK but "foo" is an error.
13910   #
13911   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13912   # It is also a way to make sure we got the proper file name for the real test later on.
13913   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13914   if test "x$test_shortpath" = x; then
13915     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13916 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13917     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13918   fi
13919 
13920   # Call helper function which possibly converts this using DOS-style short mode.
13921   # If so, the updated path is stored in $new_path.
13922 
13923   input_path="$new_path"
13924   # Check if we need to convert this using DOS-style short mode. If the path
13925   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13926   # take no chances and rewrite it.
13927   # Note: m4 eats our [], so we need to use [ and ] instead.
13928   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13929   if test "x$has_forbidden_chars" != x; then
13930     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13931     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13932     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13933     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13934       # Going to short mode and back again did indeed matter. Since short mode is
13935       # case insensitive, let's make it lowercase to improve readability.
13936       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13937       # Now convert it back to Unix-stile (cygpath)
13938       input_path=`$CYGPATH -u "$shortmode_path"`
13939       new_path="$input_path"
13940     fi
13941   fi
13942 
13943   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13944   if test "x$test_cygdrive_prefix" = x; then
13945     # As a simple fix, exclude /usr/bin since it's not a real path.
13946     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13947       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13948       # a path prefixed by /cygdrive for fixpath to work.
13949       new_path="$CYGWIN_ROOT_PATH$input_path"
13950     fi
13951   fi
13952 
13953 
13954   if test "x$path" != "x$new_path"; then
13955     BOOT_JDK="$new_path"
13956     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13957 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13958   fi
13959 
13960   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13961 
13962   path="$BOOT_JDK"
13963   has_colon=`$ECHO $path | $GREP ^.:`
13964   new_path="$path"
13965   if test "x$has_colon" = x; then
13966     # Not in mixed or Windows style, start by that.
13967     new_path=`cmd //c echo $path`
13968   fi
13969 
13970 
13971   input_path="$new_path"
13972   # Check if we need to convert this using DOS-style short mode. If the path
13973   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13974   # take no chances and rewrite it.
13975   # Note: m4 eats our [], so we need to use [ and ] instead.
13976   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13977   if test "x$has_forbidden_chars" != x; then
13978     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13979     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13980   fi
13981 
13982 
13983   windows_path="$new_path"
13984   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13985     unix_path=`$CYGPATH -u "$windows_path"`
13986     new_path="$unix_path"
13987   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13988     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13989     new_path="$unix_path"
13990   fi
13991 
13992   if test "x$path" != "x$new_path"; then
13993     BOOT_JDK="$new_path"
13994     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13995 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13996   fi
13997 
13998   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13999   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14000 
14001   else
14002     # We're on a posix platform. Hooray! :)
14003     path="$BOOT_JDK"
14004     has_space=`$ECHO "$path" | $GREP " "`
14005     if test "x$has_space" != x; then
14006       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14007 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14008       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14009     fi
14010 
14011     # Use eval to expand a potential ~
14012     eval path="$path"
14013     if test ! -f "$path" && test ! -d "$path"; then
14014       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14015     fi
14016 
14017     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14018   fi
14019 
14020               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14021 $as_echo_n "checking for Boot JDK... " >&6; }
14022               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14023 $as_echo "$BOOT_JDK" >&6; }
14024               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14025 $as_echo_n "checking Boot JDK version... " >&6; }
14026               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14027               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14028 $as_echo "$BOOT_JDK_VERSION" >&6; }
14029             fi # end check jdk version
14030           fi # end check rt.jar
14031         fi # end check javac
14032       fi # end check java
14033     fi # end check boot jdk found
14034   fi
14035 
14036     done
14037   fi
14038 
14039   fi
14040 
14041 
14042     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14043     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14044       # Do we have a bin/java?
14045       if test ! -x "$BOOT_JDK/bin/java"; then
14046         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14047 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14048         BOOT_JDK_FOUND=no
14049       else
14050         # Do we have a bin/javac?
14051         if test ! -x "$BOOT_JDK/bin/javac"; then
14052           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14053 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14054           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14055 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14056           BOOT_JDK_FOUND=no
14057         else
14058           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14059           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14060             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14061 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14062             BOOT_JDK_FOUND=no
14063           else
14064             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14065             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14066 
14067             # Extra M4 quote needed to protect [] in grep expression.
14068             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14069             if test "x$FOUND_VERSION_78" = x; then
14070               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14071 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14072               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14073 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14074               BOOT_JDK_FOUND=no
14075             else
14076               # We're done! :-)
14077               BOOT_JDK_FOUND=yes
14078 
14079   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14080 
14081   # Input might be given as Windows format, start by converting to
14082   # unix format.
14083   path="$BOOT_JDK"
14084   new_path=`$CYGPATH -u "$path"`
14085 
14086   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14087   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14088   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14089   # "foo.exe" is OK but "foo" is an error.
14090   #
14091   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14092   # It is also a way to make sure we got the proper file name for the real test later on.
14093   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14094   if test "x$test_shortpath" = x; then
14095     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14096 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14097     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14098   fi
14099 
14100   # Call helper function which possibly converts this using DOS-style short mode.
14101   # If so, the updated path is stored in $new_path.
14102 
14103   input_path="$new_path"
14104   # Check if we need to convert this using DOS-style short mode. If the path
14105   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14106   # take no chances and rewrite it.
14107   # Note: m4 eats our [], so we need to use [ and ] instead.
14108   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14109   if test "x$has_forbidden_chars" != x; then
14110     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14111     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14112     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14113     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14114       # Going to short mode and back again did indeed matter. Since short mode is
14115       # case insensitive, let's make it lowercase to improve readability.
14116       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14117       # Now convert it back to Unix-stile (cygpath)
14118       input_path=`$CYGPATH -u "$shortmode_path"`
14119       new_path="$input_path"
14120     fi
14121   fi
14122 
14123   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14124   if test "x$test_cygdrive_prefix" = x; then
14125     # As a simple fix, exclude /usr/bin since it's not a real path.
14126     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14127       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14128       # a path prefixed by /cygdrive for fixpath to work.
14129       new_path="$CYGWIN_ROOT_PATH$input_path"
14130     fi
14131   fi
14132 
14133 
14134   if test "x$path" != "x$new_path"; then
14135     BOOT_JDK="$new_path"
14136     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14137 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14138   fi
14139 
14140   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14141 
14142   path="$BOOT_JDK"
14143   has_colon=`$ECHO $path | $GREP ^.:`
14144   new_path="$path"
14145   if test "x$has_colon" = x; then
14146     # Not in mixed or Windows style, start by that.
14147     new_path=`cmd //c echo $path`
14148   fi
14149 
14150 
14151   input_path="$new_path"
14152   # Check if we need to convert this using DOS-style short mode. If the path
14153   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14154   # take no chances and rewrite it.
14155   # Note: m4 eats our [], so we need to use [ and ] instead.
14156   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14157   if test "x$has_forbidden_chars" != x; then
14158     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14159     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14160   fi
14161 
14162 
14163   windows_path="$new_path"
14164   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14165     unix_path=`$CYGPATH -u "$windows_path"`
14166     new_path="$unix_path"
14167   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14168     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14169     new_path="$unix_path"
14170   fi
14171 
14172   if test "x$path" != "x$new_path"; then
14173     BOOT_JDK="$new_path"
14174     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14175 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14176   fi
14177 
14178   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14179   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14180 
14181   else
14182     # We're on a posix platform. Hooray! :)
14183     path="$BOOT_JDK"
14184     has_space=`$ECHO "$path" | $GREP " "`
14185     if test "x$has_space" != x; then
14186       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14187 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14188       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14189     fi
14190 
14191     # Use eval to expand a potential ~
14192     eval path="$path"
14193     if test ! -f "$path" && test ! -d "$path"; then
14194       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14195     fi
14196 
14197     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14198   fi
14199 
14200               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14201 $as_echo_n "checking for Boot JDK... " >&6; }
14202               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14203 $as_echo "$BOOT_JDK" >&6; }
14204               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14205 $as_echo_n "checking Boot JDK version... " >&6; }
14206               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14207               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14208 $as_echo "$BOOT_JDK_VERSION" >&6; }
14209             fi # end check jdk version
14210           fi # end check rt.jar
14211         fi # end check javac
14212       fi # end check java
14213     fi # end check boot jdk found
14214   fi
14215 
14216 
14217   if test "x$BOOT_JDK_FOUND" = xno; then
14218     # Now execute the test
14219 
14220   BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
14221   BOOT_JDK_SUFFIX=""
14222   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14223   if test "x$ALL_JDKS_FOUND" != x; then
14224     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14225 
14226   if test "x$BOOT_JDK_FOUND" = xno; then
14227     # Now execute the test
14228 
14229         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14230         if test -d "$BOOT_JDK"; then
14231           BOOT_JDK_FOUND=maybe
14232           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14233 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14234         fi
14235 
14236 
14237     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14238     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14239       # Do we have a bin/java?
14240       if test ! -x "$BOOT_JDK/bin/java"; then
14241         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14242 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14243         BOOT_JDK_FOUND=no
14244       else
14245         # Do we have a bin/javac?
14246         if test ! -x "$BOOT_JDK/bin/javac"; then
14247           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14248 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14249           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14250 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14251           BOOT_JDK_FOUND=no
14252         else
14253           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14254           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14255             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14256 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14257             BOOT_JDK_FOUND=no
14258           else
14259             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14260             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14261 
14262             # Extra M4 quote needed to protect [] in grep expression.
14263             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14264             if test "x$FOUND_VERSION_78" = x; then
14265               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14266 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14267               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14268 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14269               BOOT_JDK_FOUND=no
14270             else
14271               # We're done! :-)
14272               BOOT_JDK_FOUND=yes
14273 
14274   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14275 
14276   # Input might be given as Windows format, start by converting to
14277   # unix format.
14278   path="$BOOT_JDK"
14279   new_path=`$CYGPATH -u "$path"`
14280 
14281   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14282   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14283   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14284   # "foo.exe" is OK but "foo" is an error.
14285   #
14286   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14287   # It is also a way to make sure we got the proper file name for the real test later on.
14288   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14289   if test "x$test_shortpath" = x; then
14290     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14291 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14292     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14293   fi
14294 
14295   # Call helper function which possibly converts this using DOS-style short mode.
14296   # If so, the updated path is stored in $new_path.
14297 
14298   input_path="$new_path"
14299   # Check if we need to convert this using DOS-style short mode. If the path
14300   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14301   # take no chances and rewrite it.
14302   # Note: m4 eats our [], so we need to use [ and ] instead.
14303   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14304   if test "x$has_forbidden_chars" != x; then
14305     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14306     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14307     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14308     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14309       # Going to short mode and back again did indeed matter. Since short mode is
14310       # case insensitive, let's make it lowercase to improve readability.
14311       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14312       # Now convert it back to Unix-stile (cygpath)
14313       input_path=`$CYGPATH -u "$shortmode_path"`
14314       new_path="$input_path"
14315     fi
14316   fi
14317 
14318   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14319   if test "x$test_cygdrive_prefix" = x; then
14320     # As a simple fix, exclude /usr/bin since it's not a real path.
14321     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14322       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14323       # a path prefixed by /cygdrive for fixpath to work.
14324       new_path="$CYGWIN_ROOT_PATH$input_path"
14325     fi
14326   fi
14327 
14328 
14329   if test "x$path" != "x$new_path"; then
14330     BOOT_JDK="$new_path"
14331     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14332 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14333   fi
14334 
14335   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14336 
14337   path="$BOOT_JDK"
14338   has_colon=`$ECHO $path | $GREP ^.:`
14339   new_path="$path"
14340   if test "x$has_colon" = x; then
14341     # Not in mixed or Windows style, start by that.
14342     new_path=`cmd //c echo $path`
14343   fi
14344 
14345 
14346   input_path="$new_path"
14347   # Check if we need to convert this using DOS-style short mode. If the path
14348   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14349   # take no chances and rewrite it.
14350   # Note: m4 eats our [], so we need to use [ and ] instead.
14351   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14352   if test "x$has_forbidden_chars" != x; then
14353     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14354     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14355   fi
14356 
14357 
14358   windows_path="$new_path"
14359   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14360     unix_path=`$CYGPATH -u "$windows_path"`
14361     new_path="$unix_path"
14362   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14363     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14364     new_path="$unix_path"
14365   fi
14366 
14367   if test "x$path" != "x$new_path"; then
14368     BOOT_JDK="$new_path"
14369     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14370 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14371   fi
14372 
14373   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14374   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14375 
14376   else
14377     # We're on a posix platform. Hooray! :)
14378     path="$BOOT_JDK"
14379     has_space=`$ECHO "$path" | $GREP " "`
14380     if test "x$has_space" != x; then
14381       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14382 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14383       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14384     fi
14385 
14386     # Use eval to expand a potential ~
14387     eval path="$path"
14388     if test ! -f "$path" && test ! -d "$path"; then
14389       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14390     fi
14391 
14392     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14393   fi
14394 
14395               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14396 $as_echo_n "checking for Boot JDK... " >&6; }
14397               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14398 $as_echo "$BOOT_JDK" >&6; }
14399               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14400 $as_echo_n "checking Boot JDK version... " >&6; }
14401               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14402               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14403 $as_echo "$BOOT_JDK_VERSION" >&6; }
14404             fi # end check jdk version
14405           fi # end check rt.jar
14406         fi # end check javac
14407       fi # end check java
14408     fi # end check boot jdk found
14409   fi
14410 
14411     done
14412   fi
14413 
14414 
14415     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14416     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14417       # Do we have a bin/java?
14418       if test ! -x "$BOOT_JDK/bin/java"; then
14419         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14420 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14421         BOOT_JDK_FOUND=no
14422       else
14423         # Do we have a bin/javac?
14424         if test ! -x "$BOOT_JDK/bin/javac"; then
14425           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14426 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14427           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14428 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14429           BOOT_JDK_FOUND=no
14430         else
14431           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14432           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14433             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14434 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14435             BOOT_JDK_FOUND=no
14436           else
14437             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14438             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14439 
14440             # Extra M4 quote needed to protect [] in grep expression.
14441             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14442             if test "x$FOUND_VERSION_78" = x; then
14443               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14444 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14445               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14446 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14447               BOOT_JDK_FOUND=no
14448             else
14449               # We're done! :-)
14450               BOOT_JDK_FOUND=yes
14451 
14452   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14453 
14454   # Input might be given as Windows format, start by converting to
14455   # unix format.
14456   path="$BOOT_JDK"
14457   new_path=`$CYGPATH -u "$path"`
14458 
14459   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14460   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14461   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14462   # "foo.exe" is OK but "foo" is an error.
14463   #
14464   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14465   # It is also a way to make sure we got the proper file name for the real test later on.
14466   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14467   if test "x$test_shortpath" = x; then
14468     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14469 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14470     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14471   fi
14472 
14473   # Call helper function which possibly converts this using DOS-style short mode.
14474   # If so, the updated path is stored in $new_path.
14475 
14476   input_path="$new_path"
14477   # Check if we need to convert this using DOS-style short mode. If the path
14478   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14479   # take no chances and rewrite it.
14480   # Note: m4 eats our [], so we need to use [ and ] instead.
14481   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14482   if test "x$has_forbidden_chars" != x; then
14483     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14484     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14485     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14486     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14487       # Going to short mode and back again did indeed matter. Since short mode is
14488       # case insensitive, let's make it lowercase to improve readability.
14489       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14490       # Now convert it back to Unix-stile (cygpath)
14491       input_path=`$CYGPATH -u "$shortmode_path"`
14492       new_path="$input_path"
14493     fi
14494   fi
14495 
14496   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14497   if test "x$test_cygdrive_prefix" = x; then
14498     # As a simple fix, exclude /usr/bin since it's not a real path.
14499     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14500       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14501       # a path prefixed by /cygdrive for fixpath to work.
14502       new_path="$CYGWIN_ROOT_PATH$input_path"
14503     fi
14504   fi
14505 
14506 
14507   if test "x$path" != "x$new_path"; then
14508     BOOT_JDK="$new_path"
14509     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14510 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14511   fi
14512 
14513   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14514 
14515   path="$BOOT_JDK"
14516   has_colon=`$ECHO $path | $GREP ^.:`
14517   new_path="$path"
14518   if test "x$has_colon" = x; then
14519     # Not in mixed or Windows style, start by that.
14520     new_path=`cmd //c echo $path`
14521   fi
14522 
14523 
14524   input_path="$new_path"
14525   # Check if we need to convert this using DOS-style short mode. If the path
14526   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14527   # take no chances and rewrite it.
14528   # Note: m4 eats our [], so we need to use [ and ] instead.
14529   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14530   if test "x$has_forbidden_chars" != x; then
14531     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14532     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14533   fi
14534 
14535 
14536   windows_path="$new_path"
14537   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14538     unix_path=`$CYGPATH -u "$windows_path"`
14539     new_path="$unix_path"
14540   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14541     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14542     new_path="$unix_path"
14543   fi
14544 
14545   if test "x$path" != "x$new_path"; then
14546     BOOT_JDK="$new_path"
14547     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14548 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14549   fi
14550 
14551   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14552   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14553 
14554   else
14555     # We're on a posix platform. Hooray! :)
14556     path="$BOOT_JDK"
14557     has_space=`$ECHO "$path" | $GREP " "`
14558     if test "x$has_space" != x; then
14559       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14560 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14561       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14562     fi
14563 
14564     # Use eval to expand a potential ~
14565     eval path="$path"
14566     if test ! -f "$path" && test ! -d "$path"; then
14567       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14568     fi
14569 
14570     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14571   fi
14572 
14573               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14574 $as_echo_n "checking for Boot JDK... " >&6; }
14575               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14576 $as_echo "$BOOT_JDK" >&6; }
14577               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14578 $as_echo_n "checking Boot JDK version... " >&6; }
14579               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14580               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14581 $as_echo "$BOOT_JDK_VERSION" >&6; }
14582             fi # end check jdk version
14583           fi # end check rt.jar
14584         fi # end check javac
14585       fi # end check java
14586     fi # end check boot jdk found
14587   fi
14588 
14589   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14590 
14591   if test "x$BOOT_JDK_FOUND" = xno; then
14592     # Now execute the test
14593 
14594   BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14595   BOOT_JDK_SUFFIX="/Contents/Home"
14596   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14597   if test "x$ALL_JDKS_FOUND" != x; then
14598     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14599 
14600   if test "x$BOOT_JDK_FOUND" = xno; then
14601     # Now execute the test
14602 
14603         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14604         if test -d "$BOOT_JDK"; then
14605           BOOT_JDK_FOUND=maybe
14606           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14607 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14608         fi
14609 
14610 
14611     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14612     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14613       # Do we have a bin/java?
14614       if test ! -x "$BOOT_JDK/bin/java"; then
14615         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14616 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14617         BOOT_JDK_FOUND=no
14618       else
14619         # Do we have a bin/javac?
14620         if test ! -x "$BOOT_JDK/bin/javac"; then
14621           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14622 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14623           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14624 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14625           BOOT_JDK_FOUND=no
14626         else
14627           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14628           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14629             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14630 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14631             BOOT_JDK_FOUND=no
14632           else
14633             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14634             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14635 
14636             # Extra M4 quote needed to protect [] in grep expression.
14637             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14638             if test "x$FOUND_VERSION_78" = x; then
14639               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14640 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14641               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14642 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14643               BOOT_JDK_FOUND=no
14644             else
14645               # We're done! :-)
14646               BOOT_JDK_FOUND=yes
14647 
14648   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14649 
14650   # Input might be given as Windows format, start by converting to
14651   # unix format.
14652   path="$BOOT_JDK"
14653   new_path=`$CYGPATH -u "$path"`
14654 
14655   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14656   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14657   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14658   # "foo.exe" is OK but "foo" is an error.
14659   #
14660   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14661   # It is also a way to make sure we got the proper file name for the real test later on.
14662   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14663   if test "x$test_shortpath" = x; then
14664     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14665 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14666     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14667   fi
14668 
14669   # Call helper function which possibly converts this using DOS-style short mode.
14670   # If so, the updated path is stored in $new_path.
14671 
14672   input_path="$new_path"
14673   # Check if we need to convert this using DOS-style short mode. If the path
14674   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14675   # take no chances and rewrite it.
14676   # Note: m4 eats our [], so we need to use [ and ] instead.
14677   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14678   if test "x$has_forbidden_chars" != x; then
14679     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14680     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14681     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14682     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14683       # Going to short mode and back again did indeed matter. Since short mode is
14684       # case insensitive, let's make it lowercase to improve readability.
14685       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14686       # Now convert it back to Unix-stile (cygpath)
14687       input_path=`$CYGPATH -u "$shortmode_path"`
14688       new_path="$input_path"
14689     fi
14690   fi
14691 
14692   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14693   if test "x$test_cygdrive_prefix" = x; then
14694     # As a simple fix, exclude /usr/bin since it's not a real path.
14695     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14696       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14697       # a path prefixed by /cygdrive for fixpath to work.
14698       new_path="$CYGWIN_ROOT_PATH$input_path"
14699     fi
14700   fi
14701 
14702 
14703   if test "x$path" != "x$new_path"; then
14704     BOOT_JDK="$new_path"
14705     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14706 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14707   fi
14708 
14709   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14710 
14711   path="$BOOT_JDK"
14712   has_colon=`$ECHO $path | $GREP ^.:`
14713   new_path="$path"
14714   if test "x$has_colon" = x; then
14715     # Not in mixed or Windows style, start by that.
14716     new_path=`cmd //c echo $path`
14717   fi
14718 
14719 
14720   input_path="$new_path"
14721   # Check if we need to convert this using DOS-style short mode. If the path
14722   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14723   # take no chances and rewrite it.
14724   # Note: m4 eats our [], so we need to use [ and ] instead.
14725   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14726   if test "x$has_forbidden_chars" != x; then
14727     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14728     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14729   fi
14730 
14731 
14732   windows_path="$new_path"
14733   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14734     unix_path=`$CYGPATH -u "$windows_path"`
14735     new_path="$unix_path"
14736   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14737     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14738     new_path="$unix_path"
14739   fi
14740 
14741   if test "x$path" != "x$new_path"; then
14742     BOOT_JDK="$new_path"
14743     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14744 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14745   fi
14746 
14747   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14748   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14749 
14750   else
14751     # We're on a posix platform. Hooray! :)
14752     path="$BOOT_JDK"
14753     has_space=`$ECHO "$path" | $GREP " "`
14754     if test "x$has_space" != x; then
14755       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14756 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14757       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14758     fi
14759 
14760     # Use eval to expand a potential ~
14761     eval path="$path"
14762     if test ! -f "$path" && test ! -d "$path"; then
14763       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14764     fi
14765 
14766     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14767   fi
14768 
14769               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14770 $as_echo_n "checking for Boot JDK... " >&6; }
14771               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14772 $as_echo "$BOOT_JDK" >&6; }
14773               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14774 $as_echo_n "checking Boot JDK version... " >&6; }
14775               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14776               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14777 $as_echo "$BOOT_JDK_VERSION" >&6; }
14778             fi # end check jdk version
14779           fi # end check rt.jar
14780         fi # end check javac
14781       fi # end check java
14782     fi # end check boot jdk found
14783   fi
14784 
14785     done
14786   fi
14787 
14788 
14789     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14790     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14791       # Do we have a bin/java?
14792       if test ! -x "$BOOT_JDK/bin/java"; then
14793         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14794 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14795         BOOT_JDK_FOUND=no
14796       else
14797         # Do we have a bin/javac?
14798         if test ! -x "$BOOT_JDK/bin/javac"; then
14799           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14800 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14801           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14802 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14803           BOOT_JDK_FOUND=no
14804         else
14805           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14806           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14807             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14808 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14809             BOOT_JDK_FOUND=no
14810           else
14811             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14812             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14813 
14814             # Extra M4 quote needed to protect [] in grep expression.
14815             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14816             if test "x$FOUND_VERSION_78" = x; then
14817               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14818 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14819               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14820 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14821               BOOT_JDK_FOUND=no
14822             else
14823               # We're done! :-)
14824               BOOT_JDK_FOUND=yes
14825 
14826   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14827 
14828   # Input might be given as Windows format, start by converting to
14829   # unix format.
14830   path="$BOOT_JDK"
14831   new_path=`$CYGPATH -u "$path"`
14832 
14833   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14834   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14835   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14836   # "foo.exe" is OK but "foo" is an error.
14837   #
14838   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14839   # It is also a way to make sure we got the proper file name for the real test later on.
14840   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14841   if test "x$test_shortpath" = x; then
14842     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14843 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14844     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14845   fi
14846 
14847   # Call helper function which possibly converts this using DOS-style short mode.
14848   # If so, the updated path is stored in $new_path.
14849 
14850   input_path="$new_path"
14851   # Check if we need to convert this using DOS-style short mode. If the path
14852   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14853   # take no chances and rewrite it.
14854   # Note: m4 eats our [], so we need to use [ and ] instead.
14855   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14856   if test "x$has_forbidden_chars" != x; then
14857     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14858     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14859     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14860     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14861       # Going to short mode and back again did indeed matter. Since short mode is
14862       # case insensitive, let's make it lowercase to improve readability.
14863       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14864       # Now convert it back to Unix-stile (cygpath)
14865       input_path=`$CYGPATH -u "$shortmode_path"`
14866       new_path="$input_path"
14867     fi
14868   fi
14869 
14870   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14871   if test "x$test_cygdrive_prefix" = x; then
14872     # As a simple fix, exclude /usr/bin since it's not a real path.
14873     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14874       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14875       # a path prefixed by /cygdrive for fixpath to work.
14876       new_path="$CYGWIN_ROOT_PATH$input_path"
14877     fi
14878   fi
14879 
14880 
14881   if test "x$path" != "x$new_path"; then
14882     BOOT_JDK="$new_path"
14883     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14884 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14885   fi
14886 
14887   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14888 
14889   path="$BOOT_JDK"
14890   has_colon=`$ECHO $path | $GREP ^.:`
14891   new_path="$path"
14892   if test "x$has_colon" = x; then
14893     # Not in mixed or Windows style, start by that.
14894     new_path=`cmd //c echo $path`
14895   fi
14896 
14897 
14898   input_path="$new_path"
14899   # Check if we need to convert this using DOS-style short mode. If the path
14900   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14901   # take no chances and rewrite it.
14902   # Note: m4 eats our [], so we need to use [ and ] instead.
14903   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14904   if test "x$has_forbidden_chars" != x; then
14905     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14906     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14907   fi
14908 
14909 
14910   windows_path="$new_path"
14911   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14912     unix_path=`$CYGPATH -u "$windows_path"`
14913     new_path="$unix_path"
14914   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14915     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14916     new_path="$unix_path"
14917   fi
14918 
14919   if test "x$path" != "x$new_path"; then
14920     BOOT_JDK="$new_path"
14921     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14922 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14923   fi
14924 
14925   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14926   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14927 
14928   else
14929     # We're on a posix platform. Hooray! :)
14930     path="$BOOT_JDK"
14931     has_space=`$ECHO "$path" | $GREP " "`
14932     if test "x$has_space" != x; then
14933       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14934 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14935       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14936     fi
14937 
14938     # Use eval to expand a potential ~
14939     eval path="$path"
14940     if test ! -f "$path" && test ! -d "$path"; then
14941       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14942     fi
14943 
14944     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14945   fi
14946 
14947               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14948 $as_echo_n "checking for Boot JDK... " >&6; }
14949               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14950 $as_echo "$BOOT_JDK" >&6; }
14951               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14952 $as_echo_n "checking Boot JDK version... " >&6; }
14953               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14954               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14955 $as_echo "$BOOT_JDK_VERSION" >&6; }
14956             fi # end check jdk version
14957           fi # end check rt.jar
14958         fi # end check javac
14959       fi # end check java
14960     fi # end check boot jdk found
14961   fi
14962 
14963 
14964   if test "x$BOOT_JDK_FOUND" = xno; then
14965     # Now execute the test
14966 
14967   BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14968   BOOT_JDK_SUFFIX="/Contents/Home"
14969   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14970   if test "x$ALL_JDKS_FOUND" != x; then
14971     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14972 
14973   if test "x$BOOT_JDK_FOUND" = xno; then
14974     # Now execute the test
14975 
14976         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14977         if test -d "$BOOT_JDK"; then
14978           BOOT_JDK_FOUND=maybe
14979           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14980 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14981         fi
14982 
14983 
14984     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14985     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14986       # Do we have a bin/java?
14987       if test ! -x "$BOOT_JDK/bin/java"; then
14988         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14989 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14990         BOOT_JDK_FOUND=no
14991       else
14992         # Do we have a bin/javac?
14993         if test ! -x "$BOOT_JDK/bin/javac"; then
14994           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14995 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14996           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14997 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14998           BOOT_JDK_FOUND=no
14999         else
15000           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15001           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15002             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15003 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15004             BOOT_JDK_FOUND=no
15005           else
15006             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15007             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15008 
15009             # Extra M4 quote needed to protect [] in grep expression.
15010             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15011             if test "x$FOUND_VERSION_78" = x; then
15012               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15013 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15014               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15015 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15016               BOOT_JDK_FOUND=no
15017             else
15018               # We're done! :-)
15019               BOOT_JDK_FOUND=yes
15020 
15021   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15022 
15023   # Input might be given as Windows format, start by converting to
15024   # unix format.
15025   path="$BOOT_JDK"
15026   new_path=`$CYGPATH -u "$path"`
15027 
15028   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15029   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15030   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15031   # "foo.exe" is OK but "foo" is an error.
15032   #
15033   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15034   # It is also a way to make sure we got the proper file name for the real test later on.
15035   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15036   if test "x$test_shortpath" = x; then
15037     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15038 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15039     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15040   fi
15041 
15042   # Call helper function which possibly converts this using DOS-style short mode.
15043   # If so, the updated path is stored in $new_path.
15044 
15045   input_path="$new_path"
15046   # Check if we need to convert this using DOS-style short mode. If the path
15047   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15048   # take no chances and rewrite it.
15049   # Note: m4 eats our [], so we need to use [ and ] instead.
15050   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15051   if test "x$has_forbidden_chars" != x; then
15052     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15053     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15054     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15055     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15056       # Going to short mode and back again did indeed matter. Since short mode is
15057       # case insensitive, let's make it lowercase to improve readability.
15058       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15059       # Now convert it back to Unix-stile (cygpath)
15060       input_path=`$CYGPATH -u "$shortmode_path"`
15061       new_path="$input_path"
15062     fi
15063   fi
15064 
15065   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15066   if test "x$test_cygdrive_prefix" = x; then
15067     # As a simple fix, exclude /usr/bin since it's not a real path.
15068     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15069       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15070       # a path prefixed by /cygdrive for fixpath to work.
15071       new_path="$CYGWIN_ROOT_PATH$input_path"
15072     fi
15073   fi
15074 
15075 
15076   if test "x$path" != "x$new_path"; then
15077     BOOT_JDK="$new_path"
15078     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15079 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15080   fi
15081 
15082   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15083 
15084   path="$BOOT_JDK"
15085   has_colon=`$ECHO $path | $GREP ^.:`
15086   new_path="$path"
15087   if test "x$has_colon" = x; then
15088     # Not in mixed or Windows style, start by that.
15089     new_path=`cmd //c echo $path`
15090   fi
15091 
15092 
15093   input_path="$new_path"
15094   # Check if we need to convert this using DOS-style short mode. If the path
15095   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15096   # take no chances and rewrite it.
15097   # Note: m4 eats our [], so we need to use [ and ] instead.
15098   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15099   if test "x$has_forbidden_chars" != x; then
15100     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15101     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15102   fi
15103 
15104 
15105   windows_path="$new_path"
15106   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15107     unix_path=`$CYGPATH -u "$windows_path"`
15108     new_path="$unix_path"
15109   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15110     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15111     new_path="$unix_path"
15112   fi
15113 
15114   if test "x$path" != "x$new_path"; then
15115     BOOT_JDK="$new_path"
15116     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15117 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15118   fi
15119 
15120   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15121   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15122 
15123   else
15124     # We're on a posix platform. Hooray! :)
15125     path="$BOOT_JDK"
15126     has_space=`$ECHO "$path" | $GREP " "`
15127     if test "x$has_space" != x; then
15128       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15129 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15130       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15131     fi
15132 
15133     # Use eval to expand a potential ~
15134     eval path="$path"
15135     if test ! -f "$path" && test ! -d "$path"; then
15136       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15137     fi
15138 
15139     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15140   fi
15141 
15142               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15143 $as_echo_n "checking for Boot JDK... " >&6; }
15144               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15145 $as_echo "$BOOT_JDK" >&6; }
15146               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15147 $as_echo_n "checking Boot JDK version... " >&6; }
15148               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15149               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15150 $as_echo "$BOOT_JDK_VERSION" >&6; }
15151             fi # end check jdk version
15152           fi # end check rt.jar
15153         fi # end check javac
15154       fi # end check java
15155     fi # end check boot jdk found
15156   fi
15157 
15158     done
15159   fi
15160 
15161 
15162     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15163     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15164       # Do we have a bin/java?
15165       if test ! -x "$BOOT_JDK/bin/java"; then
15166         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15167 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15168         BOOT_JDK_FOUND=no
15169       else
15170         # Do we have a bin/javac?
15171         if test ! -x "$BOOT_JDK/bin/javac"; then
15172           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15173 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15174           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15175 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15176           BOOT_JDK_FOUND=no
15177         else
15178           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15179           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15180             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15181 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15182             BOOT_JDK_FOUND=no
15183           else
15184             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15185             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15186 
15187             # Extra M4 quote needed to protect [] in grep expression.
15188             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15189             if test "x$FOUND_VERSION_78" = x; then
15190               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15191 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15192               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15193 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15194               BOOT_JDK_FOUND=no
15195             else
15196               # We're done! :-)
15197               BOOT_JDK_FOUND=yes
15198 
15199   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15200 
15201   # Input might be given as Windows format, start by converting to
15202   # unix format.
15203   path="$BOOT_JDK"
15204   new_path=`$CYGPATH -u "$path"`
15205 
15206   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15207   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15208   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15209   # "foo.exe" is OK but "foo" is an error.
15210   #
15211   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15212   # It is also a way to make sure we got the proper file name for the real test later on.
15213   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15214   if test "x$test_shortpath" = x; then
15215     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15216 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15217     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15218   fi
15219 
15220   # Call helper function which possibly converts this using DOS-style short mode.
15221   # If so, the updated path is stored in $new_path.
15222 
15223   input_path="$new_path"
15224   # Check if we need to convert this using DOS-style short mode. If the path
15225   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15226   # take no chances and rewrite it.
15227   # Note: m4 eats our [], so we need to use [ and ] instead.
15228   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15229   if test "x$has_forbidden_chars" != x; then
15230     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15231     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15232     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15233     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15234       # Going to short mode and back again did indeed matter. Since short mode is
15235       # case insensitive, let's make it lowercase to improve readability.
15236       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15237       # Now convert it back to Unix-stile (cygpath)
15238       input_path=`$CYGPATH -u "$shortmode_path"`
15239       new_path="$input_path"
15240     fi
15241   fi
15242 
15243   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15244   if test "x$test_cygdrive_prefix" = x; then
15245     # As a simple fix, exclude /usr/bin since it's not a real path.
15246     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15247       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15248       # a path prefixed by /cygdrive for fixpath to work.
15249       new_path="$CYGWIN_ROOT_PATH$input_path"
15250     fi
15251   fi
15252 
15253 
15254   if test "x$path" != "x$new_path"; then
15255     BOOT_JDK="$new_path"
15256     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15257 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15258   fi
15259 
15260   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15261 
15262   path="$BOOT_JDK"
15263   has_colon=`$ECHO $path | $GREP ^.:`
15264   new_path="$path"
15265   if test "x$has_colon" = x; then
15266     # Not in mixed or Windows style, start by that.
15267     new_path=`cmd //c echo $path`
15268   fi
15269 
15270 
15271   input_path="$new_path"
15272   # Check if we need to convert this using DOS-style short mode. If the path
15273   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15274   # take no chances and rewrite it.
15275   # Note: m4 eats our [], so we need to use [ and ] instead.
15276   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15277   if test "x$has_forbidden_chars" != x; then
15278     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15279     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15280   fi
15281 
15282 
15283   windows_path="$new_path"
15284   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15285     unix_path=`$CYGPATH -u "$windows_path"`
15286     new_path="$unix_path"
15287   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15288     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15289     new_path="$unix_path"
15290   fi
15291 
15292   if test "x$path" != "x$new_path"; then
15293     BOOT_JDK="$new_path"
15294     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15295 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15296   fi
15297 
15298   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15299   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15300 
15301   else
15302     # We're on a posix platform. Hooray! :)
15303     path="$BOOT_JDK"
15304     has_space=`$ECHO "$path" | $GREP " "`
15305     if test "x$has_space" != x; then
15306       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15307 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15308       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15309     fi
15310 
15311     # Use eval to expand a potential ~
15312     eval path="$path"
15313     if test ! -f "$path" && test ! -d "$path"; then
15314       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15315     fi
15316 
15317     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15318   fi
15319 
15320               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15321 $as_echo_n "checking for Boot JDK... " >&6; }
15322               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15323 $as_echo "$BOOT_JDK" >&6; }
15324               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15325 $as_echo_n "checking Boot JDK version... " >&6; }
15326               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15327               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15328 $as_echo "$BOOT_JDK_VERSION" >&6; }
15329             fi # end check jdk version
15330           fi # end check rt.jar
15331         fi # end check javac
15332       fi # end check java
15333     fi # end check boot jdk found
15334   fi
15335 
15336   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
15337 
15338   if test "x$BOOT_JDK_FOUND" = xno; then
15339     # Now execute the test
15340 
15341   BOOT_JDK_PREFIX="/usr/lib/jvm"
15342   BOOT_JDK_SUFFIX=""
15343   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
15344   if test "x$ALL_JDKS_FOUND" != x; then
15345     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
15346 
15347   if test "x$BOOT_JDK_FOUND" = xno; then
15348     # Now execute the test
15349 
15350         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
15351         if test -d "$BOOT_JDK"; then
15352           BOOT_JDK_FOUND=maybe
15353           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
15354 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
15355         fi
15356 
15357 
15358     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15359     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15360       # Do we have a bin/java?
15361       if test ! -x "$BOOT_JDK/bin/java"; then
15362         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15363 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15364         BOOT_JDK_FOUND=no
15365       else
15366         # Do we have a bin/javac?
15367         if test ! -x "$BOOT_JDK/bin/javac"; then
15368           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15369 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15370           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15371 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15372           BOOT_JDK_FOUND=no
15373         else
15374           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15375           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15376             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15377 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15378             BOOT_JDK_FOUND=no
15379           else
15380             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15381             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15382 
15383             # Extra M4 quote needed to protect [] in grep expression.
15384             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15385             if test "x$FOUND_VERSION_78" = x; then
15386               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15387 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15388               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15389 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15390               BOOT_JDK_FOUND=no
15391             else
15392               # We're done! :-)
15393               BOOT_JDK_FOUND=yes
15394 
15395   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15396 
15397   # Input might be given as Windows format, start by converting to
15398   # unix format.
15399   path="$BOOT_JDK"
15400   new_path=`$CYGPATH -u "$path"`
15401 
15402   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15403   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15404   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15405   # "foo.exe" is OK but "foo" is an error.
15406   #
15407   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15408   # It is also a way to make sure we got the proper file name for the real test later on.
15409   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15410   if test "x$test_shortpath" = x; then
15411     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15412 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15413     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15414   fi
15415 
15416   # Call helper function which possibly converts this using DOS-style short mode.
15417   # If so, the updated path is stored in $new_path.
15418 
15419   input_path="$new_path"
15420   # Check if we need to convert this using DOS-style short mode. If the path
15421   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15422   # take no chances and rewrite it.
15423   # Note: m4 eats our [], so we need to use [ and ] instead.
15424   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15425   if test "x$has_forbidden_chars" != x; then
15426     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15427     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15428     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15429     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15430       # Going to short mode and back again did indeed matter. Since short mode is
15431       # case insensitive, let's make it lowercase to improve readability.
15432       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15433       # Now convert it back to Unix-stile (cygpath)
15434       input_path=`$CYGPATH -u "$shortmode_path"`
15435       new_path="$input_path"
15436     fi
15437   fi
15438 
15439   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15440   if test "x$test_cygdrive_prefix" = x; then
15441     # As a simple fix, exclude /usr/bin since it's not a real path.
15442     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15443       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15444       # a path prefixed by /cygdrive for fixpath to work.
15445       new_path="$CYGWIN_ROOT_PATH$input_path"
15446     fi
15447   fi
15448 
15449 
15450   if test "x$path" != "x$new_path"; then
15451     BOOT_JDK="$new_path"
15452     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15453 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15454   fi
15455 
15456   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15457 
15458   path="$BOOT_JDK"
15459   has_colon=`$ECHO $path | $GREP ^.:`
15460   new_path="$path"
15461   if test "x$has_colon" = x; then
15462     # Not in mixed or Windows style, start by that.
15463     new_path=`cmd //c echo $path`
15464   fi
15465 
15466 
15467   input_path="$new_path"
15468   # Check if we need to convert this using DOS-style short mode. If the path
15469   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15470   # take no chances and rewrite it.
15471   # Note: m4 eats our [], so we need to use [ and ] instead.
15472   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15473   if test "x$has_forbidden_chars" != x; then
15474     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15475     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15476   fi
15477 
15478 
15479   windows_path="$new_path"
15480   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15481     unix_path=`$CYGPATH -u "$windows_path"`
15482     new_path="$unix_path"
15483   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15484     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15485     new_path="$unix_path"
15486   fi
15487 
15488   if test "x$path" != "x$new_path"; then
15489     BOOT_JDK="$new_path"
15490     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15491 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15492   fi
15493 
15494   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15495   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15496 
15497   else
15498     # We're on a posix platform. Hooray! :)
15499     path="$BOOT_JDK"
15500     has_space=`$ECHO "$path" | $GREP " "`
15501     if test "x$has_space" != x; then
15502       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15503 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15504       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15505     fi
15506 
15507     # Use eval to expand a potential ~
15508     eval path="$path"
15509     if test ! -f "$path" && test ! -d "$path"; then
15510       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15511     fi
15512 
15513     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15514   fi
15515 
15516               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15517 $as_echo_n "checking for Boot JDK... " >&6; }
15518               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15519 $as_echo "$BOOT_JDK" >&6; }
15520               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15521 $as_echo_n "checking Boot JDK version... " >&6; }
15522               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15523               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15524 $as_echo "$BOOT_JDK_VERSION" >&6; }
15525             fi # end check jdk version
15526           fi # end check rt.jar
15527         fi # end check javac
15528       fi # end check java
15529     fi # end check boot jdk found
15530   fi
15531 
15532     done
15533   fi
15534 
15535 
15536     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15537     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15538       # Do we have a bin/java?
15539       if test ! -x "$BOOT_JDK/bin/java"; then
15540         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15541 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15542         BOOT_JDK_FOUND=no
15543       else
15544         # Do we have a bin/javac?
15545         if test ! -x "$BOOT_JDK/bin/javac"; then
15546           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15547 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15548           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15549 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15550           BOOT_JDK_FOUND=no
15551         else
15552           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15553           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15554             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15555 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15556             BOOT_JDK_FOUND=no
15557           else
15558             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15559             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15560 
15561             # Extra M4 quote needed to protect [] in grep expression.
15562             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15563             if test "x$FOUND_VERSION_78" = x; then
15564               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15565 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15566               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15567 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15568               BOOT_JDK_FOUND=no
15569             else
15570               # We're done! :-)
15571               BOOT_JDK_FOUND=yes
15572 
15573   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15574 
15575   # Input might be given as Windows format, start by converting to
15576   # unix format.
15577   path="$BOOT_JDK"
15578   new_path=`$CYGPATH -u "$path"`
15579 
15580   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15581   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15582   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15583   # "foo.exe" is OK but "foo" is an error.
15584   #
15585   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15586   # It is also a way to make sure we got the proper file name for the real test later on.
15587   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15588   if test "x$test_shortpath" = x; then
15589     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15590 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15591     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15592   fi
15593 
15594   # Call helper function which possibly converts this using DOS-style short mode.
15595   # If so, the updated path is stored in $new_path.
15596 
15597   input_path="$new_path"
15598   # Check if we need to convert this using DOS-style short mode. If the path
15599   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15600   # take no chances and rewrite it.
15601   # Note: m4 eats our [], so we need to use [ and ] instead.
15602   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15603   if test "x$has_forbidden_chars" != x; then
15604     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15605     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15606     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15607     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15608       # Going to short mode and back again did indeed matter. Since short mode is
15609       # case insensitive, let's make it lowercase to improve readability.
15610       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15611       # Now convert it back to Unix-stile (cygpath)
15612       input_path=`$CYGPATH -u "$shortmode_path"`
15613       new_path="$input_path"
15614     fi
15615   fi
15616 
15617   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15618   if test "x$test_cygdrive_prefix" = x; then
15619     # As a simple fix, exclude /usr/bin since it's not a real path.
15620     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15621       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15622       # a path prefixed by /cygdrive for fixpath to work.
15623       new_path="$CYGWIN_ROOT_PATH$input_path"
15624     fi
15625   fi
15626 
15627 
15628   if test "x$path" != "x$new_path"; then
15629     BOOT_JDK="$new_path"
15630     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15631 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15632   fi
15633 
15634   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15635 
15636   path="$BOOT_JDK"
15637   has_colon=`$ECHO $path | $GREP ^.:`
15638   new_path="$path"
15639   if test "x$has_colon" = x; then
15640     # Not in mixed or Windows style, start by that.
15641     new_path=`cmd //c echo $path`
15642   fi
15643 
15644 
15645   input_path="$new_path"
15646   # Check if we need to convert this using DOS-style short mode. If the path
15647   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15648   # take no chances and rewrite it.
15649   # Note: m4 eats our [], so we need to use [ and ] instead.
15650   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15651   if test "x$has_forbidden_chars" != x; then
15652     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15653     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15654   fi
15655 
15656 
15657   windows_path="$new_path"
15658   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15659     unix_path=`$CYGPATH -u "$windows_path"`
15660     new_path="$unix_path"
15661   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15662     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15663     new_path="$unix_path"
15664   fi
15665 
15666   if test "x$path" != "x$new_path"; then
15667     BOOT_JDK="$new_path"
15668     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15669 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15670   fi
15671 
15672   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15673   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15674 
15675   else
15676     # We're on a posix platform. Hooray! :)
15677     path="$BOOT_JDK"
15678     has_space=`$ECHO "$path" | $GREP " "`
15679     if test "x$has_space" != x; then
15680       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15681 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15682       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15683     fi
15684 
15685     # Use eval to expand a potential ~
15686     eval path="$path"
15687     if test ! -f "$path" && test ! -d "$path"; then
15688       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15689     fi
15690 
15691     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15692   fi
15693 
15694               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15695 $as_echo_n "checking for Boot JDK... " >&6; }
15696               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15697 $as_echo "$BOOT_JDK" >&6; }
15698               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15699 $as_echo_n "checking Boot JDK version... " >&6; }
15700               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15701               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15702 $as_echo "$BOOT_JDK_VERSION" >&6; }
15703             fi # end check jdk version
15704           fi # end check rt.jar
15705         fi # end check javac
15706       fi # end check java
15707     fi # end check boot jdk found
15708   fi
15709 
15710   fi
15711 
15712 
15713     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15714     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15715       # Do we have a bin/java?
15716       if test ! -x "$BOOT_JDK/bin/java"; then
15717         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15718 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15719         BOOT_JDK_FOUND=no
15720       else
15721         # Do we have a bin/javac?
15722         if test ! -x "$BOOT_JDK/bin/javac"; then
15723           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15724 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15725           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15726 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15727           BOOT_JDK_FOUND=no
15728         else
15729           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15730           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15731             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15732 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15733             BOOT_JDK_FOUND=no
15734           else
15735             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15736             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15737 
15738             # Extra M4 quote needed to protect [] in grep expression.
15739             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15740             if test "x$FOUND_VERSION_78" = x; then
15741               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15742 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15743               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15744 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15745               BOOT_JDK_FOUND=no
15746             else
15747               # We're done! :-)
15748               BOOT_JDK_FOUND=yes
15749 
15750   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15751 
15752   # Input might be given as Windows format, start by converting to
15753   # unix format.
15754   path="$BOOT_JDK"
15755   new_path=`$CYGPATH -u "$path"`
15756 
15757   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15758   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15759   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15760   # "foo.exe" is OK but "foo" is an error.
15761   #
15762   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15763   # It is also a way to make sure we got the proper file name for the real test later on.
15764   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15765   if test "x$test_shortpath" = x; then
15766     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15767 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15768     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15769   fi
15770 
15771   # Call helper function which possibly converts this using DOS-style short mode.
15772   # If so, the updated path is stored in $new_path.
15773 
15774   input_path="$new_path"
15775   # Check if we need to convert this using DOS-style short mode. If the path
15776   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15777   # take no chances and rewrite it.
15778   # Note: m4 eats our [], so we need to use [ and ] instead.
15779   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15780   if test "x$has_forbidden_chars" != x; then
15781     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15782     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15783     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15784     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15785       # Going to short mode and back again did indeed matter. Since short mode is
15786       # case insensitive, let's make it lowercase to improve readability.
15787       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15788       # Now convert it back to Unix-stile (cygpath)
15789       input_path=`$CYGPATH -u "$shortmode_path"`
15790       new_path="$input_path"
15791     fi
15792   fi
15793 
15794   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15795   if test "x$test_cygdrive_prefix" = x; then
15796     # As a simple fix, exclude /usr/bin since it's not a real path.
15797     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15798       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15799       # a path prefixed by /cygdrive for fixpath to work.
15800       new_path="$CYGWIN_ROOT_PATH$input_path"
15801     fi
15802   fi
15803 
15804 
15805   if test "x$path" != "x$new_path"; then
15806     BOOT_JDK="$new_path"
15807     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15808 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15809   fi
15810 
15811   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15812 
15813   path="$BOOT_JDK"
15814   has_colon=`$ECHO $path | $GREP ^.:`
15815   new_path="$path"
15816   if test "x$has_colon" = x; then
15817     # Not in mixed or Windows style, start by that.
15818     new_path=`cmd //c echo $path`
15819   fi
15820 
15821 
15822   input_path="$new_path"
15823   # Check if we need to convert this using DOS-style short mode. If the path
15824   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15825   # take no chances and rewrite it.
15826   # Note: m4 eats our [], so we need to use [ and ] instead.
15827   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15828   if test "x$has_forbidden_chars" != x; then
15829     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15830     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15831   fi
15832 
15833 
15834   windows_path="$new_path"
15835   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15836     unix_path=`$CYGPATH -u "$windows_path"`
15837     new_path="$unix_path"
15838   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15839     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15840     new_path="$unix_path"
15841   fi
15842 
15843   if test "x$path" != "x$new_path"; then
15844     BOOT_JDK="$new_path"
15845     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15846 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15847   fi
15848 
15849   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15850   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15851 
15852   else
15853     # We're on a posix platform. Hooray! :)
15854     path="$BOOT_JDK"
15855     has_space=`$ECHO "$path" | $GREP " "`
15856     if test "x$has_space" != x; then
15857       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15858 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15859       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15860     fi
15861 
15862     # Use eval to expand a potential ~
15863     eval path="$path"
15864     if test ! -f "$path" && test ! -d "$path"; then
15865       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15866     fi
15867 
15868     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15869   fi
15870 
15871               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15872 $as_echo_n "checking for Boot JDK... " >&6; }
15873               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15874 $as_echo "$BOOT_JDK" >&6; }
15875               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15876 $as_echo_n "checking Boot JDK version... " >&6; }
15877               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15878               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15879 $as_echo "$BOOT_JDK_VERSION" >&6; }
15880             fi # end check jdk version
15881           fi # end check rt.jar
15882         fi # end check javac
15883       fi # end check java
15884     fi # end check boot jdk found
15885   fi
15886 
15887 
15888   # If we haven't found anything yet, we've truly lost. Give up.
15889   if test "x$BOOT_JDK_FOUND" = xno; then
15890 
15891   # Print a helpful message on how to acquire the necessary build dependency.
15892   # openjdk is the help tag: freetype, cups, pulse, alsa etc
15893   MISSING_DEPENDENCY=openjdk
15894 
15895   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15896     cygwin_help $MISSING_DEPENDENCY
15897   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15898     msys_help $MISSING_DEPENDENCY
15899   else
15900     PKGHANDLER_COMMAND=
15901 
15902     case $PKGHANDLER in
15903       apt-get)
15904         apt_help     $MISSING_DEPENDENCY ;;
15905       yum)
15906         yum_help     $MISSING_DEPENDENCY ;;
15907       port)
15908         port_help    $MISSING_DEPENDENCY ;;
15909       pkgutil)
15910         pkgutil_help $MISSING_DEPENDENCY ;;
15911       pkgadd)
15912         pkgadd_help  $MISSING_DEPENDENCY ;;
15913     esac
15914 
15915     if test "x$PKGHANDLER_COMMAND" != x; then
15916       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15917     fi
15918   fi
15919 
15920     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15921 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15922     { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15923 $as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15924     as_fn_error $? "Cannot continue" "$LINENO" 5
15925   fi
15926 
15927   # Setup proper paths for what we found
15928   BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15929   if test ! -f "$BOOT_RTJAR"; then
15930     # On MacOSX it is called classes.jar
15931     BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15932     if test -f "$BOOT_RTJAR"; then
15933       # Remove the ..
15934       BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15935     fi
15936   fi
15937   BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15938   BOOT_JDK="$BOOT_JDK"
15939 
15940 
15941 
15942 
15943   # Setup tools from the Boot JDK.
15944 
15945   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15946 $as_echo_n "checking for java in Boot JDK... " >&6; }
15947   JAVA=$BOOT_JDK/bin/java
15948   if test ! -x $JAVA; then
15949     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15950 $as_echo "not found" >&6; }
15951     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15952 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15953     as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15954   fi
15955   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15956 $as_echo "ok" >&6; }
15957 
15958 
15959   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15960 $as_echo_n "checking for javac in Boot JDK... " >&6; }
15961   JAVAC=$BOOT_JDK/bin/javac
15962   if test ! -x $JAVAC; then
15963     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15964 $as_echo "not found" >&6; }
15965     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15966 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15967     as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15968   fi
15969   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15970 $as_echo "ok" >&6; }
15971 
15972 
15973   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15974 $as_echo_n "checking for javah in Boot JDK... " >&6; }
15975   JAVAH=$BOOT_JDK/bin/javah
15976   if test ! -x $JAVAH; then
15977     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15978 $as_echo "not found" >&6; }
15979     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15980 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15981     as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15982   fi
15983   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15984 $as_echo "ok" >&6; }
15985 
15986 
15987   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15988 $as_echo_n "checking for javap in Boot JDK... " >&6; }
15989   JAVAP=$BOOT_JDK/bin/javap
15990   if test ! -x $JAVAP; then
15991     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15992 $as_echo "not found" >&6; }
15993     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15994 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15995     as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15996   fi
15997   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15998 $as_echo "ok" >&6; }
15999 
16000 
16001   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
16002 $as_echo_n "checking for jar in Boot JDK... " >&6; }
16003   JAR=$BOOT_JDK/bin/jar
16004   if test ! -x $JAR; then
16005     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16006 $as_echo "not found" >&6; }
16007     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
16008 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
16009     as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
16010   fi
16011   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16012 $as_echo "ok" >&6; }
16013 
16014 
16015   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
16016 $as_echo_n "checking for rmic in Boot JDK... " >&6; }
16017   RMIC=$BOOT_JDK/bin/rmic
16018   if test ! -x $RMIC; then
16019     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16020 $as_echo "not found" >&6; }
16021     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
16022 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
16023     as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
16024   fi
16025   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16026 $as_echo "ok" >&6; }
16027 
16028 
16029   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
16030 $as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
16031   NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
16032   if test ! -x $NATIVE2ASCII; then
16033     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16034 $as_echo "not found" >&6; }
16035     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
16036 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
16037     as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
16038   fi
16039   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16040 $as_echo "ok" >&6; }
16041 
16042 
16043   # Finally, set some other options...
16044 
16045   # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
16046   BOOT_JDK_SOURCETARGET="-source 7 -target 7"
16047 
16048 
16049 
16050 
16051   ##############################################################################
16052   #
16053   # Specify options for anything that is run with the Boot JDK.
16054   #
16055 
16056 # Check whether --with-boot-jdk-jvmargs was given.
16057 if test "${with_boot_jdk_jvmargs+set}" = set; then :
16058   withval=$with_boot_jdk_jvmargs;
16059 fi
16060 
16061 
16062   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
16063 $as_echo_n "checking flags for boot jdk java command ... " >&6; }
16064 
16065   # Disable special log output when a debug build is used as Boot JDK...
16066 
16067   $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
16068   $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
16069   OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
16070   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16071   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16072   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16073     boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
16074     JVM_ARG_OK=true
16075   else
16076     $ECHO "Arg failed:" >&5
16077     $ECHO "$OUTPUT" >&5
16078     JVM_ARG_OK=false
16079   fi
16080 
16081 
16082   # Apply user provided options.
16083 
16084   $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
16085   $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
16086   OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
16087   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16088   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16089   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16090     boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
16091     JVM_ARG_OK=true
16092   else
16093     $ECHO "Arg failed:" >&5
16094     $ECHO "$OUTPUT" >&5
16095     JVM_ARG_OK=false
16096   fi
16097 
16098 
16099   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
16100 $as_echo "$boot_jdk_jvmargs" >&6; }
16101 
16102   # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
16103   JAVA_FLAGS=$boot_jdk_jvmargs
16104 
16105 
16106 
16107   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
16108 $as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
16109 
16110   # Starting amount of heap memory.
16111 
16112   $ECHO "Check if jvm arg is ok: -Xms64M" >&5
16113   $ECHO "Command: $JAVA -Xms64M -version" >&5
16114   OUTPUT=`$JAVA -Xms64M -version 2>&1`
16115   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16116   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16117   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16118     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
16119     JVM_ARG_OK=true
16120   else
16121     $ECHO "Arg failed:" >&5
16122     $ECHO "$OUTPUT" >&5
16123     JVM_ARG_OK=false
16124   fi
16125 
16126 
16127   # Maximum amount of heap memory.
16128   # Maximum stack size.
16129   if test "x$BUILD_NUM_BITS" = x32; then
16130     JVM_MAX_HEAP=1100M
16131     STACK_SIZE=768
16132   else
16133     # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
16134     # pointers are used. Apparently, we need to increase the heap and stack
16135     # space for the jvm. More specifically, when running javac to build huge
16136     # jdk batch
16137     JVM_MAX_HEAP=1600M
16138     STACK_SIZE=1536
16139   fi
16140 
16141   $ECHO "Check if jvm arg is ok: -Xmx$JVM_MAX_HEAP" >&5
16142   $ECHO "Command: $JAVA -Xmx$JVM_MAX_HEAP -version" >&5
16143   OUTPUT=`$JAVA -Xmx$JVM_MAX_HEAP -version 2>&1`
16144   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16145   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16146   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16147     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx$JVM_MAX_HEAP"
16148     JVM_ARG_OK=true
16149   else
16150     $ECHO "Arg failed:" >&5
16151     $ECHO "$OUTPUT" >&5
16152     JVM_ARG_OK=false
16153   fi
16154 
16155 
16156   $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
16157   $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
16158   OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
16159   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16160   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16161   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16162     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
16163     JVM_ARG_OK=true
16164   else
16165     $ECHO "Arg failed:" >&5
16166     $ECHO "$OUTPUT" >&5
16167     JVM_ARG_OK=false
16168   fi
16169 
16170 
16171   $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5
16172   $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5
16173   OUTPUT=`$JAVA -XX:PermSize=32m -version 2>&1`
16174   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16175   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16176   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16177     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:PermSize=32m"
16178     JVM_ARG_OK=true
16179   else
16180     $ECHO "Arg failed:" >&5
16181     $ECHO "$OUTPUT" >&5
16182     JVM_ARG_OK=false
16183   fi
16184 
16185 
16186   $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5
16187   $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5
16188   OUTPUT=`$JAVA -XX:MaxPermSize=160m -version 2>&1`
16189   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16190   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16191   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16192     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:MaxPermSize=160m"
16193     JVM_ARG_OK=true
16194   else
16195     $ECHO "Arg failed:" >&5
16196     $ECHO "$OUTPUT" >&5
16197     JVM_ARG_OK=false
16198   fi
16199 
16200 
16201   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
16202 $as_echo "$boot_jdk_jvmargs_big" >&6; }
16203 
16204   JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
16205 
16206 
16207 
16208   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
16209 $as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
16210 
16211   # Use serial gc for small short lived tools if possible
16212 
16213   $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
16214   $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
16215   OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
16216   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16217   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16218   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16219     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
16220     JVM_ARG_OK=true
16221   else
16222     $ECHO "Arg failed:" >&5
16223     $ECHO "$OUTPUT" >&5
16224     JVM_ARG_OK=false
16225   fi
16226 
16227 
16228   $ECHO "Check if jvm arg is ok: -Xms32M" >&5
16229   $ECHO "Command: $JAVA -Xms32M -version" >&5
16230   OUTPUT=`$JAVA -Xms32M -version 2>&1`
16231   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16232   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16233   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16234     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
16235     JVM_ARG_OK=true
16236   else
16237     $ECHO "Arg failed:" >&5
16238     $ECHO "$OUTPUT" >&5
16239     JVM_ARG_OK=false
16240   fi
16241 
16242 
16243   $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
16244   $ECHO "Command: $JAVA -Xmx512M -version" >&5
16245   OUTPUT=`$JAVA -Xmx512M -version 2>&1`
16246   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16247   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16248   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16249     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
16250     JVM_ARG_OK=true
16251   else
16252     $ECHO "Arg failed:" >&5
16253     $ECHO "$OUTPUT" >&5
16254     JVM_ARG_OK=false
16255   fi
16256 
16257 
16258   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
16259 $as_echo "$boot_jdk_jvmargs_small" >&6; }
16260 
16261   JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
16262 
16263 
16264 
16265 ###############################################################################
16266 #
16267 # Configure the sources to use. We can add or override individual directories.
16268 #
16269 ###############################################################################
16270 
16271 
16272   # Where are the sources. Any of these can be overridden
16273   # using --with-override-corba and the likes.
16274   LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
16275   CORBA_TOPDIR="$SRC_ROOT/corba"
16276   JAXP_TOPDIR="$SRC_ROOT/jaxp"
16277   JAXWS_TOPDIR="$SRC_ROOT/jaxws"
16278   HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
16279   NASHORN_TOPDIR="$SRC_ROOT/nashorn"
16280   JDK_TOPDIR="$SRC_ROOT/jdk"
16281 
16282 
16283 
16284 
16285 
16286 
16287 
16288 
16289 
16290 
16291   ###############################################################################
16292   #
16293   # Pickup additional source for a component from outside of the source root
16294   # or override source for a component.
16295   #
16296 
16297 # Check whether --with-add-source-root was given.
16298 if test "${with_add_source_root+set}" = set; then :
16299   withval=$with_add_source_root;
16300 fi
16301 
16302 
16303 
16304 # Check whether --with-override-source-root was given.
16305 if test "${with_override_source_root+set}" = set; then :
16306   withval=$with_override_source_root;
16307 fi
16308 
16309 
16310 
16311 # Check whether --with-adds-and-overrides was given.
16312 if test "${with_adds_and_overrides+set}" = set; then :
16313   withval=$with_adds_and_overrides;
16314 fi
16315 
16316 
16317   if test "x$with_adds_and_overrides" != x; then
16318     with_add_source_root="$with_adds_and_overrides/adds"
16319     with_override_source_root="$with_adds_and_overrides/overrides"
16320   fi
16321 
16322   if test "x$with_add_source_root" != x; then
16323     if ! test -d $with_add_source_root; then
16324       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
16325     fi
16326     CURDIR="$PWD"
16327     cd "$with_add_source_root"
16328     ADD_SRC_ROOT="`pwd`"
16329     cd "$CURDIR"
16330     # Verify that the addon source root does not have any root makefiles.
16331     # If it does, then it is usually an error, prevent this.
16332     if test -f $with_add_source_root/langtools/make/Makefile; then
16333       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
16334     fi
16335     if test -f $with_add_source_root/corba/make/Makefile; then
16336       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
16337     fi
16338     if test -f $with_add_source_root/jaxp/make/Makefile; then
16339       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
16340     fi
16341     if test -f $with_add_source_root/jaxws/make/Makefile; then
16342       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
16343     fi
16344     if test -f $with_add_source_root/hotspot/make/Makefile; then
16345       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
16346     fi
16347     if test -f $with_add_source_root/nashorn/make/Makefile; then
16348       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
16349     fi
16350     if test -f $with_add_source_root/jdk/make/Makefile; then
16351       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
16352     fi
16353   fi
16354 
16355 
16356   if test "x$with_override_source_root" != x; then
16357     if ! test -d $with_override_source_root; then
16358       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
16359     fi
16360     CURDIR="$PWD"
16361     cd "$with_override_source_root"
16362     OVERRIDE_SRC_ROOT="`pwd`"
16363     cd "$CURDIR"
16364     if test -f $with_override_source_root/langtools/make/Makefile; then
16365       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
16366     fi
16367     if test -f $with_override_source_root/corba/make/Makefile; then
16368       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
16369     fi
16370     if test -f $with_override_source_root/jaxp/make/Makefile; then
16371       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
16372     fi
16373     if test -f $with_override_source_root/jaxws/make/Makefile; then
16374       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
16375     fi
16376     if test -f $with_override_source_root/hotspot/make/Makefile; then
16377       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
16378     fi
16379     if test -f $with_override_source_root/nashorn/make/Makefile; then
16380       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
16381     fi
16382     if test -f $with_override_source_root/jdk/make/Makefile; then
16383       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
16384     fi
16385   fi
16386 
16387 
16388   ###############################################################################
16389   #
16390   # Override a repo completely, this is used for example when you have 3 small
16391   # development sandboxes of the langtools sources and want to avoid having 3 full
16392   # OpenJDK sources checked out on disk.
16393   #
16394   # Assuming that the 3 langtools sandboxes are located here:
16395   # /home/fredrik/sandbox1/langtools
16396   # /home/fredrik/sandbox2/langtools
16397   # /home/fredrik/sandbox3/langtools
16398   #
16399   # From the source root you create build subdirs manually:
16400   #     mkdir -p build1 build2 build3
16401   # in each build directory run:
16402   #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
16403   #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
16404   #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
16405   #
16406 
16407 
16408 # Check whether --with-override-langtools was given.
16409 if test "${with_override_langtools+set}" = set; then :
16410   withval=$with_override_langtools;
16411 fi
16412 
16413 
16414 
16415 # Check whether --with-override-corba was given.
16416 if test "${with_override_corba+set}" = set; then :
16417   withval=$with_override_corba;
16418 fi
16419 
16420 
16421 
16422 # Check whether --with-override-jaxp was given.
16423 if test "${with_override_jaxp+set}" = set; then :
16424   withval=$with_override_jaxp;
16425 fi
16426 
16427 
16428 
16429 # Check whether --with-override-jaxws was given.
16430 if test "${with_override_jaxws+set}" = set; then :
16431   withval=$with_override_jaxws;
16432 fi
16433 
16434 
16435 
16436 # Check whether --with-override-hotspot was given.
16437 if test "${with_override_hotspot+set}" = set; then :
16438   withval=$with_override_hotspot;
16439 fi
16440 
16441 
16442 
16443 # Check whether --with-override-nashorn was given.
16444 if test "${with_override_nashorn+set}" = set; then :
16445   withval=$with_override_nashorn;
16446 fi
16447 
16448 
16449 
16450 # Check whether --with-override-jdk was given.
16451 if test "${with_override_jdk+set}" = set; then :
16452   withval=$with_override_jdk;
16453 fi
16454 
16455 
16456   if test "x$with_override_langtools" != x; then
16457     CURDIR="$PWD"
16458     cd "$with_override_langtools"
16459     LANGTOOLS_TOPDIR="`pwd`"
16460     cd "$CURDIR"
16461     if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
16462       as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
16463     fi
16464     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
16465 $as_echo_n "checking if langtools should be overridden... " >&6; }
16466     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
16467 $as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
16468   fi
16469   if test "x$with_override_corba" != x; then
16470     CURDIR="$PWD"
16471     cd "$with_override_corba"
16472     CORBA_TOPDIR="`pwd`"
16473     cd "$CURDIR"
16474     if ! test -f $CORBA_TOPDIR/make/Makefile; then
16475       as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
16476     fi
16477     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
16478 $as_echo_n "checking if corba should be overridden... " >&6; }
16479     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
16480 $as_echo "yes with $CORBA_TOPDIR" >&6; }
16481   fi
16482   if test "x$with_override_jaxp" != x; then
16483     CURDIR="$PWD"
16484     cd "$with_override_jaxp"
16485     JAXP_TOPDIR="`pwd`"
16486     cd "$CURDIR"
16487     if ! test -f $JAXP_TOPDIR/make/Makefile; then
16488       as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
16489     fi
16490     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
16491 $as_echo_n "checking if jaxp should be overridden... " >&6; }
16492     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
16493 $as_echo "yes with $JAXP_TOPDIR" >&6; }
16494   fi
16495   if test "x$with_override_jaxws" != x; then
16496     CURDIR="$PWD"
16497     cd "$with_override_jaxws"
16498     JAXWS_TOPDIR="`pwd`"
16499     cd "$CURDIR"
16500     if ! test -f $JAXWS_TOPDIR/make/Makefile; then
16501       as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
16502     fi
16503     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
16504 $as_echo_n "checking if jaxws should be overridden... " >&6; }
16505     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
16506 $as_echo "yes with $JAXWS_TOPDIR" >&6; }
16507   fi
16508   if test "x$with_override_hotspot" != x; then
16509     CURDIR="$PWD"
16510     cd "$with_override_hotspot"
16511     HOTSPOT_TOPDIR="`pwd`"
16512     cd "$CURDIR"
16513     if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
16514       as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
16515     fi
16516     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
16517 $as_echo_n "checking if hotspot should be overridden... " >&6; }
16518     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
16519 $as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
16520   fi
16521   if test "x$with_override_nashorn" != x; then
16522     CURDIR="$PWD"
16523     cd "$with_override_nashorn"
16524     NASHORN_TOPDIR="`pwd`"
16525     cd "$CURDIR"
16526     if ! test -f $NASHORN_TOPDIR/make/Makefile; then
16527       as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
16528     fi
16529     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
16530 $as_echo_n "checking if nashorn should be overridden... " >&6; }
16531     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
16532 $as_echo "yes with $NASHORN_TOPDIR" >&6; }
16533   fi
16534   if test "x$with_override_jdk" != x; then
16535     CURDIR="$PWD"
16536     cd "$with_override_jdk"
16537     JDK_TOPDIR="`pwd`"
16538     cd "$CURDIR"
16539     if ! test -f $JDK_TOPDIR/make/Makefile; then
16540       as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
16541     fi
16542     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
16543 $as_echo_n "checking if JDK should be overridden... " >&6; }
16544     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
16545 $as_echo "yes with $JDK_TOPDIR" >&6; }
16546   fi
16547 
16548 
16549   BUILD_OUTPUT="$OUTPUT_ROOT"
16550 
16551 
16552   HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
16553   BUILD_HOTSPOT=true
16554 
16555 
16556 
16557 # Check whether --with-import-hotspot was given.
16558 if test "${with_import_hotspot+set}" = set; then :
16559   withval=$with_import_hotspot;
16560 fi
16561 
16562   if test "x$with_import_hotspot" != x; then
16563     CURDIR="$PWD"
16564     cd "$with_import_hotspot"
16565     HOTSPOT_DIST="`pwd`"
16566     cd "$CURDIR"
16567     if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
16568       as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
16569     fi
16570     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
16571 $as_echo_n "checking if hotspot should be imported... " >&6; }
16572     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
16573 $as_echo "yes from $HOTSPOT_DIST" >&6; }
16574     BUILD_HOTSPOT=false
16575   fi
16576 
16577   JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
16578 
16579 
16580 ###############################################################################
16581 #
16582 # Setup the toolchain (compilers etc), i.e. the tools that need to be
16583 # cross-compilation aware.
16584 #
16585 ###############################################################################
16586 
16587 
16588   ###############################################################################
16589   #
16590   # Configure the development tool paths and potential sysroot.
16591   #
16592   ac_ext=cpp
16593 ac_cpp='$CXXCPP $CPPFLAGS'
16594 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16595 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16596 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16597 
16598 
16599   # The option used to specify the target .o,.a or .so file.
16600   # When compiling, how to specify the to be created object file.
16601   CC_OUT_OPTION='-o$(SPACE)'
16602   # When linking, how to specify the to be created executable.
16603   EXE_OUT_OPTION='-o$(SPACE)'
16604   # When linking, how to specify the to be created dynamically linkable library.
16605   LD_OUT_OPTION='-o$(SPACE)'
16606   # When archiving, how to specify the to be create static archive for object files.
16607   AR_OUT_OPTION='rcs$(SPACE)'
16608 
16609 
16610 
16611 
16612 
16613 # Locate the actual tools
16614 
16615 
16616 # Check whether --with-jtreg was given.
16617 if test "${with_jtreg+set}" = set; then :
16618   withval=$with_jtreg;
16619 else
16620   with_jtreg=no
16621 fi
16622 
16623 
16624   if test "x$with_jtreg" = xno; then
16625     # jtreg disabled
16626     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16627 $as_echo_n "checking for jtreg... " >&6; }
16628     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16629 $as_echo "no" >&6; }
16630   else
16631     if test "x$with_jtreg" != xyes; then
16632       # with path specified.
16633       JT_HOME="$with_jtreg"
16634     fi
16635 
16636     if test "x$JT_HOME" != x; then
16637       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16638 $as_echo_n "checking for jtreg... " >&6; }
16639 
16640       # use JT_HOME enviroment var.
16641 
16642   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16643 
16644   # Input might be given as Windows format, start by converting to
16645   # unix format.
16646   path="$JT_HOME"
16647   new_path=`$CYGPATH -u "$path"`
16648 
16649   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16650   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16651   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16652   # "foo.exe" is OK but "foo" is an error.
16653   #
16654   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16655   # It is also a way to make sure we got the proper file name for the real test later on.
16656   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16657   if test "x$test_shortpath" = x; then
16658     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16659 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16660     as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
16661   fi
16662 
16663   # Call helper function which possibly converts this using DOS-style short mode.
16664   # If so, the updated path is stored in $new_path.
16665 
16666   input_path="$new_path"
16667   # Check if we need to convert this using DOS-style short mode. If the path
16668   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16669   # take no chances and rewrite it.
16670   # Note: m4 eats our [], so we need to use [ and ] instead.
16671   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16672   if test "x$has_forbidden_chars" != x; then
16673     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16674     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16675     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16676     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16677       # Going to short mode and back again did indeed matter. Since short mode is
16678       # case insensitive, let's make it lowercase to improve readability.
16679       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16680       # Now convert it back to Unix-stile (cygpath)
16681       input_path=`$CYGPATH -u "$shortmode_path"`
16682       new_path="$input_path"
16683     fi
16684   fi
16685 
16686   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16687   if test "x$test_cygdrive_prefix" = x; then
16688     # As a simple fix, exclude /usr/bin since it's not a real path.
16689     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16690       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16691       # a path prefixed by /cygdrive for fixpath to work.
16692       new_path="$CYGWIN_ROOT_PATH$input_path"
16693     fi
16694   fi
16695 
16696 
16697   if test "x$path" != "x$new_path"; then
16698     JT_HOME="$new_path"
16699     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16700 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16701   fi
16702 
16703   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16704 
16705   path="$JT_HOME"
16706   has_colon=`$ECHO $path | $GREP ^.:`
16707   new_path="$path"
16708   if test "x$has_colon" = x; then
16709     # Not in mixed or Windows style, start by that.
16710     new_path=`cmd //c echo $path`
16711   fi
16712 
16713 
16714   input_path="$new_path"
16715   # Check if we need to convert this using DOS-style short mode. If the path
16716   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16717   # take no chances and rewrite it.
16718   # Note: m4 eats our [], so we need to use [ and ] instead.
16719   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16720   if test "x$has_forbidden_chars" != x; then
16721     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16722     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16723   fi
16724 
16725 
16726   windows_path="$new_path"
16727   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16728     unix_path=`$CYGPATH -u "$windows_path"`
16729     new_path="$unix_path"
16730   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16731     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16732     new_path="$unix_path"
16733   fi
16734 
16735   if test "x$path" != "x$new_path"; then
16736     JT_HOME="$new_path"
16737     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16738 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16739   fi
16740 
16741   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16742   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16743 
16744   else
16745     # We're on a posix platform. Hooray! :)
16746     path="$JT_HOME"
16747     has_space=`$ECHO "$path" | $GREP " "`
16748     if test "x$has_space" != x; then
16749       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16750 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16751       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16752     fi
16753 
16754     # Use eval to expand a potential ~
16755     eval path="$path"
16756     if test ! -f "$path" && test ! -d "$path"; then
16757       as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
16758     fi
16759 
16760     JT_HOME="`cd "$path"; $THEPWDCMD -L`"
16761   fi
16762 
16763 
16764       # jtreg win32 script works for everybody
16765       JTREGEXE="$JT_HOME/win32/bin/jtreg"
16766 
16767       if test ! -f "$JTREGEXE"; then
16768         as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
16769       fi
16770 
16771       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16772 $as_echo "$JTREGEXE" >&6; }
16773     else
16774       # try to find jtreg on path
16775 
16776   for ac_prog in jtreg
16777 do
16778   # Extract the first word of "$ac_prog", so it can be a program name with args.
16779 set dummy $ac_prog; ac_word=$2
16780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16781 $as_echo_n "checking for $ac_word... " >&6; }
16782 if ${ac_cv_path_JTREGEXE+:} false; then :
16783   $as_echo_n "(cached) " >&6
16784 else
16785   case $JTREGEXE in
16786   [\\/]* | ?:[\\/]*)
16787   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
16788   ;;
16789   *)
16790   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16791 for as_dir in $PATH
16792 do
16793   IFS=$as_save_IFS
16794   test -z "$as_dir" && as_dir=.
16795     for ac_exec_ext in '' $ac_executable_extensions; do
16796   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16797     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
16798     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16799     break 2
16800   fi
16801 done
16802   done
16803 IFS=$as_save_IFS
16804 
16805   ;;
16806 esac
16807 fi
16808 JTREGEXE=$ac_cv_path_JTREGEXE
16809 if test -n "$JTREGEXE"; then
16810   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16811 $as_echo "$JTREGEXE" >&6; }
16812 else
16813   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16814 $as_echo "no" >&6; }
16815 fi
16816 
16817 
16818   test -n "$JTREGEXE" && break
16819 done
16820 
16821 
16822   if test "x$JTREGEXE" = x; then
16823     if test "xjtreg" = x; then
16824       PROG_NAME=jtregexe
16825     else
16826       PROG_NAME=jtreg
16827     fi
16828     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
16829 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
16830     as_fn_error $? "Cannot continue" "$LINENO" 5
16831   fi
16832 
16833 
16834       JT_HOME="`$DIRNAME $JTREGEXE`"
16835     fi
16836   fi
16837 
16838 
16839 
16840 
16841 
16842   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16843 
16844   # Store path to cygwin link.exe to help excluding it when searching for
16845   # VS linker. This must be done before changing the PATH when looking for VS.
16846   # Extract the first word of "link", so it can be a program name with args.
16847 set dummy link; ac_word=$2
16848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16849 $as_echo_n "checking for $ac_word... " >&6; }
16850 if ${ac_cv_path_CYGWIN_LINK+:} false; then :
16851   $as_echo_n "(cached) " >&6
16852 else
16853   case $CYGWIN_LINK in
16854   [\\/]* | ?:[\\/]*)
16855   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16856   ;;
16857   *)
16858   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16859 for as_dir in $PATH
16860 do
16861   IFS=$as_save_IFS
16862   test -z "$as_dir" && as_dir=.
16863     for ac_exec_ext in '' $ac_executable_extensions; do
16864   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16865     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16866     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16867     break 2
16868   fi
16869 done
16870   done
16871 IFS=$as_save_IFS
16872 
16873   ;;
16874 esac
16875 fi
16876 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16877 if test -n "$CYGWIN_LINK"; then
16878   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16879 $as_echo "$CYGWIN_LINK" >&6; }
16880 else
16881   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16882 $as_echo "no" >&6; }
16883 fi
16884 
16885 
16886   if test "x$CYGWIN_LINK" != x; then
16887     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16888 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16889     "$CYGWIN_LINK" --version > /dev/null
16890     if test $? -eq 0 ; then
16891       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16892 $as_echo "yes" >&6; }
16893     else
16894       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16895 $as_echo "no" >&6; }
16896       # This might be the VS linker. Don't exclude it later on.
16897       CYGWIN_LINK=""
16898     fi
16899   fi
16900 
16901   # First-hand choice is to locate and run the vsvars bat file.
16902 
16903   if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16904     VCVARSFILE="vc/bin/vcvars32.bat"
16905   else
16906     VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16907   fi
16908 
16909   VS_ENV_CMD=""
16910   VS_ENV_ARGS=""
16911   if test "x$with_toolsdir" != x; then
16912 
16913   if test "x$VS_ENV_CMD" = x; then
16914     VS100BASE="$with_toolsdir/../.."
16915     METHOD="--with-tools-dir"
16916 
16917   windows_path="$VS100BASE"
16918   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16919     unix_path=`$CYGPATH -u "$windows_path"`
16920     VS100BASE="$unix_path"
16921   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16922     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16923     VS100BASE="$unix_path"
16924   fi
16925 
16926     if test -d "$VS100BASE"; then
16927       if test -f "$VS100BASE/$VCVARSFILE"; then
16928         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16929 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16930         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16931       else
16932         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16933 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16934         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16935 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16936       fi
16937     fi
16938   fi
16939 
16940   fi
16941 
16942   if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16943     # Having specified an argument which is incorrect will produce an instant failure;
16944     # we should not go on looking
16945     { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16946 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16947     { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16948 $as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16949     as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16950   fi
16951 
16952   if test "x$VS100COMNTOOLS" != x; then
16953 
16954   if test "x$VS_ENV_CMD" = x; then
16955     VS100BASE="$VS100COMNTOOLS/../.."
16956     METHOD="VS100COMNTOOLS variable"
16957 
16958   windows_path="$VS100BASE"
16959   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16960     unix_path=`$CYGPATH -u "$windows_path"`
16961     VS100BASE="$unix_path"
16962   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16963     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16964     VS100BASE="$unix_path"
16965   fi
16966 
16967     if test -d "$VS100BASE"; then
16968       if test -f "$VS100BASE/$VCVARSFILE"; then
16969         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16970 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16971         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16972       else
16973         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16974 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16975         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16976 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16977       fi
16978     fi
16979   fi
16980 
16981   fi
16982   if test "x$PROGRAMFILES" != x; then
16983 
16984   if test "x$VS_ENV_CMD" = x; then
16985     VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16986     METHOD="well-known name"
16987 
16988   windows_path="$VS100BASE"
16989   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16990     unix_path=`$CYGPATH -u "$windows_path"`
16991     VS100BASE="$unix_path"
16992   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16993     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16994     VS100BASE="$unix_path"
16995   fi
16996 
16997     if test -d "$VS100BASE"; then
16998       if test -f "$VS100BASE/$VCVARSFILE"; then
16999         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17000 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17001         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
17002       else
17003         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17004 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17005         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
17006 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
17007       fi
17008     fi
17009   fi
17010 
17011   fi
17012 
17013   if test "x$VS_ENV_CMD" = x; then
17014     VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
17015     METHOD="well-known name"
17016 
17017   windows_path="$VS100BASE"
17018   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17019     unix_path=`$CYGPATH -u "$windows_path"`
17020     VS100BASE="$unix_path"
17021   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17022     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17023     VS100BASE="$unix_path"
17024   fi
17025 
17026     if test -d "$VS100BASE"; then
17027       if test -f "$VS100BASE/$VCVARSFILE"; then
17028         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17029 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17030         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
17031       else
17032         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17033 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17034         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
17035 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
17036       fi
17037     fi
17038   fi
17039 
17040 
17041   if test "x$VS_ENV_CMD" = x; then
17042     VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
17043     METHOD="well-known name"
17044 
17045   windows_path="$VS100BASE"
17046   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17047     unix_path=`$CYGPATH -u "$windows_path"`
17048     VS100BASE="$unix_path"
17049   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17050     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17051     VS100BASE="$unix_path"
17052   fi
17053 
17054     if test -d "$VS100BASE"; then
17055       if test -f "$VS100BASE/$VCVARSFILE"; then
17056         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17057 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17058         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
17059       else
17060         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17061 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17062         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
17063 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
17064       fi
17065     fi
17066   fi
17067 
17068 
17069   if test "x$ProgramW6432" != x; then
17070 
17071   if test "x$VS_ENV_CMD" = x; then
17072     WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
17073     METHOD="well-known name"
17074 
17075   windows_path="$WIN_SDK_BASE"
17076   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17077     unix_path=`$CYGPATH -u "$windows_path"`
17078     WIN_SDK_BASE="$unix_path"
17079   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17080     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17081     WIN_SDK_BASE="$unix_path"
17082   fi
17083 
17084     if test -d "$WIN_SDK_BASE"; then
17085       # There have been cases of partial or broken SDK installations. A missing
17086       # lib dir is not going to work.
17087       if test ! -d "$WIN_SDK_BASE/../lib"; then
17088         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17089 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17090         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17091 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17092       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17093         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17094 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17095         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17096         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17097           VS_ENV_ARGS="/x86"
17098         else
17099           VS_ENV_ARGS="/x64"
17100         fi
17101       else
17102         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17103 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17104         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17105 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17106       fi
17107     fi
17108   fi
17109 
17110   fi
17111   if test "x$PROGRAMW6432" != x; then
17112 
17113   if test "x$VS_ENV_CMD" = x; then
17114     WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
17115     METHOD="well-known name"
17116 
17117   windows_path="$WIN_SDK_BASE"
17118   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17119     unix_path=`$CYGPATH -u "$windows_path"`
17120     WIN_SDK_BASE="$unix_path"
17121   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17122     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17123     WIN_SDK_BASE="$unix_path"
17124   fi
17125 
17126     if test -d "$WIN_SDK_BASE"; then
17127       # There have been cases of partial or broken SDK installations. A missing
17128       # lib dir is not going to work.
17129       if test ! -d "$WIN_SDK_BASE/../lib"; then
17130         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17131 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17132         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17133 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17134       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17135         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17136 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17137         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17138         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17139           VS_ENV_ARGS="/x86"
17140         else
17141           VS_ENV_ARGS="/x64"
17142         fi
17143       else
17144         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17145 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17146         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17147 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17148       fi
17149     fi
17150   fi
17151 
17152   fi
17153   if test "x$PROGRAMFILES" != x; then
17154 
17155   if test "x$VS_ENV_CMD" = x; then
17156     WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
17157     METHOD="well-known name"
17158 
17159   windows_path="$WIN_SDK_BASE"
17160   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17161     unix_path=`$CYGPATH -u "$windows_path"`
17162     WIN_SDK_BASE="$unix_path"
17163   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17164     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17165     WIN_SDK_BASE="$unix_path"
17166   fi
17167 
17168     if test -d "$WIN_SDK_BASE"; then
17169       # There have been cases of partial or broken SDK installations. A missing
17170       # lib dir is not going to work.
17171       if test ! -d "$WIN_SDK_BASE/../lib"; then
17172         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17173 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17174         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17175 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17176       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17177         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17178 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17179         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17180         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17181           VS_ENV_ARGS="/x86"
17182         else
17183           VS_ENV_ARGS="/x64"
17184         fi
17185       else
17186         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17187 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17188         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17189 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17190       fi
17191     fi
17192   fi
17193 
17194   fi
17195 
17196   if test "x$VS_ENV_CMD" = x; then
17197     WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
17198     METHOD="well-known name"
17199 
17200   windows_path="$WIN_SDK_BASE"
17201   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17202     unix_path=`$CYGPATH -u "$windows_path"`
17203     WIN_SDK_BASE="$unix_path"
17204   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17205     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17206     WIN_SDK_BASE="$unix_path"
17207   fi
17208 
17209     if test -d "$WIN_SDK_BASE"; then
17210       # There have been cases of partial or broken SDK installations. A missing
17211       # lib dir is not going to work.
17212       if test ! -d "$WIN_SDK_BASE/../lib"; then
17213         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17214 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17215         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17216 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17217       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17218         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17219 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17220         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17221         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17222           VS_ENV_ARGS="/x86"
17223         else
17224           VS_ENV_ARGS="/x64"
17225         fi
17226       else
17227         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17228 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17229         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17230 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17231       fi
17232     fi
17233   fi
17234 
17235 
17236   if test "x$VS_ENV_CMD" = x; then
17237     WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
17238     METHOD="well-known name"
17239 
17240   windows_path="$WIN_SDK_BASE"
17241   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17242     unix_path=`$CYGPATH -u "$windows_path"`
17243     WIN_SDK_BASE="$unix_path"
17244   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17245     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17246     WIN_SDK_BASE="$unix_path"
17247   fi
17248 
17249     if test -d "$WIN_SDK_BASE"; then
17250       # There have been cases of partial or broken SDK installations. A missing
17251       # lib dir is not going to work.
17252       if test ! -d "$WIN_SDK_BASE/../lib"; then
17253         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17254 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17255         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17256 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17257       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17258         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17259 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17260         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17261         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17262           VS_ENV_ARGS="/x86"
17263         else
17264           VS_ENV_ARGS="/x64"
17265         fi
17266       else
17267         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17268 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17269         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17270 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17271       fi
17272     fi
17273   fi
17274 
17275 
17276   if test "x$VS_ENV_CMD" != x; then
17277     # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
17278 
17279   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17280 
17281   # First separate the path from the arguments. This will split at the first
17282   # space.
17283   complete="$VS_ENV_CMD"
17284   path="${complete%% *}"
17285   tmp="$complete EOL"
17286   arguments="${tmp#* }"
17287 
17288   # Input might be given as Windows format, start by converting to
17289   # unix format.
17290   new_path=`$CYGPATH -u "$path"`
17291 
17292   # Now try to locate executable using which
17293   new_path=`$WHICH "$new_path" 2> /dev/null`
17294   # bat and cmd files are not always considered executable in cygwin causing which
17295   # to not find them
17296   if test "x$new_path" = x \
17297       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17298       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17299     new_path=`$CYGPATH -u "$path"`
17300   fi
17301   if test "x$new_path" = x; then
17302     # Oops. Which didn't find the executable.
17303     # The splitting of arguments from the executable at a space might have been incorrect,
17304     # since paths with space are more likely in Windows. Give it another try with the whole
17305     # argument.
17306     path="$complete"
17307     arguments="EOL"
17308     new_path=`$CYGPATH -u "$path"`
17309     new_path=`$WHICH "$new_path" 2> /dev/null`
17310     # bat and cmd files are not always considered executable in cygwin causing which
17311     # to not find them
17312     if test "x$new_path" = x \
17313         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17314         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17315       new_path=`$CYGPATH -u "$path"`
17316     fi
17317     if test "x$new_path" = x; then
17318       # It's still not found. Now this is an unrecoverable error.
17319       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17320 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17321       has_space=`$ECHO "$complete" | $GREP " "`
17322       if test "x$has_space" != x; then
17323         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17324 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17325       fi
17326       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17327     fi
17328   fi
17329 
17330   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17331   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17332   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17333   # "foo.exe" is OK but "foo" is an error.
17334   #
17335   # This test is therefore slightly more accurate than "test -f" to check for file presence.
17336   # It is also a way to make sure we got the proper file name for the real test later on.
17337   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17338   if test "x$test_shortpath" = x; then
17339     # Short path failed, file does not exist as specified.
17340     # Try adding .exe or .cmd
17341     if test -f "${new_path}.exe"; then
17342       input_to_shortpath="${new_path}.exe"
17343     elif test -f "${new_path}.cmd"; then
17344       input_to_shortpath="${new_path}.cmd"
17345     else
17346       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
17347 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
17348       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17349 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17350       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17351     fi
17352   else
17353     input_to_shortpath="$new_path"
17354   fi
17355 
17356   # Call helper function which possibly converts this using DOS-style short mode.
17357   # If so, the updated path is stored in $new_path.
17358   new_path="$input_to_shortpath"
17359 
17360   input_path="$input_to_shortpath"
17361   # Check if we need to convert this using DOS-style short mode. If the path
17362   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17363   # take no chances and rewrite it.
17364   # Note: m4 eats our [], so we need to use [ and ] instead.
17365   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17366   if test "x$has_forbidden_chars" != x; then
17367     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17368     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17369     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17370     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17371       # Going to short mode and back again did indeed matter. Since short mode is
17372       # case insensitive, let's make it lowercase to improve readability.
17373       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17374       # Now convert it back to Unix-stile (cygpath)
17375       input_path=`$CYGPATH -u "$shortmode_path"`
17376       new_path="$input_path"
17377     fi
17378   fi
17379 
17380   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17381   if test "x$test_cygdrive_prefix" = x; then
17382     # As a simple fix, exclude /usr/bin since it's not a real path.
17383     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17384       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17385       # a path prefixed by /cygdrive for fixpath to work.
17386       new_path="$CYGWIN_ROOT_PATH$input_path"
17387     fi
17388   fi
17389 
17390   # remove trailing .exe if any
17391   new_path="${new_path/%.exe/}"
17392 
17393   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17394 
17395   # First separate the path from the arguments. This will split at the first
17396   # space.
17397   complete="$VS_ENV_CMD"
17398   path="${complete%% *}"
17399   tmp="$complete EOL"
17400   arguments="${tmp#* }"
17401 
17402   # Input might be given as Windows format, start by converting to
17403   # unix format.
17404   new_path="$path"
17405 
17406   windows_path="$new_path"
17407   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17408     unix_path=`$CYGPATH -u "$windows_path"`
17409     new_path="$unix_path"
17410   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17411     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17412     new_path="$unix_path"
17413   fi
17414 
17415 
17416   # Now try to locate executable using which
17417   new_path=`$WHICH "$new_path" 2> /dev/null`
17418 
17419   if test "x$new_path" = x; then
17420     # Oops. Which didn't find the executable.
17421     # The splitting of arguments from the executable at a space might have been incorrect,
17422     # since paths with space are more likely in Windows. Give it another try with the whole
17423     # argument.
17424     path="$complete"
17425     arguments="EOL"
17426     new_path="$path"
17427 
17428   windows_path="$new_path"
17429   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17430     unix_path=`$CYGPATH -u "$windows_path"`
17431     new_path="$unix_path"
17432   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17433     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17434     new_path="$unix_path"
17435   fi
17436 
17437 
17438     new_path=`$WHICH "$new_path" 2> /dev/null`
17439 
17440     if test "x$new_path" = x; then
17441       # It's still not found. Now this is an unrecoverable error.
17442       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17443 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17444       has_space=`$ECHO "$complete" | $GREP " "`
17445       if test "x$has_space" != x; then
17446         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17447 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17448       fi
17449       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17450     fi
17451   fi
17452 
17453   # Now new_path has a complete unix path to the binary
17454   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17455     # Keep paths in /bin as-is, but remove trailing .exe if any
17456     new_path="${new_path/%.exe/}"
17457     # Do not save /bin paths to all_fixpath_prefixes!
17458   else
17459     # Not in mixed or Windows style, start by that.
17460     new_path=`cmd //c echo $new_path`
17461 
17462   input_path="$new_path"
17463   # Check if we need to convert this using DOS-style short mode. If the path
17464   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17465   # take no chances and rewrite it.
17466   # Note: m4 eats our [], so we need to use [ and ] instead.
17467   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17468   if test "x$has_forbidden_chars" != x; then
17469     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17470     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17471   fi
17472 
17473     # Output is in $new_path
17474 
17475   windows_path="$new_path"
17476   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17477     unix_path=`$CYGPATH -u "$windows_path"`
17478     new_path="$unix_path"
17479   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17480     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17481     new_path="$unix_path"
17482   fi
17483 
17484     # remove trailing .exe if any
17485     new_path="${new_path/%.exe/}"
17486 
17487     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17488     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17489   fi
17490 
17491   else
17492     # We're on a posix platform. Hooray! :)
17493     # First separate the path from the arguments. This will split at the first
17494     # space.
17495     complete="$VS_ENV_CMD"
17496     path="${complete%% *}"
17497     tmp="$complete EOL"
17498     arguments="${tmp#* }"
17499 
17500     # Cannot rely on the command "which" here since it doesn't always work.
17501     is_absolute_path=`$ECHO "$path" | $GREP ^/`
17502     if test -z "$is_absolute_path"; then
17503       # Path to executable is not absolute. Find it.
17504       IFS_save="$IFS"
17505       IFS=:
17506       for p in $PATH; do
17507         if test -f "$p/$path" && test -x "$p/$path"; then
17508           new_path="$p/$path"
17509           break
17510         fi
17511       done
17512       IFS="$IFS_save"
17513     else
17514       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
17515 $as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
17516       new_path="$path"
17517     fi
17518 
17519     if test "x$new_path" = x; then
17520       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17521 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17522       has_space=`$ECHO "$complete" | $GREP " "`
17523       if test "x$has_space" != x; then
17524         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17525 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17526       fi
17527       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17528     fi
17529   fi
17530 
17531   # Now join together the path and the arguments once again
17532   if test "x$arguments" != xEOL; then
17533     new_complete="$new_path ${arguments% *}"
17534   else
17535     new_complete="$new_path"
17536   fi
17537 
17538   if test "x$complete" != "x$new_complete"; then
17539     VS_ENV_CMD="$new_complete"
17540     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
17541 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
17542   fi
17543 
17544 
17545     # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
17546     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
17547 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
17548     cd $OUTPUT_ROOT
17549     # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
17550     # to autoconf standards.
17551 
17552     #----
17553 
17554     # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
17555     # but calculate the difference in Cygwin environment before/after running it and then
17556     # apply the diff.
17557 
17558     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
17559       _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
17560       _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
17561       _dosbash=`cygpath -a -w -s \`which bash\`.*`
17562     else
17563       _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
17564       _dosbash=`cmd //c echo \`which bash\``
17565     fi
17566 
17567     # generate the set of exported vars before/after the vs10 setup
17568     $ECHO "@echo off"                                           >  localdevenvtmp.bat
17569     $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
17570     $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
17571     $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
17572 
17573     # Now execute the newly created bat file.
17574     # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
17575     cmd /c localdevenvtmp.bat | cat
17576 
17577     # apply the diff (less some non-vs10 vars named by "!")
17578     $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
17579     $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
17580     $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
17581 
17582     # cleanup
17583     $RM localdevenvtmp*
17584     #----
17585     cd $CURDIR
17586     if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
17587       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17588 $as_echo "no" >&6; }
17589       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
17590 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
17591       { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17592 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17593       { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17594 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17595       as_fn_error $? "Cannot continue" "$LINENO" 5
17596     fi
17597 
17598     # Now set all paths and other env variables. This will allow the rest of
17599     # the configure script to find and run the compiler in the proper way.
17600     { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
17601 $as_echo "$as_me: Setting extracted environment variables" >&6;}
17602     . $OUTPUT_ROOT/localdevenv.sh
17603   else
17604     # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
17605     { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
17606 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
17607   fi
17608 
17609   # At this point, we should have corrent variables in the environment, or we can't continue.
17610   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
17611 $as_echo_n "checking for Visual Studio variables... " >&6; }
17612 
17613   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
17614     if test "x$INCLUDE" = x || test "x$LIB" = x; then
17615       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
17616 $as_echo "present but broken" >&6; }
17617       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
17618     else
17619       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17620 $as_echo "ok" >&6; }
17621       # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
17622       VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
17623       VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
17624       # Remove any paths containing # (typically F#) as that messes up make
17625       PATH=`$ECHO "$PATH" | $SED 's/[^:#]*#[^:]*://g'`
17626       VS_PATH="$PATH"
17627 
17628 
17629 
17630     fi
17631   else
17632     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17633 $as_echo "not found" >&6; }
17634 
17635     if test "x$VS_ENV_CMD" = x; then
17636       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
17637 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
17638       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
17639 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
17640     else
17641       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
17642 $as_echo "$as_me: Running the extraction script failed." >&6;}
17643     fi
17644     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17645 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17646     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17647 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17648     as_fn_error $? "Cannot continue" "$LINENO" 5
17649   fi
17650 
17651 
17652 
17653 # Check whether --with-msvcr-dll was given.
17654 if test "${with_msvcr_dll+set}" = set; then :
17655   withval=$with_msvcr_dll;
17656 fi
17657 
17658 
17659   if test "x$with_msvcr_dll" != x; then
17660     # If given explicitely by user, do not probe. If not present, fail directly.
17661 
17662   POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
17663   METHOD="--with-msvcr-dll"
17664   if test -e "$POSSIBLE_MSVCR_DLL"; then
17665     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17666 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17667 
17668     # Need to check if the found msvcr is correct architecture
17669     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17670 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17671     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17672     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17673       CORRECT_MSVCR_ARCH=386
17674     else
17675       CORRECT_MSVCR_ARCH=x86-64
17676     fi
17677     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17678       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17679 $as_echo "ok" >&6; }
17680       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17681       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17682 $as_echo_n "checking for msvcr100.dll... " >&6; }
17683       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17684 $as_echo "$MSVCR_DLL" >&6; }
17685     else
17686       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17687 $as_echo "incorrect, ignoring" >&6; }
17688       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17689 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17690     fi
17691   fi
17692 
17693     if test "x$MSVCR_DLL" = x; then
17694       as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
17695     fi
17696   fi
17697 
17698   if test "x$MSVCR_DLL" = x; then
17699     # Probe: Using well-known location from Visual Studio 10.0
17700     if test "x$VCINSTALLDIR" != x; then
17701       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
17702 
17703   windows_path="$CYGWIN_VC_INSTALL_DIR"
17704   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17705     unix_path=`$CYGPATH -u "$windows_path"`
17706     CYGWIN_VC_INSTALL_DIR="$unix_path"
17707   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17708     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17709     CYGWIN_VC_INSTALL_DIR="$unix_path"
17710   fi
17711 
17712       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17713         POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
17714       else
17715         POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
17716       fi
17717 
17718   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17719   METHOD="well-known location in VCINSTALLDIR"
17720   if test -e "$POSSIBLE_MSVCR_DLL"; then
17721     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17722 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17723 
17724     # Need to check if the found msvcr is correct architecture
17725     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17726 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17727     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17728     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17729       CORRECT_MSVCR_ARCH=386
17730     else
17731       CORRECT_MSVCR_ARCH=x86-64
17732     fi
17733     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17734       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17735 $as_echo "ok" >&6; }
17736       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17737       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17738 $as_echo_n "checking for msvcr100.dll... " >&6; }
17739       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17740 $as_echo "$MSVCR_DLL" >&6; }
17741     else
17742       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17743 $as_echo "incorrect, ignoring" >&6; }
17744       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17745 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17746     fi
17747   fi
17748 
17749     fi
17750   fi
17751 
17752   if test "x$MSVCR_DLL" = x; then
17753     # Probe: Check in the Boot JDK directory.
17754     POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
17755 
17756   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17757   METHOD="well-known location in Boot JDK"
17758   if test -e "$POSSIBLE_MSVCR_DLL"; then
17759     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17760 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17761 
17762     # Need to check if the found msvcr is correct architecture
17763     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17764 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17765     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17766     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17767       CORRECT_MSVCR_ARCH=386
17768     else
17769       CORRECT_MSVCR_ARCH=x86-64
17770     fi
17771     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17772       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17773 $as_echo "ok" >&6; }
17774       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17775       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17776 $as_echo_n "checking for msvcr100.dll... " >&6; }
17777       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17778 $as_echo "$MSVCR_DLL" >&6; }
17779     else
17780       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17781 $as_echo "incorrect, ignoring" >&6; }
17782       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17783 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17784     fi
17785   fi
17786 
17787   fi
17788 
17789   if test "x$MSVCR_DLL" = x; then
17790     # Probe: Look in the Windows system32 directory
17791     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
17792 
17793   windows_path="$CYGWIN_SYSTEMROOT"
17794   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17795     unix_path=`$CYGPATH -u "$windows_path"`
17796     CYGWIN_SYSTEMROOT="$unix_path"
17797   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17798     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17799     CYGWIN_SYSTEMROOT="$unix_path"
17800   fi
17801 
17802     POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
17803 
17804   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17805   METHOD="well-known location in SYSTEMROOT"
17806   if test -e "$POSSIBLE_MSVCR_DLL"; then
17807     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17808 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17809 
17810     # Need to check if the found msvcr is correct architecture
17811     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17812 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17813     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17814     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17815       CORRECT_MSVCR_ARCH=386
17816     else
17817       CORRECT_MSVCR_ARCH=x86-64
17818     fi
17819     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17820       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17821 $as_echo "ok" >&6; }
17822       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17823       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17824 $as_echo_n "checking for msvcr100.dll... " >&6; }
17825       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17826 $as_echo "$MSVCR_DLL" >&6; }
17827     else
17828       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17829 $as_echo "incorrect, ignoring" >&6; }
17830       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17831 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17832     fi
17833   fi
17834 
17835   fi
17836 
17837   if test "x$MSVCR_DLL" = x; then
17838     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
17839     if test "x$VS100COMNTOOLS" != x; then
17840       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
17841 
17842   windows_path="$CYGWIN_VS_TOOLS_DIR"
17843   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17844     unix_path=`$CYGPATH -u "$windows_path"`
17845     CYGWIN_VS_TOOLS_DIR="$unix_path"
17846   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17847     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17848     CYGWIN_VS_TOOLS_DIR="$unix_path"
17849   fi
17850 
17851       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17852         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
17853       else
17854         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
17855       fi
17856 
17857   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17858   METHOD="search of VS100COMNTOOLS"
17859   if test -e "$POSSIBLE_MSVCR_DLL"; then
17860     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17861 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17862 
17863     # Need to check if the found msvcr is correct architecture
17864     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17865 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17866     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17867     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17868       CORRECT_MSVCR_ARCH=386
17869     else
17870       CORRECT_MSVCR_ARCH=x86-64
17871     fi
17872     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17873       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17874 $as_echo "ok" >&6; }
17875       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17876       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17877 $as_echo_n "checking for msvcr100.dll... " >&6; }
17878       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17879 $as_echo "$MSVCR_DLL" >&6; }
17880     else
17881       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17882 $as_echo "incorrect, ignoring" >&6; }
17883       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17884 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17885     fi
17886   fi
17887 
17888     fi
17889   fi
17890 
17891   if test "x$MSVCR_DLL" = x; then
17892     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
17893     # (This was the original behaviour; kept since it might turn up something)
17894     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
17895       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17896         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
17897       else
17898         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
17899         if test "x$POSSIBLE_MSVCR_DLL" = x; then
17900           # We're grasping at straws now...
17901           POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
17902         fi
17903       fi
17904 
17905 
17906   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17907   METHOD="search of VCINSTALLDIR"
17908   if test -e "$POSSIBLE_MSVCR_DLL"; then
17909     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17910 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17911 
17912     # Need to check if the found msvcr is correct architecture
17913     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17914 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17915     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17916     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17917       CORRECT_MSVCR_ARCH=386
17918     else
17919       CORRECT_MSVCR_ARCH=x86-64
17920     fi
17921     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17922       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17923 $as_echo "ok" >&6; }
17924       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17925       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17926 $as_echo_n "checking for msvcr100.dll... " >&6; }
17927       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17928 $as_echo "$MSVCR_DLL" >&6; }
17929     else
17930       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17931 $as_echo "incorrect, ignoring" >&6; }
17932       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17933 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17934     fi
17935   fi
17936 
17937     fi
17938   fi
17939 
17940   if test "x$MSVCR_DLL" = x; then
17941     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17942 $as_echo_n "checking for msvcr100.dll... " >&6; }
17943     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17944 $as_echo "no" >&6; }
17945     as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
17946   fi
17947 
17948 
17949   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17950 
17951   # Input might be given as Windows format, start by converting to
17952   # unix format.
17953   path="$MSVCR_DLL"
17954   new_path=`$CYGPATH -u "$path"`
17955 
17956   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17957   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17958   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17959   # "foo.exe" is OK but "foo" is an error.
17960   #
17961   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17962   # It is also a way to make sure we got the proper file name for the real test later on.
17963   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17964   if test "x$test_shortpath" = x; then
17965     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17966 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17967     as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
17968   fi
17969 
17970   # Call helper function which possibly converts this using DOS-style short mode.
17971   # If so, the updated path is stored in $new_path.
17972 
17973   input_path="$new_path"
17974   # Check if we need to convert this using DOS-style short mode. If the path
17975   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17976   # take no chances and rewrite it.
17977   # Note: m4 eats our [], so we need to use [ and ] instead.
17978   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17979   if test "x$has_forbidden_chars" != x; then
17980     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17981     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17982     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17983     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17984       # Going to short mode and back again did indeed matter. Since short mode is
17985       # case insensitive, let's make it lowercase to improve readability.
17986       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17987       # Now convert it back to Unix-stile (cygpath)
17988       input_path=`$CYGPATH -u "$shortmode_path"`
17989       new_path="$input_path"
17990     fi
17991   fi
17992 
17993   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17994   if test "x$test_cygdrive_prefix" = x; then
17995     # As a simple fix, exclude /usr/bin since it's not a real path.
17996     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17997       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17998       # a path prefixed by /cygdrive for fixpath to work.
17999       new_path="$CYGWIN_ROOT_PATH$input_path"
18000     fi
18001   fi
18002 
18003 
18004   if test "x$path" != "x$new_path"; then
18005     MSVCR_DLL="$new_path"
18006     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
18007 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
18008   fi
18009 
18010   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18011 
18012   path="$MSVCR_DLL"
18013   has_colon=`$ECHO $path | $GREP ^.:`
18014   new_path="$path"
18015   if test "x$has_colon" = x; then
18016     # Not in mixed or Windows style, start by that.
18017     new_path=`cmd //c echo $path`
18018   fi
18019 
18020 
18021   input_path="$new_path"
18022   # Check if we need to convert this using DOS-style short mode. If the path
18023   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18024   # take no chances and rewrite it.
18025   # Note: m4 eats our [], so we need to use [ and ] instead.
18026   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18027   if test "x$has_forbidden_chars" != x; then
18028     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18029     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18030   fi
18031 
18032 
18033   windows_path="$new_path"
18034   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18035     unix_path=`$CYGPATH -u "$windows_path"`
18036     new_path="$unix_path"
18037   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18038     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18039     new_path="$unix_path"
18040   fi
18041 
18042   if test "x$path" != "x$new_path"; then
18043     MSVCR_DLL="$new_path"
18044     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
18045 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
18046   fi
18047 
18048   # Save the first 10 bytes of this path to the storage, so fixpath can work.
18049   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18050 
18051   else
18052     # We're on a posix platform. Hooray! :)
18053     path="$MSVCR_DLL"
18054     has_space=`$ECHO "$path" | $GREP " "`
18055     if test "x$has_space" != x; then
18056       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
18057 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
18058       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
18059     fi
18060 
18061     # Use eval to expand a potential ~
18062     eval path="$path"
18063     if test ! -f "$path" && test ! -d "$path"; then
18064       as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
18065     fi
18066 
18067     MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
18068   fi
18069 
18070 
18071 
18072 
18073 # Check whether --with-dxsdk was given.
18074 if test "${with_dxsdk+set}" = set; then :
18075   withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
18076 $as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
18077 fi
18078 
18079 
18080 
18081 
18082 # Check whether --with-dxsdk-lib was given.
18083 if test "${with_dxsdk_lib+set}" = set; then :
18084   withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
18085 $as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
18086 fi
18087 
18088 
18089 
18090 
18091 # Check whether --with-dxsdk-include was given.
18092 if test "${with_dxsdk_include+set}" = set; then :
18093   withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
18094 $as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
18095 fi
18096 
18097 
18098   fi
18099 
18100 
18101 
18102   # If --build AND --host is set, then the configure script will find any
18103   # cross compilation tools in the PATH. Cross compilation tools
18104   # follows the cross compilation standard where they are prefixed with ${host}.
18105   # For example the binary i686-sun-solaris2.10-gcc
18106   # will cross compile for i686-sun-solaris2.10
18107   # If neither of build and host is not set, then build=host and the
18108   # default compiler found in the path will be used.
18109   # Setting only --host, does not seem to be really supported.
18110   # Please set both --build and --host if you want to cross compile.
18111 
18112   if test "x$COMPILE_TYPE" = "xcross"; then
18113     # Now we to find a C/C++ compiler that can build executables for the build
18114     # platform. We can't use the AC_PROG_CC macro, since it can only be used
18115     # once. Also, we need to do this before adding a tools dir to the path,
18116     # otherwise we might pick up cross-compilers which don't use standard naming.
18117     # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
18118     # to wait until they are properly discovered.
18119     for ac_prog in cl cc gcc
18120 do
18121   # Extract the first word of "$ac_prog", so it can be a program name with args.
18122 set dummy $ac_prog; ac_word=$2
18123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18124 $as_echo_n "checking for $ac_word... " >&6; }
18125 if ${ac_cv_path_BUILD_CC+:} false; then :
18126   $as_echo_n "(cached) " >&6
18127 else
18128   case $BUILD_CC in
18129   [\\/]* | ?:[\\/]*)
18130   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
18131   ;;
18132   *)
18133   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18134 for as_dir in $PATH
18135 do
18136   IFS=$as_save_IFS
18137   test -z "$as_dir" && as_dir=.
18138     for ac_exec_ext in '' $ac_executable_extensions; do
18139   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18140     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
18141     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18142     break 2
18143   fi
18144 done
18145   done
18146 IFS=$as_save_IFS
18147 
18148   ;;
18149 esac
18150 fi
18151 BUILD_CC=$ac_cv_path_BUILD_CC
18152 if test -n "$BUILD_CC"; then
18153   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
18154 $as_echo "$BUILD_CC" >&6; }
18155 else
18156   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18157 $as_echo "no" >&6; }
18158 fi
18159 
18160 
18161   test -n "$BUILD_CC" && break
18162 done
18163 
18164 
18165   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18166 
18167   # First separate the path from the arguments. This will split at the first
18168   # space.
18169   complete="$BUILD_CC"
18170   path="${complete%% *}"
18171   tmp="$complete EOL"
18172   arguments="${tmp#* }"
18173 
18174   # Input might be given as Windows format, start by converting to
18175   # unix format.
18176   new_path=`$CYGPATH -u "$path"`
18177 
18178   # Now try to locate executable using which
18179   new_path=`$WHICH "$new_path" 2> /dev/null`
18180   # bat and cmd files are not always considered executable in cygwin causing which
18181   # to not find them
18182   if test "x$new_path" = x \
18183       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18184       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18185     new_path=`$CYGPATH -u "$path"`
18186   fi
18187   if test "x$new_path" = x; then
18188     # Oops. Which didn't find the executable.
18189     # The splitting of arguments from the executable at a space might have been incorrect,
18190     # since paths with space are more likely in Windows. Give it another try with the whole
18191     # argument.
18192     path="$complete"
18193     arguments="EOL"
18194     new_path=`$CYGPATH -u "$path"`
18195     new_path=`$WHICH "$new_path" 2> /dev/null`
18196     # bat and cmd files are not always considered executable in cygwin causing which
18197     # to not find them
18198     if test "x$new_path" = x \
18199         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18200         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18201       new_path=`$CYGPATH -u "$path"`
18202     fi
18203     if test "x$new_path" = x; then
18204       # It's still not found. Now this is an unrecoverable error.
18205       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18206 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18207       has_space=`$ECHO "$complete" | $GREP " "`
18208       if test "x$has_space" != x; then
18209         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18210 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18211       fi
18212       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18213     fi
18214   fi
18215 
18216   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18217   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18218   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18219   # "foo.exe" is OK but "foo" is an error.
18220   #
18221   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18222   # It is also a way to make sure we got the proper file name for the real test later on.
18223   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18224   if test "x$test_shortpath" = x; then
18225     # Short path failed, file does not exist as specified.
18226     # Try adding .exe or .cmd
18227     if test -f "${new_path}.exe"; then
18228       input_to_shortpath="${new_path}.exe"
18229     elif test -f "${new_path}.cmd"; then
18230       input_to_shortpath="${new_path}.cmd"
18231     else
18232       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
18233 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
18234       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18235 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18236       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18237     fi
18238   else
18239     input_to_shortpath="$new_path"
18240   fi
18241 
18242   # Call helper function which possibly converts this using DOS-style short mode.
18243   # If so, the updated path is stored in $new_path.
18244   new_path="$input_to_shortpath"
18245 
18246   input_path="$input_to_shortpath"
18247   # Check if we need to convert this using DOS-style short mode. If the path
18248   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18249   # take no chances and rewrite it.
18250   # Note: m4 eats our [], so we need to use [ and ] instead.
18251   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18252   if test "x$has_forbidden_chars" != x; then
18253     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18254     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18255     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18256     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18257       # Going to short mode and back again did indeed matter. Since short mode is
18258       # case insensitive, let's make it lowercase to improve readability.
18259       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18260       # Now convert it back to Unix-stile (cygpath)
18261       input_path=`$CYGPATH -u "$shortmode_path"`
18262       new_path="$input_path"
18263     fi
18264   fi
18265 
18266   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18267   if test "x$test_cygdrive_prefix" = x; then
18268     # As a simple fix, exclude /usr/bin since it's not a real path.
18269     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18270       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18271       # a path prefixed by /cygdrive for fixpath to work.
18272       new_path="$CYGWIN_ROOT_PATH$input_path"
18273     fi
18274   fi
18275 
18276   # remove trailing .exe if any
18277   new_path="${new_path/%.exe/}"
18278 
18279   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18280 
18281   # First separate the path from the arguments. This will split at the first
18282   # space.
18283   complete="$BUILD_CC"
18284   path="${complete%% *}"
18285   tmp="$complete EOL"
18286   arguments="${tmp#* }"
18287 
18288   # Input might be given as Windows format, start by converting to
18289   # unix format.
18290   new_path="$path"
18291 
18292   windows_path="$new_path"
18293   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18294     unix_path=`$CYGPATH -u "$windows_path"`
18295     new_path="$unix_path"
18296   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18297     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18298     new_path="$unix_path"
18299   fi
18300 
18301 
18302   # Now try to locate executable using which
18303   new_path=`$WHICH "$new_path" 2> /dev/null`
18304 
18305   if test "x$new_path" = x; then
18306     # Oops. Which didn't find the executable.
18307     # The splitting of arguments from the executable at a space might have been incorrect,
18308     # since paths with space are more likely in Windows. Give it another try with the whole
18309     # argument.
18310     path="$complete"
18311     arguments="EOL"
18312     new_path="$path"
18313 
18314   windows_path="$new_path"
18315   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18316     unix_path=`$CYGPATH -u "$windows_path"`
18317     new_path="$unix_path"
18318   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18319     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18320     new_path="$unix_path"
18321   fi
18322 
18323 
18324     new_path=`$WHICH "$new_path" 2> /dev/null`
18325 
18326     if test "x$new_path" = x; then
18327       # It's still not found. Now this is an unrecoverable error.
18328       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18329 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18330       has_space=`$ECHO "$complete" | $GREP " "`
18331       if test "x$has_space" != x; then
18332         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18333 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18334       fi
18335       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18336     fi
18337   fi
18338 
18339   # Now new_path has a complete unix path to the binary
18340   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18341     # Keep paths in /bin as-is, but remove trailing .exe if any
18342     new_path="${new_path/%.exe/}"
18343     # Do not save /bin paths to all_fixpath_prefixes!
18344   else
18345     # Not in mixed or Windows style, start by that.
18346     new_path=`cmd //c echo $new_path`
18347 
18348   input_path="$new_path"
18349   # Check if we need to convert this using DOS-style short mode. If the path
18350   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18351   # take no chances and rewrite it.
18352   # Note: m4 eats our [], so we need to use [ and ] instead.
18353   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18354   if test "x$has_forbidden_chars" != x; then
18355     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18356     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18357   fi
18358 
18359     # Output is in $new_path
18360 
18361   windows_path="$new_path"
18362   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18363     unix_path=`$CYGPATH -u "$windows_path"`
18364     new_path="$unix_path"
18365   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18366     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18367     new_path="$unix_path"
18368   fi
18369 
18370     # remove trailing .exe if any
18371     new_path="${new_path/%.exe/}"
18372 
18373     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18374     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18375   fi
18376 
18377   else
18378     # We're on a posix platform. Hooray! :)
18379     # First separate the path from the arguments. This will split at the first
18380     # space.
18381     complete="$BUILD_CC"
18382     path="${complete%% *}"
18383     tmp="$complete EOL"
18384     arguments="${tmp#* }"
18385 
18386     # Cannot rely on the command "which" here since it doesn't always work.
18387     is_absolute_path=`$ECHO "$path" | $GREP ^/`
18388     if test -z "$is_absolute_path"; then
18389       # Path to executable is not absolute. Find it.
18390       IFS_save="$IFS"
18391       IFS=:
18392       for p in $PATH; do
18393         if test -f "$p/$path" && test -x "$p/$path"; then
18394           new_path="$p/$path"
18395           break
18396         fi
18397       done
18398       IFS="$IFS_save"
18399     else
18400       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
18401 $as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
18402       new_path="$path"
18403     fi
18404 
18405     if test "x$new_path" = x; then
18406       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18407 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18408       has_space=`$ECHO "$complete" | $GREP " "`
18409       if test "x$has_space" != x; then
18410         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18411 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18412       fi
18413       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18414     fi
18415   fi
18416 
18417   # Now join together the path and the arguments once again
18418   if test "x$arguments" != xEOL; then
18419     new_complete="$new_path ${arguments% *}"
18420   else
18421     new_complete="$new_path"
18422   fi
18423 
18424   if test "x$complete" != "x$new_complete"; then
18425     BUILD_CC="$new_complete"
18426     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
18427 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
18428   fi
18429 
18430     for ac_prog in cl CC g++
18431 do
18432   # Extract the first word of "$ac_prog", so it can be a program name with args.
18433 set dummy $ac_prog; ac_word=$2
18434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18435 $as_echo_n "checking for $ac_word... " >&6; }
18436 if ${ac_cv_path_BUILD_CXX+:} false; then :
18437   $as_echo_n "(cached) " >&6
18438 else
18439   case $BUILD_CXX in
18440   [\\/]* | ?:[\\/]*)
18441   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
18442   ;;
18443   *)
18444   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18445 for as_dir in $PATH
18446 do
18447   IFS=$as_save_IFS
18448   test -z "$as_dir" && as_dir=.
18449     for ac_exec_ext in '' $ac_executable_extensions; do
18450   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18451     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
18452     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18453     break 2
18454   fi
18455 done
18456   done
18457 IFS=$as_save_IFS
18458 
18459   ;;
18460 esac
18461 fi
18462 BUILD_CXX=$ac_cv_path_BUILD_CXX
18463 if test -n "$BUILD_CXX"; then
18464   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
18465 $as_echo "$BUILD_CXX" >&6; }
18466 else
18467   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18468 $as_echo "no" >&6; }
18469 fi
18470 
18471 
18472   test -n "$BUILD_CXX" && break
18473 done
18474 
18475 
18476   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18477 
18478   # First separate the path from the arguments. This will split at the first
18479   # space.
18480   complete="$BUILD_CXX"
18481   path="${complete%% *}"
18482   tmp="$complete EOL"
18483   arguments="${tmp#* }"
18484 
18485   # Input might be given as Windows format, start by converting to
18486   # unix format.
18487   new_path=`$CYGPATH -u "$path"`
18488 
18489   # Now try to locate executable using which
18490   new_path=`$WHICH "$new_path" 2> /dev/null`
18491   # bat and cmd files are not always considered executable in cygwin causing which
18492   # to not find them
18493   if test "x$new_path" = x \
18494       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18495       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18496     new_path=`$CYGPATH -u "$path"`
18497   fi
18498   if test "x$new_path" = x; then
18499     # Oops. Which didn't find the executable.
18500     # The splitting of arguments from the executable at a space might have been incorrect,
18501     # since paths with space are more likely in Windows. Give it another try with the whole
18502     # argument.
18503     path="$complete"
18504     arguments="EOL"
18505     new_path=`$CYGPATH -u "$path"`
18506     new_path=`$WHICH "$new_path" 2> /dev/null`
18507     # bat and cmd files are not always considered executable in cygwin causing which
18508     # to not find them
18509     if test "x$new_path" = x \
18510         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18511         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18512       new_path=`$CYGPATH -u "$path"`
18513     fi
18514     if test "x$new_path" = x; then
18515       # It's still not found. Now this is an unrecoverable error.
18516       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18517 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18518       has_space=`$ECHO "$complete" | $GREP " "`
18519       if test "x$has_space" != x; then
18520         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18521 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18522       fi
18523       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18524     fi
18525   fi
18526 
18527   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18528   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18529   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18530   # "foo.exe" is OK but "foo" is an error.
18531   #
18532   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18533   # It is also a way to make sure we got the proper file name for the real test later on.
18534   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18535   if test "x$test_shortpath" = x; then
18536     # Short path failed, file does not exist as specified.
18537     # Try adding .exe or .cmd
18538     if test -f "${new_path}.exe"; then
18539       input_to_shortpath="${new_path}.exe"
18540     elif test -f "${new_path}.cmd"; then
18541       input_to_shortpath="${new_path}.cmd"
18542     else
18543       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
18544 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
18545       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18546 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18547       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18548     fi
18549   else
18550     input_to_shortpath="$new_path"
18551   fi
18552 
18553   # Call helper function which possibly converts this using DOS-style short mode.
18554   # If so, the updated path is stored in $new_path.
18555   new_path="$input_to_shortpath"
18556 
18557   input_path="$input_to_shortpath"
18558   # Check if we need to convert this using DOS-style short mode. If the path
18559   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18560   # take no chances and rewrite it.
18561   # Note: m4 eats our [], so we need to use [ and ] instead.
18562   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18563   if test "x$has_forbidden_chars" != x; then
18564     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18565     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18566     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18567     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18568       # Going to short mode and back again did indeed matter. Since short mode is
18569       # case insensitive, let's make it lowercase to improve readability.
18570       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18571       # Now convert it back to Unix-stile (cygpath)
18572       input_path=`$CYGPATH -u "$shortmode_path"`
18573       new_path="$input_path"
18574     fi
18575   fi
18576 
18577   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18578   if test "x$test_cygdrive_prefix" = x; then
18579     # As a simple fix, exclude /usr/bin since it's not a real path.
18580     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18581       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18582       # a path prefixed by /cygdrive for fixpath to work.
18583       new_path="$CYGWIN_ROOT_PATH$input_path"
18584     fi
18585   fi
18586 
18587   # remove trailing .exe if any
18588   new_path="${new_path/%.exe/}"
18589 
18590   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18591 
18592   # First separate the path from the arguments. This will split at the first
18593   # space.
18594   complete="$BUILD_CXX"
18595   path="${complete%% *}"
18596   tmp="$complete EOL"
18597   arguments="${tmp#* }"
18598 
18599   # Input might be given as Windows format, start by converting to
18600   # unix format.
18601   new_path="$path"
18602 
18603   windows_path="$new_path"
18604   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18605     unix_path=`$CYGPATH -u "$windows_path"`
18606     new_path="$unix_path"
18607   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18608     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18609     new_path="$unix_path"
18610   fi
18611 
18612 
18613   # Now try to locate executable using which
18614   new_path=`$WHICH "$new_path" 2> /dev/null`
18615 
18616   if test "x$new_path" = x; then
18617     # Oops. Which didn't find the executable.
18618     # The splitting of arguments from the executable at a space might have been incorrect,
18619     # since paths with space are more likely in Windows. Give it another try with the whole
18620     # argument.
18621     path="$complete"
18622     arguments="EOL"
18623     new_path="$path"
18624 
18625   windows_path="$new_path"
18626   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18627     unix_path=`$CYGPATH -u "$windows_path"`
18628     new_path="$unix_path"
18629   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18630     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18631     new_path="$unix_path"
18632   fi
18633 
18634 
18635     new_path=`$WHICH "$new_path" 2> /dev/null`
18636 
18637     if test "x$new_path" = x; then
18638       # It's still not found. Now this is an unrecoverable error.
18639       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18640 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18641       has_space=`$ECHO "$complete" | $GREP " "`
18642       if test "x$has_space" != x; then
18643         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18644 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18645       fi
18646       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18647     fi
18648   fi
18649 
18650   # Now new_path has a complete unix path to the binary
18651   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18652     # Keep paths in /bin as-is, but remove trailing .exe if any
18653     new_path="${new_path/%.exe/}"
18654     # Do not save /bin paths to all_fixpath_prefixes!
18655   else
18656     # Not in mixed or Windows style, start by that.
18657     new_path=`cmd //c echo $new_path`
18658 
18659   input_path="$new_path"
18660   # Check if we need to convert this using DOS-style short mode. If the path
18661   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18662   # take no chances and rewrite it.
18663   # Note: m4 eats our [], so we need to use [ and ] instead.
18664   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18665   if test "x$has_forbidden_chars" != x; then
18666     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18667     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18668   fi
18669 
18670     # Output is in $new_path
18671 
18672   windows_path="$new_path"
18673   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18674     unix_path=`$CYGPATH -u "$windows_path"`
18675     new_path="$unix_path"
18676   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18677     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18678     new_path="$unix_path"
18679   fi
18680 
18681     # remove trailing .exe if any
18682     new_path="${new_path/%.exe/}"
18683 
18684     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18685     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18686   fi
18687 
18688   else
18689     # We're on a posix platform. Hooray! :)
18690     # First separate the path from the arguments. This will split at the first
18691     # space.
18692     complete="$BUILD_CXX"
18693     path="${complete%% *}"
18694     tmp="$complete EOL"
18695     arguments="${tmp#* }"
18696 
18697     # Cannot rely on the command "which" here since it doesn't always work.
18698     is_absolute_path=`$ECHO "$path" | $GREP ^/`
18699     if test -z "$is_absolute_path"; then
18700       # Path to executable is not absolute. Find it.
18701       IFS_save="$IFS"
18702       IFS=:
18703       for p in $PATH; do
18704         if test -f "$p/$path" && test -x "$p/$path"; then
18705           new_path="$p/$path"
18706           break
18707         fi
18708       done
18709       IFS="$IFS_save"
18710     else
18711       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18712 $as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18713       new_path="$path"
18714     fi
18715 
18716     if test "x$new_path" = x; then
18717       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18718 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18719       has_space=`$ECHO "$complete" | $GREP " "`
18720       if test "x$has_space" != x; then
18721         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18722 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18723       fi
18724       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18725     fi
18726   fi
18727 
18728   # Now join together the path and the arguments once again
18729   if test "x$arguments" != xEOL; then
18730     new_complete="$new_path ${arguments% *}"
18731   else
18732     new_complete="$new_path"
18733   fi
18734 
18735   if test "x$complete" != "x$new_complete"; then
18736     BUILD_CXX="$new_complete"
18737     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18738 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18739   fi
18740 
18741     # Extract the first word of "ld", so it can be a program name with args.
18742 set dummy ld; ac_word=$2
18743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18744 $as_echo_n "checking for $ac_word... " >&6; }
18745 if ${ac_cv_path_BUILD_LD+:} false; then :
18746   $as_echo_n "(cached) " >&6
18747 else
18748   case $BUILD_LD in
18749   [\\/]* | ?:[\\/]*)
18750   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18751   ;;
18752   *)
18753   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18754 for as_dir in $PATH
18755 do
18756   IFS=$as_save_IFS
18757   test -z "$as_dir" && as_dir=.
18758     for ac_exec_ext in '' $ac_executable_extensions; do
18759   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18760     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18761     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18762     break 2
18763   fi
18764 done
18765   done
18766 IFS=$as_save_IFS
18767 
18768   ;;
18769 esac
18770 fi
18771 BUILD_LD=$ac_cv_path_BUILD_LD
18772 if test -n "$BUILD_LD"; then
18773   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18774 $as_echo "$BUILD_LD" >&6; }
18775 else
18776   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18777 $as_echo "no" >&6; }
18778 fi
18779 
18780 
18781 
18782   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18783 
18784   # First separate the path from the arguments. This will split at the first
18785   # space.
18786   complete="$BUILD_LD"
18787   path="${complete%% *}"
18788   tmp="$complete EOL"
18789   arguments="${tmp#* }"
18790 
18791   # Input might be given as Windows format, start by converting to
18792   # unix format.
18793   new_path=`$CYGPATH -u "$path"`
18794 
18795   # Now try to locate executable using which
18796   new_path=`$WHICH "$new_path" 2> /dev/null`
18797   # bat and cmd files are not always considered executable in cygwin causing which
18798   # to not find them
18799   if test "x$new_path" = x \
18800       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18801       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18802     new_path=`$CYGPATH -u "$path"`
18803   fi
18804   if test "x$new_path" = x; then
18805     # Oops. Which didn't find the executable.
18806     # The splitting of arguments from the executable at a space might have been incorrect,
18807     # since paths with space are more likely in Windows. Give it another try with the whole
18808     # argument.
18809     path="$complete"
18810     arguments="EOL"
18811     new_path=`$CYGPATH -u "$path"`
18812     new_path=`$WHICH "$new_path" 2> /dev/null`
18813     # bat and cmd files are not always considered executable in cygwin causing which
18814     # to not find them
18815     if test "x$new_path" = x \
18816         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18817         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18818       new_path=`$CYGPATH -u "$path"`
18819     fi
18820     if test "x$new_path" = x; then
18821       # It's still not found. Now this is an unrecoverable error.
18822       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18823 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18824       has_space=`$ECHO "$complete" | $GREP " "`
18825       if test "x$has_space" != x; then
18826         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18827 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18828       fi
18829       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18830     fi
18831   fi
18832 
18833   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18834   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18835   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18836   # "foo.exe" is OK but "foo" is an error.
18837   #
18838   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18839   # It is also a way to make sure we got the proper file name for the real test later on.
18840   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18841   if test "x$test_shortpath" = x; then
18842     # Short path failed, file does not exist as specified.
18843     # Try adding .exe or .cmd
18844     if test -f "${new_path}.exe"; then
18845       input_to_shortpath="${new_path}.exe"
18846     elif test -f "${new_path}.cmd"; then
18847       input_to_shortpath="${new_path}.cmd"
18848     else
18849       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18850 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18851       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18852 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18853       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18854     fi
18855   else
18856     input_to_shortpath="$new_path"
18857   fi
18858 
18859   # Call helper function which possibly converts this using DOS-style short mode.
18860   # If so, the updated path is stored in $new_path.
18861   new_path="$input_to_shortpath"
18862 
18863   input_path="$input_to_shortpath"
18864   # Check if we need to convert this using DOS-style short mode. If the path
18865   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18866   # take no chances and rewrite it.
18867   # Note: m4 eats our [], so we need to use [ and ] instead.
18868   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18869   if test "x$has_forbidden_chars" != x; then
18870     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18871     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18872     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18873     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18874       # Going to short mode and back again did indeed matter. Since short mode is
18875       # case insensitive, let's make it lowercase to improve readability.
18876       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18877       # Now convert it back to Unix-stile (cygpath)
18878       input_path=`$CYGPATH -u "$shortmode_path"`
18879       new_path="$input_path"
18880     fi
18881   fi
18882 
18883   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18884   if test "x$test_cygdrive_prefix" = x; then
18885     # As a simple fix, exclude /usr/bin since it's not a real path.
18886     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18887       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18888       # a path prefixed by /cygdrive for fixpath to work.
18889       new_path="$CYGWIN_ROOT_PATH$input_path"
18890     fi
18891   fi
18892 
18893   # remove trailing .exe if any
18894   new_path="${new_path/%.exe/}"
18895 
18896   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18897 
18898   # First separate the path from the arguments. This will split at the first
18899   # space.
18900   complete="$BUILD_LD"
18901   path="${complete%% *}"
18902   tmp="$complete EOL"
18903   arguments="${tmp#* }"
18904 
18905   # Input might be given as Windows format, start by converting to
18906   # unix format.
18907   new_path="$path"
18908 
18909   windows_path="$new_path"
18910   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18911     unix_path=`$CYGPATH -u "$windows_path"`
18912     new_path="$unix_path"
18913   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18914     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18915     new_path="$unix_path"
18916   fi
18917 
18918 
18919   # Now try to locate executable using which
18920   new_path=`$WHICH "$new_path" 2> /dev/null`
18921 
18922   if test "x$new_path" = x; then
18923     # Oops. Which didn't find the executable.
18924     # The splitting of arguments from the executable at a space might have been incorrect,
18925     # since paths with space are more likely in Windows. Give it another try with the whole
18926     # argument.
18927     path="$complete"
18928     arguments="EOL"
18929     new_path="$path"
18930 
18931   windows_path="$new_path"
18932   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18933     unix_path=`$CYGPATH -u "$windows_path"`
18934     new_path="$unix_path"
18935   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18936     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18937     new_path="$unix_path"
18938   fi
18939 
18940 
18941     new_path=`$WHICH "$new_path" 2> /dev/null`
18942 
18943     if test "x$new_path" = x; then
18944       # It's still not found. Now this is an unrecoverable error.
18945       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18946 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18947       has_space=`$ECHO "$complete" | $GREP " "`
18948       if test "x$has_space" != x; then
18949         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18950 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18951       fi
18952       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18953     fi
18954   fi
18955 
18956   # Now new_path has a complete unix path to the binary
18957   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18958     # Keep paths in /bin as-is, but remove trailing .exe if any
18959     new_path="${new_path/%.exe/}"
18960     # Do not save /bin paths to all_fixpath_prefixes!
18961   else
18962     # Not in mixed or Windows style, start by that.
18963     new_path=`cmd //c echo $new_path`
18964 
18965   input_path="$new_path"
18966   # Check if we need to convert this using DOS-style short mode. If the path
18967   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18968   # take no chances and rewrite it.
18969   # Note: m4 eats our [], so we need to use [ and ] instead.
18970   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18971   if test "x$has_forbidden_chars" != x; then
18972     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18973     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18974   fi
18975 
18976     # Output is in $new_path
18977 
18978   windows_path="$new_path"
18979   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18980     unix_path=`$CYGPATH -u "$windows_path"`
18981     new_path="$unix_path"
18982   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18983     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18984     new_path="$unix_path"
18985   fi
18986 
18987     # remove trailing .exe if any
18988     new_path="${new_path/%.exe/}"
18989 
18990     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18991     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18992   fi
18993 
18994   else
18995     # We're on a posix platform. Hooray! :)
18996     # First separate the path from the arguments. This will split at the first
18997     # space.
18998     complete="$BUILD_LD"
18999     path="${complete%% *}"
19000     tmp="$complete EOL"
19001     arguments="${tmp#* }"
19002 
19003     # Cannot rely on the command "which" here since it doesn't always work.
19004     is_absolute_path=`$ECHO "$path" | $GREP ^/`
19005     if test -z "$is_absolute_path"; then
19006       # Path to executable is not absolute. Find it.
19007       IFS_save="$IFS"
19008       IFS=:
19009       for p in $PATH; do
19010         if test -f "$p/$path" && test -x "$p/$path"; then
19011           new_path="$p/$path"
19012           break
19013         fi
19014       done
19015       IFS="$IFS_save"
19016     else
19017       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
19018 $as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
19019       new_path="$path"
19020     fi
19021 
19022     if test "x$new_path" = x; then
19023       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
19024 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
19025       has_space=`$ECHO "$complete" | $GREP " "`
19026       if test "x$has_space" != x; then
19027         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19028 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19029       fi
19030       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
19031     fi
19032   fi
19033 
19034   # Now join together the path and the arguments once again
19035   if test "x$arguments" != xEOL; then
19036     new_complete="$new_path ${arguments% *}"
19037   else
19038     new_complete="$new_path"
19039   fi
19040 
19041   if test "x$complete" != "x$new_complete"; then
19042     BUILD_LD="$new_complete"
19043     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
19044 $as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
19045   fi
19046 
19047   fi
19048 
19049 
19050 
19051 
19052   # If a devkit is found on the builddeps server, then prepend its path to the
19053   # PATH variable. If there are cross compilers available in the devkit, these
19054   # will be found by AC_PROG_CC et al.
19055   DEVKIT=
19056 
19057 
19058   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19059     # Source the builddeps file again, to make sure it uses the latest variables!
19060     . $builddepsfile
19061     # Look for a target and build machine specific resource!
19062     eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
19063     if test "x$resource" = x; then
19064       # Ok, lets instead look for a target specific resource
19065       eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
19066     fi
19067     if test "x$resource" = x; then
19068       # Ok, lets instead look for a build specific resource
19069       eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
19070     fi
19071     if test "x$resource" = x; then
19072       # Ok, lets instead look for a generic resource
19073       # (The devkit comes from M4 and not the shell, thus no need for eval here.)
19074       resource=${builddep_devkit}
19075     fi
19076     if test "x$resource" != x; then
19077       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
19078 $as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
19079       # If the resource in the builddeps.conf file is an existing directory,
19080       # for example /java/linux/cups
19081       if test -d ${resource}; then
19082         depdir=${resource}
19083       else
19084 
19085   # devkit is for example mymodule
19086   # $resource is for example libs/general/libmymod_1_2_3.zip
19087   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
19088   # $with_builddeps_dir is for example /localhome/builddeps
19089   # depdir is the name of the variable into which we store the depdir, eg MYMOD
19090   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
19091   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
19092   filename=`basename $resource`
19093   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
19094   filebase=${filename%%.*}
19095   extension=${filename#*.}
19096   installdir=$with_builddeps_dir/$filebase
19097   if test ! -f $installdir/$filename.unpacked; then
19098     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
19099 $as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
19100     if test ! -d $installdir; then
19101       mkdir -p $installdir
19102     fi
19103     if test ! -d $installdir; then
19104       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
19105     fi
19106     tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
19107     touch $tmpfile
19108     if test ! -f $tmpfile; then
19109       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
19110     fi
19111 
19112   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
19113   # $tmpfile is the local file name for the downloaded file.
19114   VALID_TOOL=no
19115   if test "x$BDEPS_FTP" = xwget; then
19116     VALID_TOOL=yes
19117     wget -O $tmpfile $with_builddeps_server/$resource
19118   fi
19119   if test "x$BDEPS_FTP" = xlftp; then
19120     VALID_TOOL=yes
19121     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
19122   fi
19123   if test "x$BDEPS_FTP" = xftp; then
19124     VALID_TOOL=yes
19125     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
19126     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
19127     FTPUSERPWD=${FTPSERVER%%@*}
19128     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
19129       FTPUSER=${userpwd%%:*}
19130       FTPPWD=${userpwd#*@}
19131       FTPSERVER=${FTPSERVER#*@}
19132     else
19133       FTPUSER=ftp
19134       FTPPWD=ftp
19135     fi
19136     # the "pass" command does not work on some
19137     # ftp clients (read ftp.exe) but if it works,
19138     # passive mode is better!
19139     ( \
19140         echo "user $FTPUSER $FTPPWD"        ; \
19141         echo "pass"                         ; \
19142         echo "bin"                          ; \
19143         echo "get $FTPPATH $tmpfile"              ; \
19144     ) | ftp -in $FTPSERVER
19145   fi
19146   if test "x$VALID_TOOL" != xyes; then
19147     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
19148   fi
19149 
19150     mv $tmpfile $installdir/$filename
19151     if test ! -s $installdir/$filename; then
19152       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
19153     fi
19154     case "$extension" in
19155       zip)  echo "Unzipping $installdir/$filename..."
19156         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
19157         ;;
19158       tar.gz) echo "Untaring $installdir/$filename..."
19159         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19160         ;;
19161       tgz) echo "Untaring $installdir/$filename..."
19162         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19163         ;;
19164       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
19165         ;;
19166     esac
19167   fi
19168   if test -f $installdir/$filename.unpacked; then
19169     depdir=$installdir
19170   fi
19171 
19172       fi
19173       # Source the builddeps file again, because in the previous command, the depdir
19174       # was updated to point at the current build dependency install directory.
19175       . $builddepsfile
19176       # Now extract variables from the builddeps.conf files.
19177       theroot=${builddep_devkit_ROOT}
19178       thecflags=${builddep_devkit_CFLAGS}
19179       thelibs=${builddep_devkit_LIBS}
19180       if test "x$depdir" = x; then
19181         as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
19182       fi
19183       DEVKIT=$depdir
19184       if test "x$theroot" != x; then
19185         DEVKIT="$theroot"
19186       fi
19187       if test "x$thecflags" != x; then
19188         DEVKIT_CFLAGS="$thecflags"
19189       fi
19190       if test "x$thelibs" != x; then
19191         DEVKIT_LIBS="$thelibs"
19192       fi
19193 
19194         # Found devkit
19195         PATH="$DEVKIT/bin:$PATH"
19196         SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
19197         if test "x$x_includes" = "xNONE"; then
19198           x_includes="$SYS_ROOT/usr/include/X11"
19199         fi
19200         if test "x$x_libraries" = "xNONE"; then
19201           x_libraries="$SYS_ROOT/usr/lib"
19202         fi
19203 
19204 
19205     fi
19206 
19207   fi
19208 
19209 
19210   # Store the CFLAGS etal passed to the configure script.
19211   ORG_CFLAGS="$CFLAGS"
19212   ORG_CXXFLAGS="$CXXFLAGS"
19213   ORG_OBJCFLAGS="$OBJCFLAGS"
19214 
19215   # autoconf magic only relies on PATH, so update it if tools dir is specified
19216   OLD_PATH="$PATH"
19217   if test "x$TOOLS_DIR" != x; then
19218     PATH=$TOOLS_DIR:$PATH
19219   fi
19220 
19221   # Before we locate the compilers, we need to sanitize the Xcode build environment
19222   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
19223     # determine path to Xcode developer directory
19224     # can be empty in which case all the tools will rely on a sane Xcode 4 installation
19225     SET_DEVELOPER_DIR=
19226 
19227     if test -n "$XCODE_PATH"; then
19228       DEVELOPER_DIR="$XCODE_PATH"/Contents/Developer
19229     fi
19230 
19231     # DEVELOPER_DIR could also be provided directly
19232     { $as_echo "$as_me:${as_lineno-$LINENO}: checking Determining if we need to set DEVELOPER_DIR" >&5
19233 $as_echo_n "checking Determining if we need to set DEVELOPER_DIR... " >&6; }
19234     if test -n "$DEVELOPER_DIR"; then
19235       if test ! -d "$DEVELOPER_DIR"; then
19236         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
19237       fi
19238       if test ! -f "$DEVELOPER_DIR"/usr/bin/xcodebuild; then
19239         as_fn_error $? "Xcode Developer path is not valid: $DEVELOPER_DIR, it must point to Contents/Developer inside an Xcode application bundle" "$LINENO" 5
19240       fi
19241       # make it visible to all the tools immediately
19242       export DEVELOPER_DIR
19243       SET_DEVELOPER_DIR="export DEVELOPER_DIR := $DEVELOPER_DIR"
19244       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($DEVELOPER_DIR)" >&5
19245 $as_echo "yes ($DEVELOPER_DIR)" >&6; }
19246     else
19247       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19248 $as_echo "no" >&6; }
19249     fi
19250 
19251 
19252     # Extract the first word of "xcodebuild", so it can be a program name with args.
19253 set dummy xcodebuild; ac_word=$2
19254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19255 $as_echo_n "checking for $ac_word... " >&6; }
19256 if ${ac_cv_path_XCODEBUILD+:} false; then :
19257   $as_echo_n "(cached) " >&6
19258 else
19259   case $XCODEBUILD in
19260   [\\/]* | ?:[\\/]*)
19261   ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
19262   ;;
19263   *)
19264   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19265 for as_dir in $PATH
19266 do
19267   IFS=$as_save_IFS
19268   test -z "$as_dir" && as_dir=.
19269     for ac_exec_ext in '' $ac_executable_extensions; do
19270   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19271     ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
19272     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19273     break 2
19274   fi
19275 done
19276   done
19277 IFS=$as_save_IFS
19278 
19279   ;;
19280 esac
19281 fi
19282 XCODEBUILD=$ac_cv_path_XCODEBUILD
19283 if test -n "$XCODEBUILD"; then
19284   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
19285 $as_echo "$XCODEBUILD" >&6; }
19286 else
19287   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19288 $as_echo "no" >&6; }
19289 fi
19290 
19291 
19292     if test -z "$XCODEBUILD"; then
19293       as_fn_error $? "The xcodebuild tool was not found, the Xcode command line tools are required to build on Mac OS X" "$LINENO" 5
19294     fi
19295 
19296     # Fail-fast: verify we're building on Xcode 4, we cannot build with Xcode 5 or later
19297     XCODE_VERSION=`$XCODEBUILD -version | grep '^Xcode ' | sed 's/Xcode //'`
19298     XC_VERSION_PARTS=( ${XCODE_VERSION//./ } )
19299     if test ! "${XC_VERSION_PARTS[0]}" = "4"; then
19300       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
19301     fi
19302 
19303     # Some versions of Xcode 5 command line tools install gcc and g++ as symlinks to
19304     # clang and clang++, which will break the build. So handle that here if we need to.
19305     if test -L "/usr/bin/gcc" -o -L "/usr/bin/g++"; then
19306       # use xcrun to find the real gcc and add it's directory to PATH
19307       # then autoconf magic will find it
19308       { $as_echo "$as_me:${as_lineno-$LINENO}: Found gcc symlinks to clang in /usr/bin, adding path to real gcc to PATH" >&5
19309 $as_echo "$as_me: Found gcc symlinks to clang in /usr/bin, adding path to real gcc to PATH" >&6;}
19310       XCODE_BIN_PATH=$(dirname `xcrun -find gcc`)
19311       PATH="$XCODE_BIN_PATH":$PATH
19312     fi
19313 
19314     # Determine appropriate SDKPATH, don't use SDKROOT as it interferes with the stub tools
19315     { $as_echo "$as_me:${as_lineno-$LINENO}: checking Determining Xcode SDK path" >&5
19316 $as_echo_n "checking Determining Xcode SDK path... " >&6; }
19317     # allow SDKNAME to be set to override the default SDK selection
19318     SDKPATH=`"$XCODEBUILD" -sdk ${SDKNAME:-macosx} -version | grep '^Path: ' | sed 's/Path: //'`
19319     if test -n "$SDKPATH"; then
19320       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKPATH" >&5
19321 $as_echo "$SDKPATH" >&6; }
19322     else
19323       { $as_echo "$as_me:${as_lineno-$LINENO}: result: (none, will use system headers and frameworks)" >&5
19324 $as_echo "(none, will use system headers and frameworks)" >&6; }
19325     fi
19326 
19327 
19328     # Perform a basic sanity test
19329     if test ! -f "$SDKPATH/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
19330       as_fn_error $? "Unable to find required framework headers, provide a valid path to Xcode 4 using --with-xcode-path" "$LINENO" 5
19331     fi
19332 
19333     # if SDKPATH is non-empty then we need to add -isysroot and -iframework for gcc and g++
19334     if test -n "$SDKPATH"; then
19335       # We need -isysroot <path> and -iframework<path>/System/Library/Frameworks
19336       CFLAGS_JDK="${CFLAGS_JDK} -isysroot \"$SDKPATH\" -iframework\"$SDKPATH/System/Library/Frameworks\""
19337       CXXFLAGS_JDK="${CXXFLAGS_JDK} -isysroot \"$SDKPATH\" -iframework\"$SDKPATH/System/Library/Frameworks\""
19338       LDFLAGS_JDK="${LDFLAGS_JDK} -isysroot \"$SDKPATH\" -iframework\"$SDKPATH/System/Library/Frameworks\""
19339     fi
19340 
19341     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
19342     # setting this here means it doesn't have to be peppered throughout the forest
19343     CFLAGS_JDK="$CFLAGS_JDK -F\"$SDKPATH/System/Library/Frameworks/JavaVM.framework/Frameworks\""
19344     CXXFLAGS_JDK="$CXXFLAGS_JDK -F\"$SDKPATH/System/Library/Frameworks/JavaVM.framework/Frameworks\""
19345     LDFLAGS_JDK="$LDFLAGS_JDK -F\"$SDKPATH/System/Library/Frameworks/JavaVM.framework/Frameworks\""
19346   fi
19347 
19348   ### Locate C compiler (CC)
19349 
19350   # On windows, only cl.exe is supported.
19351   # On Solaris, cc is preferred to gcc.
19352   # Elsewhere, gcc is preferred to cc.
19353 
19354   if test "x$CC" != x; then
19355     COMPILER_CHECK_LIST="$CC"
19356   elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
19357     COMPILER_CHECK_LIST="cl"
19358   elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
19359     COMPILER_CHECK_LIST="cc gcc"
19360   elif test "x$OPENJDK_TARGET_OS" = "xaix"; then
19361     # Do not probe for cc on AIX.
19362     COMPILER_CHECK_LIST="xlc_r"
19363   else
19364     COMPILER_CHECK_LIST="gcc cc"
19365   fi
19366 
19367 
19368   COMPILER_NAME=C
19369 
19370   CC=
19371   # If TOOLS_DIR is set, check for all compiler names in there first
19372   # before checking the rest of the PATH.
19373   if test -n "$TOOLS_DIR"; then
19374     PATH_save="$PATH"
19375     PATH="$TOOLS_DIR"
19376     for ac_prog in $COMPILER_CHECK_LIST
19377 do
19378   # Extract the first word of "$ac_prog", so it can be a program name with args.
19379 set dummy $ac_prog; ac_word=$2
19380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19381 $as_echo_n "checking for $ac_word... " >&6; }
19382 if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
19383   $as_echo_n "(cached) " >&6
19384 else
19385   case $TOOLS_DIR_CC in
19386   [\\/]* | ?:[\\/]*)
19387   ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
19388   ;;
19389   *)
19390   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19391 for as_dir in $PATH
19392 do
19393   IFS=$as_save_IFS
19394   test -z "$as_dir" && as_dir=.
19395     for ac_exec_ext in '' $ac_executable_extensions; do
19396   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19397     ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
19398     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19399     break 2
19400   fi
19401 done
19402   done
19403 IFS=$as_save_IFS
19404 
19405   ;;
19406 esac
19407 fi
19408 TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
19409 if test -n "$TOOLS_DIR_CC"; then
19410   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
19411 $as_echo "$TOOLS_DIR_CC" >&6; }
19412 else
19413   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19414 $as_echo "no" >&6; }
19415 fi
19416 
19417 
19418   test -n "$TOOLS_DIR_CC" && break
19419 done
19420 
19421     CC=$TOOLS_DIR_CC
19422     PATH="$PATH_save"
19423   fi
19424 
19425   # AC_PATH_PROGS can't be run multiple times with the same variable,
19426   # so create a new name for this run.
19427   if test "x$CC" = x; then
19428     for ac_prog in $COMPILER_CHECK_LIST
19429 do
19430   # Extract the first word of "$ac_prog", so it can be a program name with args.
19431 set dummy $ac_prog; ac_word=$2
19432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19433 $as_echo_n "checking for $ac_word... " >&6; }
19434 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
19435   $as_echo_n "(cached) " >&6
19436 else
19437   case $POTENTIAL_CC in
19438   [\\/]* | ?:[\\/]*)
19439   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
19440   ;;
19441   *)
19442   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19443 for as_dir in $PATH
19444 do
19445   IFS=$as_save_IFS
19446   test -z "$as_dir" && as_dir=.
19447     for ac_exec_ext in '' $ac_executable_extensions; do
19448   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19449     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
19450     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19451     break 2
19452   fi
19453 done
19454   done
19455 IFS=$as_save_IFS
19456 
19457   ;;
19458 esac
19459 fi
19460 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
19461 if test -n "$POTENTIAL_CC"; then
19462   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
19463 $as_echo "$POTENTIAL_CC" >&6; }
19464 else
19465   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19466 $as_echo "no" >&6; }
19467 fi
19468 
19469 
19470   test -n "$POTENTIAL_CC" && break
19471 done
19472 
19473     CC=$POTENTIAL_CC
19474   fi
19475 
19476   if test "x$CC" = x; then
19477 
19478   # Print a helpful message on how to acquire the necessary build dependency.
19479   # devkit is the help tag: freetype, cups, pulse, alsa etc
19480   MISSING_DEPENDENCY=devkit
19481 
19482   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19483     cygwin_help $MISSING_DEPENDENCY
19484   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19485     msys_help $MISSING_DEPENDENCY
19486   else
19487     PKGHANDLER_COMMAND=
19488 
19489     case $PKGHANDLER in
19490       apt-get)
19491         apt_help     $MISSING_DEPENDENCY ;;
19492       yum)
19493         yum_help     $MISSING_DEPENDENCY ;;
19494       port)
19495         port_help    $MISSING_DEPENDENCY ;;
19496       pkgutil)
19497         pkgutil_help $MISSING_DEPENDENCY ;;
19498       pkgadd)
19499         pkgadd_help  $MISSING_DEPENDENCY ;;
19500     esac
19501 
19502     if test "x$PKGHANDLER_COMMAND" != x; then
19503       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19504     fi
19505   fi
19506 
19507     as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19508   fi
19509 
19510   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19511 
19512   # First separate the path from the arguments. This will split at the first
19513   # space.
19514   complete="$CC"
19515   path="${complete%% *}"
19516   tmp="$complete EOL"
19517   arguments="${tmp#* }"
19518 
19519   # Input might be given as Windows format, start by converting to
19520   # unix format.
19521   new_path=`$CYGPATH -u "$path"`
19522 
19523   # Now try to locate executable using which
19524   new_path=`$WHICH "$new_path" 2> /dev/null`
19525   # bat and cmd files are not always considered executable in cygwin causing which
19526   # to not find them
19527   if test "x$new_path" = x \
19528       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19529       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19530     new_path=`$CYGPATH -u "$path"`
19531   fi
19532   if test "x$new_path" = x; then
19533     # Oops. Which didn't find the executable.
19534     # The splitting of arguments from the executable at a space might have been incorrect,
19535     # since paths with space are more likely in Windows. Give it another try with the whole
19536     # argument.
19537     path="$complete"
19538     arguments="EOL"
19539     new_path=`$CYGPATH -u "$path"`
19540     new_path=`$WHICH "$new_path" 2> /dev/null`
19541     # bat and cmd files are not always considered executable in cygwin causing which
19542     # to not find them
19543     if test "x$new_path" = x \
19544         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19545         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19546       new_path=`$CYGPATH -u "$path"`
19547     fi
19548     if test "x$new_path" = x; then
19549       # It's still not found. Now this is an unrecoverable error.
19550       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19551 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19552       has_space=`$ECHO "$complete" | $GREP " "`
19553       if test "x$has_space" != x; then
19554         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19555 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19556       fi
19557       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19558     fi
19559   fi
19560 
19561   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19562   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19563   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19564   # "foo.exe" is OK but "foo" is an error.
19565   #
19566   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19567   # It is also a way to make sure we got the proper file name for the real test later on.
19568   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19569   if test "x$test_shortpath" = x; then
19570     # Short path failed, file does not exist as specified.
19571     # Try adding .exe or .cmd
19572     if test -f "${new_path}.exe"; then
19573       input_to_shortpath="${new_path}.exe"
19574     elif test -f "${new_path}.cmd"; then
19575       input_to_shortpath="${new_path}.cmd"
19576     else
19577       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
19578 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
19579       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19580 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19581       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19582     fi
19583   else
19584     input_to_shortpath="$new_path"
19585   fi
19586 
19587   # Call helper function which possibly converts this using DOS-style short mode.
19588   # If so, the updated path is stored in $new_path.
19589   new_path="$input_to_shortpath"
19590 
19591   input_path="$input_to_shortpath"
19592   # Check if we need to convert this using DOS-style short mode. If the path
19593   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19594   # take no chances and rewrite it.
19595   # Note: m4 eats our [], so we need to use [ and ] instead.
19596   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19597   if test "x$has_forbidden_chars" != x; then
19598     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19599     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19600     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19601     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19602       # Going to short mode and back again did indeed matter. Since short mode is
19603       # case insensitive, let's make it lowercase to improve readability.
19604       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19605       # Now convert it back to Unix-stile (cygpath)
19606       input_path=`$CYGPATH -u "$shortmode_path"`
19607       new_path="$input_path"
19608     fi
19609   fi
19610 
19611   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19612   if test "x$test_cygdrive_prefix" = x; then
19613     # As a simple fix, exclude /usr/bin since it's not a real path.
19614     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19615       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19616       # a path prefixed by /cygdrive for fixpath to work.
19617       new_path="$CYGWIN_ROOT_PATH$input_path"
19618     fi
19619   fi
19620 
19621   # remove trailing .exe if any
19622   new_path="${new_path/%.exe/}"
19623 
19624   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19625 
19626   # First separate the path from the arguments. This will split at the first
19627   # space.
19628   complete="$CC"
19629   path="${complete%% *}"
19630   tmp="$complete EOL"
19631   arguments="${tmp#* }"
19632 
19633   # Input might be given as Windows format, start by converting to
19634   # unix format.
19635   new_path="$path"
19636 
19637   windows_path="$new_path"
19638   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19639     unix_path=`$CYGPATH -u "$windows_path"`
19640     new_path="$unix_path"
19641   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19642     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19643     new_path="$unix_path"
19644   fi
19645 
19646 
19647   # Now try to locate executable using which
19648   new_path=`$WHICH "$new_path" 2> /dev/null`
19649 
19650   if test "x$new_path" = x; then
19651     # Oops. Which didn't find the executable.
19652     # The splitting of arguments from the executable at a space might have been incorrect,
19653     # since paths with space are more likely in Windows. Give it another try with the whole
19654     # argument.
19655     path="$complete"
19656     arguments="EOL"
19657     new_path="$path"
19658 
19659   windows_path="$new_path"
19660   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19661     unix_path=`$CYGPATH -u "$windows_path"`
19662     new_path="$unix_path"
19663   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19664     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19665     new_path="$unix_path"
19666   fi
19667 
19668 
19669     new_path=`$WHICH "$new_path" 2> /dev/null`
19670 
19671     if test "x$new_path" = x; then
19672       # It's still not found. Now this is an unrecoverable error.
19673       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19674 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19675       has_space=`$ECHO "$complete" | $GREP " "`
19676       if test "x$has_space" != x; then
19677         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19678 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19679       fi
19680       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19681     fi
19682   fi
19683 
19684   # Now new_path has a complete unix path to the binary
19685   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19686     # Keep paths in /bin as-is, but remove trailing .exe if any
19687     new_path="${new_path/%.exe/}"
19688     # Do not save /bin paths to all_fixpath_prefixes!
19689   else
19690     # Not in mixed or Windows style, start by that.
19691     new_path=`cmd //c echo $new_path`
19692 
19693   input_path="$new_path"
19694   # Check if we need to convert this using DOS-style short mode. If the path
19695   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19696   # take no chances and rewrite it.
19697   # Note: m4 eats our [], so we need to use [ and ] instead.
19698   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19699   if test "x$has_forbidden_chars" != x; then
19700     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19701     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19702   fi
19703 
19704     # Output is in $new_path
19705 
19706   windows_path="$new_path"
19707   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19708     unix_path=`$CYGPATH -u "$windows_path"`
19709     new_path="$unix_path"
19710   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19711     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19712     new_path="$unix_path"
19713   fi
19714 
19715     # remove trailing .exe if any
19716     new_path="${new_path/%.exe/}"
19717 
19718     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19719     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19720   fi
19721 
19722   else
19723     # We're on a posix platform. Hooray! :)
19724     # First separate the path from the arguments. This will split at the first
19725     # space.
19726     complete="$CC"
19727     path="${complete%% *}"
19728     tmp="$complete EOL"
19729     arguments="${tmp#* }"
19730 
19731     # Cannot rely on the command "which" here since it doesn't always work.
19732     is_absolute_path=`$ECHO "$path" | $GREP ^/`
19733     if test -z "$is_absolute_path"; then
19734       # Path to executable is not absolute. Find it.
19735       IFS_save="$IFS"
19736       IFS=:
19737       for p in $PATH; do
19738         if test -f "$p/$path" && test -x "$p/$path"; then
19739           new_path="$p/$path"
19740           break
19741         fi
19742       done
19743       IFS="$IFS_save"
19744     else
19745       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
19746 $as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
19747       new_path="$path"
19748     fi
19749 
19750     if test "x$new_path" = x; then
19751       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19752 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19753       has_space=`$ECHO "$complete" | $GREP " "`
19754       if test "x$has_space" != x; then
19755         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19756 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19757       fi
19758       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19759     fi
19760   fi
19761 
19762   # Now join together the path and the arguments once again
19763   if test "x$arguments" != xEOL; then
19764     new_complete="$new_path ${arguments% *}"
19765   else
19766     new_complete="$new_path"
19767   fi
19768 
19769   if test "x$complete" != "x$new_complete"; then
19770     CC="$new_complete"
19771     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19772 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19773   fi
19774 
19775   TEST_COMPILER="$CC"
19776   # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
19777   # to 'xlc' but it is crucial that we invoke the compiler with the right name!
19778   if test "x$OPENJDK_BUILD_OS" != xaix; then
19779     { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19780 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
19781 
19782   if test "x$OPENJDK_BUILD_OS" != xwindows; then
19783     # Follow a chain of symbolic links. Use readlink
19784     # where it exists, else fall back to horribly
19785     # complicated shell code.
19786     if test "x$READLINK_TESTED" != yes; then
19787       # On MacOSX there is a readlink tool with a different
19788       # purpose than the GNU readlink tool. Check the found readlink.
19789       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19790       if test "x$ISGNU" = x; then
19791         # A readlink that we do not know how to use.
19792         # Are there other non-GNU readlinks out there?
19793         READLINK_TESTED=yes
19794         READLINK=
19795       fi
19796     fi
19797 
19798     if test "x$READLINK" != x; then
19799       TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19800     else
19801       # Save the current directory for restoring afterwards
19802       STARTDIR=$PWD
19803       COUNTER=0
19804       sym_link_dir=`$DIRNAME $TEST_COMPILER`
19805       sym_link_file=`$BASENAME $TEST_COMPILER`
19806       cd $sym_link_dir
19807       # Use -P flag to resolve symlinks in directories.
19808       cd `$THEPWDCMD -P`
19809       sym_link_dir=`$THEPWDCMD -P`
19810       # Resolve file symlinks
19811       while test $COUNTER -lt 20; do
19812         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19813         if test "x$ISLINK" == x; then
19814           # This is not a symbolic link! We are done!
19815           break
19816         fi
19817         # Again resolve directory symlinks since the target of the just found
19818         # link could be in a different directory
19819         cd `$DIRNAME $ISLINK`
19820         sym_link_dir=`$THEPWDCMD -P`
19821         sym_link_file=`$BASENAME $ISLINK`
19822         let COUNTER=COUNTER+1
19823       done
19824       cd $STARTDIR
19825       TEST_COMPILER=$sym_link_dir/$sym_link_file
19826     fi
19827   fi
19828 
19829     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19830 $as_echo "$TEST_COMPILER" >&6; }
19831   fi
19832   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19833 $as_echo_n "checking if CC is disguised ccache... " >&6; }
19834 
19835   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19836   if test "x$COMPILER_BASENAME" = "xccache"; then
19837     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19838 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19839     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19840     # We want to control ccache invocation ourselves, so ignore this cc and try
19841     # searching again.
19842 
19843     # Remove the path to the fake ccache cc from the PATH
19844     RETRY_COMPILER_SAVED_PATH="$PATH"
19845     COMPILER_DIRNAME=`$DIRNAME $CC`
19846     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19847 
19848     # Try again looking for our compiler
19849     if test -n "$ac_tool_prefix"; then
19850   for ac_prog in $COMPILER_CHECK_LIST
19851   do
19852     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19853 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19855 $as_echo_n "checking for $ac_word... " >&6; }
19856 if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
19857   $as_echo_n "(cached) " >&6
19858 else
19859   if test -n "$PROPER_COMPILER_CC"; then
19860   ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19861 else
19862 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19863 for as_dir in $PATH
19864 do
19865   IFS=$as_save_IFS
19866   test -z "$as_dir" && as_dir=.
19867     for ac_exec_ext in '' $ac_executable_extensions; do
19868   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19869     ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19870     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19871     break 2
19872   fi
19873 done
19874   done
19875 IFS=$as_save_IFS
19876 
19877 fi
19878 fi
19879 PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19880 if test -n "$PROPER_COMPILER_CC"; then
19881   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19882 $as_echo "$PROPER_COMPILER_CC" >&6; }
19883 else
19884   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19885 $as_echo "no" >&6; }
19886 fi
19887 
19888 
19889     test -n "$PROPER_COMPILER_CC" && break
19890   done
19891 fi
19892 if test -z "$PROPER_COMPILER_CC"; then
19893   ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19894   for ac_prog in $COMPILER_CHECK_LIST
19895 do
19896   # Extract the first word of "$ac_prog", so it can be a program name with args.
19897 set dummy $ac_prog; ac_word=$2
19898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19899 $as_echo_n "checking for $ac_word... " >&6; }
19900 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
19901   $as_echo_n "(cached) " >&6
19902 else
19903   if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19904   ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19905 else
19906 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19907 for as_dir in $PATH
19908 do
19909   IFS=$as_save_IFS
19910   test -z "$as_dir" && as_dir=.
19911     for ac_exec_ext in '' $ac_executable_extensions; do
19912   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19913     ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19914     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19915     break 2
19916   fi
19917 done
19918   done
19919 IFS=$as_save_IFS
19920 
19921 fi
19922 fi
19923 ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19924 if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19925   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19926 $as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19927 else
19928   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19929 $as_echo "no" >&6; }
19930 fi
19931 
19932 
19933   test -n "$ac_ct_PROPER_COMPILER_CC" && break
19934 done
19935 
19936   if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19937     PROPER_COMPILER_CC=""
19938   else
19939     case $cross_compiling:$ac_tool_warned in
19940 yes:)
19941 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19942 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19943 ac_tool_warned=yes ;;
19944 esac
19945     PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19946   fi
19947 fi
19948 
19949 
19950   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19951 
19952   # First separate the path from the arguments. This will split at the first
19953   # space.
19954   complete="$PROPER_COMPILER_CC"
19955   path="${complete%% *}"
19956   tmp="$complete EOL"
19957   arguments="${tmp#* }"
19958 
19959   # Input might be given as Windows format, start by converting to
19960   # unix format.
19961   new_path=`$CYGPATH -u "$path"`
19962 
19963   # Now try to locate executable using which
19964   new_path=`$WHICH "$new_path" 2> /dev/null`
19965   # bat and cmd files are not always considered executable in cygwin causing which
19966   # to not find them
19967   if test "x$new_path" = x \
19968       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19969       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19970     new_path=`$CYGPATH -u "$path"`
19971   fi
19972   if test "x$new_path" = x; then
19973     # Oops. Which didn't find the executable.
19974     # The splitting of arguments from the executable at a space might have been incorrect,
19975     # since paths with space are more likely in Windows. Give it another try with the whole
19976     # argument.
19977     path="$complete"
19978     arguments="EOL"
19979     new_path=`$CYGPATH -u "$path"`
19980     new_path=`$WHICH "$new_path" 2> /dev/null`
19981     # bat and cmd files are not always considered executable in cygwin causing which
19982     # to not find them
19983     if test "x$new_path" = x \
19984         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19985         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19986       new_path=`$CYGPATH -u "$path"`
19987     fi
19988     if test "x$new_path" = x; then
19989       # It's still not found. Now this is an unrecoverable error.
19990       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19991 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19992       has_space=`$ECHO "$complete" | $GREP " "`
19993       if test "x$has_space" != x; then
19994         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19995 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19996       fi
19997       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19998     fi
19999   fi
20000 
20001   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20002   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20003   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20004   # "foo.exe" is OK but "foo" is an error.
20005   #
20006   # This test is therefore slightly more accurate than "test -f" to check for file presence.
20007   # It is also a way to make sure we got the proper file name for the real test later on.
20008   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20009   if test "x$test_shortpath" = x; then
20010     # Short path failed, file does not exist as specified.
20011     # Try adding .exe or .cmd
20012     if test -f "${new_path}.exe"; then
20013       input_to_shortpath="${new_path}.exe"
20014     elif test -f "${new_path}.cmd"; then
20015       input_to_shortpath="${new_path}.cmd"
20016     else
20017       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
20018 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
20019       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20020 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20021       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
20022     fi
20023   else
20024     input_to_shortpath="$new_path"
20025   fi
20026 
20027   # Call helper function which possibly converts this using DOS-style short mode.
20028   # If so, the updated path is stored in $new_path.
20029   new_path="$input_to_shortpath"
20030 
20031   input_path="$input_to_shortpath"
20032   # Check if we need to convert this using DOS-style short mode. If the path
20033   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20034   # take no chances and rewrite it.
20035   # Note: m4 eats our [], so we need to use [ and ] instead.
20036   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20037   if test "x$has_forbidden_chars" != x; then
20038     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20039     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20040     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20041     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20042       # Going to short mode and back again did indeed matter. Since short mode is
20043       # case insensitive, let's make it lowercase to improve readability.
20044       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20045       # Now convert it back to Unix-stile (cygpath)
20046       input_path=`$CYGPATH -u "$shortmode_path"`
20047       new_path="$input_path"
20048     fi
20049   fi
20050 
20051   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20052   if test "x$test_cygdrive_prefix" = x; then
20053     # As a simple fix, exclude /usr/bin since it's not a real path.
20054     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20055       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20056       # a path prefixed by /cygdrive for fixpath to work.
20057       new_path="$CYGWIN_ROOT_PATH$input_path"
20058     fi
20059   fi
20060 
20061   # remove trailing .exe if any
20062   new_path="${new_path/%.exe/}"
20063 
20064   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20065 
20066   # First separate the path from the arguments. This will split at the first
20067   # space.
20068   complete="$PROPER_COMPILER_CC"
20069   path="${complete%% *}"
20070   tmp="$complete EOL"
20071   arguments="${tmp#* }"
20072 
20073   # Input might be given as Windows format, start by converting to
20074   # unix format.
20075   new_path="$path"
20076 
20077   windows_path="$new_path"
20078   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20079     unix_path=`$CYGPATH -u "$windows_path"`
20080     new_path="$unix_path"
20081   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20082     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20083     new_path="$unix_path"
20084   fi
20085 
20086 
20087   # Now try to locate executable using which
20088   new_path=`$WHICH "$new_path" 2> /dev/null`
20089 
20090   if test "x$new_path" = x; then
20091     # Oops. Which didn't find the executable.
20092     # The splitting of arguments from the executable at a space might have been incorrect,
20093     # since paths with space are more likely in Windows. Give it another try with the whole
20094     # argument.
20095     path="$complete"
20096     arguments="EOL"
20097     new_path="$path"
20098 
20099   windows_path="$new_path"
20100   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20101     unix_path=`$CYGPATH -u "$windows_path"`
20102     new_path="$unix_path"
20103   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20104     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20105     new_path="$unix_path"
20106   fi
20107 
20108 
20109     new_path=`$WHICH "$new_path" 2> /dev/null`
20110 
20111     if test "x$new_path" = x; then
20112       # It's still not found. Now this is an unrecoverable error.
20113       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
20114 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
20115       has_space=`$ECHO "$complete" | $GREP " "`
20116       if test "x$has_space" != x; then
20117         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20118 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20119       fi
20120       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
20121     fi
20122   fi
20123 
20124   # Now new_path has a complete unix path to the binary
20125   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20126     # Keep paths in /bin as-is, but remove trailing .exe if any
20127     new_path="${new_path/%.exe/}"
20128     # Do not save /bin paths to all_fixpath_prefixes!
20129   else
20130     # Not in mixed or Windows style, start by that.
20131     new_path=`cmd //c echo $new_path`
20132 
20133   input_path="$new_path"
20134   # Check if we need to convert this using DOS-style short mode. If the path
20135   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20136   # take no chances and rewrite it.
20137   # Note: m4 eats our [], so we need to use [ and ] instead.
20138   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20139   if test "x$has_forbidden_chars" != x; then
20140     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20141     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20142   fi
20143 
20144     # Output is in $new_path
20145 
20146   windows_path="$new_path"
20147   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20148     unix_path=`$CYGPATH -u "$windows_path"`
20149     new_path="$unix_path"
20150   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20151     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20152     new_path="$unix_path"
20153   fi
20154 
20155     # remove trailing .exe if any
20156     new_path="${new_path/%.exe/}"
20157 
20158     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20159     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20160   fi
20161 
20162   else
20163     # We're on a posix platform. Hooray! :)
20164     # First separate the path from the arguments. This will split at the first
20165     # space.
20166     complete="$PROPER_COMPILER_CC"
20167     path="${complete%% *}"
20168     tmp="$complete EOL"
20169     arguments="${tmp#* }"
20170 
20171     # Cannot rely on the command "which" here since it doesn't always work.
20172     is_absolute_path=`$ECHO "$path" | $GREP ^/`
20173     if test -z "$is_absolute_path"; then
20174       # Path to executable is not absolute. Find it.
20175       IFS_save="$IFS"
20176       IFS=:
20177       for p in $PATH; do
20178         if test -f "$p/$path" && test -x "$p/$path"; then
20179           new_path="$p/$path"
20180           break
20181         fi
20182       done
20183       IFS="$IFS_save"
20184     else
20185       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
20186 $as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
20187       new_path="$path"
20188     fi
20189 
20190     if test "x$new_path" = x; then
20191       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
20192 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
20193       has_space=`$ECHO "$complete" | $GREP " "`
20194       if test "x$has_space" != x; then
20195         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20196 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20197       fi
20198       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
20199     fi
20200   fi
20201 
20202   # Now join together the path and the arguments once again
20203   if test "x$arguments" != xEOL; then
20204     new_complete="$new_path ${arguments% *}"
20205   else
20206     new_complete="$new_path"
20207   fi
20208 
20209   if test "x$complete" != "x$new_complete"; then
20210     PROPER_COMPILER_CC="$new_complete"
20211     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
20212 $as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
20213   fi
20214 
20215     PATH="$RETRY_COMPILER_SAVED_PATH"
20216 
20217     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
20218 $as_echo_n "checking for resolved symbolic links for CC... " >&6; }
20219 
20220   if test "x$OPENJDK_BUILD_OS" != xwindows; then
20221     # Follow a chain of symbolic links. Use readlink
20222     # where it exists, else fall back to horribly
20223     # complicated shell code.
20224     if test "x$READLINK_TESTED" != yes; then
20225       # On MacOSX there is a readlink tool with a different
20226       # purpose than the GNU readlink tool. Check the found readlink.
20227       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20228       if test "x$ISGNU" = x; then
20229         # A readlink that we do not know how to use.
20230         # Are there other non-GNU readlinks out there?
20231         READLINK_TESTED=yes
20232         READLINK=
20233       fi
20234     fi
20235 
20236     if test "x$READLINK" != x; then
20237       PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
20238     else
20239       # Save the current directory for restoring afterwards
20240       STARTDIR=$PWD
20241       COUNTER=0
20242       sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
20243       sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
20244       cd $sym_link_dir
20245       # Use -P flag to resolve symlinks in directories.
20246       cd `$THEPWDCMD -P`
20247       sym_link_dir=`$THEPWDCMD -P`
20248       # Resolve file symlinks
20249       while test $COUNTER -lt 20; do
20250         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20251         if test "x$ISLINK" == x; then
20252           # This is not a symbolic link! We are done!
20253           break
20254         fi
20255         # Again resolve directory symlinks since the target of the just found
20256         # link could be in a different directory
20257         cd `$DIRNAME $ISLINK`
20258         sym_link_dir=`$THEPWDCMD -P`
20259         sym_link_file=`$BASENAME $ISLINK`
20260         let COUNTER=COUNTER+1
20261       done
20262       cd $STARTDIR
20263       PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
20264     fi
20265   fi
20266 
20267     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
20268 $as_echo "$PROPER_COMPILER_CC" >&6; }
20269     CC="$PROPER_COMPILER_CC"
20270   else
20271     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
20272 $as_echo "no, keeping CC" >&6; }
20273     CC="$TEST_COMPILER"
20274   fi
20275 
20276   COMPILER=$CC
20277   COMPILER_NAME=$COMPILER_NAME
20278 
20279   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
20280     # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
20281     COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
20282     $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
20283     if test $? -ne 0; then
20284       GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20285 
20286       { $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
20287 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
20288       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
20289 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
20290       as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20291     else
20292       COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
20293       COMPILER_VENDOR="Sun Studio"
20294     fi
20295   elif test  "x$OPENJDK_TARGET_OS" = xaix; then
20296       COMPILER_VERSION_TEST=`$COMPILER -qversion  2>&1 | $TAIL -n 1`
20297       $ECHO $COMPILER_VERSION_TEST | $GREP "^Version: " > /dev/null
20298       if test $? -ne 0; then
20299         as_fn_error $? "Failed to detect the compiler version of $COMPILER ...." "$LINENO" 5
20300       else
20301         COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n 's/Version: \(0-90-9\.0-90-9*\).*/\1/p'`
20302         COMPILER_VENDOR='IBM'
20303       fi
20304   elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
20305     # First line typically looks something like:
20306     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
20307     COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
20308     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
20309     COMPILER_VENDOR="Microsoft CL.EXE"
20310     COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
20311     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
20312       if test "x$COMPILER_CPU_TEST" != "x80x86"; then
20313         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
20314       fi
20315     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
20316       if test "x$COMPILER_CPU_TEST" != "xx64"; then
20317         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
20318       fi
20319     fi
20320   else
20321     COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20322     # Check that this is likely to be GCC.
20323     $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
20324     if test $? -ne 0; then
20325       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
20326 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
20327       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
20328 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
20329       as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20330     fi
20331 
20332     # First line typically looks something like:
20333     # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20334     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20335     COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20336   fi
20337   # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20338   CC_VERSION="$COMPILER_VERSION"
20339   # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20340   CC_VENDOR="$COMPILER_VENDOR"
20341 
20342   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20343 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20344 
20345 
20346   # Now that we have resolved CC ourself, let autoconf have its go at it
20347   ac_ext=c
20348 ac_cpp='$CPP $CPPFLAGS'
20349 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20350 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20351 ac_compiler_gnu=$ac_cv_c_compiler_gnu
20352 if test -n "$ac_tool_prefix"; then
20353   for ac_prog in $CC
20354   do
20355     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20356 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20358 $as_echo_n "checking for $ac_word... " >&6; }
20359 if ${ac_cv_prog_CC+:} false; then :
20360   $as_echo_n "(cached) " >&6
20361 else
20362   if test -n "$CC"; then
20363   ac_cv_prog_CC="$CC" # Let the user override the test.
20364 else
20365 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20366 for as_dir in $PATH
20367 do
20368   IFS=$as_save_IFS
20369   test -z "$as_dir" && as_dir=.
20370     for ac_exec_ext in '' $ac_executable_extensions; do
20371   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20372     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
20373     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20374     break 2
20375   fi
20376 done
20377   done
20378 IFS=$as_save_IFS
20379 
20380 fi
20381 fi
20382 CC=$ac_cv_prog_CC
20383 if test -n "$CC"; then
20384   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
20385 $as_echo "$CC" >&6; }
20386 else
20387   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20388 $as_echo "no" >&6; }
20389 fi
20390 
20391 
20392     test -n "$CC" && break
20393   done
20394 fi
20395 if test -z "$CC"; then
20396   ac_ct_CC=$CC
20397   for ac_prog in $CC
20398 do
20399   # Extract the first word of "$ac_prog", so it can be a program name with args.
20400 set dummy $ac_prog; ac_word=$2
20401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20402 $as_echo_n "checking for $ac_word... " >&6; }
20403 if ${ac_cv_prog_ac_ct_CC+:} false; then :
20404   $as_echo_n "(cached) " >&6
20405 else
20406   if test -n "$ac_ct_CC"; then
20407   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
20408 else
20409 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20410 for as_dir in $PATH
20411 do
20412   IFS=$as_save_IFS
20413   test -z "$as_dir" && as_dir=.
20414     for ac_exec_ext in '' $ac_executable_extensions; do
20415   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20416     ac_cv_prog_ac_ct_CC="$ac_prog"
20417     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20418     break 2
20419   fi
20420 done
20421   done
20422 IFS=$as_save_IFS
20423 
20424 fi
20425 fi
20426 ac_ct_CC=$ac_cv_prog_ac_ct_CC
20427 if test -n "$ac_ct_CC"; then
20428   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
20429 $as_echo "$ac_ct_CC" >&6; }
20430 else
20431   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20432 $as_echo "no" >&6; }
20433 fi
20434 
20435 
20436   test -n "$ac_ct_CC" && break
20437 done
20438 
20439   if test "x$ac_ct_CC" = x; then
20440     CC=""
20441   else
20442     case $cross_compiling:$ac_tool_warned in
20443 yes:)
20444 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20445 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20446 ac_tool_warned=yes ;;
20447 esac
20448     CC=$ac_ct_CC
20449   fi
20450 fi
20451 
20452 
20453 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20454 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20455 as_fn_error $? "no acceptable C compiler found in \$PATH
20456 See \`config.log' for more details" "$LINENO" 5; }
20457 
20458 # Provide some information about the compiler.
20459 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
20460 set X $ac_compile
20461 ac_compiler=$2
20462 for ac_option in --version -v -V -qversion; do
20463   { { ac_try="$ac_compiler $ac_option >&5"
20464 case "(($ac_try" in
20465   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20466   *) ac_try_echo=$ac_try;;
20467 esac
20468 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20469 $as_echo "$ac_try_echo"; } >&5
20470   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20471   ac_status=$?
20472   if test -s conftest.err; then
20473     sed '10a\
20474 ... rest of stderr output deleted ...
20475          10q' conftest.err >conftest.er1
20476     cat conftest.er1 >&5
20477   fi
20478   rm -f conftest.er1 conftest.err
20479   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20480   test $ac_status = 0; }
20481 done
20482 
20483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20484 /* end confdefs.h.  */
20485 
20486 int
20487 main ()
20488 {
20489 
20490   ;
20491   return 0;
20492 }
20493 _ACEOF
20494 ac_clean_files_save=$ac_clean_files
20495 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
20496 # Try to create an executable without -o first, disregard a.out.
20497 # It will help us diagnose broken compilers, and finding out an intuition
20498 # of exeext.
20499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
20500 $as_echo_n "checking whether the C compiler works... " >&6; }
20501 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
20502 
20503 # The possible output files:
20504 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
20505 
20506 ac_rmfiles=
20507 for ac_file in $ac_files
20508 do
20509   case $ac_file in
20510     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20511     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
20512   esac
20513 done
20514 rm -f $ac_rmfiles
20515 
20516 if { { ac_try="$ac_link_default"
20517 case "(($ac_try" in
20518   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20519   *) ac_try_echo=$ac_try;;
20520 esac
20521 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20522 $as_echo "$ac_try_echo"; } >&5
20523   (eval "$ac_link_default") 2>&5
20524   ac_status=$?
20525   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20526   test $ac_status = 0; }; then :
20527   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
20528 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
20529 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
20530 # so that the user can short-circuit this test for compilers unknown to
20531 # Autoconf.
20532 for ac_file in $ac_files ''
20533 do
20534   test -f "$ac_file" || continue
20535   case $ac_file in
20536     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
20537         ;;
20538     [ab].out )
20539         # We found the default executable, but exeext='' is most
20540         # certainly right.
20541         break;;
20542     *.* )
20543         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
20544         then :; else
20545            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20546         fi
20547         # We set ac_cv_exeext here because the later test for it is not
20548         # safe: cross compilers may not add the suffix if given an `-o'
20549         # argument, so we may need to know it at that point already.
20550         # Even if this section looks crufty: it has the advantage of
20551         # actually working.
20552         break;;
20553     * )
20554         break;;
20555   esac
20556 done
20557 test "$ac_cv_exeext" = no && ac_cv_exeext=
20558 
20559 else
20560   ac_file=''
20561 fi
20562 if test -z "$ac_file"; then :
20563   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20564 $as_echo "no" >&6; }
20565 $as_echo "$as_me: failed program was:" >&5
20566 sed 's/^/| /' conftest.$ac_ext >&5
20567 
20568 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20569 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20570 as_fn_error 77 "C compiler cannot create executables
20571 See \`config.log' for more details" "$LINENO" 5; }
20572 else
20573   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20574 $as_echo "yes" >&6; }
20575 fi
20576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
20577 $as_echo_n "checking for C compiler default output file name... " >&6; }
20578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
20579 $as_echo "$ac_file" >&6; }
20580 ac_exeext=$ac_cv_exeext
20581 
20582 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
20583 ac_clean_files=$ac_clean_files_save
20584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
20585 $as_echo_n "checking for suffix of executables... " >&6; }
20586 if { { ac_try="$ac_link"
20587 case "(($ac_try" in
20588   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20589   *) ac_try_echo=$ac_try;;
20590 esac
20591 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20592 $as_echo "$ac_try_echo"; } >&5
20593   (eval "$ac_link") 2>&5
20594   ac_status=$?
20595   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20596   test $ac_status = 0; }; then :
20597   # If both `conftest.exe' and `conftest' are `present' (well, observable)
20598 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
20599 # work properly (i.e., refer to `conftest.exe'), while it won't with
20600 # `rm'.
20601 for ac_file in conftest.exe conftest conftest.*; do
20602   test -f "$ac_file" || continue
20603   case $ac_file in
20604     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20605     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20606           break;;
20607     * ) break;;
20608   esac
20609 done
20610 else
20611   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20612 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20613 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
20614 See \`config.log' for more details" "$LINENO" 5; }
20615 fi
20616 rm -f conftest conftest$ac_cv_exeext
20617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
20618 $as_echo "$ac_cv_exeext" >&6; }
20619 
20620 rm -f conftest.$ac_ext
20621 EXEEXT=$ac_cv_exeext
20622 ac_exeext=$EXEEXT
20623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20624 /* end confdefs.h.  */
20625 #include <stdio.h>
20626 int
20627 main ()
20628 {
20629 FILE *f = fopen ("conftest.out", "w");
20630  return ferror (f) || fclose (f) != 0;
20631 
20632   ;
20633   return 0;
20634 }
20635 _ACEOF
20636 ac_clean_files="$ac_clean_files conftest.out"
20637 # Check that the compiler produces executables we can run.  If not, either
20638 # the compiler is broken, or we cross compile.
20639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
20640 $as_echo_n "checking whether we are cross compiling... " >&6; }
20641 if test "$cross_compiling" != yes; then
20642   { { ac_try="$ac_link"
20643 case "(($ac_try" in
20644   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20645   *) ac_try_echo=$ac_try;;
20646 esac
20647 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20648 $as_echo "$ac_try_echo"; } >&5
20649   (eval "$ac_link") 2>&5
20650   ac_status=$?
20651   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20652   test $ac_status = 0; }
20653   if { ac_try='./conftest$ac_cv_exeext'
20654   { { case "(($ac_try" in
20655   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20656   *) ac_try_echo=$ac_try;;
20657 esac
20658 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20659 $as_echo "$ac_try_echo"; } >&5
20660   (eval "$ac_try") 2>&5
20661   ac_status=$?
20662   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20663   test $ac_status = 0; }; }; then
20664     cross_compiling=no
20665   else
20666     if test "$cross_compiling" = maybe; then
20667         cross_compiling=yes
20668     else
20669         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20670 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20671 as_fn_error $? "cannot run C compiled programs.
20672 If you meant to cross compile, use \`--host'.
20673 See \`config.log' for more details" "$LINENO" 5; }
20674     fi
20675   fi
20676 fi
20677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
20678 $as_echo "$cross_compiling" >&6; }
20679 
20680 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
20681 ac_clean_files=$ac_clean_files_save
20682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
20683 $as_echo_n "checking for suffix of object files... " >&6; }
20684 if ${ac_cv_objext+:} false; then :
20685   $as_echo_n "(cached) " >&6
20686 else
20687   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20688 /* end confdefs.h.  */
20689 
20690 int
20691 main ()
20692 {
20693 
20694   ;
20695   return 0;
20696 }
20697 _ACEOF
20698 rm -f conftest.o conftest.obj
20699 if { { ac_try="$ac_compile"
20700 case "(($ac_try" in
20701   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20702   *) ac_try_echo=$ac_try;;
20703 esac
20704 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20705 $as_echo "$ac_try_echo"; } >&5
20706   (eval "$ac_compile") 2>&5
20707   ac_status=$?
20708   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20709   test $ac_status = 0; }; then :
20710   for ac_file in conftest.o conftest.obj conftest.*; do
20711   test -f "$ac_file" || continue;
20712   case $ac_file in
20713     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
20714     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
20715        break;;
20716   esac
20717 done
20718 else
20719   $as_echo "$as_me: failed program was:" >&5
20720 sed 's/^/| /' conftest.$ac_ext >&5
20721 
20722 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20723 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20724 as_fn_error $? "cannot compute suffix of object files: cannot compile
20725 See \`config.log' for more details" "$LINENO" 5; }
20726 fi
20727 rm -f conftest.$ac_cv_objext conftest.$ac_ext
20728 fi
20729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
20730 $as_echo "$ac_cv_objext" >&6; }
20731 OBJEXT=$ac_cv_objext
20732 ac_objext=$OBJEXT
20733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
20734 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
20735 if ${ac_cv_c_compiler_gnu+:} false; then :
20736   $as_echo_n "(cached) " >&6
20737 else
20738   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20739 /* end confdefs.h.  */
20740 
20741 int
20742 main ()
20743 {
20744 #ifndef __GNUC__
20745        choke me
20746 #endif
20747 
20748   ;
20749   return 0;
20750 }
20751 _ACEOF
20752 if ac_fn_c_try_compile "$LINENO"; then :
20753   ac_compiler_gnu=yes
20754 else
20755   ac_compiler_gnu=no
20756 fi
20757 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20758 ac_cv_c_compiler_gnu=$ac_compiler_gnu
20759 
20760 fi
20761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20762 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
20763 if test $ac_compiler_gnu = yes; then
20764   GCC=yes
20765 else
20766   GCC=
20767 fi
20768 ac_test_CFLAGS=${CFLAGS+set}
20769 ac_save_CFLAGS=$CFLAGS
20770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20771 $as_echo_n "checking whether $CC accepts -g... " >&6; }
20772 if ${ac_cv_prog_cc_g+:} false; then :
20773   $as_echo_n "(cached) " >&6
20774 else
20775   ac_save_c_werror_flag=$ac_c_werror_flag
20776    ac_c_werror_flag=yes
20777    ac_cv_prog_cc_g=no
20778    CFLAGS="-g"
20779    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20780 /* end confdefs.h.  */
20781 
20782 int
20783 main ()
20784 {
20785 
20786   ;
20787   return 0;
20788 }
20789 _ACEOF
20790 if ac_fn_c_try_compile "$LINENO"; then :
20791   ac_cv_prog_cc_g=yes
20792 else
20793   CFLAGS=""
20794       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20795 /* end confdefs.h.  */
20796 
20797 int
20798 main ()
20799 {
20800 
20801   ;
20802   return 0;
20803 }
20804 _ACEOF
20805 if ac_fn_c_try_compile "$LINENO"; then :
20806 
20807 else
20808   ac_c_werror_flag=$ac_save_c_werror_flag
20809          CFLAGS="-g"
20810          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20811 /* end confdefs.h.  */
20812 
20813 int
20814 main ()
20815 {
20816 
20817   ;
20818   return 0;
20819 }
20820 _ACEOF
20821 if ac_fn_c_try_compile "$LINENO"; then :
20822   ac_cv_prog_cc_g=yes
20823 fi
20824 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20825 fi
20826 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20827 fi
20828 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20829    ac_c_werror_flag=$ac_save_c_werror_flag
20830 fi
20831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20832 $as_echo "$ac_cv_prog_cc_g" >&6; }
20833 if test "$ac_test_CFLAGS" = set; then
20834   CFLAGS=$ac_save_CFLAGS
20835 elif test $ac_cv_prog_cc_g = yes; then
20836   if test "$GCC" = yes; then
20837     CFLAGS="-g -O2"
20838   else
20839     CFLAGS="-g"
20840   fi
20841 else
20842   if test "$GCC" = yes; then
20843     CFLAGS="-O2"
20844   else
20845     CFLAGS=
20846   fi
20847 fi
20848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20849 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20850 if ${ac_cv_prog_cc_c89+:} false; then :
20851   $as_echo_n "(cached) " >&6
20852 else
20853   ac_cv_prog_cc_c89=no
20854 ac_save_CC=$CC
20855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20856 /* end confdefs.h.  */
20857 #include <stdarg.h>
20858 #include <stdio.h>
20859 struct stat;
20860 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20861 struct buf { int x; };
20862 FILE * (*rcsopen) (struct buf *, struct stat *, int);
20863 static char *e (p, i)
20864      char **p;
20865      int i;
20866 {
20867   return p[i];
20868 }
20869 static char *f (char * (*g) (char **, int), char **p, ...)
20870 {
20871   char *s;
20872   va_list v;
20873   va_start (v,p);
20874   s = g (p, va_arg (v,int));
20875   va_end (v);
20876   return s;
20877 }
20878 
20879 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20880    function prototypes and stuff, but not '\xHH' hex character constants.
20881    These don't provoke an error unfortunately, instead are silently treated
20882    as 'x'.  The following induces an error, until -std is added to get
20883    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20884    array size at least.  It's necessary to write '\x00'==0 to get something
20885    that's true only with -std.  */
20886 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20887 
20888 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20889    inside strings and character constants.  */
20890 #define FOO(x) 'x'
20891 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20892 
20893 int test (int i, double x);
20894 struct s1 {int (*f) (int a);};
20895 struct s2 {int (*f) (double a);};
20896 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20897 int argc;
20898 char **argv;
20899 int
20900 main ()
20901 {
20902 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20903   ;
20904   return 0;
20905 }
20906 _ACEOF
20907 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20908         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20909 do
20910   CC="$ac_save_CC $ac_arg"
20911   if ac_fn_c_try_compile "$LINENO"; then :
20912   ac_cv_prog_cc_c89=$ac_arg
20913 fi
20914 rm -f core conftest.err conftest.$ac_objext
20915   test "x$ac_cv_prog_cc_c89" != "xno" && break
20916 done
20917 rm -f conftest.$ac_ext
20918 CC=$ac_save_CC
20919 
20920 fi
20921 # AC_CACHE_VAL
20922 case "x$ac_cv_prog_cc_c89" in
20923   x)
20924     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20925 $as_echo "none needed" >&6; } ;;
20926   xno)
20927     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20928 $as_echo "unsupported" >&6; } ;;
20929   *)
20930     CC="$CC $ac_cv_prog_cc_c89"
20931     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20932 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20933 esac
20934 if test "x$ac_cv_prog_cc_c89" != xno; then :
20935 
20936 fi
20937 
20938 ac_ext=cpp
20939 ac_cpp='$CXXCPP $CPPFLAGS'
20940 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20941 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20942 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20943 
20944 
20945   # Option used to tell the compiler whether to create 32- or 64-bit executables
20946   # Notice that CC contains the full compiler path at this point.
20947   case $CC in
20948     *xlc_r) COMPILER_TARGET_BITS_FLAG="-q";;
20949     *)      COMPILER_TARGET_BITS_FLAG="-m";;
20950   esac
20951 
20952 
20953   ### Locate C++ compiler (CXX)
20954 
20955   if test "x$CXX" != x; then
20956     COMPILER_CHECK_LIST="$CXX"
20957   elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20958     COMPILER_CHECK_LIST="cl"
20959   elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20960     COMPILER_CHECK_LIST="CC g++"
20961   elif test "x$OPENJDK_TARGET_OS" = "xaix"; then
20962     # Do not probe for CC on AIX .
20963     COMPILER_CHECK_LIST="xlC_r"
20964   else
20965     COMPILER_CHECK_LIST="g++ CC"
20966   fi
20967 
20968 
20969   COMPILER_NAME=C++
20970 
20971   CXX=
20972   # If TOOLS_DIR is set, check for all compiler names in there first
20973   # before checking the rest of the PATH.
20974   if test -n "$TOOLS_DIR"; then
20975     PATH_save="$PATH"
20976     PATH="$TOOLS_DIR"
20977     for ac_prog in $COMPILER_CHECK_LIST
20978 do
20979   # Extract the first word of "$ac_prog", so it can be a program name with args.
20980 set dummy $ac_prog; ac_word=$2
20981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20982 $as_echo_n "checking for $ac_word... " >&6; }
20983 if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
20984   $as_echo_n "(cached) " >&6
20985 else
20986   case $TOOLS_DIR_CXX in
20987   [\\/]* | ?:[\\/]*)
20988   ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20989   ;;
20990   *)
20991   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20992 for as_dir in $PATH
20993 do
20994   IFS=$as_save_IFS
20995   test -z "$as_dir" && as_dir=.
20996     for ac_exec_ext in '' $ac_executable_extensions; do
20997   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20998     ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20999     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21000     break 2
21001   fi
21002 done
21003   done
21004 IFS=$as_save_IFS
21005 
21006   ;;
21007 esac
21008 fi
21009 TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
21010 if test -n "$TOOLS_DIR_CXX"; then
21011   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
21012 $as_echo "$TOOLS_DIR_CXX" >&6; }
21013 else
21014   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21015 $as_echo "no" >&6; }
21016 fi
21017 
21018 
21019   test -n "$TOOLS_DIR_CXX" && break
21020 done
21021 
21022     CXX=$TOOLS_DIR_CXX
21023     PATH="$PATH_save"
21024   fi
21025 
21026   # AC_PATH_PROGS can't be run multiple times with the same variable,
21027   # so create a new name for this run.
21028   if test "x$CXX" = x; then
21029     for ac_prog in $COMPILER_CHECK_LIST
21030 do
21031   # Extract the first word of "$ac_prog", so it can be a program name with args.
21032 set dummy $ac_prog; ac_word=$2
21033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21034 $as_echo_n "checking for $ac_word... " >&6; }
21035 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
21036   $as_echo_n "(cached) " >&6
21037 else
21038   case $POTENTIAL_CXX in
21039   [\\/]* | ?:[\\/]*)
21040   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
21041   ;;
21042   *)
21043   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21044 for as_dir in $PATH
21045 do
21046   IFS=$as_save_IFS
21047   test -z "$as_dir" && as_dir=.
21048     for ac_exec_ext in '' $ac_executable_extensions; do
21049   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21050     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
21051     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21052     break 2
21053   fi
21054 done
21055   done
21056 IFS=$as_save_IFS
21057 
21058   ;;
21059 esac
21060 fi
21061 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
21062 if test -n "$POTENTIAL_CXX"; then
21063   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
21064 $as_echo "$POTENTIAL_CXX" >&6; }
21065 else
21066   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21067 $as_echo "no" >&6; }
21068 fi
21069 
21070 
21071   test -n "$POTENTIAL_CXX" && break
21072 done
21073 
21074     CXX=$POTENTIAL_CXX
21075   fi
21076 
21077   if test "x$CXX" = x; then
21078 
21079   # Print a helpful message on how to acquire the necessary build dependency.
21080   # devkit is the help tag: freetype, cups, pulse, alsa etc
21081   MISSING_DEPENDENCY=devkit
21082 
21083   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21084     cygwin_help $MISSING_DEPENDENCY
21085   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21086     msys_help $MISSING_DEPENDENCY
21087   else
21088     PKGHANDLER_COMMAND=
21089 
21090     case $PKGHANDLER in
21091       apt-get)
21092         apt_help     $MISSING_DEPENDENCY ;;
21093       yum)
21094         yum_help     $MISSING_DEPENDENCY ;;
21095       port)
21096         port_help    $MISSING_DEPENDENCY ;;
21097       pkgutil)
21098         pkgutil_help $MISSING_DEPENDENCY ;;
21099       pkgadd)
21100         pkgadd_help  $MISSING_DEPENDENCY ;;
21101     esac
21102 
21103     if test "x$PKGHANDLER_COMMAND" != x; then
21104       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
21105     fi
21106   fi
21107 
21108     as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
21109   fi
21110 
21111   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21112 
21113   # First separate the path from the arguments. This will split at the first
21114   # space.
21115   complete="$CXX"
21116   path="${complete%% *}"
21117   tmp="$complete EOL"
21118   arguments="${tmp#* }"
21119 
21120   # Input might be given as Windows format, start by converting to
21121   # unix format.
21122   new_path=`$CYGPATH -u "$path"`
21123 
21124   # Now try to locate executable using which
21125   new_path=`$WHICH "$new_path" 2> /dev/null`
21126   # bat and cmd files are not always considered executable in cygwin causing which
21127   # to not find them
21128   if test "x$new_path" = x \
21129       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21130       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21131     new_path=`$CYGPATH -u "$path"`
21132   fi
21133   if test "x$new_path" = x; then
21134     # Oops. Which didn't find the executable.
21135     # The splitting of arguments from the executable at a space might have been incorrect,
21136     # since paths with space are more likely in Windows. Give it another try with the whole
21137     # argument.
21138     path="$complete"
21139     arguments="EOL"
21140     new_path=`$CYGPATH -u "$path"`
21141     new_path=`$WHICH "$new_path" 2> /dev/null`
21142     # bat and cmd files are not always considered executable in cygwin causing which
21143     # to not find them
21144     if test "x$new_path" = x \
21145         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21146         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21147       new_path=`$CYGPATH -u "$path"`
21148     fi
21149     if test "x$new_path" = x; then
21150       # It's still not found. Now this is an unrecoverable error.
21151       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21152 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21153       has_space=`$ECHO "$complete" | $GREP " "`
21154       if test "x$has_space" != x; then
21155         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21156 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21157       fi
21158       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21159     fi
21160   fi
21161 
21162   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21163   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21164   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21165   # "foo.exe" is OK but "foo" is an error.
21166   #
21167   # This test is therefore slightly more accurate than "test -f" to check for file presence.
21168   # It is also a way to make sure we got the proper file name for the real test later on.
21169   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21170   if test "x$test_shortpath" = x; then
21171     # Short path failed, file does not exist as specified.
21172     # Try adding .exe or .cmd
21173     if test -f "${new_path}.exe"; then
21174       input_to_shortpath="${new_path}.exe"
21175     elif test -f "${new_path}.cmd"; then
21176       input_to_shortpath="${new_path}.cmd"
21177     else
21178       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
21179 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
21180       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21181 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21182       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21183     fi
21184   else
21185     input_to_shortpath="$new_path"
21186   fi
21187 
21188   # Call helper function which possibly converts this using DOS-style short mode.
21189   # If so, the updated path is stored in $new_path.
21190   new_path="$input_to_shortpath"
21191 
21192   input_path="$input_to_shortpath"
21193   # Check if we need to convert this using DOS-style short mode. If the path
21194   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21195   # take no chances and rewrite it.
21196   # Note: m4 eats our [], so we need to use [ and ] instead.
21197   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21198   if test "x$has_forbidden_chars" != x; then
21199     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21200     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21201     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21202     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21203       # Going to short mode and back again did indeed matter. Since short mode is
21204       # case insensitive, let's make it lowercase to improve readability.
21205       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21206       # Now convert it back to Unix-stile (cygpath)
21207       input_path=`$CYGPATH -u "$shortmode_path"`
21208       new_path="$input_path"
21209     fi
21210   fi
21211 
21212   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21213   if test "x$test_cygdrive_prefix" = x; then
21214     # As a simple fix, exclude /usr/bin since it's not a real path.
21215     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21216       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21217       # a path prefixed by /cygdrive for fixpath to work.
21218       new_path="$CYGWIN_ROOT_PATH$input_path"
21219     fi
21220   fi
21221 
21222   # remove trailing .exe if any
21223   new_path="${new_path/%.exe/}"
21224 
21225   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21226 
21227   # First separate the path from the arguments. This will split at the first
21228   # space.
21229   complete="$CXX"
21230   path="${complete%% *}"
21231   tmp="$complete EOL"
21232   arguments="${tmp#* }"
21233 
21234   # Input might be given as Windows format, start by converting to
21235   # unix format.
21236   new_path="$path"
21237 
21238   windows_path="$new_path"
21239   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21240     unix_path=`$CYGPATH -u "$windows_path"`
21241     new_path="$unix_path"
21242   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21243     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21244     new_path="$unix_path"
21245   fi
21246 
21247 
21248   # Now try to locate executable using which
21249   new_path=`$WHICH "$new_path" 2> /dev/null`
21250 
21251   if test "x$new_path" = x; then
21252     # Oops. Which didn't find the executable.
21253     # The splitting of arguments from the executable at a space might have been incorrect,
21254     # since paths with space are more likely in Windows. Give it another try with the whole
21255     # argument.
21256     path="$complete"
21257     arguments="EOL"
21258     new_path="$path"
21259 
21260   windows_path="$new_path"
21261   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21262     unix_path=`$CYGPATH -u "$windows_path"`
21263     new_path="$unix_path"
21264   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21265     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21266     new_path="$unix_path"
21267   fi
21268 
21269 
21270     new_path=`$WHICH "$new_path" 2> /dev/null`
21271 
21272     if test "x$new_path" = x; then
21273       # It's still not found. Now this is an unrecoverable error.
21274       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21275 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21276       has_space=`$ECHO "$complete" | $GREP " "`
21277       if test "x$has_space" != x; then
21278         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21279 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21280       fi
21281       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21282     fi
21283   fi
21284 
21285   # Now new_path has a complete unix path to the binary
21286   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21287     # Keep paths in /bin as-is, but remove trailing .exe if any
21288     new_path="${new_path/%.exe/}"
21289     # Do not save /bin paths to all_fixpath_prefixes!
21290   else
21291     # Not in mixed or Windows style, start by that.
21292     new_path=`cmd //c echo $new_path`
21293 
21294   input_path="$new_path"
21295   # Check if we need to convert this using DOS-style short mode. If the path
21296   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21297   # take no chances and rewrite it.
21298   # Note: m4 eats our [], so we need to use [ and ] instead.
21299   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21300   if test "x$has_forbidden_chars" != x; then
21301     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21302     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21303   fi
21304 
21305     # Output is in $new_path
21306 
21307   windows_path="$new_path"
21308   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21309     unix_path=`$CYGPATH -u "$windows_path"`
21310     new_path="$unix_path"
21311   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21312     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21313     new_path="$unix_path"
21314   fi
21315 
21316     # remove trailing .exe if any
21317     new_path="${new_path/%.exe/}"
21318 
21319     # Save the first 10 bytes of this path to the storage, so fixpath can work.
21320     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21321   fi
21322 
21323   else
21324     # We're on a posix platform. Hooray! :)
21325     # First separate the path from the arguments. This will split at the first
21326     # space.
21327     complete="$CXX"
21328     path="${complete%% *}"
21329     tmp="$complete EOL"
21330     arguments="${tmp#* }"
21331 
21332     # Cannot rely on the command "which" here since it doesn't always work.
21333     is_absolute_path=`$ECHO "$path" | $GREP ^/`
21334     if test -z "$is_absolute_path"; then
21335       # Path to executable is not absolute. Find it.
21336       IFS_save="$IFS"
21337       IFS=:
21338       for p in $PATH; do
21339         if test -f "$p/$path" && test -x "$p/$path"; then
21340           new_path="$p/$path"
21341           break
21342         fi
21343       done
21344       IFS="$IFS_save"
21345     else
21346       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
21347 $as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
21348       new_path="$path"
21349     fi
21350 
21351     if test "x$new_path" = x; then
21352       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21353 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21354       has_space=`$ECHO "$complete" | $GREP " "`
21355       if test "x$has_space" != x; then
21356         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21357 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21358       fi
21359       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21360     fi
21361   fi
21362 
21363   # Now join together the path and the arguments once again
21364   if test "x$arguments" != xEOL; then
21365     new_complete="$new_path ${arguments% *}"
21366   else
21367     new_complete="$new_path"
21368   fi
21369 
21370   if test "x$complete" != "x$new_complete"; then
21371     CXX="$new_complete"
21372     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
21373 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
21374   fi
21375 
21376   TEST_COMPILER="$CXX"
21377   # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
21378   # to 'xlc' but it is crucial that we invoke the compiler with the right name!
21379   if test "x$OPENJDK_BUILD_OS" != xaix; then
21380     { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
21381 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
21382 
21383   if test "x$OPENJDK_BUILD_OS" != xwindows; then
21384     # Follow a chain of symbolic links. Use readlink
21385     # where it exists, else fall back to horribly
21386     # complicated shell code.
21387     if test "x$READLINK_TESTED" != yes; then
21388       # On MacOSX there is a readlink tool with a different
21389       # purpose than the GNU readlink tool. Check the found readlink.
21390       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21391       if test "x$ISGNU" = x; then
21392         # A readlink that we do not know how to use.
21393         # Are there other non-GNU readlinks out there?
21394         READLINK_TESTED=yes
21395         READLINK=
21396       fi
21397     fi
21398 
21399     if test "x$READLINK" != x; then
21400       TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
21401     else
21402       # Save the current directory for restoring afterwards
21403       STARTDIR=$PWD
21404       COUNTER=0
21405       sym_link_dir=`$DIRNAME $TEST_COMPILER`
21406       sym_link_file=`$BASENAME $TEST_COMPILER`
21407       cd $sym_link_dir
21408       # Use -P flag to resolve symlinks in directories.
21409       cd `$THEPWDCMD -P`
21410       sym_link_dir=`$THEPWDCMD -P`
21411       # Resolve file symlinks
21412       while test $COUNTER -lt 20; do
21413         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21414         if test "x$ISLINK" == x; then
21415           # This is not a symbolic link! We are done!
21416           break
21417         fi
21418         # Again resolve directory symlinks since the target of the just found
21419         # link could be in a different directory
21420         cd `$DIRNAME $ISLINK`
21421         sym_link_dir=`$THEPWDCMD -P`
21422         sym_link_file=`$BASENAME $ISLINK`
21423         let COUNTER=COUNTER+1
21424       done
21425       cd $STARTDIR
21426       TEST_COMPILER=$sym_link_dir/$sym_link_file
21427     fi
21428   fi
21429 
21430     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
21431 $as_echo "$TEST_COMPILER" >&6; }
21432   fi
21433   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
21434 $as_echo_n "checking if CXX is disguised ccache... " >&6; }
21435 
21436   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
21437   if test "x$COMPILER_BASENAME" = "xccache"; then
21438     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
21439 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
21440     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
21441     # We want to control ccache invocation ourselves, so ignore this cc and try
21442     # searching again.
21443 
21444     # Remove the path to the fake ccache cc from the PATH
21445     RETRY_COMPILER_SAVED_PATH="$PATH"
21446     COMPILER_DIRNAME=`$DIRNAME $CXX`
21447     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
21448 
21449     # Try again looking for our compiler
21450     if test -n "$ac_tool_prefix"; then
21451   for ac_prog in $COMPILER_CHECK_LIST
21452   do
21453     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21454 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21456 $as_echo_n "checking for $ac_word... " >&6; }
21457 if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
21458   $as_echo_n "(cached) " >&6
21459 else
21460   if test -n "$PROPER_COMPILER_CXX"; then
21461   ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
21462 else
21463 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21464 for as_dir in $PATH
21465 do
21466   IFS=$as_save_IFS
21467   test -z "$as_dir" && as_dir=.
21468     for ac_exec_ext in '' $ac_executable_extensions; do
21469   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21470     ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
21471     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21472     break 2
21473   fi
21474 done
21475   done
21476 IFS=$as_save_IFS
21477 
21478 fi
21479 fi
21480 PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
21481 if test -n "$PROPER_COMPILER_CXX"; then
21482   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21483 $as_echo "$PROPER_COMPILER_CXX" >&6; }
21484 else
21485   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21486 $as_echo "no" >&6; }
21487 fi
21488 
21489 
21490     test -n "$PROPER_COMPILER_CXX" && break
21491   done
21492 fi
21493 if test -z "$PROPER_COMPILER_CXX"; then
21494   ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
21495   for ac_prog in $COMPILER_CHECK_LIST
21496 do
21497   # Extract the first word of "$ac_prog", so it can be a program name with args.
21498 set dummy $ac_prog; ac_word=$2
21499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21500 $as_echo_n "checking for $ac_word... " >&6; }
21501 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
21502   $as_echo_n "(cached) " >&6
21503 else
21504   if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21505   ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
21506 else
21507 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21508 for as_dir in $PATH
21509 do
21510   IFS=$as_save_IFS
21511   test -z "$as_dir" && as_dir=.
21512     for ac_exec_ext in '' $ac_executable_extensions; do
21513   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21514     ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
21515     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21516     break 2
21517   fi
21518 done
21519   done
21520 IFS=$as_save_IFS
21521 
21522 fi
21523 fi
21524 ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
21525 if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21526   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
21527 $as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
21528 else
21529   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21530 $as_echo "no" >&6; }
21531 fi
21532 
21533 
21534   test -n "$ac_ct_PROPER_COMPILER_CXX" && break
21535 done
21536 
21537   if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
21538     PROPER_COMPILER_CXX=""
21539   else
21540     case $cross_compiling:$ac_tool_warned in
21541 yes:)
21542 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21543 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21544 ac_tool_warned=yes ;;
21545 esac
21546     PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
21547   fi
21548 fi
21549 
21550 
21551   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21552 
21553   # First separate the path from the arguments. This will split at the first
21554   # space.
21555   complete="$PROPER_COMPILER_CXX"
21556   path="${complete%% *}"
21557   tmp="$complete EOL"
21558   arguments="${tmp#* }"
21559 
21560   # Input might be given as Windows format, start by converting to
21561   # unix format.
21562   new_path=`$CYGPATH -u "$path"`
21563 
21564   # Now try to locate executable using which
21565   new_path=`$WHICH "$new_path" 2> /dev/null`
21566   # bat and cmd files are not always considered executable in cygwin causing which
21567   # to not find them
21568   if test "x$new_path" = x \
21569       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21570       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21571     new_path=`$CYGPATH -u "$path"`
21572   fi
21573   if test "x$new_path" = x; then
21574     # Oops. Which didn't find the executable.
21575     # The splitting of arguments from the executable at a space might have been incorrect,
21576     # since paths with space are more likely in Windows. Give it another try with the whole
21577     # argument.
21578     path="$complete"
21579     arguments="EOL"
21580     new_path=`$CYGPATH -u "$path"`
21581     new_path=`$WHICH "$new_path" 2> /dev/null`
21582     # bat and cmd files are not always considered executable in cygwin causing which
21583     # to not find them
21584     if test "x$new_path" = x \
21585         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21586         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21587       new_path=`$CYGPATH -u "$path"`
21588     fi
21589     if test "x$new_path" = x; then
21590       # It's still not found. Now this is an unrecoverable error.
21591       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21592 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21593       has_space=`$ECHO "$complete" | $GREP " "`
21594       if test "x$has_space" != x; then
21595         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21596 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21597       fi
21598       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21599     fi
21600   fi
21601 
21602   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21603   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21604   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21605   # "foo.exe" is OK but "foo" is an error.
21606   #
21607   # This test is therefore slightly more accurate than "test -f" to check for file presence.
21608   # It is also a way to make sure we got the proper file name for the real test later on.
21609   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21610   if test "x$test_shortpath" = x; then
21611     # Short path failed, file does not exist as specified.
21612     # Try adding .exe or .cmd
21613     if test -f "${new_path}.exe"; then
21614       input_to_shortpath="${new_path}.exe"
21615     elif test -f "${new_path}.cmd"; then
21616       input_to_shortpath="${new_path}.cmd"
21617     else
21618       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
21619 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
21620       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21621 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21622       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21623     fi
21624   else
21625     input_to_shortpath="$new_path"
21626   fi
21627 
21628   # Call helper function which possibly converts this using DOS-style short mode.
21629   # If so, the updated path is stored in $new_path.
21630   new_path="$input_to_shortpath"
21631 
21632   input_path="$input_to_shortpath"
21633   # Check if we need to convert this using DOS-style short mode. If the path
21634   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21635   # take no chances and rewrite it.
21636   # Note: m4 eats our [], so we need to use [ and ] instead.
21637   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21638   if test "x$has_forbidden_chars" != x; then
21639     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21640     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21641     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21642     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21643       # Going to short mode and back again did indeed matter. Since short mode is
21644       # case insensitive, let's make it lowercase to improve readability.
21645       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21646       # Now convert it back to Unix-stile (cygpath)
21647       input_path=`$CYGPATH -u "$shortmode_path"`
21648       new_path="$input_path"
21649     fi
21650   fi
21651 
21652   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21653   if test "x$test_cygdrive_prefix" = x; then
21654     # As a simple fix, exclude /usr/bin since it's not a real path.
21655     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21656       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21657       # a path prefixed by /cygdrive for fixpath to work.
21658       new_path="$CYGWIN_ROOT_PATH$input_path"
21659     fi
21660   fi
21661 
21662   # remove trailing .exe if any
21663   new_path="${new_path/%.exe/}"
21664 
21665   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21666 
21667   # First separate the path from the arguments. This will split at the first
21668   # space.
21669   complete="$PROPER_COMPILER_CXX"
21670   path="${complete%% *}"
21671   tmp="$complete EOL"
21672   arguments="${tmp#* }"
21673 
21674   # Input might be given as Windows format, start by converting to
21675   # unix format.
21676   new_path="$path"
21677 
21678   windows_path="$new_path"
21679   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21680     unix_path=`$CYGPATH -u "$windows_path"`
21681     new_path="$unix_path"
21682   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21683     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21684     new_path="$unix_path"
21685   fi
21686 
21687 
21688   # Now try to locate executable using which
21689   new_path=`$WHICH "$new_path" 2> /dev/null`
21690 
21691   if test "x$new_path" = x; then
21692     # Oops. Which didn't find the executable.
21693     # The splitting of arguments from the executable at a space might have been incorrect,
21694     # since paths with space are more likely in Windows. Give it another try with the whole
21695     # argument.
21696     path="$complete"
21697     arguments="EOL"
21698     new_path="$path"
21699 
21700   windows_path="$new_path"
21701   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21702     unix_path=`$CYGPATH -u "$windows_path"`
21703     new_path="$unix_path"
21704   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21705     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21706     new_path="$unix_path"
21707   fi
21708 
21709 
21710     new_path=`$WHICH "$new_path" 2> /dev/null`
21711 
21712     if test "x$new_path" = x; then
21713       # It's still not found. Now this is an unrecoverable error.
21714       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21715 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21716       has_space=`$ECHO "$complete" | $GREP " "`
21717       if test "x$has_space" != x; then
21718         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21719 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21720       fi
21721       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21722     fi
21723   fi
21724 
21725   # Now new_path has a complete unix path to the binary
21726   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21727     # Keep paths in /bin as-is, but remove trailing .exe if any
21728     new_path="${new_path/%.exe/}"
21729     # Do not save /bin paths to all_fixpath_prefixes!
21730   else
21731     # Not in mixed or Windows style, start by that.
21732     new_path=`cmd //c echo $new_path`
21733 
21734   input_path="$new_path"
21735   # Check if we need to convert this using DOS-style short mode. If the path
21736   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21737   # take no chances and rewrite it.
21738   # Note: m4 eats our [], so we need to use [ and ] instead.
21739   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21740   if test "x$has_forbidden_chars" != x; then
21741     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21742     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21743   fi
21744 
21745     # Output is in $new_path
21746 
21747   windows_path="$new_path"
21748   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21749     unix_path=`$CYGPATH -u "$windows_path"`
21750     new_path="$unix_path"
21751   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21752     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21753     new_path="$unix_path"
21754   fi
21755 
21756     # remove trailing .exe if any
21757     new_path="${new_path/%.exe/}"
21758 
21759     # Save the first 10 bytes of this path to the storage, so fixpath can work.
21760     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21761   fi
21762 
21763   else
21764     # We're on a posix platform. Hooray! :)
21765     # First separate the path from the arguments. This will split at the first
21766     # space.
21767     complete="$PROPER_COMPILER_CXX"
21768     path="${complete%% *}"
21769     tmp="$complete EOL"
21770     arguments="${tmp#* }"
21771 
21772     # Cannot rely on the command "which" here since it doesn't always work.
21773     is_absolute_path=`$ECHO "$path" | $GREP ^/`
21774     if test -z "$is_absolute_path"; then
21775       # Path to executable is not absolute. Find it.
21776       IFS_save="$IFS"
21777       IFS=:
21778       for p in $PATH; do
21779         if test -f "$p/$path" && test -x "$p/$path"; then
21780           new_path="$p/$path"
21781           break
21782         fi
21783       done
21784       IFS="$IFS_save"
21785     else
21786       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21787 $as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21788       new_path="$path"
21789     fi
21790 
21791     if test "x$new_path" = x; then
21792       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21793 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21794       has_space=`$ECHO "$complete" | $GREP " "`
21795       if test "x$has_space" != x; then
21796         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21797 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21798       fi
21799       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21800     fi
21801   fi
21802 
21803   # Now join together the path and the arguments once again
21804   if test "x$arguments" != xEOL; then
21805     new_complete="$new_path ${arguments% *}"
21806   else
21807     new_complete="$new_path"
21808   fi
21809 
21810   if test "x$complete" != "x$new_complete"; then
21811     PROPER_COMPILER_CXX="$new_complete"
21812     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21813 $as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21814   fi
21815 
21816     PATH="$RETRY_COMPILER_SAVED_PATH"
21817 
21818     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21819 $as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21820 
21821   if test "x$OPENJDK_BUILD_OS" != xwindows; then
21822     # Follow a chain of symbolic links. Use readlink
21823     # where it exists, else fall back to horribly
21824     # complicated shell code.
21825     if test "x$READLINK_TESTED" != yes; then
21826       # On MacOSX there is a readlink tool with a different
21827       # purpose than the GNU readlink tool. Check the found readlink.
21828       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21829       if test "x$ISGNU" = x; then
21830         # A readlink that we do not know how to use.
21831         # Are there other non-GNU readlinks out there?
21832         READLINK_TESTED=yes
21833         READLINK=
21834       fi
21835     fi
21836 
21837     if test "x$READLINK" != x; then
21838       PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21839     else
21840       # Save the current directory for restoring afterwards
21841       STARTDIR=$PWD
21842       COUNTER=0
21843       sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21844       sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21845       cd $sym_link_dir
21846       # Use -P flag to resolve symlinks in directories.
21847       cd `$THEPWDCMD -P`
21848       sym_link_dir=`$THEPWDCMD -P`
21849       # Resolve file symlinks
21850       while test $COUNTER -lt 20; do
21851         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21852         if test "x$ISLINK" == x; then
21853           # This is not a symbolic link! We are done!
21854           break
21855         fi
21856         # Again resolve directory symlinks since the target of the just found
21857         # link could be in a different directory
21858         cd `$DIRNAME $ISLINK`
21859         sym_link_dir=`$THEPWDCMD -P`
21860         sym_link_file=`$BASENAME $ISLINK`
21861         let COUNTER=COUNTER+1
21862       done
21863       cd $STARTDIR
21864       PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21865     fi
21866   fi
21867 
21868     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21869 $as_echo "$PROPER_COMPILER_CXX" >&6; }
21870     CXX="$PROPER_COMPILER_CXX"
21871   else
21872     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21873 $as_echo "no, keeping CXX" >&6; }
21874     CXX="$TEST_COMPILER"
21875   fi
21876 
21877   COMPILER=$CXX
21878   COMPILER_NAME=$COMPILER_NAME
21879 
21880   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21881     # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21882     COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21883     $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21884     if test $? -ne 0; then
21885       GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21886 
21887       { $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
21888 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21889       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21890 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21891       as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21892     else
21893       COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21894       COMPILER_VENDOR="Sun Studio"
21895     fi
21896   elif test  "x$OPENJDK_TARGET_OS" = xaix; then
21897       COMPILER_VERSION_TEST=`$COMPILER -qversion  2>&1 | $TAIL -n 1`
21898       $ECHO $COMPILER_VERSION_TEST | $GREP "^Version: " > /dev/null
21899       if test $? -ne 0; then
21900         as_fn_error $? "Failed to detect the compiler version of $COMPILER ...." "$LINENO" 5
21901       else
21902         COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n 's/Version: \(0-90-9\.0-90-9*\).*/\1/p'`
21903         COMPILER_VENDOR='IBM'
21904       fi
21905   elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21906     # First line typically looks something like:
21907     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
21908     COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
21909     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21910     COMPILER_VENDOR="Microsoft CL.EXE"
21911     COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21912     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21913       if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21914         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21915       fi
21916     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21917       if test "x$COMPILER_CPU_TEST" != "xx64"; then
21918         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21919       fi
21920     fi
21921   else
21922     COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21923     # Check that this is likely to be GCC.
21924     $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21925     if test $? -ne 0; then
21926       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21927 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21928       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21929 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21930       as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21931     fi
21932 
21933     # First line typically looks something like:
21934     # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21935     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21936     COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21937   fi
21938   # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21939   CXX_VERSION="$COMPILER_VERSION"
21940   # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21941   CXX_VENDOR="$COMPILER_VENDOR"
21942 
21943   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21944 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21945 
21946 
21947   # Now that we have resolved CXX ourself, let autoconf have its go at it
21948   ac_ext=cpp
21949 ac_cpp='$CXXCPP $CPPFLAGS'
21950 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21951 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21952 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21953 if test -z "$CXX"; then
21954   if test -n "$CCC"; then
21955     CXX=$CCC
21956   else
21957     if test -n "$ac_tool_prefix"; then
21958   for ac_prog in $CXX
21959   do
21960     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21961 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21963 $as_echo_n "checking for $ac_word... " >&6; }
21964 if ${ac_cv_prog_CXX+:} false; then :
21965   $as_echo_n "(cached) " >&6
21966 else
21967   if test -n "$CXX"; then
21968   ac_cv_prog_CXX="$CXX" # Let the user override the test.
21969 else
21970 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21971 for as_dir in $PATH
21972 do
21973   IFS=$as_save_IFS
21974   test -z "$as_dir" && as_dir=.
21975     for ac_exec_ext in '' $ac_executable_extensions; do
21976   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21977     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21978     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21979     break 2
21980   fi
21981 done
21982   done
21983 IFS=$as_save_IFS
21984 
21985 fi
21986 fi
21987 CXX=$ac_cv_prog_CXX
21988 if test -n "$CXX"; then
21989   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21990 $as_echo "$CXX" >&6; }
21991 else
21992   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21993 $as_echo "no" >&6; }
21994 fi
21995 
21996 
21997     test -n "$CXX" && break
21998   done
21999 fi
22000 if test -z "$CXX"; then
22001   ac_ct_CXX=$CXX
22002   for ac_prog in $CXX
22003 do
22004   # Extract the first word of "$ac_prog", so it can be a program name with args.
22005 set dummy $ac_prog; ac_word=$2
22006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22007 $as_echo_n "checking for $ac_word... " >&6; }
22008 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
22009   $as_echo_n "(cached) " >&6
22010 else
22011   if test -n "$ac_ct_CXX"; then
22012   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
22013 else
22014 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22015 for as_dir in $PATH
22016 do
22017   IFS=$as_save_IFS
22018   test -z "$as_dir" && as_dir=.
22019     for ac_exec_ext in '' $ac_executable_extensions; do
22020   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22021     ac_cv_prog_ac_ct_CXX="$ac_prog"
22022     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22023     break 2
22024   fi
22025 done
22026   done
22027 IFS=$as_save_IFS
22028 
22029 fi
22030 fi
22031 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
22032 if test -n "$ac_ct_CXX"; then
22033   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
22034 $as_echo "$ac_ct_CXX" >&6; }
22035 else
22036   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22037 $as_echo "no" >&6; }
22038 fi
22039 
22040 
22041   test -n "$ac_ct_CXX" && break
22042 done
22043 
22044   if test "x$ac_ct_CXX" = x; then
22045     CXX="g++"
22046   else
22047     case $cross_compiling:$ac_tool_warned in
22048 yes:)
22049 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22050 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22051 ac_tool_warned=yes ;;
22052 esac
22053     CXX=$ac_ct_CXX
22054   fi
22055 fi
22056 
22057   fi
22058 fi
22059 # Provide some information about the compiler.
22060 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
22061 set X $ac_compile
22062 ac_compiler=$2
22063 for ac_option in --version -v -V -qversion; do
22064   { { ac_try="$ac_compiler $ac_option >&5"
22065 case "(($ac_try" in
22066   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22067   *) ac_try_echo=$ac_try;;
22068 esac
22069 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
22070 $as_echo "$ac_try_echo"; } >&5
22071   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
22072   ac_status=$?
22073   if test -s conftest.err; then
22074     sed '10a\
22075 ... rest of stderr output deleted ...
22076          10q' conftest.err >conftest.er1
22077     cat conftest.er1 >&5
22078   fi
22079   rm -f conftest.er1 conftest.err
22080   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22081   test $ac_status = 0; }
22082 done
22083 
22084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
22085 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
22086 if ${ac_cv_cxx_compiler_gnu+:} false; then :
22087   $as_echo_n "(cached) " >&6
22088 else
22089   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22090 /* end confdefs.h.  */
22091 
22092 int
22093 main ()
22094 {
22095 #ifndef __GNUC__
22096        choke me
22097 #endif
22098 
22099   ;
22100   return 0;
22101 }
22102 _ACEOF
22103 if ac_fn_cxx_try_compile "$LINENO"; then :
22104   ac_compiler_gnu=yes
22105 else
22106   ac_compiler_gnu=no
22107 fi
22108 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22109 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
22110 
22111 fi
22112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
22113 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
22114 if test $ac_compiler_gnu = yes; then
22115   GXX=yes
22116 else
22117   GXX=
22118 fi
22119 ac_test_CXXFLAGS=${CXXFLAGS+set}
22120 ac_save_CXXFLAGS=$CXXFLAGS
22121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
22122 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
22123 if ${ac_cv_prog_cxx_g+:} false; then :
22124   $as_echo_n "(cached) " >&6
22125 else
22126   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
22127    ac_cxx_werror_flag=yes
22128    ac_cv_prog_cxx_g=no
22129    CXXFLAGS="-g"
22130    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22131 /* end confdefs.h.  */
22132 
22133 int
22134 main ()
22135 {
22136 
22137   ;
22138   return 0;
22139 }
22140 _ACEOF
22141 if ac_fn_cxx_try_compile "$LINENO"; then :
22142   ac_cv_prog_cxx_g=yes
22143 else
22144   CXXFLAGS=""
22145       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22146 /* end confdefs.h.  */
22147 
22148 int
22149 main ()
22150 {
22151 
22152   ;
22153   return 0;
22154 }
22155 _ACEOF
22156 if ac_fn_cxx_try_compile "$LINENO"; then :
22157 
22158 else
22159   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
22160          CXXFLAGS="-g"
22161          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22162 /* end confdefs.h.  */
22163 
22164 int
22165 main ()
22166 {
22167 
22168   ;
22169   return 0;
22170 }
22171 _ACEOF
22172 if ac_fn_cxx_try_compile "$LINENO"; then :
22173   ac_cv_prog_cxx_g=yes
22174 fi
22175 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22176 fi
22177 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22178 fi
22179 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22180    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
22181 fi
22182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
22183 $as_echo "$ac_cv_prog_cxx_g" >&6; }
22184 if test "$ac_test_CXXFLAGS" = set; then
22185   CXXFLAGS=$ac_save_CXXFLAGS
22186 elif test $ac_cv_prog_cxx_g = yes; then
22187   if test "$GXX" = yes; then
22188     CXXFLAGS="-g -O2"
22189   else
22190     CXXFLAGS="-g"
22191   fi
22192 else
22193   if test "$GXX" = yes; then
22194     CXXFLAGS="-O2"
22195   else
22196     CXXFLAGS=
22197   fi
22198 fi
22199 ac_ext=cpp
22200 ac_cpp='$CXXCPP $CPPFLAGS'
22201 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22202 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22203 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22204 
22205 
22206   ### Locate other tools
22207 
22208   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22209     ac_ext=m
22210 ac_cpp='$OBJCPP $CPPFLAGS'
22211 ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22212 ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22213 ac_compiler_gnu=$ac_cv_objc_compiler_gnu
22214 if test -n "$ac_tool_prefix"; then
22215   for ac_prog in gcc objcc objc cc CC
22216   do
22217     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
22218 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
22219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22220 $as_echo_n "checking for $ac_word... " >&6; }
22221 if ${ac_cv_prog_OBJC+:} false; then :
22222   $as_echo_n "(cached) " >&6
22223 else
22224   if test -n "$OBJC"; then
22225   ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
22226 else
22227 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22228 for as_dir in $PATH
22229 do
22230   IFS=$as_save_IFS
22231   test -z "$as_dir" && as_dir=.
22232     for ac_exec_ext in '' $ac_executable_extensions; do
22233   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22234     ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
22235     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22236     break 2
22237   fi
22238 done
22239   done
22240 IFS=$as_save_IFS
22241 
22242 fi
22243 fi
22244 OBJC=$ac_cv_prog_OBJC
22245 if test -n "$OBJC"; then
22246   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
22247 $as_echo "$OBJC" >&6; }
22248 else
22249   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22250 $as_echo "no" >&6; }
22251 fi
22252 
22253 
22254     test -n "$OBJC" && break
22255   done
22256 fi
22257 if test -z "$OBJC"; then
22258   ac_ct_OBJC=$OBJC
22259   for ac_prog in gcc objcc objc cc CC
22260 do
22261   # Extract the first word of "$ac_prog", so it can be a program name with args.
22262 set dummy $ac_prog; ac_word=$2
22263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22264 $as_echo_n "checking for $ac_word... " >&6; }
22265 if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
22266   $as_echo_n "(cached) " >&6
22267 else
22268   if test -n "$ac_ct_OBJC"; then
22269   ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
22270 else
22271 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22272 for as_dir in $PATH
22273 do
22274   IFS=$as_save_IFS
22275   test -z "$as_dir" && as_dir=.
22276     for ac_exec_ext in '' $ac_executable_extensions; do
22277   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22278     ac_cv_prog_ac_ct_OBJC="$ac_prog"
22279     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22280     break 2
22281   fi
22282 done
22283   done
22284 IFS=$as_save_IFS
22285 
22286 fi
22287 fi
22288 ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
22289 if test -n "$ac_ct_OBJC"; then
22290   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
22291 $as_echo "$ac_ct_OBJC" >&6; }
22292 else
22293   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22294 $as_echo "no" >&6; }
22295 fi
22296 
22297 
22298   test -n "$ac_ct_OBJC" && break
22299 done
22300 
22301   if test "x$ac_ct_OBJC" = x; then
22302     OBJC="gcc"
22303   else
22304     case $cross_compiling:$ac_tool_warned in
22305 yes:)
22306 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22307 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22308 ac_tool_warned=yes ;;
22309 esac
22310     OBJC=$ac_ct_OBJC
22311   fi
22312 fi
22313 
22314 # Provide some information about the compiler.
22315 $as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
22316 set X $ac_compile
22317 ac_compiler=$2
22318 for ac_option in --version -v -V -qversion; do
22319   { { ac_try="$ac_compiler $ac_option >&5"
22320 case "(($ac_try" in
22321   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22322   *) ac_try_echo=$ac_try;;
22323 esac
22324 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
22325 $as_echo "$ac_try_echo"; } >&5
22326   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
22327   ac_status=$?
22328   if test -s conftest.err; then
22329     sed '10a\
22330 ... rest of stderr output deleted ...
22331          10q' conftest.err >conftest.er1
22332     cat conftest.er1 >&5
22333   fi
22334   rm -f conftest.er1 conftest.err
22335   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22336   test $ac_status = 0; }
22337 done
22338 
22339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
22340 $as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
22341 if ${ac_cv_objc_compiler_gnu+:} false; then :
22342   $as_echo_n "(cached) " >&6
22343 else
22344   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22345 /* end confdefs.h.  */
22346 
22347 int
22348 main ()
22349 {
22350 #ifndef __GNUC__
22351        choke me
22352 #endif
22353 
22354   ;
22355   return 0;
22356 }
22357 _ACEOF
22358 if ac_fn_objc_try_compile "$LINENO"; then :
22359   ac_compiler_gnu=yes
22360 else
22361   ac_compiler_gnu=no
22362 fi
22363 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22364 ac_cv_objc_compiler_gnu=$ac_compiler_gnu
22365 
22366 fi
22367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
22368 $as_echo "$ac_cv_objc_compiler_gnu" >&6; }
22369 if test $ac_compiler_gnu = yes; then
22370   GOBJC=yes
22371 else
22372   GOBJC=
22373 fi
22374 ac_test_OBJCFLAGS=${OBJCFLAGS+set}
22375 ac_save_OBJCFLAGS=$OBJCFLAGS
22376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
22377 $as_echo_n "checking whether $OBJC accepts -g... " >&6; }
22378 if ${ac_cv_prog_objc_g+:} false; then :
22379   $as_echo_n "(cached) " >&6
22380 else
22381   ac_save_objc_werror_flag=$ac_objc_werror_flag
22382    ac_objc_werror_flag=yes
22383    ac_cv_prog_objc_g=no
22384    OBJCFLAGS="-g"
22385    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22386 /* end confdefs.h.  */
22387 
22388 int
22389 main ()
22390 {
22391 
22392   ;
22393   return 0;
22394 }
22395 _ACEOF
22396 if ac_fn_objc_try_compile "$LINENO"; then :
22397   ac_cv_prog_objc_g=yes
22398 else
22399   OBJCFLAGS=""
22400       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22401 /* end confdefs.h.  */
22402 
22403 int
22404 main ()
22405 {
22406 
22407   ;
22408   return 0;
22409 }
22410 _ACEOF
22411 if ac_fn_objc_try_compile "$LINENO"; then :
22412 
22413 else
22414   ac_objc_werror_flag=$ac_save_objc_werror_flag
22415          OBJCFLAGS="-g"
22416          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22417 /* end confdefs.h.  */
22418 
22419 int
22420 main ()
22421 {
22422 
22423   ;
22424   return 0;
22425 }
22426 _ACEOF
22427 if ac_fn_objc_try_compile "$LINENO"; then :
22428   ac_cv_prog_objc_g=yes
22429 fi
22430 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22431 fi
22432 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22433 fi
22434 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22435    ac_objc_werror_flag=$ac_save_objc_werror_flag
22436 fi
22437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
22438 $as_echo "$ac_cv_prog_objc_g" >&6; }
22439 if test "$ac_test_OBJCFLAGS" = set; then
22440   OBJCFLAGS=$ac_save_OBJCFLAGS
22441 elif test $ac_cv_prog_objc_g = yes; then
22442   if test "$GOBJC" = yes; then
22443     OBJCFLAGS="-g -O2"
22444   else
22445     OBJCFLAGS="-g"
22446   fi
22447 else
22448   if test "$GOBJC" = yes; then
22449     OBJCFLAGS="-O2"
22450   else
22451     OBJCFLAGS=
22452   fi
22453 fi
22454 ac_ext=cpp
22455 ac_cpp='$CXXCPP $CPPFLAGS'
22456 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22457 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22458 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22459 
22460 
22461   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22462 
22463   # First separate the path from the arguments. This will split at the first
22464   # space.
22465   complete="$OBJC"
22466   path="${complete%% *}"
22467   tmp="$complete EOL"
22468   arguments="${tmp#* }"
22469 
22470   # Input might be given as Windows format, start by converting to
22471   # unix format.
22472   new_path=`$CYGPATH -u "$path"`
22473 
22474   # Now try to locate executable using which
22475   new_path=`$WHICH "$new_path" 2> /dev/null`
22476   # bat and cmd files are not always considered executable in cygwin causing which
22477   # to not find them
22478   if test "x$new_path" = x \
22479       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22480       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22481     new_path=`$CYGPATH -u "$path"`
22482   fi
22483   if test "x$new_path" = x; then
22484     # Oops. Which didn't find the executable.
22485     # The splitting of arguments from the executable at a space might have been incorrect,
22486     # since paths with space are more likely in Windows. Give it another try with the whole
22487     # argument.
22488     path="$complete"
22489     arguments="EOL"
22490     new_path=`$CYGPATH -u "$path"`
22491     new_path=`$WHICH "$new_path" 2> /dev/null`
22492     # bat and cmd files are not always considered executable in cygwin causing which
22493     # to not find them
22494     if test "x$new_path" = x \
22495         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22496         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22497       new_path=`$CYGPATH -u "$path"`
22498     fi
22499     if test "x$new_path" = x; then
22500       # It's still not found. Now this is an unrecoverable error.
22501       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22502 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22503       has_space=`$ECHO "$complete" | $GREP " "`
22504       if test "x$has_space" != x; then
22505         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22506 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22507       fi
22508       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22509     fi
22510   fi
22511 
22512   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22513   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22514   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22515   # "foo.exe" is OK but "foo" is an error.
22516   #
22517   # This test is therefore slightly more accurate than "test -f" to check for file presence.
22518   # It is also a way to make sure we got the proper file name for the real test later on.
22519   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22520   if test "x$test_shortpath" = x; then
22521     # Short path failed, file does not exist as specified.
22522     # Try adding .exe or .cmd
22523     if test -f "${new_path}.exe"; then
22524       input_to_shortpath="${new_path}.exe"
22525     elif test -f "${new_path}.cmd"; then
22526       input_to_shortpath="${new_path}.cmd"
22527     else
22528       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
22529 $as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
22530       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22531 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22532       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22533     fi
22534   else
22535     input_to_shortpath="$new_path"
22536   fi
22537 
22538   # Call helper function which possibly converts this using DOS-style short mode.
22539   # If so, the updated path is stored in $new_path.
22540   new_path="$input_to_shortpath"
22541 
22542   input_path="$input_to_shortpath"
22543   # Check if we need to convert this using DOS-style short mode. If the path
22544   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22545   # take no chances and rewrite it.
22546   # Note: m4 eats our [], so we need to use [ and ] instead.
22547   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22548   if test "x$has_forbidden_chars" != x; then
22549     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22550     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22551     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22552     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22553       # Going to short mode and back again did indeed matter. Since short mode is
22554       # case insensitive, let's make it lowercase to improve readability.
22555       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22556       # Now convert it back to Unix-stile (cygpath)
22557       input_path=`$CYGPATH -u "$shortmode_path"`
22558       new_path="$input_path"
22559     fi
22560   fi
22561 
22562   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22563   if test "x$test_cygdrive_prefix" = x; then
22564     # As a simple fix, exclude /usr/bin since it's not a real path.
22565     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22566       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22567       # a path prefixed by /cygdrive for fixpath to work.
22568       new_path="$CYGWIN_ROOT_PATH$input_path"
22569     fi
22570   fi
22571 
22572   # remove trailing .exe if any
22573   new_path="${new_path/%.exe/}"
22574 
22575   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22576 
22577   # First separate the path from the arguments. This will split at the first
22578   # space.
22579   complete="$OBJC"
22580   path="${complete%% *}"
22581   tmp="$complete EOL"
22582   arguments="${tmp#* }"
22583 
22584   # Input might be given as Windows format, start by converting to
22585   # unix format.
22586   new_path="$path"
22587 
22588   windows_path="$new_path"
22589   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22590     unix_path=`$CYGPATH -u "$windows_path"`
22591     new_path="$unix_path"
22592   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22593     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22594     new_path="$unix_path"
22595   fi
22596 
22597 
22598   # Now try to locate executable using which
22599   new_path=`$WHICH "$new_path" 2> /dev/null`
22600 
22601   if test "x$new_path" = x; then
22602     # Oops. Which didn't find the executable.
22603     # The splitting of arguments from the executable at a space might have been incorrect,
22604     # since paths with space are more likely in Windows. Give it another try with the whole
22605     # argument.
22606     path="$complete"
22607     arguments="EOL"
22608     new_path="$path"
22609 
22610   windows_path="$new_path"
22611   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22612     unix_path=`$CYGPATH -u "$windows_path"`
22613     new_path="$unix_path"
22614   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22615     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22616     new_path="$unix_path"
22617   fi
22618 
22619 
22620     new_path=`$WHICH "$new_path" 2> /dev/null`
22621 
22622     if test "x$new_path" = x; then
22623       # It's still not found. Now this is an unrecoverable error.
22624       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22625 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22626       has_space=`$ECHO "$complete" | $GREP " "`
22627       if test "x$has_space" != x; then
22628         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22629 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22630       fi
22631       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22632     fi
22633   fi
22634 
22635   # Now new_path has a complete unix path to the binary
22636   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22637     # Keep paths in /bin as-is, but remove trailing .exe if any
22638     new_path="${new_path/%.exe/}"
22639     # Do not save /bin paths to all_fixpath_prefixes!
22640   else
22641     # Not in mixed or Windows style, start by that.
22642     new_path=`cmd //c echo $new_path`
22643 
22644   input_path="$new_path"
22645   # Check if we need to convert this using DOS-style short mode. If the path
22646   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22647   # take no chances and rewrite it.
22648   # Note: m4 eats our [], so we need to use [ and ] instead.
22649   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22650   if test "x$has_forbidden_chars" != x; then
22651     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22652     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22653   fi
22654 
22655     # Output is in $new_path
22656 
22657   windows_path="$new_path"
22658   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22659     unix_path=`$CYGPATH -u "$windows_path"`
22660     new_path="$unix_path"
22661   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22662     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22663     new_path="$unix_path"
22664   fi
22665 
22666     # remove trailing .exe if any
22667     new_path="${new_path/%.exe/}"
22668 
22669     # Save the first 10 bytes of this path to the storage, so fixpath can work.
22670     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22671   fi
22672 
22673   else
22674     # We're on a posix platform. Hooray! :)
22675     # First separate the path from the arguments. This will split at the first
22676     # space.
22677     complete="$OBJC"
22678     path="${complete%% *}"
22679     tmp="$complete EOL"
22680     arguments="${tmp#* }"
22681 
22682     # Cannot rely on the command "which" here since it doesn't always work.
22683     is_absolute_path=`$ECHO "$path" | $GREP ^/`
22684     if test -z "$is_absolute_path"; then
22685       # Path to executable is not absolute. Find it.
22686       IFS_save="$IFS"
22687       IFS=:
22688       for p in $PATH; do
22689         if test -f "$p/$path" && test -x "$p/$path"; then
22690           new_path="$p/$path"
22691           break
22692         fi
22693       done
22694       IFS="$IFS_save"
22695     else
22696       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
22697 $as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
22698       new_path="$path"
22699     fi
22700 
22701     if test "x$new_path" = x; then
22702       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22703 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22704       has_space=`$ECHO "$complete" | $GREP " "`
22705       if test "x$has_space" != x; then
22706         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22707 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22708       fi
22709       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22710     fi
22711   fi
22712 
22713   # Now join together the path and the arguments once again
22714   if test "x$arguments" != xEOL; then
22715     new_complete="$new_path ${arguments% *}"
22716   else
22717     new_complete="$new_path"
22718   fi
22719 
22720   if test "x$complete" != "x$new_complete"; then
22721     OBJC="$new_complete"
22722     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
22723 $as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
22724   fi
22725 
22726   else
22727     OBJC=
22728   fi
22729 
22730   # Restore the flags to the user specified values.
22731   # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
22732   CFLAGS="$ORG_CFLAGS"
22733   CXXFLAGS="$ORG_CXXFLAGS"
22734   OBJCFLAGS="$ORG_OBJCFLAGS"
22735 
22736   LD="$CC"
22737   LDEXE="$CC"
22738   LDCXX="$CXX"
22739   LDEXECXX="$CXX"
22740 
22741   # LDEXE is the linker to use, when creating executables.
22742 
22743   # Linking C++ libraries.
22744 
22745   # Linking C++ executables.
22746 
22747 
22748   if test "x$OPENJDK_TARGET_OS" != xwindows; then
22749     if test -n "$ac_tool_prefix"; then
22750   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
22751 set dummy ${ac_tool_prefix}ar; ac_word=$2
22752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22753 $as_echo_n "checking for $ac_word... " >&6; }
22754 if ${ac_cv_prog_AR+:} false; then :
22755   $as_echo_n "(cached) " >&6
22756 else
22757   if test -n "$AR"; then
22758   ac_cv_prog_AR="$AR" # Let the user override the test.
22759 else
22760 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22761 for as_dir in $PATH
22762 do
22763   IFS=$as_save_IFS
22764   test -z "$as_dir" && as_dir=.
22765     for ac_exec_ext in '' $ac_executable_extensions; do
22766   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22767     ac_cv_prog_AR="${ac_tool_prefix}ar"
22768     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22769     break 2
22770   fi
22771 done
22772   done
22773 IFS=$as_save_IFS
22774 
22775 fi
22776 fi
22777 AR=$ac_cv_prog_AR
22778 if test -n "$AR"; then
22779   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
22780 $as_echo "$AR" >&6; }
22781 else
22782   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22783 $as_echo "no" >&6; }
22784 fi
22785 
22786 
22787 fi
22788 if test -z "$ac_cv_prog_AR"; then
22789   ac_ct_AR=$AR
22790   # Extract the first word of "ar", so it can be a program name with args.
22791 set dummy ar; ac_word=$2
22792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22793 $as_echo_n "checking for $ac_word... " >&6; }
22794 if ${ac_cv_prog_ac_ct_AR+:} false; then :
22795   $as_echo_n "(cached) " >&6
22796 else
22797   if test -n "$ac_ct_AR"; then
22798   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22799 else
22800 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22801 for as_dir in $PATH
22802 do
22803   IFS=$as_save_IFS
22804   test -z "$as_dir" && as_dir=.
22805     for ac_exec_ext in '' $ac_executable_extensions; do
22806   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22807     ac_cv_prog_ac_ct_AR="ar"
22808     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22809     break 2
22810   fi
22811 done
22812   done
22813 IFS=$as_save_IFS
22814 
22815 fi
22816 fi
22817 ac_ct_AR=$ac_cv_prog_ac_ct_AR
22818 if test -n "$ac_ct_AR"; then
22819   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22820 $as_echo "$ac_ct_AR" >&6; }
22821 else
22822   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22823 $as_echo "no" >&6; }
22824 fi
22825 
22826   if test "x$ac_ct_AR" = x; then
22827     AR=""
22828   else
22829     case $cross_compiling:$ac_tool_warned in
22830 yes:)
22831 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22832 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22833 ac_tool_warned=yes ;;
22834 esac
22835     AR=$ac_ct_AR
22836   fi
22837 else
22838   AR="$ac_cv_prog_AR"
22839 fi
22840 
22841 
22842   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22843 
22844   # First separate the path from the arguments. This will split at the first
22845   # space.
22846   complete="$AR"
22847   path="${complete%% *}"
22848   tmp="$complete EOL"
22849   arguments="${tmp#* }"
22850 
22851   # Input might be given as Windows format, start by converting to
22852   # unix format.
22853   new_path=`$CYGPATH -u "$path"`
22854 
22855   # Now try to locate executable using which
22856   new_path=`$WHICH "$new_path" 2> /dev/null`
22857   # bat and cmd files are not always considered executable in cygwin causing which
22858   # to not find them
22859   if test "x$new_path" = x \
22860       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22861       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22862     new_path=`$CYGPATH -u "$path"`
22863   fi
22864   if test "x$new_path" = x; then
22865     # Oops. Which didn't find the executable.
22866     # The splitting of arguments from the executable at a space might have been incorrect,
22867     # since paths with space are more likely in Windows. Give it another try with the whole
22868     # argument.
22869     path="$complete"
22870     arguments="EOL"
22871     new_path=`$CYGPATH -u "$path"`
22872     new_path=`$WHICH "$new_path" 2> /dev/null`
22873     # bat and cmd files are not always considered executable in cygwin causing which
22874     # to not find them
22875     if test "x$new_path" = x \
22876         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22877         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22878       new_path=`$CYGPATH -u "$path"`
22879     fi
22880     if test "x$new_path" = x; then
22881       # It's still not found. Now this is an unrecoverable error.
22882       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22883 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22884       has_space=`$ECHO "$complete" | $GREP " "`
22885       if test "x$has_space" != x; then
22886         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22887 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22888       fi
22889       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22890     fi
22891   fi
22892 
22893   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22894   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22895   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22896   # "foo.exe" is OK but "foo" is an error.
22897   #
22898   # This test is therefore slightly more accurate than "test -f" to check for file presence.
22899   # It is also a way to make sure we got the proper file name for the real test later on.
22900   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22901   if test "x$test_shortpath" = x; then
22902     # Short path failed, file does not exist as specified.
22903     # Try adding .exe or .cmd
22904     if test -f "${new_path}.exe"; then
22905       input_to_shortpath="${new_path}.exe"
22906     elif test -f "${new_path}.cmd"; then
22907       input_to_shortpath="${new_path}.cmd"
22908     else
22909       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22910 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22911       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22912 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22913       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22914     fi
22915   else
22916     input_to_shortpath="$new_path"
22917   fi
22918 
22919   # Call helper function which possibly converts this using DOS-style short mode.
22920   # If so, the updated path is stored in $new_path.
22921   new_path="$input_to_shortpath"
22922 
22923   input_path="$input_to_shortpath"
22924   # Check if we need to convert this using DOS-style short mode. If the path
22925   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22926   # take no chances and rewrite it.
22927   # Note: m4 eats our [], so we need to use [ and ] instead.
22928   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22929   if test "x$has_forbidden_chars" != x; then
22930     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22931     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22932     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22933     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22934       # Going to short mode and back again did indeed matter. Since short mode is
22935       # case insensitive, let's make it lowercase to improve readability.
22936       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22937       # Now convert it back to Unix-stile (cygpath)
22938       input_path=`$CYGPATH -u "$shortmode_path"`
22939       new_path="$input_path"
22940     fi
22941   fi
22942 
22943   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22944   if test "x$test_cygdrive_prefix" = x; then
22945     # As a simple fix, exclude /usr/bin since it's not a real path.
22946     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22947       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22948       # a path prefixed by /cygdrive for fixpath to work.
22949       new_path="$CYGWIN_ROOT_PATH$input_path"
22950     fi
22951   fi
22952 
22953   # remove trailing .exe if any
22954   new_path="${new_path/%.exe/}"
22955 
22956   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22957 
22958   # First separate the path from the arguments. This will split at the first
22959   # space.
22960   complete="$AR"
22961   path="${complete%% *}"
22962   tmp="$complete EOL"
22963   arguments="${tmp#* }"
22964 
22965   # Input might be given as Windows format, start by converting to
22966   # unix format.
22967   new_path="$path"
22968 
22969   windows_path="$new_path"
22970   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22971     unix_path=`$CYGPATH -u "$windows_path"`
22972     new_path="$unix_path"
22973   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22974     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22975     new_path="$unix_path"
22976   fi
22977 
22978 
22979   # Now try to locate executable using which
22980   new_path=`$WHICH "$new_path" 2> /dev/null`
22981 
22982   if test "x$new_path" = x; then
22983     # Oops. Which didn't find the executable.
22984     # The splitting of arguments from the executable at a space might have been incorrect,
22985     # since paths with space are more likely in Windows. Give it another try with the whole
22986     # argument.
22987     path="$complete"
22988     arguments="EOL"
22989     new_path="$path"
22990 
22991   windows_path="$new_path"
22992   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22993     unix_path=`$CYGPATH -u "$windows_path"`
22994     new_path="$unix_path"
22995   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22996     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22997     new_path="$unix_path"
22998   fi
22999 
23000 
23001     new_path=`$WHICH "$new_path" 2> /dev/null`
23002 
23003     if test "x$new_path" = x; then
23004       # It's still not found. Now this is an unrecoverable error.
23005       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
23006 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
23007       has_space=`$ECHO "$complete" | $GREP " "`
23008       if test "x$has_space" != x; then
23009         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23010 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23011       fi
23012       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
23013     fi
23014   fi
23015 
23016   # Now new_path has a complete unix path to the binary
23017   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23018     # Keep paths in /bin as-is, but remove trailing .exe if any
23019     new_path="${new_path/%.exe/}"
23020     # Do not save /bin paths to all_fixpath_prefixes!
23021   else
23022     # Not in mixed or Windows style, start by that.
23023     new_path=`cmd //c echo $new_path`
23024 
23025   input_path="$new_path"
23026   # Check if we need to convert this using DOS-style short mode. If the path
23027   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23028   # take no chances and rewrite it.
23029   # Note: m4 eats our [], so we need to use [ and ] instead.
23030   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23031   if test "x$has_forbidden_chars" != x; then
23032     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23033     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23034   fi
23035 
23036     # Output is in $new_path
23037 
23038   windows_path="$new_path"
23039   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23040     unix_path=`$CYGPATH -u "$windows_path"`
23041     new_path="$unix_path"
23042   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23043     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23044     new_path="$unix_path"
23045   fi
23046 
23047     # remove trailing .exe if any
23048     new_path="${new_path/%.exe/}"
23049 
23050     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23051     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23052   fi
23053 
23054   else
23055     # We're on a posix platform. Hooray! :)
23056     # First separate the path from the arguments. This will split at the first
23057     # space.
23058     complete="$AR"
23059     path="${complete%% *}"
23060     tmp="$complete EOL"
23061     arguments="${tmp#* }"
23062 
23063     # Cannot rely on the command "which" here since it doesn't always work.
23064     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23065     if test -z "$is_absolute_path"; then
23066       # Path to executable is not absolute. Find it.
23067       IFS_save="$IFS"
23068       IFS=:
23069       for p in $PATH; do
23070         if test -f "$p/$path" && test -x "$p/$path"; then
23071           new_path="$p/$path"
23072           break
23073         fi
23074       done
23075       IFS="$IFS_save"
23076     else
23077       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
23078 $as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
23079       new_path="$path"
23080     fi
23081 
23082     if test "x$new_path" = x; then
23083       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
23084 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
23085       has_space=`$ECHO "$complete" | $GREP " "`
23086       if test "x$has_space" != x; then
23087         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23088 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23089       fi
23090       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
23091     fi
23092   fi
23093 
23094   # Now join together the path and the arguments once again
23095   if test "x$arguments" != xEOL; then
23096     new_complete="$new_path ${arguments% *}"
23097   else
23098     new_complete="$new_path"
23099   fi
23100 
23101   if test "x$complete" != "x$new_complete"; then
23102     AR="$new_complete"
23103     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
23104 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
23105   fi
23106 
23107   fi
23108   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
23109     ARFLAGS="-r"
23110   elif test "x$OPENJDK_TARGET_OS" = xaix; then
23111     ARFLAGS="-X64"
23112   else
23113     ARFLAGS=""
23114   fi
23115 
23116 
23117   # For hotspot, we need these in Windows mixed path; other platforms keep them the same
23118   HOTSPOT_CXX="$CXX"
23119   HOTSPOT_LD="$LD"
23120 
23121 
23122 
23123   COMPILER_NAME=gcc
23124   COMPILER_TYPE=CC
23125   if test "x$OPENJDK_TARGET_OS" = xwindows; then :
23126 
23127     # For now, assume that we are always compiling using cl.exe.
23128     CC_OUT_OPTION=-Fo
23129     EXE_OUT_OPTION=-out:
23130     LD_OUT_OPTION=-out:
23131     AR_OUT_OPTION=-out:
23132     # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
23133     # program for something completely different.
23134     # Extract the first word of "link", so it can be a program name with args.
23135 set dummy link; ac_word=$2
23136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23137 $as_echo_n "checking for $ac_word... " >&6; }
23138 if ${ac_cv_prog_WINLD+:} false; then :
23139   $as_echo_n "(cached) " >&6
23140 else
23141   if test -n "$WINLD"; then
23142   ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
23143 else
23144   ac_prog_rejected=no
23145 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23146 for as_dir in $PATH
23147 do
23148   IFS=$as_save_IFS
23149   test -z "$as_dir" && as_dir=.
23150     for ac_exec_ext in '' $ac_executable_extensions; do
23151   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23152     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
23153        ac_prog_rejected=yes
23154        continue
23155      fi
23156     ac_cv_prog_WINLD="link"
23157     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23158     break 2
23159   fi
23160 done
23161   done
23162 IFS=$as_save_IFS
23163 
23164 if test $ac_prog_rejected = yes; then
23165   # We found a bogon in the path, so make sure we never use it.
23166   set dummy $ac_cv_prog_WINLD
23167   shift
23168   if test $# != 0; then
23169     # We chose a different compiler from the bogus one.
23170     # However, it has the same basename, so the bogon will be chosen
23171     # first if we set WINLD to just the basename; use the full file name.
23172     shift
23173     ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
23174   fi
23175 fi
23176 fi
23177 fi
23178 WINLD=$ac_cv_prog_WINLD
23179 if test -n "$WINLD"; then
23180   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
23181 $as_echo "$WINLD" >&6; }
23182 else
23183   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23184 $as_echo "no" >&6; }
23185 fi
23186 
23187 
23188     # Since we must ignore the first found link, WINLD will contain
23189     # the full path to the link.exe program.
23190 
23191   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23192 
23193   # First separate the path from the arguments. This will split at the first
23194   # space.
23195   complete="$WINLD"
23196   path="${complete%% *}"
23197   tmp="$complete EOL"
23198   arguments="${tmp#* }"
23199 
23200   # Input might be given as Windows format, start by converting to
23201   # unix format.
23202   new_path=`$CYGPATH -u "$path"`
23203 
23204   # Now try to locate executable using which
23205   new_path=`$WHICH "$new_path" 2> /dev/null`
23206   # bat and cmd files are not always considered executable in cygwin causing which
23207   # to not find them
23208   if test "x$new_path" = x \
23209       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23210       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23211     new_path=`$CYGPATH -u "$path"`
23212   fi
23213   if test "x$new_path" = x; then
23214     # Oops. Which didn't find the executable.
23215     # The splitting of arguments from the executable at a space might have been incorrect,
23216     # since paths with space are more likely in Windows. Give it another try with the whole
23217     # argument.
23218     path="$complete"
23219     arguments="EOL"
23220     new_path=`$CYGPATH -u "$path"`
23221     new_path=`$WHICH "$new_path" 2> /dev/null`
23222     # bat and cmd files are not always considered executable in cygwin causing which
23223     # to not find them
23224     if test "x$new_path" = x \
23225         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23226         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23227       new_path=`$CYGPATH -u "$path"`
23228     fi
23229     if test "x$new_path" = x; then
23230       # It's still not found. Now this is an unrecoverable error.
23231       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23232 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23233       has_space=`$ECHO "$complete" | $GREP " "`
23234       if test "x$has_space" != x; then
23235         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23236 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23237       fi
23238       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23239     fi
23240   fi
23241 
23242   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23243   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23244   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23245   # "foo.exe" is OK but "foo" is an error.
23246   #
23247   # This test is therefore slightly more accurate than "test -f" to check for file presence.
23248   # It is also a way to make sure we got the proper file name for the real test later on.
23249   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23250   if test "x$test_shortpath" = x; then
23251     # Short path failed, file does not exist as specified.
23252     # Try adding .exe or .cmd
23253     if test -f "${new_path}.exe"; then
23254       input_to_shortpath="${new_path}.exe"
23255     elif test -f "${new_path}.cmd"; then
23256       input_to_shortpath="${new_path}.cmd"
23257     else
23258       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
23259 $as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
23260       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23261 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23262       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23263     fi
23264   else
23265     input_to_shortpath="$new_path"
23266   fi
23267 
23268   # Call helper function which possibly converts this using DOS-style short mode.
23269   # If so, the updated path is stored in $new_path.
23270   new_path="$input_to_shortpath"
23271 
23272   input_path="$input_to_shortpath"
23273   # Check if we need to convert this using DOS-style short mode. If the path
23274   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23275   # take no chances and rewrite it.
23276   # Note: m4 eats our [], so we need to use [ and ] instead.
23277   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23278   if test "x$has_forbidden_chars" != x; then
23279     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23280     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23281     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23282     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23283       # Going to short mode and back again did indeed matter. Since short mode is
23284       # case insensitive, let's make it lowercase to improve readability.
23285       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23286       # Now convert it back to Unix-stile (cygpath)
23287       input_path=`$CYGPATH -u "$shortmode_path"`
23288       new_path="$input_path"
23289     fi
23290   fi
23291 
23292   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23293   if test "x$test_cygdrive_prefix" = x; then
23294     # As a simple fix, exclude /usr/bin since it's not a real path.
23295     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23296       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23297       # a path prefixed by /cygdrive for fixpath to work.
23298       new_path="$CYGWIN_ROOT_PATH$input_path"
23299     fi
23300   fi
23301 
23302   # remove trailing .exe if any
23303   new_path="${new_path/%.exe/}"
23304 
23305   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23306 
23307   # First separate the path from the arguments. This will split at the first
23308   # space.
23309   complete="$WINLD"
23310   path="${complete%% *}"
23311   tmp="$complete EOL"
23312   arguments="${tmp#* }"
23313 
23314   # Input might be given as Windows format, start by converting to
23315   # unix format.
23316   new_path="$path"
23317 
23318   windows_path="$new_path"
23319   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23320     unix_path=`$CYGPATH -u "$windows_path"`
23321     new_path="$unix_path"
23322   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23323     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23324     new_path="$unix_path"
23325   fi
23326 
23327 
23328   # Now try to locate executable using which
23329   new_path=`$WHICH "$new_path" 2> /dev/null`
23330 
23331   if test "x$new_path" = x; then
23332     # Oops. Which didn't find the executable.
23333     # The splitting of arguments from the executable at a space might have been incorrect,
23334     # since paths with space are more likely in Windows. Give it another try with the whole
23335     # argument.
23336     path="$complete"
23337     arguments="EOL"
23338     new_path="$path"
23339 
23340   windows_path="$new_path"
23341   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23342     unix_path=`$CYGPATH -u "$windows_path"`
23343     new_path="$unix_path"
23344   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23345     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23346     new_path="$unix_path"
23347   fi
23348 
23349 
23350     new_path=`$WHICH "$new_path" 2> /dev/null`
23351 
23352     if test "x$new_path" = x; then
23353       # It's still not found. Now this is an unrecoverable error.
23354       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23355 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23356       has_space=`$ECHO "$complete" | $GREP " "`
23357       if test "x$has_space" != x; then
23358         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23359 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23360       fi
23361       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23362     fi
23363   fi
23364 
23365   # Now new_path has a complete unix path to the binary
23366   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23367     # Keep paths in /bin as-is, but remove trailing .exe if any
23368     new_path="${new_path/%.exe/}"
23369     # Do not save /bin paths to all_fixpath_prefixes!
23370   else
23371     # Not in mixed or Windows style, start by that.
23372     new_path=`cmd //c echo $new_path`
23373 
23374   input_path="$new_path"
23375   # Check if we need to convert this using DOS-style short mode. If the path
23376   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23377   # take no chances and rewrite it.
23378   # Note: m4 eats our [], so we need to use [ and ] instead.
23379   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23380   if test "x$has_forbidden_chars" != x; then
23381     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23382     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23383   fi
23384 
23385     # Output is in $new_path
23386 
23387   windows_path="$new_path"
23388   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23389     unix_path=`$CYGPATH -u "$windows_path"`
23390     new_path="$unix_path"
23391   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23392     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23393     new_path="$unix_path"
23394   fi
23395 
23396     # remove trailing .exe if any
23397     new_path="${new_path/%.exe/}"
23398 
23399     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23400     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23401   fi
23402 
23403   else
23404     # We're on a posix platform. Hooray! :)
23405     # First separate the path from the arguments. This will split at the first
23406     # space.
23407     complete="$WINLD"
23408     path="${complete%% *}"
23409     tmp="$complete EOL"
23410     arguments="${tmp#* }"
23411 
23412     # Cannot rely on the command "which" here since it doesn't always work.
23413     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23414     if test -z "$is_absolute_path"; then
23415       # Path to executable is not absolute. Find it.
23416       IFS_save="$IFS"
23417       IFS=:
23418       for p in $PATH; do
23419         if test -f "$p/$path" && test -x "$p/$path"; then
23420           new_path="$p/$path"
23421           break
23422         fi
23423       done
23424       IFS="$IFS_save"
23425     else
23426       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
23427 $as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
23428       new_path="$path"
23429     fi
23430 
23431     if test "x$new_path" = x; then
23432       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23433 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23434       has_space=`$ECHO "$complete" | $GREP " "`
23435       if test "x$has_space" != x; then
23436         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23437 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23438       fi
23439       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23440     fi
23441   fi
23442 
23443   # Now join together the path and the arguments once again
23444   if test "x$arguments" != xEOL; then
23445     new_complete="$new_path ${arguments% *}"
23446   else
23447     new_complete="$new_path"
23448   fi
23449 
23450   if test "x$complete" != "x$new_complete"; then
23451     WINLD="$new_complete"
23452     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
23453 $as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
23454   fi
23455 
23456     printf "Windows linker was found at $WINLD\n"
23457     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
23458 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
23459     "$WINLD" --version > /dev/null
23460     if test $? -eq 0 ; then
23461       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23462 $as_echo "no" >&6; }
23463       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
23464     else
23465       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23466 $as_echo "yes" >&6; }
23467     fi
23468     LD="$WINLD"
23469     LDEXE="$WINLD"
23470     LDCXX="$WINLD"
23471     LDEXECXX="$WINLD"
23472 
23473     # Extract the first word of "mt", so it can be a program name with args.
23474 set dummy mt; ac_word=$2
23475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23476 $as_echo_n "checking for $ac_word... " >&6; }
23477 if ${ac_cv_prog_MT+:} false; then :
23478   $as_echo_n "(cached) " >&6
23479 else
23480   if test -n "$MT"; then
23481   ac_cv_prog_MT="$MT" # Let the user override the test.
23482 else
23483   ac_prog_rejected=no
23484 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23485 for as_dir in $PATH
23486 do
23487   IFS=$as_save_IFS
23488   test -z "$as_dir" && as_dir=.
23489     for ac_exec_ext in '' $ac_executable_extensions; do
23490   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23491     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
23492        ac_prog_rejected=yes
23493        continue
23494      fi
23495     ac_cv_prog_MT="mt"
23496     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23497     break 2
23498   fi
23499 done
23500   done
23501 IFS=$as_save_IFS
23502 
23503 if test $ac_prog_rejected = yes; then
23504   # We found a bogon in the path, so make sure we never use it.
23505   set dummy $ac_cv_prog_MT
23506   shift
23507   if test $# != 0; then
23508     # We chose a different compiler from the bogus one.
23509     # However, it has the same basename, so the bogon will be chosen
23510     # first if we set MT to just the basename; use the full file name.
23511     shift
23512     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
23513   fi
23514 fi
23515 fi
23516 fi
23517 MT=$ac_cv_prog_MT
23518 if test -n "$MT"; then
23519   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
23520 $as_echo "$MT" >&6; }
23521 else
23522   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23523 $as_echo "no" >&6; }
23524 fi
23525 
23526 
23527 
23528   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23529 
23530   # First separate the path from the arguments. This will split at the first
23531   # space.
23532   complete="$MT"
23533   path="${complete%% *}"
23534   tmp="$complete EOL"
23535   arguments="${tmp#* }"
23536 
23537   # Input might be given as Windows format, start by converting to
23538   # unix format.
23539   new_path=`$CYGPATH -u "$path"`
23540 
23541   # Now try to locate executable using which
23542   new_path=`$WHICH "$new_path" 2> /dev/null`
23543   # bat and cmd files are not always considered executable in cygwin causing which
23544   # to not find them
23545   if test "x$new_path" = x \
23546       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23547       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23548     new_path=`$CYGPATH -u "$path"`
23549   fi
23550   if test "x$new_path" = x; then
23551     # Oops. Which didn't find the executable.
23552     # The splitting of arguments from the executable at a space might have been incorrect,
23553     # since paths with space are more likely in Windows. Give it another try with the whole
23554     # argument.
23555     path="$complete"
23556     arguments="EOL"
23557     new_path=`$CYGPATH -u "$path"`
23558     new_path=`$WHICH "$new_path" 2> /dev/null`
23559     # bat and cmd files are not always considered executable in cygwin causing which
23560     # to not find them
23561     if test "x$new_path" = x \
23562         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23563         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23564       new_path=`$CYGPATH -u "$path"`
23565     fi
23566     if test "x$new_path" = x; then
23567       # It's still not found. Now this is an unrecoverable error.
23568       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23569 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23570       has_space=`$ECHO "$complete" | $GREP " "`
23571       if test "x$has_space" != x; then
23572         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23573 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23574       fi
23575       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23576     fi
23577   fi
23578 
23579   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23580   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23581   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23582   # "foo.exe" is OK but "foo" is an error.
23583   #
23584   # This test is therefore slightly more accurate than "test -f" to check for file presence.
23585   # It is also a way to make sure we got the proper file name for the real test later on.
23586   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23587   if test "x$test_shortpath" = x; then
23588     # Short path failed, file does not exist as specified.
23589     # Try adding .exe or .cmd
23590     if test -f "${new_path}.exe"; then
23591       input_to_shortpath="${new_path}.exe"
23592     elif test -f "${new_path}.cmd"; then
23593       input_to_shortpath="${new_path}.cmd"
23594     else
23595       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
23596 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
23597       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23598 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23599       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23600     fi
23601   else
23602     input_to_shortpath="$new_path"
23603   fi
23604 
23605   # Call helper function which possibly converts this using DOS-style short mode.
23606   # If so, the updated path is stored in $new_path.
23607   new_path="$input_to_shortpath"
23608 
23609   input_path="$input_to_shortpath"
23610   # Check if we need to convert this using DOS-style short mode. If the path
23611   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23612   # take no chances and rewrite it.
23613   # Note: m4 eats our [], so we need to use [ and ] instead.
23614   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23615   if test "x$has_forbidden_chars" != x; then
23616     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23617     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23618     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23619     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23620       # Going to short mode and back again did indeed matter. Since short mode is
23621       # case insensitive, let's make it lowercase to improve readability.
23622       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23623       # Now convert it back to Unix-stile (cygpath)
23624       input_path=`$CYGPATH -u "$shortmode_path"`
23625       new_path="$input_path"
23626     fi
23627   fi
23628 
23629   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23630   if test "x$test_cygdrive_prefix" = x; then
23631     # As a simple fix, exclude /usr/bin since it's not a real path.
23632     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23633       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23634       # a path prefixed by /cygdrive for fixpath to work.
23635       new_path="$CYGWIN_ROOT_PATH$input_path"
23636     fi
23637   fi
23638 
23639   # remove trailing .exe if any
23640   new_path="${new_path/%.exe/}"
23641 
23642   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23643 
23644   # First separate the path from the arguments. This will split at the first
23645   # space.
23646   complete="$MT"
23647   path="${complete%% *}"
23648   tmp="$complete EOL"
23649   arguments="${tmp#* }"
23650 
23651   # Input might be given as Windows format, start by converting to
23652   # unix format.
23653   new_path="$path"
23654 
23655   windows_path="$new_path"
23656   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23657     unix_path=`$CYGPATH -u "$windows_path"`
23658     new_path="$unix_path"
23659   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23660     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23661     new_path="$unix_path"
23662   fi
23663 
23664 
23665   # Now try to locate executable using which
23666   new_path=`$WHICH "$new_path" 2> /dev/null`
23667 
23668   if test "x$new_path" = x; then
23669     # Oops. Which didn't find the executable.
23670     # The splitting of arguments from the executable at a space might have been incorrect,
23671     # since paths with space are more likely in Windows. Give it another try with the whole
23672     # argument.
23673     path="$complete"
23674     arguments="EOL"
23675     new_path="$path"
23676 
23677   windows_path="$new_path"
23678   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23679     unix_path=`$CYGPATH -u "$windows_path"`
23680     new_path="$unix_path"
23681   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23682     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23683     new_path="$unix_path"
23684   fi
23685 
23686 
23687     new_path=`$WHICH "$new_path" 2> /dev/null`
23688 
23689     if test "x$new_path" = x; then
23690       # It's still not found. Now this is an unrecoverable error.
23691       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23692 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23693       has_space=`$ECHO "$complete" | $GREP " "`
23694       if test "x$has_space" != x; then
23695         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23696 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23697       fi
23698       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23699     fi
23700   fi
23701 
23702   # Now new_path has a complete unix path to the binary
23703   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23704     # Keep paths in /bin as-is, but remove trailing .exe if any
23705     new_path="${new_path/%.exe/}"
23706     # Do not save /bin paths to all_fixpath_prefixes!
23707   else
23708     # Not in mixed or Windows style, start by that.
23709     new_path=`cmd //c echo $new_path`
23710 
23711   input_path="$new_path"
23712   # Check if we need to convert this using DOS-style short mode. If the path
23713   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23714   # take no chances and rewrite it.
23715   # Note: m4 eats our [], so we need to use [ and ] instead.
23716   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23717   if test "x$has_forbidden_chars" != x; then
23718     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23719     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23720   fi
23721 
23722     # Output is in $new_path
23723 
23724   windows_path="$new_path"
23725   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23726     unix_path=`$CYGPATH -u "$windows_path"`
23727     new_path="$unix_path"
23728   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23729     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23730     new_path="$unix_path"
23731   fi
23732 
23733     # remove trailing .exe if any
23734     new_path="${new_path/%.exe/}"
23735 
23736     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23737     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23738   fi
23739 
23740   else
23741     # We're on a posix platform. Hooray! :)
23742     # First separate the path from the arguments. This will split at the first
23743     # space.
23744     complete="$MT"
23745     path="${complete%% *}"
23746     tmp="$complete EOL"
23747     arguments="${tmp#* }"
23748 
23749     # Cannot rely on the command "which" here since it doesn't always work.
23750     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23751     if test -z "$is_absolute_path"; then
23752       # Path to executable is not absolute. Find it.
23753       IFS_save="$IFS"
23754       IFS=:
23755       for p in $PATH; do
23756         if test -f "$p/$path" && test -x "$p/$path"; then
23757           new_path="$p/$path"
23758           break
23759         fi
23760       done
23761       IFS="$IFS_save"
23762     else
23763       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
23764 $as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
23765       new_path="$path"
23766     fi
23767 
23768     if test "x$new_path" = x; then
23769       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23770 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23771       has_space=`$ECHO "$complete" | $GREP " "`
23772       if test "x$has_space" != x; then
23773         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23774 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23775       fi
23776       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23777     fi
23778   fi
23779 
23780   # Now join together the path and the arguments once again
23781   if test "x$arguments" != xEOL; then
23782     new_complete="$new_path ${arguments% *}"
23783   else
23784     new_complete="$new_path"
23785   fi
23786 
23787   if test "x$complete" != "x$new_complete"; then
23788     MT="$new_complete"
23789     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23790 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23791   fi
23792 
23793     # The resource compiler
23794     # Extract the first word of "rc", so it can be a program name with args.
23795 set dummy rc; ac_word=$2
23796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23797 $as_echo_n "checking for $ac_word... " >&6; }
23798 if ${ac_cv_prog_RC+:} false; then :
23799   $as_echo_n "(cached) " >&6
23800 else
23801   if test -n "$RC"; then
23802   ac_cv_prog_RC="$RC" # Let the user override the test.
23803 else
23804   ac_prog_rejected=no
23805 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23806 for as_dir in $PATH
23807 do
23808   IFS=$as_save_IFS
23809   test -z "$as_dir" && as_dir=.
23810     for ac_exec_ext in '' $ac_executable_extensions; do
23811   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23812     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23813        ac_prog_rejected=yes
23814        continue
23815      fi
23816     ac_cv_prog_RC="rc"
23817     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23818     break 2
23819   fi
23820 done
23821   done
23822 IFS=$as_save_IFS
23823 
23824 if test $ac_prog_rejected = yes; then
23825   # We found a bogon in the path, so make sure we never use it.
23826   set dummy $ac_cv_prog_RC
23827   shift
23828   if test $# != 0; then
23829     # We chose a different compiler from the bogus one.
23830     # However, it has the same basename, so the bogon will be chosen
23831     # first if we set RC to just the basename; use the full file name.
23832     shift
23833     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23834   fi
23835 fi
23836 fi
23837 fi
23838 RC=$ac_cv_prog_RC
23839 if test -n "$RC"; then
23840   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23841 $as_echo "$RC" >&6; }
23842 else
23843   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23844 $as_echo "no" >&6; }
23845 fi
23846 
23847 
23848 
23849   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23850 
23851   # First separate the path from the arguments. This will split at the first
23852   # space.
23853   complete="$RC"
23854   path="${complete%% *}"
23855   tmp="$complete EOL"
23856   arguments="${tmp#* }"
23857 
23858   # Input might be given as Windows format, start by converting to
23859   # unix format.
23860   new_path=`$CYGPATH -u "$path"`
23861 
23862   # Now try to locate executable using which
23863   new_path=`$WHICH "$new_path" 2> /dev/null`
23864   # bat and cmd files are not always considered executable in cygwin causing which
23865   # to not find them
23866   if test "x$new_path" = x \
23867       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23868       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23869     new_path=`$CYGPATH -u "$path"`
23870   fi
23871   if test "x$new_path" = x; then
23872     # Oops. Which didn't find the executable.
23873     # The splitting of arguments from the executable at a space might have been incorrect,
23874     # since paths with space are more likely in Windows. Give it another try with the whole
23875     # argument.
23876     path="$complete"
23877     arguments="EOL"
23878     new_path=`$CYGPATH -u "$path"`
23879     new_path=`$WHICH "$new_path" 2> /dev/null`
23880     # bat and cmd files are not always considered executable in cygwin causing which
23881     # to not find them
23882     if test "x$new_path" = x \
23883         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23884         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23885       new_path=`$CYGPATH -u "$path"`
23886     fi
23887     if test "x$new_path" = x; then
23888       # It's still not found. Now this is an unrecoverable error.
23889       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23890 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23891       has_space=`$ECHO "$complete" | $GREP " "`
23892       if test "x$has_space" != x; then
23893         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23894 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23895       fi
23896       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23897     fi
23898   fi
23899 
23900   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23901   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23902   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23903   # "foo.exe" is OK but "foo" is an error.
23904   #
23905   # This test is therefore slightly more accurate than "test -f" to check for file presence.
23906   # It is also a way to make sure we got the proper file name for the real test later on.
23907   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23908   if test "x$test_shortpath" = x; then
23909     # Short path failed, file does not exist as specified.
23910     # Try adding .exe or .cmd
23911     if test -f "${new_path}.exe"; then
23912       input_to_shortpath="${new_path}.exe"
23913     elif test -f "${new_path}.cmd"; then
23914       input_to_shortpath="${new_path}.cmd"
23915     else
23916       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23917 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23918       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23919 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23920       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23921     fi
23922   else
23923     input_to_shortpath="$new_path"
23924   fi
23925 
23926   # Call helper function which possibly converts this using DOS-style short mode.
23927   # If so, the updated path is stored in $new_path.
23928   new_path="$input_to_shortpath"
23929 
23930   input_path="$input_to_shortpath"
23931   # Check if we need to convert this using DOS-style short mode. If the path
23932   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23933   # take no chances and rewrite it.
23934   # Note: m4 eats our [], so we need to use [ and ] instead.
23935   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23936   if test "x$has_forbidden_chars" != x; then
23937     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23938     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23939     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23940     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23941       # Going to short mode and back again did indeed matter. Since short mode is
23942       # case insensitive, let's make it lowercase to improve readability.
23943       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23944       # Now convert it back to Unix-stile (cygpath)
23945       input_path=`$CYGPATH -u "$shortmode_path"`
23946       new_path="$input_path"
23947     fi
23948   fi
23949 
23950   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23951   if test "x$test_cygdrive_prefix" = x; then
23952     # As a simple fix, exclude /usr/bin since it's not a real path.
23953     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23954       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23955       # a path prefixed by /cygdrive for fixpath to work.
23956       new_path="$CYGWIN_ROOT_PATH$input_path"
23957     fi
23958   fi
23959 
23960   # remove trailing .exe if any
23961   new_path="${new_path/%.exe/}"
23962 
23963   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23964 
23965   # First separate the path from the arguments. This will split at the first
23966   # space.
23967   complete="$RC"
23968   path="${complete%% *}"
23969   tmp="$complete EOL"
23970   arguments="${tmp#* }"
23971 
23972   # Input might be given as Windows format, start by converting to
23973   # unix format.
23974   new_path="$path"
23975 
23976   windows_path="$new_path"
23977   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23978     unix_path=`$CYGPATH -u "$windows_path"`
23979     new_path="$unix_path"
23980   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23981     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23982     new_path="$unix_path"
23983   fi
23984 
23985 
23986   # Now try to locate executable using which
23987   new_path=`$WHICH "$new_path" 2> /dev/null`
23988 
23989   if test "x$new_path" = x; then
23990     # Oops. Which didn't find the executable.
23991     # The splitting of arguments from the executable at a space might have been incorrect,
23992     # since paths with space are more likely in Windows. Give it another try with the whole
23993     # argument.
23994     path="$complete"
23995     arguments="EOL"
23996     new_path="$path"
23997 
23998   windows_path="$new_path"
23999   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24000     unix_path=`$CYGPATH -u "$windows_path"`
24001     new_path="$unix_path"
24002   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24003     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24004     new_path="$unix_path"
24005   fi
24006 
24007 
24008     new_path=`$WHICH "$new_path" 2> /dev/null`
24009 
24010     if test "x$new_path" = x; then
24011       # It's still not found. Now this is an unrecoverable error.
24012       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
24013 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
24014       has_space=`$ECHO "$complete" | $GREP " "`
24015       if test "x$has_space" != x; then
24016         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24017 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24018       fi
24019       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
24020     fi
24021   fi
24022 
24023   # Now new_path has a complete unix path to the binary
24024   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24025     # Keep paths in /bin as-is, but remove trailing .exe if any
24026     new_path="${new_path/%.exe/}"
24027     # Do not save /bin paths to all_fixpath_prefixes!
24028   else
24029     # Not in mixed or Windows style, start by that.
24030     new_path=`cmd //c echo $new_path`
24031 
24032   input_path="$new_path"
24033   # Check if we need to convert this using DOS-style short mode. If the path
24034   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24035   # take no chances and rewrite it.
24036   # Note: m4 eats our [], so we need to use [ and ] instead.
24037   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24038   if test "x$has_forbidden_chars" != x; then
24039     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24040     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24041   fi
24042 
24043     # Output is in $new_path
24044 
24045   windows_path="$new_path"
24046   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24047     unix_path=`$CYGPATH -u "$windows_path"`
24048     new_path="$unix_path"
24049   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24050     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24051     new_path="$unix_path"
24052   fi
24053 
24054     # remove trailing .exe if any
24055     new_path="${new_path/%.exe/}"
24056 
24057     # Save the first 10 bytes of this path to the storage, so fixpath can work.
24058     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24059   fi
24060 
24061   else
24062     # We're on a posix platform. Hooray! :)
24063     # First separate the path from the arguments. This will split at the first
24064     # space.
24065     complete="$RC"
24066     path="${complete%% *}"
24067     tmp="$complete EOL"
24068     arguments="${tmp#* }"
24069 
24070     # Cannot rely on the command "which" here since it doesn't always work.
24071     is_absolute_path=`$ECHO "$path" | $GREP ^/`
24072     if test -z "$is_absolute_path"; then
24073       # Path to executable is not absolute. Find it.
24074       IFS_save="$IFS"
24075       IFS=:
24076       for p in $PATH; do
24077         if test -f "$p/$path" && test -x "$p/$path"; then
24078           new_path="$p/$path"
24079           break
24080         fi
24081       done
24082       IFS="$IFS_save"
24083     else
24084       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
24085 $as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
24086       new_path="$path"
24087     fi
24088 
24089     if test "x$new_path" = x; then
24090       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
24091 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
24092       has_space=`$ECHO "$complete" | $GREP " "`
24093       if test "x$has_space" != x; then
24094         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24095 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24096       fi
24097       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
24098     fi
24099   fi
24100 
24101   # Now join together the path and the arguments once again
24102   if test "x$arguments" != xEOL; then
24103     new_complete="$new_path ${arguments% *}"
24104   else
24105     new_complete="$new_path"
24106   fi
24107 
24108   if test "x$complete" != "x$new_complete"; then
24109     RC="$new_complete"
24110     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
24111 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
24112   fi
24113 
24114 
24115     # For hotspot, we need these in Windows mixed path,
24116     # so rewrite them all. Need added .exe suffix.
24117     HOTSPOT_CXX="$CXX.exe"
24118     HOTSPOT_LD="$LD.exe"
24119     HOTSPOT_MT="$MT.exe"
24120     HOTSPOT_RC="$RC.exe"
24121 
24122   unix_path="$HOTSPOT_CXX"
24123   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24124     windows_path=`$CYGPATH -m "$unix_path"`
24125     HOTSPOT_CXX="$windows_path"
24126   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24127     windows_path=`cmd //c echo $unix_path`
24128     HOTSPOT_CXX="$windows_path"
24129   fi
24130 
24131 
24132   unix_path="$HOTSPOT_LD"
24133   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24134     windows_path=`$CYGPATH -m "$unix_path"`
24135     HOTSPOT_LD="$windows_path"
24136   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24137     windows_path=`cmd //c echo $unix_path`
24138     HOTSPOT_LD="$windows_path"
24139   fi
24140 
24141 
24142   unix_path="$HOTSPOT_MT"
24143   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24144     windows_path=`$CYGPATH -m "$unix_path"`
24145     HOTSPOT_MT="$windows_path"
24146   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24147     windows_path=`cmd //c echo $unix_path`
24148     HOTSPOT_MT="$windows_path"
24149   fi
24150 
24151 
24152   unix_path="$HOTSPOT_RC"
24153   if test "x$OPENJDK_BUILD_OS_ENV" = "xwind